diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..ef7e7efc --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ +GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {one line to give the program's name and a brief idea of what it does.} + Copyright (C) {year} {name of author} + + 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: + + {project} Copyright (C) {year} {fullname} + 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/src/font.bin b/src/font.bin new file mode 100644 index 00000000..6707cb53 Binary files /dev/null and b/src/font.bin differ diff --git a/src/gnu/trove/TByteCollection.java b/src/gnu/trove/TByteCollection.java new file mode 100644 index 00000000..3e471b5f --- /dev/null +++ b/src/gnu/trove/TByteCollection.java @@ -0,0 +1,317 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + +import gnu.trove.iterator.TByteIterator; +import gnu.trove.procedure.TByteProcedure; + +import java.util.Collection; +import java.io.Serializable; + +/** + * An interface that mimics the Collection interface. + * + * @author Eric D. Friedman + * @author Rob Eden + * @author Jeff Randall + * @version $Id: _E_Collection.template,v 1.1.2.2 2009/09/15 02:38:30 upholderoftruth Exp $ + */ + +public interface TByteCollection { + static final long serialVersionUID = 1L; + + /** + * Returns the value that is used to represent null. The default + * value is generally zero, but can be changed during construction + * of the collection. + * + * @return the value that represents null + */ + byte getNoEntryValue(); + + + /** + * Returns the number of elements in this collection (its cardinality). If this + * collection contains more than Integer.MAX_VALUE elements, returns + * Integer.MAX_VALUE. + * + * @return the number of elements in this collection (its cardinality) + */ + int size(); + + + /** + * Returns true if this collection contains no elements. + * + * @return true if this collection contains no elements + */ + boolean isEmpty(); + + + /** + * Returns true if this collection contains the specified element. + * + * @param entry an byte value + * @return true if the collection contains the specified element. + */ + boolean contains( byte entry ); + + + /** + * Creates an iterator over the values of the collection. The iterator + * supports element deletion. + * + * @return an TByteIterator value + */ + TByteIterator iterator(); + + + /** + * Returns an array containing all of the elements in this collection. + * If this collection makes any guarantees as to what order its elements + * are returned by its iterator, this method must return the + * elements in the same order. + * + *

The returned array will be "safe" in that no references to it + * are maintained by this collection. (In other words, this method must + * allocate a new array even if this collection is backed by an array). + * The caller is thus free to modify the returned array. + * + *

This method acts as bridge between array-based and collection-based + * APIs. + * + * @return an array containing all the elements in this collection + */ + byte[] toArray(); + + + /** + * Returns an array containing elements in this collection. + * + *

If this collection fits in the specified array with room to spare + * (i.e., the array has more elements than this collection), the element in + * the array immediately following the end of the collection is collection to + * {@link #getNoEntryValue()}. (This is useful in determining + * the length of this collection only if the caller knows that this + * collection does not contain any elements representing null.) + * + *

If the native array is smaller than the collection size, + * the array will be filled with elements in Iterator order + * until it is full and exclude the remainder. + * + *

If this collection makes any guarantees as to what order its elements + * are returned by its iterator, this method must return the elements + * in the same order. + * + * @param dest the array into which the elements of this collection are to be + * stored. + * @return an byte[] containing all the elements in this collection + * @throws NullPointerException if the specified array is null + */ + byte[] toArray( byte[] dest ); + + + /** + * Inserts a value into the collection. + * + * @param entry a byte value + * @return true if the collection was modified by the add operation + */ + boolean add( byte entry ); + + + /** + * Removes entry from the collection. + * + * @param entry an byte value + * @return true if the collection was modified by the remove operation. + */ + boolean remove( byte entry ); + + + /** + * Tests the collection to determine if all of the elements in + * collection are present. + * + * @param collection a Collection value + * @return true if all elements were present in the collection. + */ + boolean containsAll( Collection collection ); + + + /** + * Tests the collection to determine if all of the elements in + * TByteCollection are present. + * + * @param collection a TByteCollection value + * @return true if all elements were present in the collection. + */ + boolean containsAll( TByteCollection collection ); + + + /** + * Tests the collection to determine if all of the elements in + * array are present. + * + * @param array as array of byte primitives. + * @return true if all elements were present in the collection. + */ + boolean containsAll( byte[] array ); + + + /** + * Adds all of the elements in collection to the collection. + * + * @param collection a Collection value + * @return true if the collection was modified by the add all operation. + */ + boolean addAll( Collection collection ); + + + /** + * Adds all of the elements in the TByteCollection to the collection. + * + * @param collection a TByteCollection value + * @return true if the collection was modified by the add all operation. + */ + boolean addAll( TByteCollection collection ); + + + /** + * Adds all of the elements in the array to the collection. + * + * @param array a array of byte primitives. + * @return true if the collection was modified by the add all operation. + */ + boolean addAll( byte[] array ); + + + /** + * Removes any values in the collection which are not contained in + * collection. + * + * @param collection a Collection value + * @return true if the collection was modified by the retain all operation + */ + boolean retainAll( Collection collection ); + + + /** + * Removes any values in the collection which are not contained in + * TByteCollection. + * + * @param collection a TByteCollection value + * @return true if the collection was modified by the retain all operation + */ + boolean retainAll( TByteCollection collection ); + + + /** + * Removes any values in the collection which are not contained in + * array. + * + * @param array an array of byte primitives. + * @return true if the collection was modified by the retain all operation + */ + boolean retainAll( byte[] array ); + + + /** + * Removes all of the elements in collection from the collection. + * + * @param collection a Collection value + * @return true if the collection was modified by the remove all operation. + */ + boolean removeAll( Collection collection ); + + + /** + * Removes all of the elements in TByteCollection from the collection. + * + * @param collection a TByteCollection value + * @return true if the collection was modified by the remove all operation. + */ + boolean removeAll( TByteCollection collection ); + + + /** + * Removes all of the elements in array from the collection. + * + * @param array an array of byte primitives. + * @return true if the collection was modified by the remove all operation. + */ + boolean removeAll( byte[] array ); + + + /** + * Empties the collection. + */ + void clear(); + + + /** + * Executes procedure for each element in the collection. + * + * @param procedure a TByteProcedure value + * @return false if the loop over the collection terminated because + * the procedure returned false for some value. + */ + boolean forEach( TByteProcedure procedure ); + + + // Comparison and hashing + + /** + * Compares the specified object with this collection for equality. Returns + * true if the specified object is also a collection, the two collection + * have the same size, and every member of the specified collection is + * contained in this collection (or equivalently, every member of this collection is + * contained in the specified collection). This definition ensures that the + * equals method works properly across different implementations of the + * collection interface. + * + * @param o object to be compared for equality with this collection + * @return true if the specified object is equal to this collection + */ + boolean equals( Object o ); + + + /** + * Returns the hash code value for this collection. The hash code of a collection is + * defined to be the sum of the hash codes of the elements in the collection. + * This ensures that s1.equals(s2) implies that + * s1.hashCode()==s2.hashCode() for any two collection s1 + * and s2, as required by the general contract of + * {@link Object#hashCode}. + * + * @return the hash code value for this collection + * @see Object#equals(Object) + * @see Collection#equals(Object) + */ + int hashCode(); + + +} // TByteCollection diff --git a/src/gnu/trove/TCharCollection.java b/src/gnu/trove/TCharCollection.java new file mode 100644 index 00000000..79b33657 --- /dev/null +++ b/src/gnu/trove/TCharCollection.java @@ -0,0 +1,317 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + +import gnu.trove.iterator.TCharIterator; +import gnu.trove.procedure.TCharProcedure; + +import java.util.Collection; +import java.io.Serializable; + +/** + * An interface that mimics the Collection interface. + * + * @author Eric D. Friedman + * @author Rob Eden + * @author Jeff Randall + * @version $Id: _E_Collection.template,v 1.1.2.2 2009/09/15 02:38:30 upholderoftruth Exp $ + */ + +public interface TCharCollection { + static final long serialVersionUID = 1L; + + /** + * Returns the value that is used to represent null. The default + * value is generally zero, but can be changed during construction + * of the collection. + * + * @return the value that represents null + */ + char getNoEntryValue(); + + + /** + * Returns the number of elements in this collection (its cardinality). If this + * collection contains more than Integer.MAX_VALUE elements, returns + * Integer.MAX_VALUE. + * + * @return the number of elements in this collection (its cardinality) + */ + int size(); + + + /** + * Returns true if this collection contains no elements. + * + * @return true if this collection contains no elements + */ + boolean isEmpty(); + + + /** + * Returns true if this collection contains the specified element. + * + * @param entry an char value + * @return true if the collection contains the specified element. + */ + boolean contains( char entry ); + + + /** + * Creates an iterator over the values of the collection. The iterator + * supports element deletion. + * + * @return an TCharIterator value + */ + TCharIterator iterator(); + + + /** + * Returns an array containing all of the elements in this collection. + * If this collection makes any guarantees as to what order its elements + * are returned by its iterator, this method must return the + * elements in the same order. + * + *

The returned array will be "safe" in that no references to it + * are maintained by this collection. (In other words, this method must + * allocate a new array even if this collection is backed by an array). + * The caller is thus free to modify the returned array. + * + *

This method acts as bridge between array-based and collection-based + * APIs. + * + * @return an array containing all the elements in this collection + */ + char[] toArray(); + + + /** + * Returns an array containing elements in this collection. + * + *

If this collection fits in the specified array with room to spare + * (i.e., the array has more elements than this collection), the element in + * the array immediately following the end of the collection is collection to + * {@link #getNoEntryValue()}. (This is useful in determining + * the length of this collection only if the caller knows that this + * collection does not contain any elements representing null.) + * + *

If the native array is smaller than the collection size, + * the array will be filled with elements in Iterator order + * until it is full and exclude the remainder. + * + *

If this collection makes any guarantees as to what order its elements + * are returned by its iterator, this method must return the elements + * in the same order. + * + * @param dest the array into which the elements of this collection are to be + * stored. + * @return an char[] containing all the elements in this collection + * @throws NullPointerException if the specified array is null + */ + char[] toArray( char[] dest ); + + + /** + * Inserts a value into the collection. + * + * @param entry a char value + * @return true if the collection was modified by the add operation + */ + boolean add( char entry ); + + + /** + * Removes entry from the collection. + * + * @param entry an char value + * @return true if the collection was modified by the remove operation. + */ + boolean remove( char entry ); + + + /** + * Tests the collection to determine if all of the elements in + * collection are present. + * + * @param collection a Collection value + * @return true if all elements were present in the collection. + */ + boolean containsAll( Collection collection ); + + + /** + * Tests the collection to determine if all of the elements in + * TCharCollection are present. + * + * @param collection a TCharCollection value + * @return true if all elements were present in the collection. + */ + boolean containsAll( TCharCollection collection ); + + + /** + * Tests the collection to determine if all of the elements in + * array are present. + * + * @param array as array of char primitives. + * @return true if all elements were present in the collection. + */ + boolean containsAll( char[] array ); + + + /** + * Adds all of the elements in collection to the collection. + * + * @param collection a Collection value + * @return true if the collection was modified by the add all operation. + */ + boolean addAll( Collection collection ); + + + /** + * Adds all of the elements in the TCharCollection to the collection. + * + * @param collection a TCharCollection value + * @return true if the collection was modified by the add all operation. + */ + boolean addAll( TCharCollection collection ); + + + /** + * Adds all of the elements in the array to the collection. + * + * @param array a array of char primitives. + * @return true if the collection was modified by the add all operation. + */ + boolean addAll( char[] array ); + + + /** + * Removes any values in the collection which are not contained in + * collection. + * + * @param collection a Collection value + * @return true if the collection was modified by the retain all operation + */ + boolean retainAll( Collection collection ); + + + /** + * Removes any values in the collection which are not contained in + * TCharCollection. + * + * @param collection a TCharCollection value + * @return true if the collection was modified by the retain all operation + */ + boolean retainAll( TCharCollection collection ); + + + /** + * Removes any values in the collection which are not contained in + * array. + * + * @param array an array of char primitives. + * @return true if the collection was modified by the retain all operation + */ + boolean retainAll( char[] array ); + + + /** + * Removes all of the elements in collection from the collection. + * + * @param collection a Collection value + * @return true if the collection was modified by the remove all operation. + */ + boolean removeAll( Collection collection ); + + + /** + * Removes all of the elements in TCharCollection from the collection. + * + * @param collection a TCharCollection value + * @return true if the collection was modified by the remove all operation. + */ + boolean removeAll( TCharCollection collection ); + + + /** + * Removes all of the elements in array from the collection. + * + * @param array an array of char primitives. + * @return true if the collection was modified by the remove all operation. + */ + boolean removeAll( char[] array ); + + + /** + * Empties the collection. + */ + void clear(); + + + /** + * Executes procedure for each element in the collection. + * + * @param procedure a TCharProcedure value + * @return false if the loop over the collection terminated because + * the procedure returned false for some value. + */ + boolean forEach( TCharProcedure procedure ); + + + // Comparison and hashing + + /** + * Compares the specified object with this collection for equality. Returns + * true if the specified object is also a collection, the two collection + * have the same size, and every member of the specified collection is + * contained in this collection (or equivalently, every member of this collection is + * contained in the specified collection). This definition ensures that the + * equals method works properly across different implementations of the + * collection interface. + * + * @param o object to be compared for equality with this collection + * @return true if the specified object is equal to this collection + */ + boolean equals( Object o ); + + + /** + * Returns the hash code value for this collection. The hash code of a collection is + * defined to be the sum of the hash codes of the elements in the collection. + * This ensures that s1.equals(s2) implies that + * s1.hashCode()==s2.hashCode() for any two collection s1 + * and s2, as required by the general contract of + * {@link Object#hashCode}. + * + * @return the hash code value for this collection + * @see Object#equals(Object) + * @see Collection#equals(Object) + */ + int hashCode(); + + +} // TCharCollection diff --git a/src/gnu/trove/TDoubleCollection.java b/src/gnu/trove/TDoubleCollection.java new file mode 100644 index 00000000..531e2611 --- /dev/null +++ b/src/gnu/trove/TDoubleCollection.java @@ -0,0 +1,317 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + +import gnu.trove.iterator.TDoubleIterator; +import gnu.trove.procedure.TDoubleProcedure; + +import java.util.Collection; +import java.io.Serializable; + +/** + * An interface that mimics the Collection interface. + * + * @author Eric D. Friedman + * @author Rob Eden + * @author Jeff Randall + * @version $Id: _E_Collection.template,v 1.1.2.2 2009/09/15 02:38:30 upholderoftruth Exp $ + */ + +public interface TDoubleCollection { + static final long serialVersionUID = 1L; + + /** + * Returns the value that is used to represent null. The default + * value is generally zero, but can be changed during construction + * of the collection. + * + * @return the value that represents null + */ + double getNoEntryValue(); + + + /** + * Returns the number of elements in this collection (its cardinality). If this + * collection contains more than Integer.MAX_VALUE elements, returns + * Integer.MAX_VALUE. + * + * @return the number of elements in this collection (its cardinality) + */ + int size(); + + + /** + * Returns true if this collection contains no elements. + * + * @return true if this collection contains no elements + */ + boolean isEmpty(); + + + /** + * Returns true if this collection contains the specified element. + * + * @param entry an double value + * @return true if the collection contains the specified element. + */ + boolean contains( double entry ); + + + /** + * Creates an iterator over the values of the collection. The iterator + * supports element deletion. + * + * @return an TDoubleIterator value + */ + TDoubleIterator iterator(); + + + /** + * Returns an array containing all of the elements in this collection. + * If this collection makes any guarantees as to what order its elements + * are returned by its iterator, this method must return the + * elements in the same order. + * + *

The returned array will be "safe" in that no references to it + * are maintained by this collection. (In other words, this method must + * allocate a new array even if this collection is backed by an array). + * The caller is thus free to modify the returned array. + * + *

This method acts as bridge between array-based and collection-based + * APIs. + * + * @return an array containing all the elements in this collection + */ + double[] toArray(); + + + /** + * Returns an array containing elements in this collection. + * + *

If this collection fits in the specified array with room to spare + * (i.e., the array has more elements than this collection), the element in + * the array immediately following the end of the collection is collection to + * {@link #getNoEntryValue()}. (This is useful in determining + * the length of this collection only if the caller knows that this + * collection does not contain any elements representing null.) + * + *

If the native array is smaller than the collection size, + * the array will be filled with elements in Iterator order + * until it is full and exclude the remainder. + * + *

If this collection makes any guarantees as to what order its elements + * are returned by its iterator, this method must return the elements + * in the same order. + * + * @param dest the array into which the elements of this collection are to be + * stored. + * @return an double[] containing all the elements in this collection + * @throws NullPointerException if the specified array is null + */ + double[] toArray( double[] dest ); + + + /** + * Inserts a value into the collection. + * + * @param entry a double value + * @return true if the collection was modified by the add operation + */ + boolean add( double entry ); + + + /** + * Removes entry from the collection. + * + * @param entry an double value + * @return true if the collection was modified by the remove operation. + */ + boolean remove( double entry ); + + + /** + * Tests the collection to determine if all of the elements in + * collection are present. + * + * @param collection a Collection value + * @return true if all elements were present in the collection. + */ + boolean containsAll( Collection collection ); + + + /** + * Tests the collection to determine if all of the elements in + * TDoubleCollection are present. + * + * @param collection a TDoubleCollection value + * @return true if all elements were present in the collection. + */ + boolean containsAll( TDoubleCollection collection ); + + + /** + * Tests the collection to determine if all of the elements in + * array are present. + * + * @param array as array of double primitives. + * @return true if all elements were present in the collection. + */ + boolean containsAll( double[] array ); + + + /** + * Adds all of the elements in collection to the collection. + * + * @param collection a Collection value + * @return true if the collection was modified by the add all operation. + */ + boolean addAll( Collection collection ); + + + /** + * Adds all of the elements in the TDoubleCollection to the collection. + * + * @param collection a TDoubleCollection value + * @return true if the collection was modified by the add all operation. + */ + boolean addAll( TDoubleCollection collection ); + + + /** + * Adds all of the elements in the array to the collection. + * + * @param array a array of double primitives. + * @return true if the collection was modified by the add all operation. + */ + boolean addAll( double[] array ); + + + /** + * Removes any values in the collection which are not contained in + * collection. + * + * @param collection a Collection value + * @return true if the collection was modified by the retain all operation + */ + boolean retainAll( Collection collection ); + + + /** + * Removes any values in the collection which are not contained in + * TDoubleCollection. + * + * @param collection a TDoubleCollection value + * @return true if the collection was modified by the retain all operation + */ + boolean retainAll( TDoubleCollection collection ); + + + /** + * Removes any values in the collection which are not contained in + * array. + * + * @param array an array of double primitives. + * @return true if the collection was modified by the retain all operation + */ + boolean retainAll( double[] array ); + + + /** + * Removes all of the elements in collection from the collection. + * + * @param collection a Collection value + * @return true if the collection was modified by the remove all operation. + */ + boolean removeAll( Collection collection ); + + + /** + * Removes all of the elements in TDoubleCollection from the collection. + * + * @param collection a TDoubleCollection value + * @return true if the collection was modified by the remove all operation. + */ + boolean removeAll( TDoubleCollection collection ); + + + /** + * Removes all of the elements in array from the collection. + * + * @param array an array of double primitives. + * @return true if the collection was modified by the remove all operation. + */ + boolean removeAll( double[] array ); + + + /** + * Empties the collection. + */ + void clear(); + + + /** + * Executes procedure for each element in the collection. + * + * @param procedure a TDoubleProcedure value + * @return false if the loop over the collection terminated because + * the procedure returned false for some value. + */ + boolean forEach( TDoubleProcedure procedure ); + + + // Comparison and hashing + + /** + * Compares the specified object with this collection for equality. Returns + * true if the specified object is also a collection, the two collection + * have the same size, and every member of the specified collection is + * contained in this collection (or equivalently, every member of this collection is + * contained in the specified collection). This definition ensures that the + * equals method works properly across different implementations of the + * collection interface. + * + * @param o object to be compared for equality with this collection + * @return true if the specified object is equal to this collection + */ + boolean equals( Object o ); + + + /** + * Returns the hash code value for this collection. The hash code of a collection is + * defined to be the sum of the hash codes of the elements in the collection. + * This ensures that s1.equals(s2) implies that + * s1.hashCode()==s2.hashCode() for any two collection s1 + * and s2, as required by the general contract of + * {@link Object#hashCode}. + * + * @return the hash code value for this collection + * @see Object#equals(Object) + * @see Collection#equals(Object) + */ + int hashCode(); + + +} // TDoubleCollection diff --git a/src/gnu/trove/TIntCollection.java b/src/gnu/trove/TIntCollection.java new file mode 100644 index 00000000..7a9fbf4a --- /dev/null +++ b/src/gnu/trove/TIntCollection.java @@ -0,0 +1,317 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + +import gnu.trove.iterator.TIntIterator; +import gnu.trove.procedure.TIntProcedure; + +import java.util.Collection; +import java.io.Serializable; + +/** + * An interface that mimics the Collection interface. + * + * @author Eric D. Friedman + * @author Rob Eden + * @author Jeff Randall + * @version $Id: _E_Collection.template,v 1.1.2.2 2009/09/15 02:38:30 upholderoftruth Exp $ + */ + +public interface TIntCollection { + static final long serialVersionUID = 1L; + + /** + * Returns the value that is used to represent null. The default + * value is generally zero, but can be changed during construction + * of the collection. + * + * @return the value that represents null + */ + int getNoEntryValue(); + + + /** + * Returns the number of elements in this collection (its cardinality). If this + * collection contains more than Integer.MAX_VALUE elements, returns + * Integer.MAX_VALUE. + * + * @return the number of elements in this collection (its cardinality) + */ + int size(); + + + /** + * Returns true if this collection contains no elements. + * + * @return true if this collection contains no elements + */ + boolean isEmpty(); + + + /** + * Returns true if this collection contains the specified element. + * + * @param entry an int value + * @return true if the collection contains the specified element. + */ + boolean contains( int entry ); + + + /** + * Creates an iterator over the values of the collection. The iterator + * supports element deletion. + * + * @return an TIntIterator value + */ + TIntIterator iterator(); + + + /** + * Returns an array containing all of the elements in this collection. + * If this collection makes any guarantees as to what order its elements + * are returned by its iterator, this method must return the + * elements in the same order. + * + *

The returned array will be "safe" in that no references to it + * are maintained by this collection. (In other words, this method must + * allocate a new array even if this collection is backed by an array). + * The caller is thus free to modify the returned array. + * + *

This method acts as bridge between array-based and collection-based + * APIs. + * + * @return an array containing all the elements in this collection + */ + int[] toArray(); + + + /** + * Returns an array containing elements in this collection. + * + *

If this collection fits in the specified array with room to spare + * (i.e., the array has more elements than this collection), the element in + * the array immediately following the end of the collection is collection to + * {@link #getNoEntryValue()}. (This is useful in determining + * the length of this collection only if the caller knows that this + * collection does not contain any elements representing null.) + * + *

If the native array is smaller than the collection size, + * the array will be filled with elements in Iterator order + * until it is full and exclude the remainder. + * + *

If this collection makes any guarantees as to what order its elements + * are returned by its iterator, this method must return the elements + * in the same order. + * + * @param dest the array into which the elements of this collection are to be + * stored. + * @return an int[] containing all the elements in this collection + * @throws NullPointerException if the specified array is null + */ + int[] toArray( int[] dest ); + + + /** + * Inserts a value into the collection. + * + * @param entry a int value + * @return true if the collection was modified by the add operation + */ + boolean add( int entry ); + + + /** + * Removes entry from the collection. + * + * @param entry an int value + * @return true if the collection was modified by the remove operation. + */ + boolean remove( int entry ); + + + /** + * Tests the collection to determine if all of the elements in + * collection are present. + * + * @param collection a Collection value + * @return true if all elements were present in the collection. + */ + boolean containsAll( Collection collection ); + + + /** + * Tests the collection to determine if all of the elements in + * TIntCollection are present. + * + * @param collection a TIntCollection value + * @return true if all elements were present in the collection. + */ + boolean containsAll( TIntCollection collection ); + + + /** + * Tests the collection to determine if all of the elements in + * array are present. + * + * @param array as array of int primitives. + * @return true if all elements were present in the collection. + */ + boolean containsAll( int[] array ); + + + /** + * Adds all of the elements in collection to the collection. + * + * @param collection a Collection value + * @return true if the collection was modified by the add all operation. + */ + boolean addAll( Collection collection ); + + + /** + * Adds all of the elements in the TIntCollection to the collection. + * + * @param collection a TIntCollection value + * @return true if the collection was modified by the add all operation. + */ + boolean addAll( TIntCollection collection ); + + + /** + * Adds all of the elements in the array to the collection. + * + * @param array a array of int primitives. + * @return true if the collection was modified by the add all operation. + */ + boolean addAll( int[] array ); + + + /** + * Removes any values in the collection which are not contained in + * collection. + * + * @param collection a Collection value + * @return true if the collection was modified by the retain all operation + */ + boolean retainAll( Collection collection ); + + + /** + * Removes any values in the collection which are not contained in + * TIntCollection. + * + * @param collection a TIntCollection value + * @return true if the collection was modified by the retain all operation + */ + boolean retainAll( TIntCollection collection ); + + + /** + * Removes any values in the collection which are not contained in + * array. + * + * @param array an array of int primitives. + * @return true if the collection was modified by the retain all operation + */ + boolean retainAll( int[] array ); + + + /** + * Removes all of the elements in collection from the collection. + * + * @param collection a Collection value + * @return true if the collection was modified by the remove all operation. + */ + boolean removeAll( Collection collection ); + + + /** + * Removes all of the elements in TIntCollection from the collection. + * + * @param collection a TIntCollection value + * @return true if the collection was modified by the remove all operation. + */ + boolean removeAll( TIntCollection collection ); + + + /** + * Removes all of the elements in array from the collection. + * + * @param array an array of int primitives. + * @return true if the collection was modified by the remove all operation. + */ + boolean removeAll( int[] array ); + + + /** + * Empties the collection. + */ + void clear(); + + + /** + * Executes procedure for each element in the collection. + * + * @param procedure a TIntProcedure value + * @return false if the loop over the collection terminated because + * the procedure returned false for some value. + */ + boolean forEach( TIntProcedure procedure ); + + + // Comparison and hashing + + /** + * Compares the specified object with this collection for equality. Returns + * true if the specified object is also a collection, the two collection + * have the same size, and every member of the specified collection is + * contained in this collection (or equivalently, every member of this collection is + * contained in the specified collection). This definition ensures that the + * equals method works properly across different implementations of the + * collection interface. + * + * @param o object to be compared for equality with this collection + * @return true if the specified object is equal to this collection + */ + boolean equals( Object o ); + + + /** + * Returns the hash code value for this collection. The hash code of a collection is + * defined to be the sum of the hash codes of the elements in the collection. + * This ensures that s1.equals(s2) implies that + * s1.hashCode()==s2.hashCode() for any two collection s1 + * and s2, as required by the general contract of + * {@link Object#hashCode}. + * + * @return the hash code value for this collection + * @see Object#equals(Object) + * @see Collection#equals(Object) + */ + int hashCode(); + + +} // TIntCollection diff --git a/src/gnu/trove/TLongCollection.java b/src/gnu/trove/TLongCollection.java new file mode 100644 index 00000000..7d1d776d --- /dev/null +++ b/src/gnu/trove/TLongCollection.java @@ -0,0 +1,317 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + +import gnu.trove.iterator.TLongIterator; +import gnu.trove.procedure.TLongProcedure; + +import java.util.Collection; +import java.io.Serializable; + +/** + * An interface that mimics the Collection interface. + * + * @author Eric D. Friedman + * @author Rob Eden + * @author Jeff Randall + * @version $Id: _E_Collection.template,v 1.1.2.2 2009/09/15 02:38:30 upholderoftruth Exp $ + */ + +public interface TLongCollection { + static final long serialVersionUID = 1L; + + /** + * Returns the value that is used to represent null. The default + * value is generally zero, but can be changed during construction + * of the collection. + * + * @return the value that represents null + */ + long getNoEntryValue(); + + + /** + * Returns the number of elements in this collection (its cardinality). If this + * collection contains more than Integer.MAX_VALUE elements, returns + * Integer.MAX_VALUE. + * + * @return the number of elements in this collection (its cardinality) + */ + int size(); + + + /** + * Returns true if this collection contains no elements. + * + * @return true if this collection contains no elements + */ + boolean isEmpty(); + + + /** + * Returns true if this collection contains the specified element. + * + * @param entry an long value + * @return true if the collection contains the specified element. + */ + boolean contains( long entry ); + + + /** + * Creates an iterator over the values of the collection. The iterator + * supports element deletion. + * + * @return an TLongIterator value + */ + TLongIterator iterator(); + + + /** + * Returns an array containing all of the elements in this collection. + * If this collection makes any guarantees as to what order its elements + * are returned by its iterator, this method must return the + * elements in the same order. + * + *

The returned array will be "safe" in that no references to it + * are maintained by this collection. (In other words, this method must + * allocate a new array even if this collection is backed by an array). + * The caller is thus free to modify the returned array. + * + *

This method acts as bridge between array-based and collection-based + * APIs. + * + * @return an array containing all the elements in this collection + */ + long[] toArray(); + + + /** + * Returns an array containing elements in this collection. + * + *

If this collection fits in the specified array with room to spare + * (i.e., the array has more elements than this collection), the element in + * the array immediately following the end of the collection is collection to + * {@link #getNoEntryValue()}. (This is useful in determining + * the length of this collection only if the caller knows that this + * collection does not contain any elements representing null.) + * + *

If the native array is smaller than the collection size, + * the array will be filled with elements in Iterator order + * until it is full and exclude the remainder. + * + *

If this collection makes any guarantees as to what order its elements + * are returned by its iterator, this method must return the elements + * in the same order. + * + * @param dest the array into which the elements of this collection are to be + * stored. + * @return an long[] containing all the elements in this collection + * @throws NullPointerException if the specified array is null + */ + long[] toArray( long[] dest ); + + + /** + * Inserts a value into the collection. + * + * @param entry a long value + * @return true if the collection was modified by the add operation + */ + boolean add( long entry ); + + + /** + * Removes entry from the collection. + * + * @param entry an long value + * @return true if the collection was modified by the remove operation. + */ + boolean remove( long entry ); + + + /** + * Tests the collection to determine if all of the elements in + * collection are present. + * + * @param collection a Collection value + * @return true if all elements were present in the collection. + */ + boolean containsAll( Collection collection ); + + + /** + * Tests the collection to determine if all of the elements in + * TLongCollection are present. + * + * @param collection a TLongCollection value + * @return true if all elements were present in the collection. + */ + boolean containsAll( TLongCollection collection ); + + + /** + * Tests the collection to determine if all of the elements in + * array are present. + * + * @param array as array of long primitives. + * @return true if all elements were present in the collection. + */ + boolean containsAll( long[] array ); + + + /** + * Adds all of the elements in collection to the collection. + * + * @param collection a Collection value + * @return true if the collection was modified by the add all operation. + */ + boolean addAll( Collection collection ); + + + /** + * Adds all of the elements in the TLongCollection to the collection. + * + * @param collection a TLongCollection value + * @return true if the collection was modified by the add all operation. + */ + boolean addAll( TLongCollection collection ); + + + /** + * Adds all of the elements in the array to the collection. + * + * @param array a array of long primitives. + * @return true if the collection was modified by the add all operation. + */ + boolean addAll( long[] array ); + + + /** + * Removes any values in the collection which are not contained in + * collection. + * + * @param collection a Collection value + * @return true if the collection was modified by the retain all operation + */ + boolean retainAll( Collection collection ); + + + /** + * Removes any values in the collection which are not contained in + * TLongCollection. + * + * @param collection a TLongCollection value + * @return true if the collection was modified by the retain all operation + */ + boolean retainAll( TLongCollection collection ); + + + /** + * Removes any values in the collection which are not contained in + * array. + * + * @param array an array of long primitives. + * @return true if the collection was modified by the retain all operation + */ + boolean retainAll( long[] array ); + + + /** + * Removes all of the elements in collection from the collection. + * + * @param collection a Collection value + * @return true if the collection was modified by the remove all operation. + */ + boolean removeAll( Collection collection ); + + + /** + * Removes all of the elements in TLongCollection from the collection. + * + * @param collection a TLongCollection value + * @return true if the collection was modified by the remove all operation. + */ + boolean removeAll( TLongCollection collection ); + + + /** + * Removes all of the elements in array from the collection. + * + * @param array an array of long primitives. + * @return true if the collection was modified by the remove all operation. + */ + boolean removeAll( long[] array ); + + + /** + * Empties the collection. + */ + void clear(); + + + /** + * Executes procedure for each element in the collection. + * + * @param procedure a TLongProcedure value + * @return false if the loop over the collection terminated because + * the procedure returned false for some value. + */ + boolean forEach( TLongProcedure procedure ); + + + // Comparison and hashing + + /** + * Compares the specified object with this collection for equality. Returns + * true if the specified object is also a collection, the two collection + * have the same size, and every member of the specified collection is + * contained in this collection (or equivalently, every member of this collection is + * contained in the specified collection). This definition ensures that the + * equals method works properly across different implementations of the + * collection interface. + * + * @param o object to be compared for equality with this collection + * @return true if the specified object is equal to this collection + */ + boolean equals( Object o ); + + + /** + * Returns the hash code value for this collection. The hash code of a collection is + * defined to be the sum of the hash codes of the elements in the collection. + * This ensures that s1.equals(s2) implies that + * s1.hashCode()==s2.hashCode() for any two collection s1 + * and s2, as required by the general contract of + * {@link Object#hashCode}. + * + * @return the hash code value for this collection + * @see Object#equals(Object) + * @see Collection#equals(Object) + */ + int hashCode(); + + +} // TLongCollection diff --git a/src/gnu/trove/function/TByteFunction.java b/src/gnu/trove/function/TByteFunction.java new file mode 100644 index 00000000..1fa50ba4 --- /dev/null +++ b/src/gnu/trove/function/TByteFunction.java @@ -0,0 +1,37 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.function; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Interface for functions that accept and return one byte primitive. + */ +public interface TByteFunction { + /** + * Execute this function with value + * + * @param value a byte input + * @return a byte result + */ + public byte execute( byte value ); +} diff --git a/src/gnu/trove/function/TDoubleFunction.java b/src/gnu/trove/function/TDoubleFunction.java new file mode 100644 index 00000000..d46f5aec --- /dev/null +++ b/src/gnu/trove/function/TDoubleFunction.java @@ -0,0 +1,37 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.function; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Interface for functions that accept and return one double primitive. + */ +public interface TDoubleFunction { + /** + * Execute this function with value + * + * @param value a double input + * @return a double result + */ + public double execute( double value ); +} diff --git a/src/gnu/trove/function/TIntFunction.java b/src/gnu/trove/function/TIntFunction.java new file mode 100644 index 00000000..642eabdd --- /dev/null +++ b/src/gnu/trove/function/TIntFunction.java @@ -0,0 +1,37 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.function; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Interface for functions that accept and return one int primitive. + */ +public interface TIntFunction { + /** + * Execute this function with value + * + * @param value a int input + * @return a int result + */ + public int execute( int value ); +} diff --git a/src/gnu/trove/function/TLongFunction.java b/src/gnu/trove/function/TLongFunction.java new file mode 100644 index 00000000..64219cb4 --- /dev/null +++ b/src/gnu/trove/function/TLongFunction.java @@ -0,0 +1,37 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.function; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Interface for functions that accept and return one long primitive. + */ +public interface TLongFunction { + /** + * Execute this function with value + * + * @param value a long input + * @return a long result + */ + public long execute( long value ); +} diff --git a/src/gnu/trove/function/TObjectFunction.java b/src/gnu/trove/function/TObjectFunction.java new file mode 100644 index 00000000..e8873b7b --- /dev/null +++ b/src/gnu/trove/function/TObjectFunction.java @@ -0,0 +1,39 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.function; + +/** + * Interface for functions that accept and return one Object reference. + *

+ * Created: Mon Nov 5 22:19:36 2001 + * + * @author Eric D. Friedman + * @version $Id: TObjectFunction.java,v 1.1.2.1 2009/09/06 17:02:19 upholderoftruth Exp $ + */ + +public interface TObjectFunction { + + /** + * Execute this function with value + * + * @param value an Object input + * @return an Object result + */ + public R execute( T value ); +}// TObjectFunction diff --git a/src/gnu/trove/impl/Constants.java b/src/gnu/trove/impl/Constants.java new file mode 100644 index 00000000..09237a25 --- /dev/null +++ b/src/gnu/trove/impl/Constants.java @@ -0,0 +1,165 @@ +// //////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// //////////////////////////////////////////////////////////////////////////// +package gnu.trove.impl; + +/** + * Central location for constants needed by various implementations. + */ +public class Constants { + + private static final boolean VERBOSE = + System.getProperty( "gnu.trove.verbose", null ) != null; + + /** the default capacity for new collections */ + public static final int DEFAULT_CAPACITY = 10; + + /** the load above which rehashing occurs. */ + public static final float DEFAULT_LOAD_FACTOR = 0.5f; + + + /** the default value that represents for byte types. */ + public static final byte DEFAULT_BYTE_NO_ENTRY_VALUE; + static { + byte value; + String property = System.getProperty( "gnu.trove.no_entry.byte", "0" ); + if ( "MAX_VALUE".equalsIgnoreCase( property ) ) value = Byte.MAX_VALUE; + else if ( "MIN_VALUE".equalsIgnoreCase( property ) ) value = Byte.MIN_VALUE; + else value = Byte.valueOf( property ); + + if ( value > Byte.MAX_VALUE ) value = Byte.MAX_VALUE; + else if ( value < Byte.MIN_VALUE ) value = Byte.MIN_VALUE; + DEFAULT_BYTE_NO_ENTRY_VALUE = value; + if ( VERBOSE ) { + System.out.println( "DEFAULT_BYTE_NO_ENTRY_VALUE: " + + DEFAULT_BYTE_NO_ENTRY_VALUE ); + } + } + + + /** the default value that represents for short types. */ + public static final short DEFAULT_SHORT_NO_ENTRY_VALUE; + static { + short value; + String property = System.getProperty( "gnu.trove.no_entry.short", "0" ); + if ( "MAX_VALUE".equalsIgnoreCase( property ) ) value = Short.MAX_VALUE; + else if ( "MIN_VALUE".equalsIgnoreCase( property ) ) value = Short.MIN_VALUE; + else value = Short.valueOf( property ); + + if ( value > Short.MAX_VALUE ) value = Short.MAX_VALUE; + else if ( value < Short.MIN_VALUE ) value = Short.MIN_VALUE; + DEFAULT_SHORT_NO_ENTRY_VALUE = value; + if ( VERBOSE ) { + System.out.println( "DEFAULT_SHORT_NO_ENTRY_VALUE: " + + DEFAULT_SHORT_NO_ENTRY_VALUE ); + } + } + + + /** the default value that represents for char types. */ + public static final char DEFAULT_CHAR_NO_ENTRY_VALUE; + static { + char value; + String property = System.getProperty( "gnu.trove.no_entry.char", "\0" ); + if ( "MAX_VALUE".equalsIgnoreCase( property ) ) value = Character.MAX_VALUE; + else if ( "MIN_VALUE".equalsIgnoreCase( property ) ) value = Character.MIN_VALUE; + else value = property.toCharArray()[0]; + + if ( value > Character.MAX_VALUE ) value = Character.MAX_VALUE; + else if ( value < Character.MIN_VALUE ) value = Character.MIN_VALUE; + DEFAULT_CHAR_NO_ENTRY_VALUE = value; + if ( VERBOSE ) { + System.out.println( "DEFAULT_CHAR_NO_ENTRY_VALUE: " + + Integer.valueOf( value ) ); + } + } + + + /** the default value that represents for int types. */ + public static final int DEFAULT_INT_NO_ENTRY_VALUE; + static { + int value; + String property = System.getProperty( "gnu.trove.no_entry.int", "0" ); + if ( "MAX_VALUE".equalsIgnoreCase( property ) ) value = Integer.MAX_VALUE; + else if ( "MIN_VALUE".equalsIgnoreCase( property ) ) value = Integer.MIN_VALUE; + else value = Integer.valueOf( property ); + DEFAULT_INT_NO_ENTRY_VALUE = value; + if ( VERBOSE ) { + System.out.println( "DEFAULT_INT_NO_ENTRY_VALUE: " + + DEFAULT_INT_NO_ENTRY_VALUE ); + } + } + + + /** the default value that represents for long types. */ + public static final long DEFAULT_LONG_NO_ENTRY_VALUE; + static { + long value; + String property = System.getProperty( "gnu.trove.no_entry.long", "0" ); + if ( "MAX_VALUE".equalsIgnoreCase( property ) ) value = Long.MAX_VALUE; + else if ( "MIN_VALUE".equalsIgnoreCase( property ) ) value = Long.MIN_VALUE; + else value = Long.valueOf( property ); + DEFAULT_LONG_NO_ENTRY_VALUE = value; + if ( VERBOSE ) { + System.out.println( "DEFAULT_LONG_NO_ENTRY_VALUE: " + + DEFAULT_LONG_NO_ENTRY_VALUE ); + } + } + + + /** the default value that represents for float types. */ + public static final float DEFAULT_FLOAT_NO_ENTRY_VALUE; + static { + float value; + String property = System.getProperty( "gnu.trove.no_entry.float", "0" ); + if ( "MAX_VALUE".equalsIgnoreCase( property ) ) value = Float.MAX_VALUE; + else if ( "MIN_VALUE".equalsIgnoreCase( property ) ) value = Float.MIN_VALUE; + // Value from Float.MIN_NORMAL (introduced in 1.6) + else if ( "MIN_NORMAL".equalsIgnoreCase( property ) ) value = 0x1.0p-126f; + else if ( "NEGATIVE_INFINITY".equalsIgnoreCase( property ) ) value = Float.NEGATIVE_INFINITY; + else if ( "POSITIVE_INFINITY".equalsIgnoreCase( property ) ) value = Float.POSITIVE_INFINITY; +// else if ( "NaN".equalsIgnoreCase( property ) ) value = Float.NaN; + else value = Float.valueOf( property ); + DEFAULT_FLOAT_NO_ENTRY_VALUE = value; + if ( VERBOSE ) { + System.out.println( "DEFAULT_FLOAT_NO_ENTRY_VALUE: " + + DEFAULT_FLOAT_NO_ENTRY_VALUE ); + } + } + + + /** the default value that represents for double types. */ + public static final double DEFAULT_DOUBLE_NO_ENTRY_VALUE; + static { + double value; + String property = System.getProperty( "gnu.trove.no_entry.double", "0" ); + if ( "MAX_VALUE".equalsIgnoreCase( property ) ) value = Double.MAX_VALUE; + else if ( "MIN_VALUE".equalsIgnoreCase( property ) ) value = Double.MIN_VALUE; + // Value from Double.MIN_NORMAL (introduced in 1.6) + else if ( "MIN_NORMAL".equalsIgnoreCase( property ) ) value = 0x1.0p-1022; + else if ( "NEGATIVE_INFINITY".equalsIgnoreCase( property ) ) value = Double.NEGATIVE_INFINITY; + else if ( "POSITIVE_INFINITY".equalsIgnoreCase( property ) ) value = Double.POSITIVE_INFINITY; +// else if ( "NaN".equalsIgnoreCase( property ) ) value = Double.NaN; + else value = Double.valueOf( property ); + DEFAULT_DOUBLE_NO_ENTRY_VALUE = value; + if ( VERBOSE ) { + System.out.println( "DEFAULT_DOUBLE_NO_ENTRY_VALUE: " + + DEFAULT_DOUBLE_NO_ENTRY_VALUE ); + } + } +} diff --git a/src/gnu/trove/impl/HashFunctions.java b/src/gnu/trove/impl/HashFunctions.java new file mode 100644 index 00000000..a7be4436 --- /dev/null +++ b/src/gnu/trove/impl/HashFunctions.java @@ -0,0 +1,85 @@ +// Copyright (c) 1999 CERN - European Organization for Nuclear Research. + +// Permission to use, copy, modify, distribute and sell this software and +// its documentation for any purpose is hereby granted without fee, +// provided that the above copyright notice appear in all copies and that +// both that copyright notice and this permission notice appear in +// supporting documentation. CERN makes no representations about the +// suitability of this software for any purpose. It is provided "as is" +// without expressed or implied warranty. + +package gnu.trove.impl; + +/** + * Provides various hash functions. + * + * @author wolfgang.hoschek@cern.ch + * @version 1.0, 09/24/99 + */ +public final class HashFunctions { + /** + * Returns a hashcode for the specified value. + * + * @return a hash code value for the specified value. + */ + public static int hash(double value) { + assert !Double.isNaN(value) : "Values of NaN are not supported."; + + long bits = Double.doubleToLongBits(value); + return (int)(bits ^ (bits >>> 32)); + //return (int) Double.doubleToLongBits(value*663608941.737); + //this avoids excessive hashCollisions in the case values are + //of the form (1.0, 2.0, 3.0, ...) + } + + /** + * Returns a hashcode for the specified value. + * + * @return a hash code value for the specified value. + */ + public static int hash(float value) { + assert !Float.isNaN(value) : "Values of NaN are not supported."; + + return Float.floatToIntBits(value*663608941.737f); + // this avoids excessive hashCollisions in the case values are + // of the form (1.0, 2.0, 3.0, ...) + } + + /** + * Returns a hashcode for the specified value. + * + * @return a hash code value for the specified value. + */ + public static int hash(int value) { + return value; + } + + /** + * Returns a hashcode for the specified value. + * + * @return a hash code value for the specified value. + */ + public static int hash(long value) { + return ((int)(value ^ (value >>> 32))); + } + + /** + * Returns a hashcode for the specified object. + * + * @return a hash code value for the specified object. + */ + public static int hash(Object object) { + return object==null ? 0 : object.hashCode(); + } + + + /** + * In profiling, it has been found to be faster to have our own local implementation + * of "ceil" rather than to call to {@link Math#ceil(double)}. + */ + public static int fastCeil( float v ) { + int possible_result = ( int ) v; + if ( v - possible_result > 0 ) possible_result++; + return possible_result; + } +} diff --git a/src/gnu/trove/impl/PrimeFinder.java b/src/gnu/trove/impl/PrimeFinder.java new file mode 100644 index 00000000..11abe57e --- /dev/null +++ b/src/gnu/trove/impl/PrimeFinder.java @@ -0,0 +1,158 @@ +// Copyright (c) 1999 CERN - European Organization for Nuclear Research. + +// Permission to use, copy, modify, distribute and sell this software +// and its documentation for any purpose is hereby granted without fee, +// provided that the above copyright notice appear in all copies and +// that both that copyright notice and this permission notice appear in +// supporting documentation. CERN makes no representations about the +// suitability of this software for any purpose. It is provided "as is" +// without expressed or implied warranty. +package gnu.trove.impl; + +import java.util.Arrays; + +/* + * Modified for Trove to use the java.util.Arrays sort/search + * algorithms instead of those provided with colt. + */ + +/** + * Used to keep hash table capacities prime numbers. + * Not of interest for users; only for implementors of hashtables. + * + *

Choosing prime numbers as hash table capacities is a good idea + * to keep them working fast, particularly under hash table + * expansions. + * + *

However, JDK 1.2, JGL 3.1 and many other toolkits do nothing to + * keep capacities prime. This class provides efficient means to + * choose prime capacities. + * + *

Choosing a prime is O(log 300) (binary search in a list + * of 300 ints). Memory requirements: 1 KB static memory. + * + * @author wolfgang.hoschek@cern.ch + * @version 1.0, 09/24/99 + */ +public final class PrimeFinder { + /** + * The largest prime this class can generate; currently equal to + * Integer.MAX_VALUE. + */ + public static final int largestPrime = Integer.MAX_VALUE; //yes, it is prime. + + /** + * The prime number list consists of 11 chunks. + * + * Each chunk contains prime numbers. + * + * A chunk starts with a prime P1. The next element is a prime + * P2. P2 is the smallest prime for which holds: P2 >= 2*P1. + * + * The next element is P3, for which the same holds with respect + * to P2, and so on. + * + * Chunks are chosen such that for any desired capacity >= 1000 + * the list includes a prime number <= desired capacity * 1.11. + * + * Therefore, primes can be retrieved which are quite close to any + * desired capacity, which in turn avoids wasting memory. + * + * For example, the list includes + * 1039,1117,1201,1277,1361,1439,1523,1597,1759,1907,2081. + * + * So if you need a prime >= 1040, you will find a prime <= + * 1040*1.11=1154. + * + * Chunks are chosen such that they are optimized for a hashtable + * growthfactor of 2.0; + * + * If your hashtable has such a growthfactor then, after initially + * "rounding to a prime" upon hashtable construction, it will + * later expand to prime capacities such that there exist no + * better primes. + * + * In total these are about 32*10=320 numbers -> 1 KB of static + * memory needed. + * + * If you are stingy, then delete every second or fourth chunk. + */ + + private static final int[] primeCapacities = { + //chunk #0 + largestPrime, + + //chunk #1 + 5,11,23,47,97,197,397,797,1597,3203,6421,12853,25717,51437,102877,205759, + 411527,823117,1646237,3292489,6584983,13169977,26339969,52679969,105359939, + 210719881,421439783,842879579,1685759167, + + //chunk #2 + 433,877,1759,3527,7057,14143,28289,56591,113189,226379,452759,905551,1811107, + 3622219,7244441,14488931,28977863,57955739,115911563,231823147,463646329,927292699, + 1854585413, + + //chunk #3 + 953,1907,3821,7643,15287,30577,61169,122347,244703,489407,978821,1957651,3915341, + 7830701,15661423,31322867,62645741,125291483,250582987,501165979,1002331963, + 2004663929, + + //chunk #4 + 1039,2081,4177,8363,16729,33461,66923,133853,267713,535481,1070981,2141977,4283963, + 8567929,17135863,34271747,68543509,137087021,274174111,548348231,1096696463, + + //chunk #5 + 31,67,137,277,557,1117,2237,4481,8963,17929,35863,71741,143483,286973,573953, + 1147921,2295859,4591721,9183457,18366923,36733847,73467739,146935499,293871013, + 587742049,1175484103, + + //chunk #6 + 599,1201,2411,4831,9677,19373,38747,77509,155027,310081,620171,1240361,2480729, + 4961459,9922933,19845871,39691759,79383533,158767069,317534141,635068283,1270136683, + + //chunk #7 + 311,631,1277,2557,5119,10243,20507,41017,82037,164089,328213,656429,1312867, + 2625761,5251529,10503061,21006137,42012281,84024581,168049163,336098327,672196673, + 1344393353, + + //chunk #8 + 3,7,17,37,79,163,331,673,1361,2729,5471,10949,21911,43853,87719,175447,350899, + 701819,1403641,2807303,5614657,11229331,22458671,44917381,89834777,179669557, + 359339171,718678369,1437356741, + + //chunk #9 + 43,89,179,359,719,1439,2879,5779,11579,23159,46327,92657,185323,370661,741337, + 1482707,2965421,5930887,11861791,23723597,47447201,94894427,189788857,379577741, + 759155483,1518310967, + + //chunk #10 + 379,761,1523,3049,6101,12203,24407,48817,97649,195311,390647,781301,1562611, + 3125257,6250537,12501169,25002389,50004791,100009607,200019221,400038451,800076929, + 1600153859 + }; + + static { //initializer + // The above prime numbers are formatted for human readability. + // To find numbers fast, we sort them once and for all. + + Arrays.sort(primeCapacities); + } + + /** + * Returns a prime number which is >= desiredCapacity + * and very close to desiredCapacity (within 11% if + * desiredCapacity >= 1000). + * + * @param desiredCapacity the capacity desired by the user. + * @return the capacity which should be used for a hashtable. + */ + public static final int nextPrime(int desiredCapacity) { + int i = Arrays.binarySearch(primeCapacities, desiredCapacity); + if (i<0) { + // desired capacity not found, choose next prime greater + // than desired capacity + i = -i -1; // remember the semantics of binarySearch... + } + return primeCapacities[i]; + } +} diff --git a/src/gnu/trove/impl/hash/TCharHash.java b/src/gnu/trove/impl/hash/TCharHash.java new file mode 100644 index 00000000..fd163511 --- /dev/null +++ b/src/gnu/trove/impl/hash/TCharHash.java @@ -0,0 +1,334 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.impl.hash; + +import gnu.trove.procedure.TCharProcedure; +import gnu.trove.impl.HashFunctions; +import gnu.trove.impl.Constants; + +import java.util.Arrays; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * An open addressed hashing implementation for char primitives. + * + * Created: Sun Nov 4 08:56:06 2001 + * + * @author Eric D. Friedman, Rob Eden, Jeff Randall + * @version $Id: _E_Hash.template,v 1.1.2.6 2009/11/07 03:36:44 robeden Exp $ + */ +abstract public class TCharHash extends TPrimitiveHash { + static final long serialVersionUID = 1L; + + /** the set of chars */ + public transient char[] _set; + + /** + * value that represents null + * + * NOTE: should not be modified after the Hash is created, but is + * not final because of Externalization + * + */ + protected char no_entry_value; + + protected boolean consumeFreeSlot; + + + /** + * Creates a new TCharHash instance with the default + * capacity and load factor. + */ + public TCharHash() { + super(); + no_entry_value = Constants.DEFAULT_CHAR_NO_ENTRY_VALUE; + //noinspection RedundantCast + if ( no_entry_value != ( char ) 0 ) { + Arrays.fill( _set, no_entry_value ); + } + } + + + /** + * Creates a new TCharHash instance whose capacity + * is the next highest prime above initialCapacity + 1 + * unless that value is already prime. + * + * @param initialCapacity an int value + */ + public TCharHash( int initialCapacity ) { + super( initialCapacity ); + no_entry_value = Constants.DEFAULT_CHAR_NO_ENTRY_VALUE; + //noinspection RedundantCast + if ( no_entry_value != ( char ) 0 ) { + Arrays.fill( _set, no_entry_value ); + } + } + + + /** + * Creates a new TCharHash instance with a prime + * value at or near the specified capacity and load factor. + * + * @param initialCapacity used to find a prime capacity for the table. + * @param loadFactor used to calculate the threshold over which + * rehashing takes place. + */ + public TCharHash( int initialCapacity, float loadFactor ) { + super(initialCapacity, loadFactor); + no_entry_value = Constants.DEFAULT_CHAR_NO_ENTRY_VALUE; + //noinspection RedundantCast + if ( no_entry_value != ( char ) 0 ) { + Arrays.fill( _set, no_entry_value ); + } + } + + + /** + * Creates a new TCharHash instance with a prime + * value at or near the specified capacity and load factor. + * + * @param initialCapacity used to find a prime capacity for the table. + * @param loadFactor used to calculate the threshold over which + * rehashing takes place. + * @param no_entry_value value that represents null + */ + public TCharHash( int initialCapacity, float loadFactor, char no_entry_value ) { + super(initialCapacity, loadFactor); + this.no_entry_value = no_entry_value; + //noinspection RedundantCast + if ( no_entry_value != ( char ) 0 ) { + Arrays.fill( _set, no_entry_value ); + } + } + + + /** + * Returns the value that is used to represent null. The default + * value is generally zero, but can be changed during construction + * of the collection. + * + * @return the value that represents null + */ + public char getNoEntryValue() { + return no_entry_value; + } + + + /** + * initializes the hashtable to a prime capacity which is at least + * initialCapacity + 1. + * + * @param initialCapacity an int value + * @return the actual capacity chosen + */ + protected int setUp( int initialCapacity ) { + int capacity; + + capacity = super.setUp( initialCapacity ); + _set = new char[capacity]; + return capacity; + } + + + /** + * Searches the set for val + * + * @param val an char value + * @return a boolean value + */ + public boolean contains( char val ) { + return index(val) >= 0; + } + + + /** + * Executes procedure for each element in the set. + * + * @param procedure a TObjectProcedure value + * @return false if the loop over the set terminated because + * the procedure returned false for some value. + */ + public boolean forEach( TCharProcedure procedure ) { + byte[] states = _states; + char[] set = _set; + for ( int i = set.length; i-- > 0; ) { + if ( states[i] == FULL && ! procedure.execute( set[i] ) ) { + return false; + } + } + return true; + } + + + /** + * Releases the element currently stored at index. + * + * @param index an int value + */ + protected void removeAt( int index ) { + _set[index] = no_entry_value; + super.removeAt( index ); + } + + + /** + * Locates the index of val. + * + * @param val an char value + * @return the index of val or -1 if it isn't in the set. + */ + protected int index( char val ) { + int hash, probe, index, length; + + final byte[] states = _states; + final char[] set = _set; + length = states.length; + hash = HashFunctions.hash( val ) & 0x7fffffff; + index = hash % length; + byte state = states[index]; + + if (state == FREE) + return -1; + + if (state == FULL && set[index] == val) + return index; + + return indexRehashed(val, index, hash, state); + } + + int indexRehashed(char key, int index, int hash, byte state) { + // see Knuth, p. 529 + int length = _set.length; + int probe = 1 + (hash % (length - 2)); + final int loopIndex = index; + + do { + index -= probe; + if (index < 0) { + index += length; + } + state = _states[index]; + // + if (state == FREE) + return -1; + + // + if (key == _set[index] && state != REMOVED) + return index; + } while (index != loopIndex); + + return -1; + } + + /** + * Locates the index at which val can be inserted. if + * there is already a value equal()ing val in the set, + * returns that value as a negative integer. + * + * @param val an char value + * @return an int value + */ + protected int insertKey( char val ) { + int hash, index; + + hash = HashFunctions.hash(val) & 0x7fffffff; + index = hash % _states.length; + byte state = _states[index]; + + consumeFreeSlot = false; + + if (state == FREE) { + consumeFreeSlot = true; + insertKeyAt(index, val); + + return index; // empty, all done + } + + if (state == FULL && _set[index] == val) { + return -index - 1; // already stored + } + + // already FULL or REMOVED, must probe + return insertKeyRehash(val, index, hash, state); + } + + int insertKeyRehash(char val, int index, int hash, byte state) { + // compute the double hash + final int length = _set.length; + int probe = 1 + (hash % (length - 2)); + final int loopIndex = index; + int firstRemoved = -1; + + /** + * Look until FREE slot or we start to loop + */ + do { + // Identify first removed slot + if (state == REMOVED && firstRemoved == -1) + firstRemoved = index; + + index -= probe; + if (index < 0) { + index += length; + } + state = _states[index]; + + // A FREE slot stops the search + if (state == FREE) { + if (firstRemoved != -1) { + insertKeyAt(firstRemoved, val); + return firstRemoved; + } else { + consumeFreeSlot = true; + insertKeyAt(index, val); + return index; + } + } + + if (state == FULL && _set[index] == val) { + return -index - 1; + } + + // Detect loop + } while (index != loopIndex); + + // We inspected all reachable slots and did not find a FREE one + // If we found a REMOVED slot we return the first one found + if (firstRemoved != -1) { + insertKeyAt(firstRemoved, val); + return firstRemoved; + } + + // Can a resizing strategy be found that resizes the set? + throw new IllegalStateException("No free or removed slots available. Key set full?!!"); + } + + void insertKeyAt(int index, char val) { + _set[index] = val; // insert value + _states[index] = FULL; + } + +} // TCharHash diff --git a/src/gnu/trove/impl/hash/THash.java b/src/gnu/trove/impl/hash/THash.java new file mode 100644 index 00000000..bcc4d9ba --- /dev/null +++ b/src/gnu/trove/impl/hash/THash.java @@ -0,0 +1,429 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.impl.hash; + +import gnu.trove.impl.Constants; +import gnu.trove.impl.HashFunctions; +import gnu.trove.impl.PrimeFinder; + +import java.io.Externalizable; +import java.io.ObjectOutput; +import java.io.IOException; +import java.io.ObjectInput; + + + +/** + * Base class for hashtables that use open addressing to resolve + * collisions. + * + * Created: Wed Nov 28 21:11:16 2001 + * + * @author Eric D. Friedman + * @author Rob Eden (auto-compaction) + * @author Jeff Randall + * + * @version $Id: THash.java,v 1.1.2.4 2010/03/02 00:55:34 robeden Exp $ + */ +abstract public class THash implements Externalizable { + @SuppressWarnings( { "UnusedDeclaration" } ) + static final long serialVersionUID = -1792948471915530295L; + + /** the load above which rehashing occurs. */ + protected static final float DEFAULT_LOAD_FACTOR = Constants.DEFAULT_LOAD_FACTOR; + + /** + * the default initial capacity for the hash table. This is one + * less than a prime value because one is added to it when + * searching for a prime capacity to account for the free slot + * required by open addressing. Thus, the real default capacity is + * 11. + */ + protected static final int DEFAULT_CAPACITY = Constants.DEFAULT_CAPACITY; + + + /** the current number of occupied slots in the hash. */ + protected transient int _size; + + /** the current number of free slots in the hash. */ + protected transient int _free; + + /** + * Determines how full the internal table can become before + * rehashing is required. This must be a value in the range: 0.0 < + * loadFactor < 1.0. The default value is 0.5, which is about as + * large as you can get in open addressing without hurting + * performance. Cf. Knuth, Volume 3., Chapter 6. + */ + protected float _loadFactor; + + /** + * The maximum number of elements allowed without allocating more + * space. + */ + protected int _maxSize; + + + /** The number of removes that should be performed before an auto-compaction occurs. */ + protected int _autoCompactRemovesRemaining; + + /** + * The auto-compaction factor for the table. + * + * @see #setAutoCompactionFactor + */ + protected float _autoCompactionFactor; + + /** @see #tempDisableAutoCompaction */ + protected transient boolean _autoCompactTemporaryDisable = false; + + + /** + * Creates a new THash instance with the default + * capacity and load factor. + */ + public THash() { + this( DEFAULT_CAPACITY, DEFAULT_LOAD_FACTOR ); + } + + + /** + * Creates a new THash instance with a prime capacity + * at or near the specified capacity and with the default load + * factor. + * + * @param initialCapacity an int value + */ + public THash( int initialCapacity ) { + this( initialCapacity, DEFAULT_LOAD_FACTOR ); + } + + + /** + * Creates a new THash instance with a prime capacity + * at or near the minimum needed to hold initialCapacity + * elements with load factor loadFactor without triggering + * a rehash. + * + * @param initialCapacity an int value + * @param loadFactor a float value + */ + public THash( int initialCapacity, float loadFactor ) { + super(); + _loadFactor = loadFactor; + + // Through testing, the load factor (especially the default load factor) has been + // found to be a pretty good starting auto-compaction factor. + _autoCompactionFactor = loadFactor; + + setUp( HashFunctions.fastCeil( initialCapacity / loadFactor ) ); + } + + + /** + * Tells whether this set is currently holding any elements. + * + * @return a boolean value + */ + public boolean isEmpty() { + return 0 == _size; + } + + + /** + * Returns the number of distinct elements in this collection. + * + * @return an int value + */ + public int size() { + return _size; + } + + + /** @return the current physical capacity of the hash table. */ + abstract public int capacity(); + + + /** + * Ensure that this hashtable has sufficient capacity to hold + * desiredCapacity additional elements without + * requiring a rehash. This is a tuning method you can call + * before doing a large insert. + * + * @param desiredCapacity an int value + */ + public void ensureCapacity( int desiredCapacity ) { + if ( desiredCapacity > ( _maxSize - size() ) ) { + rehash( PrimeFinder.nextPrime( Math.max( size() + 1, + HashFunctions.fastCeil( ( desiredCapacity + size() ) / _loadFactor ) + 1 ) ) ); + computeMaxSize( capacity() ); + } + } + + + /** + * Compresses the hashtable to the minimum prime size (as defined + * by PrimeFinder) that will hold all of the elements currently in + * the table. If you have done a lot of remove + * operations and plan to do a lot of queries or insertions or + * iteration, it is a good idea to invoke this method. Doing so + * will accomplish two things: + *

+ *

    + *
  1. You'll free memory allocated to the table but no + * longer needed because of the remove()s.
  2. + *

    + *

  3. You'll get better query/insert/iterator performance + * because there won't be any REMOVED slots to skip + * over when probing for indices in the table.
  4. + *
+ */ + public void compact() { + // need at least one free spot for open addressing + rehash( PrimeFinder.nextPrime( Math.max( _size + 1, + HashFunctions.fastCeil( size() / _loadFactor ) + 1 ) ) ); + computeMaxSize( capacity() ); + + // If auto-compaction is enabled, re-determine the compaction interval + if ( _autoCompactionFactor != 0 ) { + computeNextAutoCompactionAmount( size() ); + } + } + + + /** + * The auto-compaction factor controls whether and when a table performs a + * {@link #compact} automatically after a certain number of remove operations. + * If the value is non-zero, the number of removes that need to occur for + * auto-compaction is the size of table at the time of the previous compaction + * (or the initial capacity) multiplied by this factor. + *

+ * Setting this value to zero will disable auto-compaction. + * + * @param factor a float that indicates the auto-compaction factor + */ + public void setAutoCompactionFactor( float factor ) { + if ( factor < 0 ) { + throw new IllegalArgumentException( "Factor must be >= 0: " + factor ); + } + + _autoCompactionFactor = factor; + } + + + /** + * @see #setAutoCompactionFactor + * + * @return a <float that represents the auto-compaction factor. + */ + public float getAutoCompactionFactor() { + return _autoCompactionFactor; + } + + + /** + * This simply calls {@link #compact compact}. It is included for + * symmetry with other collection classes. Note that the name of this + * method is somewhat misleading (which is why we prefer + * compact) as the load factor may require capacity above + * and beyond the size of this collection. + * + * @see #compact + */ + public final void trimToSize() { + compact(); + } + + + /** + * Delete the record at index. Reduces the size of the + * collection by one. + * + * @param index an int value + */ + protected void removeAt( int index ) { + _size--; + + // If auto-compaction is enabled, see if we need to compact + if ( _autoCompactionFactor != 0 ) { + _autoCompactRemovesRemaining--; + + if ( !_autoCompactTemporaryDisable && _autoCompactRemovesRemaining <= 0 ) { + // Do the compact + // NOTE: this will cause the next compaction interval to be calculated + compact(); + } + } + } + + + /** Empties the collection. */ + public void clear() { + _size = 0; + _free = capacity(); + } + + + /** + * initializes the hashtable to a prime capacity which is at least + * initialCapacity + 1. + * + * @param initialCapacity an int value + * @return the actual capacity chosen + */ + protected int setUp( int initialCapacity ) { + int capacity; + + capacity = PrimeFinder.nextPrime( initialCapacity ); + computeMaxSize( capacity ); + computeNextAutoCompactionAmount( initialCapacity ); + + return capacity; + } + + + /** + * Rehashes the set. + * + * @param newCapacity an int value + */ + protected abstract void rehash( int newCapacity ); + + + /** + * Temporarily disables auto-compaction. MUST be followed by calling + * {@link #reenableAutoCompaction}. + */ + public void tempDisableAutoCompaction() { + _autoCompactTemporaryDisable = true; + } + + + /** + * Re-enable auto-compaction after it was disabled via + * {@link #tempDisableAutoCompaction()}. + * + * @param check_for_compaction True if compaction should be performed if needed + * before returning. If false, no compaction will be + * performed. + */ + public void reenableAutoCompaction( boolean check_for_compaction ) { + _autoCompactTemporaryDisable = false; + + if ( check_for_compaction && _autoCompactRemovesRemaining <= 0 && + _autoCompactionFactor != 0 ) { + + // Do the compact + // NOTE: this will cause the next compaction interval to be calculated + compact(); + } + } + + + /** + * Computes the values of maxSize. There will always be at least + * one free slot required. + * + * @param capacity an int value + */ + protected void computeMaxSize( int capacity ) { + // need at least one free slot for open addressing + _maxSize = Math.min( capacity - 1, (int) ( capacity * _loadFactor ) ); + _free = capacity - _size; // reset the free element count + } + + + /** + * Computes the number of removes that need to happen before the next auto-compaction + * will occur. + * + * @param size an int that sets the auto-compaction limit. + */ + protected void computeNextAutoCompactionAmount( int size ) { + if ( _autoCompactionFactor != 0 ) { + // NOTE: doing the round ourselves has been found to be faster than using + // Math.round. + _autoCompactRemovesRemaining = + (int) ( ( size * _autoCompactionFactor ) + 0.5f ); + } + } + + + /** + * After an insert, this hook is called to adjust the size/free + * values of the set and to perform rehashing if necessary. + * + * @param usedFreeSlot the slot + */ + protected final void postInsertHook( boolean usedFreeSlot ) { + if ( usedFreeSlot ) { + _free--; + } + + // rehash whenever we exhaust the available space in the table + if ( ++_size > _maxSize || _free == 0 ) { + // choose a new capacity suited to the new state of the table + // if we've grown beyond our maximum size, double capacity; + // if we've exhausted the free spots, rehash to the same capacity, + // which will free up any stale removed slots for reuse. + int newCapacity = _size > _maxSize ? PrimeFinder.nextPrime( capacity() << 1 ) : capacity(); + rehash( newCapacity ); + computeMaxSize( capacity() ); + } + } + + + protected int calculateGrownCapacity() { + return capacity() << 1; + } + + + public void writeExternal( ObjectOutput out ) throws IOException { + // VERSION + out.writeByte( 0 ); + + // LOAD FACTOR + out.writeFloat( _loadFactor ); + + // AUTO COMPACTION LOAD FACTOR + out.writeFloat( _autoCompactionFactor ); + } + + + public void readExternal( ObjectInput in ) + throws IOException, ClassNotFoundException { + + // VERSION + in.readByte(); + + // LOAD FACTOR + float old_factor = _loadFactor; + _loadFactor = in.readFloat(); + + // AUTO COMPACTION LOAD FACTOR + _autoCompactionFactor = in.readFloat(); + + // If we change the laod factor from the default, re-setup + if ( old_factor != _loadFactor ) { + setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); + } + } +}// THash \ No newline at end of file diff --git a/src/gnu/trove/impl/hash/THashIterator.java b/src/gnu/trove/impl/hash/THashIterator.java new file mode 100644 index 00000000..4898620d --- /dev/null +++ b/src/gnu/trove/impl/hash/THashIterator.java @@ -0,0 +1,177 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.impl.hash; + +import gnu.trove.iterator.TIterator; + +import java.util.ConcurrentModificationException; +import java.util.Iterator; +import java.util.NoSuchElementException; + + + +/** + * Implements all iterator functions for the hashed object set. + * Subclasses may override objectAtIndex to vary the object + * returned by calls to next() (e.g. for values, and Map.Entry + * objects). + *

+ *

Note that iteration is fastest if you forego the calls to + * hasNext in favor of checking the size of the structure + * yourself and then call next() that many times: + *

+ *

+ * Iterator i = collection.iterator();
+ * for (int size = collection.size(); size-- > 0;) {
+ *   Object o = i.next();
+ * }
+ * 
+ *

+ *

You may, of course, use the hasNext(), next() idiom too if + * you aren't in a performance critical spot.

+ */ +public abstract class THashIterator implements TIterator, Iterator { + + + private final TObjectHash _object_hash; + + /** the data structure this iterator traverses */ + protected final THash _hash; + + /** + * the number of elements this iterator believes are in the + * data structure it accesses. + */ + protected int _expectedSize; + + /** the index used for iteration. */ + protected int _index; + + + /** + * Create an instance of THashIterator over the values of the TObjectHash + * + * @param hash the object + */ + protected THashIterator( TObjectHash hash ) { + _hash = hash; + _expectedSize = _hash.size(); + _index = _hash.capacity(); + _object_hash = hash; + } + + + /** + * Moves the iterator to the next Object and returns it. + * + * @return an Object value + * @throws ConcurrentModificationException + * if the structure + * was changed using a method that isn't on this iterator. + * @throws NoSuchElementException if this is called on an + * exhausted iterator. + */ + public V next() { + moveToNextIndex(); + return objectAtIndex( _index ); + } + + + /** + * Returns true if the iterator can be advanced past its current + * location. + * + * @return a boolean value + */ + public boolean hasNext() { + return nextIndex() >= 0; + } + + + /** + * Removes the last entry returned by the iterator. + * Invoking this method more than once for a single entry + * will leave the underlying data structure in a confused + * state. + */ + public void remove() { + if ( _expectedSize != _hash.size() ) { + throw new ConcurrentModificationException(); + } + + // Disable auto compaction during the remove. This is a workaround for bug 1642768. + try { + _hash.tempDisableAutoCompaction(); + _hash.removeAt( _index ); + } + finally { + _hash.reenableAutoCompaction( false ); + } + + _expectedSize--; + } + + + /** + * Sets the internal index so that the `next' object + * can be returned. + */ + protected final void moveToNextIndex() { + // doing the assignment && < 0 in one line shaves + // 3 opcodes... + if ( ( _index = nextIndex() ) < 0 ) { + throw new NoSuchElementException(); + } + } + + + /** + * Returns the index of the next value in the data structure + * or a negative value if the iterator is exhausted. + * + * @return an int value + * @throws ConcurrentModificationException + * if the underlying + * collection's size has been modified since the iterator was + * created. + */ + protected final int nextIndex() { + if ( _expectedSize != _hash.size() ) { + throw new ConcurrentModificationException(); + } + + Object[] set = _object_hash._set; + int i = _index; + while ( i-- > 0 && ( set[i] == TObjectHash.FREE || set[i] == TObjectHash.REMOVED ) ) { + ; + } + return i; + } + + + /** + * Returns the object at the specified index. Subclasses should + * implement this to return the appropriate object for the given + * index. + * + * @param index the index of the value to return. + * @return an Object value + */ + abstract protected V objectAtIndex( int index ); +} // THashIterator diff --git a/src/gnu/trove/impl/hash/THashPrimitiveIterator.java b/src/gnu/trove/impl/hash/THashPrimitiveIterator.java new file mode 100644 index 00000000..9e7ecb2c --- /dev/null +++ b/src/gnu/trove/impl/hash/THashPrimitiveIterator.java @@ -0,0 +1,143 @@ +// //////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// //////////////////////////////////////////////////////////////////////////// + +package gnu.trove.impl.hash; + +import gnu.trove.iterator.TPrimitiveIterator; + +import java.util.ConcurrentModificationException; +import java.util.NoSuchElementException; + + +/** + * Implements all iterator functions for the hashed object set. + * Subclasses may override objectAtIndex to vary the object + * returned by calls to next() (e.g. for values, and Map.Entry + * objects). + *

+ *

Note that iteration is fastest if you forego the calls to + * hasNext in favor of checking the size of the structure + * yourself and then call next() that many times: + *

+ *

+ * Iterator i = collection.iterator();
+ * for (int size = collection.size(); size-- > 0;) {
+ *   Object o = i.next();
+ * }
+ * 
+ *

+ *

You may, of course, use the hasNext(), next() idiom too if + * you aren't in a performance critical spot.

+ */ +public abstract class THashPrimitiveIterator implements TPrimitiveIterator { + + /** the data structure this iterator traverses */ + protected final TPrimitiveHash _hash; + /** + * the number of elements this iterator believes are in the + * data structure it accesses. + */ + protected int _expectedSize; + /** the index used for iteration. */ + protected int _index; + + + /** + * Creates a TPrimitiveIterator for the specified collection. + * + * @param hash the TPrimitiveHash we want to iterate over. + */ + public THashPrimitiveIterator( TPrimitiveHash hash ) { + _hash = hash; + _expectedSize = _hash.size(); + _index = _hash.capacity(); + } + + + /** + * Returns the index of the next value in the data structure + * or a negative value if the iterator is exhausted. + * + * @return an int value + * @throws java.util.ConcurrentModificationException + * if the underlying collection's + * size has been modified since the iterator was created. + */ + protected final int nextIndex() { + if ( _expectedSize != _hash.size() ) { + throw new ConcurrentModificationException(); + } + + byte[] states = _hash._states; + int i = _index; + while ( i-- > 0 && ( states[i] != TPrimitiveHash.FULL ) ) { + ; + } + return i; + } + + + /** + * Returns true if the iterator can be advanced past its current + * location. + * + * @return a boolean value + */ + public boolean hasNext() { + return nextIndex() >= 0; + } + + + /** + * Removes the last entry returned by the iterator. + * Invoking this method more than once for a single entry + * will leave the underlying data structure in a confused + * state. + */ + public void remove() { + if (_expectedSize != _hash.size()) { + throw new ConcurrentModificationException(); + } + + // Disable auto compaction during the remove. This is a workaround for bug 1642768. + try { + _hash.tempDisableAutoCompaction(); + _hash.removeAt(_index); + } + finally { + _hash.reenableAutoCompaction( false ); + } + + _expectedSize--; + } + + + /** + * Sets the internal index so that the `next' object + * can be returned. + */ + protected final void moveToNextIndex() { + // doing the assignment && < 0 in one line shaves + // 3 opcodes... + if ( ( _index = nextIndex() ) < 0 ) { + throw new NoSuchElementException(); + } + } + + +} // TPrimitiveIterator \ No newline at end of file diff --git a/src/gnu/trove/impl/hash/TIntByteHash.java b/src/gnu/trove/impl/hash/TIntByteHash.java new file mode 100644 index 00000000..686d272f --- /dev/null +++ b/src/gnu/trove/impl/hash/TIntByteHash.java @@ -0,0 +1,464 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.impl.hash; + +import gnu.trove.procedure.*; +import gnu.trove.impl.HashFunctions; + +import java.io.ObjectOutput; +import java.io.ObjectInput; +import java.io.IOException; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * An open addressed hashing implementation for int/byte primitive entries. + * + * Created: Sun Nov 4 08:56:06 2001 + * + * @author Eric D. Friedman + * @author Rob Eden + * @author Jeff Randall + * @version $Id: _K__V_Hash.template,v 1.1.2.6 2009/11/07 03:36:44 robeden Exp $ + */ +abstract public class TIntByteHash extends TPrimitiveHash { + static final long serialVersionUID = 1L; + + /** the set of ints */ + public transient int[] _set; + + + /** + * key that represents null + * + * NOTE: should not be modified after the Hash is created, but is + * not final because of Externalization + * + */ + protected int no_entry_key; + + + /** + * value that represents null + * + * NOTE: should not be modified after the Hash is created, but is + * not final because of Externalization + * + */ + protected byte no_entry_value; + + protected boolean consumeFreeSlot; + + /** + * Creates a new T#E#Hash instance with the default + * capacity and load factor. + */ + public TIntByteHash() { + super(); + no_entry_key = ( int ) 0; + no_entry_value = ( byte ) 0; + } + + + /** + * Creates a new T#E#Hash instance whose capacity + * is the next highest prime above initialCapacity + 1 + * unless that value is already prime. + * + * @param initialCapacity an int value + */ + public TIntByteHash( int initialCapacity ) { + super( initialCapacity ); + no_entry_key = ( int ) 0; + no_entry_value = ( byte ) 0; + } + + + /** + * Creates a new TIntByteHash instance with a prime + * value at or near the specified capacity and load factor. + * + * @param initialCapacity used to find a prime capacity for the table. + * @param loadFactor used to calculate the threshold over which + * rehashing takes place. + */ + public TIntByteHash( int initialCapacity, float loadFactor ) { + super(initialCapacity, loadFactor); + no_entry_key = ( int ) 0; + no_entry_value = ( byte ) 0; + } + + + /** + * Creates a new TIntByteHash instance with a prime + * value at or near the specified capacity and load factor. + * + * @param initialCapacity used to find a prime capacity for the table. + * @param loadFactor used to calculate the threshold over which + * rehashing takes place. + * @param no_entry_value value that represents null + */ + public TIntByteHash( int initialCapacity, float loadFactor, + int no_entry_key, byte no_entry_value ) { + super(initialCapacity, loadFactor); + this.no_entry_key = no_entry_key; + this.no_entry_value = no_entry_value; + } + + + /** + * Returns the value that is used to represent null as a key. The default + * value is generally zero, but can be changed during construction + * of the collection. + * + * @return the value that represents null + */ + public int getNoEntryKey() { + return no_entry_key; + } + + + /** + * Returns the value that is used to represent null. The default + * value is generally zero, but can be changed during construction + * of the collection. + * + * @return the value that represents null + */ + public byte getNoEntryValue() { + return no_entry_value; + } + + + /** + * initializes the hashtable to a prime capacity which is at least + * initialCapacity + 1. + * + * @param initialCapacity an int value + * @return the actual capacity chosen + */ + protected int setUp( int initialCapacity ) { + int capacity; + + capacity = super.setUp( initialCapacity ); + _set = new int[capacity]; + return capacity; + } + + + /** + * Searches the set for val + * + * @param val an int value + * @return a boolean value + */ + public boolean contains( int val ) { + return index(val) >= 0; + } + + + /** + * Executes procedure for each key in the map. + * + * @param procedure a TIntProcedure value + * @return false if the loop over the set terminated because + * the procedure returned false for some value. + */ + public boolean forEach( TIntProcedure procedure ) { + byte[] states = _states; + int[] set = _set; + for ( int i = set.length; i-- > 0; ) { + if ( states[i] == FULL && ! procedure.execute( set[i] ) ) { + return false; + } + } + return true; + } + + + /** + * Releases the element currently stored at index. + * + * @param index an int value + */ + protected void removeAt( int index ) { + _set[index] = no_entry_key; + super.removeAt( index ); + } + + + /** + * Locates the index of val. + * + * @param key an int value + * @return the index of val or -1 if it isn't in the set. + */ + protected int index( int key ) { + int hash, probe, index, length; + + final byte[] states = _states; + final int[] set = _set; + length = states.length; + hash = HashFunctions.hash( key ) & 0x7fffffff; + index = hash % length; + byte state = states[index]; + + if (state == FREE) + return -1; + + if (state == FULL && set[index] == key) + return index; + + return indexRehashed(key, index, hash, state); + } + + int indexRehashed(int key, int index, int hash, byte state) { + // see Knuth, p. 529 + int length = _set.length; + int probe = 1 + (hash % (length - 2)); + final int loopIndex = index; + + do { + index -= probe; + if (index < 0) { + index += length; + } + state = _states[index]; + // + if (state == FREE) + return -1; + + // + if (key == _set[index] && state != REMOVED) + return index; + } while (index != loopIndex); + + return -1; + } + + + /** + * Locates the index at which val can be inserted. if + * there is already a value equal()ing val in the set, + * returns that value as a negative integer. + * + * @param key an int value + * @return an int value + */ + protected int insertKey( int val ) { + int hash, index; + + hash = HashFunctions.hash(val) & 0x7fffffff; + index = hash % _states.length; + byte state = _states[index]; + + consumeFreeSlot = false; + + if (state == FREE) { + consumeFreeSlot = true; + insertKeyAt(index, val); + + return index; // empty, all done + } + + if (state == FULL && _set[index] == val) { + return -index - 1; // already stored + } + + // already FULL or REMOVED, must probe + return insertKeyRehash(val, index, hash, state); + } + + int insertKeyRehash(int val, int index, int hash, byte state) { + // compute the double hash + final int length = _set.length; + int probe = 1 + (hash % (length - 2)); + final int loopIndex = index; + int firstRemoved = -1; + + /** + * Look until FREE slot or we start to loop + */ + do { + // Identify first removed slot + if (state == REMOVED && firstRemoved == -1) + firstRemoved = index; + + index -= probe; + if (index < 0) { + index += length; + } + state = _states[index]; + + // A FREE slot stops the search + if (state == FREE) { + if (firstRemoved != -1) { + insertKeyAt(firstRemoved, val); + return firstRemoved; + } else { + consumeFreeSlot = true; + insertKeyAt(index, val); + return index; + } + } + + if (state == FULL && _set[index] == val) { + return -index - 1; + } + + // Detect loop + } while (index != loopIndex); + + // We inspected all reachable slots and did not find a FREE one + // If we found a REMOVED slot we return the first one found + if (firstRemoved != -1) { + insertKeyAt(firstRemoved, val); + return firstRemoved; + } + + // Can a resizing strategy be found that resizes the set? + throw new IllegalStateException("No free or removed slots available. Key set full?!!"); + } + + void insertKeyAt(int index, int val) { + _set[index] = val; // insert value + _states[index] = FULL; + } + + protected int XinsertKey( int key ) { + int hash, probe, index, length; + + final byte[] states = _states; + final int[] set = _set; + length = states.length; + hash = HashFunctions.hash( key ) & 0x7fffffff; + index = hash % length; + byte state = states[index]; + + consumeFreeSlot = false; + + if ( state == FREE ) { + consumeFreeSlot = true; + set[index] = key; + states[index] = FULL; + + return index; // empty, all done + } else if ( state == FULL && set[index] == key ) { + return -index -1; // already stored + } else { // already FULL or REMOVED, must probe + // compute the double hash + probe = 1 + ( hash % ( length - 2 ) ); + + // if the slot we landed on is FULL (but not removed), probe + // until we find an empty slot, a REMOVED slot, or an element + // equal to the one we are trying to insert. + // finding an empty slot means that the value is not present + // and that we should use that slot as the insertion point; + // finding a REMOVED slot means that we need to keep searching, + // however we want to remember the offset of that REMOVED slot + // so we can reuse it in case a "new" insertion (i.e. not an update) + // is possible. + // finding a matching value means that we've found that our desired + // key is already in the table + + if ( state != REMOVED ) { + // starting at the natural offset, probe until we find an + // offset that isn't full. + do { + index -= probe; + if (index < 0) { + index += length; + } + state = states[index]; + } while ( state == FULL && set[index] != key ); + } + + // if the index we found was removed: continue probing until we + // locate a free location or an element which equal()s the + // one we have. + if ( state == REMOVED) { + int firstRemoved = index; + while ( state != FREE && ( state == REMOVED || set[index] != key ) ) { + index -= probe; + if (index < 0) { + index += length; + } + state = states[index]; + } + + if (state == FULL) { + return -index -1; + } else { + set[index] = key; + states[index] = FULL; + + return firstRemoved; + } + } + // if it's full, the key is already stored + if (state == FULL) { + return -index -1; + } else { + consumeFreeSlot = true; + set[index] = key; + states[index] = FULL; + + return index; + } + } + } + + + /** {@inheritDoc} */ + public void writeExternal( ObjectOutput out ) throws IOException { + // VERSION + out.writeByte( 0 ); + + // SUPER + super.writeExternal( out ); + + // NO_ENTRY_KEY + out.writeInt( no_entry_key ); + + // NO_ENTRY_VALUE + out.writeByte( no_entry_value ); + } + + + /** {@inheritDoc} */ + public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException { + // VERSION + in.readByte(); + + // SUPER + super.readExternal( in ); + + // NO_ENTRY_KEY + no_entry_key = in.readInt(); + + // NO_ENTRY_VALUE + no_entry_value = in.readByte(); + } +} // TIntByteHash diff --git a/src/gnu/trove/impl/hash/TIntHash.java b/src/gnu/trove/impl/hash/TIntHash.java new file mode 100644 index 00000000..c7739e59 --- /dev/null +++ b/src/gnu/trove/impl/hash/TIntHash.java @@ -0,0 +1,334 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.impl.hash; + +import gnu.trove.procedure.TIntProcedure; +import gnu.trove.impl.HashFunctions; +import gnu.trove.impl.Constants; + +import java.util.Arrays; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * An open addressed hashing implementation for int primitives. + * + * Created: Sun Nov 4 08:56:06 2001 + * + * @author Eric D. Friedman, Rob Eden, Jeff Randall + * @version $Id: _E_Hash.template,v 1.1.2.6 2009/11/07 03:36:44 robeden Exp $ + */ +abstract public class TIntHash extends TPrimitiveHash { + static final long serialVersionUID = 1L; + + /** the set of ints */ + public transient int[] _set; + + /** + * value that represents null + * + * NOTE: should not be modified after the Hash is created, but is + * not final because of Externalization + * + */ + protected int no_entry_value; + + protected boolean consumeFreeSlot; + + + /** + * Creates a new TIntHash instance with the default + * capacity and load factor. + */ + public TIntHash() { + super(); + no_entry_value = Constants.DEFAULT_INT_NO_ENTRY_VALUE; + //noinspection RedundantCast + if ( no_entry_value != ( int ) 0 ) { + Arrays.fill( _set, no_entry_value ); + } + } + + + /** + * Creates a new TIntHash instance whose capacity + * is the next highest prime above initialCapacity + 1 + * unless that value is already prime. + * + * @param initialCapacity an int value + */ + public TIntHash( int initialCapacity ) { + super( initialCapacity ); + no_entry_value = Constants.DEFAULT_INT_NO_ENTRY_VALUE; + //noinspection RedundantCast + if ( no_entry_value != ( int ) 0 ) { + Arrays.fill( _set, no_entry_value ); + } + } + + + /** + * Creates a new TIntHash instance with a prime + * value at or near the specified capacity and load factor. + * + * @param initialCapacity used to find a prime capacity for the table. + * @param loadFactor used to calculate the threshold over which + * rehashing takes place. + */ + public TIntHash( int initialCapacity, float loadFactor ) { + super(initialCapacity, loadFactor); + no_entry_value = Constants.DEFAULT_INT_NO_ENTRY_VALUE; + //noinspection RedundantCast + if ( no_entry_value != ( int ) 0 ) { + Arrays.fill( _set, no_entry_value ); + } + } + + + /** + * Creates a new TIntHash instance with a prime + * value at or near the specified capacity and load factor. + * + * @param initialCapacity used to find a prime capacity for the table. + * @param loadFactor used to calculate the threshold over which + * rehashing takes place. + * @param no_entry_value value that represents null + */ + public TIntHash( int initialCapacity, float loadFactor, int no_entry_value ) { + super(initialCapacity, loadFactor); + this.no_entry_value = no_entry_value; + //noinspection RedundantCast + if ( no_entry_value != ( int ) 0 ) { + Arrays.fill( _set, no_entry_value ); + } + } + + + /** + * Returns the value that is used to represent null. The default + * value is generally zero, but can be changed during construction + * of the collection. + * + * @return the value that represents null + */ + public int getNoEntryValue() { + return no_entry_value; + } + + + /** + * initializes the hashtable to a prime capacity which is at least + * initialCapacity + 1. + * + * @param initialCapacity an int value + * @return the actual capacity chosen + */ + protected int setUp( int initialCapacity ) { + int capacity; + + capacity = super.setUp( initialCapacity ); + _set = new int[capacity]; + return capacity; + } + + + /** + * Searches the set for val + * + * @param val an int value + * @return a boolean value + */ + public boolean contains( int val ) { + return index(val) >= 0; + } + + + /** + * Executes procedure for each element in the set. + * + * @param procedure a TObjectProcedure value + * @return false if the loop over the set terminated because + * the procedure returned false for some value. + */ + public boolean forEach( TIntProcedure procedure ) { + byte[] states = _states; + int[] set = _set; + for ( int i = set.length; i-- > 0; ) { + if ( states[i] == FULL && ! procedure.execute( set[i] ) ) { + return false; + } + } + return true; + } + + + /** + * Releases the element currently stored at index. + * + * @param index an int value + */ + protected void removeAt( int index ) { + _set[index] = no_entry_value; + super.removeAt( index ); + } + + + /** + * Locates the index of val. + * + * @param val an int value + * @return the index of val or -1 if it isn't in the set. + */ + protected int index( int val ) { + int hash, probe, index, length; + + final byte[] states = _states; + final int[] set = _set; + length = states.length; + hash = HashFunctions.hash( val ) & 0x7fffffff; + index = hash % length; + byte state = states[index]; + + if (state == FREE) + return -1; + + if (state == FULL && set[index] == val) + return index; + + return indexRehashed(val, index, hash, state); + } + + int indexRehashed(int key, int index, int hash, byte state) { + // see Knuth, p. 529 + int length = _set.length; + int probe = 1 + (hash % (length - 2)); + final int loopIndex = index; + + do { + index -= probe; + if (index < 0) { + index += length; + } + state = _states[index]; + // + if (state == FREE) + return -1; + + // + if (key == _set[index] && state != REMOVED) + return index; + } while (index != loopIndex); + + return -1; + } + + /** + * Locates the index at which val can be inserted. if + * there is already a value equal()ing val in the set, + * returns that value as a negative integer. + * + * @param val an int value + * @return an int value + */ + protected int insertKey( int val ) { + int hash, index; + + hash = HashFunctions.hash(val) & 0x7fffffff; + index = hash % _states.length; + byte state = _states[index]; + + consumeFreeSlot = false; + + if (state == FREE) { + consumeFreeSlot = true; + insertKeyAt(index, val); + + return index; // empty, all done + } + + if (state == FULL && _set[index] == val) { + return -index - 1; // already stored + } + + // already FULL or REMOVED, must probe + return insertKeyRehash(val, index, hash, state); + } + + int insertKeyRehash(int val, int index, int hash, byte state) { + // compute the double hash + final int length = _set.length; + int probe = 1 + (hash % (length - 2)); + final int loopIndex = index; + int firstRemoved = -1; + + /** + * Look until FREE slot or we start to loop + */ + do { + // Identify first removed slot + if (state == REMOVED && firstRemoved == -1) + firstRemoved = index; + + index -= probe; + if (index < 0) { + index += length; + } + state = _states[index]; + + // A FREE slot stops the search + if (state == FREE) { + if (firstRemoved != -1) { + insertKeyAt(firstRemoved, val); + return firstRemoved; + } else { + consumeFreeSlot = true; + insertKeyAt(index, val); + return index; + } + } + + if (state == FULL && _set[index] == val) { + return -index - 1; + } + + // Detect loop + } while (index != loopIndex); + + // We inspected all reachable slots and did not find a FREE one + // If we found a REMOVED slot we return the first one found + if (firstRemoved != -1) { + insertKeyAt(firstRemoved, val); + return firstRemoved; + } + + // Can a resizing strategy be found that resizes the set? + throw new IllegalStateException("No free or removed slots available. Key set full?!!"); + } + + void insertKeyAt(int index, int val) { + _set[index] = val; // insert value + _states[index] = FULL; + } + +} // TIntHash diff --git a/src/gnu/trove/impl/hash/TIntIntHash.java b/src/gnu/trove/impl/hash/TIntIntHash.java new file mode 100644 index 00000000..e5a4cf90 --- /dev/null +++ b/src/gnu/trove/impl/hash/TIntIntHash.java @@ -0,0 +1,464 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.impl.hash; + +import gnu.trove.procedure.*; +import gnu.trove.impl.HashFunctions; + +import java.io.ObjectOutput; +import java.io.ObjectInput; +import java.io.IOException; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * An open addressed hashing implementation for int/int primitive entries. + * + * Created: Sun Nov 4 08:56:06 2001 + * + * @author Eric D. Friedman + * @author Rob Eden + * @author Jeff Randall + * @version $Id: _K__V_Hash.template,v 1.1.2.6 2009/11/07 03:36:44 robeden Exp $ + */ +abstract public class TIntIntHash extends TPrimitiveHash { + static final long serialVersionUID = 1L; + + /** the set of ints */ + public transient int[] _set; + + + /** + * key that represents null + * + * NOTE: should not be modified after the Hash is created, but is + * not final because of Externalization + * + */ + protected int no_entry_key; + + + /** + * value that represents null + * + * NOTE: should not be modified after the Hash is created, but is + * not final because of Externalization + * + */ + protected int no_entry_value; + + protected boolean consumeFreeSlot; + + /** + * Creates a new T#E#Hash instance with the default + * capacity and load factor. + */ + public TIntIntHash() { + super(); + no_entry_key = ( int ) 0; + no_entry_value = ( int ) 0; + } + + + /** + * Creates a new T#E#Hash instance whose capacity + * is the next highest prime above initialCapacity + 1 + * unless that value is already prime. + * + * @param initialCapacity an int value + */ + public TIntIntHash( int initialCapacity ) { + super( initialCapacity ); + no_entry_key = ( int ) 0; + no_entry_value = ( int ) 0; + } + + + /** + * Creates a new TIntIntHash instance with a prime + * value at or near the specified capacity and load factor. + * + * @param initialCapacity used to find a prime capacity for the table. + * @param loadFactor used to calculate the threshold over which + * rehashing takes place. + */ + public TIntIntHash( int initialCapacity, float loadFactor ) { + super(initialCapacity, loadFactor); + no_entry_key = ( int ) 0; + no_entry_value = ( int ) 0; + } + + + /** + * Creates a new TIntIntHash instance with a prime + * value at or near the specified capacity and load factor. + * + * @param initialCapacity used to find a prime capacity for the table. + * @param loadFactor used to calculate the threshold over which + * rehashing takes place. + * @param no_entry_value value that represents null + */ + public TIntIntHash( int initialCapacity, float loadFactor, + int no_entry_key, int no_entry_value ) { + super(initialCapacity, loadFactor); + this.no_entry_key = no_entry_key; + this.no_entry_value = no_entry_value; + } + + + /** + * Returns the value that is used to represent null as a key. The default + * value is generally zero, but can be changed during construction + * of the collection. + * + * @return the value that represents null + */ + public int getNoEntryKey() { + return no_entry_key; + } + + + /** + * Returns the value that is used to represent null. The default + * value is generally zero, but can be changed during construction + * of the collection. + * + * @return the value that represents null + */ + public int getNoEntryValue() { + return no_entry_value; + } + + + /** + * initializes the hashtable to a prime capacity which is at least + * initialCapacity + 1. + * + * @param initialCapacity an int value + * @return the actual capacity chosen + */ + protected int setUp( int initialCapacity ) { + int capacity; + + capacity = super.setUp( initialCapacity ); + _set = new int[capacity]; + return capacity; + } + + + /** + * Searches the set for val + * + * @param val an int value + * @return a boolean value + */ + public boolean contains( int val ) { + return index(val) >= 0; + } + + + /** + * Executes procedure for each key in the map. + * + * @param procedure a TIntProcedure value + * @return false if the loop over the set terminated because + * the procedure returned false for some value. + */ + public boolean forEach( TIntProcedure procedure ) { + byte[] states = _states; + int[] set = _set; + for ( int i = set.length; i-- > 0; ) { + if ( states[i] == FULL && ! procedure.execute( set[i] ) ) { + return false; + } + } + return true; + } + + + /** + * Releases the element currently stored at index. + * + * @param index an int value + */ + protected void removeAt( int index ) { + _set[index] = no_entry_key; + super.removeAt( index ); + } + + + /** + * Locates the index of val. + * + * @param key an int value + * @return the index of val or -1 if it isn't in the set. + */ + protected int index( int key ) { + int hash, probe, index, length; + + final byte[] states = _states; + final int[] set = _set; + length = states.length; + hash = HashFunctions.hash( key ) & 0x7fffffff; + index = hash % length; + byte state = states[index]; + + if (state == FREE) + return -1; + + if (state == FULL && set[index] == key) + return index; + + return indexRehashed(key, index, hash, state); + } + + int indexRehashed(int key, int index, int hash, byte state) { + // see Knuth, p. 529 + int length = _set.length; + int probe = 1 + (hash % (length - 2)); + final int loopIndex = index; + + do { + index -= probe; + if (index < 0) { + index += length; + } + state = _states[index]; + // + if (state == FREE) + return -1; + + // + if (key == _set[index] && state != REMOVED) + return index; + } while (index != loopIndex); + + return -1; + } + + + /** + * Locates the index at which val can be inserted. if + * there is already a value equal()ing val in the set, + * returns that value as a negative integer. + * + * @param key an int value + * @return an int value + */ + protected int insertKey( int val ) { + int hash, index; + + hash = HashFunctions.hash(val) & 0x7fffffff; + index = hash % _states.length; + byte state = _states[index]; + + consumeFreeSlot = false; + + if (state == FREE) { + consumeFreeSlot = true; + insertKeyAt(index, val); + + return index; // empty, all done + } + + if (state == FULL && _set[index] == val) { + return -index - 1; // already stored + } + + // already FULL or REMOVED, must probe + return insertKeyRehash(val, index, hash, state); + } + + int insertKeyRehash(int val, int index, int hash, byte state) { + // compute the double hash + final int length = _set.length; + int probe = 1 + (hash % (length - 2)); + final int loopIndex = index; + int firstRemoved = -1; + + /** + * Look until FREE slot or we start to loop + */ + do { + // Identify first removed slot + if (state == REMOVED && firstRemoved == -1) + firstRemoved = index; + + index -= probe; + if (index < 0) { + index += length; + } + state = _states[index]; + + // A FREE slot stops the search + if (state == FREE) { + if (firstRemoved != -1) { + insertKeyAt(firstRemoved, val); + return firstRemoved; + } else { + consumeFreeSlot = true; + insertKeyAt(index, val); + return index; + } + } + + if (state == FULL && _set[index] == val) { + return -index - 1; + } + + // Detect loop + } while (index != loopIndex); + + // We inspected all reachable slots and did not find a FREE one + // If we found a REMOVED slot we return the first one found + if (firstRemoved != -1) { + insertKeyAt(firstRemoved, val); + return firstRemoved; + } + + // Can a resizing strategy be found that resizes the set? + throw new IllegalStateException("No free or removed slots available. Key set full?!!"); + } + + void insertKeyAt(int index, int val) { + _set[index] = val; // insert value + _states[index] = FULL; + } + + protected int XinsertKey( int key ) { + int hash, probe, index, length; + + final byte[] states = _states; + final int[] set = _set; + length = states.length; + hash = HashFunctions.hash( key ) & 0x7fffffff; + index = hash % length; + byte state = states[index]; + + consumeFreeSlot = false; + + if ( state == FREE ) { + consumeFreeSlot = true; + set[index] = key; + states[index] = FULL; + + return index; // empty, all done + } else if ( state == FULL && set[index] == key ) { + return -index -1; // already stored + } else { // already FULL or REMOVED, must probe + // compute the double hash + probe = 1 + ( hash % ( length - 2 ) ); + + // if the slot we landed on is FULL (but not removed), probe + // until we find an empty slot, a REMOVED slot, or an element + // equal to the one we are trying to insert. + // finding an empty slot means that the value is not present + // and that we should use that slot as the insertion point; + // finding a REMOVED slot means that we need to keep searching, + // however we want to remember the offset of that REMOVED slot + // so we can reuse it in case a "new" insertion (i.e. not an update) + // is possible. + // finding a matching value means that we've found that our desired + // key is already in the table + + if ( state != REMOVED ) { + // starting at the natural offset, probe until we find an + // offset that isn't full. + do { + index -= probe; + if (index < 0) { + index += length; + } + state = states[index]; + } while ( state == FULL && set[index] != key ); + } + + // if the index we found was removed: continue probing until we + // locate a free location or an element which equal()s the + // one we have. + if ( state == REMOVED) { + int firstRemoved = index; + while ( state != FREE && ( state == REMOVED || set[index] != key ) ) { + index -= probe; + if (index < 0) { + index += length; + } + state = states[index]; + } + + if (state == FULL) { + return -index -1; + } else { + set[index] = key; + states[index] = FULL; + + return firstRemoved; + } + } + // if it's full, the key is already stored + if (state == FULL) { + return -index -1; + } else { + consumeFreeSlot = true; + set[index] = key; + states[index] = FULL; + + return index; + } + } + } + + + /** {@inheritDoc} */ + public void writeExternal( ObjectOutput out ) throws IOException { + // VERSION + out.writeByte( 0 ); + + // SUPER + super.writeExternal( out ); + + // NO_ENTRY_KEY + out.writeInt( no_entry_key ); + + // NO_ENTRY_VALUE + out.writeInt( no_entry_value ); + } + + + /** {@inheritDoc} */ + public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException { + // VERSION + in.readByte(); + + // SUPER + super.readExternal( in ); + + // NO_ENTRY_KEY + no_entry_key = in.readInt(); + + // NO_ENTRY_VALUE + no_entry_value = in.readInt(); + } +} // TIntIntHash diff --git a/src/gnu/trove/impl/hash/TObjectHash.java b/src/gnu/trove/impl/hash/TObjectHash.java new file mode 100644 index 00000000..8ae9a408 --- /dev/null +++ b/src/gnu/trove/impl/hash/TObjectHash.java @@ -0,0 +1,619 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.impl.hash; + +import gnu.trove.procedure.TObjectProcedure; + +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + + +/** + * An open addressed hashing implementation for Object types. + *

+ * Created: Sun Nov 4 08:56:06 2001 + * + * @author Eric D. Friedman + * @author Rob Eden + * @author Jeff Randall + * @version $Id: TObjectHash.java,v 1.1.2.6 2009/11/07 03:36:44 robeden Exp $ + */ +abstract public class TObjectHash extends THash { + + @SuppressWarnings({"UnusedDeclaration"}) + static final long serialVersionUID = -3461112548087185871L; + + + /** + * the set of Objects + */ + public transient Object[] _set; + + public static final Object REMOVED = new Object(), FREE = new Object(); + + /** + * Indicates whether the last insertKey() call used a FREE slot. This field + * should be inspected right after call insertKey() + */ + protected boolean consumeFreeSlot; + + + /** + * Creates a new TObjectHash instance with the + * default capacity and load factor. + */ + public TObjectHash() { + super(); + } + + + /** + * Creates a new TObjectHash instance whose capacity + * is the next highest prime above initialCapacity + 1 + * unless that value is already prime. + * + * @param initialCapacity an int value + */ + public TObjectHash(int initialCapacity) { + super(initialCapacity); + } + + + /** + * Creates a new TObjectHash instance with a prime + * value at or near the specified capacity and load factor. + * + * @param initialCapacity used to find a prime capacity for the table. + * @param loadFactor used to calculate the threshold over which + * rehashing takes place. + */ + public TObjectHash(int initialCapacity, float loadFactor) { + super(initialCapacity, loadFactor); + } + + + public int capacity() { + return _set.length; + } + + + protected void removeAt(int index) { + _set[index] = REMOVED; + super.removeAt(index); + } + + + /** + * initializes the Object set of this hash table. + * + * @param initialCapacity an int value + * @return an int value + */ + public int setUp(int initialCapacity) { + int capacity; + + capacity = super.setUp(initialCapacity); + _set = new Object[capacity]; + Arrays.fill(_set, FREE); + return capacity; + } + + + /** + * Executes procedure for each element in the set. + * + * @param procedure a TObjectProcedure value + * @return false if the loop over the set terminated because + * the procedure returned false for some value. + */ + @SuppressWarnings({"unchecked"}) + public boolean forEach(TObjectProcedure procedure) { + Object[] set = _set; + for (int i = set.length; i-- > 0;) { + if (set[i] != FREE + && set[i] != REMOVED + && !procedure.execute((T) set[i])) { + return false; + } + } + return true; + } + + + /** + * Searches the set for obj + * + * @param obj an Object value + * @return a boolean value + */ + @SuppressWarnings({"unchecked"}) + public boolean contains(Object obj) { + return index(obj) >= 0; + } + + + /** + * Locates the index of obj. + * + * @param obj an Object value + * @return the index of obj or -1 if it isn't in the set. + */ + protected int index(Object obj) { + if (obj == null) + return indexForNull(); + + // From here on we know obj to be non-null + final int hash = hash(obj) & 0x7fffffff; + int index = hash % _set.length; + Object cur = _set[index]; + + + if (cur == FREE) { + return -1; + } + + if (cur == obj || equals(obj, cur)) { + return index; + } + + return indexRehashed(obj, index, hash, cur); + } + + /** + * Locates the index of non-null obj. + * + * @param obj target key, know to be non-null + * @param index we start from + * @param hash + * @param cur + * @return + */ + private int indexRehashed(Object obj, int index, int hash, Object cur) { + final Object[] set = _set; + final int length = set.length; + + // NOTE: here it has to be REMOVED or FULL (some user-given value) + // see Knuth, p. 529 + int probe = 1 + (hash % (length - 2)); + + final int loopIndex = index; + + do { + index -= probe; + if (index < 0) { + index += length; + } + cur = set[index]; + // + if (cur == FREE) + return -1; + + // + if ((cur == obj || equals(obj, cur))) + return index; + } while (index != loopIndex); + + return -1; + } + + /** + * Locates the index null. + *

+ * null specific loop exploiting several properties to simplify the iteration logic + * - the null value hashes to 0 we so we can iterate from the beginning. + * - the probe value is 1 for this case + * - object identity can be used to match this case + *

+ * --> this result a simpler loop + * + * @return + */ + private int indexForNull() { + int index = 0; + for (Object o : _set) { + if (o == null) + return index; + + if (o == FREE) + return -1; + + index++; + } + + return -1; + } + + /** + * Alias introduced to avoid breaking the API. The new method name insertKey() reflects the + * changes made to the logic. + * + * @param obj + * @return + * @deprecated use {@link #insertKey} instead + */ + @Deprecated + protected int insertionIndex(T obj) { + return insertKey(obj); + } + + /** + * Locates the index at which key can be inserted. if + * there is already a value equal()ing key in the set, + * returns that value's index as -index - 1. + *

+ * If a slot is found the value is inserted. When a FREE slot is used the consumeFreeSlot field is + * set to true. This field should be used in the method invoking insertKey() to pass to postInsertHook() + * + * @param key an Object value + * @return the index of a FREE slot at which key can be inserted + * or, if key is already stored in the hash, the negative value of + * that index, minus 1: -index -1. + */ + protected int insertKey(T key) { + consumeFreeSlot = false; + + if (key == null) + return insertKeyForNull(); + + final int hash = hash(key) & 0x7fffffff; + int index = hash % _set.length; + Object cur = _set[index]; + + if (cur == FREE) { + consumeFreeSlot = true; + _set[index] = key; // insert value + return index; // empty, all done + } + + if (cur == key || equals(key, cur)) { + return -index - 1; // already stored + } + + return insertKeyRehash(key, index, hash, cur); + } + + /** + * Looks for a slot using double hashing for a non-null key values and inserts the value + * in the slot + * + * @param key non-null key value + * @param index natural index + * @param hash + * @param cur value of first matched slot + * @return + */ + private int insertKeyRehash(T key, int index, int hash, Object cur) { + final Object[] set = _set; + final int length = set.length; + // already FULL or REMOVED, must probe + // compute the double hash + final int probe = 1 + (hash % (length - 2)); + + final int loopIndex = index; + int firstRemoved = -1; + + /** + * Look until FREE slot or we start to loop + */ + do { + // Identify first removed slot + if (cur == REMOVED && firstRemoved == -1) + firstRemoved = index; + + index -= probe; + if (index < 0) { + index += length; + } + cur = set[index]; + + // A FREE slot stops the search + if (cur == FREE) { + if (firstRemoved != -1) { + _set[firstRemoved] = key; + return firstRemoved; + } else { + consumeFreeSlot = true; + _set[index] = key; // insert value + return index; + } + } + + if (cur == key || equals(key, cur)) { + return -index - 1; + } + + // Detect loop + } while (index != loopIndex); + + // We inspected all reachable slots and did not find a FREE one + // If we found a REMOVED slot we return the first one found + if (firstRemoved != -1) { + _set[firstRemoved] = key; + return firstRemoved; + } + + // Can a resizing strategy be found that resizes the set? + throw new IllegalStateException("No free or removed slots available. Key set full?!!"); + } + + /** + * Looks for a slot using double hashing for a null key value and inserts the value. + *

+ * null specific loop exploiting several properties to simplify the iteration logic + * - the null value hashes to 0 we so we can iterate from the beginning. + * - the probe value is 1 for this case + * - object identity can be used to match this case + * + * @return + */ + private int insertKeyForNull() { + int index = 0; + int firstRemoved = -1; + + // Look for a slot containing the 'null' value as key + for (Object o : _set) { + // Locate first removed + if (o == REMOVED && firstRemoved == -1) + firstRemoved = index; + + if (o == FREE) { + if (firstRemoved != -1) { + _set[firstRemoved] = null; + return firstRemoved; + } else { + consumeFreeSlot = true; + _set[index] = null; // insert value + return index; + } + } + + if (o == null) { + return -index - 1; + } + + index++; + } + + // We inspected all reachable slots and did not find a FREE one + // If we found a REMOVED slot we return the first one found + if (firstRemoved != -1) { + _set[firstRemoved] = null; + return firstRemoved; + } + + // We scanned the entire key set and found nothing, is set full? + // Can a resizing strategy be found that resizes the set? + throw new IllegalStateException("Could not find insertion index for null key. Key set full!?!!"); + } + + + /** + * Convenience methods for subclasses to use in throwing exceptions about + * badly behaved user objects employed as keys. We have to throw an + * IllegalArgumentException with a rather verbose message telling the + * user that they need to fix their object implementation to conform + * to the general contract for java.lang.Object. + * + * + * @param o1 the first of the equal elements with unequal hash codes. + * @param o2 the second of the equal elements with unequal hash codes. + * @throws IllegalArgumentException the whole point of this method. + */ + protected final void throwObjectContractViolation(Object o1, Object o2) + throws IllegalArgumentException { + throw buildObjectContractViolation(o1, o2, ""); + } + + /** + * Convenience methods for subclasses to use in throwing exceptions about + * badly behaved user objects employed as keys. We have to throw an + * IllegalArgumentException with a rather verbose message telling the + * user that they need to fix their object implementation to conform + * to the general contract for java.lang.Object. + * + * + * @param o1 the first of the equal elements with unequal hash codes. + * @param o2 the second of the equal elements with unequal hash codes. + * @param size + *@param oldSize + * @param oldKeys @throws IllegalArgumentException the whole point of this method. + */ + protected final void throwObjectContractViolation(Object o1, Object o2, int size, int oldSize, Object[] oldKeys) + throws IllegalArgumentException { + String extra = dumpExtraInfo(o1, o2, size(), oldSize, oldKeys); + + + throw buildObjectContractViolation(o1, o2, extra); + } + + /** + * Convenience methods for subclasses to use in throwing exceptions about + * badly behaved user objects employed as keys. We have to throw an + * IllegalArgumentException with a rather verbose message telling the + * user that they need to fix their object implementation to conform + * to the general contract for java.lang.Object. + * + * + * @param o1 the first of the equal elements with unequal hash codes. + * @param o2 the second of the equal elements with unequal hash codes. + * @throws IllegalArgumentException the whole point of this method. + */ + protected final IllegalArgumentException buildObjectContractViolation(Object o1, Object o2, String extra ) { + return new IllegalArgumentException("Equal objects must have equal hashcodes. " + + "During rehashing, Trove discovered that the following two objects claim " + + "to be equal (as in java.lang.Object.equals()) but their hashCodes (or " + + "those calculated by your TObjectHashingStrategy) are not equal." + + "This violates the general contract of java.lang.Object.hashCode(). See " + + "bullet point two in that method's documentation. object #1 =" + objectInfo(o1) + + "; object #2 =" + objectInfo(o2) + "\n" + extra); + } + + + protected boolean equals(Object notnull, Object two) { + if (two == null || two == REMOVED) + return false; + + return notnull.equals(two); + } + + protected int hash(Object notnull) { + return notnull.hashCode(); + } + + protected static String reportPotentialConcurrentMod(int newSize, int oldSize) { + // Note that we would not be able to detect concurrent paired of put()-remove() + // operations with this simple check + if (newSize != oldSize) + return "[Warning] apparent concurrent modification of the key set. " + + "Size before and after rehash() do not match " + oldSize + " vs " + newSize; + + return ""; + } + + /** + * + * @param newVal the key being inserted + * @param oldVal the key already stored at that position + * @param currentSize size of the key set during rehashing + * @param oldSize size of the key set before rehashing + * @param oldKeys the old key set + */ + protected String dumpExtraInfo(Object newVal, Object oldVal, int currentSize, int oldSize, Object[] oldKeys) { + StringBuilder b = new StringBuilder(); + // + b.append(dumpKeyTypes(newVal, oldVal)); + + b.append(reportPotentialConcurrentMod(currentSize, oldSize)); + b.append(detectKeyLoss(oldKeys, oldSize)); + + // Is de same object already present? Double insert? + if (newVal == oldVal) { + b.append("Inserting same object twice, rehashing bug. Object= ").append(oldVal); + } + + return b.toString(); + } + + /** + * Detect inconsistent hashCode() and/or equals() methods + * + * @param keys + * @param oldSize + * @return + */ + private static String detectKeyLoss(Object[] keys, int oldSize) { + StringBuilder buf = new StringBuilder(); + Set k = makeKeySet(keys); + if (k.size() != oldSize) { + buf.append("\nhashCode() and/or equals() have inconsistent implementation"); + buf.append("\nKey set lost entries, now got ").append(k.size()).append(" instead of ").append(oldSize); + buf.append(". This can manifest itself as an apparent duplicate key."); + } + + return buf.toString(); + } + + private static Set makeKeySet(Object[] keys) { + Set types = new HashSet(); + for (Object o : keys) { + if (o != FREE && o != REMOVED) { + types.add(o); + } + } + + return types; + } + + private static String equalsSymmetryInfo(Object a, Object b) { + StringBuilder buf = new StringBuilder(); + if (a == b) { + return "a == b"; + } + + if (a.getClass() != b.getClass()) { + buf.append("Class of objects differ a=").append(a.getClass()).append(" vs b=").append(b.getClass()); + + boolean aEb = a.equals(b); + boolean bEa = b.equals(a); + if (aEb != bEa) { + buf.append("\nequals() of a or b object are asymmetric"); + buf.append("\na.equals(b) =").append(aEb); + buf.append("\nb.equals(a) =").append(bEa); + } + } + + return buf.toString(); + } + + protected static String objectInfo(Object o) { + return (o == null ? "class null" : o.getClass()) + " id= " + System.identityHashCode(o) + + " hashCode= " + (o == null ? 0 : o.hashCode()) + " toString= " + String.valueOf(o); + } + + private String dumpKeyTypes(Object newVal, Object oldVal) { + StringBuilder buf = new StringBuilder(); + Set> types = new HashSet>(); + for (Object o : _set) { + if (o != FREE && o != REMOVED) { + if (o != null) + types.add(o.getClass()); + else + types.add(null); + } + } + + if (types.size() > 1) { + buf.append("\nMore than one type used for keys. Watch out for asymmetric equals(). " + + "Read about the 'Liskov substitution principle' and the implications for equals() in java."); + + buf.append("\nKey types: ").append(types); + buf.append(equalsSymmetryInfo(newVal, oldVal)); + } + + return buf.toString(); + } + + + @Override + public void writeExternal(ObjectOutput out) throws IOException { + // VERSION + out.writeByte(0); + + // SUPER + super.writeExternal(out); + } + + + @Override + public void readExternal(ObjectInput in) + throws IOException, ClassNotFoundException { + + // VERSION + in.readByte(); + + // SUPER + super.readExternal(in); + } +} // TObjectHash diff --git a/src/gnu/trove/impl/hash/TPrimitiveHash.java b/src/gnu/trove/impl/hash/TPrimitiveHash.java new file mode 100644 index 00000000..fb1fed95 --- /dev/null +++ b/src/gnu/trove/impl/hash/TPrimitiveHash.java @@ -0,0 +1,137 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.impl.hash; + +import gnu.trove.impl.HashFunctions; + + + +/** + * The base class for hashtables of primitive values. Since there is + * no notion of object equality for primitives, it isn't possible to + * use a `REMOVED' object to track deletions in an open-addressed table. + * So, we have to resort to using a parallel `bookkeeping' array of bytes, + * in which flags can be set to indicate that a particular slot in the + * hash table is FREE, FULL, or REMOVED. + * + * @author Eric D. Friedman, Rob Eden, Jeff Randall + * @version $Id: TPrimitiveHash.java,v 1.1.2.6 2010/03/01 23:39:07 robeden Exp $ + */ +abstract public class TPrimitiveHash extends THash { + @SuppressWarnings( { "UnusedDeclaration" } ) + static final long serialVersionUID = 1L; + + /** + * flags indicating whether each position in the hash is + * FREE, FULL, or REMOVED + */ + public transient byte[] _states; + + /* constants used for state flags */ + + /** flag indicating that a slot in the hashtable is available */ + public static final byte FREE = 0; + + /** flag indicating that a slot in the hashtable is occupied */ + public static final byte FULL = 1; + + /** + * flag indicating that the value of a slot in the hashtable + * was deleted + */ + public static final byte REMOVED = 2; + + + /** + * Creates a new THash instance with the default + * capacity and load factor. + */ + public TPrimitiveHash() { + super(); + } + + + /** + * Creates a new TPrimitiveHash instance with a prime + * capacity at or near the specified capacity and with the default + * load factor. + * + * @param initialCapacity an int value + */ + public TPrimitiveHash( int initialCapacity ) { + this( initialCapacity, DEFAULT_LOAD_FACTOR ); + } + + + /** + * Creates a new TPrimitiveHash instance with a prime + * capacity at or near the minimum needed to hold + * initialCapacity elements with load factor + * loadFactor without triggering a rehash. + * + * @param initialCapacity an int value + * @param loadFactor a float value + */ + public TPrimitiveHash( int initialCapacity, float loadFactor ) { + super(); + initialCapacity = Math.max( 1, initialCapacity ); + _loadFactor = loadFactor; + setUp( HashFunctions.fastCeil( initialCapacity / loadFactor ) ); + } + + + /** + * Returns the capacity of the hash table. This is the true + * physical capacity, without adjusting for the load factor. + * + * @return the physical capacity of the hash table. + */ + public int capacity() { + return _states.length; + } + + + /** + * Delete the record at index. + * + * @param index an int value + */ + protected void removeAt( int index ) { + _states[index] = REMOVED; + super.removeAt( index ); + } + + + /** + * initializes the hashtable to a prime capacity which is at least + * initialCapacity + 1. + * + * @param initialCapacity an int value + * @return the actual capacity chosen + */ + protected int setUp( int initialCapacity ) { + int capacity; + + capacity = super.setUp( initialCapacity ); + _states = new byte[capacity]; + return capacity; + } +} // TPrimitiveHash \ No newline at end of file diff --git a/src/gnu/trove/iterator/TAdvancingIterator.java b/src/gnu/trove/iterator/TAdvancingIterator.java new file mode 100644 index 00000000..86db71dd --- /dev/null +++ b/src/gnu/trove/iterator/TAdvancingIterator.java @@ -0,0 +1,31 @@ +// //////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// //////////////////////////////////////////////////////////////////////////// +package gnu.trove.iterator; + +/** + * Common interface for iterators that operate via the "advance" method for moving the + * cursor to the next element. + */ +public interface TAdvancingIterator extends TIterator { + /** + * Moves the iterator forward to the next entry. + * + * @throws java.util.NoSuchElementException if the iterator is already exhausted + */ + public void advance(); +} diff --git a/src/gnu/trove/iterator/TByteIterator.java b/src/gnu/trove/iterator/TByteIterator.java new file mode 100644 index 00000000..0b048596 --- /dev/null +++ b/src/gnu/trove/iterator/TByteIterator.java @@ -0,0 +1,38 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.iterator; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Iterator for byte collections. + */ +public interface TByteIterator extends TIterator { + /** + * Advances the iterator to the next element in the underlying collection + * and returns it. + * + * @return the next byte in the collection + * @exception NoSuchElementException if the iterator is already exhausted + */ + public byte next(); +} diff --git a/src/gnu/trove/iterator/TCharIterator.java b/src/gnu/trove/iterator/TCharIterator.java new file mode 100644 index 00000000..eb0891bb --- /dev/null +++ b/src/gnu/trove/iterator/TCharIterator.java @@ -0,0 +1,38 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.iterator; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Iterator for char collections. + */ +public interface TCharIterator extends TIterator { + /** + * Advances the iterator to the next element in the underlying collection + * and returns it. + * + * @return the next char in the collection + * @exception NoSuchElementException if the iterator is already exhausted + */ + public char next(); +} diff --git a/src/gnu/trove/iterator/TCharObjectIterator.java b/src/gnu/trove/iterator/TCharObjectIterator.java new file mode 100644 index 00000000..fafd555f --- /dev/null +++ b/src/gnu/trove/iterator/TCharObjectIterator.java @@ -0,0 +1,125 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.iterator; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Iterator for maps of type char and Object. + *

+ * The iterator semantics for Trove's primitive maps is slightly different + * from those defined in java.util.Iterator, but still well within + * the scope of the pattern, as defined by Gamma, et al. + *

+ * This iterator does not implicitly advance to the next entry when + * the value at the current position is retrieved. Rather, you must explicitly + * ask the iterator to advance() and then retrieve either the key(), + * the value() or both. This is done so that you have the option, but not + * the obligation, to retrieve keys and/or values as your application requires, and + * without introducing wrapper objects that would carry both. As the iteration is + * stateful, access to the key/value parts of the current map entry happens in + * constant time. + *

+ * In practice, the iterator is akin to a "search finger" that you move from + * position to position. Read or write operations affect the current entry only and + * do not assume responsibility for moving the finger. + *

+ * Here are some sample scenarios for this class of iterator: + *

+ *

+ * // accessing keys/values through an iterator:
+ * for ( TCharObjectIterator it = map.iterator(); it.hasNext(); ) {
+ *   it.advance();
+ *   if ( satisfiesCondition( it.key() ) ) {
+ *     doSomethingWithValue( it.value() );
+ *   }
+ * }
+ * 
+ *

+ *

+ * // modifying values in-place through iteration:
+ * for ( TCharObjectIterator it = map.iterator(); it.hasNext(); ) {
+ *   it.advance();
+ *   if ( satisfiesCondition( it.key() ) ) {
+ *     it.setValue( newValueForKey( it.key() ) );
+ *   }
+ * }
+ * 
+ *

+ *

+ * // deleting entries during iteration:
+ * for ( TCharObjectIterator it = map.iterator(); it.hasNext(); ) {
+ *   it.advance();
+ *   if ( satisfiesCondition( it.key() ) ) {
+ *     it.remove();
+ *   }
+ * }
+ * 
+ *

+ *

+ * // faster iteration by avoiding hasNext():
+ * TCharObjectIterator iterator = map.iterator();
+ * for ( int i = map.size(); i-- > 0; ) {
+ *   iterator.advance();
+ *   doSomethingWithKeyAndValue( iterator.key(), iterator.value() );
+ * }
+ * 
+ * + * @author Eric D. Friedman + * @author Rob Eden + * @author Jeff Randall + * @version $Id: _E_ObjectIterator.template,v 1.1.2.1 2009/09/15 02:38:31 upholderoftruth Exp $ + */ +public interface TCharObjectIterator extends TAdvancingIterator { + + /** + * Provides access to the key of the mapping at the iterator's position. + * Note that you must advance() the iterator at least once + * before invoking this method. + * + * @return the key of the entry at the iterator's current position. + */ + public char key(); + + + /** + * Provides access to the value of the mapping at the iterator's position. + * Note that you must advance() the iterator at least once + * before invoking this method. + * + * @return the value of the entry at the iterator's current position. + */ + public V value(); + + + /** + * Replace the value of the mapping at the iterator's position with the + * specified value. Note that you must advance() the iterator at + * least once before invoking this method. + * + * @param val the value to set in the current entry + * @return the old value of the entry. + */ + public V setValue( V val ); +} diff --git a/src/gnu/trove/iterator/TDoubleIterator.java b/src/gnu/trove/iterator/TDoubleIterator.java new file mode 100644 index 00000000..9c079f56 --- /dev/null +++ b/src/gnu/trove/iterator/TDoubleIterator.java @@ -0,0 +1,38 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.iterator; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Iterator for double collections. + */ +public interface TDoubleIterator extends TIterator { + /** + * Advances the iterator to the next element in the underlying collection + * and returns it. + * + * @return the next double in the collection + * @exception NoSuchElementException if the iterator is already exhausted + */ + public double next(); +} diff --git a/src/gnu/trove/iterator/TIntByteIterator.java b/src/gnu/trove/iterator/TIntByteIterator.java new file mode 100644 index 00000000..36e6e608 --- /dev/null +++ b/src/gnu/trove/iterator/TIntByteIterator.java @@ -0,0 +1,115 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.iterator; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Iterator for maps of type int and byte. + * + *

The iterator semantics for Trove's primitive maps is slightly different + * from those defined in java.util.Iterator, but still well within + * the scope of the pattern, as defined by Gamma, et al.

+ * + *

This iterator does not implicitly advance to the next entry when + * the value at the current position is retrieved. Rather, you must explicitly + * ask the iterator to advance() and then retrieve either the key(), + * the value() or both. This is done so that you have the option, but not + * the obligation, to retrieve keys and/or values as your application requires, and + * without introducing wrapper objects that would carry both. As the iteration is + * stateful, access to the key/value parts of the current map entry happens in + * constant time.

+ * + *

In practice, the iterator is akin to a "search finger" that you move from + * position to position. Read or write operations affect the current entry only and + * do not assume responsibility for moving the finger.

+ * + *

Here are some sample scenarios for this class of iterator:

+ * + *
+ * // accessing keys/values through an iterator:
+ * for ( TIntByteIterator it = map.iterator(); it.hasNext(); ) {
+ *   it.advance();
+ *   if ( satisfiesCondition( it.key() ) {
+ *     doSomethingWithValue( it.value() );
+ *   }
+ * }
+ * 
+ * + *
+ * // modifying values in-place through iteration:
+ * for ( TIntByteIterator it = map.iterator(); it.hasNext(); ) {
+ *   it.advance();
+ *   if ( satisfiesCondition( it.key() ) {
+ *     it.setValue( newValueForKey( it.key() ) );
+ *   }
+ * }
+ * 
+ * + *
+ * // deleting entries during iteration:
+ * for ( TIntByteIterator it = map.iterator(); it.hasNext(); ) {
+ *   it.advance();
+ *   if ( satisfiesCondition( it.key() ) {
+ *     it.remove();
+ *   }
+ * }
+ * 
+ * + *
+ * // faster iteration by avoiding hasNext():
+ * TIntByteIterator iterator = map.iterator();
+ * for ( int i = map.size(); i-- > 0; ) {
+ *   iterator.advance();
+ *   doSomethingWithKeyAndValue( iterator.key(), iterator.value() );
+ * }
+ * 
+ */ +public interface TIntByteIterator extends TAdvancingIterator { + /** + * Provides access to the key of the mapping at the iterator's position. + * Note that you must advance() the iterator at least once + * before invoking this method. + * + * @return the key of the entry at the iterator's current position. + */ + public int key(); + + /** + * Provides access to the value of the mapping at the iterator's position. + * Note that you must advance() the iterator at least once + * before invoking this method. + * + * @return the value of the entry at the iterator's current position. + */ + public byte value(); + + /** + * Replace the value of the mapping at the iterator's position with the + * specified value. Note that you must advance() the iterator at + * least once before invoking this method. + * + * @param val the value to set in the current entry + * @return the old value of the entry. + */ + public byte setValue( byte val ); +} diff --git a/src/gnu/trove/iterator/TIntIntIterator.java b/src/gnu/trove/iterator/TIntIntIterator.java new file mode 100644 index 00000000..531deb3d --- /dev/null +++ b/src/gnu/trove/iterator/TIntIntIterator.java @@ -0,0 +1,115 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.iterator; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Iterator for maps of type int and int. + * + *

The iterator semantics for Trove's primitive maps is slightly different + * from those defined in java.util.Iterator, but still well within + * the scope of the pattern, as defined by Gamma, et al.

+ * + *

This iterator does not implicitly advance to the next entry when + * the value at the current position is retrieved. Rather, you must explicitly + * ask the iterator to advance() and then retrieve either the key(), + * the value() or both. This is done so that you have the option, but not + * the obligation, to retrieve keys and/or values as your application requires, and + * without introducing wrapper objects that would carry both. As the iteration is + * stateful, access to the key/value parts of the current map entry happens in + * constant time.

+ * + *

In practice, the iterator is akin to a "search finger" that you move from + * position to position. Read or write operations affect the current entry only and + * do not assume responsibility for moving the finger.

+ * + *

Here are some sample scenarios for this class of iterator:

+ * + *
+ * // accessing keys/values through an iterator:
+ * for ( TIntIntIterator it = map.iterator(); it.hasNext(); ) {
+ *   it.advance();
+ *   if ( satisfiesCondition( it.key() ) {
+ *     doSomethingWithValue( it.value() );
+ *   }
+ * }
+ * 
+ * + *
+ * // modifying values in-place through iteration:
+ * for ( TIntIntIterator it = map.iterator(); it.hasNext(); ) {
+ *   it.advance();
+ *   if ( satisfiesCondition( it.key() ) {
+ *     it.setValue( newValueForKey( it.key() ) );
+ *   }
+ * }
+ * 
+ * + *
+ * // deleting entries during iteration:
+ * for ( TIntIntIterator it = map.iterator(); it.hasNext(); ) {
+ *   it.advance();
+ *   if ( satisfiesCondition( it.key() ) {
+ *     it.remove();
+ *   }
+ * }
+ * 
+ * + *
+ * // faster iteration by avoiding hasNext():
+ * TIntIntIterator iterator = map.iterator();
+ * for ( int i = map.size(); i-- > 0; ) {
+ *   iterator.advance();
+ *   doSomethingWithKeyAndValue( iterator.key(), iterator.value() );
+ * }
+ * 
+ */ +public interface TIntIntIterator extends TAdvancingIterator { + /** + * Provides access to the key of the mapping at the iterator's position. + * Note that you must advance() the iterator at least once + * before invoking this method. + * + * @return the key of the entry at the iterator's current position. + */ + public int key(); + + /** + * Provides access to the value of the mapping at the iterator's position. + * Note that you must advance() the iterator at least once + * before invoking this method. + * + * @return the value of the entry at the iterator's current position. + */ + public int value(); + + /** + * Replace the value of the mapping at the iterator's position with the + * specified value. Note that you must advance() the iterator at + * least once before invoking this method. + * + * @param val the value to set in the current entry + * @return the old value of the entry. + */ + public int setValue( int val ); +} diff --git a/src/gnu/trove/iterator/TIntIterator.java b/src/gnu/trove/iterator/TIntIterator.java new file mode 100644 index 00000000..3e1fdd2f --- /dev/null +++ b/src/gnu/trove/iterator/TIntIterator.java @@ -0,0 +1,38 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.iterator; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Iterator for int collections. + */ +public interface TIntIterator extends TIterator { + /** + * Advances the iterator to the next element in the underlying collection + * and returns it. + * + * @return the next int in the collection + * @exception NoSuchElementException if the iterator is already exhausted + */ + public int next(); +} diff --git a/src/gnu/trove/iterator/TIntObjectIterator.java b/src/gnu/trove/iterator/TIntObjectIterator.java new file mode 100644 index 00000000..cb41d34b --- /dev/null +++ b/src/gnu/trove/iterator/TIntObjectIterator.java @@ -0,0 +1,125 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.iterator; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Iterator for maps of type int and Object. + *

+ * The iterator semantics for Trove's primitive maps is slightly different + * from those defined in java.util.Iterator, but still well within + * the scope of the pattern, as defined by Gamma, et al. + *

+ * This iterator does not implicitly advance to the next entry when + * the value at the current position is retrieved. Rather, you must explicitly + * ask the iterator to advance() and then retrieve either the key(), + * the value() or both. This is done so that you have the option, but not + * the obligation, to retrieve keys and/or values as your application requires, and + * without introducing wrapper objects that would carry both. As the iteration is + * stateful, access to the key/value parts of the current map entry happens in + * constant time. + *

+ * In practice, the iterator is akin to a "search finger" that you move from + * position to position. Read or write operations affect the current entry only and + * do not assume responsibility for moving the finger. + *

+ * Here are some sample scenarios for this class of iterator: + *

+ *

+ * // accessing keys/values through an iterator:
+ * for ( TIntObjectIterator it = map.iterator(); it.hasNext(); ) {
+ *   it.advance();
+ *   if ( satisfiesCondition( it.key() ) ) {
+ *     doSomethingWithValue( it.value() );
+ *   }
+ * }
+ * 
+ *

+ *

+ * // modifying values in-place through iteration:
+ * for ( TIntObjectIterator it = map.iterator(); it.hasNext(); ) {
+ *   it.advance();
+ *   if ( satisfiesCondition( it.key() ) ) {
+ *     it.setValue( newValueForKey( it.key() ) );
+ *   }
+ * }
+ * 
+ *

+ *

+ * // deleting entries during iteration:
+ * for ( TIntObjectIterator it = map.iterator(); it.hasNext(); ) {
+ *   it.advance();
+ *   if ( satisfiesCondition( it.key() ) ) {
+ *     it.remove();
+ *   }
+ * }
+ * 
+ *

+ *

+ * // faster iteration by avoiding hasNext():
+ * TIntObjectIterator iterator = map.iterator();
+ * for ( int i = map.size(); i-- > 0; ) {
+ *   iterator.advance();
+ *   doSomethingWithKeyAndValue( iterator.key(), iterator.value() );
+ * }
+ * 
+ * + * @author Eric D. Friedman + * @author Rob Eden + * @author Jeff Randall + * @version $Id: _E_ObjectIterator.template,v 1.1.2.1 2009/09/15 02:38:31 upholderoftruth Exp $ + */ +public interface TIntObjectIterator extends TAdvancingIterator { + + /** + * Provides access to the key of the mapping at the iterator's position. + * Note that you must advance() the iterator at least once + * before invoking this method. + * + * @return the key of the entry at the iterator's current position. + */ + public int key(); + + + /** + * Provides access to the value of the mapping at the iterator's position. + * Note that you must advance() the iterator at least once + * before invoking this method. + * + * @return the value of the entry at the iterator's current position. + */ + public V value(); + + + /** + * Replace the value of the mapping at the iterator's position with the + * specified value. Note that you must advance() the iterator at + * least once before invoking this method. + * + * @param val the value to set in the current entry + * @return the old value of the entry. + */ + public V setValue( V val ); +} diff --git a/src/gnu/trove/iterator/TIterator.java b/src/gnu/trove/iterator/TIterator.java new file mode 100644 index 00000000..efdf22e9 --- /dev/null +++ b/src/gnu/trove/iterator/TIterator.java @@ -0,0 +1,37 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// +package gnu.trove.iterator; + +/** + * Common interface for all iterators used in Trove. + */ +public interface TIterator { + /** + * Returns true if the iterator can be advanced past its current location. + * + * @return a boolean value + */ + public boolean hasNext(); + + /** + * Removes the last entry returned by the iterator. The result of invoking this method + * more than once for a single entry is undefined and can leave the underlying data + * structure in a confused state. + */ + public void remove(); +} diff --git a/src/gnu/trove/iterator/TLongIterator.java b/src/gnu/trove/iterator/TLongIterator.java new file mode 100644 index 00000000..27985015 --- /dev/null +++ b/src/gnu/trove/iterator/TLongIterator.java @@ -0,0 +1,38 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.iterator; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Iterator for long collections. + */ +public interface TLongIterator extends TIterator { + /** + * Advances the iterator to the next element in the underlying collection + * and returns it. + * + * @return the next long in the collection + * @exception NoSuchElementException if the iterator is already exhausted + */ + public long next(); +} diff --git a/src/gnu/trove/iterator/TObjectDoubleIterator.java b/src/gnu/trove/iterator/TObjectDoubleIterator.java new file mode 100644 index 00000000..ccc43f13 --- /dev/null +++ b/src/gnu/trove/iterator/TObjectDoubleIterator.java @@ -0,0 +1,125 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.iterator; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Iterator for maps of type Object and double. + *

+ * The iterator semantics for Trove's primitive maps is slightly different + * from those defined in java.util.Iterator, but still well within + * the scope of the pattern, as defined by Gamma, et al. + *

+ * This iterator does not implicitly advance to the next entry when + * the value at the current position is retrieved. Rather, you must explicitly + * ask the iterator to advance() and then retrieve either the key(), + * the value() or both. This is done so that you have the option, but not + * the obligation, to retrieve keys and/or values as your application requires, and + * without introducing wrapper objects that would carry both. As the iteration is + * stateful, access to the key/value parts of the current map entry happens in + * constant time. + *

+ * In practice, the iterator is akin to a "search finger" that you move from + * position to position. Read or write operations affect the current entry only and + * do not assume responsibility for moving the finger. + *

+ * Here are some sample scenarios for this class of iterator: + *

+ *

+ * // accessing keys/values through an iterator:
+ * for ( TObjectDoubleIterator it = map.iterator(); it.hasNext(); ) {
+ *   it.advance();
+ *   if ( satisfiesCondition( it.key() ) ) {
+ *     doSomethingWithValue( it.value() );
+ *   }
+ * }
+ * 
+ *

+ *

+ * // modifying values in-place through iteration:
+ * for ( TObjectDoubleIterator it = map.iterator(); it.hasNext(); ) {
+ *   it.advance();
+ *   if ( satisfiesCondition( it.key() ) ) {
+ *     it.setValue( newValueForKey( it.key() ) );
+ *   }
+ * }
+ * 
+ *

+ *

+ * // deleting entries during iteration:
+ * for ( TObjectDoubleIterator it = map.iterator(); it.hasNext(); ) {
+ *   it.advance();
+ *   if ( satisfiesCondition( it.key() ) ) {
+ *     it.remove();
+ *   }
+ * }
+ * 
+ *

+ *

+ * // faster iteration by avoiding hasNext():
+ * TObjectDoubleIterator iterator = map.iterator();
+ * for ( int i = map.size(); i-- > 0; ) {
+ *   iterator.advance();
+ *   doSomethingWithKeyAndValue( iterator.key(), iterator.value() );
+ * }
+ * 
+ * + * @author Eric D. Friedman + * @author Rob Eden + * @author Jeff Randall + * @version $Id: Object_E_Iterator.template,v 1.1.2.1 2009/09/14 19:02:20 upholderoftruth Exp $ + */ +public interface TObjectDoubleIterator extends TAdvancingIterator { + + /** + * Provides access to the key of the mapping at the iterator's position. + * Note that you must advance() the iterator at least once + * before invoking this method. + * + * @return the key of the entry at the iterator's current position. + */ + public K key(); + + + /** + * Provides access to the value of the mapping at the iterator's position. + * Note that you must advance() the iterator at least once + * before invoking this method. + * + * @return the value of the entry at the iterator's current position. + */ + public double value(); + + + /** + * Replace the value of the mapping at the iterator's position with the + * specified value. Note that you must advance() the iterator at + * least once before invoking this method. + * + * @param val the value to set in the current entry + * @return the old value of the entry. + */ + public double setValue( double val ); +} diff --git a/src/gnu/trove/iterator/TObjectIntIterator.java b/src/gnu/trove/iterator/TObjectIntIterator.java new file mode 100644 index 00000000..48dd949b --- /dev/null +++ b/src/gnu/trove/iterator/TObjectIntIterator.java @@ -0,0 +1,125 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.iterator; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Iterator for maps of type Object and int. + *

+ * The iterator semantics for Trove's primitive maps is slightly different + * from those defined in java.util.Iterator, but still well within + * the scope of the pattern, as defined by Gamma, et al. + *

+ * This iterator does not implicitly advance to the next entry when + * the value at the current position is retrieved. Rather, you must explicitly + * ask the iterator to advance() and then retrieve either the key(), + * the value() or both. This is done so that you have the option, but not + * the obligation, to retrieve keys and/or values as your application requires, and + * without introducing wrapper objects that would carry both. As the iteration is + * stateful, access to the key/value parts of the current map entry happens in + * constant time. + *

+ * In practice, the iterator is akin to a "search finger" that you move from + * position to position. Read or write operations affect the current entry only and + * do not assume responsibility for moving the finger. + *

+ * Here are some sample scenarios for this class of iterator: + *

+ *

+ * // accessing keys/values through an iterator:
+ * for ( TObjectIntIterator it = map.iterator(); it.hasNext(); ) {
+ *   it.advance();
+ *   if ( satisfiesCondition( it.key() ) ) {
+ *     doSomethingWithValue( it.value() );
+ *   }
+ * }
+ * 
+ *

+ *

+ * // modifying values in-place through iteration:
+ * for ( TObjectIntIterator it = map.iterator(); it.hasNext(); ) {
+ *   it.advance();
+ *   if ( satisfiesCondition( it.key() ) ) {
+ *     it.setValue( newValueForKey( it.key() ) );
+ *   }
+ * }
+ * 
+ *

+ *

+ * // deleting entries during iteration:
+ * for ( TObjectIntIterator it = map.iterator(); it.hasNext(); ) {
+ *   it.advance();
+ *   if ( satisfiesCondition( it.key() ) ) {
+ *     it.remove();
+ *   }
+ * }
+ * 
+ *

+ *

+ * // faster iteration by avoiding hasNext():
+ * TObjectIntIterator iterator = map.iterator();
+ * for ( int i = map.size(); i-- > 0; ) {
+ *   iterator.advance();
+ *   doSomethingWithKeyAndValue( iterator.key(), iterator.value() );
+ * }
+ * 
+ * + * @author Eric D. Friedman + * @author Rob Eden + * @author Jeff Randall + * @version $Id: Object_E_Iterator.template,v 1.1.2.1 2009/09/14 19:02:20 upholderoftruth Exp $ + */ +public interface TObjectIntIterator extends TAdvancingIterator { + + /** + * Provides access to the key of the mapping at the iterator's position. + * Note that you must advance() the iterator at least once + * before invoking this method. + * + * @return the key of the entry at the iterator's current position. + */ + public K key(); + + + /** + * Provides access to the value of the mapping at the iterator's position. + * Note that you must advance() the iterator at least once + * before invoking this method. + * + * @return the value of the entry at the iterator's current position. + */ + public int value(); + + + /** + * Replace the value of the mapping at the iterator's position with the + * specified value. Note that you must advance() the iterator at + * least once before invoking this method. + * + * @param val the value to set in the current entry + * @return the old value of the entry. + */ + public int setValue( int val ); +} diff --git a/src/gnu/trove/iterator/TObjectLongIterator.java b/src/gnu/trove/iterator/TObjectLongIterator.java new file mode 100644 index 00000000..315b1e82 --- /dev/null +++ b/src/gnu/trove/iterator/TObjectLongIterator.java @@ -0,0 +1,125 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.iterator; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Iterator for maps of type Object and long. + *

+ * The iterator semantics for Trove's primitive maps is slightly different + * from those defined in java.util.Iterator, but still well within + * the scope of the pattern, as defined by Gamma, et al. + *

+ * This iterator does not implicitly advance to the next entry when + * the value at the current position is retrieved. Rather, you must explicitly + * ask the iterator to advance() and then retrieve either the key(), + * the value() or both. This is done so that you have the option, but not + * the obligation, to retrieve keys and/or values as your application requires, and + * without introducing wrapper objects that would carry both. As the iteration is + * stateful, access to the key/value parts of the current map entry happens in + * constant time. + *

+ * In practice, the iterator is akin to a "search finger" that you move from + * position to position. Read or write operations affect the current entry only and + * do not assume responsibility for moving the finger. + *

+ * Here are some sample scenarios for this class of iterator: + *

+ *

+ * // accessing keys/values through an iterator:
+ * for ( TObjectLongIterator it = map.iterator(); it.hasNext(); ) {
+ *   it.advance();
+ *   if ( satisfiesCondition( it.key() ) ) {
+ *     doSomethingWithValue( it.value() );
+ *   }
+ * }
+ * 
+ *

+ *

+ * // modifying values in-place through iteration:
+ * for ( TObjectLongIterator it = map.iterator(); it.hasNext(); ) {
+ *   it.advance();
+ *   if ( satisfiesCondition( it.key() ) ) {
+ *     it.setValue( newValueForKey( it.key() ) );
+ *   }
+ * }
+ * 
+ *

+ *

+ * // deleting entries during iteration:
+ * for ( TObjectLongIterator it = map.iterator(); it.hasNext(); ) {
+ *   it.advance();
+ *   if ( satisfiesCondition( it.key() ) ) {
+ *     it.remove();
+ *   }
+ * }
+ * 
+ *

+ *

+ * // faster iteration by avoiding hasNext():
+ * TObjectLongIterator iterator = map.iterator();
+ * for ( int i = map.size(); i-- > 0; ) {
+ *   iterator.advance();
+ *   doSomethingWithKeyAndValue( iterator.key(), iterator.value() );
+ * }
+ * 
+ * + * @author Eric D. Friedman + * @author Rob Eden + * @author Jeff Randall + * @version $Id: Object_E_Iterator.template,v 1.1.2.1 2009/09/14 19:02:20 upholderoftruth Exp $ + */ +public interface TObjectLongIterator extends TAdvancingIterator { + + /** + * Provides access to the key of the mapping at the iterator's position. + * Note that you must advance() the iterator at least once + * before invoking this method. + * + * @return the key of the entry at the iterator's current position. + */ + public K key(); + + + /** + * Provides access to the value of the mapping at the iterator's position. + * Note that you must advance() the iterator at least once + * before invoking this method. + * + * @return the value of the entry at the iterator's current position. + */ + public long value(); + + + /** + * Replace the value of the mapping at the iterator's position with the + * specified value. Note that you must advance() the iterator at + * least once before invoking this method. + * + * @param val the value to set in the current entry + * @return the old value of the entry. + */ + public long setValue( long val ); +} diff --git a/src/gnu/trove/iterator/TPrimitiveIterator.java b/src/gnu/trove/iterator/TPrimitiveIterator.java new file mode 100644 index 00000000..5693c3aa --- /dev/null +++ b/src/gnu/trove/iterator/TPrimitiveIterator.java @@ -0,0 +1,61 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.iterator; + +/** + * Implements all iterator functions for the hashed object set. + * Subclasses may override objectAtIndex to vary the object + * returned by calls to next() (e.g. for values, and Map.Entry + * objects). + *

+ *

Note that iteration is fastest if you forego the calls to + * hasNext in favor of checking the size of the structure + * yourself and then call next() that many times: + *

+ *

+ * Iterator i = collection.iterator();
+ * for (int size = collection.size(); size-- > 0;) {
+ *   Object o = i.next();
+ * }
+ * 
+ *

+ *

You may, of course, use the hasNext(), next() idiom too if + * you aren't in a performance critical spot.

+ */ +public interface TPrimitiveIterator extends TIterator { + /** + * Returns true if the iterator can be advanced past its current + * location. + * + * @return a boolean value + */ + public boolean hasNext(); + + + /** + * Removes the last entry returned by the iterator. + * Invoking this method more than once for a single entry + * will leave the underlying data structure in a confused + * state. + */ + public void remove(); + +} // TPrimitiveIterator diff --git a/src/gnu/trove/iterator/hash/TObjectHashIterator.java b/src/gnu/trove/iterator/hash/TObjectHashIterator.java new file mode 100644 index 00000000..3f47c551 --- /dev/null +++ b/src/gnu/trove/iterator/hash/TObjectHashIterator.java @@ -0,0 +1,57 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + + +package gnu.trove.iterator.hash; + +import gnu.trove.impl.hash.TObjectHash; +import gnu.trove.impl.hash.THashIterator; + + +/** + * Iterator for hashtables that use open addressing to resolve collisions. + * + * @author Eric D. Friedman + * @author Rob Eden + * @author Jeff Randall + * @version $Id: TObjectHashIterator.java,v 1.1.2.4 2009/10/09 01:44:34 robeden Exp $ + */ + +public class TObjectHashIterator extends THashIterator { + + protected final TObjectHash _objectHash; + + + public TObjectHashIterator( TObjectHash hash ) { + super( hash ); + _objectHash = hash; + } + + + @SuppressWarnings("unchecked") + protected E objectAtIndex( int index ) { + Object obj = _objectHash._set[index]; + if ( obj == TObjectHash.FREE || obj == TObjectHash.REMOVED ) { + return null; + } + return (E) obj; + } + +} // TObjectHashIterator diff --git a/src/gnu/trove/map/TCharObjectMap.java b/src/gnu/trove/map/TCharObjectMap.java new file mode 100644 index 00000000..3927bcca --- /dev/null +++ b/src/gnu/trove/map/TCharObjectMap.java @@ -0,0 +1,427 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.map; + +import gnu.trove.iterator.TCharObjectIterator; +import gnu.trove.procedure.TCharProcedure; +import gnu.trove.procedure.TObjectProcedure; +import gnu.trove.procedure.TCharObjectProcedure; +import gnu.trove.function.TObjectFunction; +import gnu.trove.set.TCharSet; + +import java.util.Collection; +import java.util.Map; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Interface for a primitive map of char keys and Object values. + */ +public interface TCharObjectMap { + +// Query Operations + + /** + * Returns the value that represents null in the {@link #keySet()}. + * The default value is generally zero, but can be changed during + * construction of the collection. + * + * @return the value that represents a null value in this collection. + */ + char getNoEntryKey(); + + + /** + * Returns the number of key-value mappings in this map. If the + * map contains more than Integer.MAX_VALUE elements, returns + * Integer.MAX_VALUE. + * + * @return the number of key-value mappings in this map + */ + int size(); + + + /** + * Returns true if this map contains no key-value mappings. + * + * @return true if this map contains no key-value mappings + */ + boolean isEmpty(); + + + /** + * Returns true if this map contains a mapping for the specified + * key. More formally, returns true if and only if + * this map contains a mapping for a key k such that + * key.equals(k). (There can be at most one such mapping.) + * + * @param key key whose presence in this map is to be tested + * @return true if this map contains a mapping for the specified + * key + * @throws ClassCastException if the key is of an inappropriate type for + * this map (optional) + * @throws NullPointerException if the specified key is null and this map + * does not permit null keys (optional) + */ + boolean containsKey( char key ); + + + /** + * Returns true if this map maps one or more keys to the + * specified value. More formally, returns true if and only if + * this map contains at least one mapping to a value v such that + * (value==null ? v==null : value.equals(v)). This operation + * will probably require time linear in the map size for most + * implementations of the Map interface. + * + * @param value value whose presence in this map is to be tested + * @return true if this map maps one or more keys to the + * specified value + * @throws ClassCastException if the value is of an inappropriate type for + * this map (optional) + * @throws NullPointerException if the specified value is null and this + * map does not permit null values (optional) + */ + boolean containsValue( Object value ); + + + /** + * Returns the value to which the specified key is mapped, + * or {@code null} if this map contains no mapping for the key. + * + *

More formally, if this map contains a mapping from a key + * {@code k} to a value {@code v} such that {@code (key==null ? k==null : + * key.equals(k))}, then this method returns {@code v}; otherwise + * it returns {@code null}. (There can be at most one such mapping.) + * + *

If this map permits null values, then a return value of + * {@code null} does not necessarily indicate that the map + * contains no mapping for the key; it's also possible that the map + * explicitly maps the key to {@code null}. The {@link #containsKey + * containsKey} operation may be used to distinguish these two cases. + * + * @param key the key whose associated value is to be returned + * @return the char value to which the specified key is mapped, or + * {@code null} if this map contains no mapping for the key + * @throws ClassCastException if the key is of an inappropriate type for + * this map (optional) + * @throws NullPointerException if the specified key is null and this map + * does not permit null keys (optional) + */ + V get( char key ); + + + // Modification Operations + + /** + * Associates the specified value with the specified key in this map + * (optional operation). If the map previously contained a mapping for + * the key, the old value is replaced by the specified value. (A map + * m is said to contain a mapping for a key k if and only + * if {@link #containsKey(char) m.containsKey(k)} would return + * true.) + * + * @param key key with which the specified value is to be associated + * @param value an char value value to be associated with the specified key + * @return the previous value associated with key, or + * no_entry_value if there was no mapping for key. + * (A no_entry_value return can also indicate that the map + * previously associated null with key, + * if the implementation supports null values.) + * @throws UnsupportedOperationException if the put operation + * is not supported by this map + * @throws ClassCastException if the class of the specified key or value + * prevents it from being stored in this map + * @throws NullPointerException if the specified key or value is null + * and this map does not permit null keys or values + * @throws IllegalArgumentException if some property of the specified key + * or value prevents it from being stored in this map + * @see #getNoEntryKey() + */ + V put( char key, V value); + + + /** + * Inserts a key/value pair into the map if the specified key is not already + * associated with a value. + * + * @param key key with which the specified value is to be associated + * @param value an char value to be associated with the specified key + * + * @return the previous value associated with key, or null + * if none was found. + */ + V putIfAbsent( char key, V value ); + + + /** + * Removes the mapping for a key from this map if it is present + * (optional operation). More formally, if this map contains a mapping + * from key k to value v such that + * key.equals(k), that mapping + * is removed. (The map can contain at most one such mapping.) + * + *

Returns the value to which this map previously associated the key, + * or null if the map contained no mapping for the key. + * + *

If this map permits null values, then a return value of + * null does not necessarily indicate that the map + * contained no mapping for the key; it's also possible that the map + * explicitly mapped the key to null. + * + *

The map will not contain a mapping for the specified key once the + * call returns. + * + * @param key key whose mapping is to be removed from the map + * @return the previous char value associated with key, or + * null if there was no mapping for key. + * @throws UnsupportedOperationException if the remove operation + * is not supported by this map + * @throws ClassCastException if the key is of an inappropriate type for + * this map (optional) + * @throws NullPointerException if the specified key is null and this + * map does not permit null keys (optional) + */ + V remove( char key ); + + + // Bulk Operations + + /** + * Copies all of the mappings from the specified map to this map + * (optional operation). The effect of this call is equivalent to that + * of calling {@link #put(char,Object) put(k, v)} on this map once + * for each mapping from key k to value v in the + * specified map. The behavior of this operation is undefined if the + * specified map is modified while the operation is in progress. + * + * @param m mappings to be stored in this map + * @throws UnsupportedOperationException if the putAll operation + * is not supported by this map + * @throws ClassCastException if the class of a key or value in the + * specified map prevents it from being stored in this map + * @throws NullPointerException if the specified map is null, or if + * this map does not permit null keys or values, and the + * specified map contains null keys or values + * @throws IllegalArgumentException if some property of a key or value in + * the specified map prevents it from being stored in this map + */ + void putAll( Map m); + + + /** + * Put all the entries from the given map into this map. + * + * @param map The map from which entries will be obtained to put into this map. + */ + void putAll( TCharObjectMap map ); + + + /** + * Removes all of the mappings from this map (optional operation). + * The map will be empty after this call returns. + * + * @throws UnsupportedOperationException if the clear operation + * is not supported by this map + */ + void clear(); + + + // Views + + /** + * Returns a {@link TCharSet} view of the keys contained in this map. + * The set is backed by the map, so changes to the map are + * reflected in the set, and vice-versa. If the map is modified + * while an iteration over the set is in progress (except through + * the iterator's own remove operation), the results of + * the iteration are undefined. The set supports element removal, + * which removes the corresponding mapping from the map, via the + * Iterator.remove, Set.remove, + * removeAll, retainAll, and clear + * operations. It does not support the add or addAll + * operations. + * + * @return a set view of the keys contained in this map + */ + TCharSet keySet(); + + + /** + * Returns a copy of the keys of the map as an array. + * Changes to the array of keys will not be reflected in the map + * nor vice-versa. + * + * @return a copy of the keys of the map as an array. + */ + char[] keys(); + + + /** + * Returns a copy of the keys of the map as an array. + * Changes to the array of keys will not be reflected in the map + * nor vice-versa. + * + * @param array the array into which the elements of the list are to be stored, + * if it is big enough; otherwise, a new array of the same type is + * allocated for this purpose. + * @return the keys of the map as an array. + */ + char[] keys( char[] array ); + + + + /** + * Returns a {@link Collection} view of the values contained in this map. + * The collection is backed by the map, so changes to the map are + * reflected in the collection, and vice-versa. If the map is + * modified while an iteration over the collection is in progress + * (except through the iterator's own remove operation), + * the results of the iteration are undefined. The collection + * supports element removal, which removes the corresponding + * mapping from the map, via the Iterator.remove, + * Collection.remove, removeAll, + * retainAll and clear operations. It does not + * support the add or addAll operations. + * + * @return a collection view of the values contained in this map + */ + Collection valueCollection(); + + + /** + * Returns the values of the map as an Object array. Note that the array returned + * is typed as an Object[] and may not be cast to a more specific type. See + * {@link #values(V[])} for a version which allows specifically typed arrays. + * Changes to the array of values will not be reflected in the map + * nor vice-versa. + * + * @return the values of the map as an array of char values. + */ + Object[] values(); + + + /** + * Returns the values of the map using an existing array. + * Changes to the array of values will not be reflected in the map + * nor vice-versa. + * + * @param array the array into which the elements of the list are to be stored, + * if it is big enough; otherwise, a new array of the same type is + * allocated for this purpose. + * @return the values of the map as an array of char values. + */ + V[] values( V[] array ); + + + /** + * Returns a TCharObjectIterator with access to this map's keys and values. + * + * @return a TCharObjectIterator with access to this map's keys and values. + */ + public TCharObjectIterator iterator(); + + + /** + * Executes procedure for each key in the map. + * + * @param procedure a TObjectProcedure value + * @return false if the loop over the keys terminated because + * the procedure returned false for some key. + */ + public boolean forEachKey( TCharProcedure procedure ); + + + /** + * Executes procedure for each value in the map. + * + * @param procedure a TObjectProcedure value + * @return false if the loop over the values terminated because + * the procedure returned false for some value. + */ + public boolean forEachValue( TObjectProcedure procedure ); + + + /** + * Executes procedure for each key/value entry in the + * map. + * + * @param procedure a TCharObjectProcedure value + * @return false if the loop over the entries terminated because + * the procedure returned false for some entry. + */ + public boolean forEachEntry( TCharObjectProcedure procedure ); + + + /** + * Transform the values in this map using function. + * + * @param function a TObjectFunction value + */ + public void transformValues( TObjectFunction function ); + + + /** + * Retains only those entries in the map for which the procedure + * returns a true value. + * + * @param procedure determines which entries to keep + * @return true if the map was modified. + */ + public boolean retainEntries( TCharObjectProcedure procedure ); + + + // Comparison and hashing + + /** + * Compares the specified object with this map for equality. Returns + * true if the given object is also a map and the two maps + * represent the same mappings. More formally, two maps m1 and + * m2 represent the same mappings if + * m1.entrySet().equals(m2.entrySet()). This ensures that the + * equals method works properly across different implementations + * of the Map interface. + * + * @param o object to be compared for equality with this map + * @return true if the specified object is equal to this map + */ + boolean equals( Object o ); + + + /** + * Returns the hash code value for this map. The hash code of a map is + * defined to be the sum of the hash codes of each entry in the map's + * entrySet() view. This ensures that m1.equals(m2) + * implies that m1.hashCode()==m2.hashCode() for any two maps + * m1 and m2, as required by the general contract of + * {@link Object#hashCode}. + * + * @return the hash code value for this map + + * @see Object#equals(Object) + * @see #equals(Object) + */ + int hashCode(); +} diff --git a/src/gnu/trove/map/TIntByteMap.java b/src/gnu/trove/map/TIntByteMap.java new file mode 100644 index 00000000..63806e00 --- /dev/null +++ b/src/gnu/trove/map/TIntByteMap.java @@ -0,0 +1,302 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.map; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + +import gnu.trove.function.*; +import gnu.trove.iterator.*; +import gnu.trove.procedure.*; +import gnu.trove.set.*; +import gnu.trove.TByteCollection; + +import java.util.Map; +import java.io.Serializable; + + +/** + * Interface for a primitive map of int keys and byte values. + */ +public interface TIntByteMap { + /** + * Returns the value that will be returned from {@link #get} or {@link #put} if no + * entry exists for a given key. The default value is generally zero, but can be + * changed during construction of the collection. + * + * @return the value that represents a null key in this collection. + */ + public int getNoEntryKey(); + + + /** + * Returns the value that will be returned from {@link #get} or {@link #put} if no + * entry exists for a given key. The default value is generally zero, but can be + * changed during construction of the collection. + * + * @return the value that represents a null value in this collection. + */ + public byte getNoEntryValue(); + + + /** + * Inserts a key/value pair into the map. + * + * @param key an int value + * @param value an byte value + * + * @return the previous value associated with key, or the "no entry" value + * if none was found (see {@link #getNoEntryValue}). + */ + public byte put( int key, byte value ); + + + /** + * Inserts a key/value pair into the map if the specified key is not already + * associated with a value. + * + * @param key an int value + * @param value an byte value + * + * @return the previous value associated with key, or the "no entry" value + * if none was found (see {@link #getNoEntryValue}). + */ + public byte putIfAbsent( int key, byte value ); + + + /** + * Put all the entries from the given Map into this map. + * + * @param map The Map from which entries will be obtained to put into this map. + */ + public void putAll( Map map ); + + + /** + * Put all the entries from the given map into this map. + * + * @param map The map from which entries will be obtained to put into this map. + */ + public void putAll( TIntByteMap map ); + + + /** + * Retrieves the value for key + * + * @param key an int value + * + * @return the previous value associated with key, or the "no entry" value + * if none was found (see {@link #getNoEntryValue}). + */ + public byte get( int key ); + + + /** + * Empties the map. + */ + public void clear(); + + + /** + * Returns true if this map contains no key-value mappings. + * + * @return true if this map contains no key-value mappings + */ + public boolean isEmpty(); + + + /** + * Deletes a key/value pair from the map. + * + * @param key an int value + * + * @return the previous value associated with key, or the "no entry" value + * if none was found (see {@link #getNoEntryValue}). + */ + public byte remove( int key ); + + + /** + * Returns an int value that is the number of elements in the map. + * + * @return an int value that is the number of elements in the map. + */ + public int size(); + + + /** + * Returns the keys of the map as a TIntSet + * + * @return the keys of the map as a TIntSet + */ + public TIntSet keySet(); + + + /** + * Returns the keys of the map as an array of int values. + * + * @return the keys of the map as an array of int values. + */ + public int[] keys(); + + + /** + * Returns the keys of the map. + * + * @param array the array into which the elements of the list are to be stored, + * if it is big enough; otherwise, a new array of the same type is + * allocated for this purpose. + * @return the keys of the map as an array. + */ + public int[] keys( int[] array ); + + + /** + * Returns the values of the map as a TByteCollection + * + * @return the values of the map as a TByteCollection + */ + public TByteCollection valueCollection(); + + + /** + * Returns the values of the map as an array of #e# values. + * + * @return the values of the map as an array of #e# values. + */ + public byte[] values(); + + + /** + * Returns the values of the map using an existing array. + * + * @param array the array into which the elements of the list are to be stored, + * if it is big enough; otherwise, a new array of the same type is + * allocated for this purpose. + * @return the values of the map as an array of #e# values. + */ + public byte[] values( byte[] array ); + + + /** + * Checks for the presence of val in the values of the map. + * + * @param val an byte value + * @return a boolean value + */ + public boolean containsValue( byte val ); + + + /** + * Checks for the present of key in the keys of the map. + * + * @param key an int value + * @return a boolean value + */ + public boolean containsKey( int key ); + + + /** + * @return a TIntByteIterator with access to this map's keys and values + */ + public TIntByteIterator iterator(); + + + /** + * Executes procedure for each key in the map. + * + * @param procedure a TIntProcedure value + * @return false if the loop over the keys terminated because + * the procedure returned false for some key. + */ + public boolean forEachKey( TIntProcedure procedure ); + + + /** + * Executes procedure for each value in the map. + * + * @param procedure a T#F#Procedure value + * @return false if the loop over the values terminated because + * the procedure returned false for some value. + */ + public boolean forEachValue( TByteProcedure procedure ); + + + /** + * Executes procedure for each key/value entry in the + * map. + * + * @param procedure a TOIntByteProcedure value + * @return false if the loop over the entries terminated because + * the procedure returned false for some entry. + */ + public boolean forEachEntry( TIntByteProcedure procedure ); + + + /** + * Transform the values in this map using function. + * + * @param function a TByteFunction value + */ + public void transformValues( TByteFunction function ); + + + /** + * Retains only those entries in the map for which the procedure + * returns a true value. + * + * @param procedure determines which entries to keep + * @return true if the map was modified. + */ + public boolean retainEntries( TIntByteProcedure procedure ); + + + /** + * Increments the primitive value mapped to key by 1 + * + * @param key the key of the value to increment + * @return true if a mapping was found and modified. + */ + public boolean increment( int key ); + + + /** + * Adjusts the primitive value mapped to key. + * + * @param key the key of the value to increment + * @param amount the amount to adjust the value by. + * @return true if a mapping was found and modified. + */ + public boolean adjustValue( int key, byte amount ); + + + /** + * Adjusts the primitive value mapped to the key if the key is present in the map. + * Otherwise, the initial_value is put in the map. + * + * @param key the key of the value to increment + * @param adjust_amount the amount to adjust the value by + * @param put_amount the value put into the map if the key is not initial present + * + * @return the value present in the map after the adjustment or put operation + */ + public byte adjustOrPutValue( int key, byte adjust_amount, byte put_amount ); +} diff --git a/src/gnu/trove/map/TIntIntMap.java b/src/gnu/trove/map/TIntIntMap.java new file mode 100644 index 00000000..79a05945 --- /dev/null +++ b/src/gnu/trove/map/TIntIntMap.java @@ -0,0 +1,302 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.map; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + +import gnu.trove.function.*; +import gnu.trove.iterator.*; +import gnu.trove.procedure.*; +import gnu.trove.set.*; +import gnu.trove.TIntCollection; + +import java.util.Map; +import java.io.Serializable; + + +/** + * Interface for a primitive map of int keys and int values. + */ +public interface TIntIntMap { + /** + * Returns the value that will be returned from {@link #get} or {@link #put} if no + * entry exists for a given key. The default value is generally zero, but can be + * changed during construction of the collection. + * + * @return the value that represents a null key in this collection. + */ + public int getNoEntryKey(); + + + /** + * Returns the value that will be returned from {@link #get} or {@link #put} if no + * entry exists for a given key. The default value is generally zero, but can be + * changed during construction of the collection. + * + * @return the value that represents a null value in this collection. + */ + public int getNoEntryValue(); + + + /** + * Inserts a key/value pair into the map. + * + * @param key an int value + * @param value an int value + * + * @return the previous value associated with key, or the "no entry" value + * if none was found (see {@link #getNoEntryValue}). + */ + public int put( int key, int value ); + + + /** + * Inserts a key/value pair into the map if the specified key is not already + * associated with a value. + * + * @param key an int value + * @param value an int value + * + * @return the previous value associated with key, or the "no entry" value + * if none was found (see {@link #getNoEntryValue}). + */ + public int putIfAbsent( int key, int value ); + + + /** + * Put all the entries from the given Map into this map. + * + * @param map The Map from which entries will be obtained to put into this map. + */ + public void putAll( Map map ); + + + /** + * Put all the entries from the given map into this map. + * + * @param map The map from which entries will be obtained to put into this map. + */ + public void putAll( TIntIntMap map ); + + + /** + * Retrieves the value for key + * + * @param key an int value + * + * @return the previous value associated with key, or the "no entry" value + * if none was found (see {@link #getNoEntryValue}). + */ + public int get( int key ); + + + /** + * Empties the map. + */ + public void clear(); + + + /** + * Returns true if this map contains no key-value mappings. + * + * @return true if this map contains no key-value mappings + */ + public boolean isEmpty(); + + + /** + * Deletes a key/value pair from the map. + * + * @param key an int value + * + * @return the previous value associated with key, or the "no entry" value + * if none was found (see {@link #getNoEntryValue}). + */ + public int remove( int key ); + + + /** + * Returns an int value that is the number of elements in the map. + * + * @return an int value that is the number of elements in the map. + */ + public int size(); + + + /** + * Returns the keys of the map as a TIntSet + * + * @return the keys of the map as a TIntSet + */ + public TIntSet keySet(); + + + /** + * Returns the keys of the map as an array of int values. + * + * @return the keys of the map as an array of int values. + */ + public int[] keys(); + + + /** + * Returns the keys of the map. + * + * @param array the array into which the elements of the list are to be stored, + * if it is big enough; otherwise, a new array of the same type is + * allocated for this purpose. + * @return the keys of the map as an array. + */ + public int[] keys( int[] array ); + + + /** + * Returns the values of the map as a TIntCollection + * + * @return the values of the map as a TIntCollection + */ + public TIntCollection valueCollection(); + + + /** + * Returns the values of the map as an array of #e# values. + * + * @return the values of the map as an array of #e# values. + */ + public int[] values(); + + + /** + * Returns the values of the map using an existing array. + * + * @param array the array into which the elements of the list are to be stored, + * if it is big enough; otherwise, a new array of the same type is + * allocated for this purpose. + * @return the values of the map as an array of #e# values. + */ + public int[] values( int[] array ); + + + /** + * Checks for the presence of val in the values of the map. + * + * @param val an int value + * @return a boolean value + */ + public boolean containsValue( int val ); + + + /** + * Checks for the present of key in the keys of the map. + * + * @param key an int value + * @return a boolean value + */ + public boolean containsKey( int key ); + + + /** + * @return a TIntIntIterator with access to this map's keys and values + */ + public TIntIntIterator iterator(); + + + /** + * Executes procedure for each key in the map. + * + * @param procedure a TIntProcedure value + * @return false if the loop over the keys terminated because + * the procedure returned false for some key. + */ + public boolean forEachKey( TIntProcedure procedure ); + + + /** + * Executes procedure for each value in the map. + * + * @param procedure a T#F#Procedure value + * @return false if the loop over the values terminated because + * the procedure returned false for some value. + */ + public boolean forEachValue( TIntProcedure procedure ); + + + /** + * Executes procedure for each key/value entry in the + * map. + * + * @param procedure a TOIntIntProcedure value + * @return false if the loop over the entries terminated because + * the procedure returned false for some entry. + */ + public boolean forEachEntry( TIntIntProcedure procedure ); + + + /** + * Transform the values in this map using function. + * + * @param function a TIntFunction value + */ + public void transformValues( TIntFunction function ); + + + /** + * Retains only those entries in the map for which the procedure + * returns a true value. + * + * @param procedure determines which entries to keep + * @return true if the map was modified. + */ + public boolean retainEntries( TIntIntProcedure procedure ); + + + /** + * Increments the primitive value mapped to key by 1 + * + * @param key the key of the value to increment + * @return true if a mapping was found and modified. + */ + public boolean increment( int key ); + + + /** + * Adjusts the primitive value mapped to key. + * + * @param key the key of the value to increment + * @param amount the amount to adjust the value by. + * @return true if a mapping was found and modified. + */ + public boolean adjustValue( int key, int amount ); + + + /** + * Adjusts the primitive value mapped to the key if the key is present in the map. + * Otherwise, the initial_value is put in the map. + * + * @param key the key of the value to increment + * @param adjust_amount the amount to adjust the value by + * @param put_amount the value put into the map if the key is not initial present + * + * @return the value present in the map after the adjustment or put operation + */ + public int adjustOrPutValue( int key, int adjust_amount, int put_amount ); +} diff --git a/src/gnu/trove/map/TIntObjectMap.java b/src/gnu/trove/map/TIntObjectMap.java new file mode 100644 index 00000000..94bb3530 --- /dev/null +++ b/src/gnu/trove/map/TIntObjectMap.java @@ -0,0 +1,427 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.map; + +import gnu.trove.iterator.TIntObjectIterator; +import gnu.trove.procedure.TIntProcedure; +import gnu.trove.procedure.TObjectProcedure; +import gnu.trove.procedure.TIntObjectProcedure; +import gnu.trove.function.TObjectFunction; +import gnu.trove.set.TIntSet; + +import java.util.Collection; +import java.util.Map; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Interface for a primitive map of int keys and Object values. + */ +public interface TIntObjectMap { + +// Query Operations + + /** + * Returns the value that represents null in the {@link #keySet()}. + * The default value is generally zero, but can be changed during + * construction of the collection. + * + * @return the value that represents a null value in this collection. + */ + int getNoEntryKey(); + + + /** + * Returns the number of key-value mappings in this map. If the + * map contains more than Integer.MAX_VALUE elements, returns + * Integer.MAX_VALUE. + * + * @return the number of key-value mappings in this map + */ + int size(); + + + /** + * Returns true if this map contains no key-value mappings. + * + * @return true if this map contains no key-value mappings + */ + boolean isEmpty(); + + + /** + * Returns true if this map contains a mapping for the specified + * key. More formally, returns true if and only if + * this map contains a mapping for a key k such that + * key.equals(k). (There can be at most one such mapping.) + * + * @param key key whose presence in this map is to be tested + * @return true if this map contains a mapping for the specified + * key + * @throws ClassCastException if the key is of an inappropriate type for + * this map (optional) + * @throws NullPointerException if the specified key is null and this map + * does not permit null keys (optional) + */ + boolean containsKey( int key ); + + + /** + * Returns true if this map maps one or more keys to the + * specified value. More formally, returns true if and only if + * this map contains at least one mapping to a value v such that + * (value==null ? v==null : value.equals(v)). This operation + * will probably require time linear in the map size for most + * implementations of the Map interface. + * + * @param value value whose presence in this map is to be tested + * @return true if this map maps one or more keys to the + * specified value + * @throws ClassCastException if the value is of an inappropriate type for + * this map (optional) + * @throws NullPointerException if the specified value is null and this + * map does not permit null values (optional) + */ + boolean containsValue( Object value ); + + + /** + * Returns the value to which the specified key is mapped, + * or {@code null} if this map contains no mapping for the key. + * + *

More formally, if this map contains a mapping from a key + * {@code k} to a value {@code v} such that {@code (key==null ? k==null : + * key.equals(k))}, then this method returns {@code v}; otherwise + * it returns {@code null}. (There can be at most one such mapping.) + * + *

If this map permits null values, then a return value of + * {@code null} does not necessarily indicate that the map + * contains no mapping for the key; it's also possible that the map + * explicitly maps the key to {@code null}. The {@link #containsKey + * containsKey} operation may be used to distinguish these two cases. + * + * @param key the key whose associated value is to be returned + * @return the int value to which the specified key is mapped, or + * {@code null} if this map contains no mapping for the key + * @throws ClassCastException if the key is of an inappropriate type for + * this map (optional) + * @throws NullPointerException if the specified key is null and this map + * does not permit null keys (optional) + */ + V get( int key ); + + + // Modification Operations + + /** + * Associates the specified value with the specified key in this map + * (optional operation). If the map previously contained a mapping for + * the key, the old value is replaced by the specified value. (A map + * m is said to contain a mapping for a key k if and only + * if {@link #containsKey(int) m.containsKey(k)} would return + * true.) + * + * @param key key with which the specified value is to be associated + * @param value an int value value to be associated with the specified key + * @return the previous value associated with key, or + * no_entry_value if there was no mapping for key. + * (A no_entry_value return can also indicate that the map + * previously associated null with key, + * if the implementation supports null values.) + * @throws UnsupportedOperationException if the put operation + * is not supported by this map + * @throws ClassCastException if the class of the specified key or value + * prevents it from being stored in this map + * @throws NullPointerException if the specified key or value is null + * and this map does not permit null keys or values + * @throws IllegalArgumentException if some property of the specified key + * or value prevents it from being stored in this map + * @see #getNoEntryKey() + */ + V put( int key, V value); + + + /** + * Inserts a key/value pair into the map if the specified key is not already + * associated with a value. + * + * @param key key with which the specified value is to be associated + * @param value an int value to be associated with the specified key + * + * @return the previous value associated with key, or null + * if none was found. + */ + V putIfAbsent( int key, V value ); + + + /** + * Removes the mapping for a key from this map if it is present + * (optional operation). More formally, if this map contains a mapping + * from key k to value v such that + * key.equals(k), that mapping + * is removed. (The map can contain at most one such mapping.) + * + *

Returns the value to which this map previously associated the key, + * or null if the map contained no mapping for the key. + * + *

If this map permits null values, then a return value of + * null does not necessarily indicate that the map + * contained no mapping for the key; it's also possible that the map + * explicitly mapped the key to null. + * + *

The map will not contain a mapping for the specified key once the + * call returns. + * + * @param key key whose mapping is to be removed from the map + * @return the previous int value associated with key, or + * null if there was no mapping for key. + * @throws UnsupportedOperationException if the remove operation + * is not supported by this map + * @throws ClassCastException if the key is of an inappropriate type for + * this map (optional) + * @throws NullPointerException if the specified key is null and this + * map does not permit null keys (optional) + */ + V remove( int key ); + + + // Bulk Operations + + /** + * Copies all of the mappings from the specified map to this map + * (optional operation). The effect of this call is equivalent to that + * of calling {@link #put(int,Object) put(k, v)} on this map once + * for each mapping from key k to value v in the + * specified map. The behavior of this operation is undefined if the + * specified map is modified while the operation is in progress. + * + * @param m mappings to be stored in this map + * @throws UnsupportedOperationException if the putAll operation + * is not supported by this map + * @throws ClassCastException if the class of a key or value in the + * specified map prevents it from being stored in this map + * @throws NullPointerException if the specified map is null, or if + * this map does not permit null keys or values, and the + * specified map contains null keys or values + * @throws IllegalArgumentException if some property of a key or value in + * the specified map prevents it from being stored in this map + */ + void putAll( Map m); + + + /** + * Put all the entries from the given map into this map. + * + * @param map The map from which entries will be obtained to put into this map. + */ + void putAll( TIntObjectMap map ); + + + /** + * Removes all of the mappings from this map (optional operation). + * The map will be empty after this call returns. + * + * @throws UnsupportedOperationException if the clear operation + * is not supported by this map + */ + void clear(); + + + // Views + + /** + * Returns a {@link TIntSet} view of the keys contained in this map. + * The set is backed by the map, so changes to the map are + * reflected in the set, and vice-versa. If the map is modified + * while an iteration over the set is in progress (except through + * the iterator's own remove operation), the results of + * the iteration are undefined. The set supports element removal, + * which removes the corresponding mapping from the map, via the + * Iterator.remove, Set.remove, + * removeAll, retainAll, and clear + * operations. It does not support the add or addAll + * operations. + * + * @return a set view of the keys contained in this map + */ + TIntSet keySet(); + + + /** + * Returns a copy of the keys of the map as an array. + * Changes to the array of keys will not be reflected in the map + * nor vice-versa. + * + * @return a copy of the keys of the map as an array. + */ + int[] keys(); + + + /** + * Returns a copy of the keys of the map as an array. + * Changes to the array of keys will not be reflected in the map + * nor vice-versa. + * + * @param array the array into which the elements of the list are to be stored, + * if it is big enough; otherwise, a new array of the same type is + * allocated for this purpose. + * @return the keys of the map as an array. + */ + int[] keys( int[] array ); + + + + /** + * Returns a {@link Collection} view of the values contained in this map. + * The collection is backed by the map, so changes to the map are + * reflected in the collection, and vice-versa. If the map is + * modified while an iteration over the collection is in progress + * (except through the iterator's own remove operation), + * the results of the iteration are undefined. The collection + * supports element removal, which removes the corresponding + * mapping from the map, via the Iterator.remove, + * Collection.remove, removeAll, + * retainAll and clear operations. It does not + * support the add or addAll operations. + * + * @return a collection view of the values contained in this map + */ + Collection valueCollection(); + + + /** + * Returns the values of the map as an Object array. Note that the array returned + * is typed as an Object[] and may not be cast to a more specific type. See + * {@link #values(V[])} for a version which allows specifically typed arrays. + * Changes to the array of values will not be reflected in the map + * nor vice-versa. + * + * @return the values of the map as an array of int values. + */ + Object[] values(); + + + /** + * Returns the values of the map using an existing array. + * Changes to the array of values will not be reflected in the map + * nor vice-versa. + * + * @param array the array into which the elements of the list are to be stored, + * if it is big enough; otherwise, a new array of the same type is + * allocated for this purpose. + * @return the values of the map as an array of int values. + */ + V[] values( V[] array ); + + + /** + * Returns a TIntObjectIterator with access to this map's keys and values. + * + * @return a TIntObjectIterator with access to this map's keys and values. + */ + public TIntObjectIterator iterator(); + + + /** + * Executes procedure for each key in the map. + * + * @param procedure a TObjectProcedure value + * @return false if the loop over the keys terminated because + * the procedure returned false for some key. + */ + public boolean forEachKey( TIntProcedure procedure ); + + + /** + * Executes procedure for each value in the map. + * + * @param procedure a TObjectProcedure value + * @return false if the loop over the values terminated because + * the procedure returned false for some value. + */ + public boolean forEachValue( TObjectProcedure procedure ); + + + /** + * Executes procedure for each key/value entry in the + * map. + * + * @param procedure a TIntObjectProcedure value + * @return false if the loop over the entries terminated because + * the procedure returned false for some entry. + */ + public boolean forEachEntry( TIntObjectProcedure procedure ); + + + /** + * Transform the values in this map using function. + * + * @param function a TObjectFunction value + */ + public void transformValues( TObjectFunction function ); + + + /** + * Retains only those entries in the map for which the procedure + * returns a true value. + * + * @param procedure determines which entries to keep + * @return true if the map was modified. + */ + public boolean retainEntries( TIntObjectProcedure procedure ); + + + // Comparison and hashing + + /** + * Compares the specified object with this map for equality. Returns + * true if the given object is also a map and the two maps + * represent the same mappings. More formally, two maps m1 and + * m2 represent the same mappings if + * m1.entrySet().equals(m2.entrySet()). This ensures that the + * equals method works properly across different implementations + * of the Map interface. + * + * @param o object to be compared for equality with this map + * @return true if the specified object is equal to this map + */ + boolean equals( Object o ); + + + /** + * Returns the hash code value for this map. The hash code of a map is + * defined to be the sum of the hash codes of each entry in the map's + * entrySet() view. This ensures that m1.equals(m2) + * implies that m1.hashCode()==m2.hashCode() for any two maps + * m1 and m2, as required by the general contract of + * {@link Object#hashCode}. + * + * @return the hash code value for this map + + * @see Object#equals(Object) + * @see #equals(Object) + */ + int hashCode(); +} diff --git a/src/gnu/trove/map/TObjectDoubleMap.java b/src/gnu/trove/map/TObjectDoubleMap.java new file mode 100644 index 00000000..59059c58 --- /dev/null +++ b/src/gnu/trove/map/TObjectDoubleMap.java @@ -0,0 +1,460 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.map; + +import gnu.trove.TDoubleCollection; +import gnu.trove.function.TDoubleFunction; +import gnu.trove.procedure.TObjectProcedure; +import gnu.trove.procedure.TDoubleProcedure; +import gnu.trove.procedure.TObjectDoubleProcedure; +import gnu.trove.iterator.TObjectDoubleIterator; + +import java.util.Map; +import java.util.Set; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Interface for a primitive map of Object keys and double values. + */ +public interface TObjectDoubleMap { + + // Query Operations + + /** + * Returns the value that will be returned from {@link #get} or {@link #put} if no + * entry exists for a given key. The default value is generally zero, but can be + * changed during construction of the collection. + * + * @return the value that represents a null value in this collection. + */ + double getNoEntryValue(); + + + /** + * Returns the number of key-value mappings in this map. If the + * map contains more than Integer.MAX_VALUE elements, returns + * Integer.MAX_VALUE. + * + * @return the number of key-value mappings in this map + */ + int size(); + + + /** + * Returns true if this map contains no key-value mappings. + * + * @return true if this map contains no key-value mappings + */ + boolean isEmpty(); + + + /** + * Returns true if this map contains a mapping for the specified + * key. More formally, returns true if and only if + * this map contains a mapping for a key k such that + * (key==null ? k==null : key.equals(k)). (There can be + * at most one such mapping.) + * + * @param key key whose presence in this map is to be tested + * @return true if this map contains a mapping for the specified + * key + * @throws ClassCastException if the key is of an inappropriate type for + * this map (optional) + * @throws NullPointerException if the specified key is null and this map + * does not permit null keys (optional) + */ + boolean containsKey( Object key ); + + + /** + * Returns true if this map maps one or more keys to the + * specified value. More formally, returns true if and only if + * this map contains at least one mapping to a value v such that + * (value==no_entry_value ? v==no_entry_value : value.equals(v)). This operation + * will probably require time linear in the map size for most + * implementations of the Map interface. + *

+ * Note that no_entry_value is the result of {@link #getNoEntryValue()} and represents + * null for this map instance. + * + * @param value double value whose presence in this map is to be tested + * @return true if this map maps one or more keys to the + * specified value + * @throws ClassCastException if the value is of an inappropriate type for + * this map (optional) + * @throws NullPointerException if the specified value is null and this + * map does not permit null values (optional) + */ + boolean containsValue( double value ); + + + /** + * Returns the value to which the specified key is mapped, + * or {@code null} if this map contains no mapping for the key. + * + *

More formally, if this map contains a mapping from a key + * {@code k} to a value {@code v} such that {@code (key==null ? k==null : + * key.equals(k))}, then this method returns {@code v}; otherwise + * it returns {@code null}. (There can be at most one such mapping.) + * + *

If this map permits null values, then a return value of + * {@code null} does not necessarily indicate that the map + * contains no mapping for the key; it's also possible that the map + * explicitly maps the key to {@code null}. The {@link #containsKey + * containsKey} operation may be used to distinguish these two cases. + * + * @param key the key whose associated value is to be returned + * @return the double value to which the specified key is mapped, or + * {@code null} if this map contains no mapping for the key + * @throws ClassCastException if the key is of an inappropriate type for + * this map (optional) + * @throws NullPointerException if the specified key is null and this map + * does not permit null keys (optional) + */ + double get( Object key ); + + + // Modification Operations + + /** + * Associates the specified value with the specified key in this map + * (optional operation). If the map previously contained a mapping for + * the key, the old value is replaced by the specified value. (A map + * m is said to contain a mapping for a key k if and only + * if {@link #containsKey(Object) m.containsKey(k)} would return + * true.) + * + * @param key key with which the specified value is to be associated + * @param value an double value value to be associated with the specified key + * @return the previous value associated with key, or + * no_entry_value if there was no mapping for key. + * (A no_entry_value return can also indicate that the map + * previously associated null with key, + * if the implementation supports null values.) + * @throws UnsupportedOperationException if the put operation + * is not supported by this map + * @throws ClassCastException if the class of the specified key or value + * prevents it from being stored in this map + * @throws NullPointerException if the specified key or value is null + * and this map does not permit null keys or values + * @throws IllegalArgumentException if some property of the specified key + * or value prevents it from being stored in this map + * @see #getNoEntryValue() + */ + double put( K key, double value); + + + /** + * Inserts a key/value pair into the map if the specified key is not already + * associated with a value. + * + * @param key key with which the specified value is to be associated + * @param value an double value to be associated with the specified key + * + * @return the previous value associated with key, or the "no entry" value + * if none was found (see {@link #getNoEntryValue}). + */ + double putIfAbsent( K key, double value ); + + + /** + * Removes the mapping for a key from this map if it is present + * (optional operation). More formally, if this map contains a mapping + * from key k to value v such that + * (key==null ? k==null : key.equals(k)), that mapping + * is removed. (The map can contain at most one such mapping.) + * + *

Returns the value to which this map previously associated the key, + * or null if the map contained no mapping for the key. + * + *

If this map permits null values, then a return value of + * null does not necessarily indicate that the map + * contained no mapping for the key; it's also possible that the map + * explicitly mapped the key to null. + * + *

The map will not contain a mapping for the specified key once the + * call returns. + * + * @param key key whose mapping is to be removed from the map + * @return the previous double value associated with key, or + * null if there was no mapping for key. + * @throws UnsupportedOperationException if the remove operation + * is not supported by this map + * @throws ClassCastException if the key is of an inappropriate type for + * this map (optional) + * @throws NullPointerException if the specified key is null and this + * map does not permit null keys (optional) + */ + double remove( Object key ); + + + // Bulk Operations + + /** + * Copies all of the mappings from the specified map to this map + * (optional operation). The effect of this call is equivalent to that + * of calling {@link #put(Object,double) put(k, v)} on this map once + * for each mapping from key k to value v in the + * specified map. The behavior of this operation is undefined if the + * specified map is modified while the operation is in progress. + * + * @param m mappings to be stored in this map + * @throws UnsupportedOperationException if the putAll operation + * is not supported by this map + * @throws ClassCastException if the class of a key or value in the + * specified map prevents it from being stored in this map + * @throws NullPointerException if the specified map is null, or if + * this map does not permit null keys or values, and the + * specified map contains null keys or values + * @throws IllegalArgumentException if some property of a key or value in + * the specified map prevents it from being stored in this map + */ + void putAll( Map m); + + + /** + * Put all the entries from the given map into this map. + * + * @param map The map from which entries will be obtained to put into this map. + */ + void putAll( TObjectDoubleMap map ); + + + /** + * Removes all of the mappings from this map (optional operation). + * The map will be empty after this call returns. + * + * @throws UnsupportedOperationException if the clear operation + * is not supported by this map + */ + void clear(); + + + // Views + + /** + * Returns a {@link Set} view of the keys contained in this map. + * The set is backed by the map, so changes to the map are + * reflected in the set, and vice-versa. If the map is modified + * while an iteration over the set is in progress (except through + * the iterator's own remove operation), the results of + * the iteration are undefined. The set supports element removal, + * which removes the corresponding mapping from the map, via the + * Iterator.remove, Set.remove, + * removeAll, retainAll, and clear + * operations. It does not support the add or addAll + * operations. + * + * @return a set view of the keys contained in this map + */ + Set keySet(); + + + /** + * Returns a copy of the keys of the map as an array. + * Changes to the array of keys will not be reflected in the map + * nor vice-versa. + * + * @return a copy of the keys of the map as an array. + */ + Object[] keys(); + + + /** + * Returns a copy of the keys of the map as an array. + * Changes to the array of keys will not be reflected in the map + * nor vice-versa. + * + * @param array the array into which the elements of the list are to be stored, + * if it is big enough; otherwise, a new array of the same type is + * allocated for this purpose. + * @return the keys of the map as an array. + */ + K[] keys( K[] array ); + + + + /** + * Returns a {@link TDoubleCollection} view of the values contained in this map. + * The collection is backed by the map, so changes to the map are + * reflected in the collection, and vice-versa. If the map is + * modified while an iteration over the collection is in progress + * (except through the iterator's own remove operation), + * the results of the iteration are undefined. The collection + * supports element removal, which removes the corresponding + * mapping from the map, via the TDoubleIterator.remove, + * TDoubleCollection.remove, removeAll, + * retainAll and clear operations. It does not + * support the add or addAll operations. + * + * @return a collection view of the values contained in this map + */ + TDoubleCollection valueCollection(); + + + /** + * Returns the values of the map as an array of double values. + * Changes to the array of values will not be reflected in the map + * nor vice-versa. + * + * @return the values of the map as an array of double values. + */ + double[] values(); + + + /** + * Returns the values of the map using an existing array. + * Changes to the array of values will not be reflected in the map + * nor vice-versa. + * + * @param array the array into which the elements of the list are to be stored, + * if it is big enough; otherwise, a new array of the same type is + * allocated for this purpose. + * @return the values of the map as an array of double values. + */ + double[] values( double[] array ); + + + /** + * Returns a TObjectDoubleIterator with access to this map's keys and values. + * + * @return a TObjectDoubleIterator with access to this map's keys and values. + */ + public TObjectDoubleIterator iterator(); + + + /** + * Increments the primitive value mapped to key by 1 + * + * @param key the key of the value to increment + * @return true if a mapping was found and modified. + */ + public boolean increment( K key ); + + + /** + * Adjusts the primitive value mapped to key. + * + * @param key the key of the value to increment + * @param amount the amount to adjust the value by. + * @return true if a mapping was found and modified. + */ + public boolean adjustValue( K key, double amount ); + + + /** + * Adjusts the primitive value mapped to the key if the key is present in the map. + * Otherwise, the initial_value is put in the map. + * + * @param key the key of the value to increment + * @param adjust_amount the amount to adjust the value by + * @param put_amount the value put into the map if the key is not initial present + * + * @return the value present in the map after the adjustment or put operation + */ + public double adjustOrPutValue( K key, double adjust_amount, double put_amount ); + + + /** + * Executes procedure for each key in the map. + * + * @param procedure a TObjectProcedure value + * @return false if the loop over the keys terminated because + * the procedure returned false for some key. + */ + public boolean forEachKey( TObjectProcedure procedure ); + + + /** + * Executes procedure for each value in the map. + * + * @param procedure a TDoubleProcedure value + * @return false if the loop over the values terminated because + * the procedure returned false for some value. + */ + public boolean forEachValue( TDoubleProcedure procedure ); + + + /** + * Executes procedure for each key/value entry in the + * map. + * + * @param procedure a TOObjectDoubleProcedure value + * @return false if the loop over the entries terminated because + * the procedure returned false for some entry. + */ + public boolean forEachEntry( TObjectDoubleProcedure procedure ); + + + /** + * Transform the values in this map using function. + * + * @param function a TDoubleFunction value + */ + public void transformValues( TDoubleFunction function ); + + + /** + * Retains only those entries in the map for which the procedure + * returns a true value. + * + * @param procedure determines which entries to keep + * @return true if the map was modified. + */ + public boolean retainEntries( TObjectDoubleProcedure procedure ); + + + // Comparison and hashing + + /** + * Compares the specified object with this map for equality. Returns + * true if the given object is also a map and the two maps + * represent the same mappings. More formally, two maps m1 and + * m2 represent the same mappings if + * m1.entrySet().equals(m2.entrySet()). This ensures that the + * equals method works properly across different implementations + * of the Map interface. + * + * @param o object to be compared for equality with this map + * @return true if the specified object is equal to this map + */ + boolean equals( Object o ); + + /** + * Returns the hash code value for this map. The hash code of a map is + * defined to be the sum of the hash codes of each entry in the map's + * entrySet() view. This ensures that m1.equals(m2) + * implies that m1.hashCode()==m2.hashCode() for any two maps + * m1 and m2, as required by the general contract of + * {@link Object#hashCode}. + * + * @return the hash code value for this map + + * @see Object#equals(Object) + * @see #equals(Object) + */ + int hashCode(); +} diff --git a/src/gnu/trove/map/TObjectIntMap.java b/src/gnu/trove/map/TObjectIntMap.java new file mode 100644 index 00000000..fa093f3e --- /dev/null +++ b/src/gnu/trove/map/TObjectIntMap.java @@ -0,0 +1,460 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.map; + +import gnu.trove.TIntCollection; +import gnu.trove.function.TIntFunction; +import gnu.trove.procedure.TObjectProcedure; +import gnu.trove.procedure.TIntProcedure; +import gnu.trove.procedure.TObjectIntProcedure; +import gnu.trove.iterator.TObjectIntIterator; + +import java.util.Map; +import java.util.Set; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Interface for a primitive map of Object keys and int values. + */ +public interface TObjectIntMap { + + // Query Operations + + /** + * Returns the value that will be returned from {@link #get} or {@link #put} if no + * entry exists for a given key. The default value is generally zero, but can be + * changed during construction of the collection. + * + * @return the value that represents a null value in this collection. + */ + int getNoEntryValue(); + + + /** + * Returns the number of key-value mappings in this map. If the + * map contains more than Integer.MAX_VALUE elements, returns + * Integer.MAX_VALUE. + * + * @return the number of key-value mappings in this map + */ + int size(); + + + /** + * Returns true if this map contains no key-value mappings. + * + * @return true if this map contains no key-value mappings + */ + boolean isEmpty(); + + + /** + * Returns true if this map contains a mapping for the specified + * key. More formally, returns true if and only if + * this map contains a mapping for a key k such that + * (key==null ? k==null : key.equals(k)). (There can be + * at most one such mapping.) + * + * @param key key whose presence in this map is to be tested + * @return true if this map contains a mapping for the specified + * key + * @throws ClassCastException if the key is of an inappropriate type for + * this map (optional) + * @throws NullPointerException if the specified key is null and this map + * does not permit null keys (optional) + */ + boolean containsKey( Object key ); + + + /** + * Returns true if this map maps one or more keys to the + * specified value. More formally, returns true if and only if + * this map contains at least one mapping to a value v such that + * (value==no_entry_value ? v==no_entry_value : value.equals(v)). This operation + * will probably require time linear in the map size for most + * implementations of the Map interface. + *

+ * Note that no_entry_value is the result of {@link #getNoEntryValue()} and represents + * null for this map instance. + * + * @param value int value whose presence in this map is to be tested + * @return true if this map maps one or more keys to the + * specified value + * @throws ClassCastException if the value is of an inappropriate type for + * this map (optional) + * @throws NullPointerException if the specified value is null and this + * map does not permit null values (optional) + */ + boolean containsValue( int value ); + + + /** + * Returns the value to which the specified key is mapped, + * or {@code null} if this map contains no mapping for the key. + * + *

More formally, if this map contains a mapping from a key + * {@code k} to a value {@code v} such that {@code (key==null ? k==null : + * key.equals(k))}, then this method returns {@code v}; otherwise + * it returns {@code null}. (There can be at most one such mapping.) + * + *

If this map permits null values, then a return value of + * {@code null} does not necessarily indicate that the map + * contains no mapping for the key; it's also possible that the map + * explicitly maps the key to {@code null}. The {@link #containsKey + * containsKey} operation may be used to distinguish these two cases. + * + * @param key the key whose associated value is to be returned + * @return the int value to which the specified key is mapped, or + * {@code null} if this map contains no mapping for the key + * @throws ClassCastException if the key is of an inappropriate type for + * this map (optional) + * @throws NullPointerException if the specified key is null and this map + * does not permit null keys (optional) + */ + int get( Object key ); + + + // Modification Operations + + /** + * Associates the specified value with the specified key in this map + * (optional operation). If the map previously contained a mapping for + * the key, the old value is replaced by the specified value. (A map + * m is said to contain a mapping for a key k if and only + * if {@link #containsKey(Object) m.containsKey(k)} would return + * true.) + * + * @param key key with which the specified value is to be associated + * @param value an int value value to be associated with the specified key + * @return the previous value associated with key, or + * no_entry_value if there was no mapping for key. + * (A no_entry_value return can also indicate that the map + * previously associated null with key, + * if the implementation supports null values.) + * @throws UnsupportedOperationException if the put operation + * is not supported by this map + * @throws ClassCastException if the class of the specified key or value + * prevents it from being stored in this map + * @throws NullPointerException if the specified key or value is null + * and this map does not permit null keys or values + * @throws IllegalArgumentException if some property of the specified key + * or value prevents it from being stored in this map + * @see #getNoEntryValue() + */ + int put( K key, int value); + + + /** + * Inserts a key/value pair into the map if the specified key is not already + * associated with a value. + * + * @param key key with which the specified value is to be associated + * @param value an int value to be associated with the specified key + * + * @return the previous value associated with key, or the "no entry" value + * if none was found (see {@link #getNoEntryValue}). + */ + int putIfAbsent( K key, int value ); + + + /** + * Removes the mapping for a key from this map if it is present + * (optional operation). More formally, if this map contains a mapping + * from key k to value v such that + * (key==null ? k==null : key.equals(k)), that mapping + * is removed. (The map can contain at most one such mapping.) + * + *

Returns the value to which this map previously associated the key, + * or null if the map contained no mapping for the key. + * + *

If this map permits null values, then a return value of + * null does not necessarily indicate that the map + * contained no mapping for the key; it's also possible that the map + * explicitly mapped the key to null. + * + *

The map will not contain a mapping for the specified key once the + * call returns. + * + * @param key key whose mapping is to be removed from the map + * @return the previous int value associated with key, or + * null if there was no mapping for key. + * @throws UnsupportedOperationException if the remove operation + * is not supported by this map + * @throws ClassCastException if the key is of an inappropriate type for + * this map (optional) + * @throws NullPointerException if the specified key is null and this + * map does not permit null keys (optional) + */ + int remove( Object key ); + + + // Bulk Operations + + /** + * Copies all of the mappings from the specified map to this map + * (optional operation). The effect of this call is equivalent to that + * of calling {@link #put(Object,int) put(k, v)} on this map once + * for each mapping from key k to value v in the + * specified map. The behavior of this operation is undefined if the + * specified map is modified while the operation is in progress. + * + * @param m mappings to be stored in this map + * @throws UnsupportedOperationException if the putAll operation + * is not supported by this map + * @throws ClassCastException if the class of a key or value in the + * specified map prevents it from being stored in this map + * @throws NullPointerException if the specified map is null, or if + * this map does not permit null keys or values, and the + * specified map contains null keys or values + * @throws IllegalArgumentException if some property of a key or value in + * the specified map prevents it from being stored in this map + */ + void putAll( Map m); + + + /** + * Put all the entries from the given map into this map. + * + * @param map The map from which entries will be obtained to put into this map. + */ + void putAll( TObjectIntMap map ); + + + /** + * Removes all of the mappings from this map (optional operation). + * The map will be empty after this call returns. + * + * @throws UnsupportedOperationException if the clear operation + * is not supported by this map + */ + void clear(); + + + // Views + + /** + * Returns a {@link Set} view of the keys contained in this map. + * The set is backed by the map, so changes to the map are + * reflected in the set, and vice-versa. If the map is modified + * while an iteration over the set is in progress (except through + * the iterator's own remove operation), the results of + * the iteration are undefined. The set supports element removal, + * which removes the corresponding mapping from the map, via the + * Iterator.remove, Set.remove, + * removeAll, retainAll, and clear + * operations. It does not support the add or addAll + * operations. + * + * @return a set view of the keys contained in this map + */ + Set keySet(); + + + /** + * Returns a copy of the keys of the map as an array. + * Changes to the array of keys will not be reflected in the map + * nor vice-versa. + * + * @return a copy of the keys of the map as an array. + */ + Object[] keys(); + + + /** + * Returns a copy of the keys of the map as an array. + * Changes to the array of keys will not be reflected in the map + * nor vice-versa. + * + * @param array the array into which the elements of the list are to be stored, + * if it is big enough; otherwise, a new array of the same type is + * allocated for this purpose. + * @return the keys of the map as an array. + */ + K[] keys( K[] array ); + + + + /** + * Returns a {@link TIntCollection} view of the values contained in this map. + * The collection is backed by the map, so changes to the map are + * reflected in the collection, and vice-versa. If the map is + * modified while an iteration over the collection is in progress + * (except through the iterator's own remove operation), + * the results of the iteration are undefined. The collection + * supports element removal, which removes the corresponding + * mapping from the map, via the TIntIterator.remove, + * TIntCollection.remove, removeAll, + * retainAll and clear operations. It does not + * support the add or addAll operations. + * + * @return a collection view of the values contained in this map + */ + TIntCollection valueCollection(); + + + /** + * Returns the values of the map as an array of int values. + * Changes to the array of values will not be reflected in the map + * nor vice-versa. + * + * @return the values of the map as an array of int values. + */ + int[] values(); + + + /** + * Returns the values of the map using an existing array. + * Changes to the array of values will not be reflected in the map + * nor vice-versa. + * + * @param array the array into which the elements of the list are to be stored, + * if it is big enough; otherwise, a new array of the same type is + * allocated for this purpose. + * @return the values of the map as an array of int values. + */ + int[] values( int[] array ); + + + /** + * Returns a TObjectIntIterator with access to this map's keys and values. + * + * @return a TObjectIntIterator with access to this map's keys and values. + */ + public TObjectIntIterator iterator(); + + + /** + * Increments the primitive value mapped to key by 1 + * + * @param key the key of the value to increment + * @return true if a mapping was found and modified. + */ + public boolean increment( K key ); + + + /** + * Adjusts the primitive value mapped to key. + * + * @param key the key of the value to increment + * @param amount the amount to adjust the value by. + * @return true if a mapping was found and modified. + */ + public boolean adjustValue( K key, int amount ); + + + /** + * Adjusts the primitive value mapped to the key if the key is present in the map. + * Otherwise, the initial_value is put in the map. + * + * @param key the key of the value to increment + * @param adjust_amount the amount to adjust the value by + * @param put_amount the value put into the map if the key is not initial present + * + * @return the value present in the map after the adjustment or put operation + */ + public int adjustOrPutValue( K key, int adjust_amount, int put_amount ); + + + /** + * Executes procedure for each key in the map. + * + * @param procedure a TObjectProcedure value + * @return false if the loop over the keys terminated because + * the procedure returned false for some key. + */ + public boolean forEachKey( TObjectProcedure procedure ); + + + /** + * Executes procedure for each value in the map. + * + * @param procedure a TIntProcedure value + * @return false if the loop over the values terminated because + * the procedure returned false for some value. + */ + public boolean forEachValue( TIntProcedure procedure ); + + + /** + * Executes procedure for each key/value entry in the + * map. + * + * @param procedure a TOObjectIntProcedure value + * @return false if the loop over the entries terminated because + * the procedure returned false for some entry. + */ + public boolean forEachEntry( TObjectIntProcedure procedure ); + + + /** + * Transform the values in this map using function. + * + * @param function a TIntFunction value + */ + public void transformValues( TIntFunction function ); + + + /** + * Retains only those entries in the map for which the procedure + * returns a true value. + * + * @param procedure determines which entries to keep + * @return true if the map was modified. + */ + public boolean retainEntries( TObjectIntProcedure procedure ); + + + // Comparison and hashing + + /** + * Compares the specified object with this map for equality. Returns + * true if the given object is also a map and the two maps + * represent the same mappings. More formally, two maps m1 and + * m2 represent the same mappings if + * m1.entrySet().equals(m2.entrySet()). This ensures that the + * equals method works properly across different implementations + * of the Map interface. + * + * @param o object to be compared for equality with this map + * @return true if the specified object is equal to this map + */ + boolean equals( Object o ); + + /** + * Returns the hash code value for this map. The hash code of a map is + * defined to be the sum of the hash codes of each entry in the map's + * entrySet() view. This ensures that m1.equals(m2) + * implies that m1.hashCode()==m2.hashCode() for any two maps + * m1 and m2, as required by the general contract of + * {@link Object#hashCode}. + * + * @return the hash code value for this map + + * @see Object#equals(Object) + * @see #equals(Object) + */ + int hashCode(); +} diff --git a/src/gnu/trove/map/TObjectLongMap.java b/src/gnu/trove/map/TObjectLongMap.java new file mode 100644 index 00000000..f588e286 --- /dev/null +++ b/src/gnu/trove/map/TObjectLongMap.java @@ -0,0 +1,460 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.map; + +import gnu.trove.TLongCollection; +import gnu.trove.function.TLongFunction; +import gnu.trove.procedure.TObjectProcedure; +import gnu.trove.procedure.TLongProcedure; +import gnu.trove.procedure.TObjectLongProcedure; +import gnu.trove.iterator.TObjectLongIterator; + +import java.util.Map; +import java.util.Set; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Interface for a primitive map of Object keys and long values. + */ +public interface TObjectLongMap { + + // Query Operations + + /** + * Returns the value that will be returned from {@link #get} or {@link #put} if no + * entry exists for a given key. The default value is generally zero, but can be + * changed during construction of the collection. + * + * @return the value that represents a null value in this collection. + */ + long getNoEntryValue(); + + + /** + * Returns the number of key-value mappings in this map. If the + * map contains more than Integer.MAX_VALUE elements, returns + * Integer.MAX_VALUE. + * + * @return the number of key-value mappings in this map + */ + int size(); + + + /** + * Returns true if this map contains no key-value mappings. + * + * @return true if this map contains no key-value mappings + */ + boolean isEmpty(); + + + /** + * Returns true if this map contains a mapping for the specified + * key. More formally, returns true if and only if + * this map contains a mapping for a key k such that + * (key==null ? k==null : key.equals(k)). (There can be + * at most one such mapping.) + * + * @param key key whose presence in this map is to be tested + * @return true if this map contains a mapping for the specified + * key + * @throws ClassCastException if the key is of an inappropriate type for + * this map (optional) + * @throws NullPointerException if the specified key is null and this map + * does not permit null keys (optional) + */ + boolean containsKey( Object key ); + + + /** + * Returns true if this map maps one or more keys to the + * specified value. More formally, returns true if and only if + * this map contains at least one mapping to a value v such that + * (value==no_entry_value ? v==no_entry_value : value.equals(v)). This operation + * will probably require time linear in the map size for most + * implementations of the Map interface. + *

+ * Note that no_entry_value is the result of {@link #getNoEntryValue()} and represents + * null for this map instance. + * + * @param value long value whose presence in this map is to be tested + * @return true if this map maps one or more keys to the + * specified value + * @throws ClassCastException if the value is of an inappropriate type for + * this map (optional) + * @throws NullPointerException if the specified value is null and this + * map does not permit null values (optional) + */ + boolean containsValue( long value ); + + + /** + * Returns the value to which the specified key is mapped, + * or {@code null} if this map contains no mapping for the key. + * + *

More formally, if this map contains a mapping from a key + * {@code k} to a value {@code v} such that {@code (key==null ? k==null : + * key.equals(k))}, then this method returns {@code v}; otherwise + * it returns {@code null}. (There can be at most one such mapping.) + * + *

If this map permits null values, then a return value of + * {@code null} does not necessarily indicate that the map + * contains no mapping for the key; it's also possible that the map + * explicitly maps the key to {@code null}. The {@link #containsKey + * containsKey} operation may be used to distinguish these two cases. + * + * @param key the key whose associated value is to be returned + * @return the long value to which the specified key is mapped, or + * {@code null} if this map contains no mapping for the key + * @throws ClassCastException if the key is of an inappropriate type for + * this map (optional) + * @throws NullPointerException if the specified key is null and this map + * does not permit null keys (optional) + */ + long get( Object key ); + + + // Modification Operations + + /** + * Associates the specified value with the specified key in this map + * (optional operation). If the map previously contained a mapping for + * the key, the old value is replaced by the specified value. (A map + * m is said to contain a mapping for a key k if and only + * if {@link #containsKey(Object) m.containsKey(k)} would return + * true.) + * + * @param key key with which the specified value is to be associated + * @param value an long value value to be associated with the specified key + * @return the previous value associated with key, or + * no_entry_value if there was no mapping for key. + * (A no_entry_value return can also indicate that the map + * previously associated null with key, + * if the implementation supports null values.) + * @throws UnsupportedOperationException if the put operation + * is not supported by this map + * @throws ClassCastException if the class of the specified key or value + * prevents it from being stored in this map + * @throws NullPointerException if the specified key or value is null + * and this map does not permit null keys or values + * @throws IllegalArgumentException if some property of the specified key + * or value prevents it from being stored in this map + * @see #getNoEntryValue() + */ + long put( K key, long value); + + + /** + * Inserts a key/value pair into the map if the specified key is not already + * associated with a value. + * + * @param key key with which the specified value is to be associated + * @param value an long value to be associated with the specified key + * + * @return the previous value associated with key, or the "no entry" value + * if none was found (see {@link #getNoEntryValue}). + */ + long putIfAbsent( K key, long value ); + + + /** + * Removes the mapping for a key from this map if it is present + * (optional operation). More formally, if this map contains a mapping + * from key k to value v such that + * (key==null ? k==null : key.equals(k)), that mapping + * is removed. (The map can contain at most one such mapping.) + * + *

Returns the value to which this map previously associated the key, + * or null if the map contained no mapping for the key. + * + *

If this map permits null values, then a return value of + * null does not necessarily indicate that the map + * contained no mapping for the key; it's also possible that the map + * explicitly mapped the key to null. + * + *

The map will not contain a mapping for the specified key once the + * call returns. + * + * @param key key whose mapping is to be removed from the map + * @return the previous long value associated with key, or + * null if there was no mapping for key. + * @throws UnsupportedOperationException if the remove operation + * is not supported by this map + * @throws ClassCastException if the key is of an inappropriate type for + * this map (optional) + * @throws NullPointerException if the specified key is null and this + * map does not permit null keys (optional) + */ + long remove( Object key ); + + + // Bulk Operations + + /** + * Copies all of the mappings from the specified map to this map + * (optional operation). The effect of this call is equivalent to that + * of calling {@link #put(Object,long) put(k, v)} on this map once + * for each mapping from key k to value v in the + * specified map. The behavior of this operation is undefined if the + * specified map is modified while the operation is in progress. + * + * @param m mappings to be stored in this map + * @throws UnsupportedOperationException if the putAll operation + * is not supported by this map + * @throws ClassCastException if the class of a key or value in the + * specified map prevents it from being stored in this map + * @throws NullPointerException if the specified map is null, or if + * this map does not permit null keys or values, and the + * specified map contains null keys or values + * @throws IllegalArgumentException if some property of a key or value in + * the specified map prevents it from being stored in this map + */ + void putAll( Map m); + + + /** + * Put all the entries from the given map into this map. + * + * @param map The map from which entries will be obtained to put into this map. + */ + void putAll( TObjectLongMap map ); + + + /** + * Removes all of the mappings from this map (optional operation). + * The map will be empty after this call returns. + * + * @throws UnsupportedOperationException if the clear operation + * is not supported by this map + */ + void clear(); + + + // Views + + /** + * Returns a {@link Set} view of the keys contained in this map. + * The set is backed by the map, so changes to the map are + * reflected in the set, and vice-versa. If the map is modified + * while an iteration over the set is in progress (except through + * the iterator's own remove operation), the results of + * the iteration are undefined. The set supports element removal, + * which removes the corresponding mapping from the map, via the + * Iterator.remove, Set.remove, + * removeAll, retainAll, and clear + * operations. It does not support the add or addAll + * operations. + * + * @return a set view of the keys contained in this map + */ + Set keySet(); + + + /** + * Returns a copy of the keys of the map as an array. + * Changes to the array of keys will not be reflected in the map + * nor vice-versa. + * + * @return a copy of the keys of the map as an array. + */ + Object[] keys(); + + + /** + * Returns a copy of the keys of the map as an array. + * Changes to the array of keys will not be reflected in the map + * nor vice-versa. + * + * @param array the array into which the elements of the list are to be stored, + * if it is big enough; otherwise, a new array of the same type is + * allocated for this purpose. + * @return the keys of the map as an array. + */ + K[] keys( K[] array ); + + + + /** + * Returns a {@link TLongCollection} view of the values contained in this map. + * The collection is backed by the map, so changes to the map are + * reflected in the collection, and vice-versa. If the map is + * modified while an iteration over the collection is in progress + * (except through the iterator's own remove operation), + * the results of the iteration are undefined. The collection + * supports element removal, which removes the corresponding + * mapping from the map, via the TLongIterator.remove, + * TLongCollection.remove, removeAll, + * retainAll and clear operations. It does not + * support the add or addAll operations. + * + * @return a collection view of the values contained in this map + */ + TLongCollection valueCollection(); + + + /** + * Returns the values of the map as an array of long values. + * Changes to the array of values will not be reflected in the map + * nor vice-versa. + * + * @return the values of the map as an array of long values. + */ + long[] values(); + + + /** + * Returns the values of the map using an existing array. + * Changes to the array of values will not be reflected in the map + * nor vice-versa. + * + * @param array the array into which the elements of the list are to be stored, + * if it is big enough; otherwise, a new array of the same type is + * allocated for this purpose. + * @return the values of the map as an array of long values. + */ + long[] values( long[] array ); + + + /** + * Returns a TObjectLongIterator with access to this map's keys and values. + * + * @return a TObjectLongIterator with access to this map's keys and values. + */ + public TObjectLongIterator iterator(); + + + /** + * Increments the primitive value mapped to key by 1 + * + * @param key the key of the value to increment + * @return true if a mapping was found and modified. + */ + public boolean increment( K key ); + + + /** + * Adjusts the primitive value mapped to key. + * + * @param key the key of the value to increment + * @param amount the amount to adjust the value by. + * @return true if a mapping was found and modified. + */ + public boolean adjustValue( K key, long amount ); + + + /** + * Adjusts the primitive value mapped to the key if the key is present in the map. + * Otherwise, the initial_value is put in the map. + * + * @param key the key of the value to increment + * @param adjust_amount the amount to adjust the value by + * @param put_amount the value put into the map if the key is not initial present + * + * @return the value present in the map after the adjustment or put operation + */ + public long adjustOrPutValue( K key, long adjust_amount, long put_amount ); + + + /** + * Executes procedure for each key in the map. + * + * @param procedure a TObjectProcedure value + * @return false if the loop over the keys terminated because + * the procedure returned false for some key. + */ + public boolean forEachKey( TObjectProcedure procedure ); + + + /** + * Executes procedure for each value in the map. + * + * @param procedure a TLongProcedure value + * @return false if the loop over the values terminated because + * the procedure returned false for some value. + */ + public boolean forEachValue( TLongProcedure procedure ); + + + /** + * Executes procedure for each key/value entry in the + * map. + * + * @param procedure a TOObjectLongProcedure value + * @return false if the loop over the entries terminated because + * the procedure returned false for some entry. + */ + public boolean forEachEntry( TObjectLongProcedure procedure ); + + + /** + * Transform the values in this map using function. + * + * @param function a TLongFunction value + */ + public void transformValues( TLongFunction function ); + + + /** + * Retains only those entries in the map for which the procedure + * returns a true value. + * + * @param procedure determines which entries to keep + * @return true if the map was modified. + */ + public boolean retainEntries( TObjectLongProcedure procedure ); + + + // Comparison and hashing + + /** + * Compares the specified object with this map for equality. Returns + * true if the given object is also a map and the two maps + * represent the same mappings. More formally, two maps m1 and + * m2 represent the same mappings if + * m1.entrySet().equals(m2.entrySet()). This ensures that the + * equals method works properly across different implementations + * of the Map interface. + * + * @param o object to be compared for equality with this map + * @return true if the specified object is equal to this map + */ + boolean equals( Object o ); + + /** + * Returns the hash code value for this map. The hash code of a map is + * defined to be the sum of the hash codes of each entry in the map's + * entrySet() view. This ensures that m1.equals(m2) + * implies that m1.hashCode()==m2.hashCode() for any two maps + * m1 and m2, as required by the general contract of + * {@link Object#hashCode}. + * + * @return the hash code value for this map + + * @see Object#equals(Object) + * @see #equals(Object) + */ + int hashCode(); +} diff --git a/src/gnu/trove/map/hash/TCharObjectHashMap.java b/src/gnu/trove/map/hash/TCharObjectHashMap.java new file mode 100644 index 00000000..354c89f8 --- /dev/null +++ b/src/gnu/trove/map/hash/TCharObjectHashMap.java @@ -0,0 +1,1025 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.map.hash; + +import gnu.trove.map.TCharObjectMap; +import gnu.trove.impl.Constants; +import gnu.trove.impl.HashFunctions; +import gnu.trove.impl.hash.*; +import gnu.trove.procedure.TCharObjectProcedure; +import gnu.trove.procedure.TCharProcedure; +import gnu.trove.procedure.TObjectProcedure; +import gnu.trove.iterator.TCharIterator; +import gnu.trove.iterator.TCharObjectIterator; +import gnu.trove.iterator.TPrimitiveIterator; +import gnu.trove.function.TObjectFunction; +import gnu.trove.set.TCharSet; +import gnu.trove.TCharCollection; + +import java.io.*; +import java.util.*; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * An open addressed Map implementation for char keys and Object values. + * + * Created: Sun Nov 4 08:52:45 2001 + * + * @author Eric D. Friedman + * @author Rob Eden + * @author Jeff Randall + */ +public class TCharObjectHashMap extends TCharHash implements + TCharObjectMap, Externalizable { + + static final long serialVersionUID = 1L; + + private final TCharObjectProcedure PUT_ALL_PROC = new TCharObjectProcedure() { + public boolean execute( char key, V value) { + put( key, value ); + return true; + } + }; + + /** the values of the map */ + protected transient V[] _values; + + /** the value that represents null in the key set. */ + protected char no_entry_key; + + + /** + * Creates a new TCharObjectHashMap instance with the default + * capacity and load factor. + */ + public TCharObjectHashMap() { + super(); + } + + + /** + * Creates a new TCharObjectHashMap instance with a prime + * capacity equal to or greater than initialCapacity and + * with the default load factor. + * + * @param initialCapacity an int value + */ + public TCharObjectHashMap( int initialCapacity ) { + super( initialCapacity ); + no_entry_key = Constants.DEFAULT_CHAR_NO_ENTRY_VALUE; + } + + + /** + * Creates a new TCharObjectHashMap instance with a prime + * capacity equal to or greater than initialCapacity and + * with the specified load factor. + * + * @param initialCapacity an int value + * @param loadFactor a float value + */ + public TCharObjectHashMap( int initialCapacity, float loadFactor ) { + super( initialCapacity, loadFactor ); + no_entry_key = Constants.DEFAULT_CHAR_NO_ENTRY_VALUE; + } + + + /** + * Creates a new TCharObjectHashMap instance with a prime + * value at or near the specified capacity and load factor. + * + * @param initialCapacity used to find a prime capacity for the table. + * @param loadFactor used to calculate the threshold over which + * rehashing takes place. + * @param noEntryKey the value used to represent null in the key set. + */ + public TCharObjectHashMap( int initialCapacity, float loadFactor, char noEntryKey ) { + super( initialCapacity, loadFactor ); + no_entry_key = noEntryKey; + } + + + /** + * Creates a new TCharObjectHashMap that contains the entries + * in the map passed to it. + * + * @param map the TCharObjectMap to be copied. + */ + public TCharObjectHashMap( TCharObjectMap map ) { + this( map.size(), 0.5f, map.getNoEntryKey() ); + putAll( map ); + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"unchecked"}) + protected int setUp( int initialCapacity ) { + int capacity; + + capacity = super.setUp( initialCapacity ); + _values = ( V[] ) new Object[capacity]; + return capacity; + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"unchecked"}) + protected void rehash( int newCapacity ) { + int oldCapacity = _set.length; + + char oldKeys[] = _set; + V oldVals[] = _values; + byte oldStates[] = _states; + + _set = new char[newCapacity]; + _values = (V[]) new Object[newCapacity]; + _states = new byte[newCapacity]; + + for ( int i = oldCapacity; i-- > 0; ) { + if( oldStates[i] == FULL ) { + char o = oldKeys[i]; + int index = insertKey(o); + _values[index] = oldVals[i]; + } + } + } + + + // Query Operations + + /** {@inheritDoc} */ + public char getNoEntryKey() { + return no_entry_key; + } + + + /** {@inheritDoc} */ + public boolean containsKey( char key ) { + return contains( key ); + } + + + /** {@inheritDoc} */ + public boolean containsValue( Object val ) { + byte[] states = _states; + V[] vals = _values; + + // special case null values so that we don't have to + // perform null checks before every call to equals() + if ( null == val ) { + for ( int i = vals.length; i-- > 0; ) { + if ( states[i] == FULL && null == vals[i] ) { + return true; + } + } + } else { + for ( int i = vals.length; i-- > 0; ) { + if ( states[i] == FULL && + ( val == vals[i] || val.equals( vals[i] ) ) ) { + return true; + } + } + } // end of else + return false; + } + + + /** {@inheritDoc} */ + public V get( char key ) { + int index = index( key ); + return index < 0 ? null : _values[index]; + } + + + // Modification Operations + + /** {@inheritDoc} */ + public V put( char key, V value ) { + int index = insertKey( key ); + return doPut( value, index ); + } + + + /** {@inheritDoc} */ + public V putIfAbsent( char key, V value ) { + int index = insertKey( key ); + if ( index < 0 ) + return _values[-index - 1]; + return doPut( value, index ); + } + + + @SuppressWarnings({"unchecked"}) + private V doPut( V value, int index ) { + V previous = null; + boolean isNewMapping = true; + if ( index < 0 ) { + index = -index -1; + previous = _values[index]; + isNewMapping = false; + } + + _values[index] = value; + + if (isNewMapping) { + postInsertHook( consumeFreeSlot ); + } + + return previous; + } + + + /** {@inheritDoc} */ + public V remove( char key ) { + V prev = null; + int index = index( key ); + if ( index >= 0 ) { + prev = _values[index]; + removeAt( index ); // clear key,state; adjust size + } + return prev; + } + + + /** {@inheritDoc} */ + protected void removeAt( int index ) { + _values[index] = null; + super.removeAt( index ); // clear key, state; adjust size + } + + + // Bulk Operations + + /** {@inheritDoc} */ + public void putAll( Map map ) { + Set> set = map.entrySet(); + for ( Map.Entry entry : set ) { + put( entry.getKey(), entry.getValue() ); + } + } + + + /** {@inheritDoc} */ + public void putAll( TCharObjectMap map ){ + map.forEachEntry( PUT_ALL_PROC ); + } + + + /** {@inheritDoc} */ + public void clear() { + super.clear(); + Arrays.fill( _set, 0, _set.length, no_entry_key ); + Arrays.fill( _states, 0, _states.length, FREE ); + Arrays.fill( _values, 0, _values.length, null ); + } + + + // Views + + /** {@inheritDoc} */ + public TCharSet keySet() { + return new KeyView(); + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"unchecked"}) + public char[] keys() { + char[] keys = new char[size()]; + char[] k = _set; + byte[] states = _states; + + for ( int i = k.length, j = 0; i-- > 0; ) { + if ( states[i] == FULL ) { + keys[j++] = k[i]; + } + } + return keys; + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"unchecked"}) + public char[] keys( char[] dest ) { + if ( dest.length < _size ) { + dest = new char[_size]; + } + + char[] k = _set; + byte[] states = _states; + + for ( int i = k.length, j = 0; i-- > 0; ) { + if ( states[i] == FULL ) { + dest[j++] = k[i]; + } + } + return dest; + } + + + /** {@inheritDoc} */ + public Collection valueCollection() { + return new ValueView(); + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"unchecked"}) + public Object[] values() { + Object[] vals = new Object[size()]; + V[] v = _values; + byte[] states = _states; + + for ( int i = v.length, j = 0; i-- > 0; ) { + if ( states[i] == FULL ) { + vals[j++] = v[i]; + } + } + return vals; + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"unchecked"}) + public V[] values( V[] dest ) { + if ( dest.length < _size ) { + dest = ( V[] ) java.lang.reflect.Array.newInstance( + dest.getClass().getComponentType(), _size); + } + + V[] v = _values; + byte[] states = _states; + + for ( int i = v.length, j = 0; i-- > 0; ) { + if ( states[i] == FULL ) { + dest[j++] = ( V ) v[i]; + } + } + return dest; + } + + + /** {@inheritDoc} */ + public TCharObjectIterator iterator() { + return new TCharObjectHashIterator( this ); + } + + + /** {@inheritDoc} */ + public boolean forEachKey( TCharProcedure procedure ) { + return forEach( procedure ); + } + + + /** {@inheritDoc} */ + public boolean forEachValue( TObjectProcedure procedure ) { + byte[] states = _states; + V[] values = _values; + for ( int i = values.length; i-- > 0; ) { + if ( states[i] == FULL && ! procedure.execute( values[i] ) ) { + return false; + } + } + return true; + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"unchecked"}) + public boolean forEachEntry( TCharObjectProcedure procedure ) { + byte[] states = _states; + char[] keys = _set; + V[] values = _values; + for (int i = keys.length; i-- > 0;) { + if (states[i] == FULL && ! procedure.execute(keys[i],values[i])) { + return false; + } + } + return true; + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"unchecked"}) + public boolean retainEntries( TCharObjectProcedure procedure ) { + boolean modified = false; + byte[] states = _states; + char[] keys = _set; + V[] values = _values; + + // Temporarily disable compaction. This is a fix for bug #1738760 + tempDisableAutoCompaction(); + try { + for ( int i = keys.length; i-- > 0; ) { + if ( states[i] == FULL && ! procedure.execute( keys[i], values[i] ) ) { + removeAt( i ); + modified = true; + } + } + } + finally { + reenableAutoCompaction( true ); + } + + return modified; + } + + + /** {@inheritDoc} */ + public void transformValues( TObjectFunction function ) { + byte[] states = _states; + V[] values = _values; + for ( int i = values.length; i-- > 0; ) { + if ( states[i] == FULL ) { + values[i] = function.execute( values[i] ); + } + } + } + + + // Comparison and hashing + + /** {@inheritDoc} */ + public boolean equals( Object other ) { + if ( ! ( other instanceof TCharObjectMap ) ) { + return false; + } + TCharObjectMap that = ( TCharObjectMap ) other; + if ( that.size() != this.size() ) { + return false; + } + try { + TCharObjectIterator iter = this.iterator(); + while ( iter.hasNext() ) { + iter.advance(); + char key = iter.key(); + Object value = iter.value(); + if ( value == null ) { + if ( !( that.get( key ) == null && that.containsKey( key ) ) ) { + return false; + } + } else { + if ( !value.equals( that.get( key ) ) ) { + return false; + } + } + } + } catch ( ClassCastException ex ) { + // unused. + } + return true; + } + + + /** {@inheritDoc} */ + public int hashCode() { + int hashcode = 0; + V[] values = _values; + byte[] states = _states; + for ( int i = values.length; i-- > 0; ) { + if ( states[i] == FULL ) { + hashcode += HashFunctions.hash( _set[i] ) ^ + ( values[i] == null ? 0 : values[i].hashCode() ); + } + } + return hashcode; + } + + + class KeyView implements TCharSet { + + /** {@inheritDoc} */ + public char getNoEntryValue() { + return no_entry_key; + } + + /** {@inheritDoc} */ + public int size() { + return _size; + } + + /** {@inheritDoc} */ + public boolean isEmpty() { + return _size == 0; + } + + /** {@inheritDoc} */ + public boolean contains( char entry ) { + return TCharObjectHashMap.this.containsKey( entry ); + } + + /** {@inheritDoc} */ + public TCharIterator iterator() { + return new TCharHashIterator( TCharObjectHashMap.this ); + } + + /** {@inheritDoc} */ + public char[] toArray() { + return keys(); + } + + /** {@inheritDoc} */ + public char[] toArray( char[] dest ) { + return keys( dest ); + } + + /** {@inheritDoc} */ + public boolean add( char entry ) { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + public boolean remove( char entry ) { + return null != TCharObjectHashMap.this.remove( entry ); + } + + /** {@inheritDoc} */ + public boolean containsAll( Collection collection ) { + for ( Object element : collection ) { + if ( ! TCharObjectHashMap.this.containsKey( + ( ( Character ) element ).charValue() ) ) { + + return false; + } + } + return true; + } + + /** {@inheritDoc} */ + public boolean containsAll( TCharCollection collection ) { + if ( collection == this ) { + return true; + } + TCharIterator iter = collection.iterator(); + while ( iter.hasNext() ) { + if ( ! TCharObjectHashMap.this.containsKey( iter.next() ) ) { + return false; + } + } + return true; + } + + /** {@inheritDoc} */ + public boolean containsAll( char[] array ) { + for ( char element : array ) { + if ( ! TCharObjectHashMap.this.containsKey( element ) ) { + return false; + } + } + return true; + } + + /** {@inheritDoc} */ + public boolean addAll( Collection collection ) { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + public boolean addAll( TCharCollection collection ) { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + public boolean addAll( char[] array ) { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + public boolean retainAll( Collection collection ) { + boolean modified = false; + TCharIterator iter = iterator(); + while ( iter.hasNext() ) { + //noinspection SuspiciousMethodCalls + if ( ! collection.contains( Character.valueOf ( iter.next() ) ) ) { + iter.remove(); + modified = true; + } + } + return modified; + } + + /** {@inheritDoc} */ + public boolean retainAll( TCharCollection collection ) { + if ( this == collection ) { + return false; + } + boolean modified = false; + TCharIterator iter = iterator(); + while ( iter.hasNext() ) { + if ( ! collection.contains( iter.next() ) ) { + iter.remove(); + modified = true; + } + } + return modified; + } + + /** {@inheritDoc} */ + public boolean retainAll( char[] array ) { + boolean changed = false; + Arrays.sort( array ); + char[] set = _set; + byte[] states = _states; + + for ( int i = set.length; i-- > 0; ) { + if ( states[i] == FULL && ( Arrays.binarySearch( array, set[i] ) < 0) ) { + removeAt( i ); + changed = true; + } + } + return changed; + } + + /** {@inheritDoc} */ + public boolean removeAll( Collection collection ) { + boolean changed = false; + for ( Object element : collection ) { + if ( element instanceof Character ) { + char c = ( ( Character ) element ).charValue(); + if ( remove( c ) ) { + changed = true; + } + } + } + return changed; + } + + /** {@inheritDoc} */ + public boolean removeAll( TCharCollection collection ) { + if ( collection == this ) { + clear(); + return true; + } + boolean changed = false; + TCharIterator iter = collection.iterator(); + while ( iter.hasNext() ) { + char element = iter.next(); + if ( remove( element ) ) { + changed = true; + } + } + return changed; + } + + /** {@inheritDoc} */ + public boolean removeAll( char[] array ) { + boolean changed = false; + for ( int i = array.length; i-- > 0; ) { + if ( remove(array[i]) ) { + changed = true; + } + } + return changed; + } + + /** {@inheritDoc} */ + public void clear() { + TCharObjectHashMap.this.clear(); + } + + /** {@inheritDoc} */ + public boolean forEach( TCharProcedure procedure ) { + return TCharObjectHashMap.this.forEachKey( procedure ); + } + + /** {@inheritDoc) */ + public boolean equals( Object other ) { + if (! ( other instanceof TCharSet ) ) { + return false; + } + final TCharSet that = ( TCharSet ) other; + if ( that.size() != this.size() ) { + return false; + } + for ( int i = _states.length; i-- > 0; ) { + if ( _states[i] == FULL ) { + if ( ! that.contains( _set[i] ) ) { + return false; + } + } + } + return true; + } + + /** {@inheritDoc} */ + public int hashCode() { + int hashcode = 0; + for ( int i = _states.length; i-- > 0; ) { + if ( _states[i] == FULL ) { + hashcode += HashFunctions.hash( _set[i] ); + } + } + return hashcode; + } + + /** {@inheritDoc} */ + public String toString() { + final StringBuilder buf = new StringBuilder("{"); + boolean first = true; + for ( int i = _states.length; i-- > 0; ) { + if ( _states[i] == FULL ) { + if ( first ) first = false; + else buf.append( "," ); + buf.append( _set[i] ); + } + } + return buf.toString(); + } + + + class TCharHashIterator extends THashPrimitiveIterator implements TCharIterator { + + /** the collection on which the iterator operates */ + private final TCharHash _hash; + + /** {@inheritDoc} */ + public TCharHashIterator( TCharHash hash ) { + super( hash ); + this._hash = hash; + } + + /** {@inheritDoc} */ + public char next() { + moveToNextIndex(); + return _hash._set[_index]; + } + } + } + + + /** a view onto the values of the map. */ + protected class ValueView extends MapBackedView { + + @SuppressWarnings({"unchecked"}) + public Iterator iterator() { + return new TCharObjectValueHashIterator( TCharObjectHashMap.this ) { + protected V objectAtIndex( int index ) { + return _values[index]; + } + }; + } + + public boolean containsElement( V value ) { + return containsValue( value ); + } + + public boolean removeElement( V value ) { + V[] values = _values; + byte[] states = _states; + + for ( int i = values.length; i-- > 0; ) { + if ( states[i] == FULL ) { + if ( value == values[i] || + ( null != values[i] && values[i].equals( value ) ) ) { + removeAt( i ); + return true; + } + } + } + return false; + } + + class TCharObjectValueHashIterator extends THashPrimitiveIterator + implements Iterator { + + protected final TCharObjectHashMap _map; + + public TCharObjectValueHashIterator( TCharObjectHashMap map ) { + super( map ); + _map = map; + } + + @SuppressWarnings("unchecked") + protected V objectAtIndex( int index ) { + byte[] states = _states; + Object value = _map._values[index]; + if ( states[index] != FULL ) { + return null; + } + return ( V ) value; + } + + /** {@inheritDoc} */ + @SuppressWarnings("unchecked") + public V next() { + moveToNextIndex(); + return ( V ) _map._values[_index]; + } + } + } + + + private abstract class MapBackedView extends AbstractSet + implements Set, Iterable { + + public abstract Iterator iterator(); + + public abstract boolean removeElement( E key ); + + public abstract boolean containsElement( E key ); + + @SuppressWarnings({"unchecked"}) + public boolean contains( Object key ) { + return containsElement( (E) key ); + } + + @SuppressWarnings({"unchecked"}) + public boolean remove( Object o ) { + return removeElement( (E) o ); + } + + public void clear() { + TCharObjectHashMap.this.clear(); + } + + public boolean add( E obj ) { + throw new UnsupportedOperationException(); + } + + public int size() { + return TCharObjectHashMap.this.size(); + } + + public Object[] toArray() { + Object[] result = new Object[size()]; + Iterator e = iterator(); + for ( int i = 0; e.hasNext(); i++ ) { + result[i] = e.next(); + } + return result; + } + + @SuppressWarnings({"unchecked"}) + public T[] toArray( T[] a ) { + int size = size(); + if ( a.length < size ) { + a = (T[]) java.lang.reflect.Array.newInstance( + a.getClass().getComponentType(), size ); + } + + Iterator it = iterator(); + Object[] result = a; + for ( int i = 0; i < size; i++ ) { + result[i] = it.next(); + } + + if ( a.length > size ) { + a[size] = null; + } + + return a; + } + + public boolean isEmpty() { + return TCharObjectHashMap.this.isEmpty(); + } + + public boolean addAll( Collection collection ) { + throw new UnsupportedOperationException(); + } + + @SuppressWarnings({"SuspiciousMethodCalls"}) + public boolean retainAll( Collection collection ) { + boolean changed = false; + Iterator i = iterator(); + while ( i.hasNext() ) { + if ( !collection.contains( i.next() ) ) { + i.remove(); + changed = true; + } + } + return changed; + } + } + + + class TCharObjectHashIterator extends THashPrimitiveIterator + implements TCharObjectIterator { + + /** the collection being iterated over */ + private final TCharObjectHashMap _map; + + /** + * Creates an iterator over the specified map + * + * @param map map to iterate over. + */ + public TCharObjectHashIterator( TCharObjectHashMap map ) { + super( map ); + this._map = map; + } + + /** {@inheritDoc} */ + public void advance() { + moveToNextIndex(); + } + + /** {@inheritDoc} */ + public char key() { + return _map._set[_index]; + } + + /** {@inheritDoc} */ + public V value() { + return _map._values[_index]; + } + + /** {@inheritDoc} */ + public V setValue( V val ) { + V old = value(); + _map._values[_index] = val; + return old; + } + } + + + public void writeExternal( ObjectOutput out ) throws IOException { + // VERSION + out.writeByte( 0 ); + + // SUPER + super.writeExternal( out ); + + // NO_ENTRY_KEY + out.writeChar( no_entry_key ); + + // NUMBER OF ENTRIES + out.writeInt( _size ); + + // ENTRIES + for ( int i = _states.length; i-- > 0; ) { + if ( _states[i] == FULL ) { + out.writeChar( _set[i] ); + out.writeObject( _values[i] ); + } + } + } + + + @SuppressWarnings({"unchecked"}) + public void readExternal( ObjectInput in ) + throws IOException, ClassNotFoundException { + + // VERSION + in.readByte(); + + // SUPER + super.readExternal( in ); + + // NO_ENTRY_KEY + no_entry_key = in.readChar(); + + // NUMBER OF ENTRIES + int size = in.readInt(); + setUp( size ); + + // ENTRIES + while (size-- > 0) { + char key = in.readChar(); + V val = (V) in.readObject(); + put(key, val); + } + } + + + public String toString() { + final StringBuilder buf = new StringBuilder("{"); + forEachEntry(new TCharObjectProcedure() { + private boolean first = true; + public boolean execute(char key, Object value) { + if ( first ) first = false; + else buf.append( "," ); + + buf.append(key); + buf.append("="); + buf.append(value); + return true; + } + }); + buf.append("}"); + return buf.toString(); + } +} // TCharObjectHashMap diff --git a/src/gnu/trove/map/hash/TIntByteHashMap.java b/src/gnu/trove/map/hash/TIntByteHashMap.java new file mode 100644 index 00000000..032f3809 --- /dev/null +++ b/src/gnu/trove/map/hash/TIntByteHashMap.java @@ -0,0 +1,1287 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.map.hash; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + +import gnu.trove.map.TIntByteMap; +import gnu.trove.function.TByteFunction; +import gnu.trove.procedure.*; +import gnu.trove.set.*; +import gnu.trove.iterator.*; +import gnu.trove.iterator.hash.*; +import gnu.trove.impl.hash.*; +import gnu.trove.impl.HashFunctions; +import gnu.trove.*; + +import java.io.*; +import java.util.*; + +/** + * An open addressed Map implementation for int keys and byte values. + * + * @author Eric D. Friedman + * @author Rob Eden + * @author Jeff Randall + * @version $Id: _K__V_HashMap.template,v 1.1.2.16 2010/03/02 04:09:50 robeden Exp $ + */ +public class TIntByteHashMap extends TIntByteHash implements TIntByteMap, Externalizable { + static final long serialVersionUID = 1L; + + /** the values of the map */ + protected transient byte[] _values; + + + /** + * Creates a new TIntByteHashMap instance with the default + * capacity and load factor. + */ + public TIntByteHashMap() { + super(); + } + + + /** + * Creates a new TIntByteHashMap instance with a prime + * capacity equal to or greater than initialCapacity and + * with the default load factor. + * + * @param initialCapacity an int value + */ + public TIntByteHashMap( int initialCapacity ) { + super( initialCapacity ); + } + + + /** + * Creates a new TIntByteHashMap instance with a prime + * capacity equal to or greater than initialCapacity and + * with the specified load factor. + * + * @param initialCapacity an int value + * @param loadFactor a float value + */ + public TIntByteHashMap( int initialCapacity, float loadFactor ) { + super( initialCapacity, loadFactor ); + } + + + /** + * Creates a new TIntByteHashMap instance with a prime + * capacity equal to or greater than initialCapacity and + * with the specified load factor. + * + * @param initialCapacity an int value + * @param loadFactor a float value + * @param noEntryKey a int value that represents + * null for the Key set. + * @param noEntryValue a byte value that represents + * null for the Value set. + */ + public TIntByteHashMap( int initialCapacity, float loadFactor, + int noEntryKey, byte noEntryValue ) { + super( initialCapacity, loadFactor, noEntryKey, noEntryValue ); + } + + + /** + * Creates a new TIntByteHashMap instance containing + * all of the entries in the map passed in. + * + * @param keys a int array containing the keys for the matching values. + * @param values a byte array containing the values. + */ + public TIntByteHashMap( int[] keys, byte[] values ) { + super( Math.max( keys.length, values.length ) ); + + int size = Math.min( keys.length, values.length ); + for ( int i = 0; i < size; i++ ) { + this.put( keys[i], values[i] ); + } + } + + + /** + * Creates a new TIntByteHashMap instance containing + * all of the entries in the map passed in. + * + * @param map a TIntByteMap that will be duplicated. + */ + public TIntByteHashMap( TIntByteMap map ) { + super( map.size() ); + if ( map instanceof TIntByteHashMap ) { + TIntByteHashMap hashmap = ( TIntByteHashMap ) map; + this._loadFactor = hashmap._loadFactor; + this.no_entry_key = hashmap.no_entry_key; + this.no_entry_value = hashmap.no_entry_value; + //noinspection RedundantCast + if ( this.no_entry_key != ( int ) 0 ) { + Arrays.fill( _set, this.no_entry_key ); + } + //noinspection RedundantCast + if ( this.no_entry_value != ( byte ) 0 ) { + Arrays.fill( _values, this.no_entry_value ); + } + setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); + } + putAll( map ); + } + + + /** + * initializes the hashtable to a prime capacity which is at least + * initialCapacity + 1. + * + * @param initialCapacity an int value + * @return the actual capacity chosen + */ + protected int setUp( int initialCapacity ) { + int capacity; + + capacity = super.setUp( initialCapacity ); + _values = new byte[capacity]; + return capacity; + } + + + /** + * rehashes the map to the new capacity. + * + * @param newCapacity an int value + */ + /** {@inheritDoc} */ + protected void rehash( int newCapacity ) { + int oldCapacity = _set.length; + + int oldKeys[] = _set; + byte oldVals[] = _values; + byte oldStates[] = _states; + + _set = new int[newCapacity]; + _values = new byte[newCapacity]; + _states = new byte[newCapacity]; + + for ( int i = oldCapacity; i-- > 0; ) { + if( oldStates[i] == FULL ) { + int o = oldKeys[i]; + int index = insertKey( o ); + _values[index] = oldVals[i]; + } + } + } + + + /** {@inheritDoc} */ + public byte put( int key, byte value ) { + int index = insertKey( key ); + return doPut( key, value, index ); + } + + + /** {@inheritDoc} */ + public byte putIfAbsent( int key, byte value ) { + int index = insertKey( key ); + if (index < 0) + return _values[-index - 1]; + return doPut( key, value, index ); + } + + + private byte doPut( int key, byte value, int index ) { + byte previous = no_entry_value; + boolean isNewMapping = true; + if ( index < 0 ) { + index = -index -1; + previous = _values[index]; + isNewMapping = false; + } + _values[index] = value; + + if (isNewMapping) { + postInsertHook( consumeFreeSlot ); + } + + return previous; + } + + + /** {@inheritDoc} */ + public void putAll( Map map ) { + ensureCapacity( map.size() ); + // could optimize this for cases when map instanceof THashMap + for ( Map.Entry entry : map.entrySet() ) { + this.put( entry.getKey().intValue(), entry.getValue().byteValue() ); + } + } + + + /** {@inheritDoc} */ + public void putAll( TIntByteMap map ) { + ensureCapacity( map.size() ); + TIntByteIterator iter = map.iterator(); + while ( iter.hasNext() ) { + iter.advance(); + this.put( iter.key(), iter.value() ); + } + } + + + /** {@inheritDoc} */ + public byte get( int key ) { + int index = index( key ); + return index < 0 ? no_entry_value : _values[index]; + } + + + /** {@inheritDoc} */ + public void clear() { + super.clear(); + Arrays.fill( _set, 0, _set.length, no_entry_key ); + Arrays.fill( _values, 0, _values.length, no_entry_value ); + Arrays.fill( _states, 0, _states.length, FREE ); + } + + + /** {@inheritDoc} */ + public boolean isEmpty() { + return 0 == _size; + } + + + /** {@inheritDoc} */ + public byte remove( int key ) { + byte prev = no_entry_value; + int index = index( key ); + if ( index >= 0 ) { + prev = _values[index]; + removeAt( index ); // clear key,state; adjust size + } + return prev; + } + + + /** {@inheritDoc} */ + protected void removeAt( int index ) { + _values[index] = no_entry_value; + super.removeAt( index ); // clear key, state; adjust size + } + + + /** {@inheritDoc} */ + public TIntSet keySet() { + return new TKeyView(); + } + + + /** {@inheritDoc} */ + public int[] keys() { + int[] keys = new int[size()]; + int[] k = _set; + byte[] states = _states; + + for ( int i = k.length, j = 0; i-- > 0; ) { + if ( states[i] == FULL ) { + keys[j++] = k[i]; + } + } + return keys; + } + + + /** {@inheritDoc} */ + public int[] keys( int[] array ) { + int size = size(); + if ( array.length < size ) { + array = new int[size]; + } + + int[] keys = _set; + byte[] states = _states; + + for ( int i = keys.length, j = 0; i-- > 0; ) { + if ( states[i] == FULL ) { + array[j++] = keys[i]; + } + } + return array; + } + + + /** {@inheritDoc} */ + public TByteCollection valueCollection() { + return new TValueView(); + } + + + /** {@inheritDoc} */ + public byte[] values() { + byte[] vals = new byte[size()]; + byte[] v = _values; + byte[] states = _states; + + for ( int i = v.length, j = 0; i-- > 0; ) { + if ( states[i] == FULL ) { + vals[j++] = v[i]; + } + } + return vals; + } + + + /** {@inheritDoc} */ + public byte[] values( byte[] array ) { + int size = size(); + if ( array.length < size ) { + array = new byte[size]; + } + + byte[] v = _values; + byte[] states = _states; + + for ( int i = v.length, j = 0; i-- > 0; ) { + if ( states[i] == FULL ) { + array[j++] = v[i]; + } + } + return array; + } + + + /** {@inheritDoc} */ + public boolean containsValue( byte val ) { + byte[] states = _states; + byte[] vals = _values; + + for ( int i = vals.length; i-- > 0; ) { + if ( states[i] == FULL && val == vals[i] ) { + return true; + } + } + return false; + } + + + /** {@inheritDoc} */ + public boolean containsKey( int key ) { + return contains( key ); + } + + + /** {@inheritDoc} */ + public TIntByteIterator iterator() { + return new TIntByteHashIterator( this ); + } + + + /** {@inheritDoc} */ + public boolean forEachKey( TIntProcedure procedure ) { + return forEach( procedure ); + } + + + /** {@inheritDoc} */ + public boolean forEachValue( TByteProcedure procedure ) { + byte[] states = _states; + byte[] values = _values; + for ( int i = values.length; i-- > 0; ) { + if ( states[i] == FULL && ! procedure.execute( values[i] ) ) { + return false; + } + } + return true; + } + + + /** {@inheritDoc} */ + public boolean forEachEntry( TIntByteProcedure procedure ) { + byte[] states = _states; + int[] keys = _set; + byte[] values = _values; + for ( int i = keys.length; i-- > 0; ) { + if ( states[i] == FULL && ! procedure.execute( keys[i], values[i] ) ) { + return false; + } + } + return true; + } + + + /** {@inheritDoc} */ + public void transformValues( TByteFunction function ) { + byte[] states = _states; + byte[] values = _values; + for ( int i = values.length; i-- > 0; ) { + if ( states[i] == FULL ) { + values[i] = function.execute( values[i] ); + } + } + } + + + /** {@inheritDoc} */ + public boolean retainEntries( TIntByteProcedure procedure ) { + boolean modified = false; + byte[] states = _states; + int[] keys = _set; + byte[] values = _values; + + + // Temporarily disable compaction. This is a fix for bug #1738760 + tempDisableAutoCompaction(); + try { + for ( int i = keys.length; i-- > 0; ) { + if ( states[i] == FULL && ! procedure.execute( keys[i], values[i] ) ) { + removeAt( i ); + modified = true; + } + } + } + finally { + reenableAutoCompaction( true ); + } + + return modified; + } + + + /** {@inheritDoc} */ + public boolean increment( int key ) { + return adjustValue( key, ( byte ) 1 ); + } + + + /** {@inheritDoc} */ + public boolean adjustValue( int key, byte amount ) { + int index = index( key ); + if (index < 0) { + return false; + } else { + _values[index] += amount; + return true; + } + } + + + /** {@inheritDoc} */ + public byte adjustOrPutValue( int key, byte adjust_amount, byte put_amount ) { + int index = insertKey( key ); + final boolean isNewMapping; + final byte newValue; + if ( index < 0 ) { + index = -index -1; + newValue = ( _values[index] += adjust_amount ); + isNewMapping = false; + } else { + newValue = ( _values[index] = put_amount ); + isNewMapping = true; + } + + byte previousState = _states[index]; + + if ( isNewMapping ) { + postInsertHook(consumeFreeSlot); + } + + return newValue; + } + + + /** a view onto the keys of the map. */ + protected class TKeyView implements TIntSet { + + /** {@inheritDoc} */ + public TIntIterator iterator() { + return new TIntByteKeyHashIterator( TIntByteHashMap.this ); + } + + + /** {@inheritDoc} */ + public int getNoEntryValue() { + return no_entry_key; + } + + + /** {@inheritDoc} */ + public int size() { + return _size; + } + + + /** {@inheritDoc} */ + public boolean isEmpty() { + return 0 == _size; + } + + + /** {@inheritDoc} */ + public boolean contains( int entry ) { + return TIntByteHashMap.this.contains( entry ); + } + + + /** {@inheritDoc} */ + public int[] toArray() { + return TIntByteHashMap.this.keys(); + } + + + /** {@inheritDoc} */ + public int[] toArray( int[] dest ) { + return TIntByteHashMap.this.keys( dest ); + } + + + /** + * Unsupported when operating upon a Key Set view of a TIntByteMap + *

+ * {@inheritDoc} + */ + public boolean add( int entry ) { + throw new UnsupportedOperationException(); + } + + + /** {@inheritDoc} */ + public boolean remove( int entry ) { + return no_entry_value != TIntByteHashMap.this.remove( entry ); + } + + + /** {@inheritDoc} */ + public boolean containsAll( Collection collection ) { + for ( Object element : collection ) { + if ( element instanceof Integer ) { + int ele = ( ( Integer ) element ).intValue(); + if ( ! TIntByteHashMap.this.containsKey( ele ) ) { + return false; + } + } else { + return false; + } + } + return true; + } + + + /** {@inheritDoc} */ + public boolean containsAll( TIntCollection collection ) { + TIntIterator iter = collection.iterator(); + while ( iter.hasNext() ) { + if ( ! TIntByteHashMap.this.containsKey( iter.next() ) ) { + return false; + } + } + return true; + } + + + /** {@inheritDoc} */ + public boolean containsAll( int[] array ) { + for ( int element : array ) { + if ( ! TIntByteHashMap.this.contains( element ) ) { + return false; + } + } + return true; + } + + + /** + * Unsupported when operating upon a Key Set view of a TIntByteMap + *

+ * {@inheritDoc} + */ + public boolean addAll( Collection collection ) { + throw new UnsupportedOperationException(); + } + + + /** + * Unsupported when operating upon a Key Set view of a TIntByteMap + *

+ * {@inheritDoc} + */ + public boolean addAll( TIntCollection collection ) { + throw new UnsupportedOperationException(); + } + + + /** + * Unsupported when operating upon a Key Set view of a TIntByteMap + *

+ * {@inheritDoc} + */ + public boolean addAll( int[] array ) { + throw new UnsupportedOperationException(); + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"SuspiciousMethodCalls"}) + public boolean retainAll( Collection collection ) { + boolean modified = false; + TIntIterator iter = iterator(); + while ( iter.hasNext() ) { + if ( ! collection.contains( Integer.valueOf ( iter.next() ) ) ) { + iter.remove(); + modified = true; + } + } + return modified; + } + + + /** {@inheritDoc} */ + public boolean retainAll( TIntCollection collection ) { + if ( this == collection ) { + return false; + } + boolean modified = false; + TIntIterator iter = iterator(); + while ( iter.hasNext() ) { + if ( ! collection.contains( iter.next() ) ) { + iter.remove(); + modified = true; + } + } + return modified; + } + + + /** {@inheritDoc} */ + public boolean retainAll( int[] array ) { + boolean changed = false; + Arrays.sort( array ); + int[] set = _set; + byte[] states = _states; + + for ( int i = set.length; i-- > 0; ) { + if ( states[i] == FULL && ( Arrays.binarySearch( array, set[i] ) < 0) ) { + removeAt( i ); + changed = true; + } + } + return changed; + } + + + /** {@inheritDoc} */ + public boolean removeAll( Collection collection ) { + boolean changed = false; + for ( Object element : collection ) { + if ( element instanceof Integer ) { + int c = ( ( Integer ) element ).intValue(); + if ( remove( c ) ) { + changed = true; + } + } + } + return changed; + } + + + /** {@inheritDoc} */ + public boolean removeAll( TIntCollection collection ) { + if ( this == collection ) { + clear(); + return true; + } + boolean changed = false; + TIntIterator iter = collection.iterator(); + while ( iter.hasNext() ) { + int element = iter.next(); + if ( remove( element ) ) { + changed = true; + } + } + return changed; + } + + + /** {@inheritDoc} */ + public boolean removeAll( int[] array ) { + boolean changed = false; + for ( int i = array.length; i-- > 0; ) { + if ( remove( array[i] ) ) { + changed = true; + } + } + return changed; + } + + + /** {@inheritDoc} */ + public void clear() { + TIntByteHashMap.this.clear(); + } + + + /** {@inheritDoc} */ + public boolean forEach( TIntProcedure procedure ) { + return TIntByteHashMap.this.forEachKey( procedure ); + } + + + @Override + public boolean equals( Object other ) { + if (! (other instanceof TIntSet)) { + return false; + } + final TIntSet that = ( TIntSet ) other; + if ( that.size() != this.size() ) { + return false; + } + for ( int i = _states.length; i-- > 0; ) { + if ( _states[i] == FULL ) { + if ( ! that.contains( _set[i] ) ) { + return false; + } + } + } + return true; + } + + + @Override + public int hashCode() { + int hashcode = 0; + for ( int i = _states.length; i-- > 0; ) { + if ( _states[i] == FULL ) { + hashcode += HashFunctions.hash( _set[i] ); + } + } + return hashcode; + } + + + @Override + public String toString() { + final StringBuilder buf = new StringBuilder( "{" ); + forEachKey( new TIntProcedure() { + private boolean first = true; + + + public boolean execute( int key ) { + if ( first ) { + first = false; + } else { + buf.append( ", " ); + } + + buf.append( key ); + return true; + } + } ); + buf.append( "}" ); + return buf.toString(); + } + } + + + /** a view onto the values of the map. */ + protected class TValueView implements TByteCollection { + + /** {@inheritDoc} */ + public TByteIterator iterator() { + return new TIntByteValueHashIterator( TIntByteHashMap.this ); + } + + + /** {@inheritDoc} */ + public byte getNoEntryValue() { + return no_entry_value; + } + + + /** {@inheritDoc} */ + public int size() { + return _size; + } + + + /** {@inheritDoc} */ + public boolean isEmpty() { + return 0 == _size; + } + + + /** {@inheritDoc} */ + public boolean contains( byte entry ) { + return TIntByteHashMap.this.containsValue( entry ); + } + + + /** {@inheritDoc} */ + public byte[] toArray() { + return TIntByteHashMap.this.values(); + } + + + /** {@inheritDoc} */ + public byte[] toArray( byte[] dest ) { + return TIntByteHashMap.this.values( dest ); + } + + + + public boolean add( byte entry ) { + throw new UnsupportedOperationException(); + } + + + /** {@inheritDoc} */ + public boolean remove( byte entry ) { + byte[] values = _values; + int[] set = _set; + + for ( int i = values.length; i-- > 0; ) { + if ( ( set[i] != FREE && set[i] != REMOVED ) && entry == values[i] ) { + removeAt( i ); + return true; + } + } + return false; + } + + + /** {@inheritDoc} */ + public boolean containsAll( Collection collection ) { + for ( Object element : collection ) { + if ( element instanceof Byte ) { + byte ele = ( ( Byte ) element ).byteValue(); + if ( ! TIntByteHashMap.this.containsValue( ele ) ) { + return false; + } + } else { + return false; + } + } + return true; + } + + + /** {@inheritDoc} */ + public boolean containsAll( TByteCollection collection ) { + TByteIterator iter = collection.iterator(); + while ( iter.hasNext() ) { + if ( ! TIntByteHashMap.this.containsValue( iter.next() ) ) { + return false; + } + } + return true; + } + + + /** {@inheritDoc} */ + public boolean containsAll( byte[] array ) { + for ( byte element : array ) { + if ( ! TIntByteHashMap.this.containsValue( element ) ) { + return false; + } + } + return true; + } + + + /** {@inheritDoc} */ + public boolean addAll( Collection collection ) { + throw new UnsupportedOperationException(); + } + + + /** {@inheritDoc} */ + public boolean addAll( TByteCollection collection ) { + throw new UnsupportedOperationException(); + } + + + /** {@inheritDoc} */ + public boolean addAll( byte[] array ) { + throw new UnsupportedOperationException(); + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"SuspiciousMethodCalls"}) + public boolean retainAll( Collection collection ) { + boolean modified = false; + TByteIterator iter = iterator(); + while ( iter.hasNext() ) { + if ( ! collection.contains( Byte.valueOf ( iter.next() ) ) ) { + iter.remove(); + modified = true; + } + } + return modified; + } + + + /** {@inheritDoc} */ + public boolean retainAll( TByteCollection collection ) { + if ( this == collection ) { + return false; + } + boolean modified = false; + TByteIterator iter = iterator(); + while ( iter.hasNext() ) { + if ( ! collection.contains( iter.next() ) ) { + iter.remove(); + modified = true; + } + } + return modified; + } + + + /** {@inheritDoc} */ + public boolean retainAll( byte[] array ) { + boolean changed = false; + Arrays.sort( array ); + byte[] values = _values; + byte[] states = _states; + + for ( int i = values.length; i-- > 0; ) { + if ( states[i] == FULL && ( Arrays.binarySearch( array, values[i] ) < 0) ) { + removeAt( i ); + changed = true; + } + } + return changed; + } + + + /** {@inheritDoc} */ + public boolean removeAll( Collection collection ) { + boolean changed = false; + for ( Object element : collection ) { + if ( element instanceof Byte ) { + byte c = ( ( Byte ) element ).byteValue(); + if ( remove( c ) ) { + changed = true; + } + } + } + return changed; + } + + + /** {@inheritDoc} */ + public boolean removeAll( TByteCollection collection ) { + if ( this == collection ) { + clear(); + return true; + } + boolean changed = false; + TByteIterator iter = collection.iterator(); + while ( iter.hasNext() ) { + byte element = iter.next(); + if ( remove( element ) ) { + changed = true; + } + } + return changed; + } + + + /** {@inheritDoc} */ + public boolean removeAll( byte[] array ) { + boolean changed = false; + for ( int i = array.length; i-- > 0; ) { + if ( remove( array[i] ) ) { + changed = true; + } + } + return changed; + } + + + /** {@inheritDoc} */ + public void clear() { + TIntByteHashMap.this.clear(); + } + + + /** {@inheritDoc} */ + public boolean forEach( TByteProcedure procedure ) { + return TIntByteHashMap.this.forEachValue( procedure ); + } + + + /** {@inheritDoc} */ + @Override + public String toString() { + final StringBuilder buf = new StringBuilder( "{" ); + forEachValue( new TByteProcedure() { + private boolean first = true; + + public boolean execute( byte value ) { + if ( first ) { + first = false; + } else { + buf.append( ", " ); + } + + buf.append( value ); + return true; + } + } ); + buf.append( "}" ); + return buf.toString(); + } + } + + + class TIntByteKeyHashIterator extends THashPrimitiveIterator implements TIntIterator { + + /** + * Creates an iterator over the specified map + * + * @param hash the TPrimitiveHash we will be iterating over. + */ + TIntByteKeyHashIterator( TPrimitiveHash hash ) { + super( hash ); + } + + /** {@inheritDoc} */ + public int next() { + moveToNextIndex(); + return _set[_index]; + } + + /** @{inheritDoc} */ + public void remove() { + if ( _expectedSize != _hash.size() ) { + throw new ConcurrentModificationException(); + } + + // Disable auto compaction during the remove. This is a workaround for bug 1642768. + try { + _hash.tempDisableAutoCompaction(); + TIntByteHashMap.this.removeAt( _index ); + } + finally { + _hash.reenableAutoCompaction( false ); + } + + _expectedSize--; + } + } + + + + class TIntByteValueHashIterator extends THashPrimitiveIterator implements TByteIterator { + + /** + * Creates an iterator over the specified map + * + * @param hash the TPrimitiveHash we will be iterating over. + */ + TIntByteValueHashIterator( TPrimitiveHash hash ) { + super( hash ); + } + + /** {@inheritDoc} */ + public byte next() { + moveToNextIndex(); + return _values[_index]; + } + + /** @{inheritDoc} */ + public void remove() { + if ( _expectedSize != _hash.size() ) { + throw new ConcurrentModificationException(); + } + + // Disable auto compaction during the remove. This is a workaround for bug 1642768. + try { + _hash.tempDisableAutoCompaction(); + TIntByteHashMap.this.removeAt( _index ); + } + finally { + _hash.reenableAutoCompaction( false ); + } + + _expectedSize--; + } + } + + + class TIntByteHashIterator extends THashPrimitiveIterator implements TIntByteIterator { + + /** + * Creates an iterator over the specified map + * + * @param map the TIntByteHashMap we will be iterating over. + */ + TIntByteHashIterator( TIntByteHashMap map ) { + super( map ); + } + + /** {@inheritDoc} */ + public void advance() { + moveToNextIndex(); + } + + /** {@inheritDoc} */ + public int key() { + return _set[_index]; + } + + /** {@inheritDoc} */ + public byte value() { + return _values[_index]; + } + + /** {@inheritDoc} */ + public byte setValue( byte val ) { + byte old = value(); + _values[_index] = val; + return old; + } + + /** @{inheritDoc} */ + public void remove() { + if ( _expectedSize != _hash.size() ) { + throw new ConcurrentModificationException(); + } + // Disable auto compaction during the remove. This is a workaround for bug 1642768. + try { + _hash.tempDisableAutoCompaction(); + TIntByteHashMap.this.removeAt( _index ); + } + finally { + _hash.reenableAutoCompaction( false ); + } + _expectedSize--; + } + } + + + /** {@inheritDoc} */ + @Override + public boolean equals( Object other ) { + if ( ! ( other instanceof TIntByteMap ) ) { + return false; + } + TIntByteMap that = ( TIntByteMap ) other; + if ( that.size() != this.size() ) { + return false; + } + byte[] values = _values; + byte[] states = _states; + byte this_no_entry_value = getNoEntryValue(); + byte that_no_entry_value = that.getNoEntryValue(); + for ( int i = values.length; i-- > 0; ) { + if ( states[i] == FULL ) { + int key = _set[i]; + byte that_value = that.get( key ); + byte this_value = values[i]; + if ( ( this_value != that_value ) && + ( this_value != this_no_entry_value ) && + ( that_value != that_no_entry_value ) ) { + return false; + } + } + } + return true; + } + + + /** {@inheritDoc} */ + @Override + public int hashCode() { + int hashcode = 0; + byte[] states = _states; + for ( int i = _values.length; i-- > 0; ) { + if ( states[i] == FULL ) { + hashcode += HashFunctions.hash( _set[i] ) ^ + HashFunctions.hash( _values[i] ); + } + } + return hashcode; + } + + + /** {@inheritDoc} */ + @Override + public String toString() { + final StringBuilder buf = new StringBuilder( "{" ); + forEachEntry( new TIntByteProcedure() { + private boolean first = true; + public boolean execute( int key, byte value ) { + if ( first ) first = false; + else buf.append( ", " ); + + buf.append(key); + buf.append("="); + buf.append(value); + return true; + } + }); + buf.append( "}" ); + return buf.toString(); + } + + + /** {@inheritDoc} */ + public void writeExternal(ObjectOutput out) throws IOException { + // VERSION + out.writeByte( 0 ); + + // SUPER + super.writeExternal( out ); + + // NUMBER OF ENTRIES + out.writeInt( _size ); + + // ENTRIES + for ( int i = _states.length; i-- > 0; ) { + if ( _states[i] == FULL ) { + out.writeInt( _set[i] ); + out.writeByte( _values[i] ); + } + } + } + + + /** {@inheritDoc} */ + public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { + // VERSION + in.readByte(); + + // SUPER + super.readExternal( in ); + + // NUMBER OF ENTRIES + int size = in.readInt(); + setUp( size ); + + // ENTRIES + while (size-- > 0) { + int key = in.readInt(); + byte val = in.readByte(); + put(key, val); + } + } +} // TIntByteHashMap diff --git a/src/gnu/trove/map/hash/TIntIntHashMap.java b/src/gnu/trove/map/hash/TIntIntHashMap.java new file mode 100644 index 00000000..4775dca5 --- /dev/null +++ b/src/gnu/trove/map/hash/TIntIntHashMap.java @@ -0,0 +1,1287 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.map.hash; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + +import gnu.trove.map.TIntIntMap; +import gnu.trove.function.TIntFunction; +import gnu.trove.procedure.*; +import gnu.trove.set.*; +import gnu.trove.iterator.*; +import gnu.trove.iterator.hash.*; +import gnu.trove.impl.hash.*; +import gnu.trove.impl.HashFunctions; +import gnu.trove.*; + +import java.io.*; +import java.util.*; + +/** + * An open addressed Map implementation for int keys and int values. + * + * @author Eric D. Friedman + * @author Rob Eden + * @author Jeff Randall + * @version $Id: _K__V_HashMap.template,v 1.1.2.16 2010/03/02 04:09:50 robeden Exp $ + */ +public class TIntIntHashMap extends TIntIntHash implements TIntIntMap, Externalizable { + static final long serialVersionUID = 1L; + + /** the values of the map */ + protected transient int[] _values; + + + /** + * Creates a new TIntIntHashMap instance with the default + * capacity and load factor. + */ + public TIntIntHashMap() { + super(); + } + + + /** + * Creates a new TIntIntHashMap instance with a prime + * capacity equal to or greater than initialCapacity and + * with the default load factor. + * + * @param initialCapacity an int value + */ + public TIntIntHashMap( int initialCapacity ) { + super( initialCapacity ); + } + + + /** + * Creates a new TIntIntHashMap instance with a prime + * capacity equal to or greater than initialCapacity and + * with the specified load factor. + * + * @param initialCapacity an int value + * @param loadFactor a float value + */ + public TIntIntHashMap( int initialCapacity, float loadFactor ) { + super( initialCapacity, loadFactor ); + } + + + /** + * Creates a new TIntIntHashMap instance with a prime + * capacity equal to or greater than initialCapacity and + * with the specified load factor. + * + * @param initialCapacity an int value + * @param loadFactor a float value + * @param noEntryKey a int value that represents + * null for the Key set. + * @param noEntryValue a int value that represents + * null for the Value set. + */ + public TIntIntHashMap( int initialCapacity, float loadFactor, + int noEntryKey, int noEntryValue ) { + super( initialCapacity, loadFactor, noEntryKey, noEntryValue ); + } + + + /** + * Creates a new TIntIntHashMap instance containing + * all of the entries in the map passed in. + * + * @param keys a int array containing the keys for the matching values. + * @param values a int array containing the values. + */ + public TIntIntHashMap( int[] keys, int[] values ) { + super( Math.max( keys.length, values.length ) ); + + int size = Math.min( keys.length, values.length ); + for ( int i = 0; i < size; i++ ) { + this.put( keys[i], values[i] ); + } + } + + + /** + * Creates a new TIntIntHashMap instance containing + * all of the entries in the map passed in. + * + * @param map a TIntIntMap that will be duplicated. + */ + public TIntIntHashMap( TIntIntMap map ) { + super( map.size() ); + if ( map instanceof TIntIntHashMap ) { + TIntIntHashMap hashmap = ( TIntIntHashMap ) map; + this._loadFactor = hashmap._loadFactor; + this.no_entry_key = hashmap.no_entry_key; + this.no_entry_value = hashmap.no_entry_value; + //noinspection RedundantCast + if ( this.no_entry_key != ( int ) 0 ) { + Arrays.fill( _set, this.no_entry_key ); + } + //noinspection RedundantCast + if ( this.no_entry_value != ( int ) 0 ) { + Arrays.fill( _values, this.no_entry_value ); + } + setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); + } + putAll( map ); + } + + + /** + * initializes the hashtable to a prime capacity which is at least + * initialCapacity + 1. + * + * @param initialCapacity an int value + * @return the actual capacity chosen + */ + protected int setUp( int initialCapacity ) { + int capacity; + + capacity = super.setUp( initialCapacity ); + _values = new int[capacity]; + return capacity; + } + + + /** + * rehashes the map to the new capacity. + * + * @param newCapacity an int value + */ + /** {@inheritDoc} */ + protected void rehash( int newCapacity ) { + int oldCapacity = _set.length; + + int oldKeys[] = _set; + int oldVals[] = _values; + byte oldStates[] = _states; + + _set = new int[newCapacity]; + _values = new int[newCapacity]; + _states = new byte[newCapacity]; + + for ( int i = oldCapacity; i-- > 0; ) { + if( oldStates[i] == FULL ) { + int o = oldKeys[i]; + int index = insertKey( o ); + _values[index] = oldVals[i]; + } + } + } + + + /** {@inheritDoc} */ + public int put( int key, int value ) { + int index = insertKey( key ); + return doPut( key, value, index ); + } + + + /** {@inheritDoc} */ + public int putIfAbsent( int key, int value ) { + int index = insertKey( key ); + if (index < 0) + return _values[-index - 1]; + return doPut( key, value, index ); + } + + + private int doPut( int key, int value, int index ) { + int previous = no_entry_value; + boolean isNewMapping = true; + if ( index < 0 ) { + index = -index -1; + previous = _values[index]; + isNewMapping = false; + } + _values[index] = value; + + if (isNewMapping) { + postInsertHook( consumeFreeSlot ); + } + + return previous; + } + + + /** {@inheritDoc} */ + public void putAll( Map map ) { + ensureCapacity( map.size() ); + // could optimize this for cases when map instanceof THashMap + for ( Map.Entry entry : map.entrySet() ) { + this.put( entry.getKey().intValue(), entry.getValue().intValue() ); + } + } + + + /** {@inheritDoc} */ + public void putAll( TIntIntMap map ) { + ensureCapacity( map.size() ); + TIntIntIterator iter = map.iterator(); + while ( iter.hasNext() ) { + iter.advance(); + this.put( iter.key(), iter.value() ); + } + } + + + /** {@inheritDoc} */ + public int get( int key ) { + int index = index( key ); + return index < 0 ? no_entry_value : _values[index]; + } + + + /** {@inheritDoc} */ + public void clear() { + super.clear(); + Arrays.fill( _set, 0, _set.length, no_entry_key ); + Arrays.fill( _values, 0, _values.length, no_entry_value ); + Arrays.fill( _states, 0, _states.length, FREE ); + } + + + /** {@inheritDoc} */ + public boolean isEmpty() { + return 0 == _size; + } + + + /** {@inheritDoc} */ + public int remove( int key ) { + int prev = no_entry_value; + int index = index( key ); + if ( index >= 0 ) { + prev = _values[index]; + removeAt( index ); // clear key,state; adjust size + } + return prev; + } + + + /** {@inheritDoc} */ + protected void removeAt( int index ) { + _values[index] = no_entry_value; + super.removeAt( index ); // clear key, state; adjust size + } + + + /** {@inheritDoc} */ + public TIntSet keySet() { + return new TKeyView(); + } + + + /** {@inheritDoc} */ + public int[] keys() { + int[] keys = new int[size()]; + int[] k = _set; + byte[] states = _states; + + for ( int i = k.length, j = 0; i-- > 0; ) { + if ( states[i] == FULL ) { + keys[j++] = k[i]; + } + } + return keys; + } + + + /** {@inheritDoc} */ + public int[] keys( int[] array ) { + int size = size(); + if ( array.length < size ) { + array = new int[size]; + } + + int[] keys = _set; + byte[] states = _states; + + for ( int i = keys.length, j = 0; i-- > 0; ) { + if ( states[i] == FULL ) { + array[j++] = keys[i]; + } + } + return array; + } + + + /** {@inheritDoc} */ + public TIntCollection valueCollection() { + return new TValueView(); + } + + + /** {@inheritDoc} */ + public int[] values() { + int[] vals = new int[size()]; + int[] v = _values; + byte[] states = _states; + + for ( int i = v.length, j = 0; i-- > 0; ) { + if ( states[i] == FULL ) { + vals[j++] = v[i]; + } + } + return vals; + } + + + /** {@inheritDoc} */ + public int[] values( int[] array ) { + int size = size(); + if ( array.length < size ) { + array = new int[size]; + } + + int[] v = _values; + byte[] states = _states; + + for ( int i = v.length, j = 0; i-- > 0; ) { + if ( states[i] == FULL ) { + array[j++] = v[i]; + } + } + return array; + } + + + /** {@inheritDoc} */ + public boolean containsValue( int val ) { + byte[] states = _states; + int[] vals = _values; + + for ( int i = vals.length; i-- > 0; ) { + if ( states[i] == FULL && val == vals[i] ) { + return true; + } + } + return false; + } + + + /** {@inheritDoc} */ + public boolean containsKey( int key ) { + return contains( key ); + } + + + /** {@inheritDoc} */ + public TIntIntIterator iterator() { + return new TIntIntHashIterator( this ); + } + + + /** {@inheritDoc} */ + public boolean forEachKey( TIntProcedure procedure ) { + return forEach( procedure ); + } + + + /** {@inheritDoc} */ + public boolean forEachValue( TIntProcedure procedure ) { + byte[] states = _states; + int[] values = _values; + for ( int i = values.length; i-- > 0; ) { + if ( states[i] == FULL && ! procedure.execute( values[i] ) ) { + return false; + } + } + return true; + } + + + /** {@inheritDoc} */ + public boolean forEachEntry( TIntIntProcedure procedure ) { + byte[] states = _states; + int[] keys = _set; + int[] values = _values; + for ( int i = keys.length; i-- > 0; ) { + if ( states[i] == FULL && ! procedure.execute( keys[i], values[i] ) ) { + return false; + } + } + return true; + } + + + /** {@inheritDoc} */ + public void transformValues( TIntFunction function ) { + byte[] states = _states; + int[] values = _values; + for ( int i = values.length; i-- > 0; ) { + if ( states[i] == FULL ) { + values[i] = function.execute( values[i] ); + } + } + } + + + /** {@inheritDoc} */ + public boolean retainEntries( TIntIntProcedure procedure ) { + boolean modified = false; + byte[] states = _states; + int[] keys = _set; + int[] values = _values; + + + // Temporarily disable compaction. This is a fix for bug #1738760 + tempDisableAutoCompaction(); + try { + for ( int i = keys.length; i-- > 0; ) { + if ( states[i] == FULL && ! procedure.execute( keys[i], values[i] ) ) { + removeAt( i ); + modified = true; + } + } + } + finally { + reenableAutoCompaction( true ); + } + + return modified; + } + + + /** {@inheritDoc} */ + public boolean increment( int key ) { + return adjustValue( key, ( int ) 1 ); + } + + + /** {@inheritDoc} */ + public boolean adjustValue( int key, int amount ) { + int index = index( key ); + if (index < 0) { + return false; + } else { + _values[index] += amount; + return true; + } + } + + + /** {@inheritDoc} */ + public int adjustOrPutValue( int key, int adjust_amount, int put_amount ) { + int index = insertKey( key ); + final boolean isNewMapping; + final int newValue; + if ( index < 0 ) { + index = -index -1; + newValue = ( _values[index] += adjust_amount ); + isNewMapping = false; + } else { + newValue = ( _values[index] = put_amount ); + isNewMapping = true; + } + + byte previousState = _states[index]; + + if ( isNewMapping ) { + postInsertHook(consumeFreeSlot); + } + + return newValue; + } + + + /** a view onto the keys of the map. */ + protected class TKeyView implements TIntSet { + + /** {@inheritDoc} */ + public TIntIterator iterator() { + return new TIntIntKeyHashIterator( TIntIntHashMap.this ); + } + + + /** {@inheritDoc} */ + public int getNoEntryValue() { + return no_entry_key; + } + + + /** {@inheritDoc} */ + public int size() { + return _size; + } + + + /** {@inheritDoc} */ + public boolean isEmpty() { + return 0 == _size; + } + + + /** {@inheritDoc} */ + public boolean contains( int entry ) { + return TIntIntHashMap.this.contains( entry ); + } + + + /** {@inheritDoc} */ + public int[] toArray() { + return TIntIntHashMap.this.keys(); + } + + + /** {@inheritDoc} */ + public int[] toArray( int[] dest ) { + return TIntIntHashMap.this.keys( dest ); + } + + + /** + * Unsupported when operating upon a Key Set view of a TIntIntMap + *

+ * {@inheritDoc} + */ + public boolean add( int entry ) { + throw new UnsupportedOperationException(); + } + + + /** {@inheritDoc} */ + public boolean remove( int entry ) { + return no_entry_value != TIntIntHashMap.this.remove( entry ); + } + + + /** {@inheritDoc} */ + public boolean containsAll( Collection collection ) { + for ( Object element : collection ) { + if ( element instanceof Integer ) { + int ele = ( ( Integer ) element ).intValue(); + if ( ! TIntIntHashMap.this.containsKey( ele ) ) { + return false; + } + } else { + return false; + } + } + return true; + } + + + /** {@inheritDoc} */ + public boolean containsAll( TIntCollection collection ) { + TIntIterator iter = collection.iterator(); + while ( iter.hasNext() ) { + if ( ! TIntIntHashMap.this.containsKey( iter.next() ) ) { + return false; + } + } + return true; + } + + + /** {@inheritDoc} */ + public boolean containsAll( int[] array ) { + for ( int element : array ) { + if ( ! TIntIntHashMap.this.contains( element ) ) { + return false; + } + } + return true; + } + + + /** + * Unsupported when operating upon a Key Set view of a TIntIntMap + *

+ * {@inheritDoc} + */ + public boolean addAll( Collection collection ) { + throw new UnsupportedOperationException(); + } + + + /** + * Unsupported when operating upon a Key Set view of a TIntIntMap + *

+ * {@inheritDoc} + */ + public boolean addAll( TIntCollection collection ) { + throw new UnsupportedOperationException(); + } + + + /** + * Unsupported when operating upon a Key Set view of a TIntIntMap + *

+ * {@inheritDoc} + */ + public boolean addAll( int[] array ) { + throw new UnsupportedOperationException(); + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"SuspiciousMethodCalls"}) + public boolean retainAll( Collection collection ) { + boolean modified = false; + TIntIterator iter = iterator(); + while ( iter.hasNext() ) { + if ( ! collection.contains( Integer.valueOf ( iter.next() ) ) ) { + iter.remove(); + modified = true; + } + } + return modified; + } + + + /** {@inheritDoc} */ + public boolean retainAll( TIntCollection collection ) { + if ( this == collection ) { + return false; + } + boolean modified = false; + TIntIterator iter = iterator(); + while ( iter.hasNext() ) { + if ( ! collection.contains( iter.next() ) ) { + iter.remove(); + modified = true; + } + } + return modified; + } + + + /** {@inheritDoc} */ + public boolean retainAll( int[] array ) { + boolean changed = false; + Arrays.sort( array ); + int[] set = _set; + byte[] states = _states; + + for ( int i = set.length; i-- > 0; ) { + if ( states[i] == FULL && ( Arrays.binarySearch( array, set[i] ) < 0) ) { + removeAt( i ); + changed = true; + } + } + return changed; + } + + + /** {@inheritDoc} */ + public boolean removeAll( Collection collection ) { + boolean changed = false; + for ( Object element : collection ) { + if ( element instanceof Integer ) { + int c = ( ( Integer ) element ).intValue(); + if ( remove( c ) ) { + changed = true; + } + } + } + return changed; + } + + + /** {@inheritDoc} */ + public boolean removeAll( TIntCollection collection ) { + if ( this == collection ) { + clear(); + return true; + } + boolean changed = false; + TIntIterator iter = collection.iterator(); + while ( iter.hasNext() ) { + int element = iter.next(); + if ( remove( element ) ) { + changed = true; + } + } + return changed; + } + + + /** {@inheritDoc} */ + public boolean removeAll( int[] array ) { + boolean changed = false; + for ( int i = array.length; i-- > 0; ) { + if ( remove( array[i] ) ) { + changed = true; + } + } + return changed; + } + + + /** {@inheritDoc} */ + public void clear() { + TIntIntHashMap.this.clear(); + } + + + /** {@inheritDoc} */ + public boolean forEach( TIntProcedure procedure ) { + return TIntIntHashMap.this.forEachKey( procedure ); + } + + + @Override + public boolean equals( Object other ) { + if (! (other instanceof TIntSet)) { + return false; + } + final TIntSet that = ( TIntSet ) other; + if ( that.size() != this.size() ) { + return false; + } + for ( int i = _states.length; i-- > 0; ) { + if ( _states[i] == FULL ) { + if ( ! that.contains( _set[i] ) ) { + return false; + } + } + } + return true; + } + + + @Override + public int hashCode() { + int hashcode = 0; + for ( int i = _states.length; i-- > 0; ) { + if ( _states[i] == FULL ) { + hashcode += HashFunctions.hash( _set[i] ); + } + } + return hashcode; + } + + + @Override + public String toString() { + final StringBuilder buf = new StringBuilder( "{" ); + forEachKey( new TIntProcedure() { + private boolean first = true; + + + public boolean execute( int key ) { + if ( first ) { + first = false; + } else { + buf.append( ", " ); + } + + buf.append( key ); + return true; + } + } ); + buf.append( "}" ); + return buf.toString(); + } + } + + + /** a view onto the values of the map. */ + protected class TValueView implements TIntCollection { + + /** {@inheritDoc} */ + public TIntIterator iterator() { + return new TIntIntValueHashIterator( TIntIntHashMap.this ); + } + + + /** {@inheritDoc} */ + public int getNoEntryValue() { + return no_entry_value; + } + + + /** {@inheritDoc} */ + public int size() { + return _size; + } + + + /** {@inheritDoc} */ + public boolean isEmpty() { + return 0 == _size; + } + + + /** {@inheritDoc} */ + public boolean contains( int entry ) { + return TIntIntHashMap.this.containsValue( entry ); + } + + + /** {@inheritDoc} */ + public int[] toArray() { + return TIntIntHashMap.this.values(); + } + + + /** {@inheritDoc} */ + public int[] toArray( int[] dest ) { + return TIntIntHashMap.this.values( dest ); + } + + + + public boolean add( int entry ) { + throw new UnsupportedOperationException(); + } + + + /** {@inheritDoc} */ + public boolean remove( int entry ) { + int[] values = _values; + int[] set = _set; + + for ( int i = values.length; i-- > 0; ) { + if ( ( set[i] != FREE && set[i] != REMOVED ) && entry == values[i] ) { + removeAt( i ); + return true; + } + } + return false; + } + + + /** {@inheritDoc} */ + public boolean containsAll( Collection collection ) { + for ( Object element : collection ) { + if ( element instanceof Integer ) { + int ele = ( ( Integer ) element ).intValue(); + if ( ! TIntIntHashMap.this.containsValue( ele ) ) { + return false; + } + } else { + return false; + } + } + return true; + } + + + /** {@inheritDoc} */ + public boolean containsAll( TIntCollection collection ) { + TIntIterator iter = collection.iterator(); + while ( iter.hasNext() ) { + if ( ! TIntIntHashMap.this.containsValue( iter.next() ) ) { + return false; + } + } + return true; + } + + + /** {@inheritDoc} */ + public boolean containsAll( int[] array ) { + for ( int element : array ) { + if ( ! TIntIntHashMap.this.containsValue( element ) ) { + return false; + } + } + return true; + } + + + /** {@inheritDoc} */ + public boolean addAll( Collection collection ) { + throw new UnsupportedOperationException(); + } + + + /** {@inheritDoc} */ + public boolean addAll( TIntCollection collection ) { + throw new UnsupportedOperationException(); + } + + + /** {@inheritDoc} */ + public boolean addAll( int[] array ) { + throw new UnsupportedOperationException(); + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"SuspiciousMethodCalls"}) + public boolean retainAll( Collection collection ) { + boolean modified = false; + TIntIterator iter = iterator(); + while ( iter.hasNext() ) { + if ( ! collection.contains( Integer.valueOf ( iter.next() ) ) ) { + iter.remove(); + modified = true; + } + } + return modified; + } + + + /** {@inheritDoc} */ + public boolean retainAll( TIntCollection collection ) { + if ( this == collection ) { + return false; + } + boolean modified = false; + TIntIterator iter = iterator(); + while ( iter.hasNext() ) { + if ( ! collection.contains( iter.next() ) ) { + iter.remove(); + modified = true; + } + } + return modified; + } + + + /** {@inheritDoc} */ + public boolean retainAll( int[] array ) { + boolean changed = false; + Arrays.sort( array ); + int[] values = _values; + byte[] states = _states; + + for ( int i = values.length; i-- > 0; ) { + if ( states[i] == FULL && ( Arrays.binarySearch( array, values[i] ) < 0) ) { + removeAt( i ); + changed = true; + } + } + return changed; + } + + + /** {@inheritDoc} */ + public boolean removeAll( Collection collection ) { + boolean changed = false; + for ( Object element : collection ) { + if ( element instanceof Integer ) { + int c = ( ( Integer ) element ).intValue(); + if ( remove( c ) ) { + changed = true; + } + } + } + return changed; + } + + + /** {@inheritDoc} */ + public boolean removeAll( TIntCollection collection ) { + if ( this == collection ) { + clear(); + return true; + } + boolean changed = false; + TIntIterator iter = collection.iterator(); + while ( iter.hasNext() ) { + int element = iter.next(); + if ( remove( element ) ) { + changed = true; + } + } + return changed; + } + + + /** {@inheritDoc} */ + public boolean removeAll( int[] array ) { + boolean changed = false; + for ( int i = array.length; i-- > 0; ) { + if ( remove( array[i] ) ) { + changed = true; + } + } + return changed; + } + + + /** {@inheritDoc} */ + public void clear() { + TIntIntHashMap.this.clear(); + } + + + /** {@inheritDoc} */ + public boolean forEach( TIntProcedure procedure ) { + return TIntIntHashMap.this.forEachValue( procedure ); + } + + + /** {@inheritDoc} */ + @Override + public String toString() { + final StringBuilder buf = new StringBuilder( "{" ); + forEachValue( new TIntProcedure() { + private boolean first = true; + + public boolean execute( int value ) { + if ( first ) { + first = false; + } else { + buf.append( ", " ); + } + + buf.append( value ); + return true; + } + } ); + buf.append( "}" ); + return buf.toString(); + } + } + + + class TIntIntKeyHashIterator extends THashPrimitiveIterator implements TIntIterator { + + /** + * Creates an iterator over the specified map + * + * @param hash the TPrimitiveHash we will be iterating over. + */ + TIntIntKeyHashIterator( TPrimitiveHash hash ) { + super( hash ); + } + + /** {@inheritDoc} */ + public int next() { + moveToNextIndex(); + return _set[_index]; + } + + /** @{inheritDoc} */ + public void remove() { + if ( _expectedSize != _hash.size() ) { + throw new ConcurrentModificationException(); + } + + // Disable auto compaction during the remove. This is a workaround for bug 1642768. + try { + _hash.tempDisableAutoCompaction(); + TIntIntHashMap.this.removeAt( _index ); + } + finally { + _hash.reenableAutoCompaction( false ); + } + + _expectedSize--; + } + } + + + + class TIntIntValueHashIterator extends THashPrimitiveIterator implements TIntIterator { + + /** + * Creates an iterator over the specified map + * + * @param hash the TPrimitiveHash we will be iterating over. + */ + TIntIntValueHashIterator( TPrimitiveHash hash ) { + super( hash ); + } + + /** {@inheritDoc} */ + public int next() { + moveToNextIndex(); + return _values[_index]; + } + + /** @{inheritDoc} */ + public void remove() { + if ( _expectedSize != _hash.size() ) { + throw new ConcurrentModificationException(); + } + + // Disable auto compaction during the remove. This is a workaround for bug 1642768. + try { + _hash.tempDisableAutoCompaction(); + TIntIntHashMap.this.removeAt( _index ); + } + finally { + _hash.reenableAutoCompaction( false ); + } + + _expectedSize--; + } + } + + + class TIntIntHashIterator extends THashPrimitiveIterator implements TIntIntIterator { + + /** + * Creates an iterator over the specified map + * + * @param map the TIntIntHashMap we will be iterating over. + */ + TIntIntHashIterator( TIntIntHashMap map ) { + super( map ); + } + + /** {@inheritDoc} */ + public void advance() { + moveToNextIndex(); + } + + /** {@inheritDoc} */ + public int key() { + return _set[_index]; + } + + /** {@inheritDoc} */ + public int value() { + return _values[_index]; + } + + /** {@inheritDoc} */ + public int setValue( int val ) { + int old = value(); + _values[_index] = val; + return old; + } + + /** @{inheritDoc} */ + public void remove() { + if ( _expectedSize != _hash.size() ) { + throw new ConcurrentModificationException(); + } + // Disable auto compaction during the remove. This is a workaround for bug 1642768. + try { + _hash.tempDisableAutoCompaction(); + TIntIntHashMap.this.removeAt( _index ); + } + finally { + _hash.reenableAutoCompaction( false ); + } + _expectedSize--; + } + } + + + /** {@inheritDoc} */ + @Override + public boolean equals( Object other ) { + if ( ! ( other instanceof TIntIntMap ) ) { + return false; + } + TIntIntMap that = ( TIntIntMap ) other; + if ( that.size() != this.size() ) { + return false; + } + int[] values = _values; + byte[] states = _states; + int this_no_entry_value = getNoEntryValue(); + int that_no_entry_value = that.getNoEntryValue(); + for ( int i = values.length; i-- > 0; ) { + if ( states[i] == FULL ) { + int key = _set[i]; + int that_value = that.get( key ); + int this_value = values[i]; + if ( ( this_value != that_value ) && + ( this_value != this_no_entry_value ) && + ( that_value != that_no_entry_value ) ) { + return false; + } + } + } + return true; + } + + + /** {@inheritDoc} */ + @Override + public int hashCode() { + int hashcode = 0; + byte[] states = _states; + for ( int i = _values.length; i-- > 0; ) { + if ( states[i] == FULL ) { + hashcode += HashFunctions.hash( _set[i] ) ^ + HashFunctions.hash( _values[i] ); + } + } + return hashcode; + } + + + /** {@inheritDoc} */ + @Override + public String toString() { + final StringBuilder buf = new StringBuilder( "{" ); + forEachEntry( new TIntIntProcedure() { + private boolean first = true; + public boolean execute( int key, int value ) { + if ( first ) first = false; + else buf.append( ", " ); + + buf.append(key); + buf.append("="); + buf.append(value); + return true; + } + }); + buf.append( "}" ); + return buf.toString(); + } + + + /** {@inheritDoc} */ + public void writeExternal(ObjectOutput out) throws IOException { + // VERSION + out.writeByte( 0 ); + + // SUPER + super.writeExternal( out ); + + // NUMBER OF ENTRIES + out.writeInt( _size ); + + // ENTRIES + for ( int i = _states.length; i-- > 0; ) { + if ( _states[i] == FULL ) { + out.writeInt( _set[i] ); + out.writeInt( _values[i] ); + } + } + } + + + /** {@inheritDoc} */ + public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { + // VERSION + in.readByte(); + + // SUPER + super.readExternal( in ); + + // NUMBER OF ENTRIES + int size = in.readInt(); + setUp( size ); + + // ENTRIES + while (size-- > 0) { + int key = in.readInt(); + int val = in.readInt(); + put(key, val); + } + } +} // TIntIntHashMap diff --git a/src/gnu/trove/map/hash/TIntObjectHashMap.java b/src/gnu/trove/map/hash/TIntObjectHashMap.java new file mode 100644 index 00000000..94b1bdc3 --- /dev/null +++ b/src/gnu/trove/map/hash/TIntObjectHashMap.java @@ -0,0 +1,1025 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.map.hash; + +import gnu.trove.map.TIntObjectMap; +import gnu.trove.impl.Constants; +import gnu.trove.impl.HashFunctions; +import gnu.trove.impl.hash.*; +import gnu.trove.procedure.TIntObjectProcedure; +import gnu.trove.procedure.TIntProcedure; +import gnu.trove.procedure.TObjectProcedure; +import gnu.trove.iterator.TIntIterator; +import gnu.trove.iterator.TIntObjectIterator; +import gnu.trove.iterator.TPrimitiveIterator; +import gnu.trove.function.TObjectFunction; +import gnu.trove.set.TIntSet; +import gnu.trove.TIntCollection; + +import java.io.*; +import java.util.*; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * An open addressed Map implementation for int keys and Object values. + * + * Created: Sun Nov 4 08:52:45 2001 + * + * @author Eric D. Friedman + * @author Rob Eden + * @author Jeff Randall + */ +public class TIntObjectHashMap extends TIntHash implements + TIntObjectMap, Externalizable { + + static final long serialVersionUID = 1L; + + private final TIntObjectProcedure PUT_ALL_PROC = new TIntObjectProcedure() { + public boolean execute( int key, V value) { + put( key, value ); + return true; + } + }; + + /** the values of the map */ + protected transient V[] _values; + + /** the value that represents null in the key set. */ + protected int no_entry_key; + + + /** + * Creates a new TIntObjectHashMap instance with the default + * capacity and load factor. + */ + public TIntObjectHashMap() { + super(); + } + + + /** + * Creates a new TIntObjectHashMap instance with a prime + * capacity equal to or greater than initialCapacity and + * with the default load factor. + * + * @param initialCapacity an int value + */ + public TIntObjectHashMap( int initialCapacity ) { + super( initialCapacity ); + no_entry_key = Constants.DEFAULT_INT_NO_ENTRY_VALUE; + } + + + /** + * Creates a new TIntObjectHashMap instance with a prime + * capacity equal to or greater than initialCapacity and + * with the specified load factor. + * + * @param initialCapacity an int value + * @param loadFactor a float value + */ + public TIntObjectHashMap( int initialCapacity, float loadFactor ) { + super( initialCapacity, loadFactor ); + no_entry_key = Constants.DEFAULT_INT_NO_ENTRY_VALUE; + } + + + /** + * Creates a new TIntObjectHashMap instance with a prime + * value at or near the specified capacity and load factor. + * + * @param initialCapacity used to find a prime capacity for the table. + * @param loadFactor used to calculate the threshold over which + * rehashing takes place. + * @param noEntryKey the value used to represent null in the key set. + */ + public TIntObjectHashMap( int initialCapacity, float loadFactor, int noEntryKey ) { + super( initialCapacity, loadFactor ); + no_entry_key = noEntryKey; + } + + + /** + * Creates a new TIntObjectHashMap that contains the entries + * in the map passed to it. + * + * @param map the TIntObjectMap to be copied. + */ + public TIntObjectHashMap( TIntObjectMap map ) { + this( map.size(), 0.5f, map.getNoEntryKey() ); + putAll( map ); + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"unchecked"}) + protected int setUp( int initialCapacity ) { + int capacity; + + capacity = super.setUp( initialCapacity ); + _values = ( V[] ) new Object[capacity]; + return capacity; + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"unchecked"}) + protected void rehash( int newCapacity ) { + int oldCapacity = _set.length; + + int oldKeys[] = _set; + V oldVals[] = _values; + byte oldStates[] = _states; + + _set = new int[newCapacity]; + _values = (V[]) new Object[newCapacity]; + _states = new byte[newCapacity]; + + for ( int i = oldCapacity; i-- > 0; ) { + if( oldStates[i] == FULL ) { + int o = oldKeys[i]; + int index = insertKey(o); + _values[index] = oldVals[i]; + } + } + } + + + // Query Operations + + /** {@inheritDoc} */ + public int getNoEntryKey() { + return no_entry_key; + } + + + /** {@inheritDoc} */ + public boolean containsKey( int key ) { + return contains( key ); + } + + + /** {@inheritDoc} */ + public boolean containsValue( Object val ) { + byte[] states = _states; + V[] vals = _values; + + // special case null values so that we don't have to + // perform null checks before every call to equals() + if ( null == val ) { + for ( int i = vals.length; i-- > 0; ) { + if ( states[i] == FULL && null == vals[i] ) { + return true; + } + } + } else { + for ( int i = vals.length; i-- > 0; ) { + if ( states[i] == FULL && + ( val == vals[i] || val.equals( vals[i] ) ) ) { + return true; + } + } + } // end of else + return false; + } + + + /** {@inheritDoc} */ + public V get( int key ) { + int index = index( key ); + return index < 0 ? null : _values[index]; + } + + + // Modification Operations + + /** {@inheritDoc} */ + public V put( int key, V value ) { + int index = insertKey( key ); + return doPut( value, index ); + } + + + /** {@inheritDoc} */ + public V putIfAbsent( int key, V value ) { + int index = insertKey( key ); + if ( index < 0 ) + return _values[-index - 1]; + return doPut( value, index ); + } + + + @SuppressWarnings({"unchecked"}) + private V doPut( V value, int index ) { + V previous = null; + boolean isNewMapping = true; + if ( index < 0 ) { + index = -index -1; + previous = _values[index]; + isNewMapping = false; + } + + _values[index] = value; + + if (isNewMapping) { + postInsertHook( consumeFreeSlot ); + } + + return previous; + } + + + /** {@inheritDoc} */ + public V remove( int key ) { + V prev = null; + int index = index( key ); + if ( index >= 0 ) { + prev = _values[index]; + removeAt( index ); // clear key,state; adjust size + } + return prev; + } + + + /** {@inheritDoc} */ + protected void removeAt( int index ) { + _values[index] = null; + super.removeAt( index ); // clear key, state; adjust size + } + + + // Bulk Operations + + /** {@inheritDoc} */ + public void putAll( Map map ) { + Set> set = map.entrySet(); + for ( Map.Entry entry : set ) { + put( entry.getKey(), entry.getValue() ); + } + } + + + /** {@inheritDoc} */ + public void putAll( TIntObjectMap map ){ + map.forEachEntry( PUT_ALL_PROC ); + } + + + /** {@inheritDoc} */ + public void clear() { + super.clear(); + Arrays.fill( _set, 0, _set.length, no_entry_key ); + Arrays.fill( _states, 0, _states.length, FREE ); + Arrays.fill( _values, 0, _values.length, null ); + } + + + // Views + + /** {@inheritDoc} */ + public TIntSet keySet() { + return new KeyView(); + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"unchecked"}) + public int[] keys() { + int[] keys = new int[size()]; + int[] k = _set; + byte[] states = _states; + + for ( int i = k.length, j = 0; i-- > 0; ) { + if ( states[i] == FULL ) { + keys[j++] = k[i]; + } + } + return keys; + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"unchecked"}) + public int[] keys( int[] dest ) { + if ( dest.length < _size ) { + dest = new int[_size]; + } + + int[] k = _set; + byte[] states = _states; + + for ( int i = k.length, j = 0; i-- > 0; ) { + if ( states[i] == FULL ) { + dest[j++] = k[i]; + } + } + return dest; + } + + + /** {@inheritDoc} */ + public Collection valueCollection() { + return new ValueView(); + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"unchecked"}) + public Object[] values() { + Object[] vals = new Object[size()]; + V[] v = _values; + byte[] states = _states; + + for ( int i = v.length, j = 0; i-- > 0; ) { + if ( states[i] == FULL ) { + vals[j++] = v[i]; + } + } + return vals; + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"unchecked"}) + public V[] values( V[] dest ) { + if ( dest.length < _size ) { + dest = ( V[] ) java.lang.reflect.Array.newInstance( + dest.getClass().getComponentType(), _size); + } + + V[] v = _values; + byte[] states = _states; + + for ( int i = v.length, j = 0; i-- > 0; ) { + if ( states[i] == FULL ) { + dest[j++] = ( V ) v[i]; + } + } + return dest; + } + + + /** {@inheritDoc} */ + public TIntObjectIterator iterator() { + return new TIntObjectHashIterator( this ); + } + + + /** {@inheritDoc} */ + public boolean forEachKey( TIntProcedure procedure ) { + return forEach( procedure ); + } + + + /** {@inheritDoc} */ + public boolean forEachValue( TObjectProcedure procedure ) { + byte[] states = _states; + V[] values = _values; + for ( int i = values.length; i-- > 0; ) { + if ( states[i] == FULL && ! procedure.execute( values[i] ) ) { + return false; + } + } + return true; + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"unchecked"}) + public boolean forEachEntry( TIntObjectProcedure procedure ) { + byte[] states = _states; + int[] keys = _set; + V[] values = _values; + for (int i = keys.length; i-- > 0;) { + if (states[i] == FULL && ! procedure.execute(keys[i],values[i])) { + return false; + } + } + return true; + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"unchecked"}) + public boolean retainEntries( TIntObjectProcedure procedure ) { + boolean modified = false; + byte[] states = _states; + int[] keys = _set; + V[] values = _values; + + // Temporarily disable compaction. This is a fix for bug #1738760 + tempDisableAutoCompaction(); + try { + for ( int i = keys.length; i-- > 0; ) { + if ( states[i] == FULL && ! procedure.execute( keys[i], values[i] ) ) { + removeAt( i ); + modified = true; + } + } + } + finally { + reenableAutoCompaction( true ); + } + + return modified; + } + + + /** {@inheritDoc} */ + public void transformValues( TObjectFunction function ) { + byte[] states = _states; + V[] values = _values; + for ( int i = values.length; i-- > 0; ) { + if ( states[i] == FULL ) { + values[i] = function.execute( values[i] ); + } + } + } + + + // Comparison and hashing + + /** {@inheritDoc} */ + public boolean equals( Object other ) { + if ( ! ( other instanceof TIntObjectMap ) ) { + return false; + } + TIntObjectMap that = ( TIntObjectMap ) other; + if ( that.size() != this.size() ) { + return false; + } + try { + TIntObjectIterator iter = this.iterator(); + while ( iter.hasNext() ) { + iter.advance(); + int key = iter.key(); + Object value = iter.value(); + if ( value == null ) { + if ( !( that.get( key ) == null && that.containsKey( key ) ) ) { + return false; + } + } else { + if ( !value.equals( that.get( key ) ) ) { + return false; + } + } + } + } catch ( ClassCastException ex ) { + // unused. + } + return true; + } + + + /** {@inheritDoc} */ + public int hashCode() { + int hashcode = 0; + V[] values = _values; + byte[] states = _states; + for ( int i = values.length; i-- > 0; ) { + if ( states[i] == FULL ) { + hashcode += HashFunctions.hash( _set[i] ) ^ + ( values[i] == null ? 0 : values[i].hashCode() ); + } + } + return hashcode; + } + + + class KeyView implements TIntSet { + + /** {@inheritDoc} */ + public int getNoEntryValue() { + return no_entry_key; + } + + /** {@inheritDoc} */ + public int size() { + return _size; + } + + /** {@inheritDoc} */ + public boolean isEmpty() { + return _size == 0; + } + + /** {@inheritDoc} */ + public boolean contains( int entry ) { + return TIntObjectHashMap.this.containsKey( entry ); + } + + /** {@inheritDoc} */ + public TIntIterator iterator() { + return new TIntHashIterator( TIntObjectHashMap.this ); + } + + /** {@inheritDoc} */ + public int[] toArray() { + return keys(); + } + + /** {@inheritDoc} */ + public int[] toArray( int[] dest ) { + return keys( dest ); + } + + /** {@inheritDoc} */ + public boolean add( int entry ) { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + public boolean remove( int entry ) { + return null != TIntObjectHashMap.this.remove( entry ); + } + + /** {@inheritDoc} */ + public boolean containsAll( Collection collection ) { + for ( Object element : collection ) { + if ( ! TIntObjectHashMap.this.containsKey( + ( ( Integer ) element ).intValue() ) ) { + + return false; + } + } + return true; + } + + /** {@inheritDoc} */ + public boolean containsAll( TIntCollection collection ) { + if ( collection == this ) { + return true; + } + TIntIterator iter = collection.iterator(); + while ( iter.hasNext() ) { + if ( ! TIntObjectHashMap.this.containsKey( iter.next() ) ) { + return false; + } + } + return true; + } + + /** {@inheritDoc} */ + public boolean containsAll( int[] array ) { + for ( int element : array ) { + if ( ! TIntObjectHashMap.this.containsKey( element ) ) { + return false; + } + } + return true; + } + + /** {@inheritDoc} */ + public boolean addAll( Collection collection ) { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + public boolean addAll( TIntCollection collection ) { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + public boolean addAll( int[] array ) { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + public boolean retainAll( Collection collection ) { + boolean modified = false; + TIntIterator iter = iterator(); + while ( iter.hasNext() ) { + //noinspection SuspiciousMethodCalls + if ( ! collection.contains( Integer.valueOf ( iter.next() ) ) ) { + iter.remove(); + modified = true; + } + } + return modified; + } + + /** {@inheritDoc} */ + public boolean retainAll( TIntCollection collection ) { + if ( this == collection ) { + return false; + } + boolean modified = false; + TIntIterator iter = iterator(); + while ( iter.hasNext() ) { + if ( ! collection.contains( iter.next() ) ) { + iter.remove(); + modified = true; + } + } + return modified; + } + + /** {@inheritDoc} */ + public boolean retainAll( int[] array ) { + boolean changed = false; + Arrays.sort( array ); + int[] set = _set; + byte[] states = _states; + + for ( int i = set.length; i-- > 0; ) { + if ( states[i] == FULL && ( Arrays.binarySearch( array, set[i] ) < 0) ) { + removeAt( i ); + changed = true; + } + } + return changed; + } + + /** {@inheritDoc} */ + public boolean removeAll( Collection collection ) { + boolean changed = false; + for ( Object element : collection ) { + if ( element instanceof Integer ) { + int c = ( ( Integer ) element ).intValue(); + if ( remove( c ) ) { + changed = true; + } + } + } + return changed; + } + + /** {@inheritDoc} */ + public boolean removeAll( TIntCollection collection ) { + if ( collection == this ) { + clear(); + return true; + } + boolean changed = false; + TIntIterator iter = collection.iterator(); + while ( iter.hasNext() ) { + int element = iter.next(); + if ( remove( element ) ) { + changed = true; + } + } + return changed; + } + + /** {@inheritDoc} */ + public boolean removeAll( int[] array ) { + boolean changed = false; + for ( int i = array.length; i-- > 0; ) { + if ( remove(array[i]) ) { + changed = true; + } + } + return changed; + } + + /** {@inheritDoc} */ + public void clear() { + TIntObjectHashMap.this.clear(); + } + + /** {@inheritDoc} */ + public boolean forEach( TIntProcedure procedure ) { + return TIntObjectHashMap.this.forEachKey( procedure ); + } + + /** {@inheritDoc) */ + public boolean equals( Object other ) { + if (! ( other instanceof TIntSet ) ) { + return false; + } + final TIntSet that = ( TIntSet ) other; + if ( that.size() != this.size() ) { + return false; + } + for ( int i = _states.length; i-- > 0; ) { + if ( _states[i] == FULL ) { + if ( ! that.contains( _set[i] ) ) { + return false; + } + } + } + return true; + } + + /** {@inheritDoc} */ + public int hashCode() { + int hashcode = 0; + for ( int i = _states.length; i-- > 0; ) { + if ( _states[i] == FULL ) { + hashcode += HashFunctions.hash( _set[i] ); + } + } + return hashcode; + } + + /** {@inheritDoc} */ + public String toString() { + final StringBuilder buf = new StringBuilder("{"); + boolean first = true; + for ( int i = _states.length; i-- > 0; ) { + if ( _states[i] == FULL ) { + if ( first ) first = false; + else buf.append( "," ); + buf.append( _set[i] ); + } + } + return buf.toString(); + } + + + class TIntHashIterator extends THashPrimitiveIterator implements TIntIterator { + + /** the collection on which the iterator operates */ + private final TIntHash _hash; + + /** {@inheritDoc} */ + public TIntHashIterator( TIntHash hash ) { + super( hash ); + this._hash = hash; + } + + /** {@inheritDoc} */ + public int next() { + moveToNextIndex(); + return _hash._set[_index]; + } + } + } + + + /** a view onto the values of the map. */ + protected class ValueView extends MapBackedView { + + @SuppressWarnings({"unchecked"}) + public Iterator iterator() { + return new TIntObjectValueHashIterator( TIntObjectHashMap.this ) { + protected V objectAtIndex( int index ) { + return _values[index]; + } + }; + } + + public boolean containsElement( V value ) { + return containsValue( value ); + } + + public boolean removeElement( V value ) { + V[] values = _values; + byte[] states = _states; + + for ( int i = values.length; i-- > 0; ) { + if ( states[i] == FULL ) { + if ( value == values[i] || + ( null != values[i] && values[i].equals( value ) ) ) { + removeAt( i ); + return true; + } + } + } + return false; + } + + class TIntObjectValueHashIterator extends THashPrimitiveIterator + implements Iterator { + + protected final TIntObjectHashMap _map; + + public TIntObjectValueHashIterator( TIntObjectHashMap map ) { + super( map ); + _map = map; + } + + @SuppressWarnings("unchecked") + protected V objectAtIndex( int index ) { + byte[] states = _states; + Object value = _map._values[index]; + if ( states[index] != FULL ) { + return null; + } + return ( V ) value; + } + + /** {@inheritDoc} */ + @SuppressWarnings("unchecked") + public V next() { + moveToNextIndex(); + return ( V ) _map._values[_index]; + } + } + } + + + private abstract class MapBackedView extends AbstractSet + implements Set, Iterable { + + public abstract Iterator iterator(); + + public abstract boolean removeElement( E key ); + + public abstract boolean containsElement( E key ); + + @SuppressWarnings({"unchecked"}) + public boolean contains( Object key ) { + return containsElement( (E) key ); + } + + @SuppressWarnings({"unchecked"}) + public boolean remove( Object o ) { + return removeElement( (E) o ); + } + + public void clear() { + TIntObjectHashMap.this.clear(); + } + + public boolean add( E obj ) { + throw new UnsupportedOperationException(); + } + + public int size() { + return TIntObjectHashMap.this.size(); + } + + public Object[] toArray() { + Object[] result = new Object[size()]; + Iterator e = iterator(); + for ( int i = 0; e.hasNext(); i++ ) { + result[i] = e.next(); + } + return result; + } + + @SuppressWarnings({"unchecked"}) + public T[] toArray( T[] a ) { + int size = size(); + if ( a.length < size ) { + a = (T[]) java.lang.reflect.Array.newInstance( + a.getClass().getComponentType(), size ); + } + + Iterator it = iterator(); + Object[] result = a; + for ( int i = 0; i < size; i++ ) { + result[i] = it.next(); + } + + if ( a.length > size ) { + a[size] = null; + } + + return a; + } + + public boolean isEmpty() { + return TIntObjectHashMap.this.isEmpty(); + } + + public boolean addAll( Collection collection ) { + throw new UnsupportedOperationException(); + } + + @SuppressWarnings({"SuspiciousMethodCalls"}) + public boolean retainAll( Collection collection ) { + boolean changed = false; + Iterator i = iterator(); + while ( i.hasNext() ) { + if ( !collection.contains( i.next() ) ) { + i.remove(); + changed = true; + } + } + return changed; + } + } + + + class TIntObjectHashIterator extends THashPrimitiveIterator + implements TIntObjectIterator { + + /** the collection being iterated over */ + private final TIntObjectHashMap _map; + + /** + * Creates an iterator over the specified map + * + * @param map map to iterate over. + */ + public TIntObjectHashIterator( TIntObjectHashMap map ) { + super( map ); + this._map = map; + } + + /** {@inheritDoc} */ + public void advance() { + moveToNextIndex(); + } + + /** {@inheritDoc} */ + public int key() { + return _map._set[_index]; + } + + /** {@inheritDoc} */ + public V value() { + return _map._values[_index]; + } + + /** {@inheritDoc} */ + public V setValue( V val ) { + V old = value(); + _map._values[_index] = val; + return old; + } + } + + + public void writeExternal( ObjectOutput out ) throws IOException { + // VERSION + out.writeByte( 0 ); + + // SUPER + super.writeExternal( out ); + + // NO_ENTRY_KEY + out.writeInt( no_entry_key ); + + // NUMBER OF ENTRIES + out.writeInt( _size ); + + // ENTRIES + for ( int i = _states.length; i-- > 0; ) { + if ( _states[i] == FULL ) { + out.writeInt( _set[i] ); + out.writeObject( _values[i] ); + } + } + } + + + @SuppressWarnings({"unchecked"}) + public void readExternal( ObjectInput in ) + throws IOException, ClassNotFoundException { + + // VERSION + in.readByte(); + + // SUPER + super.readExternal( in ); + + // NO_ENTRY_KEY + no_entry_key = in.readInt(); + + // NUMBER OF ENTRIES + int size = in.readInt(); + setUp( size ); + + // ENTRIES + while (size-- > 0) { + int key = in.readInt(); + V val = (V) in.readObject(); + put(key, val); + } + } + + + public String toString() { + final StringBuilder buf = new StringBuilder("{"); + forEachEntry(new TIntObjectProcedure() { + private boolean first = true; + public boolean execute(int key, Object value) { + if ( first ) first = false; + else buf.append( "," ); + + buf.append(key); + buf.append("="); + buf.append(value); + return true; + } + }); + buf.append("}"); + return buf.toString(); + } +} // TIntObjectHashMap diff --git a/src/gnu/trove/map/hash/TObjectDoubleHashMap.java b/src/gnu/trove/map/hash/TObjectDoubleHashMap.java new file mode 100644 index 00000000..7866ed6b --- /dev/null +++ b/src/gnu/trove/map/hash/TObjectDoubleHashMap.java @@ -0,0 +1,1145 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.map.hash; + +import gnu.trove.impl.Constants; +import gnu.trove.impl.HashFunctions; +import gnu.trove.impl.hash.THash; +import gnu.trove.impl.hash.TObjectHash; +import gnu.trove.procedure.TObjectDoubleProcedure; +import gnu.trove.procedure.TObjectProcedure; +import gnu.trove.procedure.TDoubleProcedure; +import gnu.trove.iterator.TObjectDoubleIterator; +import gnu.trove.iterator.TDoubleIterator; +import gnu.trove.iterator.hash.TObjectHashIterator; +import gnu.trove.function.TDoubleFunction; +import gnu.trove.map.TObjectDoubleMap; +import gnu.trove.TDoubleCollection; + + +import java.io.*; +import java.util.*; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * An open addressed Map implementation for Object keys and double values. + * + * Created: Sun Nov 4 08:52:45 2001 + * + * @author Eric D. Friedman + * @author Rob Eden + * @author Jeff Randall + */ +public class TObjectDoubleHashMap extends TObjectHash + implements TObjectDoubleMap, Externalizable { + + static final long serialVersionUID = 1L; + + private final TObjectDoubleProcedure PUT_ALL_PROC = new TObjectDoubleProcedure() { + public boolean execute(K key, double value) { + put(key, value); + return true; + } + }; + + /** the values of the map */ + protected transient double[] _values; + + /** the value that represents null */ + protected double no_entry_value; + + + /** + * Creates a new TObjectDoubleHashMap instance with the default + * capacity and load factor. + */ + public TObjectDoubleHashMap() { + super(); + no_entry_value = Constants.DEFAULT_DOUBLE_NO_ENTRY_VALUE; + } + + + /** + * Creates a new TObjectDoubleHashMap instance with a prime + * capacity equal to or greater than initialCapacity and + * with the default load factor. + * + * @param initialCapacity an int value + */ + public TObjectDoubleHashMap( int initialCapacity ) { + super( initialCapacity ); + no_entry_value = Constants.DEFAULT_DOUBLE_NO_ENTRY_VALUE; + } + + + /** + * Creates a new TObjectDoubleHashMap instance with a prime + * capacity equal to or greater than initialCapacity and + * with the specified load factor. + * + * @param initialCapacity an int value + * @param loadFactor a float value + */ + public TObjectDoubleHashMap( int initialCapacity, float loadFactor ) { + super( initialCapacity, loadFactor ); + no_entry_value = Constants.DEFAULT_DOUBLE_NO_ENTRY_VALUE; + } + + + /** + * Creates a new TObjectDoubleHashMap instance with a prime + * value at or near the specified capacity and load factor. + * + * @param initialCapacity used to find a prime capacity for the table. + * @param loadFactor used to calculate the threshold over which + * rehashing takes place. + * @param noEntryValue the value used to represent null. + */ + public TObjectDoubleHashMap( int initialCapacity, float loadFactor, double noEntryValue ) { + super( initialCapacity, loadFactor ); + no_entry_value = noEntryValue; + //noinspection RedundantCast + if ( no_entry_value != ( double ) 0 ) { + Arrays.fill( _values, no_entry_value ); + } + } + + + /** + * Creates a new TObjectDoubleHashMap that contains the entries + * in the map passed to it. + * + * @param map the TObjectDoubleMap to be copied. + */ + public TObjectDoubleHashMap( TObjectDoubleMap map ) { + this( map.size(), 0.5f, map.getNoEntryValue() ); + if ( map instanceof TObjectDoubleHashMap ) { + TObjectDoubleHashMap hashmap = ( TObjectDoubleHashMap ) map; + this._loadFactor = hashmap._loadFactor; + this.no_entry_value = hashmap.no_entry_value; + //noinspection RedundantCast + if ( this.no_entry_value != ( double ) 0 ) { + Arrays.fill( _values, this.no_entry_value ); + } + setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); + } + putAll( map ); + } + + + /** + * initializes the hashtable to a prime capacity which is at least + * initialCapacity + 1. + * + * @param initialCapacity an int value + * @return the actual capacity chosen + */ + public int setUp( int initialCapacity ) { + int capacity; + + capacity = super.setUp( initialCapacity ); + _values = new double[capacity]; + return capacity; + } + + + /** + * rehashes the map to the new capacity. + * + * @param newCapacity an int value + */ + protected void rehash( int newCapacity ) { + int oldCapacity = _set.length; + + //noinspection unchecked + K oldKeys[] = ( K[] ) _set; + double oldVals[] = _values; + + _set = new Object[newCapacity]; + Arrays.fill( _set, FREE ); + _values = new double[newCapacity]; + Arrays.fill( _values, no_entry_value ); + + for ( int i = oldCapacity; i-- > 0; ) { + if( oldKeys[i] != FREE && oldKeys[i] != REMOVED ) { + K o = oldKeys[i]; + int index = insertKey(o); + if ( index < 0 ) { + throwObjectContractViolation( _set[ (-index -1) ], o); + } + _set[index] = o; + _values[index] = oldVals[i]; + } + } + } + + + // Query Operations + + /** {@inheritDoc} */ + public double getNoEntryValue() { + return no_entry_value; + } + + + /** {@inheritDoc} */ + public boolean containsKey( Object key ) { + return contains( key ); + } + + + /** {@inheritDoc} */ + public boolean containsValue( double val ) { + Object[] keys = _set; + double[] vals = _values; + + for ( int i = vals.length; i-- > 0; ) { + if ( keys[i] != FREE && keys[i] != REMOVED && val == vals[i] ) { + return true; + } + } + return false; + } + + + /** {@inheritDoc} */ + public double get( Object key ) { + int index = index( key ); + return index < 0 ? no_entry_value : _values[index]; + } + + + // Modification Operations + + /** {@inheritDoc} */ + public double put( K key, double value ) { + int index = insertKey( key ); + return doPut( value, index ); + } + + + /** {@inheritDoc} */ + public double putIfAbsent( K key, double value ) { + int index = insertKey(key); + if ( index < 0 ) + return _values[-index - 1]; + return doPut( value, index ); + } + + + private double doPut( double value, int index ) { + double previous = no_entry_value; + boolean isNewMapping = true; + if ( index < 0 ) { + index = -index -1; + previous = _values[index]; + isNewMapping = false; + } + //noinspection unchecked + _values[index] = value; + + if ( isNewMapping ) { + postInsertHook( consumeFreeSlot ); + } + return previous; + } + + + /** {@inheritDoc} */ + public double remove( Object key ) { + double prev = no_entry_value; + int index = index(key); + if ( index >= 0 ) { + prev = _values[index]; + removeAt( index ); // clear key,state; adjust size + } + return prev; + } + + + /** + * Removes the mapping at index from the map. + * This method is used internally and public mainly because + * of packaging reasons. Caveat Programmer. + * + * @param index an int value + */ + protected void removeAt( int index ) { + _values[index] = no_entry_value; + super.removeAt( index ); // clear key, state; adjust size + } + + + // Bulk Operations + + /** {@inheritDoc} */ + public void putAll( Map map ) { + Set> set = map.entrySet(); + for ( Map.Entry entry : set ) { + put( entry.getKey(), entry.getValue() ); + } + } + + + /** {@inheritDoc} */ + public void putAll( TObjectDoubleMap map ){ + map.forEachEntry( PUT_ALL_PROC ); + } + + + /** {@inheritDoc} */ + public void clear() { + super.clear(); + Arrays.fill( _set, 0, _set.length, FREE ); + Arrays.fill( _values, 0, _values.length, no_entry_value ); + } + + + // Views + + /** {@inheritDoc} */ + public Set keySet() { + return new KeyView(); + } + + + /** {@inheritDoc} */ + public Object[] keys() { + //noinspection unchecked + K[] keys = ( K[] ) new Object[size()]; + Object[] k = _set; + + for ( int i = k.length, j = 0; i-- > 0; ) { + if ( k[i] != FREE && k[i] != REMOVED ) { + //noinspection unchecked + keys[j++] = ( K ) k[i]; + } + } + return keys; + } + + + /** {@inheritDoc} */ + public K[] keys( K[] a ) { + int size = size(); + if ( a.length < size ) { + //noinspection unchecked + a = ( K[] ) java.lang.reflect.Array.newInstance( + a.getClass().getComponentType(), size ); + } + + Object[] k = _set; + + for ( int i = k.length, j = 0; i-- > 0; ) { + if ( k[i] != FREE && k[i] != REMOVED ) { + //noinspection unchecked + a[j++] = ( K ) k[i]; + } + } + return a; + } + + + /** {@inheritDoc} */ + public TDoubleCollection valueCollection() { + return new TDoubleValueCollection(); + } + + + /** {@inheritDoc} */ + public double[] values() { + double[] vals = new double[size()]; + double[] v = _values; + Object[] keys = _set; + + for ( int i = v.length, j = 0; i-- > 0; ) { + if ( keys[i] != FREE && keys[i] != REMOVED ) { + vals[j++] = v[i]; + } + } + return vals; + } + + + /** {@inheritDoc} */ + public double[] values( double[] array ) { + int size = size(); + if ( array.length < size ) { + array = new double[size]; + } + + double[] v = _values; + Object[] keys = _set; + + for ( int i = v.length, j = 0; i-- > 0; ) { + if ( keys[i] != FREE && keys[i] != REMOVED ) { + array[j++] = v[i]; + } + } + if ( array.length > size ) { + array[size] = no_entry_value; + } + return array; + } + + + /** + * @return an iterator over the entries in this map + */ + public TObjectDoubleIterator iterator() { + return new TObjectDoubleHashIterator( this ); + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"RedundantCast"}) + public boolean increment( K key ) { + //noinspection RedundantCast + return adjustValue( key, (double)1 ); + } + + + /** {@inheritDoc} */ + public boolean adjustValue( K key, double amount ) { + int index = index(key); + if ( index < 0 ) { + return false; + } else { + _values[index] += amount; + return true; + } + } + + + /** {@inheritDoc} */ + public double adjustOrPutValue( final K key, final double adjust_amount, + final double put_amount ) { + + int index = insertKey( key ); + final boolean isNewMapping; + final double newValue; + if ( index < 0 ) { + index = -index -1; + newValue = ( _values[index] += adjust_amount ); + isNewMapping = false; + } else { + newValue = ( _values[index] = put_amount ); + isNewMapping = true; + } + + //noinspection unchecked + + if ( isNewMapping ) { + postInsertHook( consumeFreeSlot ); + } + + return newValue; + } + + + /** + * Executes procedure for each key in the map. + * + * @param procedure a TObjectProcedure value + * @return false if the loop over the keys terminated because + * the procedure returned false for some key. + */ + public boolean forEachKey( TObjectProcedure procedure ) { + return forEach( procedure ); + } + + + /** + * Executes procedure for each value in the map. + * + * @param procedure a TDoubleProcedure value + * @return false if the loop over the values terminated because + * the procedure returned false for some value. + */ + public boolean forEachValue( TDoubleProcedure procedure ) { + Object[] keys = _set; + double[] values = _values; + for ( int i = values.length; i-- > 0; ) { + if ( keys[i] != FREE && keys[i] != REMOVED + && ! procedure.execute( values[i] ) ) { + return false; + } + } + return true; + } + + + /** + * Executes procedure for each key/value entry in the + * map. + * + * @param procedure a TOObjectDoubleProcedure value + * @return false if the loop over the entries terminated because + * the procedure returned false for some entry. + */ + @SuppressWarnings({"unchecked"}) + public boolean forEachEntry( TObjectDoubleProcedure procedure ) { + Object[] keys = _set; + double[] values = _values; + for ( int i = keys.length; i-- > 0; ) { + if ( keys[i] != FREE + && keys[i] != REMOVED + && ! procedure.execute( ( K ) keys[i], values[i] ) ) { + return false; + } + } + return true; + } + + + /** + * Retains only those entries in the map for which the procedure + * returns a true value. + * + * @param procedure determines which entries to keep + * @return true if the map was modified. + */ + public boolean retainEntries( TObjectDoubleProcedure procedure ) { + boolean modified = false; + //noinspection unchecked + K[] keys = ( K[] ) _set; + double[] values = _values; + + // Temporarily disable compaction. This is a fix for bug #1738760 + tempDisableAutoCompaction(); + try { + for ( int i = keys.length; i-- > 0; ) { + if ( keys[i] != FREE + && keys[i] != REMOVED + && ! procedure.execute( keys[i], values[i] ) ) { + removeAt(i); + modified = true; + } + } + } + finally { + reenableAutoCompaction( true ); + } + + return modified; + } + + + /** + * Transform the values in this map using function. + * + * @param function a TDoubleFunction value + */ + public void transformValues( TDoubleFunction function ) { + Object[] keys = _set; + double[] values = _values; + for ( int i = values.length; i-- > 0; ) { + if ( keys[i] != null && keys[i] != REMOVED ) { + values[i] = function.execute( values[i] ); + } + } + } + + + // Comparison and hashing + + /** + * Compares this map with another map for equality of their stored + * entries. + * + * @param other an Object value + * @return a boolean value + */ + public boolean equals( Object other ) { + if ( ! ( other instanceof TObjectDoubleMap ) ) { + return false; + } + TObjectDoubleMap that = ( TObjectDoubleMap ) other; + if ( that.size() != this.size() ) { + return false; + } + try { + TObjectDoubleIterator iter = this.iterator(); + while ( iter.hasNext() ) { + iter.advance(); + Object key = iter.key(); + double value = iter.value(); + if ( value == no_entry_value ) { + if ( !( that.get( key ) == that.getNoEntryValue() && + that.containsKey( key ) ) ) { + + return false; + } + } else { + if ( value != that.get( key ) ) { + return false; + } + } + } + } catch ( ClassCastException ex ) { + // unused. + } + return true; + } + + + /** {@inheritDoc} */ + public int hashCode() { + int hashcode = 0; + Object[] keys = _set; + double[] values = _values; + for ( int i = values.length; i-- > 0; ) { + if ( keys[i] != FREE && keys[i] != REMOVED ) { + hashcode += HashFunctions.hash( values[i] ) ^ + ( keys[i] == null ? 0 : keys[i].hashCode() ); + } + } + return hashcode; + } + + + /** a view onto the keys of the map. */ + protected class KeyView extends MapBackedView { + + @SuppressWarnings({"unchecked"}) + public Iterator iterator() { + return new TObjectHashIterator( TObjectDoubleHashMap.this ); + } + + public boolean removeElement( K key ) { + return no_entry_value != TObjectDoubleHashMap.this.remove( key ); + } + + public boolean containsElement( K key ) { + return TObjectDoubleHashMap.this.contains( key ); + } + } + + + private abstract class MapBackedView extends AbstractSet + implements Set, Iterable { + + public abstract boolean removeElement( E key ); + + public abstract boolean containsElement( E key ); + + @SuppressWarnings({"unchecked"}) + public boolean contains( Object key ) { + return containsElement( (E) key ); + } + + @SuppressWarnings({"unchecked"}) + public boolean remove( Object o ) { + return removeElement( (E) o ); + } + + public void clear() { + TObjectDoubleHashMap.this.clear(); + } + + public boolean add( E obj ) { + throw new UnsupportedOperationException(); + } + + public int size() { + return TObjectDoubleHashMap.this.size(); + } + + public Object[] toArray() { + Object[] result = new Object[size()]; + Iterator e = iterator(); + for ( int i = 0; e.hasNext(); i++ ) { + result[i] = e.next(); + } + return result; + } + + public T[] toArray( T[] a ) { + int size = size(); + if ( a.length < size ) { + //noinspection unchecked + a = (T[]) java.lang.reflect.Array.newInstance( + a.getClass().getComponentType(), size ); + } + + Iterator it = iterator(); + Object[] result = a; + for ( int i = 0; i < size; i++ ) { + result[i] = it.next(); + } + + if ( a.length > size ) { + a[size] = null; + } + + return a; + } + + public boolean isEmpty() { + return TObjectDoubleHashMap.this.isEmpty(); + } + + public boolean addAll( Collection collection ) { + throw new UnsupportedOperationException(); + } + + @SuppressWarnings({"SuspiciousMethodCalls"}) + public boolean retainAll( Collection collection ) { + boolean changed = false; + Iterator i = iterator(); + while ( i.hasNext() ) { + if ( !collection.contains( i.next() ) ) { + i.remove(); + changed = true; + } + } + return changed; + } + } + + + class TDoubleValueCollection implements TDoubleCollection { + + /** {@inheritDoc} */ + public TDoubleIterator iterator() { + return new TObjectDoubleValueHashIterator(); + } + + /** {@inheritDoc} */ + public double getNoEntryValue() { + return no_entry_value; + } + + /** {@inheritDoc} */ + public int size() { + return _size; + } + + /** {@inheritDoc} */ + public boolean isEmpty() { + return 0 == _size; + } + + /** {@inheritDoc} */ + public boolean contains( double entry ) { + return TObjectDoubleHashMap.this.containsValue( entry ); + } + + /** {@inheritDoc} */ + public double[] toArray() { + return TObjectDoubleHashMap.this.values(); + } + + /** {@inheritDoc} */ + public double[] toArray( double[] dest ) { + return TObjectDoubleHashMap.this.values( dest ); + } + + public boolean add( double entry ) { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + public boolean remove( double entry ) { + double[] values = _values; + Object[] set = _set; + + for ( int i = values.length; i-- > 0; ) { + if ( ( set[i] != FREE && set[i] != REMOVED ) && entry == values[i] ) { + removeAt( i ); + return true; + } + } + return false; + } + + /** {@inheritDoc} */ + public boolean containsAll( Collection collection ) { + for ( Object element : collection ) { + if ( element instanceof Double ) { + double ele = ( ( Double ) element ).doubleValue(); + if ( ! TObjectDoubleHashMap.this.containsValue( ele ) ) { + return false; + } + } else { + return false; + } + } + return true; + } + + /** {@inheritDoc} */ + public boolean containsAll( TDoubleCollection collection ) { + TDoubleIterator iter = collection.iterator(); + while ( iter.hasNext() ) { + if ( ! TObjectDoubleHashMap.this.containsValue( iter.next() ) ) { + return false; + } + } + return true; + } + + /** {@inheritDoc} */ + public boolean containsAll( double[] array ) { + for ( double element : array ) { + if ( ! TObjectDoubleHashMap.this.containsValue( element ) ) { + return false; + } + } + return true; + } + + /** {@inheritDoc} */ + public boolean addAll( Collection collection ) { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + public boolean addAll( TDoubleCollection collection ) { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + public boolean addAll( double[] array ) { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + @SuppressWarnings({"SuspiciousMethodCalls"}) + public boolean retainAll( Collection collection ) { + boolean modified = false; + TDoubleIterator iter = iterator(); + while ( iter.hasNext() ) { + if ( ! collection.contains( Double.valueOf ( iter.next() ) ) ) { + iter.remove(); + modified = true; + } + } + return modified; + } + + /** {@inheritDoc} */ + public boolean retainAll( TDoubleCollection collection ) { + if ( this == collection ) { + return false; + } + boolean modified = false; + TDoubleIterator iter = iterator(); + while ( iter.hasNext() ) { + if ( ! collection.contains( iter.next() ) ) { + iter.remove(); + modified = true; + } + } + return modified; + } + + /** {@inheritDoc} */ + public boolean retainAll( double[] array ) { + boolean changed = false; + Arrays.sort( array ); + double[] values = _values; + + Object[] set = _set; + for ( int i = set.length; i-- > 0; ) { + if ( set[i] != FREE + && set[i] != REMOVED + && ( Arrays.binarySearch( array, values[i] ) < 0) ) { + removeAt( i ); + changed = true; + } + } + return changed; + } + + /** {@inheritDoc} */ + public boolean removeAll( Collection collection ) { + boolean changed = false; + for ( Object element : collection ) { + if ( element instanceof Double ) { + double c = ( ( Double ) element ).doubleValue(); + if ( remove( c ) ) { + changed = true; + } + } + } + return changed; + } + + /** {@inheritDoc} */ + public boolean removeAll( TDoubleCollection collection ) { + if ( this == collection ) { + clear(); + return true; + } + boolean changed = false; + TDoubleIterator iter = collection.iterator(); + while ( iter.hasNext() ) { + double element = iter.next(); + if ( remove( element ) ) { + changed = true; + } + } + return changed; + } + + /** {@inheritDoc} */ + public boolean removeAll( double[] array ) { + boolean changed = false; + for ( int i = array.length; i-- > 0; ) { + if ( remove( array[i] ) ) { + changed = true; + } + } + return changed; + } + + /** {@inheritDoc} */ + public void clear() { + TObjectDoubleHashMap.this.clear(); + } + + /** {@inheritDoc} */ + public boolean forEach( TDoubleProcedure procedure ) { + return TObjectDoubleHashMap.this.forEachValue( procedure ); + } + + + @Override + public String toString() { + final StringBuilder buf = new StringBuilder( "{" ); + forEachValue( new TDoubleProcedure() { + private boolean first = true; + + public boolean execute( double value ) { + if ( first ) { + first = false; + } else { + buf.append( ", " ); + } + + buf.append( value ); + return true; + } + } ); + buf.append( "}" ); + return buf.toString(); + } + + + class TObjectDoubleValueHashIterator implements TDoubleIterator { + + protected THash _hash = TObjectDoubleHashMap.this; + + /** + * the number of elements this iterator believes are in the + * data structure it accesses. + */ + protected int _expectedSize; + + /** the index used for iteration. */ + protected int _index; + + /** Creates an iterator over the specified map */ + TObjectDoubleValueHashIterator() { + _expectedSize = _hash.size(); + _index = _hash.capacity(); + } + + /** {@inheritDoc} */ + public boolean hasNext() { + return nextIndex() >= 0; + } + + /** {@inheritDoc} */ + public double next() { + moveToNextIndex(); + return _values[_index]; + } + + /** @{inheritDoc} */ + public void remove() { + if ( _expectedSize != _hash.size() ) { + throw new ConcurrentModificationException(); + } + + // Disable auto compaction during the remove. This is a workaround for + // bug 1642768. + try { + _hash.tempDisableAutoCompaction(); + TObjectDoubleHashMap.this.removeAt( _index ); + } + finally { + _hash.reenableAutoCompaction( false ); + } + + _expectedSize--; + } + + /** + * Sets the internal index so that the `next' object + * can be returned. + */ + protected final void moveToNextIndex() { + // doing the assignment && < 0 in one line shaves + // 3 opcodes... + if ( ( _index = nextIndex() ) < 0 ) { + throw new NoSuchElementException(); + } + } + + /** + * Returns the index of the next value in the data structure + * or a negative value if the iterator is exhausted. + * + * @return an int value + * @throws ConcurrentModificationException + * if the underlying + * collection's size has been modified since the iterator was + * created. + */ + protected final int nextIndex() { + if ( _expectedSize != _hash.size() ) { + throw new ConcurrentModificationException(); + } + + Object[] set = TObjectDoubleHashMap.this._set; + int i = _index; + while ( i-- > 0 && ( set[i] == TObjectHash.FREE || + set[i] == TObjectHash.REMOVED ) ) { + + // do nothing + } + return i; + } + } + } + + + class TObjectDoubleHashIterator extends TObjectHashIterator + implements TObjectDoubleIterator { + + /** the collection being iterated over */ + private final TObjectDoubleHashMap _map; + + public TObjectDoubleHashIterator( TObjectDoubleHashMap map ) { + super( map ); + this._map = map; + } + + /** {@inheritDoc} */ + public void advance() { + moveToNextIndex(); + } + + /** {@inheritDoc} */ + @SuppressWarnings({"unchecked"}) + public K key() { + return ( K ) _map._set[_index]; + } + + /** {@inheritDoc} */ + public double value() { + return _map._values[_index]; + } + + /** {@inheritDoc} */ + public double setValue( double val ) { + double old = value(); + _map._values[_index] = val; + return old; + } + } + + + // Externalization + + public void writeExternal( ObjectOutput out ) throws IOException { + // VERSION + out.writeByte( 0 ); + + // SUPER + super.writeExternal( out ); + + // NO_ENTRY_VALUE + out.writeDouble( no_entry_value ); + + // NUMBER OF ENTRIES + out.writeInt( _size ); + + // ENTRIES + for ( int i = _set.length; i-- > 0; ) { + if ( _set[i] != REMOVED && _set[i] != FREE ) { + out.writeObject( _set[i] ); + out.writeDouble( _values[i] ); + } + } + } + + + public void readExternal( ObjectInput in ) + throws IOException, ClassNotFoundException { + + // VERSION + in.readByte(); + + // SUPER + super.readExternal( in ); + + // NO_ENTRY_VALUE + no_entry_value = in.readDouble(); + + // NUMBER OF ENTRIES + int size = in.readInt(); + setUp( size ); + + // ENTRIES + while (size-- > 0) { + //noinspection unchecked + K key = ( K ) in.readObject(); + double val = in.readDouble(); + put(key, val); + } + } + + + /** {@inheritDoc} */ + public String toString() { + final StringBuilder buf = new StringBuilder("{"); + forEachEntry( new TObjectDoubleProcedure() { + private boolean first = true; + public boolean execute( K key, double value ) { + if ( first ) first = false; + else buf.append( "," ); + + buf.append( key ).append( "=" ).append( value ); + return true; + } + }); + buf.append( "}" ); + return buf.toString(); + } +} // TObjectDoubleHashMap diff --git a/src/gnu/trove/map/hash/TObjectIntHashMap.java b/src/gnu/trove/map/hash/TObjectIntHashMap.java new file mode 100644 index 00000000..d4f8ef48 --- /dev/null +++ b/src/gnu/trove/map/hash/TObjectIntHashMap.java @@ -0,0 +1,1145 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.map.hash; + +import gnu.trove.impl.Constants; +import gnu.trove.impl.HashFunctions; +import gnu.trove.impl.hash.THash; +import gnu.trove.impl.hash.TObjectHash; +import gnu.trove.procedure.TObjectIntProcedure; +import gnu.trove.procedure.TObjectProcedure; +import gnu.trove.procedure.TIntProcedure; +import gnu.trove.iterator.TObjectIntIterator; +import gnu.trove.iterator.TIntIterator; +import gnu.trove.iterator.hash.TObjectHashIterator; +import gnu.trove.function.TIntFunction; +import gnu.trove.map.TObjectIntMap; +import gnu.trove.TIntCollection; + + +import java.io.*; +import java.util.*; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * An open addressed Map implementation for Object keys and int values. + * + * Created: Sun Nov 4 08:52:45 2001 + * + * @author Eric D. Friedman + * @author Rob Eden + * @author Jeff Randall + */ +public class TObjectIntHashMap extends TObjectHash + implements TObjectIntMap, Externalizable { + + static final long serialVersionUID = 1L; + + private final TObjectIntProcedure PUT_ALL_PROC = new TObjectIntProcedure() { + public boolean execute(K key, int value) { + put(key, value); + return true; + } + }; + + /** the values of the map */ + protected transient int[] _values; + + /** the value that represents null */ + protected int no_entry_value; + + + /** + * Creates a new TObjectIntHashMap instance with the default + * capacity and load factor. + */ + public TObjectIntHashMap() { + super(); + no_entry_value = Constants.DEFAULT_INT_NO_ENTRY_VALUE; + } + + + /** + * Creates a new TObjectIntHashMap instance with a prime + * capacity equal to or greater than initialCapacity and + * with the default load factor. + * + * @param initialCapacity an int value + */ + public TObjectIntHashMap( int initialCapacity ) { + super( initialCapacity ); + no_entry_value = Constants.DEFAULT_INT_NO_ENTRY_VALUE; + } + + + /** + * Creates a new TObjectIntHashMap instance with a prime + * capacity equal to or greater than initialCapacity and + * with the specified load factor. + * + * @param initialCapacity an int value + * @param loadFactor a float value + */ + public TObjectIntHashMap( int initialCapacity, float loadFactor ) { + super( initialCapacity, loadFactor ); + no_entry_value = Constants.DEFAULT_INT_NO_ENTRY_VALUE; + } + + + /** + * Creates a new TObjectIntHashMap instance with a prime + * value at or near the specified capacity and load factor. + * + * @param initialCapacity used to find a prime capacity for the table. + * @param loadFactor used to calculate the threshold over which + * rehashing takes place. + * @param noEntryValue the value used to represent null. + */ + public TObjectIntHashMap( int initialCapacity, float loadFactor, int noEntryValue ) { + super( initialCapacity, loadFactor ); + no_entry_value = noEntryValue; + //noinspection RedundantCast + if ( no_entry_value != ( int ) 0 ) { + Arrays.fill( _values, no_entry_value ); + } + } + + + /** + * Creates a new TObjectIntHashMap that contains the entries + * in the map passed to it. + * + * @param map the TObjectIntMap to be copied. + */ + public TObjectIntHashMap( TObjectIntMap map ) { + this( map.size(), 0.5f, map.getNoEntryValue() ); + if ( map instanceof TObjectIntHashMap ) { + TObjectIntHashMap hashmap = ( TObjectIntHashMap ) map; + this._loadFactor = hashmap._loadFactor; + this.no_entry_value = hashmap.no_entry_value; + //noinspection RedundantCast + if ( this.no_entry_value != ( int ) 0 ) { + Arrays.fill( _values, this.no_entry_value ); + } + setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); + } + putAll( map ); + } + + + /** + * initializes the hashtable to a prime capacity which is at least + * initialCapacity + 1. + * + * @param initialCapacity an int value + * @return the actual capacity chosen + */ + public int setUp( int initialCapacity ) { + int capacity; + + capacity = super.setUp( initialCapacity ); + _values = new int[capacity]; + return capacity; + } + + + /** + * rehashes the map to the new capacity. + * + * @param newCapacity an int value + */ + protected void rehash( int newCapacity ) { + int oldCapacity = _set.length; + + //noinspection unchecked + K oldKeys[] = ( K[] ) _set; + int oldVals[] = _values; + + _set = new Object[newCapacity]; + Arrays.fill( _set, FREE ); + _values = new int[newCapacity]; + Arrays.fill( _values, no_entry_value ); + + for ( int i = oldCapacity; i-- > 0; ) { + if( oldKeys[i] != FREE && oldKeys[i] != REMOVED ) { + K o = oldKeys[i]; + int index = insertKey(o); + if ( index < 0 ) { + throwObjectContractViolation( _set[ (-index -1) ], o); + } + _set[index] = o; + _values[index] = oldVals[i]; + } + } + } + + + // Query Operations + + /** {@inheritDoc} */ + public int getNoEntryValue() { + return no_entry_value; + } + + + /** {@inheritDoc} */ + public boolean containsKey( Object key ) { + return contains( key ); + } + + + /** {@inheritDoc} */ + public boolean containsValue( int val ) { + Object[] keys = _set; + int[] vals = _values; + + for ( int i = vals.length; i-- > 0; ) { + if ( keys[i] != FREE && keys[i] != REMOVED && val == vals[i] ) { + return true; + } + } + return false; + } + + + /** {@inheritDoc} */ + public int get( Object key ) { + int index = index( key ); + return index < 0 ? no_entry_value : _values[index]; + } + + + // Modification Operations + + /** {@inheritDoc} */ + public int put( K key, int value ) { + int index = insertKey( key ); + return doPut( value, index ); + } + + + /** {@inheritDoc} */ + public int putIfAbsent( K key, int value ) { + int index = insertKey(key); + if ( index < 0 ) + return _values[-index - 1]; + return doPut( value, index ); + } + + + private int doPut( int value, int index ) { + int previous = no_entry_value; + boolean isNewMapping = true; + if ( index < 0 ) { + index = -index -1; + previous = _values[index]; + isNewMapping = false; + } + //noinspection unchecked + _values[index] = value; + + if ( isNewMapping ) { + postInsertHook( consumeFreeSlot ); + } + return previous; + } + + + /** {@inheritDoc} */ + public int remove( Object key ) { + int prev = no_entry_value; + int index = index(key); + if ( index >= 0 ) { + prev = _values[index]; + removeAt( index ); // clear key,state; adjust size + } + return prev; + } + + + /** + * Removes the mapping at index from the map. + * This method is used internally and public mainly because + * of packaging reasons. Caveat Programmer. + * + * @param index an int value + */ + protected void removeAt( int index ) { + _values[index] = no_entry_value; + super.removeAt( index ); // clear key, state; adjust size + } + + + // Bulk Operations + + /** {@inheritDoc} */ + public void putAll( Map map ) { + Set> set = map.entrySet(); + for ( Map.Entry entry : set ) { + put( entry.getKey(), entry.getValue() ); + } + } + + + /** {@inheritDoc} */ + public void putAll( TObjectIntMap map ){ + map.forEachEntry( PUT_ALL_PROC ); + } + + + /** {@inheritDoc} */ + public void clear() { + super.clear(); + Arrays.fill( _set, 0, _set.length, FREE ); + Arrays.fill( _values, 0, _values.length, no_entry_value ); + } + + + // Views + + /** {@inheritDoc} */ + public Set keySet() { + return new KeyView(); + } + + + /** {@inheritDoc} */ + public Object[] keys() { + //noinspection unchecked + K[] keys = ( K[] ) new Object[size()]; + Object[] k = _set; + + for ( int i = k.length, j = 0; i-- > 0; ) { + if ( k[i] != FREE && k[i] != REMOVED ) { + //noinspection unchecked + keys[j++] = ( K ) k[i]; + } + } + return keys; + } + + + /** {@inheritDoc} */ + public K[] keys( K[] a ) { + int size = size(); + if ( a.length < size ) { + //noinspection unchecked + a = ( K[] ) java.lang.reflect.Array.newInstance( + a.getClass().getComponentType(), size ); + } + + Object[] k = _set; + + for ( int i = k.length, j = 0; i-- > 0; ) { + if ( k[i] != FREE && k[i] != REMOVED ) { + //noinspection unchecked + a[j++] = ( K ) k[i]; + } + } + return a; + } + + + /** {@inheritDoc} */ + public TIntCollection valueCollection() { + return new TIntValueCollection(); + } + + + /** {@inheritDoc} */ + public int[] values() { + int[] vals = new int[size()]; + int[] v = _values; + Object[] keys = _set; + + for ( int i = v.length, j = 0; i-- > 0; ) { + if ( keys[i] != FREE && keys[i] != REMOVED ) { + vals[j++] = v[i]; + } + } + return vals; + } + + + /** {@inheritDoc} */ + public int[] values( int[] array ) { + int size = size(); + if ( array.length < size ) { + array = new int[size]; + } + + int[] v = _values; + Object[] keys = _set; + + for ( int i = v.length, j = 0; i-- > 0; ) { + if ( keys[i] != FREE && keys[i] != REMOVED ) { + array[j++] = v[i]; + } + } + if ( array.length > size ) { + array[size] = no_entry_value; + } + return array; + } + + + /** + * @return an iterator over the entries in this map + */ + public TObjectIntIterator iterator() { + return new TObjectIntHashIterator( this ); + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"RedundantCast"}) + public boolean increment( K key ) { + //noinspection RedundantCast + return adjustValue( key, (int)1 ); + } + + + /** {@inheritDoc} */ + public boolean adjustValue( K key, int amount ) { + int index = index(key); + if ( index < 0 ) { + return false; + } else { + _values[index] += amount; + return true; + } + } + + + /** {@inheritDoc} */ + public int adjustOrPutValue( final K key, final int adjust_amount, + final int put_amount ) { + + int index = insertKey( key ); + final boolean isNewMapping; + final int newValue; + if ( index < 0 ) { + index = -index -1; + newValue = ( _values[index] += adjust_amount ); + isNewMapping = false; + } else { + newValue = ( _values[index] = put_amount ); + isNewMapping = true; + } + + //noinspection unchecked + + if ( isNewMapping ) { + postInsertHook( consumeFreeSlot ); + } + + return newValue; + } + + + /** + * Executes procedure for each key in the map. + * + * @param procedure a TObjectProcedure value + * @return false if the loop over the keys terminated because + * the procedure returned false for some key. + */ + public boolean forEachKey( TObjectProcedure procedure ) { + return forEach( procedure ); + } + + + /** + * Executes procedure for each value in the map. + * + * @param procedure a TIntProcedure value + * @return false if the loop over the values terminated because + * the procedure returned false for some value. + */ + public boolean forEachValue( TIntProcedure procedure ) { + Object[] keys = _set; + int[] values = _values; + for ( int i = values.length; i-- > 0; ) { + if ( keys[i] != FREE && keys[i] != REMOVED + && ! procedure.execute( values[i] ) ) { + return false; + } + } + return true; + } + + + /** + * Executes procedure for each key/value entry in the + * map. + * + * @param procedure a TOObjectIntProcedure value + * @return false if the loop over the entries terminated because + * the procedure returned false for some entry. + */ + @SuppressWarnings({"unchecked"}) + public boolean forEachEntry( TObjectIntProcedure procedure ) { + Object[] keys = _set; + int[] values = _values; + for ( int i = keys.length; i-- > 0; ) { + if ( keys[i] != FREE + && keys[i] != REMOVED + && ! procedure.execute( ( K ) keys[i], values[i] ) ) { + return false; + } + } + return true; + } + + + /** + * Retains only those entries in the map for which the procedure + * returns a true value. + * + * @param procedure determines which entries to keep + * @return true if the map was modified. + */ + public boolean retainEntries( TObjectIntProcedure procedure ) { + boolean modified = false; + //noinspection unchecked + K[] keys = ( K[] ) _set; + int[] values = _values; + + // Temporarily disable compaction. This is a fix for bug #1738760 + tempDisableAutoCompaction(); + try { + for ( int i = keys.length; i-- > 0; ) { + if ( keys[i] != FREE + && keys[i] != REMOVED + && ! procedure.execute( keys[i], values[i] ) ) { + removeAt(i); + modified = true; + } + } + } + finally { + reenableAutoCompaction( true ); + } + + return modified; + } + + + /** + * Transform the values in this map using function. + * + * @param function a TIntFunction value + */ + public void transformValues( TIntFunction function ) { + Object[] keys = _set; + int[] values = _values; + for ( int i = values.length; i-- > 0; ) { + if ( keys[i] != null && keys[i] != REMOVED ) { + values[i] = function.execute( values[i] ); + } + } + } + + + // Comparison and hashing + + /** + * Compares this map with another map for equality of their stored + * entries. + * + * @param other an Object value + * @return a boolean value + */ + public boolean equals( Object other ) { + if ( ! ( other instanceof TObjectIntMap ) ) { + return false; + } + TObjectIntMap that = ( TObjectIntMap ) other; + if ( that.size() != this.size() ) { + return false; + } + try { + TObjectIntIterator iter = this.iterator(); + while ( iter.hasNext() ) { + iter.advance(); + Object key = iter.key(); + int value = iter.value(); + if ( value == no_entry_value ) { + if ( !( that.get( key ) == that.getNoEntryValue() && + that.containsKey( key ) ) ) { + + return false; + } + } else { + if ( value != that.get( key ) ) { + return false; + } + } + } + } catch ( ClassCastException ex ) { + // unused. + } + return true; + } + + + /** {@inheritDoc} */ + public int hashCode() { + int hashcode = 0; + Object[] keys = _set; + int[] values = _values; + for ( int i = values.length; i-- > 0; ) { + if ( keys[i] != FREE && keys[i] != REMOVED ) { + hashcode += HashFunctions.hash( values[i] ) ^ + ( keys[i] == null ? 0 : keys[i].hashCode() ); + } + } + return hashcode; + } + + + /** a view onto the keys of the map. */ + protected class KeyView extends MapBackedView { + + @SuppressWarnings({"unchecked"}) + public Iterator iterator() { + return new TObjectHashIterator( TObjectIntHashMap.this ); + } + + public boolean removeElement( K key ) { + return no_entry_value != TObjectIntHashMap.this.remove( key ); + } + + public boolean containsElement( K key ) { + return TObjectIntHashMap.this.contains( key ); + } + } + + + private abstract class MapBackedView extends AbstractSet + implements Set, Iterable { + + public abstract boolean removeElement( E key ); + + public abstract boolean containsElement( E key ); + + @SuppressWarnings({"unchecked"}) + public boolean contains( Object key ) { + return containsElement( (E) key ); + } + + @SuppressWarnings({"unchecked"}) + public boolean remove( Object o ) { + return removeElement( (E) o ); + } + + public void clear() { + TObjectIntHashMap.this.clear(); + } + + public boolean add( E obj ) { + throw new UnsupportedOperationException(); + } + + public int size() { + return TObjectIntHashMap.this.size(); + } + + public Object[] toArray() { + Object[] result = new Object[size()]; + Iterator e = iterator(); + for ( int i = 0; e.hasNext(); i++ ) { + result[i] = e.next(); + } + return result; + } + + public T[] toArray( T[] a ) { + int size = size(); + if ( a.length < size ) { + //noinspection unchecked + a = (T[]) java.lang.reflect.Array.newInstance( + a.getClass().getComponentType(), size ); + } + + Iterator it = iterator(); + Object[] result = a; + for ( int i = 0; i < size; i++ ) { + result[i] = it.next(); + } + + if ( a.length > size ) { + a[size] = null; + } + + return a; + } + + public boolean isEmpty() { + return TObjectIntHashMap.this.isEmpty(); + } + + public boolean addAll( Collection collection ) { + throw new UnsupportedOperationException(); + } + + @SuppressWarnings({"SuspiciousMethodCalls"}) + public boolean retainAll( Collection collection ) { + boolean changed = false; + Iterator i = iterator(); + while ( i.hasNext() ) { + if ( !collection.contains( i.next() ) ) { + i.remove(); + changed = true; + } + } + return changed; + } + } + + + class TIntValueCollection implements TIntCollection { + + /** {@inheritDoc} */ + public TIntIterator iterator() { + return new TObjectIntValueHashIterator(); + } + + /** {@inheritDoc} */ + public int getNoEntryValue() { + return no_entry_value; + } + + /** {@inheritDoc} */ + public int size() { + return _size; + } + + /** {@inheritDoc} */ + public boolean isEmpty() { + return 0 == _size; + } + + /** {@inheritDoc} */ + public boolean contains( int entry ) { + return TObjectIntHashMap.this.containsValue( entry ); + } + + /** {@inheritDoc} */ + public int[] toArray() { + return TObjectIntHashMap.this.values(); + } + + /** {@inheritDoc} */ + public int[] toArray( int[] dest ) { + return TObjectIntHashMap.this.values( dest ); + } + + public boolean add( int entry ) { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + public boolean remove( int entry ) { + int[] values = _values; + Object[] set = _set; + + for ( int i = values.length; i-- > 0; ) { + if ( ( set[i] != FREE && set[i] != REMOVED ) && entry == values[i] ) { + removeAt( i ); + return true; + } + } + return false; + } + + /** {@inheritDoc} */ + public boolean containsAll( Collection collection ) { + for ( Object element : collection ) { + if ( element instanceof Integer ) { + int ele = ( ( Integer ) element ).intValue(); + if ( ! TObjectIntHashMap.this.containsValue( ele ) ) { + return false; + } + } else { + return false; + } + } + return true; + } + + /** {@inheritDoc} */ + public boolean containsAll( TIntCollection collection ) { + TIntIterator iter = collection.iterator(); + while ( iter.hasNext() ) { + if ( ! TObjectIntHashMap.this.containsValue( iter.next() ) ) { + return false; + } + } + return true; + } + + /** {@inheritDoc} */ + public boolean containsAll( int[] array ) { + for ( int element : array ) { + if ( ! TObjectIntHashMap.this.containsValue( element ) ) { + return false; + } + } + return true; + } + + /** {@inheritDoc} */ + public boolean addAll( Collection collection ) { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + public boolean addAll( TIntCollection collection ) { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + public boolean addAll( int[] array ) { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + @SuppressWarnings({"SuspiciousMethodCalls"}) + public boolean retainAll( Collection collection ) { + boolean modified = false; + TIntIterator iter = iterator(); + while ( iter.hasNext() ) { + if ( ! collection.contains( Integer.valueOf ( iter.next() ) ) ) { + iter.remove(); + modified = true; + } + } + return modified; + } + + /** {@inheritDoc} */ + public boolean retainAll( TIntCollection collection ) { + if ( this == collection ) { + return false; + } + boolean modified = false; + TIntIterator iter = iterator(); + while ( iter.hasNext() ) { + if ( ! collection.contains( iter.next() ) ) { + iter.remove(); + modified = true; + } + } + return modified; + } + + /** {@inheritDoc} */ + public boolean retainAll( int[] array ) { + boolean changed = false; + Arrays.sort( array ); + int[] values = _values; + + Object[] set = _set; + for ( int i = set.length; i-- > 0; ) { + if ( set[i] != FREE + && set[i] != REMOVED + && ( Arrays.binarySearch( array, values[i] ) < 0) ) { + removeAt( i ); + changed = true; + } + } + return changed; + } + + /** {@inheritDoc} */ + public boolean removeAll( Collection collection ) { + boolean changed = false; + for ( Object element : collection ) { + if ( element instanceof Integer ) { + int c = ( ( Integer ) element ).intValue(); + if ( remove( c ) ) { + changed = true; + } + } + } + return changed; + } + + /** {@inheritDoc} */ + public boolean removeAll( TIntCollection collection ) { + if ( this == collection ) { + clear(); + return true; + } + boolean changed = false; + TIntIterator iter = collection.iterator(); + while ( iter.hasNext() ) { + int element = iter.next(); + if ( remove( element ) ) { + changed = true; + } + } + return changed; + } + + /** {@inheritDoc} */ + public boolean removeAll( int[] array ) { + boolean changed = false; + for ( int i = array.length; i-- > 0; ) { + if ( remove( array[i] ) ) { + changed = true; + } + } + return changed; + } + + /** {@inheritDoc} */ + public void clear() { + TObjectIntHashMap.this.clear(); + } + + /** {@inheritDoc} */ + public boolean forEach( TIntProcedure procedure ) { + return TObjectIntHashMap.this.forEachValue( procedure ); + } + + + @Override + public String toString() { + final StringBuilder buf = new StringBuilder( "{" ); + forEachValue( new TIntProcedure() { + private boolean first = true; + + public boolean execute( int value ) { + if ( first ) { + first = false; + } else { + buf.append( ", " ); + } + + buf.append( value ); + return true; + } + } ); + buf.append( "}" ); + return buf.toString(); + } + + + class TObjectIntValueHashIterator implements TIntIterator { + + protected THash _hash = TObjectIntHashMap.this; + + /** + * the number of elements this iterator believes are in the + * data structure it accesses. + */ + protected int _expectedSize; + + /** the index used for iteration. */ + protected int _index; + + /** Creates an iterator over the specified map */ + TObjectIntValueHashIterator() { + _expectedSize = _hash.size(); + _index = _hash.capacity(); + } + + /** {@inheritDoc} */ + public boolean hasNext() { + return nextIndex() >= 0; + } + + /** {@inheritDoc} */ + public int next() { + moveToNextIndex(); + return _values[_index]; + } + + /** @{inheritDoc} */ + public void remove() { + if ( _expectedSize != _hash.size() ) { + throw new ConcurrentModificationException(); + } + + // Disable auto compaction during the remove. This is a workaround for + // bug 1642768. + try { + _hash.tempDisableAutoCompaction(); + TObjectIntHashMap.this.removeAt( _index ); + } + finally { + _hash.reenableAutoCompaction( false ); + } + + _expectedSize--; + } + + /** + * Sets the internal index so that the `next' object + * can be returned. + */ + protected final void moveToNextIndex() { + // doing the assignment && < 0 in one line shaves + // 3 opcodes... + if ( ( _index = nextIndex() ) < 0 ) { + throw new NoSuchElementException(); + } + } + + /** + * Returns the index of the next value in the data structure + * or a negative value if the iterator is exhausted. + * + * @return an int value + * @throws ConcurrentModificationException + * if the underlying + * collection's size has been modified since the iterator was + * created. + */ + protected final int nextIndex() { + if ( _expectedSize != _hash.size() ) { + throw new ConcurrentModificationException(); + } + + Object[] set = TObjectIntHashMap.this._set; + int i = _index; + while ( i-- > 0 && ( set[i] == TObjectHash.FREE || + set[i] == TObjectHash.REMOVED ) ) { + + // do nothing + } + return i; + } + } + } + + + class TObjectIntHashIterator extends TObjectHashIterator + implements TObjectIntIterator { + + /** the collection being iterated over */ + private final TObjectIntHashMap _map; + + public TObjectIntHashIterator( TObjectIntHashMap map ) { + super( map ); + this._map = map; + } + + /** {@inheritDoc} */ + public void advance() { + moveToNextIndex(); + } + + /** {@inheritDoc} */ + @SuppressWarnings({"unchecked"}) + public K key() { + return ( K ) _map._set[_index]; + } + + /** {@inheritDoc} */ + public int value() { + return _map._values[_index]; + } + + /** {@inheritDoc} */ + public int setValue( int val ) { + int old = value(); + _map._values[_index] = val; + return old; + } + } + + + // Externalization + + public void writeExternal( ObjectOutput out ) throws IOException { + // VERSION + out.writeByte( 0 ); + + // SUPER + super.writeExternal( out ); + + // NO_ENTRY_VALUE + out.writeInt( no_entry_value ); + + // NUMBER OF ENTRIES + out.writeInt( _size ); + + // ENTRIES + for ( int i = _set.length; i-- > 0; ) { + if ( _set[i] != REMOVED && _set[i] != FREE ) { + out.writeObject( _set[i] ); + out.writeInt( _values[i] ); + } + } + } + + + public void readExternal( ObjectInput in ) + throws IOException, ClassNotFoundException { + + // VERSION + in.readByte(); + + // SUPER + super.readExternal( in ); + + // NO_ENTRY_VALUE + no_entry_value = in.readInt(); + + // NUMBER OF ENTRIES + int size = in.readInt(); + setUp( size ); + + // ENTRIES + while (size-- > 0) { + //noinspection unchecked + K key = ( K ) in.readObject(); + int val = in.readInt(); + put(key, val); + } + } + + + /** {@inheritDoc} */ + public String toString() { + final StringBuilder buf = new StringBuilder("{"); + forEachEntry( new TObjectIntProcedure() { + private boolean first = true; + public boolean execute( K key, int value ) { + if ( first ) first = false; + else buf.append( "," ); + + buf.append( key ).append( "=" ).append( value ); + return true; + } + }); + buf.append( "}" ); + return buf.toString(); + } +} // TObjectIntHashMap diff --git a/src/gnu/trove/map/hash/TObjectLongHashMap.java b/src/gnu/trove/map/hash/TObjectLongHashMap.java new file mode 100644 index 00000000..77511abe --- /dev/null +++ b/src/gnu/trove/map/hash/TObjectLongHashMap.java @@ -0,0 +1,1145 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.map.hash; + +import gnu.trove.impl.Constants; +import gnu.trove.impl.HashFunctions; +import gnu.trove.impl.hash.THash; +import gnu.trove.impl.hash.TObjectHash; +import gnu.trove.procedure.TObjectLongProcedure; +import gnu.trove.procedure.TObjectProcedure; +import gnu.trove.procedure.TLongProcedure; +import gnu.trove.iterator.TObjectLongIterator; +import gnu.trove.iterator.TLongIterator; +import gnu.trove.iterator.hash.TObjectHashIterator; +import gnu.trove.function.TLongFunction; +import gnu.trove.map.TObjectLongMap; +import gnu.trove.TLongCollection; + + +import java.io.*; +import java.util.*; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * An open addressed Map implementation for Object keys and long values. + * + * Created: Sun Nov 4 08:52:45 2001 + * + * @author Eric D. Friedman + * @author Rob Eden + * @author Jeff Randall + */ +public class TObjectLongHashMap extends TObjectHash + implements TObjectLongMap, Externalizable { + + static final long serialVersionUID = 1L; + + private final TObjectLongProcedure PUT_ALL_PROC = new TObjectLongProcedure() { + public boolean execute(K key, long value) { + put(key, value); + return true; + } + }; + + /** the values of the map */ + protected transient long[] _values; + + /** the value that represents null */ + protected long no_entry_value; + + + /** + * Creates a new TObjectLongHashMap instance with the default + * capacity and load factor. + */ + public TObjectLongHashMap() { + super(); + no_entry_value = Constants.DEFAULT_LONG_NO_ENTRY_VALUE; + } + + + /** + * Creates a new TObjectLongHashMap instance with a prime + * capacity equal to or greater than initialCapacity and + * with the default load factor. + * + * @param initialCapacity an int value + */ + public TObjectLongHashMap( int initialCapacity ) { + super( initialCapacity ); + no_entry_value = Constants.DEFAULT_LONG_NO_ENTRY_VALUE; + } + + + /** + * Creates a new TObjectLongHashMap instance with a prime + * capacity equal to or greater than initialCapacity and + * with the specified load factor. + * + * @param initialCapacity an int value + * @param loadFactor a float value + */ + public TObjectLongHashMap( int initialCapacity, float loadFactor ) { + super( initialCapacity, loadFactor ); + no_entry_value = Constants.DEFAULT_LONG_NO_ENTRY_VALUE; + } + + + /** + * Creates a new TObjectLongHashMap instance with a prime + * value at or near the specified capacity and load factor. + * + * @param initialCapacity used to find a prime capacity for the table. + * @param loadFactor used to calculate the threshold over which + * rehashing takes place. + * @param noEntryValue the value used to represent null. + */ + public TObjectLongHashMap( int initialCapacity, float loadFactor, long noEntryValue ) { + super( initialCapacity, loadFactor ); + no_entry_value = noEntryValue; + //noinspection RedundantCast + if ( no_entry_value != ( long ) 0 ) { + Arrays.fill( _values, no_entry_value ); + } + } + + + /** + * Creates a new TObjectLongHashMap that contains the entries + * in the map passed to it. + * + * @param map the TObjectLongMap to be copied. + */ + public TObjectLongHashMap( TObjectLongMap map ) { + this( map.size(), 0.5f, map.getNoEntryValue() ); + if ( map instanceof TObjectLongHashMap ) { + TObjectLongHashMap hashmap = ( TObjectLongHashMap ) map; + this._loadFactor = hashmap._loadFactor; + this.no_entry_value = hashmap.no_entry_value; + //noinspection RedundantCast + if ( this.no_entry_value != ( long ) 0 ) { + Arrays.fill( _values, this.no_entry_value ); + } + setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); + } + putAll( map ); + } + + + /** + * initializes the hashtable to a prime capacity which is at least + * initialCapacity + 1. + * + * @param initialCapacity an int value + * @return the actual capacity chosen + */ + public int setUp( int initialCapacity ) { + int capacity; + + capacity = super.setUp( initialCapacity ); + _values = new long[capacity]; + return capacity; + } + + + /** + * rehashes the map to the new capacity. + * + * @param newCapacity an int value + */ + protected void rehash( int newCapacity ) { + int oldCapacity = _set.length; + + //noinspection unchecked + K oldKeys[] = ( K[] ) _set; + long oldVals[] = _values; + + _set = new Object[newCapacity]; + Arrays.fill( _set, FREE ); + _values = new long[newCapacity]; + Arrays.fill( _values, no_entry_value ); + + for ( int i = oldCapacity; i-- > 0; ) { + if( oldKeys[i] != FREE && oldKeys[i] != REMOVED ) { + K o = oldKeys[i]; + int index = insertKey(o); + if ( index < 0 ) { + throwObjectContractViolation( _set[ (-index -1) ], o); + } + _set[index] = o; + _values[index] = oldVals[i]; + } + } + } + + + // Query Operations + + /** {@inheritDoc} */ + public long getNoEntryValue() { + return no_entry_value; + } + + + /** {@inheritDoc} */ + public boolean containsKey( Object key ) { + return contains( key ); + } + + + /** {@inheritDoc} */ + public boolean containsValue( long val ) { + Object[] keys = _set; + long[] vals = _values; + + for ( int i = vals.length; i-- > 0; ) { + if ( keys[i] != FREE && keys[i] != REMOVED && val == vals[i] ) { + return true; + } + } + return false; + } + + + /** {@inheritDoc} */ + public long get( Object key ) { + int index = index( key ); + return index < 0 ? no_entry_value : _values[index]; + } + + + // Modification Operations + + /** {@inheritDoc} */ + public long put( K key, long value ) { + int index = insertKey( key ); + return doPut( value, index ); + } + + + /** {@inheritDoc} */ + public long putIfAbsent( K key, long value ) { + int index = insertKey(key); + if ( index < 0 ) + return _values[-index - 1]; + return doPut( value, index ); + } + + + private long doPut( long value, int index ) { + long previous = no_entry_value; + boolean isNewMapping = true; + if ( index < 0 ) { + index = -index -1; + previous = _values[index]; + isNewMapping = false; + } + //noinspection unchecked + _values[index] = value; + + if ( isNewMapping ) { + postInsertHook( consumeFreeSlot ); + } + return previous; + } + + + /** {@inheritDoc} */ + public long remove( Object key ) { + long prev = no_entry_value; + int index = index(key); + if ( index >= 0 ) { + prev = _values[index]; + removeAt( index ); // clear key,state; adjust size + } + return prev; + } + + + /** + * Removes the mapping at index from the map. + * This method is used internally and public mainly because + * of packaging reasons. Caveat Programmer. + * + * @param index an int value + */ + protected void removeAt( int index ) { + _values[index] = no_entry_value; + super.removeAt( index ); // clear key, state; adjust size + } + + + // Bulk Operations + + /** {@inheritDoc} */ + public void putAll( Map map ) { + Set> set = map.entrySet(); + for ( Map.Entry entry : set ) { + put( entry.getKey(), entry.getValue() ); + } + } + + + /** {@inheritDoc} */ + public void putAll( TObjectLongMap map ){ + map.forEachEntry( PUT_ALL_PROC ); + } + + + /** {@inheritDoc} */ + public void clear() { + super.clear(); + Arrays.fill( _set, 0, _set.length, FREE ); + Arrays.fill( _values, 0, _values.length, no_entry_value ); + } + + + // Views + + /** {@inheritDoc} */ + public Set keySet() { + return new KeyView(); + } + + + /** {@inheritDoc} */ + public Object[] keys() { + //noinspection unchecked + K[] keys = ( K[] ) new Object[size()]; + Object[] k = _set; + + for ( int i = k.length, j = 0; i-- > 0; ) { + if ( k[i] != FREE && k[i] != REMOVED ) { + //noinspection unchecked + keys[j++] = ( K ) k[i]; + } + } + return keys; + } + + + /** {@inheritDoc} */ + public K[] keys( K[] a ) { + int size = size(); + if ( a.length < size ) { + //noinspection unchecked + a = ( K[] ) java.lang.reflect.Array.newInstance( + a.getClass().getComponentType(), size ); + } + + Object[] k = _set; + + for ( int i = k.length, j = 0; i-- > 0; ) { + if ( k[i] != FREE && k[i] != REMOVED ) { + //noinspection unchecked + a[j++] = ( K ) k[i]; + } + } + return a; + } + + + /** {@inheritDoc} */ + public TLongCollection valueCollection() { + return new TLongValueCollection(); + } + + + /** {@inheritDoc} */ + public long[] values() { + long[] vals = new long[size()]; + long[] v = _values; + Object[] keys = _set; + + for ( int i = v.length, j = 0; i-- > 0; ) { + if ( keys[i] != FREE && keys[i] != REMOVED ) { + vals[j++] = v[i]; + } + } + return vals; + } + + + /** {@inheritDoc} */ + public long[] values( long[] array ) { + int size = size(); + if ( array.length < size ) { + array = new long[size]; + } + + long[] v = _values; + Object[] keys = _set; + + for ( int i = v.length, j = 0; i-- > 0; ) { + if ( keys[i] != FREE && keys[i] != REMOVED ) { + array[j++] = v[i]; + } + } + if ( array.length > size ) { + array[size] = no_entry_value; + } + return array; + } + + + /** + * @return an iterator over the entries in this map + */ + public TObjectLongIterator iterator() { + return new TObjectLongHashIterator( this ); + } + + + /** {@inheritDoc} */ + @SuppressWarnings({"RedundantCast"}) + public boolean increment( K key ) { + //noinspection RedundantCast + return adjustValue( key, (long)1 ); + } + + + /** {@inheritDoc} */ + public boolean adjustValue( K key, long amount ) { + int index = index(key); + if ( index < 0 ) { + return false; + } else { + _values[index] += amount; + return true; + } + } + + + /** {@inheritDoc} */ + public long adjustOrPutValue( final K key, final long adjust_amount, + final long put_amount ) { + + int index = insertKey( key ); + final boolean isNewMapping; + final long newValue; + if ( index < 0 ) { + index = -index -1; + newValue = ( _values[index] += adjust_amount ); + isNewMapping = false; + } else { + newValue = ( _values[index] = put_amount ); + isNewMapping = true; + } + + //noinspection unchecked + + if ( isNewMapping ) { + postInsertHook( consumeFreeSlot ); + } + + return newValue; + } + + + /** + * Executes procedure for each key in the map. + * + * @param procedure a TObjectProcedure value + * @return false if the loop over the keys terminated because + * the procedure returned false for some key. + */ + public boolean forEachKey( TObjectProcedure procedure ) { + return forEach( procedure ); + } + + + /** + * Executes procedure for each value in the map. + * + * @param procedure a TLongProcedure value + * @return false if the loop over the values terminated because + * the procedure returned false for some value. + */ + public boolean forEachValue( TLongProcedure procedure ) { + Object[] keys = _set; + long[] values = _values; + for ( int i = values.length; i-- > 0; ) { + if ( keys[i] != FREE && keys[i] != REMOVED + && ! procedure.execute( values[i] ) ) { + return false; + } + } + return true; + } + + + /** + * Executes procedure for each key/value entry in the + * map. + * + * @param procedure a TOObjectLongProcedure value + * @return false if the loop over the entries terminated because + * the procedure returned false for some entry. + */ + @SuppressWarnings({"unchecked"}) + public boolean forEachEntry( TObjectLongProcedure procedure ) { + Object[] keys = _set; + long[] values = _values; + for ( int i = keys.length; i-- > 0; ) { + if ( keys[i] != FREE + && keys[i] != REMOVED + && ! procedure.execute( ( K ) keys[i], values[i] ) ) { + return false; + } + } + return true; + } + + + /** + * Retains only those entries in the map for which the procedure + * returns a true value. + * + * @param procedure determines which entries to keep + * @return true if the map was modified. + */ + public boolean retainEntries( TObjectLongProcedure procedure ) { + boolean modified = false; + //noinspection unchecked + K[] keys = ( K[] ) _set; + long[] values = _values; + + // Temporarily disable compaction. This is a fix for bug #1738760 + tempDisableAutoCompaction(); + try { + for ( int i = keys.length; i-- > 0; ) { + if ( keys[i] != FREE + && keys[i] != REMOVED + && ! procedure.execute( keys[i], values[i] ) ) { + removeAt(i); + modified = true; + } + } + } + finally { + reenableAutoCompaction( true ); + } + + return modified; + } + + + /** + * Transform the values in this map using function. + * + * @param function a TLongFunction value + */ + public void transformValues( TLongFunction function ) { + Object[] keys = _set; + long[] values = _values; + for ( int i = values.length; i-- > 0; ) { + if ( keys[i] != null && keys[i] != REMOVED ) { + values[i] = function.execute( values[i] ); + } + } + } + + + // Comparison and hashing + + /** + * Compares this map with another map for equality of their stored + * entries. + * + * @param other an Object value + * @return a boolean value + */ + public boolean equals( Object other ) { + if ( ! ( other instanceof TObjectLongMap ) ) { + return false; + } + TObjectLongMap that = ( TObjectLongMap ) other; + if ( that.size() != this.size() ) { + return false; + } + try { + TObjectLongIterator iter = this.iterator(); + while ( iter.hasNext() ) { + iter.advance(); + Object key = iter.key(); + long value = iter.value(); + if ( value == no_entry_value ) { + if ( !( that.get( key ) == that.getNoEntryValue() && + that.containsKey( key ) ) ) { + + return false; + } + } else { + if ( value != that.get( key ) ) { + return false; + } + } + } + } catch ( ClassCastException ex ) { + // unused. + } + return true; + } + + + /** {@inheritDoc} */ + public int hashCode() { + int hashcode = 0; + Object[] keys = _set; + long[] values = _values; + for ( int i = values.length; i-- > 0; ) { + if ( keys[i] != FREE && keys[i] != REMOVED ) { + hashcode += HashFunctions.hash( values[i] ) ^ + ( keys[i] == null ? 0 : keys[i].hashCode() ); + } + } + return hashcode; + } + + + /** a view onto the keys of the map. */ + protected class KeyView extends MapBackedView { + + @SuppressWarnings({"unchecked"}) + public Iterator iterator() { + return new TObjectHashIterator( TObjectLongHashMap.this ); + } + + public boolean removeElement( K key ) { + return no_entry_value != TObjectLongHashMap.this.remove( key ); + } + + public boolean containsElement( K key ) { + return TObjectLongHashMap.this.contains( key ); + } + } + + + private abstract class MapBackedView extends AbstractSet + implements Set, Iterable { + + public abstract boolean removeElement( E key ); + + public abstract boolean containsElement( E key ); + + @SuppressWarnings({"unchecked"}) + public boolean contains( Object key ) { + return containsElement( (E) key ); + } + + @SuppressWarnings({"unchecked"}) + public boolean remove( Object o ) { + return removeElement( (E) o ); + } + + public void clear() { + TObjectLongHashMap.this.clear(); + } + + public boolean add( E obj ) { + throw new UnsupportedOperationException(); + } + + public int size() { + return TObjectLongHashMap.this.size(); + } + + public Object[] toArray() { + Object[] result = new Object[size()]; + Iterator e = iterator(); + for ( int i = 0; e.hasNext(); i++ ) { + result[i] = e.next(); + } + return result; + } + + public T[] toArray( T[] a ) { + int size = size(); + if ( a.length < size ) { + //noinspection unchecked + a = (T[]) java.lang.reflect.Array.newInstance( + a.getClass().getComponentType(), size ); + } + + Iterator it = iterator(); + Object[] result = a; + for ( int i = 0; i < size; i++ ) { + result[i] = it.next(); + } + + if ( a.length > size ) { + a[size] = null; + } + + return a; + } + + public boolean isEmpty() { + return TObjectLongHashMap.this.isEmpty(); + } + + public boolean addAll( Collection collection ) { + throw new UnsupportedOperationException(); + } + + @SuppressWarnings({"SuspiciousMethodCalls"}) + public boolean retainAll( Collection collection ) { + boolean changed = false; + Iterator i = iterator(); + while ( i.hasNext() ) { + if ( !collection.contains( i.next() ) ) { + i.remove(); + changed = true; + } + } + return changed; + } + } + + + class TLongValueCollection implements TLongCollection { + + /** {@inheritDoc} */ + public TLongIterator iterator() { + return new TObjectLongValueHashIterator(); + } + + /** {@inheritDoc} */ + public long getNoEntryValue() { + return no_entry_value; + } + + /** {@inheritDoc} */ + public int size() { + return _size; + } + + /** {@inheritDoc} */ + public boolean isEmpty() { + return 0 == _size; + } + + /** {@inheritDoc} */ + public boolean contains( long entry ) { + return TObjectLongHashMap.this.containsValue( entry ); + } + + /** {@inheritDoc} */ + public long[] toArray() { + return TObjectLongHashMap.this.values(); + } + + /** {@inheritDoc} */ + public long[] toArray( long[] dest ) { + return TObjectLongHashMap.this.values( dest ); + } + + public boolean add( long entry ) { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + public boolean remove( long entry ) { + long[] values = _values; + Object[] set = _set; + + for ( int i = values.length; i-- > 0; ) { + if ( ( set[i] != FREE && set[i] != REMOVED ) && entry == values[i] ) { + removeAt( i ); + return true; + } + } + return false; + } + + /** {@inheritDoc} */ + public boolean containsAll( Collection collection ) { + for ( Object element : collection ) { + if ( element instanceof Long ) { + long ele = ( ( Long ) element ).longValue(); + if ( ! TObjectLongHashMap.this.containsValue( ele ) ) { + return false; + } + } else { + return false; + } + } + return true; + } + + /** {@inheritDoc} */ + public boolean containsAll( TLongCollection collection ) { + TLongIterator iter = collection.iterator(); + while ( iter.hasNext() ) { + if ( ! TObjectLongHashMap.this.containsValue( iter.next() ) ) { + return false; + } + } + return true; + } + + /** {@inheritDoc} */ + public boolean containsAll( long[] array ) { + for ( long element : array ) { + if ( ! TObjectLongHashMap.this.containsValue( element ) ) { + return false; + } + } + return true; + } + + /** {@inheritDoc} */ + public boolean addAll( Collection collection ) { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + public boolean addAll( TLongCollection collection ) { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + public boolean addAll( long[] array ) { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + @SuppressWarnings({"SuspiciousMethodCalls"}) + public boolean retainAll( Collection collection ) { + boolean modified = false; + TLongIterator iter = iterator(); + while ( iter.hasNext() ) { + if ( ! collection.contains( Long.valueOf ( iter.next() ) ) ) { + iter.remove(); + modified = true; + } + } + return modified; + } + + /** {@inheritDoc} */ + public boolean retainAll( TLongCollection collection ) { + if ( this == collection ) { + return false; + } + boolean modified = false; + TLongIterator iter = iterator(); + while ( iter.hasNext() ) { + if ( ! collection.contains( iter.next() ) ) { + iter.remove(); + modified = true; + } + } + return modified; + } + + /** {@inheritDoc} */ + public boolean retainAll( long[] array ) { + boolean changed = false; + Arrays.sort( array ); + long[] values = _values; + + Object[] set = _set; + for ( int i = set.length; i-- > 0; ) { + if ( set[i] != FREE + && set[i] != REMOVED + && ( Arrays.binarySearch( array, values[i] ) < 0) ) { + removeAt( i ); + changed = true; + } + } + return changed; + } + + /** {@inheritDoc} */ + public boolean removeAll( Collection collection ) { + boolean changed = false; + for ( Object element : collection ) { + if ( element instanceof Long ) { + long c = ( ( Long ) element ).longValue(); + if ( remove( c ) ) { + changed = true; + } + } + } + return changed; + } + + /** {@inheritDoc} */ + public boolean removeAll( TLongCollection collection ) { + if ( this == collection ) { + clear(); + return true; + } + boolean changed = false; + TLongIterator iter = collection.iterator(); + while ( iter.hasNext() ) { + long element = iter.next(); + if ( remove( element ) ) { + changed = true; + } + } + return changed; + } + + /** {@inheritDoc} */ + public boolean removeAll( long[] array ) { + boolean changed = false; + for ( int i = array.length; i-- > 0; ) { + if ( remove( array[i] ) ) { + changed = true; + } + } + return changed; + } + + /** {@inheritDoc} */ + public void clear() { + TObjectLongHashMap.this.clear(); + } + + /** {@inheritDoc} */ + public boolean forEach( TLongProcedure procedure ) { + return TObjectLongHashMap.this.forEachValue( procedure ); + } + + + @Override + public String toString() { + final StringBuilder buf = new StringBuilder( "{" ); + forEachValue( new TLongProcedure() { + private boolean first = true; + + public boolean execute( long value ) { + if ( first ) { + first = false; + } else { + buf.append( ", " ); + } + + buf.append( value ); + return true; + } + } ); + buf.append( "}" ); + return buf.toString(); + } + + + class TObjectLongValueHashIterator implements TLongIterator { + + protected THash _hash = TObjectLongHashMap.this; + + /** + * the number of elements this iterator believes are in the + * data structure it accesses. + */ + protected int _expectedSize; + + /** the index used for iteration. */ + protected int _index; + + /** Creates an iterator over the specified map */ + TObjectLongValueHashIterator() { + _expectedSize = _hash.size(); + _index = _hash.capacity(); + } + + /** {@inheritDoc} */ + public boolean hasNext() { + return nextIndex() >= 0; + } + + /** {@inheritDoc} */ + public long next() { + moveToNextIndex(); + return _values[_index]; + } + + /** @{inheritDoc} */ + public void remove() { + if ( _expectedSize != _hash.size() ) { + throw new ConcurrentModificationException(); + } + + // Disable auto compaction during the remove. This is a workaround for + // bug 1642768. + try { + _hash.tempDisableAutoCompaction(); + TObjectLongHashMap.this.removeAt( _index ); + } + finally { + _hash.reenableAutoCompaction( false ); + } + + _expectedSize--; + } + + /** + * Sets the internal index so that the `next' object + * can be returned. + */ + protected final void moveToNextIndex() { + // doing the assignment && < 0 in one line shaves + // 3 opcodes... + if ( ( _index = nextIndex() ) < 0 ) { + throw new NoSuchElementException(); + } + } + + /** + * Returns the index of the next value in the data structure + * or a negative value if the iterator is exhausted. + * + * @return an int value + * @throws ConcurrentModificationException + * if the underlying + * collection's size has been modified since the iterator was + * created. + */ + protected final int nextIndex() { + if ( _expectedSize != _hash.size() ) { + throw new ConcurrentModificationException(); + } + + Object[] set = TObjectLongHashMap.this._set; + int i = _index; + while ( i-- > 0 && ( set[i] == TObjectHash.FREE || + set[i] == TObjectHash.REMOVED ) ) { + + // do nothing + } + return i; + } + } + } + + + class TObjectLongHashIterator extends TObjectHashIterator + implements TObjectLongIterator { + + /** the collection being iterated over */ + private final TObjectLongHashMap _map; + + public TObjectLongHashIterator( TObjectLongHashMap map ) { + super( map ); + this._map = map; + } + + /** {@inheritDoc} */ + public void advance() { + moveToNextIndex(); + } + + /** {@inheritDoc} */ + @SuppressWarnings({"unchecked"}) + public K key() { + return ( K ) _map._set[_index]; + } + + /** {@inheritDoc} */ + public long value() { + return _map._values[_index]; + } + + /** {@inheritDoc} */ + public long setValue( long val ) { + long old = value(); + _map._values[_index] = val; + return old; + } + } + + + // Externalization + + public void writeExternal( ObjectOutput out ) throws IOException { + // VERSION + out.writeByte( 0 ); + + // SUPER + super.writeExternal( out ); + + // NO_ENTRY_VALUE + out.writeLong( no_entry_value ); + + // NUMBER OF ENTRIES + out.writeInt( _size ); + + // ENTRIES + for ( int i = _set.length; i-- > 0; ) { + if ( _set[i] != REMOVED && _set[i] != FREE ) { + out.writeObject( _set[i] ); + out.writeLong( _values[i] ); + } + } + } + + + public void readExternal( ObjectInput in ) + throws IOException, ClassNotFoundException { + + // VERSION + in.readByte(); + + // SUPER + super.readExternal( in ); + + // NO_ENTRY_VALUE + no_entry_value = in.readLong(); + + // NUMBER OF ENTRIES + int size = in.readInt(); + setUp( size ); + + // ENTRIES + while (size-- > 0) { + //noinspection unchecked + K key = ( K ) in.readObject(); + long val = in.readLong(); + put(key, val); + } + } + + + /** {@inheritDoc} */ + public String toString() { + final StringBuilder buf = new StringBuilder("{"); + forEachEntry( new TObjectLongProcedure() { + private boolean first = true; + public boolean execute( K key, long value ) { + if ( first ) first = false; + else buf.append( "," ); + + buf.append( key ).append( "=" ).append( value ); + return true; + } + }); + buf.append( "}" ); + return buf.toString(); + } +} // TObjectLongHashMap diff --git a/src/gnu/trove/procedure/TByteProcedure.java b/src/gnu/trove/procedure/TByteProcedure.java new file mode 100644 index 00000000..6684ea11 --- /dev/null +++ b/src/gnu/trove/procedure/TByteProcedure.java @@ -0,0 +1,41 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.procedure; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Interface for procedures with one byte parameter. + */ +public interface TByteProcedure { + /** + * Executes this procedure. A false return value indicates that + * the application executing this procedure should not invoke this + * procedure again. + * + * @param value a value of type byte + * @return true if additional invocations of the procedure are + * allowed. + */ + public boolean execute( byte value ); +} diff --git a/src/gnu/trove/procedure/TCharObjectProcedure.java b/src/gnu/trove/procedure/TCharObjectProcedure.java new file mode 100644 index 00000000..5ce3606f --- /dev/null +++ b/src/gnu/trove/procedure/TCharObjectProcedure.java @@ -0,0 +1,42 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.procedure; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Interface for procedures that take two parameters of type char and Object. + */ +public interface TCharObjectProcedure { + + /** + * Executes this procedure. A false return value indicates that + * the application executing this procedure should not invoke this + * procedure again. + * + * @param a a char value + * @param b an Object value + * @return true if additional invocations of the procedure are + * allowed. + */ + public boolean execute( char a, T b ); +} diff --git a/src/gnu/trove/procedure/TCharProcedure.java b/src/gnu/trove/procedure/TCharProcedure.java new file mode 100644 index 00000000..21f4fe40 --- /dev/null +++ b/src/gnu/trove/procedure/TCharProcedure.java @@ -0,0 +1,41 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.procedure; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Interface for procedures with one char parameter. + */ +public interface TCharProcedure { + /** + * Executes this procedure. A false return value indicates that + * the application executing this procedure should not invoke this + * procedure again. + * + * @param value a value of type char + * @return true if additional invocations of the procedure are + * allowed. + */ + public boolean execute( char value ); +} diff --git a/src/gnu/trove/procedure/TDoubleProcedure.java b/src/gnu/trove/procedure/TDoubleProcedure.java new file mode 100644 index 00000000..28f0b5a8 --- /dev/null +++ b/src/gnu/trove/procedure/TDoubleProcedure.java @@ -0,0 +1,41 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.procedure; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Interface for procedures with one double parameter. + */ +public interface TDoubleProcedure { + /** + * Executes this procedure. A false return value indicates that + * the application executing this procedure should not invoke this + * procedure again. + * + * @param value a value of type double + * @return true if additional invocations of the procedure are + * allowed. + */ + public boolean execute( double value ); +} diff --git a/src/gnu/trove/procedure/TIntByteProcedure.java b/src/gnu/trove/procedure/TIntByteProcedure.java new file mode 100644 index 00000000..fef5eecb --- /dev/null +++ b/src/gnu/trove/procedure/TIntByteProcedure.java @@ -0,0 +1,42 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.procedure; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Interface for procedures that take two parameters of type int and byte. + */ +public interface TIntByteProcedure { + + /** + * Executes this procedure. A false return value indicates that + * the application executing this procedure should not invoke this + * procedure again. + * + * @param a a int value + * @param b a byte value + * @return true if additional invocations of the procedure are + * allowed. + */ + public boolean execute( int a, byte b ); +} diff --git a/src/gnu/trove/procedure/TIntIntProcedure.java b/src/gnu/trove/procedure/TIntIntProcedure.java new file mode 100644 index 00000000..97f012b3 --- /dev/null +++ b/src/gnu/trove/procedure/TIntIntProcedure.java @@ -0,0 +1,42 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.procedure; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Interface for procedures that take two parameters of type int and int. + */ +public interface TIntIntProcedure { + + /** + * Executes this procedure. A false return value indicates that + * the application executing this procedure should not invoke this + * procedure again. + * + * @param a a int value + * @param b a int value + * @return true if additional invocations of the procedure are + * allowed. + */ + public boolean execute( int a, int b ); +} diff --git a/src/gnu/trove/procedure/TIntObjectProcedure.java b/src/gnu/trove/procedure/TIntObjectProcedure.java new file mode 100644 index 00000000..d7630412 --- /dev/null +++ b/src/gnu/trove/procedure/TIntObjectProcedure.java @@ -0,0 +1,42 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.procedure; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Interface for procedures that take two parameters of type int and Object. + */ +public interface TIntObjectProcedure { + + /** + * Executes this procedure. A false return value indicates that + * the application executing this procedure should not invoke this + * procedure again. + * + * @param a a int value + * @param b an Object value + * @return true if additional invocations of the procedure are + * allowed. + */ + public boolean execute( int a, T b ); +} diff --git a/src/gnu/trove/procedure/TIntProcedure.java b/src/gnu/trove/procedure/TIntProcedure.java new file mode 100644 index 00000000..5b1a6447 --- /dev/null +++ b/src/gnu/trove/procedure/TIntProcedure.java @@ -0,0 +1,41 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.procedure; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Interface for procedures with one int parameter. + */ +public interface TIntProcedure { + /** + * Executes this procedure. A false return value indicates that + * the application executing this procedure should not invoke this + * procedure again. + * + * @param value a value of type int + * @return true if additional invocations of the procedure are + * allowed. + */ + public boolean execute( int value ); +} diff --git a/src/gnu/trove/procedure/TLongProcedure.java b/src/gnu/trove/procedure/TLongProcedure.java new file mode 100644 index 00000000..6b169f01 --- /dev/null +++ b/src/gnu/trove/procedure/TLongProcedure.java @@ -0,0 +1,41 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.procedure; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Interface for procedures with one long parameter. + */ +public interface TLongProcedure { + /** + * Executes this procedure. A false return value indicates that + * the application executing this procedure should not invoke this + * procedure again. + * + * @param value a value of type long + * @return true if additional invocations of the procedure are + * allowed. + */ + public boolean execute( long value ); +} diff --git a/src/gnu/trove/procedure/TObjectDoubleProcedure.java b/src/gnu/trove/procedure/TObjectDoubleProcedure.java new file mode 100644 index 00000000..61a3e22e --- /dev/null +++ b/src/gnu/trove/procedure/TObjectDoubleProcedure.java @@ -0,0 +1,42 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.procedure; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Interface for procedures that take two parameters of type Object and double. + */ +public interface TObjectDoubleProcedure { + + /** + * Executes this procedure. A false return value indicates that + * the application executing this procedure should not invoke this + * procedure again. + * + * @param a an Object value + * @param b a double value + * @return true if additional invocations of the procedure are + * allowed. + */ + public boolean execute( K a, double b ); +} diff --git a/src/gnu/trove/procedure/TObjectIntProcedure.java b/src/gnu/trove/procedure/TObjectIntProcedure.java new file mode 100644 index 00000000..2f32664a --- /dev/null +++ b/src/gnu/trove/procedure/TObjectIntProcedure.java @@ -0,0 +1,42 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.procedure; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Interface for procedures that take two parameters of type Object and int. + */ +public interface TObjectIntProcedure { + + /** + * Executes this procedure. A false return value indicates that + * the application executing this procedure should not invoke this + * procedure again. + * + * @param a an Object value + * @param b a int value + * @return true if additional invocations of the procedure are + * allowed. + */ + public boolean execute( K a, int b ); +} diff --git a/src/gnu/trove/procedure/TObjectLongProcedure.java b/src/gnu/trove/procedure/TObjectLongProcedure.java new file mode 100644 index 00000000..3e23e672 --- /dev/null +++ b/src/gnu/trove/procedure/TObjectLongProcedure.java @@ -0,0 +1,42 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.procedure; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * Interface for procedures that take two parameters of type Object and long. + */ +public interface TObjectLongProcedure { + + /** + * Executes this procedure. A false return value indicates that + * the application executing this procedure should not invoke this + * procedure again. + * + * @param a an Object value + * @param b a long value + * @return true if additional invocations of the procedure are + * allowed. + */ + public boolean execute( K a, long b ); +} diff --git a/src/gnu/trove/procedure/TObjectProcedure.java b/src/gnu/trove/procedure/TObjectProcedure.java new file mode 100644 index 00000000..71cf0e21 --- /dev/null +++ b/src/gnu/trove/procedure/TObjectProcedure.java @@ -0,0 +1,42 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + + +package gnu.trove.procedure; + +/** + * Interface for procedures with one Object parameter. + * + * Created: Mon Nov 5 21:45:49 2001 + * + * @author Eric D. Friedman + * @version $Id: TObjectProcedure.java,v 1.1.2.1 2009/09/02 21:52:33 upholderoftruth Exp $ + */ + +public interface TObjectProcedure { + /** + * Executes this procedure. A false return value indicates that + * the application executing this procedure should not invoke this + * procedure again. + * + * @param object an Object value + * @return true if additional invocations of the procedure are + * allowed. + */ + public boolean execute(T object); +}// TObjectProcedure diff --git a/src/gnu/trove/set/TCharSet.java b/src/gnu/trove/set/TCharSet.java new file mode 100644 index 00000000..9a04b11e --- /dev/null +++ b/src/gnu/trove/set/TCharSet.java @@ -0,0 +1,320 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.set; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + +import gnu.trove.iterator.TCharIterator; +import gnu.trove.procedure.TCharProcedure; +import gnu.trove.TCharCollection; + +import java.util.Collection; +import java.util.Set; +import java.io.Serializable; + +/** + * An implementation of the Set interface that uses an + * open-addressed hash table to store its contents. + * + * Created: Sat Nov 3 10:38:17 2001 + * + * @author Eric D. Friedman, Rob Eden, Jeff Randall + * @version $Id: _E_Set.template,v 1.1.2.5 2009/09/15 02:38:31 upholderoftruth Exp $ + */ + +public interface TCharSet extends TCharCollection { + + + /** + * Returns the value that is used to represent null. The default + * value is generally zero, but can be changed during construction + * of the collection. + * + * @return the value that represents null + */ + char getNoEntryValue(); + + + /** + * Returns the number of elements in this set (its cardinality). If this + * set contains more than Integer.MAX_VALUE elements, returns + * Integer.MAX_VALUE. + * + * @return the number of elements in this set (its cardinality) + */ + int size(); + + + /** + * Returns true if this set contains no elements. + * + * @return true if this set contains no elements + */ + boolean isEmpty(); + + + /** + * Returns true if this set contains the specified element. + * + * @param entry an char value + * @return true if the set contains the specified element. + */ + boolean contains( char entry ); + + + /** + * Creates an iterator over the values of the set. The iterator + * supports element deletion. + * + * @return an TCharIterator value + */ + TCharIterator iterator(); + + + /** + * Returns an array containing all of the elements in this set. + * If this set makes any guarantees as to what order its elements + * are returned by its iterator, this method must return the + * elements in the same order. + * + *

The returned array will be "safe" in that no references to it + * are maintained by this set. (In other words, this method must + * allocate a new array even if this set is backed by an array). + * The caller is thus free to modify the returned array. + * + *

This method acts as bridge between array-based and collection-based + * APIs. + * + * @return an array containing all the elements in this set + */ + char[] toArray(); + + + /** + * Returns an array containing elements in this set. + * + *

If this set fits in the specified array with room to spare + * (i.e., the array has more elements than this set), the element in + * the array immediately following the end of the set is set to + * {@link #getNoEntryValue()}. (This is useful in determining + * the length of this set only if the caller knows that this + * set does not contain any elements representing null.) + * + *

If the native array is smaller than the set size, + * the array will be filled with elements in Iterator order + * until it is full and exclude the remainder. + * + *

If this set makes any guarantees as to what order its elements + * are returned by its iterator, this method must return the elements + * in the same order. + * + * @param dest the array into which the elements of this set are to be + * stored. + * @return an char[] containing all the elements in this set + * @throws NullPointerException if the specified array is null + */ + char[] toArray( char[] dest ); + + + /** + * Inserts a value into the set. + * + * @param entry a char value + * @return true if the set was modified by the add operation + */ + boolean add( char entry ); + + + /** + * Removes entry from the set. + * + * @param entry an char value + * @return true if the set was modified by the remove operation. + */ + boolean remove( char entry ); + + + /** + * Tests the set to determine if all of the elements in + * collection are present. + * + * @param collection a Collection value + * @return true if all elements were present in the set. + */ + boolean containsAll( Collection collection ); + + + /** + * Tests the set to determine if all of the elements in + * TCharCollection are present. + * + * @param collection a TCharCollection value + * @return true if all elements were present in the set. + */ + boolean containsAll( TCharCollection collection ); + + + /** + * Tests the set to determine if all of the elements in + * array are present. + * + * @param array as array of char primitives. + * @return true if all elements were present in the set. + */ + boolean containsAll( char[] array ); + + + /** + * Adds all of the elements in collection to the set. + * + * @param collection a Collection value + * @return true if the set was modified by the add all operation. + */ + boolean addAll( Collection collection ); + + + /** + * Adds all of the elements in the TCharCollection to the set. + * + * @param collection a TCharCollection value + * @return true if the set was modified by the add all operation. + */ + boolean addAll( TCharCollection collection ); + + + /** + * Adds all of the elements in the array to the set. + * + * @param array a array of char primitives. + * @return true if the set was modified by the add all operation. + */ + boolean addAll( char[] array ); + + + /** + * Removes any values in the set which are not contained in + * collection. + * + * @param collection a Collection value + * @return true if the set was modified by the retain all operation + */ + boolean retainAll( Collection collection ); + + + /** + * Removes any values in the set which are not contained in + * TCharCollection. + * + * @param collection a TCharCollection value + * @return true if the set was modified by the retain all operation + */ + boolean retainAll( TCharCollection collection ); + + + /** + * Removes any values in the set which are not contained in + * array. + * + * @param array an array of char primitives. + * @return true if the set was modified by the retain all operation + */ + boolean retainAll( char[] array ); + + + /** + * Removes all of the elements in collection from the set. + * + * @param collection a Collection value + * @return true if the set was modified by the remove all operation. + */ + boolean removeAll( Collection collection ); + + + /** + * Removes all of the elements in TCharCollection from the set. + * + * @param collection a TCharCollection value + * @return true if the set was modified by the remove all operation. + */ + boolean removeAll( TCharCollection collection ); + + + /** + * Removes all of the elements in array from the set. + * + * @param array an array of char primitives. + * @return true if the set was modified by the remove all operation. + */ + public boolean removeAll( char[] array ); + + + /** + * Empties the set. + */ + void clear(); + + + /** + * Executes procedure for each element in the set. + * + * @param procedure a TCharProcedure value + * @return false if the loop over the set terminated because + * the procedure returned false for some value. + */ + boolean forEach( TCharProcedure procedure ); + + + // Comparison and hashing + + /** + * Compares the specified object with this set for equality. Returns + * true if the specified object is also a set, the two sets + * have the same size, and every member of the specified set is + * contained in this set (or equivalently, every member of this set is + * contained in the specified set). This definition ensures that the + * equals method works properly across different implementations of the + * set interface. + * + * @param o object to be compared for equality with this set + * @return true if the specified object is equal to this set + */ + boolean equals( Object o ); + + + /** + * Returns the hash code value for this set. The hash code of a set is + * defined to be the sum of the hash codes of the elements in the set. + * This ensures that s1.equals(s2) implies that + * s1.hashCode()==s2.hashCode() for any two sets s1 + * and s2, as required by the general contract of + * {@link Object#hashCode}. + * + * @return the hash code value for this set + * @see Object#equals(Object) + * @see Set#equals(Object) + */ + int hashCode(); + + +} // THashSet diff --git a/src/gnu/trove/set/TIntSet.java b/src/gnu/trove/set/TIntSet.java new file mode 100644 index 00000000..0faccbe4 --- /dev/null +++ b/src/gnu/trove/set/TIntSet.java @@ -0,0 +1,320 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library 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 Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.set; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + +import gnu.trove.iterator.TIntIterator; +import gnu.trove.procedure.TIntProcedure; +import gnu.trove.TIntCollection; + +import java.util.Collection; +import java.util.Set; +import java.io.Serializable; + +/** + * An implementation of the Set interface that uses an + * open-addressed hash table to store its contents. + * + * Created: Sat Nov 3 10:38:17 2001 + * + * @author Eric D. Friedman, Rob Eden, Jeff Randall + * @version $Id: _E_Set.template,v 1.1.2.5 2009/09/15 02:38:31 upholderoftruth Exp $ + */ + +public interface TIntSet extends TIntCollection { + + + /** + * Returns the value that is used to represent null. The default + * value is generally zero, but can be changed during construction + * of the collection. + * + * @return the value that represents null + */ + int getNoEntryValue(); + + + /** + * Returns the number of elements in this set (its cardinality). If this + * set contains more than Integer.MAX_VALUE elements, returns + * Integer.MAX_VALUE. + * + * @return the number of elements in this set (its cardinality) + */ + int size(); + + + /** + * Returns true if this set contains no elements. + * + * @return true if this set contains no elements + */ + boolean isEmpty(); + + + /** + * Returns true if this set contains the specified element. + * + * @param entry an int value + * @return true if the set contains the specified element. + */ + boolean contains( int entry ); + + + /** + * Creates an iterator over the values of the set. The iterator + * supports element deletion. + * + * @return an TIntIterator value + */ + TIntIterator iterator(); + + + /** + * Returns an array containing all of the elements in this set. + * If this set makes any guarantees as to what order its elements + * are returned by its iterator, this method must return the + * elements in the same order. + * + *

The returned array will be "safe" in that no references to it + * are maintained by this set. (In other words, this method must + * allocate a new array even if this set is backed by an array). + * The caller is thus free to modify the returned array. + * + *

This method acts as bridge between array-based and collection-based + * APIs. + * + * @return an array containing all the elements in this set + */ + int[] toArray(); + + + /** + * Returns an array containing elements in this set. + * + *

If this set fits in the specified array with room to spare + * (i.e., the array has more elements than this set), the element in + * the array immediately following the end of the set is set to + * {@link #getNoEntryValue()}. (This is useful in determining + * the length of this set only if the caller knows that this + * set does not contain any elements representing null.) + * + *

If the native array is smaller than the set size, + * the array will be filled with elements in Iterator order + * until it is full and exclude the remainder. + * + *

If this set makes any guarantees as to what order its elements + * are returned by its iterator, this method must return the elements + * in the same order. + * + * @param dest the array into which the elements of this set are to be + * stored. + * @return an int[] containing all the elements in this set + * @throws NullPointerException if the specified array is null + */ + int[] toArray( int[] dest ); + + + /** + * Inserts a value into the set. + * + * @param entry a int value + * @return true if the set was modified by the add operation + */ + boolean add( int entry ); + + + /** + * Removes entry from the set. + * + * @param entry an int value + * @return true if the set was modified by the remove operation. + */ + boolean remove( int entry ); + + + /** + * Tests the set to determine if all of the elements in + * collection are present. + * + * @param collection a Collection value + * @return true if all elements were present in the set. + */ + boolean containsAll( Collection collection ); + + + /** + * Tests the set to determine if all of the elements in + * TIntCollection are present. + * + * @param collection a TIntCollection value + * @return true if all elements were present in the set. + */ + boolean containsAll( TIntCollection collection ); + + + /** + * Tests the set to determine if all of the elements in + * array are present. + * + * @param array as array of int primitives. + * @return true if all elements were present in the set. + */ + boolean containsAll( int[] array ); + + + /** + * Adds all of the elements in collection to the set. + * + * @param collection a Collection value + * @return true if the set was modified by the add all operation. + */ + boolean addAll( Collection collection ); + + + /** + * Adds all of the elements in the TIntCollection to the set. + * + * @param collection a TIntCollection value + * @return true if the set was modified by the add all operation. + */ + boolean addAll( TIntCollection collection ); + + + /** + * Adds all of the elements in the array to the set. + * + * @param array a array of int primitives. + * @return true if the set was modified by the add all operation. + */ + boolean addAll( int[] array ); + + + /** + * Removes any values in the set which are not contained in + * collection. + * + * @param collection a Collection value + * @return true if the set was modified by the retain all operation + */ + boolean retainAll( Collection collection ); + + + /** + * Removes any values in the set which are not contained in + * TIntCollection. + * + * @param collection a TIntCollection value + * @return true if the set was modified by the retain all operation + */ + boolean retainAll( TIntCollection collection ); + + + /** + * Removes any values in the set which are not contained in + * array. + * + * @param array an array of int primitives. + * @return true if the set was modified by the retain all operation + */ + boolean retainAll( int[] array ); + + + /** + * Removes all of the elements in collection from the set. + * + * @param collection a Collection value + * @return true if the set was modified by the remove all operation. + */ + boolean removeAll( Collection collection ); + + + /** + * Removes all of the elements in TIntCollection from the set. + * + * @param collection a TIntCollection value + * @return true if the set was modified by the remove all operation. + */ + boolean removeAll( TIntCollection collection ); + + + /** + * Removes all of the elements in array from the set. + * + * @param array an array of int primitives. + * @return true if the set was modified by the remove all operation. + */ + public boolean removeAll( int[] array ); + + + /** + * Empties the set. + */ + void clear(); + + + /** + * Executes procedure for each element in the set. + * + * @param procedure a TIntProcedure value + * @return false if the loop over the set terminated because + * the procedure returned false for some value. + */ + boolean forEach( TIntProcedure procedure ); + + + // Comparison and hashing + + /** + * Compares the specified object with this set for equality. Returns + * true if the specified object is also a set, the two sets + * have the same size, and every member of the specified set is + * contained in this set (or equivalently, every member of this set is + * contained in the specified set). This definition ensures that the + * equals method works properly across different implementations of the + * set interface. + * + * @param o object to be compared for equality with this set + * @return true if the specified object is equal to this set + */ + boolean equals( Object o ); + + + /** + * Returns the hash code value for this set. The hash code of a set is + * defined to be the sum of the hash codes of the elements in the set. + * This ensures that s1.equals(s2) implies that + * s1.hashCode()==s2.hashCode() for any two sets s1 + * and s2, as required by the general contract of + * {@link Object#hashCode}. + * + * @return the hash code value for this set + * @see Object#equals(Object) + * @see Set#equals(Object) + */ + int hashCode(); + + +} // THashSet diff --git a/src/languages.txt b/src/languages.txt new file mode 100644 index 00000000..97dffed6 --- /dev/null +++ b/src/languages.txt @@ -0,0 +1,61 @@ +af_ZA=Afrikaans (ZA) +ar_SA=العربية (العالم العربي) +bg_BG=БългарÑки (BG) +ca_ES=Català (CAT) +cs_CZ=ÄŒeÅ¡tina (CZ) +cy_GB=Cymraeg (Cymru) +da_DK=Dansk (DK) +de_DE=Deutsch (Deutschland) +el_GR=Ελληνικά (El) +en_AU=Australian English (Australia) +en_CA=Canadian English (CA) +en_GB=English (UK) +en_PT=Pirate Speak (PIRATE) +eo_UY=Esperanto (Mondo) +es_AR=Español (Argentina) +es_ES=Español (España) +es_MX=Español (México) +es_UY=Español (Uruguay) +es_VE=Español (Venezuela) +et_EE=Eesti (ET) +eu_ES=Euskara (EH) +fi_FI=suomi (FI) +fr_FR=Français (France) +fr_CA=Français (CA) +ga_IE=Gaeilge (Éire) +gl_ES=Galego (Galicia) +he_IL=×נגלית (IL) +hi_IN=अंगà¥à¤°à¥‡à¥›à¥€ (भारत) +hr_HR=Hrvatski (HR) +hu_HU=Magyar (HU) +id_ID=Bahasa Indonesia (ID) +is_IS=Ãslenska (IS) +it_IT=Italiano (Italia) +ja_JP=日本語 (日本) +ka_GE=ქáƒáƒ áƒ—ული (სáƒáƒ¥áƒáƒ áƒ—ველáƒ) +ko_KR=한국어 (KR) +kw_GB=Kernowek (Cornwall) +lt_LT=Lietuvių (Lietuva) +lv_LV=LatvieÅ¡u (Latvija) +ms_MY=Bahasa Melayu (MS) +mt_MT=Malti (MT) +nl_NL=Nederlands (Nederland) +nn_NO=Norsk nynorsk (Noreg) +no_NO=Norsk (NO) +pl_PL=Polski (Polska) +pt_BR=Português (BR) +pt_PT=Português (Portugal) +qya_AA=Quenya (Arda) +ro_RO=Română (RO) +ru_RU=РуÑÑкий (РоÑÑиÑ) +sk_SK=SlovenÄina (SK) +sl_SI=SlovenÅ¡Äina (SLO) +sr_SP=СрпÑки (Србија) +sv_SE=Svenska (Sverige) +th_TH=ภาษาไทย (TH) +tlh_AA=tlhIngan Hol (US) +tr_TR=Türkçe (TR) +uk_UA=УкраїнÑька (Україна) +vi_VN=Tiếng Việt (VN) +zh_CN=简体中文 (中国) +zh_TW=ç¹é«”中文 (å°ç£) diff --git a/src/locale/README.md b/src/locale/README.md new file mode 100644 index 00000000..a5fe062b --- /dev/null +++ b/src/locale/README.md @@ -0,0 +1,4 @@ +RPG-Items-Locales +================= + +Please submit pull requests with translations. en_GB is the main locale so copy missing strings from that one diff --git a/src/locale/af_ZA.lang b/src/locale/af_ZA.lang new file mode 100644 index 00000000..2bc1f2f3 --- /dev/null +++ b/src/locale/af_ZA.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:38 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/ar_SA.lang b/src/locale/ar_SA.lang new file mode 100644 index 00000000..2bc1f2f3 --- /dev/null +++ b/src/locale/ar_SA.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:38 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/bg_BG.lang b/src/locale/bg_BG.lang new file mode 100644 index 00000000..2bc1f2f3 --- /dev/null +++ b/src/locale/bg_BG.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:38 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/ca_ES.lang b/src/locale/ca_ES.lang new file mode 100644 index 00000000..2bc1f2f3 --- /dev/null +++ b/src/locale/ca_ES.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:38 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/cs_CZ.lang b/src/locale/cs_CZ.lang new file mode 100644 index 00000000..2bc1f2f3 --- /dev/null +++ b/src/locale/cs_CZ.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:38 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/cy_GB.lang b/src/locale/cy_GB.lang new file mode 100644 index 00000000..2bc1f2f3 --- /dev/null +++ b/src/locale/cy_GB.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:38 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/da_DK.lang b/src/locale/da_DK.lang new file mode 100644 index 00000000..2bc1f2f3 --- /dev/null +++ b/src/locale/da_DK.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:38 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/de_DE.lang b/src/locale/de_DE.lang new file mode 100644 index 00000000..a3814521 --- /dev/null +++ b/src/locale/de_DE.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:39 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/el_GR.lang b/src/locale/el_GR.lang new file mode 100644 index 00000000..a3814521 --- /dev/null +++ b/src/locale/el_GR.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:39 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/en_AU.lang b/src/locale/en_AU.lang new file mode 100644 index 00000000..a3814521 --- /dev/null +++ b/src/locale/en_AU.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:39 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/en_CA.lang b/src/locale/en_CA.lang new file mode 100644 index 00000000..a3814521 --- /dev/null +++ b/src/locale/en_CA.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:39 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/en_GB.lang b/src/locale/en_GB.lang new file mode 100644 index 00000000..7d8daf47 --- /dev/null +++ b/src/locale/en_GB.lang @@ -0,0 +1,211 @@ +#Generated on 2013-04-22 17:49:39 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.haspermission=Enabled +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.info.foodpoints=Food points +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.food=Add the food power to @[Item]# and restore @[Food points]# when eated. +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting of 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the rumble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.lifesteal=Adds the lifesteal power to @[Item]# with a chance of enemy life stealing of 1/@[Chance]# +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +command.rpgitem.permission=Enable/disable the permission restriction on the item @[Item]#. The permission restriction prevent a player to use an item if he doesn't have the permission @[Permission]#. The permission restriction can be toggled on or off with the @[Enabled]# option. +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on http://rpgitems2.webs.com/ or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.permission.booleanerror=Enabled must be boolean ! (true or false) +message.permission.success=Permission restriction successfully set ! +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.food=Restore %d food point(s) +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d +power.lifesteal=%d chance on 1 to steal the ennemy life +command.rpgitem.removerecipe=Removes the @[Item]#'s recipe +command.rpgitem.recipe=Sets the @[Item]#'s recipe +message.recipe.removed=Recipe removed +message.error.only.player=This command can only be used by players +message.recipe.1=Do not change. Use the empty slots +message.recipe.2=Place items in the empty spaces +message.recipe.3=in the shape of the crafting +message.recipe.4=recipe that you want the item to +message.recipe.5=have +command.rpgitem.drop=Gets the chance that @[Item]# will drop from @[EntityType]#. 0% means it doesn't drop +command.rpgitem.drop.set=Sets the chance that @[Item]# will drop from @[EntityType]# to @[Chance]#%. 0% prevents it from dropping +message.skyhook.fail=You failed to hook anything +power.skyhook=Hooks onto a sky rail +power.potiontick=Gives %s %d while in use +command.rpgitem.skyhook=Adds the skyhook power to @[Item]#. The skyhook power will allow the user to hook on to @[Material]# up to @[Distance]# blocks away +command.rpgitem.potiontick=Adds the potiontick power to @[Item]#. The potiontick power will give the welder of the @[Item]# @[Effect]# level @[Amplifier]# while held/worn +command.info.durability=Durability +command.rpgitem.durability=Sets the durability for the item. The durability is the number of times the item can be used to attack, block damage(armour) or mine +command.rpgitem.durability.infinite=Sets the durability to infinite. This means the item should never break +command.rpgitem.durability.togglebar=Toggles the display of the tooltip based durability bar +message.durability.change=Durability changed +message.durability.toggle=Durability bar toggled +command.rpgitem.giveperms=Toggles give requiring permissions +message.giveperms.true=Give now requires permissions +message.giveperms.false=Give now does not require permissions +message.give.ok=You were given %s +message.give.to=Gave %s to %s +message.drop.get=The chance that '%s' will drop from '%s' is %.2f%% +message.drop.set=The chance that '%s' will drop from '%s' was set to %.2f%% +message.print.durability=Max durability: %d \ No newline at end of file diff --git a/src/locale/en_PT.lang b/src/locale/en_PT.lang new file mode 100644 index 00000000..ed0a3de6 --- /dev/null +++ b/src/locale/en_PT.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:39 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Order +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=WordsLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hook +command.info.hexcolour=HexColour +command.info.integer=[Number] +command.info.integer.limit=[Number(%d-%d)] +command.info.item=[Loot] +command.info.itemid=LootID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Pirate] +command.info.power=Power +command.info.quality=Quality +command.info.string=[Text] +command.info.string.limit=[Text(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list o' all salvaged loot +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to smite on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/en_US.lang b/src/locale/en_US.lang new file mode 100644 index 00000000..a3814521 --- /dev/null +++ b/src/locale/en_US.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:39 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/eo_UY.lang b/src/locale/eo_UY.lang new file mode 100644 index 00000000..a3814521 --- /dev/null +++ b/src/locale/eo_UY.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:39 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/es_AR.lang b/src/locale/es_AR.lang new file mode 100644 index 00000000..a3814521 --- /dev/null +++ b/src/locale/es_AR.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:39 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/es_ES.lang b/src/locale/es_ES.lang new file mode 100644 index 00000000..1cfc26f9 --- /dev/null +++ b/src/locale/es_ES.lang @@ -0,0 +1,211 @@ +#Generated on 2013-04-22 17:49:39 +command.info.amplifier=Amplificador +command.info.armour=Armadura +command.info.burntime=Tiempo ardiendo +command.info.chance=Probabilidad +command.info.command=Comando +command.info.cooldown=Recarga +command.info.count=Cuenta +command.info.damage=Daño +command.info.data=Datos +command.info.descriptionline=Descripción +command.info.details=Detalles +command.info.display=Nombre mostrado +command.info.distance=Distancia +command.info.double=[Doble] +command.info.double.limit=[Doble(%d-%d)] +command.info.duration=Duración +command.info.effect=Efecto +command.info.hand=Mano +command.info.hexcolour=ColorHex +command.info.integer=[Entero] +command.info.integer.limit=[Entero(%d-%d)] +command.info.item=[Objeto] +command.info.itemid=ID del objeto +command.info.level=Nivel +command.info.lineno=Número de línea +command.info.lore=Historia +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Nombre +command.info.permission=Permiso +command.info.haspermission=Activado +command.info.player=[Jugador] +command.info.power=Poder +command.info.quality=Calidad +command.info.string=[Linea] +command.info.string.limit=[Linea(Max:%d)] +command.info.terms=Términos +command.info.type=Tipo +command.info.foodpoints=Puntos de comida +command.rpgitem.armour=Muestra la armadura del objeto @[Item]# +command.rpgitem.armour.set=Asigna al objeto @[Item]# la armadura @[Armour]# +command.rpgitem.arrow=Añade el poder Flecha al objeto @[Item]# con un tiempo de regarga predeterminado de 20 ticks (1 segundo). El poder flecha disparará una flecha cuando se haga click derecho +command.rpgitem.arrow.full=Añade el poder Flecha al objeto @[Item]# con un tiempo de regarga de @[Cooldown]# ticks. El poder flecha disparará una flecha cuando se haga click derecho +command.rpgitem.command=Añade el poder comando al objeto @[Item]# con un tiempo de regarga de @[Cooldown]# ticks. El objeto mostrará @[Display]#. El objeto ejecutará el comando @[Command]# con click @[left,right]#. **Nota**: Si necesitas usar espacios en @[Display]# o en @[Command]# debes poner ` antes y después ej.: `/say Hola` +command.rpgitem.command.full=Añade el poder comando al objeto @[Item]# con un tiempo de regarga de @[Cooldown]# ticks. El objeto mostrará @[Display]#. El objeto ejecutará el comando @[Command]# con click @[left,right]# dando el permiso @[Permission]# únicamente para el uso del comando. **Nota**: Si necesitas usar espacios en @[Display]#, @[Command]# o en @[Permission]# debes poner ` antes y después ej.: `/say Hola` +command.rpgitem.command.old=Ejecuta el comando con click @[left/right]#. @[Detials]# es una | lista separada de @[display Text]# | @[command]# | @[permission]#. La información de la herramienta muestra @[display Text]#. El texto a mostrar y el comando deben estar separados por el símbolo |. Si se añade un permiso se le dará al jugador solo para el uso del objeto y después se le será retirado +command.rpgitem.consume=Añade el poder Consumir al objeto @[Item]#. El poder consumir destruye el objeto cuando se hace click derecho. +command.rpgitem.create=Crea un objeto con el nombre @[Name]#. El @[Name]# es lo que se usa para identificar al objeto en los comandos ej: Give. @[Name]# no es el nombre que aparece en el objeto, eso se asigna con Display. +command.rpgitem.damage=Muestra el daño actual del objeto @[Item]# +command.rpgitem.damage.set=Asigna el daño del objeto @[Item]# a @[Damage]# +command.rpgitem.damage.set.range=Asigna el daño del objeto @[Item]# a un número aleatorio entre @[Min]# y @[Max]# +command.rpgitem.description.add=Añade la línea @[DescriptionLine]# al objeto @[Item]# +command.rpgitem.description.remove=Borra la línea @[LineNo]# del objeto @[Item]# +command.rpgitem.description.set=Asigna la linea @[LineNo]# a @[DescriptionLine]# en el objeto @[Item]# +command.rpgitem.display=Muestra el nombre con que aparece el objeto @[Item]# +command.rpgitem.display.set=Asigna el nombre con que aparece el objeto @[Item]# a @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Añade el poder bola de fuego a @[Item]# con un tiempo de recarga predeterminado de 20 ticks (1 segundo). El poder bola de fuego lanzará una bola de fuego cuando se haga click derecho +command.rpgitem.fireball.full=Añade el poder bola de fuego a @[Item]# con un tiempo de recarga de @[Cooldown]# ticks. El poder bola de fuego lanzará una bola de fuego cuando se haga click derecho +command.rpgitem.flame=Añade el poder llama a @[Item]# con un tiempo de quemado predeterminado de 20 ticks (1 segundo). El poder llama prendera fuego al objetivo cuando se le golpee +command.rpgitem.flame.full=Añade el poder llama a @[Item]# con un tiempo de quemado de @[Burntime]# ticks. El poder llama prendera fuego al objetivo cuando se le golpee +command.rpgitem.give=Da el objeto @[Item]# a quien ejecuta el comando +command.rpgitem.food=Añade el poder comida a @[Item]# y restaura @[Food points]# cuando es comido. +command.rpgitem.give.player=Da el objeto @[Item]# al jugador @[Player]# +command.rpgitem.give.player.count=Da @[Count]# unidades del objeto @[Item]# al jugador @[Player]# +command.rpgitem.hand=Muestra la mano actual con la que se usa el objeto @[Item]# +command.rpgitem.hand.set=Asigna la mano con la que se usa el objeto @[Item]# a @[Hand]# +command.rpgitem.help=Muestra comandos y ayuda para comandos que contienen los términos de búsqueda @[Terms]# +command.rpgitem.ice=Añade el poder hielo a @[Item]# con un tiempo de recarga predeterminado de 20 ticks (1 segundo). El poder hielo lanzará un bloque de hielo que creara una caja de hielo al impactar. El hielo desaparecerá lentamente al poco tiempo +command.rpgitem.ice.full=Añade el poder hielo a @[Item]# con un tiempo de recarga de @[Cooldown]# ticks. El poder hielo lanzará un bloque de hielo que creara una caja de hielo al impactar. El hielo desaparecerá lentamente al poco tiempo +command.rpgitem.item=Muestra el objeto mostrado con @[Item]# +command.rpgitem.item.set=Asigna el objeto mostrado con @[Item]# a @[Material]# +command.rpgitem.item.set.data=Asigna el objeto mostrado con @[Item]# a @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Asigna el objeto mostrado con @[Item]# a @[Material]# : @[Data]#, donde @[Data]# es un número hexadecimal +command.rpgitem.item.set.id=Asigna el objeto mostrado con @[Item]# a @[ItemID]# +command.rpgitem.item.set.id.data=Asigna el objeto mostrado con @[Item]# a @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Cambia si ignorar el plugin WorldGuard o no al usar el objeto @[Item]# +command.rpgitem.knockup=Añade el poder peloteo al objeto @[Item]# con una probabilidad predeterminada de 1/20 y un poder de 2. El poder peloteo enviará al objetivo volando cuando lo golpee +command.rpgitem.knockup.full=Añade el poder peloteo al objeto @[Item]# con una probabilidad de 1/@[Chance]# y un poder de @[Power]#. El poder peloteo enviará al objetivo volando cuando lo golpee +command.rpgitem.lightning=Añade el poder rayo a @[Item]# con una probabilidad predeterminada de 1/20. El poder rayo dará al objetivo golpeado con un rayo +command.rpgitem.lightning.full=Añade el poder rayo a @[Item]# con una probabilidad de 1/@[Chance]#. El poder rayo dará al objetivo golpeado con un rayo +command.rpgitem.list=Muestra una lista de objetos creados +command.rpgitem.lore=Muestra la historia actual del objeto @[Item]# +command.rpgitem.lore.set=Cambia la historia del objeto @[Item]# a @[Lore]# +command.rpgitem.potionhit=Añade el poder golpepoción a @[Item]# con una probabilidad de funcionar de 1/@[Chance]#. En el golpe, aplica el efecto @[Effect]# durante @[Duration]# ticks con poder de @[Amplifier]#. Efectos de pociones válidos: +command.rpgitem.potionself=Añade el poder autopoción @[Item]# con un tiempo de recarga de @[Cooldown]# ticks. Cuando se hace click derecho aplica el efecto @[Effect]# durante @[Duration]# ticks con poder de @[Amplifier]#. Efectos de pociones válidos: +command.rpgitem.print=Muestra el actual nombre mostrado del objeto @[Item]# en el chat +command.rpgitem.quality=Muestra la calidad actual del objeto @[Item]# +command.rpgitem.quality.set=Asigna la calidad del objeto @[Item]# a @[Quality]#. +command.rpgitem.rainbow=Añade el poder arcoiris a @[Item]# con un tiempo de recarga predeterminado 20 ticks (1 segundo) y un total de 5 bloques. El poder arcoiris lanzará lana de colores con click derecho. La lana se destruye automáticamente. +command.rpgitem.rainbow.full=Añade el poder arcoiris a @[Item]# con un tiempo de recarga of @[Cooldown]# y un número de @[Count]# bloques. El poder arcoiris lanzará lana de colores con click derecho. La lana se destruye automáticamente. +command.rpgitem.remove=Borra el objeto @[Item]# del sistema. Esto no borra los objetos de los inventarios de los jugadores, pero los poderes y el daño dejarán de funcionar en ellos. +command.rpgitem.removepower=Quita el poder @[Power]# del objeto @[Item]# +command.rpgitem.rumble=Añade el poder retumbar a @[Item]# Con un tiempo de recarga de @[Cooldown]# ticks y una fuerza de @[Power]#, la onda viajará @[Distance]# bloques. El poder retumbar envía una onda de choque por el suelo que lanza por los aires a quien golpee +command.rpgitem.teleport=Añade el poder teletransporte a @[Item]# con un tiempo de recarga predeterminado de 20 ticks (1 segundo) y teletransporta a una distancia de 5 bloques. El poder te teletransporta en la direccción en la que estés mirando +command.rpgitem.teleport.full=Añade el poder teletransporte a @[Item]# con un tiempo de recarga de @[Cooldown]# ticks y teletransporta a una distancia de @[Distance]# bloques. El poder te teletransporta en la direccción en la que estés mirando +command.rpgitem.tntcannon=Añade el poder cañon de TNT a @[Item]# con un tiempo de recarga predeterminado de 20 ticks (1 segundo). El poder lanzará TNT encendido cuando se haga click derecho. +command.rpgitem.tntcannon.full=Añade el poder cañon de TNT a @[Item]# con un tiempo de recarga de @[Cooldown]# ticks. El poder lanzará TNT encendido cuando se haga click derecho. +command.rpgitem.type=Muestra el tipo actual del objeto @[Item]# +command.rpgitem.type.set=Asigna el tipo del objeto @[Item]# a @[Type]# +command.rpgitem.unbreakable=Añade el poder indestructible a @[Item]#. El poder indestructible previene que el objeto se rompa +command.rpgitem.unbreaking=Añade el poder duración a @[Item]# con un nivel predeterminado de 1. El poder duración funciona de forma similar al encantamiento +command.rpgitem.unbreaking.full=Añade el poder duración a @[Item]# con un nivel de @[Level]#. El poder duración funciona de forma similar al encantamiento +command.rpgitem.lifesteal=Añade el poder vampiro a @[Item]# con una probabilidad de robar vida al enemigo de 1/@[Chance]# +command.rpgitem.worldguard=Alterna el soporte de WorldGuard. Si se encuentra habilitado previene usar objetos en un area no-pvp +command.rpgitem.permission=Habilita/Deshabilita la restricción de permisos en el objeto @[Item]#. La restricción de permisos previene que un jugador use un objeto si no tiene el permiso @[Permission]#. La restricción puede ser encendida o apagada con la opción @[Enabled]#. +message.armour.get=La armadura del objeto '%s' es '%d%%' +message.armour.set=La armadura del objeto '%s' ha cambiado a '%d%%' +message.command.info=Ayuda mas detallada en la pagina de información en http://rpgitems2.webs.com/ o en /rpgitem help [terms] +message.command.usage=Uso del comando: /%s (%s) +message.cooldown=Debes esperar %.1f segundos +message.create.fail=Ya existe un objeto con ese nombre +message.create.ok=Objeto '%s' creado +message.damage.get=El daño del objeto '%s' es %d-%d +message.damage.set=Daño del objeto '%s' cambiado a %d +message.damage.set.range=Daño del objeto '%s' cambiado a %d-%d +message.description.change=Línea cambiada +message.description.ok=Línea añadida +message.description.out.of.range=La línea %d esta fuera del intervalo +message.description.remove=Línea borrada +message.display.get=El nombre mostrado del objeto '%s' ess '%s' +message.display.set=El nombre mostrado del objeto '%s' ha cambiado a '%s' +message.error.command=Error: %s +message.error.command.format=Texto a mostrar y comando deben estar separados por una | +message.error.double.format='%s' no es un doble +message.error.double.limit=El número debe estar entre %.2f y %.2f +message.error.effect=%s no es un efecto válido +message.error.integer.format='%s' no es un entero +message.error.integer.limit=El número debe estar entre %d y %d +message.error.item=Objeto desconocido '%s' +message.error.material=Material desconocido '%s' +message.error.option=Opción inválida '%s' +message.error.permission=No tienes permiso +message.error.player=No se puede encontrar al jugador %s +message.error.string.length='%s' es mayor que el tamaño máximo %d +message.error.unknown.command=Error: Comando desconocido %s +message.give.console=No se le pueden dar objetos a la consola +message.hand.get=La ano con la que se usa el objeto '%s' es '%s' +message.hand.set=Mano con la que se usa el objeto '%s' cambiada a '%s' +message.help.for=Mostrando ayuda para '%s' +message.item.cant.find=No se pudo encontrar el objeto +message.item.get=El objeto mostrado por el objeto '%s' es '%s' +message.item.set=Objeto mostrado por el objeto '%s' cambiado a '%s:%d' +message.lore.get=La historia del objeto '%s' es '%s' +message.lore.set=Historia del objeto '%s' cambiada a '%s' +message.power.ok=Poder añadido +message.power.removed=Poder %s borrado +message.power.unknown=Poder desconocido %s +message.permission.booleanerror=Habilitado debe ser booleano ! (true o false) +message.permission.success=La restricción de permisos fue correctamente ajustada ! +message.quality.get=La calidad del objeto '%s' es '%s' +message.quality.note=Calidades: +message.quality.set=Calidad del objeto '%s' cambiada a '%s' +message.remove.ok=Objeto '%s' borrado +message.too.far=Cayó demasiado lejos... +message.type.get=El tipo del objeto '%s' es '%s' +message.type.set=Tipo del objeto cambiado a '%s' cambiado a '%s' +message.worldguard.disable=Soporte de Worldguard desactivado +message.worldguard.enable=Soporte de Worldguard activo +message.worldguard.error=No se encontró el plugin Worldguard +message.worldguard.override.active=Ignorar Worldguard activo +message.worldguard.override.disabled=Ignorar Worldguard desactivado +power.arrow=Dispara una flecha. (Recarga en %.1fs) +power.consume=Consumido al usarlo +power.fireball=Shoots a fireball (Recarga en%.1fs) +power.flame=Quema al objetivo durante %.1f segundos +power.ice=Dispara hielo (Recarga en %.1fs) +power.knockup=%d%% probabilidad de enviar al objetivo volando +power.lightning=%d%% probabilidad de electrocutar al golpear +power.potionhit=%d%% probabilidad de aplicar %s +power.food=Restaura %d puntos de salud +power.potionself=Concede %s %d durante %.1fs +power.rainbow=Dispara %d bloques de lana de colores (Recarga en %.1fs) +power.rumble=Envía una onda de choque. (Recarga en %.1fs) +power.teleport=Se teletransporta %d bloques (Recarga en %.1fs) +power.tntcannon=Dispara TNT (Recarga en %.1fs) +power.unbreakable=Nunca se rompe +power.unbreaking=Duración %d +power.lifesteal=%d sobre 1 probabilidades de robar la salud al enemigo +command.rpgitem.removerecipe=Borra la receta de @[Item]# +command.rpgitem.recipe=Asigna la receta de @[Item]# +message.recipe.removed=Receta borrada +message.error.only.player=Este comando solo puede ser usado por jugadores +message.recipe.1=No cambiar. Usa los huecos vacíos +message.recipe.2=Coloca objetos en los huecos vacíos +message.recipe.3=con la forma de la receta +message.recipe.4=de crafteo que quieres que +message.recipe.5=tenga el objeto +command.rpgitem.drop=Da la posibilidad de que @[Item]# sea soltado por @[EntityType]#. 0% significa que no será droppeado +command.rpgitem.drop.set=Asigna la posibilidad de que @[Item]# sea soltado por @[EntityType]# un @[Chance]#% de veces. 0% previene que sea droppeado +message.skyhook.fail=Fallaste al engancharte a algo +power.skyhook=Te enganchaste a un rail de cielo +power.potiontick=Te da %s %d durante su uso +command.rpgitem.skyhook=Añade el poder gancho del cielo a @[Item]#. El poder gancho permite al usuario engancharse en @[Material]# hasta a @[Distance]# bloques de distancia +command.rpgitem.potiontick=Añade el poder potiontick a @[Item]#. EL poder potiontick da al usuario del @[Item]# @[Effect]# nivel @[Amplifier]# mientras se lo ponga o sostenga +command.info.durability=Durabilidad +command.rpgitem.durability=Asigna la durabilidad al objeto. La durabilidad es el número de veces que un objeto puede ser usado para atacar, bloquear daño(armadura) o minar +command.rpgitem.durability.infinite=Asigna durabilidad infinita. Esto implica que el objeto nunca se romperá +command.rpgitem.durability.togglebar=Cambia si se muestra o no la barra de durabilidad del objeto +message.durability.change=Durabilidad cambiada +message.durability.toggle=Barra de durabilidad cambiada +command.rpgitem.giveperms=Cambia si dar o no los permisos para dar. +message.giveperms.true=Dar ahora requiere permisos +message.giveperms.false=Dar ahora no requiere permisos +message.give.ok=Te fue dado %s +message.give.to=Se le ha dado %s a %s +message.drop.get=La probabilidad de que '%s' sea droppeado por '%s' es %.2f%% +message.drop.set=La probabilidad de que '%s' sea droppeado por '%s' fue cambiada a %.2f%% +message.print.durability=Durabilidad máxima: %d diff --git a/src/locale/es_MX.lang b/src/locale/es_MX.lang new file mode 100644 index 00000000..a3814521 --- /dev/null +++ b/src/locale/es_MX.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:39 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/es_UY.lang b/src/locale/es_UY.lang new file mode 100644 index 00000000..a3814521 --- /dev/null +++ b/src/locale/es_UY.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:39 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/es_VE.lang b/src/locale/es_VE.lang new file mode 100644 index 00000000..a3814521 --- /dev/null +++ b/src/locale/es_VE.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:39 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/et_EE.lang b/src/locale/et_EE.lang new file mode 100644 index 00000000..a3814521 --- /dev/null +++ b/src/locale/et_EE.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:39 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/eu_ES.lang b/src/locale/eu_ES.lang new file mode 100644 index 00000000..a3814521 --- /dev/null +++ b/src/locale/eu_ES.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:39 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/fi_FI.lang b/src/locale/fi_FI.lang new file mode 100644 index 00000000..a3814521 --- /dev/null +++ b/src/locale/fi_FI.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:39 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/fr_CA.lang b/src/locale/fr_CA.lang new file mode 100644 index 00000000..a3814521 --- /dev/null +++ b/src/locale/fr_CA.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:39 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/fr_FR.lang b/src/locale/fr_FR.lang new file mode 100644 index 00000000..0cda6647 --- /dev/null +++ b/src/locale/fr_FR.lang @@ -0,0 +1,211 @@ +#Generated on 2013-04-23 19:58:55 +command.info.amplifier=Amplification +command.info.armour=Armure +command.info.burntime=Temps de brûlure +command.info.chance=Chance +command.info.command=Commande +command.info.cooldown=Temps de recharge +command.info.count=Nombre +command.info.damage=Dégâts +command.info.data=Données +command.info.descriptionline=DescriptionLigne +command.info.details=Détails +command.info.display=Affichage +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Durée +command.info.effect=Effet +command.info.hand=Main +command.info.hexcolour=HexCouleur +command.info.integer=[Entier] +command.info.integer.limit=[Entier(%d-%d)] +command.info.item=[Objet] +command.info.itemid=ID de l'objet +command.info.level=Niveau +command.info.lineno=LineNo +command.info.lore=Histoire +command.info.material=[Matière] +command.info.max=Max +command.info.min=Min +command.info.name=Nom +command.info.permission=Permission +command.info.haspermission=Activée +command.info.player=[Joueur] +command.info.power=Pouvoir +command.info.quality=Qualité +command.info.string=[Chaîne] +command.info.string.limit=[Chaîne(Max:%d)] +command.info.terms=Termes +command.info.type=Type +command.info.foodpoints= Points de nourriture +command.rpgitem.armour=Affiche l'armure actuelle de l'item @[Item]# +command.rpgitem.armour.set=Définit l'armure de l'item @[Item]# à @[Armour]# +command.rpgitem.arrow=Ajoute le pouvoir de flèche à l'item @[Item]# avec un temps de recharge par défaut de 20 ticks (1 seconde). Le pouvoir de flèche peut tirer une flèche avec le clic droit. +command.rpgitem.arrow.full=Ajoute le pouvoir de flèche à l'item @[Item]# avec un temps de recharge de @[Cooldown]# ticks. Le pouvoir de flèche peut tirer une flèche avec le clic droit. +command.rpgitem.command=Ajoute le pouvoir de commande sur @[Item]# avec un temps de recharge de @[Cooldown]# ticks. L'info-bulle affichera @[Display]#. L'item sera exécuté @[Command]# sur le clic @[left,right]#. **Note** Si vous voulez des espaces dans @[Display]# ou @[Command]# il faut entourer la ligne avec ` e.g: `/say Hello` +command.rpgitem.command.full=Ajoute le pouvoir de commande sur @[Item]# avec un temps de recharge de @[Cooldown]# ticks. L'info-bulle affichera @[Display]#. L'item sera exécuté @[Command]# sur le clic @[left,right]#. L'utilisation de l'item donnera alors la permission @[Permission]# seulement pour utiliser cette dernière. **Note** Si vous voulez des espaces dans @[Display]# ou @[Command]# il faut entourer la ligne avec ` e.g: `/say Hello` +command.rpgitem.command.old=Exécute la commande avec le clic @[left/right]#. @[Detials]# est une | liste séparée de @[display Text]# | @[command]# | @[permission]#. L'info-bulle affiche @[display Text]#. L'affichage texte et la commande doivent être séparés par un symbole | . Si la permission est prévue, elle sera donnée au joueur seulement pour l'utilisation de l'item et sera ensuite supprimée. +command.rpgitem.consume=Ajoute le pouvoir de consumation sur l'item @[Item]#. Le pouvoir de consumation sera supprimé avec le clic droit. +command.rpgitem.create=Crée un item avec le nom @[Name]#. Le @[Name]# est le nom que vous utiliserez pour les futures commandes comme par exemple le "Give". @[Name]# n'est pas le "surnom" de l'item qui s'affiche dans l'info-bulle, c'est la commande (/rpgitem "item" display "Surnom") qui changera l'affichage du nom de votre item. +command.rpgitem.damage=Affiche les dégâts actuels de l'item @[Item]# +command.rpgitem.damage.set=Définit les dégâts de l'item @[Item]# à @[Damage]# +command.rpgitem.damage.set.range=Définit les dégâts de l'item @[Item]# comme dégâts aléatoire entre @[Min]# et @[Max]# +command.rpgitem.description.add=Ajoute une ligne @[DescriptionLine]# sur l'item @[Item]# +command.rpgitem.description.remove=Supprime la ligne @[LineNo]# sur l'item @[Item]# +command.rpgitem.description.set=Définit la ligne @[LineNo]# en @[DescriptionLine]# sur l'item @[Item]# +command.rpgitem.display=Affiche l'actuel surnom de l'item @[Item]# +command.rpgitem.display.set=Définit le surnom de l'item @[Item]# comme @[Display]# +command.rpgitem.error.command=Erreur: %s +command.rpgitem.fireball=Ajoute le pouvoir de boule de feu sur l'item @[Item]# avec un temps de recharge par défaut de 20 ticks (1 seconde). Le pouvoir de boule de feu peut tirer une boule de feu avec le clic droit. +command.rpgitem.fireball.full=Ajoute le pouvoir de boule de feu sur l'item @[Item]# avec un temps de recharge de @[Cooldown]# ticks. Le pouvoir de boule de feu peut tirer une boule de feu avec le clic droit. +command.rpgitem.flame=Ajoute le pouvoir d'embrasement sur @[Item]# avec un temps de recharge par défaut de 20 ticks (1 seconde). Le pouvoir d'embrasement brûle une cible en la frappant. +command.rpgitem.flame.full=Ajoute le pouvoir d'embrasement sur @[Item]# avec un temps de brûlure de @[Burntime]# ticks. Le pouvoir d'embrasement brûle une cible en la frappant. +command.rpgitem.give=Donne l'item @[Item]# à l'utilisateur de cette commande. +command.rpgitem.food=Ajoute le pouvoir de nourriture sur @[Item]# et donne @[Food points]# quand il est mangé. +command.rpgitem.give.player=Donne l'item @[item]# au joueur @[Player]# +command.rpgitem.give.player.count=Donne @[Count]# de l'item @[item]# au joueur @[Player]# +command.rpgitem.hand=Affiche l’actuelle "main" utilisée de l'item @[Item]# +command.rpgitem.hand.set=Définit la "main" utilisée de l'item @[Item]# comme @[Hand]# +command.rpgitem.help=Affiche les commandes et l'aide pour les commandes qui contiennent des termes de recherche @[Terms]# +command.rpgitem.ice=Ajoute le pouvoir de glace sur @[Item]# avec un temps de chargement par défaut de 20 ticks (1 second). Le pouvoir de glace tire un bloc de glace avec le clic droit, qui disparaît peu après. +command.rpgitem.ice.full=Ajoute le pouvoir de glace sur @[Item]# avec un temps de chargement de @[Cooldown]# ticks. Le pouvoir de glace tire un bloc de glace avec le clic droit, qui disparaît peu après. +command.rpgitem.item=Affiche l'actuel matériel de l'item @[Item]# +command.rpgitem.item.set=Définit le matériel de l'item @[Item]# comme @[Material]# +command.rpgitem.item.set.data=Définit le matériel de l'item @[Item]# comme @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Définit le matériel de l'item @[Item]# comme @[Material]# : @[Data]#, où @[Data]# est un nombre héxadécimal. +command.rpgitem.item.set.id=Définit le matériel de l'item @[Item]# comme @[ItemID]# +command.rpgitem.item.set.id.data=Définit le matériel de l'item @[Item]# comme @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Active/Désactive l'ignorance de World Guard sur l'item @[Item]# +command.rpgitem.knockup=Ajoute le pouvoir de propulsion sur @[Item]# avec une chance de 1/20 et un pouvoir de 2. Le pouvoir de propulsion envoie la cible en l'air. +command.rpgitem.knockup.full=Ajoute le pouvoir de propulsion sur @[Item]# avec une chance de 1/@[Chance]# et un pouvoir de @[Power]#. Le pouvoir de propulsion envoie la cible en l'air. +command.rpgitem.lightning=Ajoute le pouvoir de foudre sur @[Item]# avec une chance de 1/20. Le pouvoir de foudre frappe la cible avec un éclair. +command.rpgitem.lightning.full=Ajoute le pouvoir de foudre sur @[Item]# avec une chance de 1/@[Chance]#. Le pouvoir de propulsion envoie la cible en l'air. +command.rpgitem.list=Affiche la liste de tout les items crées. +command.rpgitem.lore=Affiche l'histoire actuelle de l'item @[Item]# +command.rpgitem.lore.set=Définit l'histoire de l'item @[Item]# comme @[Lore]# +command.rpgitem.potionhit=Ajoute le pouvoir de potionhit sur @[Item]# avec une chance de frapper de 1/@[Chance]#. En frappant cela applique @[Effect]# pour @[Duration]# ticks de puissance @[Amplifier]#. Effet de potion valide: +command.rpgitem.potionself=Ajoute le pouvoir de potion sur soi sur @[Item]# avec un temps de recharge de @[Cooldown]#. En faisant clic droit cela applique @[Effect]# pour @[Duration]# ticks de puissance @[Amplifier]#. Effet de potion valide: +command.rpgitem.print=Affiche l'info-bulle de l'item @[Item]# dans le chat. +command.rpgitem.quality=Affiche la qualité actuelle de l'item @[Item]# +command.rpgitem.quality.set=Définit la qualité de l'item @[Item]# comme @[Quality]#. +command.rpgitem.rainbow=Ajoute le pouvoir d'arc-en-ciel sur @[Item]# avec un temps de recharge par défaut de 20 ticks (1 seconde) et 5 bloc. Le pouvoir d'arc-en-ciel tire plusieurs bloc de laine colorés avec le clic droit, qui disparaissent peu après. +command.rpgitem.rainbow.full=Ajoute le pouvoir d'arc-en-ciel sur @[Item]# avec un temps de recharge de @[Cooldown]# et un nombre de bloc de @[Count]# . Le pouvoir d'arc-en-ciel tire plusieurs bloc de laine colorés avec le clic droit, qui disparaissent peu après. +command.rpgitem.remove=Supprime l'item @[Item]# du système. Cela ne supprime pas l'item de l'inventaire du joueur mais tout les pouvoirs ainsi que les dégâts n'auront plus d'effet. +command.rpgitem.removepower=Supprime le pouvoir @[Power]# de l'item @[Item]# +command.rpgitem.rumble=Ajoute le pouvoir de grondement sur @[Item]# avec un temps de recharge de @[Cooldown]# ticks et une puissance de @[Power]#. La vague traversera une distance de @[Distance]# blocs. Le pouvoir de grondement créer une onde de choc sur le sol qui enverra toutes entités en l'air. +command.rpgitem.teleport=Ajoute le pouvoir de téléportation sur @[Item]# avec un temps de recharge par défaut de 20 ticks (1 seconde) et une téléportation de 5 bloc. Le pouvoir de téléportation vous téléporte dans la direction voulue. +command.rpgitem.teleport.full=Ajoute le pouvoir de téléportation sur @[Item]# avec un temps de recharge de @[Cooldown]# ticks (1 second) et une téléportation de @[Distance]# bloc. Le pouvoir de téléportation vous téléporte dans la direction voulue. +command.rpgitem.tntcannon=Ajoute le pourvoir de tntcannon sur @[Item]# avec un temps de recharge par défaut de 20 ticks (1 seconde). Le pouvoir de tntcannon tire un bloc de tnt avec le clic droit. +command.rpgitem.tntcannon.full=Ajoute le pourvoir de tntcannon sur @[Item]# avec un temps de recharge de @[Cooldown]# ticks. Le pouvoir de tntcannon tire un bloc de tnt avec le clic droit. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Définit le type de l'item @[Item]# comme @[Type]# +command.rpgitem.unbreakable=Ajoute de le pouvoir incassable sur @[Item]#. Le pouvoir incassable empêche l'item de casser. +command.rpgitem.unbreaking=Ajoute le pouvoir de durabilité sur @[Item]#. Le pouvoir de durabilité augmente la résistance de l'item +command.rpgitem.unbreaking.full=Ajoute de le pouvoir de durabilité sur @[Item]# avec un niveau de @[Level]#. Le pouvoir de durabilité augmente la résistance de l'item. +command.rpgitem.lifesteal=Ajoute de le pouvoir de drainage de vie sur @[Item]# avec une chance de voler la vie de l'ennemi de 1/@[Chance]#. +command.rpgitem.worldguard=Active/désactive le support de World Guard. Actuellement, s'il est activé, il empêche l'utilisation de RPG Items dans les zones non-pvp. +command.rpgitem.permission=Active/désactive la restriction de permission sur l'item @[Item]#. La restriction de permission empêche le joueur d'utiliser l'item s'il n'a pas la permission @[Permission]#. La restriction de permission peut être activé/désactivé avec l'option @[Activé]#. +message.armour.get=L'armure de l'item '%s' est '%d%%' +message.armour.set=L'armure de l'item '%s' est maintenant de '%d%%' +message.command.info=Aide plus détaillée sur notre site web http://rpgitems2.webs.com/ ou /rpgitem help [terms] +message.command.usage=Usage de la commande pour /%s (%s) +message.cooldown=Vous devez attendre %.1f secondes. +message.create.fail=L'item n'a pas pu être crée car un autre utilise déjà ce nom. +message.create.ok=L'item '%s' a été crée. +message.damage.get=Les dégâts de l'item '%s' sont %d-%d +message.damage.set=Les dégâts de l'item '%s' sont maintenant de %d +message.damage.set.range=Les dégâts de l'item '%s' sont maintenant de %d-%d +message.description.change=Ligne changée +message.description.ok=Ajout de ligne +message.description.out.of.range=Ligne %d hors de portée +message.description.remove=Ligne supprimée +message.display.get=Le surnom de l'item '%s' est '%s' +message.display.set=Le surnom de l'item '%s' sera maintenant '%s' +message.error.command=Erreur: %s +message.error.command.format=Le texte et la commande doivent être séparés par un | +message.error.double.format='%s' n'est pas un double +message.error.double.limit=Le nombre doit être entre %.2f et %.2f +message.error.effect=%s n'est pas un effet valide +message.error.integer.format='%s' n'est pas entier +message.error.integer.limit=Le nombre doit être entre %d et %d +message.error.item=Item '%s' est inconnu +message.error.material=Le matériel '%s' est inconnu +message.error.option=L'option '%s' est invalide +message.error.permission=Vous n'avez pas la permission +message.error.player=Joueur %s introuvable +message.error.string.length='%s' est plus long que la longueur max %d +message.error.unknown.command=Erreur: Commande %s inconnue +message.give.console=Impossible de donner l'item de la console +message.hand.get=La main utilisée pour l'item '%s' est '%s' +message.hand.set=La main utilisée pour l'item '%s' est maintenant '%s' +message.help.for=Affichage de l'aide pour '%s' +message.item.cant.find=Item non trouvé +message.item.get=Le matériel de l'item '%s est '%s +message.item.set=Définit le matériel de l'item @[Item]# comme @[Material]# +message.lore.get=L'histoire de l'item '%s' est '%s' +message.lore.set=L'histoire de l'item '%s' est '%s' +message.permission.booleanerror=Activé doit être booléen ! (true ou false) +message.permission.success=Restriction de permission définie avec succès ! +message.power.ok=Pouvoir ajouté +message.power.removed=Pouvoir '%s' supprimé +message.power.unknown=Pouvoir %s inconnu +message.quality.get=La qualité de l'item '%s' est '%s' +message.quality.note=Qualités: +message.quality.set=La qualité de l'item '%s' est maintenant '%s' +message.remove.ok=Item '%s' supprimé. +message.too.far=C'est tombé trop loin... +message.type.get=Le type de l'item '%s' est '%s' +message.type.set=Le type de l'item '%s' est maintenant '%s' +message.worldguard.disable=Support de World Guard désactivé. +message.worldguard.enable=Support de World Guard activé. +message.worldguard.error=Aucun plugin "World Guard" trouvé +message.worldguard.override.active=Ignorance de World Guard activé +message.worldguard.override.disabled=Ignorance de World Guard désactivé +power.arrow=Tire une flèche. (temps de recharge de %.1f) +power.consume=Consumé à l'utilisation +power.fireball=Tire une boule de feu. (%.1fs) +power.flame=Brûle la cible pendant %.1f secondes. +power.ice=Tire de glace (%.1fs) +power.knockup=%d%% de chance de d'envoyer la cible en l'air +power.lightning=%d%% de lancer un éclair en frappant +power.potionhit=%d%% de chance d'appliquer %s +power.potionself=Active %s %d pour %.1fs +power.rainbow=Tire %d laines multicolores (%.1fs) +power.rumble=Envoie une onde de choque (%.1fs) +power.teleport=Téléporte à %d blocs (%.1fs) +power.tntcannon=Tire de la TNT (%.1fs) +power.unbreakable=Ne casse jamais +power.unbreaking=Durabilité %d +power.food=Redonne %d point(s) de nourriture +power.lifesteal=%d chance sur 1 de voler la vie de l'ennemi frappé +command.rpgitem.removerecipe=Supprime la recette de @[Item]# +command.rpgitem.recipe=Défini la recette de @[Item]# +message.recipe.removed=Recette supprimée +message.error.only.player=Cette commande peut être utilisé seulement en jeu +message.recipe.1=Ne pas changer. Utilisez les case vides +message.recipe.2=Placez les objets dans les espaces vides +message.recipe.3=dans la disposition de la +message.recipe.4=recette de craft que vous voulez +message.recipe.5=avoir +command.rpgitem.drop=Obtient la chance que @[Item]# soit droppé par @[EntityType]#. 0% signifie qu'il n'est pas droppé +command.rpgitem.drop.set=Défini la chance que @[Item]# soit droppé par @[EntityType]# à @[Chance]#%. 0% empêche le drop +message.skyhook.fail=Vous avez échoué à accrocher quoi que ce soit +power.skyhook=Permet de s'agripper +power.potiontick=Donne %s %d pendant l'utilisation +command.rpgitem.skyhook=Ajoute de le pouvoir de grappin sur @[Item]#. le pouvoir de grappin permet à l'utilisateur de s'agripper à @[Material]# jusqu'à @[Distance]# blocs au loin +command.rpgitem.potiontick=Ajoute de le pouvoir de tick de potion sur @[Item]#. Le pouvoir de tick de potion donne @[Effect]# @[Amplifier]# au porteur de @[Item]# tant qu'il est porté +command.info.durability=Durabilité +command.rpgitem.durability=Défini la durabilité de l'objet. La durabilité est le nombre de fois qu'un objet peut être utilisé pour attaquer, bloquer des dégâts(armure) ou miner +command.rpgitem.durability.infinite=Défini la durabilité à infini. Cela veut dire que l'objet est incassable +command.rpgitem.durability.togglebar=Active/désactive l'affichage de la bar de durabilité info-bulle +message.durability.change=Durabilité modifiée +message.durability.toggle=Bar de durabilité activeée/désactivée +command.rpgitem.giveperms=Active/désactive si la commande /rpgitem @[Item]# give requiert des permissions +message.giveperms.true=La commande /rpgitem @[Item]# give requiert maintenant des permissions +message.giveperms.false=La commande /rpgitem @[Item]# give ne requiert maintenant plus de permissions +message.give.ok=Vous vous êtes donné(e) %s +message.give.to=%s donné %s +message.drop.get=La chance que '%s' soit dropé par '%s' est %.2f%% +message.drop.set=La chance que '%s' soit dropé par '%s' a été définie à %.2f%% +message.print.durability=Maximum de durabilité: %d diff --git a/src/locale/ga_IE.lang b/src/locale/ga_IE.lang new file mode 100644 index 00000000..f84bd002 --- /dev/null +++ b/src/locale/ga_IE.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:40 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/gl_ES.lang b/src/locale/gl_ES.lang new file mode 100644 index 00000000..f84bd002 --- /dev/null +++ b/src/locale/gl_ES.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:40 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/he_IL.lang b/src/locale/he_IL.lang new file mode 100644 index 00000000..f84bd002 --- /dev/null +++ b/src/locale/he_IL.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:40 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/hi_IN.lang b/src/locale/hi_IN.lang new file mode 100644 index 00000000..f84bd002 --- /dev/null +++ b/src/locale/hi_IN.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:40 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/hr_HR.lang b/src/locale/hr_HR.lang new file mode 100644 index 00000000..f84bd002 --- /dev/null +++ b/src/locale/hr_HR.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:40 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/hu_HU.lang b/src/locale/hu_HU.lang new file mode 100644 index 00000000..f84bd002 --- /dev/null +++ b/src/locale/hu_HU.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:40 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/id_ID.lang b/src/locale/id_ID.lang new file mode 100644 index 00000000..f84bd002 --- /dev/null +++ b/src/locale/id_ID.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:40 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/is_IS.lang b/src/locale/is_IS.lang new file mode 100644 index 00000000..f84bd002 --- /dev/null +++ b/src/locale/is_IS.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:40 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/it_IT.lang b/src/locale/it_IT.lang new file mode 100644 index 00000000..f84bd002 --- /dev/null +++ b/src/locale/it_IT.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:40 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/ja_JP.lang b/src/locale/ja_JP.lang new file mode 100644 index 00000000..f84bd002 --- /dev/null +++ b/src/locale/ja_JP.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:40 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/ka_GE.lang b/src/locale/ka_GE.lang new file mode 100644 index 00000000..f84bd002 --- /dev/null +++ b/src/locale/ka_GE.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:40 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/ko_KR.lang b/src/locale/ko_KR.lang new file mode 100644 index 00000000..f84bd002 --- /dev/null +++ b/src/locale/ko_KR.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:40 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/kw_GB.lang b/src/locale/kw_GB.lang new file mode 100644 index 00000000..f84bd002 --- /dev/null +++ b/src/locale/kw_GB.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:40 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/lt_LT.lang b/src/locale/lt_LT.lang new file mode 100644 index 00000000..4d82cc45 --- /dev/null +++ b/src/locale/lt_LT.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:41 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/lv_LV.lang b/src/locale/lv_LV.lang new file mode 100644 index 00000000..4d82cc45 --- /dev/null +++ b/src/locale/lv_LV.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:41 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/ms_MY.lang b/src/locale/ms_MY.lang new file mode 100644 index 00000000..4d82cc45 --- /dev/null +++ b/src/locale/ms_MY.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:41 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/mt_MT.lang b/src/locale/mt_MT.lang new file mode 100644 index 00000000..4d82cc45 --- /dev/null +++ b/src/locale/mt_MT.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:41 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/nl_NL.lang b/src/locale/nl_NL.lang new file mode 100644 index 00000000..4d82cc45 --- /dev/null +++ b/src/locale/nl_NL.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:41 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/nn_NO.lang b/src/locale/nn_NO.lang new file mode 100644 index 00000000..4d82cc45 --- /dev/null +++ b/src/locale/nn_NO.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:41 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/no_NO.lang b/src/locale/no_NO.lang new file mode 100644 index 00000000..4d82cc45 --- /dev/null +++ b/src/locale/no_NO.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:41 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/pl_PL.lang b/src/locale/pl_PL.lang new file mode 100644 index 00000000..4d82cc45 --- /dev/null +++ b/src/locale/pl_PL.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:41 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/pt_BR.lang b/src/locale/pt_BR.lang new file mode 100644 index 00000000..4d82cc45 --- /dev/null +++ b/src/locale/pt_BR.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:41 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/pt_PT.lang b/src/locale/pt_PT.lang new file mode 100644 index 00000000..4d82cc45 --- /dev/null +++ b/src/locale/pt_PT.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:41 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/qya_AA.lang b/src/locale/qya_AA.lang new file mode 100644 index 00000000..4d82cc45 --- /dev/null +++ b/src/locale/qya_AA.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:41 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/ro_RO.lang b/src/locale/ro_RO.lang new file mode 100644 index 00000000..4d82cc45 --- /dev/null +++ b/src/locale/ro_RO.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:41 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/ru_RU.lang b/src/locale/ru_RU.lang new file mode 100644 index 00000000..4d82cc45 --- /dev/null +++ b/src/locale/ru_RU.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:41 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/sk_SK.lang b/src/locale/sk_SK.lang new file mode 100644 index 00000000..4d82cc45 --- /dev/null +++ b/src/locale/sk_SK.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:41 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/sl_SI.lang b/src/locale/sl_SI.lang new file mode 100644 index 00000000..6f1d06f0 --- /dev/null +++ b/src/locale/sl_SI.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:42 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/sr_SP.lang b/src/locale/sr_SP.lang new file mode 100644 index 00000000..6f1d06f0 --- /dev/null +++ b/src/locale/sr_SP.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:42 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/sv_SE.lang b/src/locale/sv_SE.lang new file mode 100644 index 00000000..6f1d06f0 --- /dev/null +++ b/src/locale/sv_SE.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:42 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/th_TH.lang b/src/locale/th_TH.lang new file mode 100644 index 00000000..6f1d06f0 --- /dev/null +++ b/src/locale/th_TH.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:42 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/tlh_AA.lang b/src/locale/tlh_AA.lang new file mode 100644 index 00000000..6f1d06f0 --- /dev/null +++ b/src/locale/tlh_AA.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:42 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/tr_TR.lang b/src/locale/tr_TR.lang new file mode 100644 index 00000000..6f1d06f0 --- /dev/null +++ b/src/locale/tr_TR.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:42 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/uk_UA.lang b/src/locale/uk_UA.lang new file mode 100644 index 00000000..6f1d06f0 --- /dev/null +++ b/src/locale/uk_UA.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:42 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/vi_VN.lang b/src/locale/vi_VN.lang new file mode 100644 index 00000000..6f1d06f0 --- /dev/null +++ b/src/locale/vi_VN.lang @@ -0,0 +1,172 @@ +#Generated on 2013-04-22 17:49:42 +command.info.amplifier=Amplifier +command.info.armour=Armour +command.info.burntime=Burntime +command.info.chance=Chance +command.info.command=Command +command.info.cooldown=Cooldown +command.info.count=Count +command.info.damage=Damage +command.info.data=Data +command.info.descriptionline=DescriptionLine +command.info.details=Details +command.info.display=Display +command.info.distance=Distance +command.info.double=[Double] +command.info.double.limit=[Double(%d-%d)] +command.info.duration=Duration +command.info.effect=Effect +command.info.hand=Hand +command.info.hexcolour=HexColour +command.info.integer=[Integer] +command.info.integer.limit=[Integer(%d-%d)] +command.info.item=[Item] +command.info.itemid=ItemID +command.info.level=Level +command.info.lineno=LineNo +command.info.lore=Lore +command.info.material=[Material] +command.info.max=Max +command.info.min=Min +command.info.name=Name +command.info.permission=Permission +command.info.player=[Player] +command.info.power=Power +command.info.quality=Quality +command.info.string=[String] +command.info.string.limit=[String(Max:%d)] +command.info.terms=Terms +command.info.type=Type +command.rpgitem.armour=Shows the item @[Item]#'s current armour +command.rpgitem.armour.set=Sets the item @[Item]#'s armour to @[Armour]# +command.rpgitem.arrow=Adds the arrow power to @[Item]# with a default cooldown of 20 ticks (1 second). The arrow power will fire an arrow on right click +command.rpgitem.arrow.full=Adds the arrow power to @[Item]# with a cooldown of @[Cooldown]# ticks. The arrow power will fire an arrow on right click +command.rpgitem.command=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click. **Note**: If you want spaces in @[Display]# or @[Command]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.full=Adds the command power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tooltip will display @[Display]#. The item will run @[Command]# on @[left,right]# click giving the permission @[Permission]# just for the use of the command. **Note**: If you want spaces in @[Display]#, @[Command]# or @[Permission]# then surround the string with ` e.g: `/say Hello` +command.rpgitem.command.old=Runs the command on @[left/right]# click. @[Detials]# is a | seperated list of @[display Text]# | @[command]# | @[permission]#. The tool-tip displays @[display Text]#. display Text and command must be separated a | symbol. If permission is provided the player will be given the permission just for the use of the item and then it will be removed +command.rpgitem.consume=Adds the consume power to @[Item]#. The consume power will remove the item on right click. +command.rpgitem.create=Create an item with the name @[Name]#. The @[Name]# is what you use to identify the item for later commands e.g: Give. @[Name]# is not the name of the item on the tool-tip, that is set with Display instead. +command.rpgitem.damage=Shows the item @[Item]#'s current damage +command.rpgitem.damage.set=Sets the item @[Item]#'s damage to @[Damage]# +command.rpgitem.damage.set.range=Sets the item @[Item]#'s damage to do random damage between @[Min]# and @[Max]# +command.rpgitem.description.add=Adds the line @[DescriptionLine]# to the item @[Item]# +command.rpgitem.description.remove=Removes the line @[LineNo]# on the item @[Item]# +command.rpgitem.description.set=Sets the line @[LineNo]# to @[DescriptionLine]# on the item @[Item]# +command.rpgitem.display=Shows the item @[Item]#'s current display name +command.rpgitem.display.set=Sets the item @[Item]#'s display name to @[Display]# +command.rpgitem.error.command=Error: %s +command.rpgitem.fireball=Adds the fireball power to @[Item]# with a default cooldown of 20 ticks (1 second). The fireball power will fire an fireball on right click +command.rpgitem.fireball.full=Adds the fireball power to @[Item]# with a cooldown of @[Cooldown]# ticks. The fireball power will fire an fireball on right click +command.rpgitem.flame=Adds the flame power to @[Item]# with a default burntime of 20 ticks (1 second). The flame power will set the target on fire on hit +command.rpgitem.flame.full=Adds the flame power to @[Item]# with a burntime of @[Burntime]# ticks. The flame power will set the target on fire on hit +command.rpgitem.give=Gives the item @[Item]# to the user of the command +command.rpgitem.give.player=Gives the item @[Item]# to the player @[Player]# +command.rpgitem.give.player.count=Gives @[Count]# of the item @[Item]# to the player @[Player]# +command.rpgitem.hand=Shows the item @[Item]#'s current hand +command.rpgitem.hand.set=Sets the item @[Item]#'s hand to @[Hand]# +command.rpgitem.help=Shows commands and help for commands that contain the search terms @[Terms]# +command.rpgitem.ice=Adds the ice power to @[Item]# with a default cooldown of 20 ticks (1 second). The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.ice.full=Adds the ice power to @[Item]# with a cooldown of @[Cooldown]# ticks. The ice power will fire an ice block on right click which will then create a box of ice on impact, the ice will slowly remove itself +command.rpgitem.item=Shows the item @[Item]#'s current item +command.rpgitem.item.set=Sets the item @[Item]#'s item to @[Material]# +command.rpgitem.item.set.data=Sets the item @[Item]#'s item to @[Material]# : @[Data]# +command.rpgitem.item.set.data.hex=Sets the item @[Item]#'s item to @[Material]# : @[Data]#, where @[Data]# is a hex number +command.rpgitem.item.set.id=Sets the item @[Item]#'s item to @[ItemID]# +command.rpgitem.item.set.id.data=Sets the item @[Item]#'s item to @[ItemID]# : @[Data]# +command.rpgitem.item.worldguard=Toggles worldguard override on the @[Item]# +command.rpgitem.knockup=Adds the knockup power to @[Item]# with a default chance of 1/20 and a power of 2. The knockup power will send the hit target flying +command.rpgitem.knockup.full=Adds the knockup power to @[Item]# with a chance of 1/@[Chance]# and a power of @[Power]#. The knockup power will send the hit target flying +command.rpgitem.lightning=Adds the lightning power to @[Item]# with a default chance of 1/20. The lightning power will strike the hit target with lightning +command.rpgitem.lightning.full=Adds the lightning power to @[Item]# with a chance of 1/@[Chance]#. The lightning power will strike the hit target with lightning +command.rpgitem.list=Shows a list of all created items +command.rpgitem.lore=Shows the item @[Item]#'s current lore +command.rpgitem.lore.set=Sets the item @[Item]#'s lore to @[Lore]# +command.rpgitem.potionhit=Adds the potionhit power to @[Item]# with a chance of hitting 1/@[Chance]#. On hit it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.potionself=Adds the potionself power to @[Item]# with a cooldown of @[Cooldown]#. On right click it will apply @[Effect]# for @[Duration]# ticks at power @[Amplifier]#. Valid potion effects: +command.rpgitem.print=Prints item @[Item]#'s tool-tip to chat +command.rpgitem.quality=Shows the item @[Item]#'s current quality +command.rpgitem.quality.set=Sets the item @[Item]#'s quality to @[Quality]#. +command.rpgitem.rainbow=Adds the rainbow power to @[Item]# with a default cooldown of 20 ticks (1 second) and a block count of 5. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.rainbow.full=Adds the rainbow power to @[Item]# with a cooldown of @[Cooldown]# ticks and a block count of @[Count]#. The rainbow power will fire blocks of coloured wool on right click, the wool will remove itself. +command.rpgitem.remove=Remove the item @[Item]# from the system. This does not currently remove the item from players' inventories but all powers and damage will stop working on them. +command.rpgitem.removepower=Removes power @[Power]# from item @[Item]# +command.rpgitem.rumble=Adds the runble power to @[Item]# with a cooldown of @[Cooldown]# ticks and a power of @[Power]#, the wave will travel @[Distance]# blocks. The rumble power sends a shockwave through the ground and sends any hit entities flying +command.rpgitem.teleport=Adds the teleport power to @[Item]# with a default cooldown of 20 ticks (1 second) and teleport distance of 5 blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.teleport.full=Adds the teleport power to @[Item]# with a cooldown of @[Cooldown]# ticks (1 second) and teleport distance of @[Distance]# blocks. The teleport will teleport you in the direction you're looking in +command.rpgitem.tntcannon=Adds the tntcannon power to @[Item]# with a default cooldown of 20 ticks (1 second). The tntcannon power will fire active tnt on right click. +command.rpgitem.tntcannon.full=Adds the tntcannon power to @[Item]# with a cooldown of @[Cooldown]# ticks. The tntcannon power will fire active tnt on right click. +command.rpgitem.type=Shows the item @[Item]#'s current type +command.rpgitem.type.set=Sets the item @[Item]#'s type to @[Type]# +command.rpgitem.unbreakable=Adds the unbreakable power to @[Item]#. The unbreakable power prevents the item from breaking +command.rpgitem.unbreaking=Adds the unbreaking power to @[Item]# with a default level of 1. The unbreaking power works similar to normal unbreaking +command.rpgitem.unbreaking.full=Adds the unbreaking power to @[Item]# with a level of @[Level]#. The unbreaking power works similar to normal unbreaking +command.rpgitem.worldguard=Toggles worldguard support. Currently if enabled it prevents RPG Items from being used in non-pvp area +message.armour.get=Item '%s' armour is '%d%%' +message.armour.set=Item '%s' armour set to '%d%%' +message.command.info=More detailed help on bukkitdev page or /rpgitem help [terms] +message.command.usage=Command usage for: /%s (%s) +message.cooldown=You must wait %.1f seconds +message.create.fail=An item with that name already exists +message.create.ok=Item '%s' created +message.damage.get=Item '%s' damage is %d-%d +message.damage.set=Item '%s' damage set to %d +message.damage.set.range=Item '%s' damage set to %d-%d +message.description.change=Changed line +message.description.ok=Added line +message.description.out.of.range=Line %d is out of range +message.description.remove=Removed line +message.display.get=Item '%s' display name is '%s' +message.display.set=Item '%s' display name set to '%s' +message.error.command=Error: %s +message.error.command.format=Display text and command must be seperated by a | +message.error.double.format='%s' is not a double +message.error.double.limit=Number must be between %.2f and %.2f +message.error.effect=%s is not a valid effect +message.error.integer.format='%s' is not a integer +message.error.integer.limit=Number must be between %d and %d +message.error.item=Unknown item '%s' +message.error.material=Unknown material '%s' +message.error.option=Invalid option '%s' +message.error.permission=You do not have permission +message.error.player=Cannot find player %s +message.error.string.length='%s' in longer than max length %d +message.error.unknown.command=Error: Unknown command %s +message.give.console=Cannot give console items +message.hand.get=Item '%s' hand is '%s' +message.hand.set=Item '%s' hand set to '%s' +message.help.for=Showing help for '%s' +message.item.cant.find=Cannot find item +message.item.get=Item '%s' item is '%s' +message.item.set=Item '%s' item set to '%s:%d' +message.lore.get=Item '%s' lore is '%s' +message.lore.set=Item '%s' lore set to '%s' +message.power.ok=Power added +message.power.removed=Power %s removed +message.power.unknown=Unknown power %s +message.quality.get=Item '%s' quality is '%s' +message.quality.note=Qualities: +message.quality.set=Item '%s' quality set to '%s' +message.remove.ok=Item '%s' removed +message.too.far=It landed too far away... +message.type.get=Item '%s' type is '%s' +message.type.set=Item '%s' type set to '%s' +message.worldguard.disable=Worldguard support disabled +message.worldguard.enable=Worldguard support enabled +message.worldguard.error=No Worldguard plugin found +message.worldguard.override.active=Worldguard override active +message.worldguard.override.disabled=Worldguard override disabled +power.arrow=Shoots an arrow. (%.1fs cooldown) +power.consume=Consumed on use +power.fireball=Shoots a fireball (%.1fs cooldown) +power.flame=Burns target for %.1f seconds +power.ice=Shoots Ice (%.1fs cooldown) +power.knockup=%d%% chance to send target flying +power.lightning=%d%% chance to shock on hit +power.potionhit=%d%% chance to apply %s +power.potionself=Grants %s %d for %.1fs +power.rainbow=Shoots %d multicoloured wool (%.1fs cooldown) +power.rumble=Sends out a shockwave. (%.1fs cooldown) +power.teleport=Teleports %d blocks (%.1fs cooldown) +power.tntcannon=Shoots TNT (%.1fs cooldown) +power.unbreakable=Never breaks +power.unbreaking=Unbreaking %d diff --git a/src/locale/zh_CN.lang b/src/locale/zh_CN.lang new file mode 100644 index 00000000..5e92ac5d --- /dev/null +++ b/src/locale/zh_CN.lang @@ -0,0 +1,189 @@ +#Generated on 2013-04-27 15:27:26 +command.info.amplifier=效果等级 +command.info.armour=护甲 +command.info.burntime=燃烧时间 +command.info.chance=几率 +command.info.command=指令 +command.info.cooldown=冷å´æ—¶é—´ +command.info.count=计数 +command.info.damage=伤害 +command.info.data=æ•°æ® +command.info.descriptionline=æè¿°è¡Œ +command.info.details=详细æ¡ç›® +command.info.display=展示å +command.info.distance=è·ç¦» +command.info.double=[åŒå€] +command.info.double.limit=[åŒå€(%d-%d)] +command.info.duration=æŒç»­æ—¶é—´ +command.info.effect=效果 +command.info.hand=手æŒä¿¡æ¯ +command.info.hexcolour=é¢œè‰²ä»£ç  +command.info.integer=[整数值] +command.info.integer.limit=[整数值(%d-%d)] +command.info.item=[物å“] +command.info.itemid=物å“ID +command.info.level=等级 +command.info.lineno=è¡Œ +command.info.lore=æè¿° +command.info.material=[æè´¨] +command.info.max=最大值 +command.info.min=最å°å€¼ +command.info.name=物å“å +command.info.permission=æƒé™ +command.info.player=[玩家] +command.info.power=å¨åŠ› +command.info.quality=å“è´¨ +command.info.string=[字符] +command.info.string.limit=[字符(最多:%d)] +command.info.terms=分类 +command.info.type=类型 +command.rpgitem.armour=显示 @[物å“]# 护甲值 (关于装备护甲请å‚考WIKI相关资料) +command.rpgitem.armour.set=ç»™ @[物å“]# 设置 @[护甲值]# (关于装备护甲请å‚考WIKI相关资料) +command.rpgitem.arrow=ç»™ @[物å“]# 添加ç«ç®­æŠ€èƒ½, 默认冷å´æ—¶é—´ 20游æˆåˆ»(1 秒). å³é”®å‘å°„ +command.rpgitem.arrow.full=ç»™ @[物å“]# 添加ç«ç®­æŠ€èƒ½, 冷å´æ—¶é—´ @[游æˆåˆ»]#. å³é”®å‘å°„ +command.rpgitem.command=ç»™ @[物å“]# 添加指令技能, 冷å´æ—¶é—´ä¸º @[游æˆåˆ»]#. 工具æ示为 @[æ示文本]#. @[指令]# 会在 @[左键/å³é”®]# åŽè¿è¡Œ. ***注æ„***: 如果你想在 @[æ示文本]# 或 @[指令]# 留空, 那么è¦åœ¨å­—符串周围加 `符å·. 例如: `/say Hello` +command.rpgitem.command.full=ç»™ @[物å“]# 添加指令技能, 冷å´æ—¶é—´ä¸º @[游æˆåˆ»]#. 工具æ示为 @[æ示文本]#. @[指令]# 会在 @[左键/å³é”®]# åŽè¿è¡Œ, 并给予è¿è¡Œæ­¤ @[指令]# çš„ @[æƒé™]#. ***注æ„***: 如果你想在 @[æ示文本]# 或 @[指令]# 或 @[æƒé™]# 留空, 那么è¦åœ¨å­—符串周围加 `符å·ã€‚ 例如: `/say Hello` +command.rpgitem.command.old=è¿è¡ŒæŒ‡ä»¤æŠ€èƒ½ @[左键/å³é”®]# 释放. @[详细æ¡ç›®]# 处格å¼ä¸º @[显示文本]# | @[指令]# | @[æƒé™]#. 工具æ示为 @[显示文本]#. 显示文本和指令必须用 | 这个符å·åˆ†éš”å¼€. 如果有æ供给玩家 @[æƒé™]#, æ­¤ @[æƒé™]# 仅使用的这一次有效, 然åŽè¢«ç§»é™¤ +command.rpgitem.consume=设置 @[物å“]# 为消耗å“. å³é”®æ—¶æ¶ˆè€—è¯¥ç‰©å“ +command.rpgitem.create=创建物å“. 这个 @[åå­—]# åªæ˜¯ç”¨äºŽç¼–辑指令调用它, 并éžæ˜¾ç¤ºåœ¨æ¸¸æˆä¸­ç‰©å“ @[展示å]#, 你需è¦ç”¨display指令进行更改 +command.rpgitem.damage=显示 @[物å“]# 当å‰ä¼¤å®³ +command.rpgitem.damage.set=ç»™ @[物å“]# 设置 @[伤害值]# +command.rpgitem.damage.set.range=ç»™ @[物å“]# 设置éšæœºä¼¤å®³èŒƒå›´ @[最å°å€¼]# ~ @[最大值]# +command.rpgitem.description.add=ç»™ @[物å“]# 增加 @[æ述文字]# +command.rpgitem.description.remove=从 @[物å“]# 上移除 @[该行文字]# 注æ„, 起始行数为0 +command.rpgitem.description.set=ç»™ @[物å“]# çš„ @[指定行]# 添加 @[æ述文字]# +command.rpgitem.display=显示 @[物å“]# 当å‰å±•ç¤ºå +command.rpgitem.display.set=ç»™ @[物å“]# 设置 @[展示å]# +command.rpgitem.error.command=错误: %s +command.rpgitem.fireball=ç»™ @[物å“]# 添加ç«çƒæŠ€èƒ½, 默认冷å´æ—¶é—´ 20游æˆåˆ»(1 秒). å³é”®å‘å°„ +command.rpgitem.fireball.full=ç»™ @[物å“]# 添加ç«çƒæŠ€èƒ½, 冷å´æ—¶é—´ @[游æˆåˆ»]#. å³é”®å‘å°„ +command.rpgitem.flame=ç»™ @[物å“]# 添加点燃技能, 默认æŒç»­æ—¶é—´ 为 20游æˆåˆ»(1 秒). å—到攻击的目标会被点燃 +command.rpgitem.flame.full=ç»™ @[物å“]# 添加点燃技能, [燃烧时间] 为游æˆåˆ». å—到攻击的目标会被点燃 +command.rpgitem.give=把 @[物å“]# å‘给使用此指令的人 +command.rpgitem.give.player=把 @[物å“]# å‘ç»™ @[玩家]# +command.rpgitem.give.player.count=把指定@[æ•°é‡]# @[物å“]# å‘ç»™ @[玩家]# +command.rpgitem.hand=显示 @[物å“]# 手æŒçŠ¶æ€å½“å‰æ–‡æœ¬ +command.rpgitem.hand.set=设置 @[物å“]# 手æŒçŠ¶æ€ä¸º @[文本]# +command.rpgitem.help=显示指令帮助, 或æœç´¢æŒ‡å®š @[分类]# 下的指令帮助 +command.rpgitem.ice=ç»™ @[物å“]# 添加冰å—射击技能 默认冷å´æ—¶é—´ 20游æˆåˆ» (1 秒). å³é”®å‘射冰å—, 制造出大é‡å†°å—冲击目标, 冰å—会慢慢消失 +command.rpgitem.ice.full=ç»™ @[物å“]# 添加冰å—射击技能 冷å´æ—¶é—´ @[游æˆåˆ»]#. å³é”®å‘射冰å—, 制造出大é‡å†°å—冲击目标, 冰å—会慢慢消失 +command.rpgitem.item=显示 @[物å“]# 当å‰æè¿° +command.rpgitem.item.set=设置 @[物å“]# æ质为 @[物å“文字或数字ID]# +command.rpgitem.item.set.data=设置 @[物å“]# æ质为 @[物å“ID]# : @[附加数值]# +command.rpgitem.item.set.data.hex=设置 @[物å“]# æ质为 @[物å“ID]# : @[附加数值]#, @[附加数值]# 为å六进制数值 +command.rpgitem.item.set.id=设置 @[物å“]# æ质为 @[æ•°å­—ID]# +command.rpgitem.item.set.id.data=设置 @[物å“]# æ质为 @[æ•°å­—ID]# : @[附加数值]# +command.rpgitem.item.worldguard=å¼€å¯/关闭 worldguard 对@[物å“]# çš„é™åˆ¶ +command.rpgitem.knockup=ç»™ @[物å“]# 添加击飞技能, 默认几率为1/20 å¨åŠ›ä¸º2. 击飞技能会把目标击飞 +command.rpgitem.knockup.full=ç»™ @[物å“]# 添加击飞技能, 几率为 1/@[分æ¯æ•°å€¼]# å¨åŠ›ä¸º@[æ•´æ•°]#. 击飞技能会把目标击飞 +command.rpgitem.lightning=ç»™ @[物å“]# 添加闪电技能, 默认几率为1/20. 攻击目标时一定几率生æˆé—ªç”µ +command.rpgitem.lightning.full=ç»™ @[物å“]# 添加闪电技能, 几率为1/@[分æ¯æ•°å€¼]#. 攻击目标时一定几率生æˆé—ªç”µ +command.rpgitem.list=显示所有RPG Items创造出æ¥çš„ç‰©å“ +command.rpgitem.lore=显示 @[物å“]# 当å‰æè¿° +command.rpgitem.lore.set=ç»™ @[物å“]# 设置 @[æè¿°]# +command.rpgitem.potionhit=攻击时有 1/@[分æ¯æ•°å€¼]# 的几率使目标获得è¯æ°´æ•ˆæžœ. @[效果]# 为è¯æ°´æ•ˆæžœ @[æŒç»­æ—¶é—´]# å•ä½ä¸ºæ¸¸æˆåˆ», @[效果等级]# 为整数。 å¯ç”¨è¯æ°´æ•ˆæžœ: +command.rpgitem.potionself=给自己释放è¯æ°´æ•ˆæžœ. @[冷å´æ—¶é—´]# 为游æˆåˆ». å³é”®å‘动. @[效果]# 为è¯æ°´æ•ˆæžœ @[æŒç»­æ—¶é—´]# å•ä½ä¸ºæ¸¸æˆåˆ», @[效果等级]# 为整数. å¯ç”¨æ•ˆæžœ: +command.rpgitem.print=在èŠå¤©æ¡†ä¸­æ˜¾ç¤º @[物å“]# 属性 +command.rpgitem.quality=显示 @[物å“]# 当å‰å“è´¨ +command.rpgitem.quality.set=ç»™ @[物å“]# 设置 @[å“è´¨]# +command.rpgitem.rainbow=ç»™ @[物å“]# 添加彩虹技能, 默认冷å´æ—¶é—´ 20游æˆåˆ»(1 秒). 格数为5. å³é”®æ–¹å—会被染æˆå½©è‰²ç¾Šæ¯›, 过åŽè‡ªå·±å¤åŽŸ +command.rpgitem.rainbow.full=ç»™ @[物å“]# 添加彩虹技能, @[冷å´æ—¶é—´]# 为游æˆåˆ». @[格数]# 为整数. å³é”®æ–¹å—会被染æˆå½©è‰²ç¾Šæ¯›, 过åŽè‡ªå·±å¤åŽŸ +command.rpgitem.remove=从rpgitem列表中移除该物å“. 拥有该物å“的玩家ä¸ä¼šå¤±åŽ»å®ƒ, 但是这个物å“所有的技能会失效 +command.rpgitem.removepower=从 @[物å“]# 上移除指定 @[技能]# +command.rpgitem.rumble=ç»™ @[物å“]# 冲击技能, @[冷å´æ—¶é—´]# 为游æˆåˆ», @[å¨åŠ›]# 为整数, 冲击 @[è·ç¦»]# 为整数. 冲击技能会把地é¢ä¸Šä¸€å®šèŒƒå›´å†…的实体击飞 +command.rpgitem.teleport=ç»™ @[物å“]# 添加传é€æŠ€èƒ½, 默认冷å´æ—¶é—´ 20游æˆåˆ»(1 秒). ä¼ é€è·ç¦»ä¸º5æ ¼. ä¼ é€æ–¹å‘为你所é¢å‘çš„æ–¹å‘ +command.rpgitem.teleport.full=ç»™ @[物å“]# 添加传é€æŠ€èƒ½, @[冷å´æ—¶é—´]# 为游æˆåˆ», @[ä¼ é€è·ç¦»]# 为整数. ä¼ é€æ–¹å‘为你所é¢å‘çš„æ–¹å‘ +command.rpgitem.tntcannon=ç»™ @[物å“]# 添加加农TNT技能, 默认冷å´æ—¶é—´ä¸º 20游æˆåˆ»(1 秒). å³é”®å‘å°„å³å°†çˆ†ç‚¸çš„TNT +command.rpgitem.tntcannon.full=ç»™ @[物å“]# 添加加农TNT技能, @[冷å´æ—¶é—´]# 为游æˆåˆ». å³é”®å‘å°„å³å°†çˆ†ç‚¸çš„TNT +command.rpgitem.type=显示 @[物å“]# 当å‰ç±»åž‹ +command.rpgitem.type.set=ç»™ @[物å“]# 设置 @[类型]# +command.rpgitem.unbreakable=ç»™ @[物å“]# 添加ä¸æ¯æŠ€èƒ½. 拥有该技能的 @[物å“]# ä¸ä¼šè¢«çŽ©å +command.rpgitem.unbreaking=ç»™ @[物å“]# 添加è€ä¹…技能, 默认1级. 与普通è€ä¹…é™„é­”ç›¸åŒ +command.rpgitem.unbreaking.full=ç»™ @[物å“]# 添加è€ä¹…技能, @[等级]# 为整数. 与普通è€ä¹…é™„é­”ç›¸åŒ +command.rpgitem.worldguard=切æ¢world guardä¿æŠ¤æ¨¡å¼. å¯ç”¨æ—¶ä¼šé˜»æ­¢RPG Items的物å“在éžPVP区使用 +message.armour.get=ç‰©å“ '%s' 护甲为 '%d%%' +message.armour.set=ç‰©å“ '%s' 护甲已设置为 '%d%%' +message.command.info=更详细帮助信æ¯è¯·æŸ¥çœ‹bukkitdev页é¢, 或输入/rpgitem help [关键è¯] æ’件汉化by wolski from mcbbs.net +message.command.usage=指令用法: /%s (%s) +message.cooldown=冷å´æ—¶é—´è¿˜æ²¡æœ‰ç»“æŸ, 请等待 %.1f 秒 +message.create.fail=该物å“å已存在 +message.create.ok=ç‰©å“ '%s' 已创建 +message.damage.get=ç‰©å“ '%s' 伤害为 %d-%d +message.damage.set=ç‰©å“ '%s' 伤害设置为 %d +message.damage.set.range=ç‰©å“ '%s' 伤害设置为 %d-%d +message.description.change=该行文本已å˜æ›´ +message.description.ok=该行文本已增加 +message.description.out.of.range=è¡Œ %d 已超出范围 +message.description.remove=该行文本已移除 +message.display.get=ç‰©å“ '%s' 展示å为 '%s' +message.display.set=ç‰©å“ '%s' 展示å已设置为 '%s' +message.error.command=错误: %s +message.error.command.format=显示文本和指令必须用 | 这个符å·åˆ†éš”å¼€ +message.error.double.format='%s' ä¸æ˜¯åŒæ•° +message.error.double.limit=数值必须在 %.2f 到 %.2f 之间 +message.error.effect=%s ä¸æ˜¯ä¸€ä¸ªæœ‰æ•ˆçš„效果 +message.error.integer.format='%s' ä¸æ˜¯ä¸€ä¸ªæ•´æ•° +message.error.integer.limit=数值必须在 %d 到 %d 之间 +message.error.item=æœªçŸ¥ç‰©å“ '%s' +message.error.material=未知æè´¨ '%s' +message.error.option=无效项 '%s' +message.error.permission=你没有æƒé™é‚£æ ·åš +message.error.player=没有找到玩家 %s +message.error.string.length='%s' 长度超过最大值 %d +message.error.unknown.command=错误: 未知指令 %s +message.give.console=无法在控制å°ä½¿ç”¨æ­¤æŒ‡ä»¤ +message.hand.get=ç‰©å“ '%s' 手æŒçŠ¶æ€ä¸º '%s' +message.hand.set=è®¾ç½®ç‰©å“ '%s' 手æŒçŠ¶æ€ä¸º '%s' +message.help.for=显示 '%s' çš„å¸®åŠ©ä¿¡æ¯ +message.item.cant.find=æ²¡æœ‰æ‰¾åˆ°è¯¥ç‰©å“ +message.item.get=ç‰©å“ '%s' æ质为 '%s +message.item.set=ç‰©å“ '%s' æ质已设置为 '%s:%d' +message.lore.get=ç‰©å“ '%s' æ述为 '%s' +message.lore.set=ç‰©å“ '%s' æ述已设置为 '%s +message.power.ok=技能已添加 +message.power.removed=技能 %s 已移除 +message.power.unknown=未知技能 %s +message.quality.get=ç‰©å“ '%s' å“质为 '%s' +message.quality.note=å“è´¨: +message.quality.set=ç‰©å“ '%s' å“质已设置为 '%s' +message.remove.ok=ç‰©å“ '%s' 已删除 +message.too.far=太远了... +message.type.get=ç‰©å“ '%s' 类型为 '%s' +message.type.set=ç‰©å“ '%s' 类型已设置为 '%s' +message.worldguard.disable=Worldguard支æŒå·²ç¦ç”¨ +message.worldguard.enable=Worldguard支æŒå·²å¯ç”¨ +message.worldguard.error=没有å‘现Worldguardæ’件 +message.worldguard.override.active=已忽略Worldguardçš„é™åˆ¶ +message.worldguard.override.disabled=已开å¯Worldguardçš„é™åˆ¶ +power.arrow=å‘å°„ç«ç®­ (%.1f 秒冷å´æ—¶é—´) +power.consume=使用åŽæ¶ˆè€—掉 +power.fireball=å‘å°„ç«çƒ (%.1f 秒冷å´æ—¶é—´) +power.flame=点燃目标 %.1f 秒 +power.ice=å‘å°„å†°å— (%.1f 秒冷å´æ—¶é—´) +power.knockup=%d%% 的几率击飞目标 +power.lightning=%d%% 的几率å‘生雷击 +power.potionhit=%d%% 的几率触å‘效果 %s +power.potionself=获得 %s %d æŒç»­ %.1f 秒 +power.rainbow=å‘å°„ %d 彩色羊毛 (%.1f 秒冷å´) +power.rumble=å‘出冲击波 (%.1f 秒冷å´æ—¶é—´) +power.teleport=ä¼ é€ %d æ ¼ (%.1f 秒冷å´) +power.tntcannon=å‘å°„ TNT (%.1f 秒冷å´æ—¶é—´) +power.unbreakable=ä¸æ¯ +power.unbreaking=è€ä¹… %d +#2.7 +command.rpgitem.removerecipe=已删除 @[物å“]# çš„åˆæˆè¡¨ +command.rpgitem.recipe=已设置 @[物å“]# çš„åˆæˆè¡¨ +message.recipe.removed=åˆæˆè¡¨å·²ç§»é™¤ +message.error.only.player=这个指令åªèƒ½ç”±æ¸¸æˆä¸­çš„玩家执行 +message.recipe.1=ä¸åšå˜åŠ¨. 槽ä½ç•™ç©º +message.recipe.2=如果想自定义åˆæˆè¡¨ +message.recipe.3=把物å“置于空的地方 +message.recipe.4=以你所è¦çš„摆放形状 +message.recipe.5=进行放置 +command.rpgitem.drop=使 @[物å“]# 一定几率从æŸä¸ª @[实体类型]# 上掉è½. 0% 表示ä¸ä¼šæŽ‰è½ +command.rpgitem.drop.set=设置 @[物å“]# 从æŸä¸ª @[实体类型]# çš„ @[掉è½å‡ çŽ‡]#%. 0% 表示ä¸ä¼šæŽ‰è½ +message.skyhook.fail=你没有钩到任何东西 +power.skyhook=é’©åˆ°æŒ‡å®šæ–¹å— +power.potiontick=æŒæœ‰/穿戴时给予效果 %s %d +command.rpgitem.skyhook=ç»™ @[物å“]#添加天钩技能. 天钩技能å…许使用者钩到指定 @[æè´¨]# 并上å‡ä¸€å®š @[è·ç¦»]# +command.rpgitem.potiontick=ç»™ @[物å“]# 添加被动效果加æˆ. 当玩家手æŒæˆ–穿戴该 @[物å“]# æ—¶, 给予玩家指定 @[等级]# çš„ @[è¯æ°´æ•ˆæžœ]# diff --git a/src/locale/zh_HK.lang b/src/locale/zh_HK.lang new file mode 100644 index 00000000..763676f9 --- /dev/null +++ b/src/locale/zh_HK.lang @@ -0,0 +1,189 @@ +#2.7 +#Translated on 2013-12-08 17:46:00HKT +command.info.amplifier=效果等級 +command.info.armour=盔甲 +command.info.burntime=燃燒時間 +command.info.chance=幾率 +command.info.command=指令 +command.info.cooldown=冷å»æ™‚é–“ +command.info.count=次數 +command.info.damage=傷害 +command.info.data=資料 +command.info.descriptionline=æè¿°è¡Œ +command.info.details=詳細æ¢ç›® +command.info.display=展示å +command.info.distance=è·é›¢ +command.info.double.limit=[é›™å€(%d-%d)] +command.info.double=[é›™å€] +command.info.duration=æŒçºŒæ™‚é–“ +command.info.effect=效果 +command.info.hand=手æŒä¿¡æ¯ +command.info.hexcolour=顔色代碼 +command.info.integer.limit=[整數值(%d-%d)] +command.info.integer=[整數值] +command.info.item=[物å“] +command.info.itemid=物å“ID +command.info.level=等級 +command.info.lineno=è¡Œ +command.info.lore=æè¿° +command.info.material=[æ質] +command.info.max=最大值 +command.info.min=最å°å€¼ +command.info.name=物å“å +command.info.permission=æ¬Šé™ +command.info.player=[玩家] +command.info.power=å¨åŠ› +command.info.quality=å“質 +command.info.string.limit=[文字(最多:%d)] +command.info.string=[文字] +command.info.terms=分類 +command.info.type=é¡žåž‹ +command.rpgitem.armour.set=å°‡ @[物å“]# 設定為: @[盔甲值]# (關于è£å‚™ç›”甲請åƒè€ƒç™¾ç§‘文檔相關資料) +command.rpgitem.armour=顯示 @[物å“]# 盔甲值。 (關于è£å‚™ç›”甲請åƒè€ƒç™¾ç§‘文檔相關資料) +command.rpgitem.arrow.full=å°‡ @[物å“]# 添加弓箭技能,冷å»æ™‚é–“ @[éŠæˆ²åˆ»]#ï¼›å³éµç™¼å°„。 +command.rpgitem.arrow=å°‡ @[物å“]# 添加弓箭技能,é è¨­å†·å»æ™‚é–“ 20ticks(1 秒)ï¼›å³éµç™¼å°„。 +command.rpgitem.command.full=å°‡ @[物å“]# 添加指令技能,冷å»æ™‚間爲 @[éŠæˆ²åˆ»]#;工具æ示爲 @[æ示文字]#ï¼›@[指令]# 會在 @[å·¦éµ/å³éµ]# 後é‹è¡Œï¼Œä¸¦çµ¦äºˆé‹è¡Œæ­¤ @[指令]# çš„ @[權é™]#。ã€æ³¨æ„】: 如果你想在 @[æ示文字]# 或 @[指令]# 或 @[權é™]# 留空,那麽è¦åœ¨æ–‡å­—串周åœåŠ  `符號。 例如:「/say Hello〠+command.rpgitem.command.old=é‹è¡ŒæŒ‡ä»¤æŠ€èƒ½ @[å·¦éµ/å³éµ]# 釋放。@[詳細æ¢ç›®]# 處格å¼çˆ² @[顯示文字]# | @[指令]# | @[權é™]#。工具æ示爲 @[顯示文字]#。顯示文字和指令必須用 | 這個符號分隔開。如果有æ供給玩家 @[權é™]#,此 @[權é™]# 僅使用的這一次有效,然後被移除。 +command.rpgitem.command=å°‡ @[物å“]# 添加指令技能,冷å»æ™‚間爲 @[éŠæˆ²åˆ»]#。工具æ示爲 @[æ示文字]#。@[指令]# 會在 @[å·¦éµ/å³éµ]# 後é‹è¡Œã€‚ã€æ³¨æ„】: 如果你想在 @[æ示文字]# 或 @[指令]# 留空,那麽è¦åœ¨æ–‡å­—串周åœåŠ  `符號。例如:「/say Hello〠+command.rpgitem.consume=設定 @[物å“]# 爲消耗å“ï¼›å³éµæ™‚消耗該物å“。 +command.rpgitem.create=創建物å“。這個 @[åå­—]# åªæ˜¯ç”¨äºŽç·¨è¼¯æŒ‡ä»¤èª¿ç”¨å®ƒï¼Œä¸¦éžé¡¯ç¤ºåœ¨éŠæˆ²ä¸­ç‰©å“ @[展示å]#,你需è¦ç”¨display指令進行更改。 +command.rpgitem.damage.set.range=å°‡ @[物å“]# 設定隨機傷害範åœç”± @[最å°å€¼]# 至 @[最大值]#。 +command.rpgitem.damage.set=å°‡ @[物å“]# 設定為: @[傷害值]# +command.rpgitem.damage=顯示 @[物å“]# 當å‰å‚·å®³ +command.rpgitem.description.add=å°‡ @[物å“]# 增加 @[æ述文字]# +command.rpgitem.description.remove=從 @[物å“]# 上移除 @[該行文字]# 注æ„,起始行數爲0。 +command.rpgitem.description.set=å°‡ @[物å“]# çš„ @[指定行]# 添加 @[æ述文字]# +command.rpgitem.display.set=å°‡ @[物å“]# 設定為: @[展示å]# +command.rpgitem.display=顯示 @[物å“]# 當å‰å±•ç¤ºå。 +command.rpgitem.drop.set=設定 @[物å“]# 從æŸå€‹ @[實體類型]# çš„ @[掉è½å¹¾çŽ‡]#%ï¼›0% 表示ä¸æœƒæŽ‰è½ã€‚ +command.rpgitem.drop=使 @[物å“]# 一定幾率從æŸå€‹ @[實體類型]# 上掉è½ï¼›0% 表示ä¸æœƒæŽ‰è½ã€‚ +command.rpgitem.error.command=錯誤: %s +command.rpgitem.fireball.full=å°‡ @[物å“]# 添加ç«çƒæŠ€èƒ½ï¼Œå†·å»æ™‚é–“ @[éŠæˆ²åˆ»]#ï¼›å³éµç™¼å°„。 +command.rpgitem.fireball=å°‡ @[物å“]# 添加ç«çƒæŠ€èƒ½ï¼Œé è¨­å†·å»æ™‚間爲 20ticks(1 秒)ï¼›å³éµç™¼å°„。 +command.rpgitem.flame.full=å°‡ @[物å“]# 添加點燃技能,[燃燒時間] 爲éŠæˆ²åˆ»ï¼›å—到攻擊的目標會被點燃。 +command.rpgitem.flame=å°‡ @[物å“]# 添加點燃技能,é è¨­æŒçºŒæ™‚間爲 20ticks(1 秒)ï¼›å—到攻擊的目標會被點燃。 +command.rpgitem.give.player.count=將指定@[數é‡]# @[物å“]# 發給 @[玩家]# +command.rpgitem.give.player=å°‡ @[物å“]# 發給 @[玩家]# +command.rpgitem.give=å°‡ @[物å“]# 發給使用此指令的人 +command.rpgitem.hand.set=設定 @[物å“]# 手æŒç‹€æ…‹çˆ² @[文字]# +command.rpgitem.hand=顯示 @[物å“]# 手æŒç‹€æ…‹ç•¶å‰æ–‡å­—。 +command.rpgitem.help=顯示指令幫助,或æœç´¢æŒ‡å®š @[分類]# 下的指令幫助。 +command.rpgitem.ice.full=å°‡ @[物å“]# 添加冰塊射擊技能 冷å»æ™‚é–“ @[éŠæˆ²åˆ»]#ï¼›å³éµç™¼å°„冰塊,制造出大é‡å†°å¡Šæ²–擊目標,冰塊會漸漸消失。 +command.rpgitem.ice=å°‡ @[物å“]# 添加冰塊射擊技能 é è¨­å†·å»æ™‚é–“ 20ticks (1 秒)ï¼›å³éµç™¼å°„冰塊,制造出大é‡å†°å¡Šæ²–擊目標,冰塊會漸漸消失。 +command.rpgitem.item.set.data.hex=設定 @[物å“]# æ質爲 @[物å“ID]#:@[é¡è‰²æ•¸å€¼]#ï¼›@[é¡è‰²æ•¸å€¼]# 爲å六進制數值。 +command.rpgitem.item.set.data=設定 @[物å“]# æ質爲 @[物å“ID]#:@[附加數值]# +command.rpgitem.item.set.id.data=設定 @[物å“]# æ質爲 @[數字ID]#:@[附加數值]# +command.rpgitem.item.set.id=設定 @[物å“]# æ質爲 @[數字ID]# +command.rpgitem.item.set=設定 @[物å“]# æ質爲 @[物å“文字或數字ID]# +command.rpgitem.item.worldguard=é–‹é—œ WorldGuard å°@[物å“]# çš„é™åˆ¶ +command.rpgitem.item=顯示 @[物å“]# 當å‰æ述。 +command.rpgitem.knockup.full=å°‡ @[物å“]# 添加擊退技能,幾率爲 1/@[分æ¯æ•¸å€¼]# å¨åŠ›çˆ²@[整數]#;擊退技能會將目標擊退。 +command.rpgitem.knockup=å°‡ @[物å“]# 添加擊退技能,é è¨­å¹¾çŽ‡çˆ²1/20 å¨åŠ›çˆ²2;擊退技能會將目標擊退。 +command.rpgitem.lightning.full=å°‡ @[物å“]# 添加閃電技能,幾率爲1/@[分æ¯æ•¸å€¼]#;攻擊目標時一定幾率生æˆé–ƒé›»ã€‚ +command.rpgitem.lightning=å°‡ @[物å“]# 添加閃電技能,é è¨­å¹¾çŽ‡çˆ²1/20;攻擊目標時一定幾率生æˆé–ƒé›»ã€‚ +command.rpgitem.list=列出所有由本æ’件所創造的物å“。 +command.rpgitem.lore.set=å°‡ @[物å“]# 設定為: @[æè¿°]# +command.rpgitem.lore=顯示 @[物å“]# 當å‰æ述。 +command.rpgitem.potionhit=攻擊時有 1/@[分æ¯æ•¸å€¼]# 的幾率使目標ç²å¾—藥水效果。@[效果]# 爲藥水效果 @[æŒçºŒæ™‚é–“]# å–®ä½çˆ²éŠæˆ²åˆ»ï¼Œ@[效果等級]# 爲整數。 å¯ç”¨è—¥æ°´æ•ˆæžœï¼š +command.rpgitem.potionself=將自己釋放藥水效果。@[冷å»æ™‚é–“]# 爲éŠæˆ²åˆ»ã€‚å³éµç™¼å‹•ã€‚@[效果]# 爲藥水效果 @[æŒçºŒæ™‚é–“]# å–®ä½çˆ²éŠæˆ²åˆ»ï¼Œ@[效果等級]# 爲整數。å¯ç”¨æ•ˆæžœï¼š +command.rpgitem.potiontick=å°‡ @[物å“]# 添加被動效果加æˆã€‚當玩家手æŒæˆ–穿戴該 @[物å“]# 時,給予玩家指定 @[等級]# çš„ @[藥水效果]#。 +command.rpgitem.print=在èŠå¤©æ¡†ä¸­é¡¯ç¤º @[物å“]# 屬性。 +command.rpgitem.quality.set=å°‡ @[物å“]# 設定為: @[å“質]# +command.rpgitem.quality=顯示 @[物å“]# 當å‰å“質。 +command.rpgitem.rainbow.full=å°‡ @[物å“]# 添加彩虹技能,@[冷å»æ™‚é–“]# 爲éŠæˆ²åˆ»ã€‚@[格數]# 爲整數;å³éµæ–¹å¡Šæœƒè¢«æŸ“æˆå½©è‰²ç¾Šæ¯›ï¼ŒéŽå¾Œè‡ªå·±è¤‡åŽŸã€‚ +command.rpgitem.rainbow=å°‡ @[物å“]# 添加彩虹技能,é è¨­å†·å»æ™‚é–“ 20ticks(1 秒)。格數爲5ï¼›å³éµæ–¹å¡Šæœƒè¢«æŸ“æˆå½©è‰²ç¾Šæ¯›ï¼ŒéŽå¾Œè‡ªå·±è¤‡åŽŸã€‚ +command.rpgitem.recipe=已設定 @[物å“]# çš„åˆæˆé…方。 +command.rpgitem.remove=從rpgitem列表中移除該物å“。æ“有該物å“的玩家ä¸æœƒå¤±åŽ»å®ƒï¼Œä½†æ˜¯é€™å€‹ç‰©å“所有的技能會失效。 +command.rpgitem.removepower=從 @[物å“]# 上移除指定 @[技能]#。 +command.rpgitem.removerecipe=已刪除 @[物å“]# çš„åˆæˆé…方。 +command.rpgitem.rumble=å°‡ @[物å“]# 沖擊技能,@[冷å»æ™‚é–“]# 爲éŠæˆ²åˆ»ï¼Œ@[å¨åŠ›]# 爲整數,沖擊 @[è·é›¢]# 爲整數;沖擊技能會將地é¢ä¸Šä¸€å®šç¯„åœå…§çš„實體擊退。 +command.rpgitem.skyhook=å°‡ @[物å“]#添加定點技能。定點技能å…許使用者鈎到指定 @[æ質]# 並上å‡ä¸€å®š @[è·é›¢]#。 +command.rpgitem.teleport.full=å°‡ @[物å“]# 添加傳é€æŠ€èƒ½ï¼Œ@[冷å»æ™‚é–“]# 爲éŠæˆ²åˆ»ï¼Œ@[傳é€è·é›¢]# 爲整數;傳é€æ–¹å‘爲你所é¢å‘çš„æ–¹å‘。 +command.rpgitem.teleport=å°‡ @[物å“]# 添加傳é€æŠ€èƒ½ï¼Œé è¨­å†·å»æ™‚間為 20ticks(1 秒),傳é€è·é›¢çˆ²5格;傳é€æ–¹å‘爲你所é¢å‘çš„æ–¹å‘。 +command.rpgitem.tntcannon.full=å°‡ @[物å“]# 添加TNT加農炮技能,@[冷å»æ™‚é–“]# 爲éŠæˆ²åˆ»ï¼›å³éµç™¼å°„å³å°‡çˆ†ç‚¸çš„TNT。 +command.rpgitem.tntcannon=å°‡ @[物å“]# 添加TNT加農炮技能,é è¨­å†·å»æ™‚間爲 20ticks(1 秒)ï¼›å³éµç™¼å°„å³å°‡çˆ†ç‚¸çš„TNT。 +command.rpgitem.type.set=å°‡ @[物å“]# 設定為: @[é¡žåž‹]# +command.rpgitem.type=顯示 @[物å“]# 當å‰é¡žåž‹ã€‚ +command.rpgitem.unbreakable=å°‡ @[物å“]# 添加ä¸æ¯€æŠ€èƒ½ã€‚æ“有該技能的 @[物å“]# ä¸æœƒè¢«çŽ©å£žã€‚ +command.rpgitem.unbreaking.full=å°‡ @[物å“]# 添加è€ä¹…技能,@[等級]# 爲整數。與普通è€ä¹…附魔相åŒã€‚ +command.rpgitem.unbreaking=å°‡ @[物å“]# 添加è€ä¹…技能,é è¨­1級;與普通è€ä¹…附魔相åŒã€‚ +command.rpgitem.worldguard=åˆ‡æ› WorldGuard ä¿è­·æ¨¡å¼ï¼›æ–¼æ¨¡å¼å•Ÿç”¨æ™‚會ç¦æ­¢RPG物å“於指定å€å…§ä½¿ç”¨ã€‚ +message.armour.get='%s' 物å“盔甲爲 '%d%%'。 +message.armour.set='%s' 物å“盔甲已設定爲 '%d%%'。 +message.command.info=æ’件文檔請於 http://j.lifeho.me/1boFN8X 查看,或輸入指令「/rpgitem help <é—œéµå­—>ã€æ–¼éŠæˆ²ä¸­æŸ¥è©¢å¹«åŠ©èªªæ˜Žã€‚ +message.command.usage=指令用法: /%s (%s) +message.cooldown=冷å»æ™‚間還沒有çµæŸï¼Œè«‹ç­‰å¾… %.1f 秒。 +message.create.fail=該物å“å已存在。 +message.create.ok='%s' 物å“已創建。 +message.damage.get='%s' 物å“傷害爲 %d-%d 。 +message.damage.set.range='%s' 物å“傷害設定爲 %d-%d 。 +message.damage.set='%s' 物å“傷害設定爲 %d 。 +message.description.change=該行文字已變更。 +message.description.ok=該行文字已增加。 +message.description.out.of.range=文字行 %d 已超出範åœã€‚ +message.description.remove=該行文字已移除。 +message.display.get='%s' 物å“展示å爲 '%s' 。 +message.display.set='%s' 物å“展示å已設定爲 '%s' 。 +message.error.command.format=顯示文字和指令必須用 | 這個符號分隔開。 +message.error.command=錯誤: %s 。 +message.error.double.format='%s' ä¸æ˜¯æœ‰æ•ˆçš„數值。 +message.error.double.limit=數值必須在 %.2f 到 %.2f 之間。 +message.error.effect=%s ä¸æ˜¯ä¸€å€‹æœ‰æ•ˆçš„效果。 +message.error.integer.format='%s' ä¸æ˜¯ä¸€å€‹æ•´æ•¸ã€‚ +message.error.integer.limit=數值必須在 %d 到 %d 之間。 +message.error.item=æœªçŸ¥ç‰©å“ '%s' 。 +message.error.material=未知æ質 '%s' 。 +message.error.only.player=這個指令åªèƒ½ç”±éŠæˆ²ä¸­çš„玩家執行。 +message.error.option=無效項 '%s' 。 +message.error.permission=你沒有權é™é‚£æ¨£åšã€‚ +message.error.player=沒有找到玩家 %s 。 +message.error.string.length='%s' 長度超éŽæœ€å¤§å€¼ %d 。 +message.error.unknown.command=錯誤: 未知指令 %s 。 +message.give.console=無法在控制å°ä½¿ç”¨æ­¤æŒ‡ä»¤ 。 +message.hand.get='%s' 物å“手æŒç‹€æ…‹çˆ² '%s' 。 +message.hand.set=設定'%s' 物å“手æŒç‹€æ…‹çˆ² '%s' 。 +message.help.for=顯示 '%s' çš„å¹«åŠ©ä¿¡æ¯ ã€‚ +message.item.cant.find=æ²’æœ‰æ‰¾åˆ°è©²ç‰©å“ ã€‚ +message.item.get='%s' 物å“æ質爲 '%s 。 +message.item.set='%s' 物å“æ質已設定爲 '%s:%d' 。 +message.lore.get='%s' 物å“æ述爲 '%s' 。 +message.lore.set='%s' 物å“æ述已設定爲 '%s 。 +message.power.ok=技能已添加 。 +message.power.removed=技能 %s 已移除 。 +message.power.unknown=未知技能 %s 。 +message.quality.get='%s' 物å“å“質爲 '%s' 。 +message.quality.note=å“質: +message.quality.set='%s' 物å“å“質已設定爲 '%s' 。 +message.recipe.1=ä¸åšè®Šå‹•ã€‚欄ä½ç•™ç©º +message.recipe.2=如果想自製åˆæˆé…æ–¹ +message.recipe.3=將物å“置于空的地方 +message.recipe.4=以你所è¦çš„擺放形狀 +message.recipe.5=進行放置 +message.recipe.removed=åˆæˆé…方已移除 。 +message.remove.ok='%s' 物å“已刪除 。 +message.skyhook.fail=你沒有鈎到任何æ±è¥¿ 。 +message.too.far=太é äº†... +message.type.get='%s' 物å“類型爲 '%s' 。 +message.type.set='%s' 物å“類型已設定爲 '%s' 。 +message.worldguard.disable=WorldGuard 支æ´å·²é—œé–‰ +message.worldguard.enable=WorldGuard 支æ´å·²é–‹å•Ÿ +message.worldguard.error=æ²’æœ‰ç™¼ç¾ WorldGuard æ’件 +message.worldguard.override.active=已忽略 WorldGuard çš„é™åˆ¶ +message.worldguard.override.disabled=已開啓 WorldGuard çš„é™åˆ¶ +power.arrow=發射弓箭 (冷å»æ™‚間:%.1f 秒) +power.consume=æ¶ˆè€—å“ +power.fireball=發射ç«çƒ (冷å»æ™‚間:%.1f 秒) +power.flame=點燃目標 %.1f 秒 +power.ice=發射冰塊 (冷å»æ™‚間:%.1f 秒) +power.knockup=%d%% 的幾率擊退目標 +power.lightning=%d%% 的幾率發生雷擊 +power.potionhit=%d%% 的幾率觸發效果 %s +power.potionself=ç²å¾— %s %d æŒçºŒ %.1f 秒 +power.potiontick=æŒæœ‰æˆ–穿著時給予效果 %s %d +power.rainbow=發射 %d 彩色羊毛 (%.1f 秒冷å») +power.rumble=發出沖擊波 (冷å»æ™‚間:%.1f 秒) +power.skyhook=鈎到指定方塊 +power.teleport=å‚³é€ %d æ ¼ (冷å»æ™‚間:%.1f 秒) +power.tntcannon=發射 TNT (冷å»æ™‚間:%.1f 秒) +power.unbreakable=ä¸æ»… +power.unbreaking=è€ä¹… %d \ No newline at end of file diff --git a/src/locale/zh_TW.lang b/src/locale/zh_TW.lang new file mode 100644 index 00000000..ceab1f19 --- /dev/null +++ b/src/locale/zh_TW.lang @@ -0,0 +1,189 @@ +#Generated on 2013-04-27 15:27:26 +command.info.amplifier=效果等級 +command.info.armour=護甲 +command.info.burntime=燃燒時間 +command.info.chance=幾率 +command.info.command=指令 +command.info.cooldown=冷å»æ™‚é–“ +command.info.count=計數 +command.info.damage=傷害 +command.info.data=數據 +command.info.descriptionline=æè¿°è¡Œ +command.info.details=詳細æ¢ç›® +command.info.display=展示å +command.info.distance=è·é›¢ +command.info.double=[é›™å€] +command.info.double.limit=[é›™å€(%d-%d)] +command.info.duration=æŒçºŒæ™‚é–“ +command.info.effect=效果 +command.info.hand=手æŒä¿¡æ¯ +command.info.hexcolour=顔色代碼 +command.info.integer=[整數值] +command.info.integer.limit=[整數值(%d-%d)] +command.info.item=[物å“] +command.info.itemid=物å“ID +command.info.level=等級 +command.info.lineno=è¡Œ +command.info.lore=æè¿° +command.info.material=[æ質] +command.info.max=最大值 +command.info.min=最å°å€¼ +command.info.name=物å“å +command.info.permission=æ¬Šé™ +command.info.player=[玩家] +command.info.power=å¨åŠ› +command.info.quality=å“質 +command.info.string=[字符] +command.info.string.limit=[字符(最多:%d)] +command.info.terms=分類 +command.info.type=é¡žåž‹ +command.rpgitem.armour=顯示 @[物å“]# 護甲值 (關于è£å‚™è­·ç”²è«‹åƒè€ƒWIKI相關資料) +command.rpgitem.armour.set=給 @[物å“]# 設置 @[護甲值]# (關于è£å‚™è­·ç”²è«‹åƒè€ƒWIKI相關資料) +command.rpgitem.arrow=給 @[物å“]# 添加ç«ç®­æŠ€èƒ½, 默èªå†·å»æ™‚é–“ 20éŠæˆ²åˆ»(1 秒). å³éµç™¼å°„ +command.rpgitem.arrow.full=給 @[物å“]# 添加ç«ç®­æŠ€èƒ½, 冷å»æ™‚é–“ @[éŠæˆ²åˆ»]#. å³éµç™¼å°„ +command.rpgitem.command=給 @[物å“]# 添加指令技能, 冷å»æ™‚間爲 @[éŠæˆ²åˆ»]#. 工具æ示爲 @[æ示文本]#. @[指令]# 會在 @[å·¦éµ/å³éµ]# 後é‹è¡Œ. ***注æ„***: 如果妳想在 @[æ示文本]# 或 @[指令]# 留空, 那麽è¦åœ¨å­—符串周åœåŠ  `符號. 例如: `/say Hello` +command.rpgitem.command.full=給 @[物å“]# 添加指令技能, 冷å»æ™‚間爲 @[éŠæˆ²åˆ»]#. 工具æ示爲 @[æ示文本]#. @[指令]# 會在 @[å·¦éµ/å³éµ]# 後é‹è¡Œ, 並給予é‹è¡Œæ­¤ @[指令]# çš„ @[權é™]#. ***注æ„***: 如果妳想在 @[æ示文本]# 或 @[指令]# 或 @[權é™]# 留空, 那麽è¦åœ¨å­—符串周åœåŠ  `符號。 例如: `/say Hello` +command.rpgitem.command.old=é‹è¡ŒæŒ‡ä»¤æŠ€èƒ½ @[å·¦éµ/å³éµ]# 釋放. @[詳細æ¢ç›®]# 處格å¼çˆ² @[顯示文本]# | @[指令]# | @[權é™]#. 工具æ示爲 @[顯示文本]#. 顯示文本和指令必須用 | 這個符號分隔開. 如果有æ供給玩家 @[權é™]#, æ­¤ @[權é™]# 僅使用的這壹次有效, 然後被移除 +command.rpgitem.consume=設置 @[物å“]# 爲消耗å“. å³éµæ™‚æ¶ˆè€—è©²ç‰©å“ +command.rpgitem.create=創建物å“. 這個 @[åå­—]# åªæ˜¯ç”¨äºŽç·¨è¼¯æŒ‡ä»¤èª¿ç”¨å®ƒ, 並éžé¡¯ç¤ºåœ¨éŠæˆ²ä¸­ç‰©å“ @[展示å]#, 妳需è¦ç”¨display指令進行更改 +command.rpgitem.damage=顯示 @[物å“]# 當å‰å‚·å®³ +command.rpgitem.damage.set=給 @[物å“]# 設置 @[傷害值]# +command.rpgitem.damage.set.range=給 @[物å“]# è¨­ç½®éš¨æ©Ÿå‚·å®³ç¯„åœ @[最å°å€¼]# ~ @[最大值]# +command.rpgitem.description.add=給 @[物å“]# 增加 @[æ述文字]# +command.rpgitem.description.remove=從 @[物å“]# 上移除 @[該行文字]# 注æ„, 起始行數爲0 +command.rpgitem.description.set=給 @[物å“]# çš„ @[指定行]# 添加 @[æ述文字]# +command.rpgitem.display=顯示 @[物å“]# 當å‰å±•ç¤ºå +command.rpgitem.display.set=給 @[物å“]# 設置 @[展示å]# +command.rpgitem.error.command=錯誤: %s +command.rpgitem.fireball=給 @[物å“]# 添加ç«çƒæŠ€èƒ½, 默èªå†·å»æ™‚é–“ 20éŠæˆ²åˆ»(1 秒). å³éµç™¼å°„ +command.rpgitem.fireball.full=給 @[物å“]# 添加ç«çƒæŠ€èƒ½, 冷å»æ™‚é–“ @[éŠæˆ²åˆ»]#. å³éµç™¼å°„ +command.rpgitem.flame=給 @[物å“]# 添加點燃技能, 默èªæŒçºŒæ™‚é–“ 爲 20éŠæˆ²åˆ»(1 秒). å—到攻擊的目標會被點燃 +command.rpgitem.flame.full=給 @[物å“]# 添加點燃技能, [燃燒時間] 爲éŠæˆ²åˆ». å—到攻擊的目標會被點燃 +command.rpgitem.give=把 @[物å“]# 發給使用此指令的人 +command.rpgitem.give.player=把 @[物å“]# 發給 @[玩家]# +command.rpgitem.give.player.count=把指定@[數é‡]# @[物å“]# 發給 @[玩家]# +command.rpgitem.hand=顯示 @[物å“]# 手æŒç‹€æ…‹ç•¶å‰æ–‡æœ¬ +command.rpgitem.hand.set=設置 @[物å“]# 手æŒç‹€æ…‹çˆ² @[文本]# +command.rpgitem.help=顯示指令幫助, 或æœç´¢æŒ‡å®š @[分類]# 下的指令幫助 +command.rpgitem.ice=給 @[物å“]# 添加冰塊射擊技能 默èªå†·å»æ™‚é–“ 20éŠæˆ²åˆ» (1 秒). å³éµç™¼å°„冰塊, 制造出大é‡å†°å¡Šæ²–擊目標, 冰塊會慢慢消失 +command.rpgitem.ice.full=給 @[物å“]# 添加冰塊射擊技能 冷å»æ™‚é–“ @[éŠæˆ²åˆ»]#. å³éµç™¼å°„冰塊, 制造出大é‡å†°å¡Šæ²–擊目標, 冰塊會慢慢消失 +command.rpgitem.item=顯示 @[物å“]# 當å‰æè¿° +command.rpgitem.item.set=設置 @[物å“]# æ質爲 @[物å“文字或數字ID]# +command.rpgitem.item.set.data=設置 @[物å“]# æ質爲 @[物å“ID]# : @[附加數值]# +command.rpgitem.item.set.data.hex=設置 @[物å“]# æ質爲 @[物å“ID]# : @[附加數值]#, @[附加數值]# 爲å六進制數值 +command.rpgitem.item.set.id=設置 @[物å“]# æ質爲 @[數字ID]# +command.rpgitem.item.set.id.data=設置 @[物å“]# æ質爲 @[數字ID]# : @[附加數值]# +command.rpgitem.item.worldguard=é–‹å•“/關閉 worldguard å°@[物å“]# çš„é™åˆ¶ +command.rpgitem.knockup=給 @[物å“]# 添加擊飛技能, 默èªå¹¾çŽ‡çˆ²1/20 å¨åŠ›çˆ²2. 擊飛技能會把目標擊飛 +command.rpgitem.knockup.full=給 @[物å“]# 添加擊飛技能, 幾率爲 1/@[分æ¯æ•¸å€¼]# å¨åŠ›çˆ²@[整數]#. 擊飛技能會把目標擊飛 +command.rpgitem.lightning=給 @[物å“]# 添加閃電技能, 默èªå¹¾çŽ‡çˆ²1/20. 攻擊目標時壹定幾率生æˆé–ƒé›» +command.rpgitem.lightning.full=給 @[物å“]# 添加閃電技能, 幾率爲1/@[分æ¯æ•¸å€¼]#. 攻擊目標時壹定幾率生æˆé–ƒé›» +command.rpgitem.list=顯示所有RPG Itemså‰µé€ å‡ºä¾†çš„ç‰©å“ +command.rpgitem.lore=顯示 @[物å“]# 當å‰æè¿° +command.rpgitem.lore.set=給 @[物å“]# 設置 @[æè¿°]# +command.rpgitem.potionhit=攻擊時有 1/@[分æ¯æ•¸å€¼]# 的幾率使目標ç²å¾—藥水效果. @[效果]# 爲藥水效果 @[æŒçºŒæ™‚é–“]# å–®ä½çˆ²éŠæˆ²åˆ», @[效果等級]# 爲整數。 å¯ç”¨è—¥æ°´æ•ˆæžœ: +command.rpgitem.potionself=給自己釋放藥水效果. @[冷å»æ™‚é–“]# 爲éŠæˆ²åˆ». å³éµç™¼å‹•. @[效果]# 爲藥水效果 @[æŒçºŒæ™‚é–“]# å–®ä½çˆ²éŠæˆ²åˆ», @[效果等級]# 爲整數. å¯ç”¨æ•ˆæžœ: +command.rpgitem.print=在èŠå¤©æ¡†ä¸­é¡¯ç¤º @[物å“]# 屬性 +command.rpgitem.quality=顯示 @[物å“]# 當å‰å“質 +command.rpgitem.quality.set=給 @[物å“]# 設置 @[å“質]# +command.rpgitem.rainbow=給 @[物å“]# 添加彩虹技能, 默èªå†·å»æ™‚é–“ 20éŠæˆ²åˆ»(1 秒). 格數爲5. å³éµæ–¹å¡Šæœƒè¢«æŸ“æˆå½©è‰²ç¾Šæ¯›, éŽå¾Œè‡ªå·±è¤‡åŽŸ +command.rpgitem.rainbow.full=給 @[物å“]# 添加彩虹技能, @[冷å»æ™‚é–“]# 爲éŠæˆ²åˆ». @[格數]# 爲整數. å³éµæ–¹å¡Šæœƒè¢«æŸ“æˆå½©è‰²ç¾Šæ¯›, éŽå¾Œè‡ªå·±è¤‡åŽŸ +command.rpgitem.remove=從rpgitem列表中移除該物å“. æ“有該物å“的玩家ä¸æœƒå¤±åŽ»å®ƒ, 但是這個物å“所有的技能會失效 +command.rpgitem.removepower=從 @[物å“]# 上移除指定 @[技能]# +command.rpgitem.rumble=給 @[物å“]# 沖擊技能, @[冷å»æ™‚é–“]# 爲éŠæˆ²åˆ», @[å¨åŠ›]# 爲整數, æ²–æ“Š @[è·é›¢]# 爲整數. 沖擊技能會把地é¢ä¸Šå£¹å®šç¯„åœå…§çš„實體擊飛 +command.rpgitem.teleport=給 @[物å“]# 添加傳é€æŠ€èƒ½, 默èªå†·å»æ™‚é–“ 20éŠæˆ²åˆ»(1 秒). 傳é€è·é›¢çˆ²5æ ¼. 傳é€æ–¹å‘爲妳所é¢å‘çš„æ–¹å‘ +command.rpgitem.teleport.full=給 @[物å“]# 添加傳é€æŠ€èƒ½, @[冷å»æ™‚é–“]# 爲éŠæˆ²åˆ», @[傳é€è·é›¢]# 爲整數. 傳é€æ–¹å‘爲妳所é¢å‘çš„æ–¹å‘ +command.rpgitem.tntcannon=給 @[物å“]# 添加加農TNT技能, 默èªå†·å»æ™‚間爲 20éŠæˆ²åˆ»(1 秒). å³éµç™¼å°„å³å°‡çˆ†ç‚¸çš„TNT +command.rpgitem.tntcannon.full=給 @[物å“]# 添加加農TNT技能, @[冷å»æ™‚é–“]# 爲éŠæˆ²åˆ». å³éµç™¼å°„å³å°‡çˆ†ç‚¸çš„TNT +command.rpgitem.type=顯示 @[物å“]# 當å‰é¡žåž‹ +command.rpgitem.type.set=給 @[物å“]# 設置 @[é¡žåž‹]# +command.rpgitem.unbreakable=給 @[物å“]# 添加ä¸æ¯€æŠ€èƒ½. æ“有該技能的 @[物å“]# ä¸æœƒè¢«çŽ©å£ž +command.rpgitem.unbreaking=給 @[物å“]# 添加è€ä¹…技能, 默èª1ç´š. 與普通è€ä¹…é™„é­”ç›¸åŒ +command.rpgitem.unbreaking.full=給 @[物å“]# 添加è€ä¹…技能, @[等級]# 爲整數. 與普通è€ä¹…é™„é­”ç›¸åŒ +command.rpgitem.worldguard=切æ›world guardä¿è­·æ¨¡å¼. 啓用時會阻止RPG Items的物å“在éžPVPå€ä½¿ç”¨ +message.armour.get=ç‰©å“ '%s' 護甲爲 '%d%%' +message.armour.set=ç‰©å“ '%s' 護甲已設置爲 '%d%%' +message.command.info=更詳細幫助信æ¯è«‹æŸ¥çœ‹bukkitdevé é¢, 或輸入/rpgitem help [é—œéµè©ž] æ’件漢化by wolski from mcbbs.net +message.command.usage=指令用法: /%s (%s) +message.cooldown=冷å»æ™‚間還沒有çµæŸ, 請等待 %.1f 秒 +message.create.fail=該物å“å已存在 +message.create.ok=ç‰©å“ '%s' 已創建 +message.damage.get=ç‰©å“ '%s' 傷害爲 %d-%d +message.damage.set=ç‰©å“ '%s' 傷害設置爲 %d +message.damage.set.range=ç‰©å“ '%s' 傷害設置爲 %d-%d +message.description.change=該行文本已變更 +message.description.ok=該行文本已增加 +message.description.out.of.range=è¡Œ %d å·²è¶…å‡ºç¯„åœ +message.description.remove=該行文本已移除 +message.display.get=ç‰©å“ '%s' 展示å爲 '%s' +message.display.set=ç‰©å“ '%s' 展示å已設置爲 '%s' +message.error.command=錯誤: %s +message.error.command.format=顯示文本和指令必須用 | 這個符號分隔開 +message.error.double.format='%s' ä¸æ˜¯é›™æ•¸ +message.error.double.limit=數值必須在 %.2f 到 %.2f 之間 +message.error.effect=%s ä¸æ˜¯å£¹å€‹æœ‰æ•ˆçš„效果 +message.error.integer.format='%s' ä¸æ˜¯å£¹å€‹æ•´æ•¸ +message.error.integer.limit=數值必須在 %d 到 %d 之間 +message.error.item=æœªçŸ¥ç‰©å“ '%s' +message.error.material=未知æ質 '%s' +message.error.option=無效項 '%s' +message.error.permission=妳沒有權é™é‚£æ¨£åš +message.error.player=沒有找到玩家 %s +message.error.string.length='%s' 長度超éŽæœ€å¤§å€¼ %d +message.error.unknown.command=錯誤: 未知指令 %s +message.give.console=無法在控制å°ä½¿ç”¨æ­¤æŒ‡ä»¤ +message.hand.get=ç‰©å“ '%s' 手æŒç‹€æ…‹çˆ² '%s' +message.hand.set=è¨­ç½®ç‰©å“ '%s' 手æŒç‹€æ…‹çˆ² '%s' +message.help.for=顯示 '%s' çš„å¹«åŠ©ä¿¡æ¯ +message.item.cant.find=æ²’æœ‰æ‰¾åˆ°è©²ç‰©å“ +message.item.get=ç‰©å“ '%s' æ質爲 '%s +message.item.set=ç‰©å“ '%s' æ質已設置爲 '%s:%d' +message.lore.get=ç‰©å“ '%s' æ述爲 '%s' +message.lore.set=ç‰©å“ '%s' æ述已設置爲 '%s +message.power.ok=技能已添加 +message.power.removed=技能 %s 已移除 +message.power.unknown=未知技能 %s +message.quality.get=ç‰©å“ '%s' å“質爲 '%s' +message.quality.note=å“質: +message.quality.set=ç‰©å“ '%s' å“質已設置爲 '%s' +message.remove.ok=ç‰©å“ '%s' 已刪除 +message.too.far=太é äº†... +message.type.get=ç‰©å“ '%s' 類型爲 '%s' +message.type.set=ç‰©å“ '%s' 類型已設置爲 '%s' +message.worldguard.disable=Worldguard支æŒå·²ç¦ç”¨ +message.worldguard.enable=Worldguard支æŒå·²å•“用 +message.worldguard.error=沒有發ç¾Worldguardæ’件 +message.worldguard.override.active=已忽略Worldguardçš„é™åˆ¶ +message.worldguard.override.disabled=已開啓Worldguardçš„é™åˆ¶ +power.arrow=發射ç«ç®­ (%.1f 秒冷å»æ™‚é–“) +power.consume=使用後消耗掉 +power.fireball=發射ç«çƒ (%.1f 秒冷å»æ™‚é–“) +power.flame=點燃目標 %.1f 秒 +power.ice=發射冰塊 (%.1f 秒冷å»æ™‚é–“) +power.knockup=%d%% 的幾率擊飛目標 +power.lightning=%d%% 的幾率發生雷擊 +power.potionhit=%d%% 的幾率觸發效果 %s +power.potionself=ç²å¾— %s %d æŒçºŒ %.1f 秒 +power.rainbow=發射 %d 彩色羊毛 (%.1f 秒冷å») +power.rumble=發出沖擊波 (%.1f 秒冷å»æ™‚é–“) +power.teleport=å‚³é€ %d æ ¼ (%.1f 秒冷å») +power.tntcannon=發射 TNT (%.1f 秒冷å»æ™‚é–“) +power.unbreakable=ä¸æ¯€ +power.unbreaking=è€ä¹… %d +#2.7 +command.rpgitem.removerecipe=已刪除 @[物å“]# çš„åˆæˆè¡¨ +command.rpgitem.recipe=已設置 @[物å“]# çš„åˆæˆè¡¨ +message.recipe.removed=åˆæˆè¡¨å·²ç§»é™¤ +message.error.only.player=這個指令åªèƒ½ç”±éŠæˆ²ä¸­çš„玩家執行 +message.recipe.1=ä¸åšè®Šå‹•. 槽ä½ç•™ç©º +message.recipe.2=如果想自定義åˆæˆè¡¨ +message.recipe.3=把物å“置于空的地方 +message.recipe.4=以妳所è¦çš„擺放形狀 +message.recipe.5=進行放置 +command.rpgitem.drop=使 @[物å“]# 壹定幾率從æŸå€‹ @[實體類型]# 上掉è½. 0% 表示ä¸æœƒæŽ‰è½ +command.rpgitem.drop.set=設置 @[物å“]# 從æŸå€‹ @[實體類型]# çš„ @[掉è½å¹¾çŽ‡]#%. 0% 表示ä¸æœƒæŽ‰è½ +message.skyhook.fail=妳沒有鈎到任何æ±è¥¿ +power.skyhook=鈎到指定方塊 +power.potiontick=æŒæœ‰/穿戴時給予效果 %s %d +command.rpgitem.skyhook=給 @[物å“]#添加天鈎技能. 天鈎技能å…許使用者鈎到指定 @[æ質]# 並上å‡å£¹å®š @[è·é›¢]# +command.rpgitem.potiontick=給 @[物å“]# 添加被動效果加æˆ. 當玩家手æŒæˆ–穿戴該 @[物å“]# 時, 給予玩家指定 @[等級]# çš„ @[藥水效果]# diff --git a/src/plugin.yml b/src/plugin.yml new file mode 100644 index 00000000..5bdb65bc --- /dev/null +++ b/src/plugin.yml @@ -0,0 +1,9 @@ +name: RPG Items +main: think.rpgitems.Plugin +version: 3.5 +dev-url: http://rpgitems2.webs.com/ +softdepend: [WorldGuard] +commands: + rpgitem: + description: RPG Items + usage: RPG Items \ No newline at end of file diff --git a/src/think/rpgitems/Events.java b/src/think/rpgitems/Events.java new file mode 100644 index 00000000..3b24c738 --- /dev/null +++ b/src/think/rpgitems/Events.java @@ -0,0 +1,454 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems; + +import gnu.trove.map.hash.TIntByteHashMap; +import gnu.trove.map.hash.TIntIntHashMap; +import gnu.trove.map.hash.TObjectIntHashMap; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Random; +import java.util.Set; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.entity.Entity; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; +import org.bukkit.entity.Projectile; +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.block.BlockBreakEvent; +import org.bukkit.event.block.BlockPlaceEvent; +import org.bukkit.event.entity.EntityDamageByEntityEvent; +import org.bukkit.event.entity.EntityDeathEvent; +import org.bukkit.event.entity.ProjectileHitEvent; +import org.bukkit.event.entity.ProjectileLaunchEvent; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.inventory.InventoryCloseEvent; +import org.bukkit.event.inventory.InventoryOpenEvent; +import org.bukkit.event.inventory.InventoryType; +import org.bukkit.event.inventory.PrepareItemCraftEvent; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.event.player.PlayerItemConsumeEvent; +import org.bukkit.event.player.PlayerJoinEvent; +import org.bukkit.event.player.PlayerPickupItemEvent; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.PlayerInventory; +import org.bukkit.projectiles.ProjectileSource; +import org.bukkit.scheduler.BukkitRunnable; + +import think.rpgitems.data.Locale; +import think.rpgitems.data.RPGMetadata; +import think.rpgitems.item.ItemManager; +import think.rpgitems.item.LocaleInventory; +import think.rpgitems.item.RPGItem; +import think.rpgitems.support.WorldGuard; + +public class Events implements Listener { + + public static TIntByteHashMap removeArrows = new TIntByteHashMap(); + public static TIntIntHashMap rpgProjectiles = new TIntIntHashMap(); + public static TObjectIntHashMap recipeWindows = new TObjectIntHashMap(); + public static HashMap> drops = new HashMap>(); + public static boolean useLocaleInv = false; + + @SuppressWarnings("deprecation") + @EventHandler(ignoreCancelled = true) + public void onBlockBreak(BlockBreakEvent e) { + Player player = e.getPlayer(); + ItemStack item = player.getItemInHand(); + RPGItem rItem; + if ((rItem = ItemManager.toRPGItem(item)) != null) { + RPGMetadata meta = RPGItem.getMetadata(item); + if(rItem.getMaxDurability() != -1) { + int durability = meta.containsKey(RPGMetadata.DURABILITY) ? ((Number) meta.get(RPGMetadata.DURABILITY)).intValue() : rItem.getMaxDurability(); + durability--; + if (durability <= 0) { + player.setItemInHand(null); + } + meta.put(RPGMetadata.DURABILITY, Integer.valueOf(durability)); + } + RPGItem.updateItem(item, Locale.getPlayerLocale(player), meta); + player.updateInventory(); + } + + } + + @EventHandler + public void onEntityDeath(EntityDeathEvent e) { + String type = e.getEntity().getType().toString(); + Random random = new Random(); + if (drops.containsKey(type)) { + Set items = drops.get(type); + Iterator it = items.iterator(); + while (it.hasNext()) { + int id = it.next(); + RPGItem item = ItemManager.getItemById(id); + if (item == null) { + it.remove(); + continue; + } + double chance = item.dropChances.get(type); + if (random.nextDouble() < chance / 100d) { + e.getDrops().add(item.toItemStack("en_GB")); + } + } + } + } + + @EventHandler + public void onProjectileHit(ProjectileHitEvent e) { + final Entity entity = e.getEntity(); + if (removeArrows.contains(entity.getEntityId())) { + entity.remove(); + removeArrows.remove(entity.getEntityId()); + } else if (rpgProjectiles.contains(entity.getEntityId())) { + RPGItem item = ItemManager.getItemById(rpgProjectiles.get(entity.getEntityId())); + new BukkitRunnable() { + + public void run() { + rpgProjectiles.remove(entity.getEntityId()); + + } + }.runTask(Plugin.plugin); + if (item == null) + return; + item.projectileHit((Player) ((Projectile) entity).getShooter(), (Projectile) entity); + } + } + + @SuppressWarnings("deprecation") + @EventHandler + public void onProjectileFire(ProjectileLaunchEvent e) { + ProjectileSource shooter = e.getEntity().getShooter(); + if (shooter instanceof Player) { + Player player = (Player) shooter; + ItemStack item = player.getItemInHand(); + RPGItem rItem = ItemManager.toRPGItem(item); + if (rItem == null) + return; + if (!WorldGuard.canPvP(player.getLocation()) && !rItem.ignoreWorldGuard) + return; + if (rItem.getHasPermission() == true && player.hasPermission(rItem.getPermission()) == false){ + e.setCancelled(true); + player.sendMessage(ChatColor.RED + String.format(Locale.get("message.error.permission", Locale.getPlayerLocale(player))));} + RPGMetadata meta = RPGItem.getMetadata(item); + if (rItem.getMaxDurability() != -1) { + int durability = meta.containsKey(RPGMetadata.DURABILITY) ? ((Number) meta.get(RPGMetadata.DURABILITY)).intValue() : rItem.getMaxDurability(); + durability--; + if (durability <= 0) { + player.setItemInHand(null); + } + meta.put(RPGMetadata.DURABILITY, Integer.valueOf(durability)); + } + RPGItem.updateItem(item, Locale.getPlayerLocale(player), meta); + player.updateInventory(); + rpgProjectiles.put(e.getEntity().getEntityId(), rItem.getID()); + } + } + + @EventHandler + public void onPlayerAction(PlayerInteractEvent e) { + Player player = e.getPlayer(); + if ((e.getAction() == Action.RIGHT_CLICK_AIR || (e.getAction() == Action.RIGHT_CLICK_BLOCK) && !e.isCancelled())) { + ItemStack item = player.getItemInHand(); + if (item.getType() == Material.BOW || item.getType() == Material.SNOW_BALL || item.getType() == Material.EGG || item.getType() == Material.POTION) + return; + + RPGItem rItem = ItemManager.toRPGItem(item); + if (rItem == null) + return; + if (!WorldGuard.canPvP(player.getLocation()) && !rItem.ignoreWorldGuard) + return; + if (rItem.getHasPermission() == true && player.hasPermission(rItem.getPermission()) == false){ + e.setCancelled(true); + player.sendMessage(ChatColor.RED + String.format(Locale.get("message.error.permission", Locale.getPlayerLocale(player))));} + rItem.rightClick(player); + if (player.getItemInHand().getTypeId() != 0){ + RPGItem.updateItem(item, Locale.getPlayerLocale(player)); + }else + player.setItemInHand(null); + player.updateInventory(); + } else if (e.getAction() == Action.LEFT_CLICK_AIR || e.getAction() == Action.LEFT_CLICK_BLOCK) { + ItemStack item = player.getItemInHand(); + if (item.getType() == Material.BOW || item.getType() == Material.SNOW_BALL || item.getType() == Material.EGG || item.getType() == Material.POTION) + return; + + RPGItem rItem = ItemManager.toRPGItem(item); + if (rItem == null) + return; + if (!WorldGuard.canPvP(player.getLocation()) && !rItem.ignoreWorldGuard) + return; + if (rItem.getHasPermission() == true && player.hasPermission(rItem.getPermission()) == false){ + e.setCancelled(true); + player.sendMessage(ChatColor.RED + String.format(Locale.get("message.error.permission", Locale.getPlayerLocale(player))));} + rItem.leftClick(player); + RPGItem.updateItem(item, Locale.getPlayerLocale(player)); + } + + } + + @EventHandler + public void onBlockPlace(BlockPlaceEvent e) { + ItemStack item = e.getPlayer().getItemInHand(); + if (item == null) + return; + + RPGItem rItem = ItemManager.toRPGItem(item); + if (rItem == null) + return; + e.setCancelled(true); + } + + @EventHandler + public void onPlayerJoin(PlayerJoinEvent e) { + Player player = e.getPlayer(); + PlayerInventory in = player.getInventory(); + String locale = Locale.getPlayerLocale(player); + for (int i = 0; i < in.getSize(); i++) { + ItemStack item = in.getItem(i); + if (ItemManager.toRPGItem(item) != null) + RPGItem.updateItem(item, locale); + } + for (ItemStack item : player.getInventory().getArmorContents()) { + if (ItemManager.toRPGItem(item) != null) + RPGItem.updateItem(item, locale); + } + } + + @EventHandler + public void onPlayerPickup(PlayerPickupItemEvent e) { + ItemStack item = e.getItem().getItemStack(); + String locale = Locale.getPlayerLocale(e.getPlayer()); + if (ItemManager.toRPGItem(item) != null) { + RPGItem.updateItem(item, locale); + e.getItem().setItemStack(item); + } + } + + private HashSet localeInventories = new HashSet(); + + @EventHandler + public void onInventoryClose(InventoryCloseEvent e) { + if (recipeWindows.containsKey(e.getPlayer().getName())) { + int id = recipeWindows.remove(e.getPlayer().getName()); + RPGItem item = ItemManager.getItemById(id); + if (item.recipe == null) { + item.recipe = new ArrayList(); + } + item.recipe.clear(); + for (int y = 0; y < 3; y++) { + for (int x = 0; x < 3; x++) { + int i = x + y * 9; + ItemStack it = e.getInventory().getItem(i); + item.recipe.add(it); + } + } + item.hasRecipe = true; + item.resetRecipe(true); + ItemManager.save(Plugin.plugin); + ((Player) e.getPlayer()).sendMessage(ChatColor.AQUA + "Recipe set for " + item.getName()); + } else if (useLocaleInv && e.getView() instanceof LocaleInventory) { + localeInventories.remove(e.getView()); + ((LocaleInventory) e.getView()).getView().close(); + } + } + + @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST) + public void onInventoryClick(InventoryClickEvent e) { + if (useLocaleInv && e.getView() instanceof LocaleInventory) { + LocaleInventory inv = (LocaleInventory) e.getView(); + InventoryClickEvent clickEvent = new InventoryClickEvent(inv.getView(), e.getSlotType(), e.getRawSlot(), e.isRightClick(), e.isShiftClick()); + Bukkit.getServer().getPluginManager().callEvent(clickEvent); + if (clickEvent.isCancelled()) { + e.setCancelled(true); + } else { + switch (clickEvent.getResult()) { + case DEFAULT: // Can't really do this with current events + case ALLOW: + System.out.println("ok..."); + System.out.println(inv.getView().getItem(e.getRawSlot())); + inv.getView().setItem(e.getRawSlot(), clickEvent.getCursor()); + System.out.println(inv.getView().getItem(e.getRawSlot())); + break; + case DENY: + break; + } + } + for (LocaleInventory localeInv : localeInventories) { + if (localeInv != inv) + localeInv.reload(); + } + } + } + + @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST) + public void onInventoryOpen(final InventoryOpenEvent e) { + if (e.getView() instanceof LocaleInventory) + return; + if (e.getInventory().getType() != InventoryType.CHEST || !useLocaleInv) { + Inventory in = e.getInventory(); + Iterator it = in.iterator(); + String locale = Locale.getPlayerLocale((Player) e.getPlayer()); + try { + while (it.hasNext()) { + ItemStack item = it.next(); + if (ItemManager.toRPGItem(item) != null) + RPGItem.updateItem(item, locale); + } + } catch (ArrayIndexOutOfBoundsException ex) { + // Fix for the bug with anvils in craftbukkit + } + } else if (useLocaleInv) { + LocaleInventory localeInv = new LocaleInventory((Player) e.getPlayer(), e.getView()); + e.setCancelled(true); + e.getPlayer().openInventory(localeInv); + localeInventories.add(localeInv); + } + } + + private Random random = new Random(); + + @SuppressWarnings("deprecation") + private double playerDamager(EntityDamageByEntityEvent e, double damage) { + Player player = (Player) e.getDamager(); + ItemStack item = player.getItemInHand(); + if (item.getType() == Material.BOW || item.getType() == Material.SNOW_BALL || item.getType() == Material.EGG || item.getType() == Material.POTION) + return damage; + + RPGItem rItem = ItemManager.toRPGItem(item); + if (rItem == null) + return damage; + if (!WorldGuard.canPvP(player.getLocation()) && !rItem.ignoreWorldGuard) + return damage; + if (rItem.getHasPermission() == true && player.hasPermission(rItem.getPermission()) == false){ + damage = 0; + e.setCancelled(true); + player.sendMessage(ChatColor.RED + String.format(Locale.get("message.error.permission", Locale.getPlayerLocale(player))));} + damage = rItem.getDamageMin() != rItem.getDamageMax() ? (rItem.getDamageMin() + random.nextInt(rItem.getDamageMax() - rItem.getDamageMin())) : rItem.getDamageMin(); + if (e.getEntity() instanceof LivingEntity) { + LivingEntity le = (LivingEntity) e.getEntity(); + rItem.hit(player, le, e.getDamage()); + } + RPGMetadata meta = RPGItem.getMetadata(item); + if (rItem.getMaxDurability() != -1) { + int durability = meta.containsKey(RPGMetadata.DURABILITY) ? ((Number) meta.get(RPGMetadata.DURABILITY)).intValue() : rItem.getMaxDurability(); + durability--; + if (durability <= 0) { + player.setItemInHand(null); + } + meta.put(RPGMetadata.DURABILITY, Integer.valueOf(durability)); + } + RPGItem.updateItem(item, Locale.getPlayerLocale(player), meta); + player.updateInventory(); + return damage; + } + + private double projectileDamager(EntityDamageByEntityEvent e, double damage) { + Projectile entity = (Projectile) e.getDamager(); + if (rpgProjectiles.contains(entity.getEntityId())) { + RPGItem rItem = ItemManager.getItemById(rpgProjectiles.get(entity.getEntityId())); + if (rItem == null) + return damage; + damage = rItem.getDamageMin() != rItem.getDamageMax() ? (rItem.getDamageMin() + random.nextInt(rItem.getDamageMax() - rItem.getDamageMin())) : rItem.getDamageMin(); + if (e.getEntity() instanceof LivingEntity) { + LivingEntity le = (LivingEntity) e.getEntity(); + rItem.hit((Player) entity.getShooter(), le, e.getDamage()); + } + } + return damage; + } + + private double playerHit(EntityDamageByEntityEvent e, double damage) { + Player p = (Player) e.getEntity(); + if (e.isCancelled() || !WorldGuard.canPvP(p.getLocation())) + return damage; + String locale = Locale.getPlayerLocale(p); + ItemStack[] armour = p.getInventory().getArmorContents(); + for (int i = 0; i < armour.length; i++) { + ItemStack pArmour = armour[i]; + RPGItem pRItem = ItemManager.toRPGItem(pArmour); + if (pRItem == null) + continue; + if (!WorldGuard.canPvP(p.getLocation()) && !pRItem.ignoreWorldGuard) + return damage; + if (pRItem.getHasPermission() == true && p.hasPermission(pRItem.getPermission()) == false){ + damage = 0; + e.setCancelled(true); + p.sendMessage(ChatColor.RED + String.format(Locale.get("message.error.permission", Locale.getPlayerLocale(p))));} + if (pRItem.getArmour() > 0) { + damage -= Math.round(((double) damage) * (((double) pRItem.getArmour()) / 100d)); + } + RPGMetadata meta = RPGItem.getMetadata(pArmour); + if (pRItem.getMaxDurability() != -1) { + int durability = meta.containsKey(RPGMetadata.DURABILITY) ? ((Number) meta.get(RPGMetadata.DURABILITY)).intValue() : pRItem.getMaxDurability(); + durability--; + if (durability <= 0) { + armour[i] = null; + } + meta.put(RPGMetadata.DURABILITY, Integer.valueOf(durability)); + } + RPGItem.updateItem(pArmour, locale, meta); + } + p.getInventory().setArmorContents(armour); + p.updateInventory(); + return damage; + } + + @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) + public void onDamage(EntityDamageByEntityEvent e) { + double damage = e.getDamage(); + if (e.getDamager() instanceof Player) { + damage = playerDamager(e, damage); + } else if (e.getDamager() instanceof Projectile) { + damage = projectileDamager(e, damage); + } + if (e.getEntity() instanceof Player) { + damage = playerHit(e, damage); + } + e.setDamage(damage); + } + + + @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST) + public void onItemCraft(PrepareItemCraftEvent e) { + if (ItemManager.toRPGItem(e.getInventory().getResult()) != null){ + Random random = new Random(); + if (random.nextInt(ItemManager.toRPGItem(e.getInventory().getResult()).recipechance) != 0){ + ItemStack baseitem = new ItemStack(e.getInventory().getResult().getType()); + e.getInventory().setResult(baseitem); + } + } + } + + public void onItemDamage(PlayerItemConsumeEvent e){ + if (ItemManager.toRPGItem(e.getItem()) != null){ + RPGItem rpgitem = ItemManager.toRPGItem(e.getItem()); + if (rpgitem.getMaxDurability() > 0){ + e.getItem().setDurability((short)-1); + } + } + } +} \ No newline at end of file diff --git a/src/think/rpgitems/Handler.java b/src/think/rpgitems/Handler.java new file mode 100644 index 00000000..e131fc44 --- /dev/null +++ b/src/think/rpgitems/Handler.java @@ -0,0 +1,589 @@ +package think.rpgitems; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Set; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Color; +import org.bukkit.Material; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.Player; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.inventory.meta.LeatherArmorMeta; + +import think.rpgitems.commands.CommandDocumentation; +import think.rpgitems.commands.CommandGroup; +import think.rpgitems.commands.CommandHandler; +import think.rpgitems.commands.CommandString; +import think.rpgitems.data.Locale; +import think.rpgitems.item.ItemManager; +import think.rpgitems.item.Quality; +import think.rpgitems.item.RPGItem; +import think.rpgitems.power.Power; +import think.rpgitems.support.WorldGuard; + +public class Handler implements CommandHandler { + + @CommandString("rpgitem list") + @CommandDocumentation("$command.rpgitem.list") + @CommandGroup("list") + public void listItems(CommandSender sender) { + sender.sendMessage(ChatColor.GREEN + "RPGItems:"); + for (RPGItem item : ItemManager.itemByName.values()) { + sender.sendMessage(ChatColor.GREEN + item.getName() + " - " + item.getDisplay()); + } + } + + @CommandString("rpgitem option worldguard") + @CommandDocumentation("$command.rpgitem.worldguard") + @CommandGroup("option_worldguard") + public void toggleWorldGuard(CommandSender sender) { + String locale = Locale.getPlayerLocale((Player) sender); + if (!WorldGuard.isEnabled()) { + sender.sendMessage(ChatColor.RED + Locale.get("message.worldguard.error", locale)); + return; + } + if (WorldGuard.useWorldGuard) { + sender.sendMessage(ChatColor.AQUA + Locale.get("message.worldguard.disable", locale)); + } else { + sender.sendMessage(ChatColor.AQUA + Locale.get("message.worldguard.enable", locale)); + } + WorldGuard.useWorldGuard = !WorldGuard.useWorldGuard; + Plugin.plugin.getConfig().set("support.worldguard", WorldGuard.useWorldGuard); + Plugin.plugin.saveConfig(); + } + + @CommandString("rpgitem $n[]") + @CommandDocumentation("$command.rpgitem.print") + @CommandGroup("item") + public void printItem(CommandSender sender, RPGItem item) { + item.print(sender); + } + + @CommandString("rpgitem $name:s[] create") + @CommandDocumentation("$command.rpgitem.create") + @CommandGroup("item") + public void createItem(CommandSender sender, String itemName) { + String locale = Locale.getPlayerLocale((Player) sender); + if (ItemManager.newItem(itemName.toLowerCase()) != null) { + sender.sendMessage(String.format(ChatColor.GREEN + Locale.get("message.create.ok", locale), itemName)); + ItemManager.save(Plugin.plugin); + } else { + sender.sendMessage(ChatColor.RED + Locale.get("message.create.fail", locale)); + } + } + + @CommandString("rpgitem option giveperms") + @CommandDocumentation("$command.rpgitem.giveperms") + @CommandGroup("option_giveperms") + public void givePerms(CommandSender sender) { + String locale = Locale.getPlayerLocale((Player) sender); + Plugin.plugin.getConfig().set("give-perms", !Plugin.plugin.getConfig().getBoolean("give-perms", false)); + if (Plugin.plugin.getConfig().getBoolean("give-perms", false)) { + sender.sendMessage(ChatColor.AQUA + Locale.get("message.giveperms.true", locale)); + } else { + sender.sendMessage(ChatColor.AQUA + Locale.get("message.giveperms.false", locale)); + } + Plugin.plugin.saveConfig(); + } + + @CommandString(value = "rpgitem $n[] give", handlePermissions = true) + @CommandDocumentation("$command.rpgitem.give") + @CommandGroup("item_give") + public void giveItem(CommandSender sender, RPGItem item) { + String locale = Locale.getPlayerLocale((Player) sender); + if (sender instanceof Player) { + if ((!Plugin.plugin.getConfig().getBoolean("give-perms", false) && sender.hasPermission("rpgitem")) || (Plugin.plugin.getConfig().getBoolean("give-perms", false) && sender.hasPermission("rpgitem.give." + item.getName()))) { + item.give((Player) sender); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.give.ok", locale), item.getDisplay())); + } else { + sender.sendMessage(ChatColor.RED + Locale.get("message.error.permission", locale)); + } + } else { + sender.sendMessage(ChatColor.RED + Locale.get("message.give.console", locale)); + } + } + + @CommandString("rpgitem $n[] give $p[]") + @CommandDocumentation("$command.rpgitem.give.player") + @CommandGroup("item_give") + public void giveItemPlayer(CommandSender sender, RPGItem item, Player player) { + String locale = Locale.getPlayerLocale((Player) sender); + item.give(player); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.give.to", locale), item.getDisplay() + ChatColor.AQUA, player.getName())); + player.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.give.ok", locale), item.getDisplay())); + } + + @CommandString("rpgitem $n[] give $p[] $count:i[]") + @CommandDocumentation("$command.rpgitem.give.player.count") + @CommandGroup("item_give") + public void giveItemPlayerCount(CommandSender sender, RPGItem item, Player player, int count) { + for (int i = 0; i < count; i++) { + item.give(player); + } + } + + @CommandString("rpgitem $n[] remove") + @CommandDocumentation("$command.rpgitem.remove") + @CommandGroup("item_remove") + public void removeItem(CommandSender sender, RPGItem item) { + String locale = Locale.getPlayerLocale((Player) sender); + ItemManager.remove(item); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.remove.ok", locale), item.getName())); + ItemManager.save(Plugin.plugin); + } + + @CommandString("rpgitem $n[] display") + @CommandDocumentation("$command.rpgitem.display") + @CommandGroup("item_display") + public void getItemDisplay(CommandSender sender, RPGItem item) { + String locale = Locale.getPlayerLocale((Player) sender); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.display.get", locale), item.getName(), item.getDisplay())); + } + + @CommandString("rpgitem $n[] display $display:s[]") + @CommandDocumentation("$command.rpgitem.display.set") + @CommandGroup("item_display") + public void setItemDisplay(CommandSender sender, RPGItem item, String display) { + String locale = Locale.getPlayerLocale((Player) sender); + item.setDisplay(display); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.display.set", locale), item.getName(), item.getDisplay())); + ItemManager.save(Plugin.plugin); + } + + @CommandString("rpgitem $n[] quality") + @CommandDocumentation("$command.rpgitem.quality") + @CommandGroup("item_quality") + public void getItemQuality(CommandSender sender, RPGItem item) { + String locale = Locale.getPlayerLocale((Player) sender); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.quality.get", locale), item.getName(), item.getQuality().toString().toLowerCase())); + } + + @CommandString("rpgitem $n[] quality $e[think.rpgitems.item.Quality]") + @CommandDocumentation("$command.rpgitem.quality.set") + @CommandGroup("item_quality") + public void setItemQuality(CommandSender sender, RPGItem item, Quality quality) { + String locale = Locale.getPlayerLocale((Player) sender); + item.setQuality(quality); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.quality.set", locale), item.getName(), item.getQuality().toString().toLowerCase())); + ItemManager.save(Plugin.plugin); + } + + @CommandString("rpgitem $n[] damage") + @CommandDocumentation("$command.rpgitem.damage") + @CommandGroup("item_damage") + public void getItemDamage(CommandSender sender, RPGItem item) { + String locale = Locale.getPlayerLocale((Player) sender); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.damage.get", locale), item.getName(), item.getDamageMin(), item.getDamageMax())); + } + + @CommandString("rpgitem $n[] damage $damage:i[]") + @CommandDocumentation("$command.rpgitem.damage.set") + @CommandGroup("item_damage") + public void setItemDamage(CommandSender sender, RPGItem item, int damage) { + String locale = Locale.getPlayerLocale((Player) sender); + item.setDamage(damage, damage); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.damage.set", locale), item.getName(), item.getDamageMin())); + ItemManager.save(Plugin.plugin); + } + + @CommandString("rpgitem $n[] damage $min:i[] $max:i[]") + @CommandDocumentation("$command.rpgitem.damage.set.range") + @CommandGroup("item_damage") + public void setItemDamage(CommandSender sender, RPGItem item, int min, int max) { + String locale = Locale.getPlayerLocale((Player) sender); + item.setDamage(min, max); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.damage.set.range", locale), item.getName(), item.getDamageMin(), item.getDamageMax())); + ItemManager.save(Plugin.plugin); + } + + @CommandString("rpgitem $n[] armour") + @CommandDocumentation("$command.rpgitem.armour") + @CommandGroup("item_armour") + public void getItemArmour(CommandSender sender, RPGItem item) { + String locale = Locale.getPlayerLocale((Player) sender); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.armour.get", locale), item.getName(), item.getArmour())); + } + + @CommandString("rpgitem $n[] armour $armour:i[0,100]") + @CommandDocumentation("$command.rpgitem.armour.set") + @CommandGroup("item_armour") + public void setItemArmour(CommandSender sender, RPGItem item, int armour) { + String locale = Locale.getPlayerLocale((Player) sender); + item.setArmour(armour); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.armour.set", locale), item.getName(), item.getArmour())); + ItemManager.save(Plugin.plugin); + } + + @CommandString("rpgitem $n[] type") + @CommandDocumentation("$command.rpgitem.type") + @CommandGroup("item_type") + public void getItemType(CommandSender sender, RPGItem item) { + String locale = Locale.getPlayerLocale((Player) sender); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.type.get", locale), item.getName(), item.getType())); + } + + @CommandString("rpgitem $n[] type $type:s[]") + @CommandDocumentation("$command.rpgitem.type.set") + @CommandGroup("item_type") + public void setItemType(CommandSender sender, RPGItem item, String type) { + String locale = Locale.getPlayerLocale((Player) sender); + item.setType(type); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.type.set", locale), item.getName(), item.getType())); + ItemManager.save(Plugin.plugin); + } + + @CommandString("rpgitem $n[] hand") + @CommandDocumentation("$command.rpgitem.hand") + @CommandGroup("item_hand") + public void getItemHand(CommandSender sender, RPGItem item) { + String locale = Locale.getPlayerLocale((Player) sender); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.hand.get", locale), item.getName(), item.getHand())); + } + + @CommandString("rpgitem $n[] hand $hand:s[]") + @CommandDocumentation("$command.rpgitem.hand.set") + @CommandGroup("item_hand") + public void setItemHand(CommandSender sender, RPGItem item, String hand) { + String locale = Locale.getPlayerLocale((Player) sender); + item.setHand(hand); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.hand.set", locale), item.getName(), item.getHand())); + ItemManager.save(Plugin.plugin); + } + + @CommandString("rpgitem $n[] lore") + @CommandDocumentation("$command.rpgitem.lore") + @CommandGroup("item_lore") + public void getItemLore(CommandSender sender, RPGItem item) { + String locale = Locale.getPlayerLocale((Player) sender); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.lore.get", locale), item.getName(), item.getLore())); + } + + @CommandString("rpgitem $n[] lore $lore:s[]") + @CommandDocumentation("$command.rpgitem.lore.set") + @CommandGroup("item_lore") + public void setItemLore(CommandSender sender, RPGItem item, String lore) { + String locale = Locale.getPlayerLocale((Player) sender); + item.setLore(lore); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.lore.set", locale), item.getName(), item.getLore())); + ItemManager.save(Plugin.plugin); + } + + @CommandString("rpgitem $n[] item") + @CommandDocumentation("$command.rpgitem.item") + @CommandGroup("item_item") + public void getItemItem(CommandSender sender, RPGItem item) { + String locale = Locale.getPlayerLocale((Player) sender); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.item.get", locale), item.getName(), item.getItem().toString())); + } + + @CommandString("rpgitem $n[] item $m[]") + @CommandDocumentation("$command.rpgitem.item.set") + @CommandGroup("item_item") + public void setItemItem(CommandSender sender, RPGItem item, Material material) { + String locale = Locale.getPlayerLocale((Player) sender); + item.setItem(material); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.item.set", locale), item.getName(), item.getItem(), item.getDataValue())); + ItemManager.save(Plugin.plugin); + } + + @CommandString("rpgitem $n[] item $m[] $data:i[]") + @CommandDocumentation("$command.rpgitem.item.set.data") + @CommandGroup("item_item") + public void setItemItem(CommandSender sender, RPGItem item, Material material, int data) { + String locale = Locale.getPlayerLocale((Player) sender); + item.setItem(material, false); + ItemMeta meta = item.getLocaleMeta(locale); + if (meta instanceof LeatherArmorMeta) { + ((LeatherArmorMeta) meta).setColor(Color.fromRGB(data)); + } else { + item.setDataValue((short) data); + } + for (String locales : Locale.getLocales()) { + item.setLocaleMeta(locales, meta.clone()); + } + item.rebuild(); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.item.set", locale), item.getName(), item.getItem(), item.getDataValue())); + ItemManager.save(Plugin.plugin); + } + + @CommandString("rpgitem $n[] item $m[] hex $hexcolour:s[]") + @CommandDocumentation("$command.rpgitem.item.set.data.hex") + @CommandGroup("item_item") + public void setItemItem(CommandSender sender, RPGItem item, Material material, String hexColour) { + String locale = Locale.getPlayerLocale((Player) sender); + int dam; + try { + dam = Integer.parseInt((String) hexColour, 16); + } catch (NumberFormatException e) { + sender.sendMessage(ChatColor.RED + "Failed to parse " + hexColour); + return; + } + item.setItem(material, true); + ItemMeta meta = item.getLocaleMeta(locale); + if (meta instanceof LeatherArmorMeta) { + ((LeatherArmorMeta) meta).setColor(Color.fromRGB(dam)); + } else { + item.setDataValue((short) dam); + } + for (String locales : Locale.getLocales()) { + item.setLocaleMeta(locales, meta.clone()); + } + item.rebuild(); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.item.set", locale), item.getName(), item.getItem(), item.getDataValue())); + ItemManager.save(Plugin.plugin); + } + + @CommandString("rpgitem $n[] item $itemid:i[]") + @CommandDocumentation("$command.rpgitem.item.set.id") + @CommandGroup("item_item") + public void setItemItem(CommandSender sender, RPGItem item, int id) { + String locale = Locale.getPlayerLocale((Player) sender); + Material mat = Material.getMaterial(id); + if (mat == null) { + sender.sendMessage(ChatColor.RED + "Cannot find item"); + return; + } + item.setItem(mat); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.item.set", locale), item.getName(), item.getItem(), item.getDataValue())); + ItemManager.save(Plugin.plugin); + } + + @CommandString("rpgitem $n[] item $itemid:i[] $data:i[]") + @CommandDocumentation("$command.rpgitem.item.set.id.data") + @CommandGroup("item_item") + public void setItemItem(CommandSender sender, RPGItem item, int id, int data) { + String locale = Locale.getPlayerLocale((Player) sender); + Material mat = Material.getMaterial(id); + if (mat == null) { + sender.sendMessage(ChatColor.RED + Locale.get("message.item.cant.find", locale)); + return; + } + item.setItem(mat, true); + ItemMeta meta = item.toItemStack(locale).getItemMeta(); + if (meta instanceof LeatherArmorMeta) { + ((LeatherArmorMeta) meta).setColor(Color.fromRGB(data)); + } else { + item.setDataValue((short) data); + } + for (String locales : Locale.getLocales()) { + item.setLocaleMeta(locales, meta); + } + item.rebuild(); + sender.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.item.set", locale), item.getName(), item.getItem(), item.getDataValue())); + ItemManager.save(Plugin.plugin); + } + + @CommandString("rpgitem $n[] removepower $power:s[]") + @CommandDocumentation("$command.rpgitem.removepower") + @CommandGroup("item_removepower") + public void itemRemovePower(CommandSender sender, RPGItem item, String power) { + String locale = Locale.getPlayerLocale((Player) sender); + if (item.removePower(power)) { + Power.powerUsage.put(power, Power.powerUsage.get(power) - 1); + sender.sendMessage(ChatColor.GREEN + String.format(Locale.get("message.power.removed", locale), power)); + ItemManager.save(Plugin.plugin); + } else { + sender.sendMessage(ChatColor.RED + String.format(Locale.get("message.power.unknown", locale), power)); + } + } + + @CommandString("rpgitem $n[] description add $descriptionline:s[]") + @CommandDocumentation("$command.rpgitem.description.add") + @CommandGroup("item_description") + public void itemAddDescription(CommandSender sender, RPGItem item, String line) { + String locale = Locale.getPlayerLocale((Player) sender); + item.addDescription(ChatColor.WHITE + line); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.description.ok", locale)); + ItemManager.save(Plugin.plugin); + } + + @CommandString("rpgitem $n[] description set $lineno:i[] $descriptionline:s[]") + @CommandDocumentation("$command.rpgitem.description.set") + @CommandGroup("item_description") + public void itemSetDescription(CommandSender sender, RPGItem item, int lineNo, String line) { + String locale = Locale.getPlayerLocale((Player) sender); + if (lineNo < 0 || lineNo >= item.description.size()) { + sender.sendMessage(ChatColor.RED + String.format(Locale.get("message.description.out.of.range", locale), line)); + return; + } + item.description.set(lineNo, ChatColor.translateAlternateColorCodes('&', ChatColor.WHITE + line)); + item.rebuild(); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.description.change", locale)); + ItemManager.save(Plugin.plugin); + } + + @CommandString("rpgitem $n[] description remove $lineno:i[]") + @CommandDocumentation("$command.rpgitem.description.remove") + @CommandGroup("item_description") + public void itemRemoveDescription(CommandSender sender, RPGItem item, int lineNo) { + String locale = Locale.getPlayerLocale((Player) sender); + if (lineNo < 0 || lineNo >= item.description.size()) { + sender.sendMessage(ChatColor.RED + String.format(Locale.get("message.description.out.of.range", locale), lineNo)); + return; + } + item.description.remove(lineNo); + item.rebuild(); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.description.remove", locale)); + ItemManager.save(Plugin.plugin); + } + + @CommandString("rpgitem $n[] worldguard") + @CommandDocumentation("$command.rpgitem.item.worldguard") + @CommandGroup("item_worldguard") + public void itemToggleWorldGuard(CommandSender sender, RPGItem item) { + String locale = Locale.getPlayerLocale((Player) sender); + if (!WorldGuard.isEnabled()) { + sender.sendMessage(ChatColor.AQUA + Locale.get("message.worldguard.error", locale)); + return; + } + item.ignoreWorldGuard = !item.ignoreWorldGuard; + if (item.ignoreWorldGuard) { + sender.sendMessage(ChatColor.AQUA + Locale.get("message.worldguard.override.active", locale)); + } else { + sender.sendMessage(ChatColor.AQUA + Locale.get("message.worldguard.override.disabled", locale)); + } + } + + @CommandString("rpgitem $n[] removerecipe") + @CommandDocumentation("$command.rpgitem.removerecipe") + @CommandGroup("item_recipe") + public void itemRemoveRecipe(CommandSender sender, RPGItem item) { + String locale = Locale.getPlayerLocale((Player) sender); + item.hasRecipe = false; + item.resetRecipe(true); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.recipe.removed", locale)); + } + + @CommandString("rpgitem $n[] recipe $chance:i[]") + @CommandDocumentation("$command.rpgitem.recipe") + @CommandGroup("item_recipe") + public void itemSetRecipe(CommandSender sender, RPGItem item, int chance) { + String locale = Locale.getPlayerLocale((Player) sender); + if (sender instanceof Player) { + Player player = (Player) sender; + String title = "RPGItems - " + item.getDisplay(); + if (title.length() > 32) { + title = title.substring(0, 32); + } + Inventory recipeInventory = Bukkit.createInventory(player, 27, title); + if (item.hasRecipe) { + ItemStack blank = new ItemStack(Material.WALL_SIGN); + ItemMeta meta = blank.getItemMeta(); + meta.setDisplayName(ChatColor.RED + Locale.get("message.recipe.1", locale)); + ArrayList lore = new ArrayList(); + lore.add(ChatColor.WHITE + Locale.get("message.recipe.2", locale)); + lore.add(ChatColor.WHITE + Locale.get("message.recipe.3", locale)); + lore.add(ChatColor.WHITE + Locale.get("message.recipe.4", locale)); + lore.add(ChatColor.WHITE + Locale.get("message.recipe.5", locale)); + meta.setLore(lore); + blank.setItemMeta(meta); + for (int i = 0; i < 27; i++) { + recipeInventory.setItem(i, blank); + } + for (int x = 0; x < 3; x++) { + for (int y = 0; y < 3; y++) { + int i = x + y * 9; + ItemStack it = item.recipe.get(x + y * 3); + if (it != null) + recipeInventory.setItem(i, it); + else + recipeInventory.setItem(i, null); + } + } + } + item.setRecipeChance(chance); + player.openInventory(recipeInventory); + Events.recipeWindows.put(player.getName(), item.getID()); + } else { + sender.sendMessage(ChatColor.RED + Locale.get("message.error.only.player", locale)); + } + } + + @CommandString("rpgitem $n[] drop $e[org.bukkit.entity.EntityType]") + @CommandDocumentation("$command.rpgitem.drop") + @CommandGroup("item_drop") + public void getItemDropChance(CommandSender sender, RPGItem item, EntityType type) { + String locale = Locale.getPlayerLocale((Player) sender); + sender.sendMessage(String.format(ChatColor.AQUA + Locale.get("message.drop.get", locale), item.getDisplay() + ChatColor.AQUA, type.toString().toLowerCase(), item.dropChances.get(type.toString()))); + } + + @CommandString("rpgitem $n[] drop $e[org.bukkit.entity.EntityType] $chance:f[]") + @CommandDocumentation("$command.rpgitem.drop.set") + @CommandGroup("item_drop") + public void setItemDropChance(CommandSender sender, RPGItem item, EntityType type, double chance) { + String locale = Locale.getPlayerLocale((Player) sender); + chance = Math.min(chance, 100.0); + String typeS = type.toString(); + if (chance > 0) { + item.dropChances.put(typeS, chance); + if (!Events.drops.containsKey(typeS)) { + Events.drops.put(typeS, new HashSet()); + } + Set set = Events.drops.get(typeS); + set.add(item.getID()); + } else { + item.dropChances.remove(typeS); + if (Events.drops.containsKey(typeS)) { + Set set = Events.drops.get(typeS); + set.remove(item.getID()); + } + } + ItemManager.save(Plugin.plugin); + sender.sendMessage(String.format(ChatColor.AQUA + Locale.get("message.drop.set", locale), item.getDisplay() + ChatColor.AQUA, typeS.toLowerCase(), item.dropChances.get(typeS))); + } + + @CommandString("rpgitem $n[] durability $durability:i[]") + @CommandDocumentation("$command.rpgitem.durability") + @CommandGroup("item_durability") + public void setItemDurability(CommandSender sender, RPGItem item, int newValue) { + String locale = Locale.getPlayerLocale((Player) sender); + item.setMaxDurability(newValue); + ItemManager.save(Plugin.plugin); + sender.sendMessage(Locale.get("message.durability.change", locale)); + } + + @CommandString("rpgitem $n[] durability infinite") + @CommandDocumentation("$command.rpgitem.durability.infinite") + @CommandGroup("item_durability") + public void setItemDurabilityInfinite(CommandSender sender, RPGItem item) { + String locale = Locale.getPlayerLocale((Player) sender); + item.setMaxDurability(-1); + ItemManager.save(Plugin.plugin); + sender.sendMessage(Locale.get("message.durability.change", locale)); + } + + @CommandString("rpgitem $n[] durability togglebar") + @CommandDocumentation("$command.rpgitem.durability.togglebar") + @CommandGroup("item_durability") + public void toggleItemDurabilityBar(CommandSender sender, RPGItem item) { + String locale = Locale.getPlayerLocale((Player) sender); + item.toggleBar(); + ItemManager.save(Plugin.plugin); + sender.sendMessage(Locale.get("message.durability.toggle", locale)); + } + + @CommandString("rpgitem $n[] permission $permission:s[] $haspermission:s[]") + @CommandDocumentation("$command.rpgitem.permission") + @CommandGroup("item_permission") + public void setPermission(CommandSender sender, RPGItem item, String permission, String haspermission) { + String locale = Locale.getPlayerLocale((Player) sender); + boolean enabled = false; + if(haspermission.equalsIgnoreCase("true")){ + enabled = true; + }else if(haspermission.equalsIgnoreCase("false")){ + enabled = false; + }else{ + sender.sendMessage(Locale.get("message.permission.booleanerror", locale)); + } + item.setPermission(permission); + item.setHaspermission(enabled); + ItemManager.save(Plugin.plugin); + sender.sendMessage(Locale.get("message.permission.success", locale)); + } +} diff --git a/src/think/rpgitems/Plugin.java b/src/think/rpgitems/Plugin.java new file mode 100644 index 00000000..2cb5fdf4 --- /dev/null +++ b/src/think/rpgitems/Plugin.java @@ -0,0 +1,203 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.util.List; +import java.util.logging.Logger; + +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.configuration.InvalidConfigurationException; +import org.bukkit.configuration.file.FileConfiguration; +import org.bukkit.configuration.file.YamlConfiguration; +import org.bukkit.plugin.java.JavaPlugin; + +import think.rpgitems.commands.Commands; +import think.rpgitems.config.ConfigUpdater; +import think.rpgitems.data.Font; +import think.rpgitems.data.Locale; +import think.rpgitems.item.ItemManager; +import think.rpgitems.power.Power; +import think.rpgitems.power.PowerArrow; +import think.rpgitems.power.PowerCommand; +import think.rpgitems.power.PowerConsume; +import think.rpgitems.power.PowerFireball; +import think.rpgitems.power.PowerFlame; +import think.rpgitems.power.PowerFood; +import think.rpgitems.power.PowerIce; +import think.rpgitems.power.PowerKnockup; +import think.rpgitems.power.PowerLifeSteal; +import think.rpgitems.power.PowerLightning; +import think.rpgitems.power.PowerPotionHit; +import think.rpgitems.power.PowerPotionSelf; +import think.rpgitems.power.PowerPotionTick; +import think.rpgitems.power.PowerRainbow; +import think.rpgitems.power.PowerRumble; +import think.rpgitems.power.PowerRush; +import think.rpgitems.power.PowerSkyHook; +import think.rpgitems.power.PowerTNTCannon; +import think.rpgitems.power.PowerTeleport; +import think.rpgitems.power.PowerTicker; +import think.rpgitems.power.PowerUnbreakable; +import think.rpgitems.power.PowerUnbreaking; +import think.rpgitems.support.WorldGuard; + +@SuppressWarnings("deprecation") +public class Plugin extends JavaPlugin { + + public static Logger logger = Logger.getLogger("RPGItems"); + + public static Plugin plugin; + + @Override + public void onLoad() { + plugin = this; + reloadConfig(); + Font.load(); + Power.powers.put("arrow", PowerArrow.class); + Power.powers.put("tntcannon", PowerTNTCannon.class); + Power.powers.put("rainbow", PowerRainbow.class); + Power.powers.put("flame", PowerFlame.class); + Power.powers.put("lightning", PowerLightning.class); + Power.powers.put("command", PowerCommand.class); + Power.powers.put("potionhit", PowerPotionHit.class); + Power.powers.put("teleport", PowerTeleport.class); + Power.powers.put("fireball", PowerFireball.class); + Power.powers.put("ice", PowerIce.class); + Power.powers.put("knockup", PowerKnockup.class); + Power.powers.put("rush", PowerRush.class); + Power.powers.put("potionself", PowerPotionSelf.class); + Power.powers.put("consume", PowerConsume.class); + Power.powers.put("unbreakable", PowerUnbreakable.class); + Power.powers.put("unbreaking", PowerUnbreaking.class); + Power.powers.put("rumble", PowerRumble.class); + Power.powers.put("skyhook", PowerSkyHook.class); + Power.powers.put("potiontick", PowerPotionTick.class); + Power.powers.put("food", PowerFood.class); + Power.powers.put("lifesteal", PowerLifeSteal.class); + } + + @Override + public void onEnable() { + Locale.init(this); + updateConfig(); + WorldGuard.init(this); + ConfigurationSection conf = getConfig(); + if (conf.getBoolean("autoupdate", true)) { + new Updater(this, 70226, this.getFile(), Updater.UpdateType.DEFAULT, false); + } + if (conf.getBoolean("localeInv", false)) { + Events.useLocaleInv = true; + } + getServer().getPluginManager().registerEvents(new Events(), this); + ItemManager.load(this); + Commands.register(new Handler()); + Commands.register(new PowerHandler()); + new PowerTicker().runTaskTimer(this, 0, 1); + } + + @Override + public void saveConfig() { + FileConfiguration config = getConfig(); + FileOutputStream out = null; + try { + File f = new File(getDataFolder(), "config.yml"); + if (!f.exists()) + f.createNewFile(); + out = new FileOutputStream(f); + out.write(config.saveToString().getBytes("UTF-8")); + } catch (FileNotFoundException e) { + } catch (UnsupportedEncodingException e) { + } catch (IOException e) { + } finally { + try { + if (out != null) + out.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + public static FileConfiguration config; + + @Override + public void reloadConfig() { + FileInputStream in = null; + config = new YamlConfiguration(); + try { + File f = new File(getDataFolder(), "config.yml"); + in = new FileInputStream(f); + byte[] data = new byte[(int) f.length()]; + in.read(data); + String str = new String(data, "UTF-8"); + config.loadFromString(str); + } catch (FileNotFoundException e) { + } catch (IOException e) { + } catch (InvalidConfigurationException e) { + } finally { + try { + if (in != null) + in.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + } + + public FileConfiguration getConfig() { + return config; + } + + public void updateConfig() { + ConfigUpdater.updateConfig(getConfig()); + saveConfig(); + } + + @Override + public void onDisable() { + } + + @Override + public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { + StringBuilder out = new StringBuilder(); + out.append(label).append(' '); + for (String arg : args) + out.append(arg).append(' '); + Commands.exec(sender, out.toString()); + return true; + } + + @Override + public List onTabComplete(CommandSender sender, Command command, String alias, String[] args) { + StringBuilder out = new StringBuilder(); + out.append(alias).append(' '); + for (String arg : args) + out.append(arg).append(' '); + return Commands.complete(sender, out.toString()); + } +} diff --git a/src/think/rpgitems/PowerHandler.java b/src/think/rpgitems/PowerHandler.java new file mode 100644 index 00000000..66e1ce64 --- /dev/null +++ b/src/think/rpgitems/PowerHandler.java @@ -0,0 +1,478 @@ +package think.rpgitems; + +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.potion.PotionEffectType; + +import think.rpgitems.commands.CommandDocumentation; +import think.rpgitems.commands.CommandGroup; +import think.rpgitems.commands.CommandHandler; +import think.rpgitems.commands.CommandString; +import think.rpgitems.data.Locale; +import think.rpgitems.item.ItemManager; +import think.rpgitems.item.RPGItem; +import think.rpgitems.power.PowerArrow; +import think.rpgitems.power.PowerCommand; +import think.rpgitems.power.PowerConsume; +import think.rpgitems.power.PowerFireball; +import think.rpgitems.power.PowerFlame; +import think.rpgitems.power.PowerFood; +import think.rpgitems.power.PowerIce; +import think.rpgitems.power.PowerKnockup; +import think.rpgitems.power.PowerLifeSteal; +import think.rpgitems.power.PowerLightning; +import think.rpgitems.power.PowerPotionHit; +import think.rpgitems.power.PowerPotionSelf; +import think.rpgitems.power.PowerPotionTick; +import think.rpgitems.power.PowerRainbow; +import think.rpgitems.power.PowerRumble; +import think.rpgitems.power.PowerSkyHook; +import think.rpgitems.power.PowerTNTCannon; +import think.rpgitems.power.PowerTeleport; +import think.rpgitems.power.PowerUnbreakable; +import think.rpgitems.power.PowerUnbreaking; + +public class PowerHandler implements CommandHandler { + + @CommandString("rpgitem $n[] power arrow") + @CommandDocumentation("$command.rpgitem.arrow") + @CommandGroup("item_power_arrow") + public void arrow(CommandSender sender, RPGItem item) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerArrow pow = new PowerArrow(); + pow.cooldownTime = 20; + pow.item = item; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power arrow $cooldown:i[]") + @CommandDocumentation("$command.rpgitem.arrow.full") + @CommandGroup("item_power_arrow") + public void arrow(CommandSender sender, RPGItem item, int cooldown) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerArrow pow = new PowerArrow(); + pow.item = item; + pow.cooldownTime = cooldown; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power command $cooldown:i[] $o[left,right] $display:s[] $command:s[]") + @CommandDocumentation("$command.rpgitem.command") + @CommandGroup("item_power_command_b") + public void command(CommandSender sender, RPGItem item, int cooldown, String mouse, String displayText, String command) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerCommand com = new PowerCommand(); + com.cooldownTime = cooldown; + command = command.trim(); + if (command.charAt(0) == '/') { + command = command.substring(1); + } + com.isRight = mouse.equals("right"); + com.display = displayText; + com.command = command; + com.item = item; + item.addPower(com); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power command $cooldown:i[] $o[left,right] $display:s[] $command:s[] $permission:s[]") + @CommandDocumentation("$command.rpgitem.command.full") + @CommandGroup("item_power_command_a") + public void command(CommandSender sender, RPGItem item, int cooldown, String mouse, String displayText, String command, String permission) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerCommand com = new PowerCommand(); + com.cooldownTime = cooldown; + command = command.trim(); + if (command.charAt(0) == '/') { + command = command.substring(1); + } + com.isRight = mouse.equals("right"); + com.display = displayText; + com.command = command; + com.permission = permission; + com.item = item; + item.addPower(com); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power command $cooldown:i[] $o[left,right] $details:s[]") + @CommandDocumentation("$command.rpgitem.command.old") + @CommandGroup("item_power_command_c") + public void command(CommandSender sender, RPGItem item, int cooldown, String mouse, String details) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + String[] pArgs = details.split("\\|"); + if (pArgs.length < 2) { + sender.sendMessage(ChatColor.RED + Locale.get("message.error.command.format", locale)); + return; + } + String display = pArgs[0].trim(); + String command = pArgs[1].trim(); + if (command.charAt(0) == '/') { + command = command.substring(1); + } + String permission = ""; + if (pArgs.length > 2) { + permission = pArgs[2].trim(); + } + + PowerCommand com = new PowerCommand(); + com.cooldownTime = cooldown; + + com.isRight = mouse.equals("right"); + com.item = item; + com.display = display; + com.command = command; + com.permission = permission; + + item.addPower(com); + item.rebuild(); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power consume") + @CommandDocumentation("$command.rpgitem.consume") + @CommandGroup("item_power_consume") + public void consume(CommandSender sender, RPGItem item) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerConsume pow = new PowerConsume(); + pow.item = item; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power fireball") + @CommandDocumentation("$command.rpgitem.fireball") + @CommandGroup("item_power_fireball") + public void fireball(CommandSender sender, RPGItem item) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerFireball pow = new PowerFireball(); + pow.cooldownTime = 20; + pow.item = item; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power fireball $cooldown:i[]") + @CommandDocumentation("$command.rpgitem.fireball.full") + @CommandGroup("item_power_fireball") + public void fireball(CommandSender sender, RPGItem item, int cooldown) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerFireball pow = new PowerFireball(); + pow.item = item; + pow.cooldownTime = cooldown; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power flame") + @CommandDocumentation("$command.rpgitem.flame") + @CommandGroup("item_power_flame") + public void flame(CommandSender sender, RPGItem item) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerFlame pow = new PowerFlame(); + pow.burnTime = 20; + pow.item = item; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power flame $burntime:i[]") + @CommandDocumentation("$command.rpgitem.flame.full") + @CommandGroup("item_power_flame") + public void flame(CommandSender sender, RPGItem item, int burnTime) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerFlame pow = new PowerFlame(); + pow.item = item; + pow.burnTime = burnTime; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power lifesteal $chance:i[]") + @CommandDocumentation("$command.rpgitem.lifesteal") + @CommandGroup("item_power_lifesteal") + public void lifsteal(CommandSender sender, RPGItem item, int chance) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerLifeSteal pow = new PowerLifeSteal(); + pow.item = item; + pow.chance = chance; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power ice") + @CommandDocumentation("$command.rpgitem.ice") + @CommandGroup("item_power_ice") + public void ice(CommandSender sender, RPGItem item) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerIce pow = new PowerIce(); + pow.cooldownTime = 20; + pow.item = item; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power ice $cooldown:i[]") + @CommandDocumentation("$command.rpgitem.ice.full") + @CommandGroup("item_power_ice") + public void ice(CommandSender sender, RPGItem item, int cooldown) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerIce pow = new PowerIce(); + pow.item = item; + pow.cooldownTime = cooldown; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power knockup") + @CommandDocumentation("$command.rpgitem.knockup") + @CommandGroup("item_power_knockup") + public void knockup(CommandSender sender, RPGItem item) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerKnockup pow = new PowerKnockup(); + pow.item = item; + pow.chance = 20; + pow.power = 2; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power knockup $chance:i[] $power:f[]") + @CommandDocumentation("$command.rpgitem.knockup.full") + @CommandGroup("item_power_knockup") + public void knockup(CommandSender sender, RPGItem item, int chance, double power) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerKnockup pow = new PowerKnockup(); + pow.item = item; + pow.chance = chance; + pow.power = power; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power lightning") + @CommandDocumentation("$command.rpgitem.lightning") + @CommandGroup("item_power_lightning") + public void lightning(CommandSender sender, RPGItem item) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerLightning pow = new PowerLightning(); + pow.item = item; + pow.chance = 20; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power lightning $chance:i[]") + @CommandDocumentation("$command.rpgitem.lightning.full") + @CommandGroup("item_power_lightning") + public void lightning(CommandSender sender, RPGItem item, int chance) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerLightning pow = new PowerLightning(); + pow.item = item; + pow.chance = chance; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power potionhit $chance:i[] $duration:i[] $amplifier:i[] $effect:s[]") + @CommandDocumentation("$command.rpgitem.potionhit+PotionEffectType") + @CommandGroup("item_power_potionhit") + public void potionhit(CommandSender sender, RPGItem item, int chance, int duration, int amplifier, String effect) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerPotionHit pow = new PowerPotionHit(); + pow.item = item; + pow.chance = chance; + pow.duration = duration; + pow.amplifier = amplifier; + pow.type = PotionEffectType.getByName(effect); + if (pow.type == null) { + sender.sendMessage(ChatColor.RED + String.format(Locale.get("message.error.effect", locale), effect)); + return; + } + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power potionself $cooldown:i[] $duration:i[] $amplifier:i[] $effect:s[]") + @CommandDocumentation("$command.rpgitem.potionself+PotionEffectType") + @CommandGroup("item_power_potionself") + public void potionself(CommandSender sender, RPGItem item, int ccoldown, int duration, int amplifier, String effect) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerPotionSelf pow = new PowerPotionSelf(); + pow.item = item; + pow.cooldownTime = ccoldown; + pow.time = duration; + pow.amplifier = amplifier; + pow.type = PotionEffectType.getByName(effect); + if (pow.type == null) { + sender.sendMessage(ChatColor.RED + String.format(Locale.get("message.error.effect", locale), effect)); + return; + } + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power rainbow") + @CommandDocumentation("$command.rpgitem.rainbow") + @CommandGroup("item_power_rainbow") + public void rainbow(CommandSender sender, RPGItem item) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerRainbow pow = new PowerRainbow(); + pow.cooldownTime = 20; + pow.count = 5; + pow.item = item; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power rainbow $cooldown:i[] $count:i[]") + @CommandDocumentation("$command.rpgitem.rainbow.full") + @CommandGroup("item_power_rainbow") + public void rainbow(CommandSender sender, RPGItem item, int cooldown, int count) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerRainbow pow = new PowerRainbow(); + pow.cooldownTime = cooldown; + pow.count = count; + pow.item = item; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power rumble $cooldown:i[] $power:i[] $distance:i[]") + @CommandDocumentation("$command.rpgitem.rumble") + @CommandGroup("item_power_rumble") + public void rumble(CommandSender sender, RPGItem item, int cooldown, int power, int distance) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerRumble pow = new PowerRumble(); + pow.item = item; + pow.cooldownTime = cooldown; + pow.power = power; + pow.distance = distance; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power teleport") + @CommandDocumentation("$command.rpgitem.teleport") + @CommandGroup("item_power_teleport") + public void teleport(CommandSender sender, RPGItem item) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerTeleport pow = new PowerTeleport(); + pow.item = item; + pow.cooldownTime = 20; + pow.distance = 5; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power teleport $cooldown:i[] $distance:i[]") + @CommandDocumentation("$command.rpgitem.teleport.full") + @CommandGroup("item_power_teleport") + public void teleport(CommandSender sender, RPGItem item, int cooldown, int distance) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerTeleport pow = new PowerTeleport(); + pow.item = item; + pow.cooldownTime = cooldown; + pow.distance = distance; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power tntcannon") + @CommandDocumentation("$command.rpgitem.tntcannon") + @CommandGroup("item_power_tntcannon") + public void tntcannon(CommandSender sender, RPGItem item) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerTNTCannon pow = new PowerTNTCannon(); + pow.item = item; + pow.cooldownTime = 20; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power tntcannon $cooldown:i[]") + @CommandDocumentation("$command.rpgitem.tntcannon.full") + @CommandGroup("item_power_tntcannon") + public void tntcannon(CommandSender sender, RPGItem item, int cooldown) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerTNTCannon pow = new PowerTNTCannon(); + pow.item = item; + pow.cooldownTime = cooldown; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power skyhook $m[] $distance:i[]") + @CommandDocumentation("$command.rpgitem.skyhook") + @CommandGroup("item_power_skyhook") + public void skyHook(CommandSender sender, RPGItem item, Material material, int distance) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerSkyHook pow = new PowerSkyHook(); + pow.item = item; + pow.railMaterial = material; + pow.hookDistance = distance; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + + @CommandString("rpgitem $n[] power potiontick $amplifier:i[] $effect:s[]") + @CommandDocumentation("$command.rpgitem.potiontick") + @CommandGroup("item_power_potiontick") + public void potionTick(CommandSender sender, RPGItem item, int amplifier, String effect) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerPotionTick pow = new PowerPotionTick(); + pow.item = item; + pow.amplifier = amplifier; + pow.effect = PotionEffectType.getByName(effect); + if (pow.effect == null) { + sender.sendMessage(ChatColor.RED + String.format(Locale.get("message.error.effect", locale), effect)); + return; + } + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } + @CommandString("rpgitem $n[] power food $foodpoints:i[]") + @CommandDocumentation("$command.rpgitem.food") + @CommandGroup("item_power_food") + public void food(CommandSender sender, RPGItem item, int foodpoints) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + PowerFood pow = new PowerFood(); + pow.item = item; + pow.foodpoints = foodpoints; + item.addPower(pow); + ItemManager.save(Plugin.plugin); + sender.sendMessage(ChatColor.AQUA + Locale.get("message.power.ok", locale)); + } +} diff --git a/src/think/rpgitems/Updater.java b/src/think/rpgitems/Updater.java new file mode 100644 index 00000000..5be7d625 --- /dev/null +++ b/src/think/rpgitems/Updater.java @@ -0,0 +1,515 @@ +/* +* Updater for Bukkit. +* +* This class provides the means to safely and easily update a plugin, or check to see if it is updated using dev.bukkit.org +*/ + +package think.rpgitems; + +import java.io.*; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; +import java.util.Enumeration; +import java.util.zip.ZipEntry; +import java.util.zip.ZipFile; + +import org.bukkit.configuration.file.YamlConfiguration; +import org.bukkit.plugin.Plugin; +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.json.simple.JSONValue; + +/** +* Check dev.bukkit.org to find updates for a given plugin, and download the updates if needed. +*

+* VERY, VERY IMPORTANT: Because there are no standards for adding auto-update toggles in your plugin's config, this system provides NO CHECK WITH YOUR CONFIG to make sure the user has allowed auto-updating. +*
+* It is a BUKKIT POLICY that you include a boolean value in your config that prevents the auto-updater from running AT ALL. +*
+* If you fail to include this option in your config, your plugin will be REJECTED when you attempt to submit it to dev.bukkit.org. +*

+* An example of a good configuration option would be something similar to 'auto-update: true' - if this value is set to false you may NOT run the auto-updater. +*
+* If you are unsure about these rules, please read the plugin submission guidelines: http://goo.gl/8iU5l +* +* @author Gravity +* @version 2.0 +*/ + +public class Updater { + + private Plugin plugin; + private UpdateType type; + private String versionName; + private String versionLink; + private String versionType; + private String versionGameVersion; + + private boolean announce; // Whether to announce file downloads + + private URL url; // Connecting to RSS + private File file; // The plugin's file + private Thread thread; // Updater thread + + private int id = -1; // Project's Curse ID + private String apiKey = null; // BukkitDev ServerMods API key + private static final String TITLE_VALUE = "name"; // Gets remote file's title + private static final String LINK_VALUE = "downloadUrl"; // Gets remote file's download link + private static final String TYPE_VALUE = "releaseType"; // Gets remote file's release type + private static final String VERSION_VALUE = "gameVersion"; // Gets remote file's build version + private static final String QUERY = "/servermods/files?projectIds="; // Path to GET + private static final String HOST = "https://api.curseforge.com"; // Slugs will be appended to this to get to the project's RSS feed + + private static final String[] NO_UPDATE_TAG = { "-DEV", "-PRE", "-SNAPSHOT" }; // If the version number contains one of these, don't update. + private static final int BYTE_SIZE = 1024; // Used for downloading files + private YamlConfiguration config; // Config file + private String updateFolder;// The folder that downloads will be placed in + private Updater.UpdateResult result = Updater.UpdateResult.SUCCESS; // Used for determining the outcome of the update process + + /** +* Gives the dev the result of the update process. Can be obtained by called getResult(). +*/ + public enum UpdateResult { + /** +* The updater found an update, and has readied it to be loaded the next time the server restarts/reloads. +*/ + SUCCESS, + /** +* The updater did not find an update, and nothing was downloaded. +*/ + NO_UPDATE, + /** +* The server administrator has disabled the updating system +*/ + DISABLED, + /** +* The updater found an update, but was unable to download it. +*/ + FAIL_DOWNLOAD, + /** +* For some reason, the updater was unable to contact dev.bukkit.org to download the file. +*/ + FAIL_DBO, + /** +* When running the version check, the file on DBO did not contain the a version in the format 'vVersion' such as 'v1.0'. +*/ + FAIL_NOVERSION, + /** +* The id provided by the plugin running the updater was invalid and doesn't exist on DBO. +*/ + FAIL_BADID, + /** +* The server administrator has improperly configured their API key in the configuration +*/ + FAIL_APIKEY, + /** +* The updater found an update, but because of the UpdateType being set to NO_DOWNLOAD, it wasn't downloaded. +*/ + UPDATE_AVAILABLE + } + + /** +* Allows the dev to specify the type of update that will be run. +*/ + public enum UpdateType { + /** +* Run a version check, and then if the file is out of date, download the newest version. +*/ + DEFAULT, + /** +* Don't run a version check, just find the latest update and download it. +*/ + NO_VERSION_CHECK, + /** +* Get information about the version and the download size, but don't actually download anything. +*/ + NO_DOWNLOAD + } + + /** +* Initialize the updater +* +* @param plugin The plugin that is checking for an update. +* @param id The dev.bukkit.org id of the project +* @param file The file that the plugin is running from, get this by doing this.getFile() from within your main class. +* @param type Specify the type of update this will be. See {@link UpdateType} +* @param announce True if the program should announce the progress of new updates in console +*/ + public Updater(Plugin plugin, int id, File file, UpdateType type, boolean announce) { + this.plugin = plugin; + this.type = type; + this.announce = announce; + this.file = file; + this.id = id; + this.updateFolder = plugin.getServer().getUpdateFolder(); + + final File pluginFile = plugin.getDataFolder().getParentFile(); + final File updaterFile = new File(pluginFile, "Updater"); + final File updaterConfigFile = new File(updaterFile, "config.yml"); + + if (!updaterFile.exists()) { + updaterFile.mkdir(); + } + if (!updaterConfigFile.exists()) { + try { + updaterConfigFile.createNewFile(); + } catch (final IOException e) { + plugin.getLogger().severe("The updater could not create a configuration in " + updaterFile.getAbsolutePath()); + e.printStackTrace(); + } + } + this.config = YamlConfiguration.loadConfiguration(updaterConfigFile); + + this.config.options().header("This configuration file affects all plugins using the Updater system (version 2+ - http://forums.bukkit.org/threads/96681/ )" + '\n' + + "If you wish to use your API key, read http://wiki.bukkit.org/ServerMods_API and place it below." + '\n' + + "Some updating systems will not adhere to the disabled value, but these may be turned off in their plugin's configuration."); + this.config.addDefault("api-key", "PUT_API_KEY_HERE"); + this.config.addDefault("disable", false); + + if (this.config.get("api-key", null) == null) { + this.config.options().copyDefaults(true); + try { + this.config.save(updaterConfigFile); + } catch (final IOException e) { + plugin.getLogger().severe("The updater could not save the configuration in " + updaterFile.getAbsolutePath()); + e.printStackTrace(); + } + } + + if (this.config.getBoolean("disable")) { + this.result = UpdateResult.DISABLED; + return; + } + + String key = this.config.getString("api-key"); + if (key.equalsIgnoreCase("PUT_API_KEY_HERE") || key.equals("")) { + key = null; + } + + this.apiKey = key; + + try { + this.url = new URL(Updater.HOST + Updater.QUERY + id); + } catch (final MalformedURLException e) { + plugin.getLogger().severe("The project ID provided for updating, " + id + " is invalid."); + this.result = UpdateResult.FAIL_BADID; + e.printStackTrace(); + } + + this.thread = new Thread(new UpdateRunnable()); + this.thread.start(); + } + + /** +* Get the result of the update process. +*/ + public Updater.UpdateResult getResult() { + this.waitForThread(); + return this.result; + } + + /** +* Get the latest version's release type (release, beta, or alpha). +*/ + public String getLatestType() { + this.waitForThread(); + return this.versionType; + } + + /** +* Get the latest version's game version. +*/ + public String getLatestGameVersion() { + this.waitForThread(); + return this.versionGameVersion; + } + + /** +* Get the latest version's name. +*/ + public String getLatestName() { + this.waitForThread(); + return this.versionName; + } + + /** +* Get the latest version's file link. +*/ + public String getLatestFileLink() { + this.waitForThread(); + return this.versionLink; + } + + /** +* As the result of Updater output depends on the thread's completion, it is necessary to wait for the thread to finish +* before allowing anyone to check the result. +*/ + private void waitForThread() { + if ((this.thread != null) && this.thread.isAlive()) { + try { + this.thread.join(); + } catch (final InterruptedException e) { + e.printStackTrace(); + } + } + } + + /** +* Save an update from dev.bukkit.org into the server's update folder. +*/ + private void saveFile(File folder, String file, String u) { + if (!folder.exists()) { + folder.mkdir(); + } + BufferedInputStream in = null; + FileOutputStream fout = null; + try { + // Download the file + final URL url = new URL(u); + final int fileLength = url.openConnection().getContentLength(); + in = new BufferedInputStream(url.openStream()); + fout = new FileOutputStream(folder.getAbsolutePath() + "/" + file); + + final byte[] data = new byte[Updater.BYTE_SIZE]; + int count; + if (this.announce) { + this.plugin.getLogger().info("About to download a new update: " + this.versionName); + } + long downloaded = 0; + while ((count = in.read(data, 0, Updater.BYTE_SIZE)) != -1) { + downloaded += count; + fout.write(data, 0, count); + final int percent = (int) ((downloaded * 100) / fileLength); + if (this.announce && ((percent % 10) == 0)) { + this.plugin.getLogger().info("Downloading update: " + percent + "% of " + fileLength + " bytes."); + } + } + //Just a quick check to make sure we didn't leave any files from last time... + for (final File xFile : new File(this.plugin.getDataFolder().getParent(), this.updateFolder).listFiles()) { + if (xFile.getName().endsWith(".zip")) { + xFile.delete(); + } + } + // Check to see if it's a zip file, if it is, unzip it. + final File dFile = new File(folder.getAbsolutePath() + "/" + file); + if (dFile.getName().endsWith(".zip")) { + // Unzip + this.unzip(dFile.getCanonicalPath()); + } + if (this.announce) { + this.plugin.getLogger().info("Finished updating."); + } + } catch (final Exception ex) { + this.plugin.getLogger().warning("The auto-updater tried to download a new update, but was unsuccessful."); + this.result = Updater.UpdateResult.FAIL_DOWNLOAD; + } finally { + try { + if (in != null) { + in.close(); + } + if (fout != null) { + fout.close(); + } + } catch (final Exception ex) { + } + } + } + + /** +* Part of Zip-File-Extractor, modified by Gravity for use with Bukkit +*/ + private void unzip(String file) { + try { + final File fSourceZip = new File(file); + final String zipPath = file.substring(0, file.length() - 4); + ZipFile zipFile = new ZipFile(fSourceZip); + Enumeration e = zipFile.entries(); + while (e.hasMoreElements()) { + ZipEntry entry = e.nextElement(); + File destinationFilePath = new File(zipPath, entry.getName()); + destinationFilePath.getParentFile().mkdirs(); + if (entry.isDirectory()) { + continue; + } else { + final BufferedInputStream bis = new BufferedInputStream(zipFile.getInputStream(entry)); + int b; + final byte buffer[] = new byte[Updater.BYTE_SIZE]; + final FileOutputStream fos = new FileOutputStream(destinationFilePath); + final BufferedOutputStream bos = new BufferedOutputStream(fos, Updater.BYTE_SIZE); + while ((b = bis.read(buffer, 0, Updater.BYTE_SIZE)) != -1) { + bos.write(buffer, 0, b); + } + bos.flush(); + bos.close(); + bis.close(); + final String name = destinationFilePath.getName(); + if (name.endsWith(".jar") && this.pluginFile(name)) { + destinationFilePath.renameTo(new File(this.plugin.getDataFolder().getParent(), this.updateFolder + "/" + name)); + } + } + entry = null; + destinationFilePath = null; + } + e = null; + zipFile.close(); + zipFile = null; + + // Move any plugin data folders that were included to the right place, Bukkit won't do this for us. + for (final File dFile : new File(zipPath).listFiles()) { + if (dFile.isDirectory()) { + if (this.pluginFile(dFile.getName())) { + final File oFile = new File(this.plugin.getDataFolder().getParent(), dFile.getName()); // Get current dir + final File[] contents = oFile.listFiles(); // List of existing files in the current dir + for (final File cFile : dFile.listFiles()) // Loop through all the files in the new dir + { + boolean found = false; + for (final File xFile : contents) // Loop through contents to see if it exists + { + if (xFile.getName().equals(cFile.getName())) { + found = true; + break; + } + } + if (!found) { + // Move the new file into the current dir + cFile.renameTo(new File(oFile.getCanonicalFile() + "/" + cFile.getName())); + } else { + // This file already exists, so we don't need it anymore. + cFile.delete(); + } + } + } + } + dFile.delete(); + } + new File(zipPath).delete(); + fSourceZip.delete(); + } catch (final IOException ex) { + this.plugin.getLogger().warning("The auto-updater tried to unzip a new update file, but was unsuccessful."); + this.result = Updater.UpdateResult.FAIL_DOWNLOAD; + ex.printStackTrace(); + } + new File(file).delete(); + } + + /** +* Check if the name of a jar is one of the plugins currently installed, used for extracting the correct files out of a zip. +*/ + private boolean pluginFile(String name) { + for (final File file : new File("plugins").listFiles()) { + if (file.getName().equals(name)) { + return true; + } + } + return false; + } + + /** +* Check to see if the program should continue by evaluation whether the plugin is already updated, or shouldn't be updated +*/ + private boolean versionCheck(String title) { + if (this.type != UpdateType.NO_VERSION_CHECK) { + final String version = this.plugin.getDescription().getVersion(); + if (title.split(" v").length == 2) { + final String remoteVersion = title.split(" v")[1].split(" ")[0]; // Get the newest file's version number + + if (this.hasTag(version) || version.equalsIgnoreCase(remoteVersion)) { + // We already have the latest version, or this build is tagged for no-update + this.result = Updater.UpdateResult.NO_UPDATE; + return false; + } + } else { + // The file's name did not contain the string 'vVersion' + final String authorInfo = this.plugin.getDescription().getAuthors().size() == 0 ? "" : " (" + this.plugin.getDescription().getAuthors().get(0) + ")"; + this.plugin.getLogger().warning("The author of this plugin" + authorInfo + " has misconfigured their Auto Update system"); + this.plugin.getLogger().warning("File versions should follow the format 'PluginName vVERSION'"); + this.plugin.getLogger().warning("Please notify the author of this error."); + this.result = Updater.UpdateResult.FAIL_NOVERSION; + return false; + } + } + return true; + } + + /** +* Evaluate whether the version number is marked showing that it should not be updated by this program +*/ + private boolean hasTag(String version) { + for (final String string : Updater.NO_UPDATE_TAG) { + if (version.contains(string)) { + return true; + } + } + return false; + } + + private boolean read() { + try { + final URLConnection conn = this.url.openConnection(); + conn.setConnectTimeout(5000); + + if (this.apiKey != null) { + conn.addRequestProperty("X-API-Key", this.apiKey); + } + conn.addRequestProperty("User-Agent", "Updater (by Gravity)"); + + conn.setDoOutput(true); + + final BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream())); + final String response = reader.readLine(); + + final JSONArray array = (JSONArray) JSONValue.parse(response); + + if (array.size() == 0) { + this.plugin.getLogger().warning("The updater could not find any files for the project id " + this.id); + this.result = UpdateResult.FAIL_BADID; + return false; + } + + this.versionName = (String) ((JSONObject) array.get(array.size() - 1)).get(Updater.TITLE_VALUE); + this.versionLink = (String) ((JSONObject) array.get(array.size() - 1)).get(Updater.LINK_VALUE); + this.versionType = (String) ((JSONObject) array.get(array.size() - 1)).get(Updater.TYPE_VALUE); + this.versionGameVersion = (String) ((JSONObject) array.get(array.size() - 1)).get(Updater.VERSION_VALUE); + + return true; + } catch (final IOException e) { + if (e.getMessage().contains("HTTP response code: 403")) { + this.plugin.getLogger().warning("dev.bukkit.org rejected the API key provided in plugins/Updater/config.yml"); + this.plugin.getLogger().warning("Please double-check your configuration to ensure it is correct."); + this.result = UpdateResult.FAIL_APIKEY; + } else { + this.plugin.getLogger().warning("The updater could not contact dev.bukkit.org for updating."); + this.plugin.getLogger().warning("If you have not recently modified your configuration and this is the first time you are seeing this message, the site may be experiencing temporary downtime."); + this.result = UpdateResult.FAIL_DBO; + } + e.printStackTrace(); + return false; + } + } + + private class UpdateRunnable implements Runnable { + + @Override + public void run() { + if (Updater.this.url != null) { + // Obtain the results of the project's file feed + if (Updater.this.read()) { + if (Updater.this.versionCheck(Updater.this.versionName)) { + if ((Updater.this.versionLink != null) && (Updater.this.type != UpdateType.NO_DOWNLOAD)) { + String name = Updater.this.file.getName(); + // If it's a zip file, it shouldn't be downloaded as the plugin's name + if (Updater.this.versionLink.endsWith(".zip")) { + final String[] split = Updater.this.versionLink.split("/"); + name = split[split.length - 1]; + } + Updater.this.saveFile(new File(Updater.this.plugin.getDataFolder().getParent(), Updater.this.updateFolder), name, Updater.this.versionLink); + } else { + Updater.this.result = UpdateResult.UPDATE_AVAILABLE; + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/think/rpgitems/api/RPGItems.java b/src/think/rpgitems/api/RPGItems.java new file mode 100644 index 00000000..c82b1e88 --- /dev/null +++ b/src/think/rpgitems/api/RPGItems.java @@ -0,0 +1,20 @@ +package think.rpgitems.api; + +import org.bukkit.inventory.ItemStack; + +import think.rpgitems.item.ItemManager; +import think.rpgitems.item.RPGItem; + +public class RPGItems { + + /** + * If the itemstack is a RPGItem this will return the RPGItem version of the item. + * If the itemstack isn't a RPGItem this will return null. + * + * @param itemstack The item to converted + * @return The RPGItem or null + */ + public RPGItem toRPGItem(ItemStack itemstack) { + return ItemManager.toRPGItem(itemstack); + } +} diff --git a/src/think/rpgitems/commands/CommandDocumentation.java b/src/think/rpgitems/commands/CommandDocumentation.java new file mode 100644 index 00000000..b03e6703 --- /dev/null +++ b/src/think/rpgitems/commands/CommandDocumentation.java @@ -0,0 +1,12 @@ +package think.rpgitems.commands; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.METHOD) +public @interface CommandDocumentation { + String value(); +} diff --git a/src/think/rpgitems/commands/CommandGroup.java b/src/think/rpgitems/commands/CommandGroup.java new file mode 100644 index 00000000..0cfdb44e --- /dev/null +++ b/src/think/rpgitems/commands/CommandGroup.java @@ -0,0 +1,12 @@ +package think.rpgitems.commands; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.METHOD) +public @interface CommandGroup { + String value(); +} diff --git a/src/think/rpgitems/commands/CommandHandler.java b/src/think/rpgitems/commands/CommandHandler.java new file mode 100644 index 00000000..8fc87886 --- /dev/null +++ b/src/think/rpgitems/commands/CommandHandler.java @@ -0,0 +1,5 @@ +package think.rpgitems.commands; + +public interface CommandHandler { + +} diff --git a/src/think/rpgitems/commands/CommandString.java b/src/think/rpgitems/commands/CommandString.java new file mode 100644 index 00000000..39112b4f --- /dev/null +++ b/src/think/rpgitems/commands/CommandString.java @@ -0,0 +1,13 @@ +package think.rpgitems.commands; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.METHOD) +public @interface CommandString { + String value(); + boolean handlePermissions() default false; +} diff --git a/src/think/rpgitems/commands/Commands.java b/src/think/rpgitems/commands/Commands.java new file mode 100644 index 00000000..5aae0261 --- /dev/null +++ b/src/think/rpgitems/commands/Commands.java @@ -0,0 +1,1252 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.commands; + +import gnu.trove.map.hash.TCharObjectHashMap; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.io.UnsupportedEncodingException; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Calendar; +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map.Entry; +import java.util.SimpleTimeZone; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.potion.PotionEffectType; + +import think.rpgitems.Plugin; +import think.rpgitems.data.Locale; +import think.rpgitems.item.ItemManager; +import think.rpgitems.item.RPGItem; + +abstract public class Commands { + private static HashMap> commands = new HashMap>(); + private static TCharObjectHashMap> argTypes = new TCharObjectHashMap>(); + + static { + argTypes.put('s', ArgumentString.class); + argTypes.put('i', ArgumentInteger.class); + argTypes.put('f', ArgumentDouble.class); + argTypes.put('p', ArgumentPlayer.class); + argTypes.put('o', ArgumentOption.class); + argTypes.put('n', ArgumentItem.class); + argTypes.put('m', ArgumentMaterial.class); + argTypes.put('e', ArgumentEnum.class); + } + + public static void exec(CommandSender sender, String com) { + com = com.trim(); + if (com.length() == 0) + return; + String comName; + int pos = com.indexOf(' '); + if (pos == -1) { + comName = com; + } else { + comName = com.substring(0, pos); + } + com = com.substring(pos + 1); + + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player)sender) : "en_GB"; + + ArrayList command = commands.get(comName); + if (command == null) { + sender.sendMessage(ChatColor.RED + String.format(Locale.get("message.error.unknown.command", locale), comName)); + return; + } + + if (pos == -1) { + for (CommandDef c : command) { + if (c.arguments.length == 0) { + try { + if (c.handlePermissions || sender.hasPermission("rpgitem")) + c.method.invoke(c.handler, sender); + else + sender.sendMessage(ChatColor.RED + Locale.get("message.error.permission", locale)); + } catch (IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalArgumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (InvocationTargetException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return; + } + } + // Print usage + if (sender.hasPermission("rpgitem")) { + sender.sendMessage(String.format(ChatColor.GREEN + Locale.get("message.command.usage", locale), comName, Plugin.plugin.getDescription().getVersion())); + for (CommandDef c : command) { + StringBuilder buf = new StringBuilder(); + buf.append(ChatColor.GREEN).append('/').append(comName); + for (CommandArgument a : c.arguments) { + buf.append(' '); + if (a.name.length() != 0) { + buf.append(ChatColor.RED); + buf.append(Locale.get("command.info." + a.name, locale)); + } + buf.append(a.isConst() ? ChatColor.GREEN : ChatColor.GOLD); + buf.append(a.printable(locale)); + } + sender.sendMessage(buf.toString()); + } + sender.sendMessage(ChatColor.GREEN + Locale.get("message.command.info", locale)); + } else + sender.sendMessage(ChatColor.RED + Locale.get("message.error.permission", locale)); + return; + } + ArrayList args = new ArrayList(); + while (true) { + int end; + if (com.length() == 0) { + break; + } + boolean quote = false; + if (com.charAt(0) == '`') { + com = com.substring(1); + end = com.indexOf('`'); + quote = true; + } else { + end = com.indexOf(' '); + } + if (end == -1) { + args.add(com); + } else { + args.add(com.substring(0, end)); + } + if (quote) { + com = com.substring(end + 1); + end = com.indexOf(' '); + } + if (end != -1) { + com = com.substring(end + 1); + } else { + break; + } + } + CommandError lastError = null; + comLoop: for (CommandDef c : command) { + if (c.arguments.length != args.size()) { + if (c.arguments.length != 0 && c.arguments[c.arguments.length - 1] instanceof ArgumentString) { + if (args.size() < c.arguments.length) + continue; + } else { + continue; + } + } + ArrayList outArgs = new ArrayList(); + outArgs.add(sender); + for (int i = 0; i < c.arguments.length; i++) { + CommandArgument a = c.arguments[i]; + if (!a.isConst()) { + if (i == c.arguments.length - 1) { + // Special case for strings so they do not need to be quoted + if (a instanceof ArgumentString) { + StringBuilder joined = new StringBuilder(); + for (int j = i; j < args.size(); j++) { + joined.append(args.get(j)).append(' '); + } + args.set(i, joined.toString().trim()); + } + } + Object res = a.parse(args.get(i), locale); + if (res instanceof CommandError) { + lastError = (CommandError) res; + continue comLoop; + } + outArgs.add(res); + } else { + ArgumentConst cst = (ArgumentConst) a; + if (!cst.value.equals(args.get(i))) { + continue comLoop; + } + } + } + try { + if (c.handlePermissions || sender.hasPermission("rpgitem")) + c.method.invoke(c.handler, outArgs.toArray()); + else + sender.sendMessage(ChatColor.RED + Locale.get("message.error.permission", locale)); + } catch (IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalArgumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (InvocationTargetException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return; + } + if (sender.hasPermission("rpgitem")) { + if (lastError != null) { + sender.sendMessage(ChatColor.RED + String.format(Locale.get("message.error.command", locale), lastError.error)); + } else { + ArrayList consts = new ArrayList(); + comLoop: for (CommandDef c : command) { + for (int i = 0; i < c.arguments.length; i++) { + if (i >= args.size()) + break; + CommandArgument a = c.arguments[i]; + if (!a.isConst()) { + if (i == c.arguments.length - 1) { + // Special case for strings so they do not need to be quoted + if (a instanceof ArgumentString) { + StringBuilder joined = new StringBuilder(); + for (int j = i; j < args.size(); j++) { + joined.append(args.get(j)).append(' '); + } + args.set(i, joined.toString().trim()); + } + } + Object res = a.parse(args.get(i), locale); + if (res instanceof CommandError) { + lastError = (CommandError) res; + continue comLoop; + } + } else { + ArgumentConst cst = (ArgumentConst) a; + if (!cst.value.equals(args.get(i))) { + continue comLoop; + } else { + consts.add(cst.value); + } + } + } + } + StringBuilder search = new StringBuilder(); + for (String term : consts) { + search.append(term).append(' '); + } + searchHelp(sender, search.toString()); + } + } else + sender.sendMessage(ChatColor.RED + Locale.get("message.error.permission", locale)); + } + + public static List complete(CommandSender sender, String com) { + com = com.trim(); + if (com.length() == 0) { + return new ArrayList(); + } + String comName; + int pos = com.indexOf(' '); + if (pos == -1) { + comName = com; + } else { + comName = com.substring(0, pos); + } + com = com.substring(pos + 1); + + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player)sender) : "en_GB"; + + ArrayList command = commands.get(comName); + + if (command == null) { + if (pos == -1) { + ArrayList out = new ArrayList(); + for (String n : commands.keySet()) { + if (n.startsWith(comName)) { + out.add("/" + n); + } + } + return out; + } + return new ArrayList(); + } + ArrayList args = new ArrayList(); + while (true) { + int end; + if (com.length() == 0) { + break; + } + boolean quote = false; + if (com.charAt(0) == '`') { + com = com.substring(1); + end = com.indexOf('`'); + quote = true; + } else { + end = com.indexOf(' '); + } + if (end == -1) { + args.add(com); + } else { + args.add(com.substring(0, end)); + } + if (quote) { + com = com.substring(end + 1); + end = com.indexOf(' '); + } + if (end != -1) { + com = com.substring(end + 1); + } else { + break; + } + } + HashMap out = new HashMap(); + + comLoop: for (CommandDef c : command) { + for (int i = 0; i < c.arguments.length; i++) { + CommandArgument a = c.arguments[i]; + if (i == args.size() - 1) { + List res = a.tabComplete(args.get(i)); + if (res != null) { + for (String s : res) { + out.put(s, true); + } + continue comLoop; + } + } else { + if (!a.isConst()) { + Object res = a.parse(args.get(i), locale); + if (res instanceof CommandError) { + continue comLoop; + } + } else { + ArgumentConst cst = (ArgumentConst) a; + if (!cst.value.equals(args.get(i))) { + continue comLoop; + } + } + } + } + } + ArrayList outList = new ArrayList(); + for (String s : out.keySet()) { + outList.add(s); + } + return outList; + } + + public static void register(CommandHandler handler) { + Method[] methods = handler.getClass().getMethods(); + for (Method method : methods) { + Class[] params = method.getParameterTypes(); + CommandString comString = method.getAnnotation(CommandString.class); + if (comString == null) { + continue; + } + if (params.length == 0 || !params[0].isAssignableFrom(CommandSender.class)) { + throw new RuntimeException("First argument must be CommandSender @ " + method.getName()); + } + add(comString.value(), method, handler); + } + Collection> coms = commands.values(); + for (ArrayList c : coms) { + Collections.sort(c); + } + } + + private static void add(String com, Method method, CommandHandler handler) { + com = com.trim(); + int pos = com.indexOf(' '); + String comName; + if (pos == -1) { + comName = com; + } else { + comName = com.substring(0, pos); + } + + CommandDef def = new CommandDef(); + def.commandString = com; + def.method = method; + def.handler = handler; + Class[] params = method.getParameterTypes(); + if (method.isAnnotationPresent(CommandDocumentation.class)) { + def.documentation = method.getAnnotation(CommandDocumentation.class).value(); + } else { + def.documentation = ""; + } + if (method.isAnnotationPresent(CommandGroup.class)) { + def.sortKey = method.getAnnotation(CommandGroup.class).value(); + } else { + def.sortKey = ""; + } + CommandString comString = method.getAnnotation(CommandString.class); + def.handlePermissions = comString.handlePermissions(); + + if (!commands.containsKey(comName)) { + commands.put(comName, new ArrayList()); + } + commands.get(comName).add(def); + if (pos == -1) { + def.arguments = new CommandArgument[0]; + return; + } + com = com.substring(pos + 1); + ArrayList arguments = new ArrayList(); + int realArgumentsCount = 0; + while (true) { + pos = com.indexOf(' '); + String a; + if (pos == -1) { + a = com; + } else { + a = com.substring(0, pos); + com = com.substring(pos + 1); + } + if (a.charAt(0) == '$') { // Variable + String name = ""; + if (a.contains(":")) { + String[] as = a.split(":"); + name = as[0].substring(1); + a = "$" + as[1]; + } + char t = a.charAt(1); + Class cAT = argTypes.get(t); + if (cAT == null) { + throw new RuntimeException("Invalid command argument type " + t); + } + CommandArgument arg; + try { + arg = cAT.newInstance(); + arg.init(a.substring(3, a.length() - 1)); + if (!params[realArgumentsCount + 1].isAssignableFrom(arg.getType())) { + throw new RuntimeException("Type mismatch for " + method.getName()); + } + arg.name = name; + arguments.add(arg); + realArgumentsCount++; + } catch (Exception e) { + e.printStackTrace(); + } + } else { // Const + arguments.add(new ArgumentConst(a)); + } + if (pos == -1) { + break; + } + } + if (params.length != realArgumentsCount + 1) { + throw new RuntimeException("Argument count mis-match for " + method.getName()); + } + def.arguments = new CommandArgument[arguments.size()]; + arguments.toArray(def.arguments); + } + + static { + register(new CommandHandler() { + + @CommandString("rpgitem help $terms:s[]") + @CommandDocumentation("$command.rpgitem.help") + @CommandGroup("help") + public void help(CommandSender sender, String query) { + searchHelp(sender, query); + } + }); + } + + public static void searchHelp(CommandSender sender, String terms) { + if (terms.equalsIgnoreCase("_genhelp")) { + for (String locale : Locale.getLocales()) { + generateHelp(locale); + } + return; + } + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + sender.sendMessage(ChatColor.GREEN + String.format(Locale.get("message.help.for", locale), terms)); + String[] term = terms.toLowerCase().split(" "); + for (Entry> command : commands.entrySet()) { + for (CommandDef c : command.getValue()) { + int count = 0; + for (String t : term) { + if (c.commandString.toLowerCase().contains(t)) { + count++; + } + } + if (count == term.length) { + StringBuilder buf = new StringBuilder(); + buf.append(ChatColor.GREEN).append(ChatColor.BOLD).append('/').append(command.getKey()); + for (CommandArgument a : c.arguments) { + buf.append(' '); + if (a.name.length() != 0) { + buf.append(ChatColor.RED).append(ChatColor.BOLD); + buf.append(Locale.get("command.info." + a.name, locale)); + } + buf.append(a.isConst() ? ChatColor.GREEN : ChatColor.GOLD).append(ChatColor.BOLD); + buf.append(a.printable(locale)); + } + sender.sendMessage(buf.toString()); + String docStr = c.documentation; + if (docStr.charAt(0) == '$') { + if (docStr.contains("+")) { + String[] dArgs = docStr.split("\\+"); + docStr = Locale.get(dArgs[0].substring(1), locale); + if (dArgs[1].equalsIgnoreCase("PotionEffectType")) { + StringBuilder out = new StringBuilder(); + for (PotionEffectType type : PotionEffectType.values()) { + if (type != null) + out.append(type.getName().toLowerCase()).append(", "); + } + docStr += out.toString(); + } + } else { + docStr = Locale.get(docStr.substring(1), locale); + } + } + docStr = docStr.replaceAll("@", "" + ChatColor.BLUE).replaceAll("#", "" + ChatColor.WHITE); + + StringBuilder docBuf = new StringBuilder(); + char[] chars = docStr.toCharArray(); + docBuf.append(ChatColor.WHITE); + for (int i = 0; i < chars.length; i++) { + char l = chars[i]; + if (l == '&') { + i++; + l = chars[i]; + switch (l) { + case '0': + docBuf.append(ChatColor.BLACK); + break; + case '1': + docBuf.append(ChatColor.DARK_BLUE); + break; + case '2': + docBuf.append(ChatColor.DARK_GREEN); + break; + case '3': + docBuf.append(ChatColor.DARK_AQUA); + break; + case '4': + docBuf.append(ChatColor.DARK_RED); + break; + case '5': + docBuf.append(ChatColor.DARK_PURPLE); + break; + case '6': + docBuf.append(ChatColor.GOLD); + break; + case '7': + docBuf.append(ChatColor.GRAY); + break; + case '8': + docBuf.append(ChatColor.DARK_GRAY); + break; + case '9': + docBuf.append(ChatColor.BLUE); + break; + case 'a': + docBuf.append(ChatColor.GREEN); + break; + case 'b': + docBuf.append(ChatColor.AQUA); + break; + case 'c': + docBuf.append(ChatColor.RED); + break; + case 'd': + docBuf.append(ChatColor.LIGHT_PURPLE); + break; + case 'e': + docBuf.append(ChatColor.YELLOW); + break; + case 'f': + docBuf.append(ChatColor.WHITE); + break; + case 'r': + docBuf.append(ChatColor.WHITE); + break; + } + } else { + docBuf.append(l); + } + } + sender.sendMessage(docBuf.toString()); + } + } + } + } + + private static HashMap getMap() { + HashMap langMap = new HashMap(); + langMap.put("en_US", "English (US)"); + BufferedReader r = null; + try { + r = new BufferedReader(new InputStreamReader(Plugin.plugin.getResource("languages.txt"), "UTF-8")); + String line = null; + while ((line = r.readLine()) != null) { + String []args = line.split("="); + langMap.put(args[0], args[1]); + } + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } finally { + try { + r.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + return langMap; + } + + public static void generateHelp(String locale) { + BufferedWriter w = null; + + HashMap langMap = getMap(); + + try { + File out = new File(Plugin.plugin.getDataFolder(), Calendar.getInstance().get(Calendar.YEAR) + "-" + Calendar.getInstance().get(Calendar.MONTH) + "-" + Calendar.getInstance().get(Calendar.DAY_OF_MONTH) + "-" + locale + ".md"); + if (out.exists()) { + out.delete(); + } + w = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(out), "UTF-8")); + w.write("---\n"); + w.write("layout: locale\n"); + w.write("title: " + langMap.get(locale) + "\n"); + w.write("permalink: " + locale + ".html\n"); + w.write("---\n"); + for (Entry> command : commands.entrySet()) { + w.write(String.format("## Commands /%s ", command.getKey())); + w.write("\n\n"); + for (CommandDef c : command.getValue()) { + StringBuilder buf = new StringBuilder(); + buf.append("### /"); + buf.append(command.getKey()).append(" "); + for (CommandArgument a : c.arguments) { + if (a.name.length() != 0) { + buf.append(""); + buf.append(Locale.get("command.info." + a.name, locale)); + buf.append(""); + } + if (a.isConst()) + buf.append(""); + else + buf.append(""); + buf.append(a.printable(locale)); + buf.append(" "); + } + buf.append("\n"); + String docStr = c.documentation; + if (docStr.charAt(0) == '$') { + if (docStr.contains("+")) { + String[] dArgs = docStr.split("\\+"); + docStr = Locale.get(dArgs[0].substring(1), locale); + if (dArgs[1].equalsIgnoreCase("PotionEffectType")) { + StringBuilder out2 = new StringBuilder(); + for (PotionEffectType type : PotionEffectType.values()) { + if (type != null) + out2.append(type.getName().toLowerCase()).append(", "); + } + docStr += out2.toString(); + } + } else { + docStr = Locale.get(docStr.substring(1), locale); + } + } + docStr = docStr.replaceAll("#", "").replaceAll("@", "").replaceAll("`", "`` ` ``"); + StringBuilder docBuf = new StringBuilder(); + char[] chars = docStr.toCharArray(); + for (int i = 0; i < chars.length; i++) { + char l = chars[i]; + if (l == '&') { + i++; + l = chars[i]; + if (l != 'r') { + docBuf.append(""); + } else { + docBuf.append(l); + } + } + buf.append(docBuf.toString()); + buf.append("\n\n"); + w.write(buf.toString()); + } + } + w.write("\n\n"); + w.write("Generated at: "); + SimpleDateFormat sdf = new SimpleDateFormat(); + sdf.setTimeZone(new SimpleTimeZone(0, "GMT")); + sdf.applyPattern("dd MMM yyyy HH:mm:ss z"); + w.write(sdf.format(new Date())); + + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + w.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } +} + +class CommandDef implements Comparable { + public boolean handlePermissions; + public String commandString; + public CommandHandler handler; + public Method method; + public CommandArgument[] arguments; + public String documentation; + public String sortKey; + + @Override + public int compareTo(CommandDef o) { + return sortKey.compareToIgnoreCase(o.sortKey); + } +} + +abstract class CommandArgument { + public abstract void init(String a); + + public abstract Object parse(String in, String locale); + + public abstract List tabComplete(String in); + + public abstract String printable(String locale); + + public abstract Class getType(); + + public String name = ""; + + public boolean isConst() { + return false; + } +} + +class CommandError { + + public String error; + + public CommandError(String error) { + this.error = error; + } +} + +class ArgumentInteger extends CommandArgument { + + private boolean hasLimits; + private int min; + private int max; + + @Override + public void init(String a) { + if (a.length() == 0) { + hasLimits = false; + } else { + hasLimits = true; + String[] args = a.split(","); + if (args.length != 2) { + throw new RuntimeException("ArgumentInteger limits errror"); + } + min = Integer.parseInt(args[0]); + max = Integer.parseInt(args[1]); + } + } + + @Override + public Object parse(String in, String locale) { + if (hasLimits) { + try { + int i = Integer.parseInt(in); + if (i < min || i > max) { + return new CommandError(String.format(Locale.get("message.error.integer.limit", locale), min, max)); + } + return i; + } catch (NumberFormatException e) { + return new CommandError(String.format(Locale.get("message.error.integer.format", locale), in)); + } + } else { + try { + int i = Integer.parseInt(in); + return i; + } catch (NumberFormatException e) { + return new CommandError(String.format(Locale.get("message.error.integer.format", locale), in)); + } + } + } + + @Override + public List tabComplete(String in) { + return new ArrayList(); + } + + @Override + public String printable(String locale) { + if (hasLimits) { + return String.format(Locale.get("command.info.integer.limit", locale), min, max); + } + return Locale.get("command.info.integer", locale); + } + + @Override + public Class getType() { + return int.class; + } + +} + +class ArgumentDouble extends CommandArgument { + + private boolean hasLimits; + private double min; + private double max; + + @Override + public void init(String a) { + if (a.length() == 0) { + hasLimits = false; + } else { + hasLimits = true; + String[] args = a.split(","); + if (args.length != 2) { + throw new RuntimeException("ArgumentDouble limits errror"); + } + min = Double.parseDouble(args[0]); + max = Double.parseDouble(args[1]); + } + } + + @Override + public Object parse(String in, String locale) { + if (hasLimits) { + try { + double i = Double.parseDouble(in); + if (i < min || i > max) { + return new CommandError(String.format(Locale.get("message.error.double.limit", locale), min, max)); + } + return i; + } catch (NumberFormatException e) { + return new CommandError(String.format(Locale.get("message.error.double.format", locale), in)); + } + } else { + try { + double i = Double.parseDouble(in); + return i; + } catch (NumberFormatException e) { + return new CommandError(String.format(Locale.get("message.error.double.format", locale), in)); + } + } + } + + @Override + public List tabComplete(String in) { + return new ArrayList(); + } + + @Override + public String printable(String locale) { + if (hasLimits) { + return String.format(Locale.get("command.info.double.limit", locale), min, max); + } + return Locale.get("command.info.double", locale); + } + + @Override + public Class getType() { + return double.class; + } + +} + +class ArgumentString extends CommandArgument { + + private int maxLength; + + @Override + public void init(String a) { + if (a.length() == 0) { + maxLength = 0; + } else { + maxLength = Integer.parseInt(a); + } + } + + @Override + public Object parse(String in, String locale) { + if (maxLength != 0 && in.length() > maxLength) + return new CommandError(String.format(Locale.get("message.error.string.length", locale), in, maxLength)); + return in; + } + + @Override + public List tabComplete(String in) { + return new ArrayList(); + } + + @Override + public String printable(String locale) { + if (maxLength != 0) + return String.format(Locale.get("command.info.string.limit", locale), maxLength); + return Locale.get("command.info.string", locale); + } + + @Override + public Class getType() { + return String.class; + } + +} + +class ArgumentConst extends CommandArgument { + + public String value; + + public ArgumentConst(String v) { + value = v; + } + + @Override + public void init(String a) { + throw new RuntimeException("Const cannot be init'ed"); + } + + @Override + public Object parse(String in, String locale) { + return null; + } + + @Override + public List tabComplete(String in) { + ArrayList a = new ArrayList(); + String lValue = value; + if (lValue.startsWith(in)) + a.add(lValue); + return a; + } + + @Override + public String printable(String locale) { + return value; + } + + @Override + public boolean isConst() { + return true; + } + + @Override + public Class getType() { + return null; + } +} + +class ArgumentPlayer extends CommandArgument { + + @Override + public void init(String a) { + } + + @Override + public Object parse(String in, String locale) { + Player player = Bukkit.getPlayer(in); + if (player == null) + return new CommandError(String.format(Locale.get("message.error.player", locale), in)); + return player; + } + + @Override + public List tabComplete(String in) { + List players = Bukkit.matchPlayer(in); + ArrayList out = new ArrayList(); + for (Player player : players) { + out.add(player.getName()); + } + return out; + } + + @Override + public String printable(String locale) { + return Locale.get("command.info.player", locale); + } + + @Override + public Class getType() { + return Player.class; + } + +} + +class ArgumentOption extends CommandArgument { + + private String[] options; + private String shortVersion = ""; + + @Override + public void init(String a) { + if (a.contains("@")) { + String[] args = a.split("@"); + shortVersion = args[0]; + a = args[1]; + + } + options = a.split(","); + for (int i = 0; i < options.length; i++) { + options[i] = options[i].trim(); + } + } + + @Override + public Object parse(String in, String locale) { + for (String o : options) { + if (o.equalsIgnoreCase(in)) { + return o; + } + } + return new CommandError(String.format(Locale.get("message.error.option", locale), in)); + } + + @Override + public List tabComplete(String in) { + ArrayList out = new ArrayList(); + in = in.toLowerCase(); + for (String o : options) { + if (o.startsWith(in)) { + out.add(o); + } + } + return out; + } + + @Override + public String printable(String locale) { + if (shortVersion.length() == 0) { + StringBuilder out = new StringBuilder(); + out.append('['); + for (int i = 0; i < options.length; i++) { + out.append(options[i]).append(i == options.length - 1 ? ']' : ','); + } + return out.toString(); + } else { + return "[" + shortVersion + "]"; + } + } + + @Override + public Class getType() { + return String.class; + } + +} + +class ArgumentItem extends CommandArgument { + + @Override + public void init(String a) { + + } + + @Override + public Object parse(String in, String locale) { + in = in.toLowerCase(); + RPGItem item = ItemManager.getItemByName(in); + if (item == null) { + return new CommandError(String.format(Locale.get("message.error.item", locale), in)); + } + return item; + } + + @Override + public List tabComplete(String in) { + in = in.toLowerCase(); + ArrayList out = new ArrayList(); + for (String i : ItemManager.itemByName.keySet()) { + if (i.startsWith(in)) { + out.add(i); + } + } + return out; + } + + @Override + public String printable(String locale) { + return Locale.get("command.info.item", locale); + } + + @Override + public Class getType() { + return RPGItem.class; + } + +} + +class ArgumentMaterial extends CommandArgument { + + @Override + public void init(String a) { + + } + + @Override + public Object parse(String in, String locale) { + Material mat = Material.matchMaterial(in); + if (mat == null) { + return new CommandError(String.format(Locale.get("message.error.material", locale), in)); + } + return mat; + } + + @Override + public List tabComplete(String in) { + ArrayList out = new ArrayList(); + String it = in.toUpperCase(); + for (Material m : Material.values()) { + if (m.toString().startsWith(it)) { + out.add(m.toString()); + } + } + return out; + } + + @Override + public String printable(String locale) { + return Locale.get("command.info.material", locale); + } + + @Override + public Class getType() { + return Material.class; + } + +} + +class ArgumentEnum extends CommandArgument { + + private Class e; + private List enumConsts; + + @Override + public void init(String a) { + try { + e = Class.forName(a); + if (!e.isEnum()) { + throw new RuntimeException(a + " is not an enum"); + } + enumConsts = Arrays.asList(e.getEnumConstants()); + } catch (ClassNotFoundException e) { + throw new RuntimeException(e); + } + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public Object parse(String in, String locale) { + Enum en = null; + try { + en = Enum.valueOf((Class)e, in.toUpperCase()); + } catch (IllegalArgumentException ex) { + return new CommandError(String.format("%s is not a %s", in, e.getSimpleName())); + } + return en; + } + + @Override + public List tabComplete(String in) { + ArrayList out = new ArrayList(); + String it = in.toUpperCase(); + for (Object en : enumConsts) { + if (en.toString().startsWith(it)) { + out.add(en.toString()); + } + } + return out; + } + + @Override + public String printable(String locale) { + return "[" + e.getSimpleName() + "]"; + } + + @Override + public Class getType() { + return e; + } + +} \ No newline at end of file diff --git a/src/think/rpgitems/config/ConfigUpdater.java b/src/think/rpgitems/config/ConfigUpdater.java new file mode 100644 index 00000000..dea94903 --- /dev/null +++ b/src/think/rpgitems/config/ConfigUpdater.java @@ -0,0 +1,72 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.config; + +import java.util.HashMap; + +import org.bukkit.configuration.ConfigurationSection; + +import think.rpgitems.Plugin; + +public class ConfigUpdater { + + final static String CONFIG_VERSION = "0.5"; + + static HashMap updates; + static { + updates = new HashMap(); + updates.put("0.1", new Update01To02()); + updates.put("0.2", new Update02To03()); + updates.put("0.3", new Update03To04()); + updates.put("0.4", new Update04To05()); + } + + public static void updateConfig(ConfigurationSection conf) { + while (!conf.getString("version", "0.0").equals(CONFIG_VERSION)) { + if (!conf.contains("version")) { + if (!conf.contains("autoupdate")) { + conf.set("autoupdate", true); + } + if (!conf.contains("defaults.hand")) { + conf.set("defaults.hand", "One handed"); + } + if (!conf.contains("defaults.sword")) { + conf.set("defaults.sword", "Sword"); + } + if (!conf.contains("defaults.damage")) { + conf.set("defaults.damage", "Damage"); + } + if (!conf.contains("defaults.armour")) { + conf.set("defaults.armour", "Armour"); + } + if (!conf.contains("support.worldguard")) { + conf.set("support.worldguard", false); + } + conf.set("version", "0.1"); + Plugin.plugin.saveConfig(); + } else { + if (updates.containsKey(conf.get("version"))) { + updates.get(conf.get("version")).update(conf); + } else { + break; + } + } + } + updates.clear(); + } + } + diff --git a/src/think/rpgitems/config/Update01To02.java b/src/think/rpgitems/config/Update01To02.java new file mode 100644 index 00000000..1026431d --- /dev/null +++ b/src/think/rpgitems/config/Update01To02.java @@ -0,0 +1,57 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.config; + +import java.io.File; +import java.io.IOException; + +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.configuration.file.YamlConfiguration; + +import think.rpgitems.Plugin; + +public class Update01To02 implements Updater { + + @Override + public void update(ConfigurationSection section) { + + File iFile = new File(Plugin.plugin.getDataFolder(), "items.yml"); + YamlConfiguration itemStorage = YamlConfiguration.loadConfiguration(iFile); + ConfigurationSection iSection = itemStorage.getConfigurationSection("items"); + + if (iSection != null) { + for (String key : iSection.getKeys(false)) { + ConfigurationSection item = iSection.getConfigurationSection(key); + if (item.contains("armour")) { + int dam = item.getInt("armour"); + item.set("armour", (int) ((((double) dam) / 20d) * 100d)); + } + } + } + + section.set("version", "0.2"); + + try { + itemStorage.save(iFile); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + Plugin.plugin.saveConfig(); + } + +} diff --git a/src/think/rpgitems/config/Update02To03.java b/src/think/rpgitems/config/Update02To03.java new file mode 100644 index 00000000..16b9b14e --- /dev/null +++ b/src/think/rpgitems/config/Update02To03.java @@ -0,0 +1,175 @@ +package think.rpgitems.config; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.bukkit.ChatColor; +import org.bukkit.Color; +import org.bukkit.Material; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.configuration.InvalidConfigurationException; +import org.bukkit.configuration.file.YamlConfiguration; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.inventory.meta.LeatherArmorMeta; + +import think.rpgitems.Plugin; +import think.rpgitems.data.Locale; +import think.rpgitems.item.ItemManager; +import think.rpgitems.item.Quality; +import think.rpgitems.item.RPGItem; +import think.rpgitems.power.Power; + +public class Update02To03 implements Updater { + + @SuppressWarnings("unchecked") + @Override + public void update(ConfigurationSection section) { + Plugin plugin = Plugin.plugin; + try { + FileInputStream in = null; + YamlConfiguration itemStorage = null; + try { + File f = new File(plugin.getDataFolder(), "items.yml"); + in = new FileInputStream(f); + byte[] data = new byte[(int) f.length()]; + in.read(data); + itemStorage = new YamlConfiguration(); + String str = new String(data, "UTF-8"); + itemStorage.loadFromString(str); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } catch (InvalidConfigurationException e) { + e.printStackTrace(); + } finally { + try { + if (in != null) + in.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + int currentPos = itemStorage.getInt("pos", 0); + ConfigurationSection itemSection = itemStorage.getConfigurationSection("items"); + if (itemSection != null) { + for (String itemKey : itemSection.getKeys(false)) { + ConfigurationSection s = itemSection.getConfigurationSection(itemKey); + String name = s.getString("name"); + int id = s.getInt("id"); + String displayName = null, type = null, hand = null, lore = null; + try { + if (s.contains("display")) { + displayName = s.getString("display"); + } else { + displayName = new String(byte[].class.cast(s.get("display_bin", "")), "UTF-8"); + } + if (s.contains("type")) { + type = s.getString("type", Plugin.plugin.getConfig().getString("defaults.sword", "Sword")); + } else { + if (s.contains("type_bin")) { + type = new String(byte[].class.cast(s.get("type_bin", "")), "UTF-8"); + } else { + type = Plugin.plugin.getConfig().getString("defaults.sword", "Sword"); + } + } + if (s.contains("hand")) { + hand = s.getString("hand", Plugin.plugin.getConfig().getString("defaults.hand", "One handed")); + } else { + if (s.contains("hand_bin")) { + hand = new String(byte[].class.cast(s.get("hand_bin", "")), "UTF-8"); + } else { + hand = Plugin.plugin.getConfig().getString("defaults.hand", "One handed"); + } + } + if (s.contains("lore")) { + lore = s.getString("lore"); + } else { + if (s.contains("lore_bin")) { + lore = new String(byte[].class.cast(s.get("lore_bin", "")), "UTF-8"); + } else { + lore = ""; + } + } + } catch (Exception e) { + e.printStackTrace(); + } + List description = (List) s.getList("description", new ArrayList()); + for (int i = 0; i < description.size(); i++) { + description.set(i, ChatColor.translateAlternateColorCodes('&', description.get(i))); + } + Quality quality = Quality.valueOf(s.getString("quality")); + int damageMin = s.getInt("damageMin"); + int damageMax = s.getInt("damageMax"); + int armour = s.getInt("armour", 0); + ItemStack item = new ItemStack(Material.valueOf(s.getString("item"))); + ItemMeta meta = item.getItemMeta(); + if (meta instanceof LeatherArmorMeta) { + ((LeatherArmorMeta) meta).setColor(Color.fromRGB(s.getInt("item_colour", 0))); + } else { + item.setDurability((short) s.getInt("item_data", 0)); + } + boolean ignoreWorldGuard = s.getBoolean("ignoreWorldGuard", false); + + ConfigurationSection powerSection = s.getConfigurationSection("powers"); + ArrayList powers = new ArrayList(); + if (powerSection != null) { + for (String key : powerSection.getKeys(false)) { + try { + if (!Power.powers.containsKey(key)) { + // Invalid power + continue; + } + Power pow = Power.powers.get(key).newInstance(); + pow.init(powerSection.getConfigurationSection(key)); + // pow.item = this; + powers.add(pow); + } catch (InstantiationException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + } + } + + RPGItem newItem = new RPGItem(name, id); + newItem.setDisplay(displayName, false); + newItem.setType(type, false); + newItem.setHand(hand, false); + newItem.setLore(lore, false); + newItem.setItem(item.getType()); + for (String locales : Locale.getLocales()) { + newItem.setLocaleMeta(locales, meta); + } + newItem.setItem(item.getType(), false); + newItem.setDataValue(item.getDurability(), false); + newItem.setArmour(armour, false); + newItem.setDamage(damageMin, damageMax); + newItem.setQuality(quality, false); + newItem.ignoreWorldGuard = ignoreWorldGuard; + newItem.description = description; + + for (Power power : powers) { + newItem.addPower(power, false); + } + ItemManager.itemById.put(newItem.getID(), newItem); + ItemManager.itemByName.put(newItem.getName(), newItem); + } + } + ItemManager.currentPos = currentPos; + + ItemManager.save(plugin); + ItemManager.itemByName.clear(); + ItemManager.itemById.clear(); + } catch (Exception e) { + e.printStackTrace(); + } + section.set("version", "0.3"); + } + +} diff --git a/src/think/rpgitems/config/Update03To04.java b/src/think/rpgitems/config/Update03To04.java new file mode 100644 index 00000000..e9b9d3b8 --- /dev/null +++ b/src/think/rpgitems/config/Update03To04.java @@ -0,0 +1,44 @@ +package think.rpgitems.config; + +import java.util.Iterator; + +import org.bukkit.configuration.ConfigurationSection; + +import think.rpgitems.Plugin; +import think.rpgitems.item.ItemManager; +import think.rpgitems.item.RPGItem; +import think.rpgitems.power.Power; +import think.rpgitems.power.PowerUnbreakable; +import think.rpgitems.power.PowerUnbreaking; + +public class Update03To04 implements Updater { + + @Override + public void update(ConfigurationSection section) { + Plugin plugin = Plugin.plugin; + + ItemManager.load(plugin); + + for (RPGItem item : ItemManager.itemByName.values()) { + Iterator it = item.powers.iterator(); + while(it.hasNext()) { + Power power = it.next(); + if (power instanceof PowerUnbreakable) { + item.setMaxDurability(-1, false); + it.remove(); + } + if (power instanceof PowerUnbreaking) { + PowerUnbreaking ub = (PowerUnbreaking) power; + item.setMaxDurability((int) ((double)item.getMaxDurability() * (1d + (double)(ub.level) / 2d))); + it.remove(); + } + } + } + + ItemManager.save(plugin); + ItemManager.itemByName.clear(); + ItemManager.itemById.clear(); + section.set("version", "0.4"); + } + +} diff --git a/src/think/rpgitems/config/Update04To05.java b/src/think/rpgitems/config/Update04To05.java new file mode 100644 index 00000000..e17d29c8 --- /dev/null +++ b/src/think/rpgitems/config/Update04To05.java @@ -0,0 +1,192 @@ +package think.rpgitems.config; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.bukkit.ChatColor; +import org.bukkit.Color; +import org.bukkit.Material; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.configuration.InvalidConfigurationException; +import org.bukkit.configuration.file.YamlConfiguration; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.inventory.meta.LeatherArmorMeta; + +import think.rpgitems.Plugin; +import think.rpgitems.data.Locale; +import think.rpgitems.item.ItemManager; +import think.rpgitems.item.Quality; +import think.rpgitems.item.RPGItem; +import think.rpgitems.power.Power; + +public class Update04To05 implements Updater { + + @SuppressWarnings("unchecked") + @Override + public void update(ConfigurationSection section) { + Plugin plugin = Plugin.plugin; + try { + FileInputStream in = null; + YamlConfiguration itemStorage = null; + try { + File f = new File(plugin.getDataFolder(), "items.yml"); + in = new FileInputStream(f); + byte[] data = new byte[(int) f.length()]; + in.read(data); + itemStorage = new YamlConfiguration(); + String str = new String(data, "UTF-8"); + itemStorage.loadFromString(str); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } catch (InvalidConfigurationException e) { + e.printStackTrace(); + } finally { + try { + if (in != null) + in.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + int currentPos = itemStorage.getInt("pos", 0); + ConfigurationSection itemSection = itemStorage.getConfigurationSection("items"); + if (itemSection != null) { + for (String itemKey : itemSection.getKeys(false)) { + ConfigurationSection s = itemSection.getConfigurationSection(itemKey); + String name = s.getString("name"); + int id = s.getInt("id"); + String displayName = null, type = null, hand = null, lore = null, permission = null, haspermissiontemp = null; + try { + if (s.contains("display")) { + displayName = s.getString("display"); + } else { + displayName = new String(byte[].class.cast(s.get("display_bin", "")), "UTF-8"); + } + if (s.contains("permission")) { + permission = s.getString("permission"); + } else { + permission = new String(byte[].class.cast(s.get("permission_bin", "")), "UTF-8"); + } + if (s.contains("haspermission")) { + haspermissiontemp = s.getString("haspermission"); + } else { + haspermissiontemp = new String(byte[].class.cast(s.get("haspermision_bin", "")), "UTF-8"); + } + if (s.contains("type")) { + type = s.getString("type", Plugin.plugin.getConfig().getString("defaults.sword", "Sword")); + } else { + if (s.contains("type_bin")) { + type = new String(byte[].class.cast(s.get("type_bin", "")), "UTF-8"); + } else { + type = Plugin.plugin.getConfig().getString("defaults.sword", "Sword"); + } + } + if (s.contains("hand")) { + hand = s.getString("hand", Plugin.plugin.getConfig().getString("defaults.hand", "One handed")); + } else { + if (s.contains("hand_bin")) { + hand = new String(byte[].class.cast(s.get("hand_bin", "")), "UTF-8"); + } else { + hand = Plugin.plugin.getConfig().getString("defaults.hand", "One handed"); + } + } + if (s.contains("lore")) { + lore = s.getString("lore"); + } else { + if (s.contains("lore_bin")) { + lore = new String(byte[].class.cast(s.get("lore_bin", "")), "UTF-8"); + } else { + lore = ""; + } + } + } catch (Exception e) { + e.printStackTrace(); + } + List description = (List) s.getList("description", new ArrayList()); + for (int i = 0; i < description.size(); i++) { + description.set(i, ChatColor.translateAlternateColorCodes('&', description.get(i))); + } + Quality quality = Quality.valueOf(s.getString("quality")); + int damageMin = s.getInt("damageMin"); + int damageMax = s.getInt("damageMax"); + int armour = s.getInt("armour", 0); + ItemStack item = new ItemStack(Material.valueOf(s.getString("item"))); + ItemMeta meta = item.getItemMeta(); + if (meta instanceof LeatherArmorMeta) { + ((LeatherArmorMeta) meta).setColor(Color.fromRGB(s.getInt("item_colour", 0))); + } else { + item.setDurability((short) s.getInt("item_data", 0)); + } + boolean ignoreWorldGuard = s.getBoolean("ignoreWorldGuard", false); + boolean haspermission = false; + if(haspermissiontemp == "true"){ + haspermission = true; + }else{ + haspermission = false; + } + ConfigurationSection powerSection = s.getConfigurationSection("powers"); + ArrayList powers = new ArrayList(); + if (powerSection != null) { + for (String key : powerSection.getKeys(false)) { + try { + if (!Power.powers.containsKey(key)) { + // Invalid power + continue; + } + Power pow = Power.powers.get(key).newInstance(); + pow.init(powerSection.getConfigurationSection(key)); + // pow.item = this; + powers.add(pow); + } catch (InstantiationException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + } + } + + RPGItem newItem = new RPGItem(name, id); + newItem.setDisplay(displayName, false); + newItem.setHaspermission(haspermission, false); + newItem.setPermission(permission, false); + newItem.setType(type, false); + newItem.setHand(hand, false); + newItem.setLore(lore, false); + newItem.setItem(item.getType()); + for (String locales : Locale.getLocales()) { + newItem.setLocaleMeta(locales, meta); + } + newItem.setItem(item.getType(), false); + newItem.setDataValue(item.getDurability(), false); + newItem.setArmour(armour, false); + newItem.setDamage(damageMin, damageMax); + newItem.setQuality(quality, false); + newItem.ignoreWorldGuard = ignoreWorldGuard; + newItem.description = description; + + for (Power power : powers) { + newItem.addPower(power, false); + } + ItemManager.itemById.put(newItem.getID(), newItem); + ItemManager.itemByName.put(newItem.getName(), newItem); + } + } + ItemManager.currentPos = currentPos; + + ItemManager.save(plugin); + ItemManager.itemByName.clear(); + ItemManager.itemById.clear(); + } catch (Exception e) { + e.printStackTrace(); + } + section.set("version", "0.5"); + } + +} diff --git a/src/think/rpgitems/config/Updater.java b/src/think/rpgitems/config/Updater.java new file mode 100644 index 00000000..6a52d85e --- /dev/null +++ b/src/think/rpgitems/config/Updater.java @@ -0,0 +1,23 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.config; + +import org.bukkit.configuration.ConfigurationSection; + +public interface Updater { + public void update(ConfigurationSection section); +} diff --git a/src/think/rpgitems/data/Font.java b/src/think/rpgitems/data/Font.java new file mode 100644 index 00000000..ec223738 --- /dev/null +++ b/src/think/rpgitems/data/Font.java @@ -0,0 +1,40 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.data; + +import java.io.IOException; +import java.io.InputStream; + +import think.rpgitems.Plugin; + +public class Font { + public static int[] widths; + + public static void load() { + widths = new int[0xFFFF]; + + try { + InputStream in = Plugin.plugin.getResource("font.bin"); + for (int i = 0; i < widths.length; i++) { + widths[i] = in.read(); + } + in.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/src/think/rpgitems/data/Locale.java b/src/think/rpgitems/data/Locale.java new file mode 100644 index 00000000..3eb74377 --- /dev/null +++ b/src/think/rpgitems/data/Locale.java @@ -0,0 +1,190 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.data; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.URL; +import java.net.URLConnection; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Set; + +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.configuration.file.FileConfiguration; +import org.bukkit.entity.Player; +import org.bukkit.scheduler.BukkitRunnable; + +import think.rpgitems.Plugin; +import think.rpgitems.item.ItemManager; +import think.rpgitems.item.RPGItem; + +public class Locale extends BukkitRunnable { + + private static HashMap> localeStrings = new HashMap>(); + private static FileConfiguration config = think.rpgitems.Plugin.config; + private Plugin plugin; + private long lastUpdate = 0; + private File dataFolder; + private String version; + private Locale(Plugin plugin) { + this.plugin = plugin; + lastUpdate = plugin.getConfig().getLong("lastLocaleUpdate", 0); + version = plugin.getDescription().getVersion(); + if (!plugin.getConfig().getString("pluginVersion", "0.0").equals(version)) { + lastUpdate = 0; + plugin.getConfig().set("pluginVersion", version); + plugin.saveConfig(); + } + dataFolder = plugin.getDataFolder(); + reloadLocales(plugin); + if (!plugin.getConfig().contains("localeDownload")) { + plugin.getConfig().set("localeDownload", true); + plugin.saveConfig(); + } + } + + private final static String localeUpdateURL = "http://198.199.127.128/rpgitems/index.php?page=localeget&lastupdate="; + private final static String localeDownloadURL = "http://www.rpgitems2.bugs3.com/locale/%s/%s.lang"; + + public static Set getLocales() { + return localeStrings.keySet(); + } + + @Override + public void run() { + if (!plugin.getConfig().getBoolean("localeDownload", true)) { + cancel(); + } + try { + URL updateURL = new URL(localeUpdateURL + lastUpdate); + lastUpdate = System.currentTimeMillis(); + URLConnection conn = updateURL.openConnection(); + BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8")); + ArrayList locales = new ArrayList(); + String line = null; + while ((line = reader.readLine()) != null) { + locales.add(line); + } + reader.close(); + File localesFolder = new File(dataFolder, "locale/"); + localesFolder.mkdirs(); + for (String locale : locales) { + URL downloadURL = new URL(String.format(localeDownloadURL, version, locale)); + File outFile = new File(dataFolder, "locale/" + locale + ".lang"); + InputStream in = downloadURL.openStream(); + FileOutputStream out = new FileOutputStream(outFile); + byte []buf = new byte[1024]; + int bytesRead; + while ((bytesRead = in.read(buf)) != -1) { + out.write(buf, 0, bytesRead); + } + in.close(); + out.close(); + } + } catch (Exception e) { + return; + } + (new BukkitRunnable() { + @Override + public void run() { + ConfigurationSection config = plugin.getConfig(); + config.set("lastLocaleUpdate", lastUpdate); + plugin.saveConfig(); + reloadLocales(plugin); + for (RPGItem item : ItemManager.itemById.valueCollection()) { + item.rebuild(); + } + } + }).runTask(plugin); + } + + public static void reloadLocales(Plugin plugin) { + localeStrings.clear(); + localeStrings.put("en_GB", loadLocaleStream(plugin.getResource("locale/en_GB.lang"))); + localeStrings.put("fr_FR", loadLocaleStream(plugin.getResource("locale/fr_FR.lang"))); + localeStrings.put("es_ES", loadLocaleStream(plugin.getResource("locale/es_ES.lang"))); + } + + private static HashMap loadLocaleStream(InputStream in, HashMap map) { + try { + BufferedReader reader = new BufferedReader(new InputStreamReader(in, "UTF-8")); + String line = null; + while((line = reader.readLine()) != null) { + if (line.startsWith("#")) continue; + String[] args = line.split("="); + map.put(args[0].trim(), args[1].trim()); + } + return map; + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + return null; + } + + private static HashMap loadLocaleStream(InputStream in) { + return loadLocaleStream(in, new HashMap()); + } + + public static String getPlayerLocale(Player player) { + String language = config.getString("language"); + + if(language.equals("es_ES")){ + return "es_ES"; + }else if(language.equals("fr_FR")){ + return "fr_FR"; + }else if(language.equals("en_GB")){ + return "en_GB"; + }else{ + Plugin.plugin.getLogger().warning("Error language you've set : '" + language + "' isn't supported or don't exist ! Languages aviables are es_ES, fr_FR and en_GB"); + return "en_GB"; + } + } + + public static void init(Plugin plugin) { + (new Locale(plugin)).runTaskTimerAsynchronously(plugin, 0, 24l * 60l * 60l * 20l); + } + + public static String get(String key, String locale) { + if (!localeStrings.containsKey(locale)) + return get(key); + HashMap strings = localeStrings.get(locale); + if (strings == null || !strings.containsKey(key)){ + return get(key); + } + return strings.get(key); + } + + private static String get(String key) { + HashMap strings = localeStrings.get("en_GB"); + if (!strings.containsKey(key)) + return "!" + key + "!"; + return strings.get(key); + } +} diff --git a/src/think/rpgitems/data/RPGMetadata.java b/src/think/rpgitems/data/RPGMetadata.java new file mode 100644 index 00000000..eabd79d6 --- /dev/null +++ b/src/think/rpgitems/data/RPGMetadata.java @@ -0,0 +1,193 @@ +package think.rpgitems.data; + +import gnu.trove.iterator.TIntObjectIterator; +import gnu.trove.map.hash.TIntObjectHashMap; + +import java.io.UnsupportedEncodingException; +import java.util.List; + +import org.bukkit.ChatColor; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; + +/** + * RPGMetadata is a (bad) way of tagging extra data onto an item without it showing up on the item + * itself. This uses a similar system to Notch's entity metadata system. The data will be encoded in + * minecraft colour codes which makes this really inefficient because 1 byte -> 2 bytes(Hex) -> 4 + * bytes( Colour codes). RPGMetadatais prefixed with CAFE to allow it to be easily detected. + * + */ +public class RPGMetadata extends TIntObjectHashMap { + + private final static String METADATA_PREFIX = ChatColor.COLOR_CHAR + "c" + ChatColor.COLOR_CHAR + "a" + ChatColor.COLOR_CHAR + "f" + ChatColor.COLOR_CHAR + "e"; + + public static final int DURABILITY = 0; + + public static boolean hasRPGMetadata(ItemStack item) { + if (!item.hasItemMeta()) + return false; + ItemMeta meta = item.getItemMeta(); + if (!meta.hasLore()) + return false; + List lore = meta.getLore(); + if (lore.size() == 0) + return false; + return lore.get(0).contains(METADATA_PREFIX); + } + + public static RPGMetadata parseLoreline(String lore) { + RPGMetadata meta = new RPGMetadata(); + int pos = lore.indexOf(METADATA_PREFIX); + if (pos == -1) { + return meta; + } + String lenStr = lore.substring(pos + METADATA_PREFIX.length(), pos + METADATA_PREFIX.length() + 8); + int length = parseShort(lenStr, 0); + String data = lore.substring(pos + METADATA_PREFIX.length() + 8, pos + METADATA_PREFIX.length() + 8 + length); + int off = 0; + while (off < length) { + int index = parseByte(data, off); + off += 4; + int key = index & 0x1F; + int type = index >> 5; + switch(type) { + case 0: //Byte + int byteValue = parseByte(data, off); + off += 4; + meta.put(key, Byte.valueOf((byte) byteValue)); + break; + case 1: //Short + int shortValue = parseShort(data, off); + off += 8; + meta.put(key, Short.valueOf((short) shortValue)); + break; + case 2: //Int + int intValue = parseInt(data, off); + off += 16; + meta.put(key, Integer.valueOf(intValue)); + break; + case 3: //Float + int floatValueBits = parseInt(data, off); + off += 16; + meta.put(key, Float.intBitsToFloat(floatValueBits)); + break; + case 4: //String + int stringLength = parseShort(data, off); + off += 8; + byte[] bytes = new byte[stringLength]; + for (int i = 0; i < stringLength; i++) { + bytes[i] = (byte) parseByte(data, off); + off += 4; + } + try { + meta.put(key, new String(bytes, "UTF-8")); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + break; + } + } + return meta; + } + + private static int parseInt(String iStr, int off) { + return (parseShort(iStr, off + 0) << 16) | parseShort(iStr, off + 8); + } + + private static int parseShort(String sStr, int off) { + return (parseByte(sStr, off + 0) << 8) | parseByte(sStr, off + 4); + } + + private static int parseByte(String bStr, int off) { + return Integer.parseInt("" + bStr.charAt(off + 1) + bStr.charAt(off + 3), 16); + } + + public RPGMetadata() { + + } + + public String toMCString() { + StringBuilder out = new StringBuilder(); + out.append(METADATA_PREFIX); + TIntObjectIterator it = iterator(); + while (it.hasNext()) { + it.advance(); + int key = it.key(); + Object value = it.value(); + int index = key & 0x1F; + if (value instanceof Byte) { + index |= 0 << 5; + writeByte(out, index); + writeByte(out, ((Byte) value).intValue()); + } else if (value instanceof Short) { + index |= 1 << 5; + writeByte(out, index); + writeShort(out, ((Short) value).intValue()); + } else if (value instanceof Integer) { + index |= 2 << 5; + writeByte(out, index); + writeInt(out, ((Integer) value).intValue()); + } else if (value instanceof Float) { + index |= 3 << 5; + writeByte(out, index); + writeInt(out, Float.floatToIntBits((Float) value)); + } else if (value instanceof String) { + index |= 4 << 5; + writeByte(out, index); + writeString(out, (String) value); + } + } + int size = out.length() - METADATA_PREFIX.length(); + insertShort(out, METADATA_PREFIX.length(), size); + return out.toString(); + } + + private void writeString(StringBuilder out, String value) { + try { + byte[] data = value.getBytes("UTF-8"); + writeShort(out, data.length); + for (byte b : data) { + writeByte(out, b); + } + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + + } + + private void writeByte(StringBuilder out, int b) { + String hex = Integer.toString(b, 16); + out.append(ChatColor.COLOR_CHAR); + out.append(hex.length() == 1 ? "0" : hex.charAt(0)); + out.append(ChatColor.COLOR_CHAR); + out.append(hex.charAt(hex.length() - 1)); + } + + private void writeShort(StringBuilder out, int s) { + writeByte(out, s >> 8); + writeByte(out, s & 0xFF); + } + + private void writeInt(StringBuilder out, int s) { + writeShort(out, s >> 16); + writeShort(out, s & 0xFFFF); + } + + private void insertByte(StringBuilder out, int offset, int b) { + String hex = Integer.toString(b, 16); + out.insert(offset, ChatColor.COLOR_CHAR); + out.insert(offset + 1, hex.length() == 1 ? "0" : hex.charAt(0)); + out.insert(offset + 2, ChatColor.COLOR_CHAR); + out.insert(offset + 3, hex.charAt(hex.length() - 1)); + } + + private void insertShort(StringBuilder out, int offset, int s) { + insertByte(out, offset, s >> 8); + insertByte(out, offset + 4, s & 0xFF); + } + + private void insertInt(StringBuilder out, int offset, int s) { + insertShort(out, offset, s >> 16); + insertShort(out, offset + 8, s & 0xFFFF); + } +} diff --git a/src/think/rpgitems/data/RPGValue.java b/src/think/rpgitems/data/RPGValue.java new file mode 100644 index 00000000..c4b08b48 --- /dev/null +++ b/src/think/rpgitems/data/RPGValue.java @@ -0,0 +1,80 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.data; + +import java.util.HashMap; + +import org.bukkit.entity.Player; + +import think.rpgitems.item.RPGItem; + +public class RPGValue { + + Object value; + + static HashMap map = new HashMap(); + + public static RPGValue get(Player player, RPGItem item, String name) { + return map.get(player.getName() + "." + item.getID() + "." + name); + } + + public RPGValue(Player player, RPGItem item, String name, Object value) { + this.value = value; + map.put(player.getName() + "." + item.getID() + "." + name, this); + } + + public void set(Object value) { + this.value = value; + } + + public boolean asBoolean() { + return (Boolean) value; + } + + public byte asByte() { + return (Byte) value; + } + + public double asDouble() { + return (Double) value; + } + + public float asFloat() { + return (Float) value; + } + + public int asInt() { + return (Integer) value; + } + + public long asLong() { + return (Long) value; + } + + public short asShort() { + return (Short) value; + } + + public String asString() { + return (String) value; + } + + public Object value() { + return value; + } + +} diff --git a/src/think/rpgitems/item/ItemGroup.java b/src/think/rpgitems/item/ItemGroup.java new file mode 100644 index 00000000..5854a3e4 --- /dev/null +++ b/src/think/rpgitems/item/ItemGroup.java @@ -0,0 +1,29 @@ +package think.rpgitems.item; + +import java.util.ArrayList; +import java.util.List; + +import org.bukkit.configuration.ConfigurationSection; + +public class ItemGroup { + private String name; + private List items = new ArrayList(); + + public ItemGroup(String name) { + this.name = name; + } + + public ItemGroup(ConfigurationSection s) { + name = s.getString("name"); + items = s.getIntegerList("items"); + } + + public void save(ConfigurationSection s) { + s.set("name", name); + s.set("items", items); + } + + public String getName() { + return name; + } +} diff --git a/src/think/rpgitems/item/ItemManager.java b/src/think/rpgitems/item/ItemManager.java new file mode 100644 index 00000000..439a48ff --- /dev/null +++ b/src/think/rpgitems/item/ItemManager.java @@ -0,0 +1,215 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.item; + +import gnu.trove.map.hash.TIntObjectHashMap; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.io.UnsupportedEncodingException; +import java.util.HashMap; +import java.util.Map.Entry; + +import org.bukkit.ChatColor; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.configuration.InvalidConfigurationException; +import org.bukkit.configuration.file.YamlConfiguration; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.util.FileUtil; + +import think.rpgitems.Plugin; +import think.rpgitems.power.Power; + +public class ItemManager { + public static TIntObjectHashMap itemById = new TIntObjectHashMap(); + public static HashMap itemByName = new HashMap(); + public static HashMap groups = new HashMap(); + public static int currentPos = 0; + + public static void load(Plugin plugin) { + try { + FileInputStream in = null; + YamlConfiguration itemStorage = null; + try { + File f = new File(plugin.getDataFolder(), "items.yml"); + in = new FileInputStream(f); + byte[] data = new byte[(int) f.length()]; + in.read(data); + itemStorage = new YamlConfiguration(); + String str = new String(data, "UTF-8"); + itemStorage.loadFromString(str); + } catch (FileNotFoundException e) { + } catch (IOException e) { + e.printStackTrace(); + } catch (InvalidConfigurationException e) { + e.printStackTrace(); + } finally { + try { + if (in != null) + in.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + currentPos = itemStorage.getInt("pos", 0); + ConfigurationSection section = itemStorage.getConfigurationSection("items"); + if (section == null) return; + for (String key : section.getKeys(false)) { + RPGItem item = new RPGItem(section.getConfigurationSection(key)); + itemById.put(item.getID(), item); + itemByName.put(item.getName(), item); + for (Power power : item.powers) { + Power.powerUsage.put(power.getName(), Power.powerUsage.get(power.getName()) + 1); + } + } + + if (itemStorage.contains("groups")) { + ConfigurationSection gSection = itemStorage.getConfigurationSection("groups"); + for (String key : gSection.getKeys(false)) { + ItemGroup group = new ItemGroup(gSection.getConfigurationSection(key)); + groups.put(group.getName(), group); + } + } + } catch (Exception e) { + //Something went wrong + plugin.getLogger().severe("Error loading items.yml. Creating backup"); + File file = new File(plugin.getDataFolder(), "items.yml"); + long time = System.currentTimeMillis(); + File backup = new File(plugin.getDataFolder(), time + "-items.yml"); + FileUtil.copy(file, backup); + File log = new File(plugin.getDataFolder(), time + "-log.txt"); + PrintStream ps = null; + try { + ps = new PrintStream(log); + ps.printf("RPGItems (%s) ItemManager.load\r\n", plugin.getDescription().getVersion()); + e.printStackTrace(ps); + } catch (FileNotFoundException e1) { + e1.printStackTrace(); + } finally { + ps.close(); + } + } + } + + public static void save(Plugin plugin) { + + YamlConfiguration itemStorage = new YamlConfiguration(); + + itemStorage.set("items", null); + itemStorage.set("pos", currentPos); + ConfigurationSection newSection = itemStorage.createSection("items"); + for (RPGItem item : itemById.valueCollection()) { + ConfigurationSection itemSection = newSection.getConfigurationSection(item.getName()); + if (itemSection == null) { + itemSection = newSection.createSection(item.getName()); + } + item.save(itemSection); + } + + ConfigurationSection groupsSection = itemStorage.createSection("groups"); + + for (Entry group : groups.entrySet()) { + ConfigurationSection groupSection = groupsSection.createSection(group.getKey()); + group.getValue().save(groupSection); + } + + FileOutputStream out = null; + try { + File f = new File(plugin.getDataFolder(), "items.yml"); + out = new FileOutputStream(f); + out.write(itemStorage.saveToString().getBytes("UTF-8")); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + if (out != null) + out.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + public static RPGItem toRPGItem(ItemStack item) { + if (item == null) + return null; + if (!item.hasItemMeta()) + return null; + ItemMeta meta = item.getItemMeta(); + if (!meta.hasDisplayName()) + return null; + try { + int id = ItemManager.decodeId(meta.getDisplayName()); + RPGItem rItem = ItemManager.getItemById(id); + return rItem; + } catch (Exception e) { + return null; + } + } + + public static RPGItem newItem(String name) { + if (itemByName.containsKey(name)) + return null; + int free = 0; + while (true) { + free = currentPos++; + if (!itemById.containsKey(free)) + break; + } + RPGItem item = new RPGItem(name, free); + itemById.put(free, item); + itemByName.put(name, item); + return item; + } + + public static RPGItem getItemById(int id) { + return itemById.get(id); + } + + public static RPGItem getItemByName(String uid) { + return itemByName.get(uid); + } + + public static int decodeId(String str) throws Exception { + if (str.length() < 16) { + throw new Exception(); + } + StringBuilder out = new StringBuilder(); + for (int i = 0; i < 16; i++) { + if (str.charAt(i) != ChatColor.COLOR_CHAR) + throw new Exception(); + i++; + out.append(str.charAt(i)); + } + return Integer.parseInt(out.toString(), 16); + } + + public static void remove(RPGItem item) { + itemByName.remove(item.getName()); + itemById.remove(item.getID()); + } + +} diff --git a/src/think/rpgitems/item/LocaleInventory.java b/src/think/rpgitems/item/LocaleInventory.java new file mode 100644 index 00000000..1c58a18d --- /dev/null +++ b/src/think/rpgitems/item/LocaleInventory.java @@ -0,0 +1,83 @@ +package think.rpgitems.item; + +import java.util.Iterator; + +import org.bukkit.Bukkit; +import org.bukkit.entity.HumanEntity; +import org.bukkit.entity.Player; +import org.bukkit.event.inventory.InventoryType; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.InventoryView; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.inventory.meta.LeatherArmorMeta; + +import think.rpgitems.data.Locale; + +public class LocaleInventory extends InventoryView { + + private Player player; + private InventoryView view; + private Inventory real; + private Inventory fake; + private String locale; + + public LocaleInventory(Player player, InventoryView inventoryView) { + locale = Locale.getPlayerLocale(player); + this.player = player; + real = inventoryView.getTopInventory(); + view = inventoryView; + fake = Bukkit.createInventory(real.getHolder(), real.getSize(), real.getTitle()); + reload(); + } + + public InventoryView getView() { + return view; + } + + public void reload() { + fake.setContents(real.getContents()); + Iterator it = fake.iterator(); + while (it.hasNext()) { + ItemStack item = it.next(); + RPGItem rItem = ItemManager.toRPGItem(item); + if (rItem == null) + continue; + item.setType(rItem.getItem()); + ItemMeta meta = rItem.getLocaleMeta(locale); + if (!(meta instanceof LeatherArmorMeta) && rItem.getItem().isBlock()) + item.setDurability(rItem.getDataValue()); + item.setItemMeta(meta); + } + fake.setContents(fake.getContents()); + } + + public Inventory getReal() { + return real; + } + + @Override + public Inventory getBottomInventory() { + return player.getInventory(); + } + + @Override + public HumanEntity getPlayer() { + return player; + } + + @Override + public Inventory getTopInventory() { + return fake; + } + + @Override + public InventoryType getType() { + return InventoryType.CHEST; + } + + public void sumbitChanges() { + real.setContents(fake.getContents()); + } + +} diff --git a/src/think/rpgitems/item/Quality.java b/src/think/rpgitems/item/Quality.java new file mode 100644 index 00000000..62796b35 --- /dev/null +++ b/src/think/rpgitems/item/Quality.java @@ -0,0 +1,31 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.item; + +import org.bukkit.ChatColor; + +public enum Quality { + TRASH(ChatColor.GRAY.toString(), "7"), COMMON(ChatColor.WHITE.toString(), "f"), UNCOMMON(ChatColor.GREEN.toString(), "a"), RARE(ChatColor.BLUE.toString(), "9"), EPIC(ChatColor.DARK_PURPLE.toString(), "5"), LEGENDARY(ChatColor.GOLD.toString(), "6"); + + public final String colour; + public final String cCode; + + Quality(String colour, String code) { + this.colour = colour; + this.cCode = code; + } +} diff --git a/src/think/rpgitems/item/RPGItem.java b/src/think/rpgitems/item/RPGItem.java new file mode 100644 index 00000000..a7942b82 --- /dev/null +++ b/src/think/rpgitems/item/RPGItem.java @@ -0,0 +1,877 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.item; + +import gnu.trove.map.hash.TObjectDoubleHashMap; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import org.apache.commons.lang.StringUtils; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Color; +import org.bukkit.Material; +import org.bukkit.command.CommandSender; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.configuration.MemoryConfiguration; +import org.bukkit.enchantments.Enchantment; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; +import org.bukkit.entity.Projectile; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.Recipe; +import org.bukkit.inventory.ShapedRecipe; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.inventory.meta.LeatherArmorMeta; + +import think.rpgitems.Events; +import think.rpgitems.Plugin; +import think.rpgitems.data.Font; +import think.rpgitems.data.Locale; +import think.rpgitems.data.RPGMetadata; +import think.rpgitems.power.Power; +import think.rpgitems.power.types.PowerHit; +import think.rpgitems.power.types.PowerLeftClick; +import think.rpgitems.power.types.PowerProjectileHit; +import think.rpgitems.power.types.PowerRightClick; +import think.rpgitems.power.types.PowerTick; + +public class RPGItem { + private ItemStack item; + + private HashMap localeMeta = new HashMap(); + + private int id; + private String name; + private String encodedID; + + private boolean haspermission; + private String permission; + private String displayName; + private Quality quality = Quality.TRASH; + private int damageMin = 0, damageMax = 3; + private int armour = 0; + private String loreText = ""; + private String type = Plugin.plugin.getConfig().getString("defaults.sword", "Sword"); + private String hand = Plugin.plugin.getConfig().getString("defaults.hand", "One handed"); + public boolean ignoreWorldGuard = false; + public List description = new ArrayList(); + + // Powers + public ArrayList powers = new ArrayList(); + private ArrayList powerLeftClick = new ArrayList(); + private ArrayList powerRightClick = new ArrayList(); + private ArrayList powerProjectileHit = new ArrayList(); + private ArrayList powerHit = new ArrayList(); + private ArrayList powerTick = new ArrayList(); + + // Recipes + public int recipechance = 6; + public boolean hasRecipe = false; + public List recipe = null; + + // Drops + public TObjectDoubleHashMap dropChances = new TObjectDoubleHashMap(); + + private int tooltipWidth = 150; + + // Durability + private int maxDurability; + private boolean hasBar = false; + private boolean forceBar = false; + + public RPGItem(String name, int id) { + this.name = name; + this.id = id; + encodedID = getMCEncodedID(id); + item = new ItemStack(Material.WOOD_SWORD); + + displayName = item.getType().toString(); + + localeMeta.put("en_GB", item.getItemMeta()); + + rebuild(); + } + + @SuppressWarnings("unchecked") + public RPGItem(ConfigurationSection s) { + + name = s.getString("name"); + id = s.getInt("id"); + setDisplay(s.getString("display"), false); + setType(s.getString("type", Plugin.plugin.getConfig().getString("defaults.sword", "Sword")), false); + setHand(s.getString("hand", Plugin.plugin.getConfig().getString("defaults.hand", "One handed")), false); + setLore(s.getString("lore"), false); + description = (List) s.getList("description", new ArrayList()); + for (int i = 0; i < description.size(); i++) { + description.set(i, ChatColor.translateAlternateColorCodes('&', description.get(i))); + } + quality = Quality.valueOf(s.getString("quality")); + damageMin = s.getInt("damageMin"); + damageMax = s.getInt("damageMax"); + armour = s.getInt("armour", 0); + item = new ItemStack(Material.valueOf(s.getString("item"))); + ItemMeta meta = item.getItemMeta(); + if (meta instanceof LeatherArmorMeta) { + ((LeatherArmorMeta) meta).setColor(Color.fromRGB(s.getInt("item_colour", 0))); + } else { + item.setDurability((short) s.getInt("item_data", 0)); + } + for (String locale : Locale.getLocales()) { + localeMeta.put(locale, meta.clone()); + } + ignoreWorldGuard = s.getBoolean("ignoreWorldGuard", false); + + // Powers + ConfigurationSection powerList = s.getConfigurationSection("powers"); + if (powerList != null) { + for (String sectionKey : powerList.getKeys(false)) { + ConfigurationSection section = powerList.getConfigurationSection(sectionKey); + try { + if (!Power.powers.containsKey(section.getString("powerName"))) { + // Invalid power + continue; + } + Power pow = Power.powers.get(section.getString("powerName")).newInstance(); + pow.init(section); + pow.item = this; + addPower(pow, false); + } catch (InstantiationException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + } + } + + + encodedID = getMCEncodedID(id); + haspermission = s.getBoolean("haspermission", false); + permission = s.getString("permission", "a.default.permission"); + // Recipes + recipechance = s.getInt("recipechance", 6); + hasRecipe = s.getBoolean("hasRecipe", false); + if (hasRecipe) { + recipe = (List) s.getList("recipe"); + } + + ConfigurationSection drops = s.getConfigurationSection("dropChances"); + if (drops != null) { + for (String key : drops.getKeys(false)) { + double chance = drops.getDouble(key, 0.0); + chance = Math.min(chance, 100.0); + if (chance > 0) { + dropChances.put(key, chance); + if (!Events.drops.containsKey(key)) { + Events.drops.put(key, new HashSet()); + } + Set set = Events.drops.get(key); + set.add(getID()); + } else { + dropChances.remove(key); + if (Events.drops.containsKey(key)) { + Set set = Events.drops.get(key); + set.remove(getID()); + } + } + dropChances.put(key, chance); + } + } + if (item.getType().getMaxDurability() != 0) { + hasBar = true; + } + maxDurability = s.getInt("maxDurability", item.getType().getMaxDurability()); + forceBar = s.getBoolean("forceBar", false); + + if (maxDurability == 0) { + maxDurability = -1; + } + + rebuild(); + } + + + public void save(ConfigurationSection s) { + s.set("name", name); + s.set("id", id); + s.set("haspermission", haspermission); + s.set("permission", permission); + s.set("display", displayName.replaceAll("" + ChatColor.COLOR_CHAR, "&")); + s.set("quality", quality.toString()); + s.set("damageMin", damageMin); + s.set("damageMax", damageMax); + s.set("armour", armour); + s.set("type", type.replaceAll("" + ChatColor.COLOR_CHAR, "&")); + s.set("hand", hand.replaceAll("" + ChatColor.COLOR_CHAR, "&")); + s.set("lore", loreText.replaceAll("" + ChatColor.COLOR_CHAR, "&")); + ArrayList descriptionConv = new ArrayList(description); + for (int i = 0; i < descriptionConv.size(); i++) { + descriptionConv.set(i, descriptionConv.get(i).replaceAll("" + ChatColor.COLOR_CHAR, "&")); + } + s.set("description", descriptionConv); + s.set("item", item.getType().toString()); + s.set("ignoreWorldGuard", ignoreWorldGuard); + + ItemMeta meta = localeMeta.get("en_GB"); + if (meta instanceof LeatherArmorMeta) { + s.set("item_colour", ((LeatherArmorMeta) meta).getColor().asRGB()); + } else { + s.set("item_data", item.getDurability()); + } + ConfigurationSection powerConfigs = s.createSection("powers"); + int i = 0; + for (Power p : powers) { + MemoryConfiguration pConfig = new MemoryConfiguration(); + pConfig.set("powerName", p.getName()); + p.save(pConfig); + powerConfigs.set(Integer.toString(i), pConfig); + i++; + } + + // Recipes + s.set("recipechance", recipechance); + s.set("hasRecipe", hasRecipe); + if (hasRecipe) { + s.set("recipe", recipe); + } + + ConfigurationSection drops = s.createSection("dropChances"); + for (String key : dropChances.keySet()) { + drops.set(key, dropChances.get(key)); + } + + s.set("maxDurability", maxDurability); + s.set("forceBar", forceBar); + } + + public void resetRecipe(boolean removeOld) { + if (removeOld) { + Iterator it = Bukkit.recipeIterator(); + while (it.hasNext()) { + Recipe recipe = it.next(); + RPGItem rpgitem = ItemManager.toRPGItem(recipe.getResult()); + if (rpgitem == null) + continue; + if (rpgitem.getID() == getID()) { + it.remove(); + } + } + } + if (hasRecipe) { + Set iSet = new HashSet(); + for (ItemStack m : recipe) { + iSet.add(m); + } + ItemStack[] iList = iSet.toArray(new ItemStack[iSet.size()]); + item.setItemMeta(getLocaleMeta("en_GB")); + ShapedRecipe shapedRecipe = new ShapedRecipe(item); + int i = 0; + Map iMap = new HashMap(); + for (ItemStack m : iList) { + iMap.put(m, (char) (65 + i)); + i++; + } + iMap.put(null, ' '); + StringBuilder out = new StringBuilder(); + for (ItemStack m : recipe) { + out.append(iMap.get(m)); + } + String shape = out.toString(); + shapedRecipe.shape(new String[] { shape.substring(0, 3), shape.substring(3, 6), shape.substring(6, 9) }); + for (Entry e : iMap.entrySet()) { + if (e.getKey() != null) { + shapedRecipe.setIngredient(e.getValue(), e.getKey().getType(), e.getKey().getDurability()); + } + } + Bukkit.addRecipe(shapedRecipe); + } + } + + public void leftClick(Player player) { + for (PowerLeftClick power : powerLeftClick) { + power.leftClick(player); + } + } + + public void rightClick(Player player) { + for (PowerRightClick power : powerRightClick) { + power.rightClick(player); + } + } + + public void projectileHit(Player player, Projectile arrow) { + for (PowerProjectileHit power : powerProjectileHit) { + power.projectileHit(player, arrow); + } + } + + public void hit(Player player, LivingEntity e, double d) { + for (PowerHit power : powerHit) { + power.hit(player, e, d); + } + } + + public void tick(Player player) { + for (PowerTick power : powerTick) { + power.tick(player); + } + } + + public void rebuild() { + for (String locale : Locale.getLocales()) { + if (!localeMeta.containsKey(locale)) + localeMeta.put(locale, getLocaleMeta("en_GB")); + } + for (String locale : Locale.getLocales()) { + List lines = getTooltipLines(locale); + ItemMeta meta = getLocaleMeta(locale); + meta.setDisplayName(lines.get(0)); + lines.remove(0); + meta.setLore(lines); + setLocaleMeta(locale, meta); + // item.setItemMeta(meta); + } + + for (Player player : Bukkit.getOnlinePlayers()) { + Iterator it = player.getInventory().iterator(); + String locale = Locale.getPlayerLocale(player); + while (it.hasNext()) { + ItemStack item = it.next(); + if (ItemManager.toRPGItem(item) != null) + updateItem(item, locale, false); + } + for (ItemStack item : player.getInventory().getArmorContents()) { + if (ItemManager.toRPGItem(item) != null) + updateItem(item, locale, false); + + } + } + resetRecipe(true); + } + + public static RPGMetadata getMetadata(ItemStack item) { + //Check for broken item + if (!item.hasItemMeta() || !item.getItemMeta().hasLore() || item.getItemMeta().getLore().size() == 0) { + //Broken item + return new RPGMetadata(); + } + return RPGMetadata.parseLoreline(item.getItemMeta().getLore().get(0)); + } + + public static void updateItem(ItemStack item, String locale) { + updateItem(item, locale, getMetadata(item)); + } + + public static void updateItem(ItemStack item, String locale, RPGMetadata rpgMeta) { + updateItem(item, locale, rpgMeta, false); + } + + public static void updateItem(ItemStack item, String locale, boolean updateDurability) { + updateItem(item, locale, getMetadata(item), false); + } + + public static void updateItem(ItemStack item, String locale, RPGMetadata rpgMeta, boolean updateDurability) { + RPGItem rItem = ItemManager.toRPGItem(item); + if (rItem == null) + return; + item.setType(rItem.item.getType()); + ItemMeta meta = rItem.getLocaleMeta(locale); + if (!(meta instanceof LeatherArmorMeta) && updateDurability) { + item.setDurability(rItem.item.getDurability()); + } + List lore = meta.getLore(); + rItem.addExtra(rpgMeta, item, lore); + lore.set(0, meta.getLore().get(0) + rpgMeta.toMCString()); + meta.setLore(lore); + item.setItemMeta(meta); + } + + public void addExtra(RPGMetadata rpgMeta, ItemStack item, List lore) { + if (maxDurability > 0) { + if (!rpgMeta.containsKey(RPGMetadata.DURABILITY)) { + rpgMeta.put(RPGMetadata.DURABILITY, Integer.valueOf(maxDurability)); + } + int durability = ((Number) rpgMeta.get(RPGMetadata.DURABILITY)).intValue(); + + if (!hasBar || forceBar) { + StringBuilder out = new StringBuilder(); + char boxChar = '\u25A0'; + int boxCount = tooltipWidth / 4; + int mid = (int) ((double) boxCount * ((double) durability / (double) maxDurability)); + for (int i = 0; i < boxCount; i++) { + out.append(i < mid ? ChatColor.GREEN : i == mid ? ChatColor.YELLOW : ChatColor.RED); + out.append(boxChar); + } + lore.add(out.toString()); + } + if (hasBar) { + item.setDurability((short) (item.getType().getMaxDurability() - ((short) ((double) item.getType().getMaxDurability() * ((double) durability / (double) maxDurability))))); + } + } else if (maxDurability <= 0) { + item.setDurability(hasBar ? (short)0 : this.item.getDurability()); + } + } + + public List getTooltipLines(String locale) { + ArrayList output = new ArrayList(); + int width = 150; + output.add(encodedID + quality.colour + ChatColor.BOLD + displayName); + int dWidth = getStringWidthBold(ChatColor.stripColor(displayName)); + if (dWidth > width) + width = dWidth; + + dWidth = getStringWidth(ChatColor.stripColor(hand + " " + type)); + if (dWidth > width) + width = dWidth; + String damageStr = null; + if (damageMin == 0 && damageMax == 0 && armour != 0) { + damageStr = armour + "% " + Plugin.plugin.getConfig().getString("defaults.armour", "Armour"); + } else if (armour == 0 && damageMin == 0 && damageMax == 0) { + damageStr = null; + } else if (damageMin == damageMax) { + damageStr = damageMin + " " + Plugin.plugin.getConfig().getString("defaults.damage", "Damage"); + } else { + damageStr = damageMin + "-" + damageMax + " " + Plugin.plugin.getConfig().getString("defaults.damage", "Damage"); + } + if (damageMin != 0 || damageMax != 0 || armour != 0) { + dWidth = getStringWidth(damageStr); + if (dWidth > width) + width = dWidth; + } + + for (Power p : powers) { + dWidth = getStringWidth(ChatColor.stripColor(p.displayText(locale))); + if (dWidth > width) + width = dWidth; + } + + for (String s : description) { + dWidth = getStringWidth(ChatColor.stripColor(s)); + if (dWidth > width) + width = dWidth; + } + + tooltipWidth = width; + + output.add(ChatColor.WHITE + hand + StringUtils.repeat(" ", (width - getStringWidth(ChatColor.stripColor(hand + type))) / 4) + type); + if (damageStr != null) { + output.add(ChatColor.WHITE + damageStr); + } + + for (Power p : powers) { + output.add(p.displayText(locale)); + } + if (loreText.length() != 0) { + int cWidth = 0; + int tWidth = 0; + StringBuilder out = new StringBuilder(); + StringBuilder temp = new StringBuilder(); + out.append(ChatColor.YELLOW); + out.append(ChatColor.ITALIC); + String currentColour = ChatColor.YELLOW.toString(); + String dMsg = "\"" + loreText + "\""; + for (int i = 0; i < dMsg.length(); i++) { + char c = dMsg.charAt(i); + temp.append(c); + if (c == ChatColor.COLOR_CHAR || c == '&') { + i += 1; + temp.append(dMsg.charAt(i)); + currentColour = ChatColor.COLOR_CHAR + "" + dMsg.charAt(i); + continue; + } + if (c == ' ') + tWidth += 4; + else + tWidth += Font.widths[c] + 1; + if (c == ' ' || i == dMsg.length() - 1) { + if (cWidth + tWidth > width) { + cWidth = 0; + cWidth += tWidth; + tWidth = 0; + output.add(out.toString()); + out = new StringBuilder(); + out.append(currentColour); + out.append(ChatColor.ITALIC); + out.append(temp); + temp = new StringBuilder(); + } else { + out.append(temp); + temp = new StringBuilder(); + cWidth += tWidth; + tWidth = 0; + } + } + } + out.append(temp); + output.add(out.toString()); + } + + for (String s : description) { + output.add(s); + } + return output; + } + + public ItemStack toItemStack(String locale) { + ItemStack rStack = item.clone(); + RPGMetadata rpgMeta = new RPGMetadata(); + ItemMeta meta = getLocaleMeta(locale); + List lore = meta.getLore(); + lore.set(0, meta.getLore().get(0) + rpgMeta.toMCString()); + addExtra(rpgMeta, rStack, lore); + meta.setLore(lore); + rStack.setItemMeta(meta); + return rStack; + } + + public ItemMeta getLocaleMeta(String locale) { + ItemMeta meta = localeMeta.get(locale); + if (meta == null) + meta = localeMeta.get("en_GB"); + return meta.clone(); + } + + public void setLocaleMeta(String locale, ItemMeta meta) { + localeMeta.put(locale, meta); + } + + public String getName() { + return name; + } + + public int getID() { + return id; + } + + public String getMCEncodedID() { + return encodedID; + } + + public static String getMCEncodedID(int id) { + String hex = String.format("%08x", id); + StringBuilder out = new StringBuilder(); + for (char h : hex.toCharArray()) { + out.append(ChatColor.COLOR_CHAR); + out.append(h); + } + return out.toString(); + } + + private static int getStringWidth(String str) { + int width = 0; + for (int i = 0; i < str.length(); i++) { + char c = str.charAt(i); + width += Font.widths[c] + 1; + } + return width; + } + + private static int getStringWidthBold(String str) { + int width = 0; + for (int i = 0; i < str.length(); i++) { + char c = str.charAt(i); + width += Font.widths[c] + 2; + } + return width; + } + + public void print(CommandSender sender) { + String locale = sender instanceof Player ? Locale.getPlayerLocale((Player) sender) : "en_GB"; + List lines = getTooltipLines(locale); + for (String s : lines) { + sender.sendMessage(s); + } + sender.sendMessage(String.format(Locale.get("message.print.durability", locale), maxDurability)); + } + + public void setDisplay(String str) { + setDisplay(str, true); + } + + public void setDisplay(String str, boolean update) { + displayName = ChatColor.translateAlternateColorCodes('&', str); + if (update) + rebuild(); + } + + public String getDisplay() { + return quality.colour + ChatColor.BOLD + displayName; + } + + public void setType(String str) { + setType(str, true); + } + + public void setType(String str, boolean update) { + type = ChatColor.translateAlternateColorCodes('&', str); + if (update) + rebuild(); + } + + public String getType() { + return type; + } + + public void setHand(String h) { + setHand(h, true); + } + + public void setHand(String h, boolean update) { + hand = ChatColor.translateAlternateColorCodes('&', h); + if (update) + rebuild(); + } + + public String getHand() { + return hand; + } + + public void setDamage(int min, int max) { + setDamage(min, max, true); + } + + public void setDamage(int min, int max, boolean update) { + damageMin = min; + damageMax = max; + armour = 0; + if (update) + rebuild(); + } + + public int getDamageMin() { + return damageMin; + } + + public int getDamageMax() { + return damageMax; + } + + public int getRecipeChance() { + return recipechance; + } + + public void setRecipeChance(int p) { + setRecipeChance(p, true); + } + + public void setRecipeChance(int p, boolean update) { + recipechance = p; + if (update) + rebuild(); + } + + public String getPermission() { + return permission; + } + + public boolean getHasPermission() { + return haspermission; + } + + public void setPermission(String p) { + setPermission(p, true); + } + + public void setPermission(String p, boolean update) { + permission = p; + if (update) + rebuild(); + } + + public void setHaspermission(boolean b) { + setHaspermission(b, true); + } + + public void setHaspermission(boolean b, boolean update) { + haspermission = b; + if (update) + rebuild(); + } + + public void setArmour(int a) { + setArmour(a, true); + } + + public void setArmour(int a, boolean update) { + armour = a; + damageMin = damageMax = 0; + if (update) + rebuild(); + } + + public int getArmour() { + return armour; + } + + public void setLore(String str) { + setLore(str, true); + } + + public void setLore(String str, boolean update) { + loreText = ChatColor.translateAlternateColorCodes('&', str); + if (update) + rebuild(); + } + + public String getLore() { + return loreText; + } + + public void setQuality(Quality q) { + setQuality(q, true); + } + + public void setQuality(Quality q, boolean update) { + quality = q; + if (update) + rebuild(); + } + + public Quality getQuality() { + return quality; + } + + public void setItem(Material mat) { + setItem(mat, true); + } + + public void setItem(Material mat, boolean update) { + if (maxDurability == item.getType().getMaxDurability()) { + maxDurability = mat.getMaxDurability(); + } + item.setType(mat); + if (update) + rebuild(); + } + + public void setDataValue(short value, boolean update) { + item.setDurability(value); + if (update) + rebuild(); + } + + public void setDataValue(short value) { + item.setDurability(value); + } + + public short getDataValue() { + return item.getDurability(); + } + + public Material getItem() { + return item.getType(); + } + + public void setMaxDurability(int newVal) { + setMaxDurability(newVal, true); + } + + public void setMaxDurability(int newVal, boolean update) { + maxDurability = newVal; + if (update) + rebuild(); + } + + public int getMaxDurability() { + return maxDurability <= 0 ? -1 : maxDurability; + } + + public void give(Player player) { + player.getInventory().addItem(toItemStack(Locale.getPlayerLocale(player))); + } + + public void addPower(Power power) { + addPower(power, true); + } + + public void addPower(Power power, boolean update) { + powers.add(power); + Power.powerUsage.put(power.getName(), Power.powerUsage.get(power.getName()) + 1); + if (power instanceof PowerHit) { + powerHit.add((PowerHit) power); + } + if (power instanceof PowerLeftClick) { + powerLeftClick.add((PowerLeftClick) power); + } + if (power instanceof PowerRightClick) { + powerRightClick.add((PowerRightClick) power); + } + if (power instanceof PowerProjectileHit) { + powerProjectileHit.add((PowerProjectileHit) power); + } + if (power instanceof PowerTick) { + powerTick.add((PowerTick) power); + } + if (update) + rebuild(); + } + + public boolean removePower(String pow) { + Iterator it = powers.iterator(); + Power power = null; + while (it.hasNext()) { + Power p = it.next(); + if (p.getName().equalsIgnoreCase(pow)) { + it.remove(); + power = p; + rebuild(); + break; + } + } + if (power != null) { + if (power instanceof PowerHit) { + powerHit.remove((PowerHit) power); + } + if (power instanceof PowerLeftClick) { + powerLeftClick.remove(power); + } + if (power instanceof PowerRightClick) { + powerRightClick.remove(power); + } + if (power instanceof PowerProjectileHit) { + powerProjectileHit.remove(power); + } + if (power instanceof PowerTick) { + powerTick.remove(power); + } + } + return power != null; + } + + public void addDescription(String str) { + addDescription(str, true); + } + + public void addDescription(String str, boolean update) { + description.add(ChatColor.translateAlternateColorCodes('&', str)); + if (update) + rebuild(); + } + + public void toggleBar() { + forceBar = !forceBar; + rebuild(); + } + +} diff --git a/src/think/rpgitems/power/Power.java b/src/think/rpgitems/power/Power.java new file mode 100644 index 00000000..fb51a40d --- /dev/null +++ b/src/think/rpgitems/power/Power.java @@ -0,0 +1,64 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.power; + +import gnu.trove.map.hash.TObjectIntHashMap; + +import java.util.HashMap; +import java.util.HashSet; + +import org.bukkit.Location; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Entity; + +import think.rpgitems.item.RPGItem; + +public abstract class Power { + + public static HashMap> powers = new HashMap>(); + public static TObjectIntHashMap powerUsage = new TObjectIntHashMap(); + + public RPGItem item; + + public Power() { + + } + + public abstract void init(ConfigurationSection s); + + public abstract void save(ConfigurationSection s); + + public abstract String getName(); + + public abstract String displayText(String locale); + + public static Entity[] getNearbyEntities(Location l, double radius) { + int iRadius = (int) radius; + int chunkRadius = iRadius < 16 ? 1 : (iRadius - (iRadius % 16)) / 16; + HashSet radiusEntities = new HashSet(); + for (int chX = 0 - chunkRadius; chX <= chunkRadius; chX++) { + for (int chZ = 0 - chunkRadius; chZ <= chunkRadius; chZ++) { + int x = (int) l.getX(), y = (int) l.getY(), z = (int) l.getZ(); + for (Entity e : new Location(l.getWorld(), x + (chX * 16), y, z + (chZ * 16)).getChunk().getEntities()) { + if (e.getLocation().distance(l) <= radius && e.getLocation().getBlock() != l.getBlock()) + radiusEntities.add(e); + } + } + } + return radiusEntities.toArray(new Entity[radiusEntities.size()]); + } +} diff --git a/src/think/rpgitems/power/PowerArrow.java b/src/think/rpgitems/power/PowerArrow.java new file mode 100644 index 00000000..0da3162d --- /dev/null +++ b/src/think/rpgitems/power/PowerArrow.java @@ -0,0 +1,76 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.power; + +import org.bukkit.ChatColor; +import org.bukkit.Sound; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Arrow; +import org.bukkit.entity.Player; + +import think.rpgitems.Events; +import think.rpgitems.data.Locale; +import think.rpgitems.data.RPGValue; +import think.rpgitems.power.types.PowerRightClick; + +public class PowerArrow extends Power implements PowerRightClick{ + + public long cooldownTime = 20; + + @Override + public void rightClick(Player player) { + long cooldown; + if (item.getHasPermission() == true && player.hasPermission(item.getPermission()) == false){ + }else{ + RPGValue value = RPGValue.get(player, item, "arrow.cooldown"); + if (value == null) { + cooldown = System.currentTimeMillis() / 50; + value = new RPGValue(player, item, "arrow.cooldown", cooldown); + } else { + cooldown = value.asLong(); + } + if (cooldown <= System.currentTimeMillis() / 50) { + value.set(System.currentTimeMillis() / 50 + cooldownTime); + player.playSound(player.getLocation(), Sound.SHOOT_ARROW, 1.0f, 1.0f); + Arrow arrow = player.launchProjectile(Arrow.class); + Events.removeArrows.put(arrow.getEntityId(), (byte) 1); + } else { + player.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.cooldown", Locale.getPlayerLocale(player)), ((double) (cooldown - System.currentTimeMillis() / 50)) / 20d)); + } + } + } + + @Override + public String displayText(String locale) { + return ChatColor.GREEN + String.format(Locale.get("power.arrow", locale), (double) cooldownTime / 20d); + } + + @Override + public String getName() { + return "arrow"; + } + + @Override + public void init(ConfigurationSection s) { + cooldownTime = s.getLong("cooldown", 20); + } + + @Override + public void save(ConfigurationSection s) { + s.set("cooldown", cooldownTime); + } +} diff --git a/src/think/rpgitems/power/PowerCommand.java b/src/think/rpgitems/power/PowerCommand.java new file mode 100644 index 00000000..ca41af09 --- /dev/null +++ b/src/think/rpgitems/power/PowerCommand.java @@ -0,0 +1,138 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.power; + +import org.bukkit.ChatColor; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Player; +import org.bukkit.permissions.PermissionAttachment; + +import think.rpgitems.Plugin; +import think.rpgitems.data.Locale; +import think.rpgitems.data.RPGValue; +import think.rpgitems.power.types.PowerLeftClick; +import think.rpgitems.power.types.PowerRightClick; + +public class PowerCommand extends Power implements PowerRightClick, PowerLeftClick { + + public String command = ""; + public String display = "Runs command"; + public String permission = ""; + public boolean isRight = true; + public long cooldownTime = 20; + + @Override + public void rightClick(Player player) { + if (item.getHasPermission() == true && player.hasPermission(item.getPermission()) == false){ + }else{ + if (isRight) { + long cooldown; + RPGValue value = RPGValue.get(player, item, "command." + command + ".cooldown"); + if (value == null) { + cooldown = System.currentTimeMillis() / 50; + value = new RPGValue(player, item, "command." + command + ".cooldown", cooldown); + } else { + cooldown = value.asLong(); + } + if (cooldown <= System.currentTimeMillis() / 50) { + value.set(System.currentTimeMillis() / 50 + cooldownTime); + if (permission.length() != 0 && !permission.equals("*")) { + PermissionAttachment attachment = player.addAttachment(Plugin.plugin, 1); + String[] perms = permission.split("\\."); + StringBuilder p = new StringBuilder(); + for (int i = 0; i < perms.length; i++) { + p.append(perms[i]); + attachment.setPermission(p.toString(), true); + p.append('.'); + } + } + boolean wasOp = player.isOp(); + if (permission.equals("*")) + player.setOp(true); + player.chat("/" + command.replaceAll("\\{player\\}", player.getName())); + if (permission.equals("*")) + player.setOp(wasOp); + } else { + player.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.cooldown", Locale.getPlayerLocale(player)), ((double) (cooldown - System.currentTimeMillis() / 50)) / 20d)); + } + } + } + } + + @Override + public void leftClick(Player player) { + if (!isRight) { + long cooldown; + RPGValue value = RPGValue.get(player, item, "command." + command + ".cooldown"); + if (value == null) { + cooldown = System.currentTimeMillis() / 50; + value = new RPGValue(player, item, "command." + command + ".cooldown", cooldown); + } else { + cooldown = value.asLong(); + } + if (cooldown <= System.currentTimeMillis() / 50) { + value.set(System.currentTimeMillis() / 50 + cooldownTime); + if (permission.length() != 0 && !permission.equals("*")) { + PermissionAttachment attachment = player.addAttachment(Plugin.plugin, 1); + String[] perms = permission.split("\\."); + StringBuilder p = new StringBuilder(); + for (int i = 0; i < perms.length; i++) { + p.append(perms[i]); + attachment.setPermission(p.toString(), true); + p.append('.'); + } + } + boolean wasOp = player.isOp(); + if (permission.equals("*")) + player.setOp(true); + player.chat("/" + command.replaceAll("\\{player\\}", player.getName())); + if (permission.equals("*")) + player.setOp(wasOp); + } else { + player.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.cooldown", Locale.getPlayerLocale(player)), ((double) (cooldown - System.currentTimeMillis() / 50)) / 20d)); + } + } + } + + @Override + public String displayText(String locale) { + return ChatColor.GREEN + display; + } + + @Override + public String getName() { + return "command"; + } + + @Override + public void init(ConfigurationSection s) { + cooldownTime = s.getLong("cooldown", 20); + command = s.getString("command", ""); + display = s.getString("display", ""); + isRight = s.getBoolean("isRight", true); + permission = s.getString("permission", ""); + } + + @Override + public void save(ConfigurationSection s) { + s.set("cooldown", cooldownTime); + s.set("command", command); + s.set("display", display); + s.set("isRight", isRight); + s.set("permission", permission); + } +} diff --git a/src/think/rpgitems/power/PowerConsume.java b/src/think/rpgitems/power/PowerConsume.java new file mode 100644 index 00000000..d21fc9e9 --- /dev/null +++ b/src/think/rpgitems/power/PowerConsume.java @@ -0,0 +1,65 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.power; + +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; + +import think.rpgitems.data.Locale; +import think.rpgitems.power.types.PowerRightClick; + +public class PowerConsume extends Power implements PowerRightClick { + + @Override + public void rightClick(Player player) { + if (item.getHasPermission() == true && player.hasPermission(item.getPermission()) == false){ + }else{ + ItemStack item = player.getInventory().getItemInHand(); + int count = item.getAmount() - 1; + if (count == 0) { + item.setAmount(0); + item.setType(Material.AIR); + player.setItemInHand(null); + } else { + item.setAmount(count); + } + } + } + + @Override + public void init(ConfigurationSection s) { + + } + + @Override + public void save(ConfigurationSection s) { + + } + + @Override + public String getName() { + return "consume"; + } + + @Override + public String displayText(String locale) { + return ChatColor.GREEN + Locale.get("power.consume", locale); + } +} diff --git a/src/think/rpgitems/power/PowerFireball.java b/src/think/rpgitems/power/PowerFireball.java new file mode 100644 index 00000000..29a8cb44 --- /dev/null +++ b/src/think/rpgitems/power/PowerFireball.java @@ -0,0 +1,74 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.power; + +import org.bukkit.ChatColor; +import org.bukkit.Sound; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Player; +import org.bukkit.entity.SmallFireball; + +import think.rpgitems.data.Locale; +import think.rpgitems.data.RPGValue; +import think.rpgitems.power.types.PowerRightClick; + +public class PowerFireball extends Power implements PowerRightClick { + + public long cooldownTime = 20; + + @Override + public void rightClick(Player player) { + long cooldown; + if (item.getHasPermission() == true && player.hasPermission(item.getPermission()) == false){ + }else{ + RPGValue value = RPGValue.get(player, item, "tnt.fireball"); + if (value == null) { + cooldown = System.currentTimeMillis() / 50; + value = new RPGValue(player, item, "tnt.fireball", cooldown); + } else { + cooldown = value.asLong(); + } + if (cooldown <= System.currentTimeMillis() / 50) { + value.set(System.currentTimeMillis() / 50 + cooldownTime); + player.playSound(player.getLocation(), Sound.GHAST_FIREBALL, 1.0f, 1.0f); + player.launchProjectile(SmallFireball.class); + } else { + player.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.cooldown", Locale.getPlayerLocale(player)), ((double) (cooldown - System.currentTimeMillis() / 50)) / 20d)); + } + } + } + + @Override + public String displayText(String locale) { + return ChatColor.GREEN + String.format(Locale.get("power.fireball", locale), (double) cooldownTime / 20d); + } + + @Override + public String getName() { + return "fireball"; + } + + @Override + public void init(ConfigurationSection s) { + cooldownTime = s.getLong("cooldown", 20); + } + + @Override + public void save(ConfigurationSection s) { + s.set("cooldown", cooldownTime); + } +} diff --git a/src/think/rpgitems/power/PowerFlame.java b/src/think/rpgitems/power/PowerFlame.java new file mode 100644 index 00000000..3bc5c887 --- /dev/null +++ b/src/think/rpgitems/power/PowerFlame.java @@ -0,0 +1,58 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.power; + +import org.bukkit.ChatColor; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; + +import think.rpgitems.data.Locale; +import think.rpgitems.power.types.PowerHit; + +public class PowerFlame extends Power implements PowerHit { + + public int burnTime = 20; + + @Override + public void hit(Player player, LivingEntity e, double damage) { + if (item.getHasPermission() == true && player.hasPermission(item.getPermission()) == false){ + }else{ + e.setFireTicks(burnTime); + } + } + + @Override + public String displayText(String locale) { + return ChatColor.GREEN + String.format(Locale.get("power.flame", locale), (double) burnTime / 20d); + } + + @Override + public String getName() { + return "flame"; + } + + @Override + public void init(ConfigurationSection s) { + burnTime = s.getInt("burntime"); + } + + @Override + public void save(ConfigurationSection s) { + s.set("burntime", burnTime); + } +} diff --git a/src/think/rpgitems/power/PowerFood.java b/src/think/rpgitems/power/PowerFood.java new file mode 100644 index 00000000..d1fa2547 --- /dev/null +++ b/src/think/rpgitems/power/PowerFood.java @@ -0,0 +1,67 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.power; + +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; + +import think.rpgitems.data.Locale; +import think.rpgitems.power.types.PowerRightClick; + +public class PowerFood extends Power implements PowerRightClick { + public int foodpoints; + @Override + public void rightClick(Player player) { + if (item.getHasPermission() == true && player.hasPermission(item.getPermission()) == false){ + }else{ + ItemStack item = player.getInventory().getItemInHand(); + int count = item.getAmount() - 1; + if (count == 0) { + player.setFoodLevel(player.getFoodLevel() + foodpoints); + item.setAmount(0); + item.setType(Material.AIR); + player.setItemInHand(item); + } else { + player.setFoodLevel(player.getFoodLevel() + foodpoints); + item.setAmount(count); + } + } + } + + @Override + public void init(ConfigurationSection s) { + foodpoints = s.getInt("foodpoints"); + } + + @Override + public void save(ConfigurationSection s) { + s.set("foodpoints", foodpoints); + } + + @Override + public String getName() { + return "food"; + } + + @Override + public String displayText(String locale) { + return ChatColor.GREEN + String.format(Locale.get("power.food", locale),foodpoints); + } +} diff --git a/src/think/rpgitems/power/PowerIce.java b/src/think/rpgitems/power/PowerIce.java new file mode 100644 index 00000000..e19c34ff --- /dev/null +++ b/src/think/rpgitems/power/PowerIce.java @@ -0,0 +1,183 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.power; + +import gnu.trove.map.hash.TObjectLongHashMap; + +import java.util.List; +import java.util.Random; + +import org.bukkit.ChatColor; +import org.bukkit.Effect; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.Sound; +import org.bukkit.World; +import org.bukkit.block.Block; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Entity; +import org.bukkit.entity.FallingBlock; +import org.bukkit.entity.Player; +import org.bukkit.scheduler.BukkitRunnable; + +import think.rpgitems.Plugin; +import think.rpgitems.data.Locale; +import think.rpgitems.data.RPGValue; +import think.rpgitems.power.types.PowerRightClick; + +public class PowerIce extends Power implements PowerRightClick { + + public long cooldownTime = 20; + + @Override + public void rightClick(final Player player) { + long cooldown; + if (item.getHasPermission() == true && player.hasPermission(item.getPermission()) == false){ + }else{ + RPGValue value = RPGValue.get(player, item, "ice.cooldown"); + if (value == null) { + cooldown = System.currentTimeMillis() / 50; + value = new RPGValue(player, item, "ice.cooldown", cooldown); + } else { + cooldown = value.asLong(); + } + if (cooldown <= System.currentTimeMillis() / 50) { + value.set(System.currentTimeMillis() / 50 + cooldownTime); + player.playSound(player.getLocation(), Sound.FIZZ, 1.0f, 0.1f); + final FallingBlock block = player.getWorld().spawnFallingBlock(player.getLocation().add(0, 1.8, 0), Material.ICE, (byte) 0); + block.setVelocity(player.getLocation().getDirection().multiply(2d)); + block.setDropItem(false); + BukkitRunnable run = new BukkitRunnable() { + + @SuppressWarnings("deprecation") + public void run() { + boolean hit = false; + World world = block.getWorld(); + Location bLoc = block.getLocation(); + loop: for (int x = -1; x < 2; x++) { + for (int y = -1; y < 2; y++) { + for (int z = -1; z < 2; z++) { + Location loc = block.getLocation().add(x, y, z); + if (world.getBlockTypeIdAt(loc) != Material.AIR.getId()) { + Block b = world.getBlockAt(loc); + if (b.getType().isSolid()) { + if (checkBlock(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), 1, 1, 1, bLoc.getX() - 0.5d, bLoc.getY() - 0.5d, bLoc.getZ() - 0.5d, 1, 1, 1)) { + hit = true; + break loop; + } + } + } + } + } + } + if (!hit) { + List entities = block.getNearbyEntities(1, 1, 1); + for (Entity e : entities) { + if (e != player) { + hit = true; + break; + } + } + } + if (block.isDead() || hit) { + block.remove(); + block.getLocation().getBlock().setType(Material.AIR); + cancel(); + final TObjectLongHashMap changedBlocks = new gnu.trove.map.hash.TObjectLongHashMap(); + for (int x = -1; x < 2; x++) { + for (int y = -1; y < 3; y++) { + for (int z = -1; z < 2; z++) { + Location loc = block.getLocation().add(x, y, z); + Block b = world.getBlockAt(loc); + if (!b.getType().isSolid()) { + changedBlocks.put(b.getLocation(), b.getTypeId() | (b.getData() << 16)); + b.setType(Material.ICE); + } + } + } + } + (new BukkitRunnable() { + Random random = new Random(); + + @SuppressWarnings("deprecation") + public void run() { + for (int i = 0; i < 4; i++) { + if (changedBlocks.isEmpty()) { + cancel(); + return; + } + int index = random.nextInt(changedBlocks.size()); + long data = changedBlocks.values()[index]; + Location position = (Location) changedBlocks.keys()[index]; + changedBlocks.remove(position); + Block c = position.getBlock(); + position.getWorld().playEffect(position, Effect.STEP_SOUND, c.getTypeId()); + c.setTypeId((int) (data & 0xFFFF)); + c.setData((byte) (data >> 16)); + } + + } + }).runTaskTimer(Plugin.plugin, 4 * 20 + new Random().nextInt(40), 3); + } + + } + }; + run.runTaskTimer(Plugin.plugin, 0, 1); + + } else { + player.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.cooldown", Locale.getPlayerLocale(player)), ((double) (cooldown - System.currentTimeMillis() / 50)) / 20d)); + } + } + } + + private boolean checkBlock(double x1, double y1, double z1, double w1, double h1, double d1, double x2, double y2, double z2, double w2, double h2, double d2) { + if (x1 + w1 < x2) + return false; + if (x2 + w2 < x1) + return false; + if (y1 + h1 < y2) + return false; + if (y2 + h2 < y1) + return false; + if (z1 + d1 < z2) + return false; + if (z2 + d2 < z1) + return false; + + return true; + } + + @Override + public String displayText(String locale) { + return ChatColor.GREEN + String.format(Locale.get("power.ice", locale), (double) cooldownTime / 20d); + } + + @Override + public String getName() { + return "ice"; + } + + @Override + public void init(ConfigurationSection s) { + cooldownTime = s.getLong("cooldown", 20); + } + + @Override + public void save(ConfigurationSection s) { + s.set("cooldown", cooldownTime); + } +} diff --git a/src/think/rpgitems/power/PowerKnockup.java b/src/think/rpgitems/power/PowerKnockup.java new file mode 100644 index 00000000..fb797c35 --- /dev/null +++ b/src/think/rpgitems/power/PowerKnockup.java @@ -0,0 +1,65 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.power; + +import java.util.Random; + +import org.bukkit.ChatColor; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; + +import think.rpgitems.data.Locale; +import think.rpgitems.power.types.PowerHit; + +public class PowerKnockup extends Power implements PowerHit { + + public int chance = 20; + public double power = 2; + + private Random rand = new Random(); + + @Override + public void hit(Player player, LivingEntity e, double damage) { + if (item.getHasPermission() == true && player.hasPermission(item.getPermission()) == false){ + }else if (rand.nextInt(chance) == 0) + e.setVelocity(player.getLocation().getDirection().setY(power)); + } + + @Override + public String displayText(String locale) { + return ChatColor.GREEN + String.format(Locale.get("power.knockup", locale), (int) ((1d / (double) chance) * 100d)); + } + + @Override + public String getName() { + return "knockup"; + } + + @Override + public void init(ConfigurationSection s) { + chance = s.getInt("chance"); + power = s.getDouble("power", 2); + } + + @Override + public void save(ConfigurationSection s) { + s.set("chance", chance); + s.set("power", power); + } + +} diff --git a/src/think/rpgitems/power/PowerLifeSteal.java b/src/think/rpgitems/power/PowerLifeSteal.java new file mode 100644 index 00000000..99012a51 --- /dev/null +++ b/src/think/rpgitems/power/PowerLifeSteal.java @@ -0,0 +1,63 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.power; + +import java.util.Random; + +import org.bukkit.ChatColor; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; + +import think.rpgitems.data.Locale; +import think.rpgitems.power.types.PowerHit; + +public class PowerLifeSteal extends Power implements PowerHit { + + public int chance = 20; + private Random random = new Random(); + @Override + public void hit(Player player, LivingEntity e, double damage) { + if (item.getHasPermission() == true && player.hasPermission(item.getPermission()) == false){ + }else if (random.nextInt(chance) == 0){ + if ((player.getHealth() + damage) >= player.getMaxHealth()){ + player.setHealth(player.getMaxHealth()); + }else + player.setHealth(player.getHealth() + damage); + } + } + + @Override + public String displayText(String locale) { + return ChatColor.GREEN + String.format(Locale.get("power.lifesteal", locale), (double) chance); + } + + @Override + public String getName() { + return "lifesteal"; + } + + @Override + public void init(ConfigurationSection s) { + chance = s.getInt("chance"); + } + + @Override + public void save(ConfigurationSection s) { + s.set("chance", chance); + } +} diff --git a/src/think/rpgitems/power/PowerLightning.java b/src/think/rpgitems/power/PowerLightning.java new file mode 100644 index 00000000..5b2bcb9c --- /dev/null +++ b/src/think/rpgitems/power/PowerLightning.java @@ -0,0 +1,70 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.power; + +import java.util.Random; + +import org.bukkit.ChatColor; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; +import org.bukkit.entity.Projectile; + +import think.rpgitems.data.Locale; +import think.rpgitems.power.types.PowerHit; +import think.rpgitems.power.types.PowerProjectileHit; + +public class PowerLightning extends Power implements PowerHit, PowerProjectileHit { + + public int chance = 20; + private Random random = new Random(); + + @Override + public void hit(Player player, LivingEntity e, double damage) { + if (item.getHasPermission() == true && player.hasPermission(item.getPermission()) == false){ + }else if (random.nextInt(chance) == 0) + e.getWorld().strikeLightning(e.getLocation()); + } + + @Override + public void projectileHit(Player player, Projectile p) { + if (item.getHasPermission() == true && player.hasPermission(item.getPermission()) == false){ + player.sendMessage(ChatColor.RED + String.format(Locale.get("message.error.permission", Locale.getPlayerLocale(player)))); + }else if (random.nextInt(chance) == 0) + p.getWorld().strikeLightning(p.getLocation()); + } + + @Override + public String displayText(String locale) { + return ChatColor.GREEN + String.format(Locale.get("power.lightning", locale), (int) ((1d / (double) chance) * 100d)); + } + + @Override + public String getName() { + return "lightning"; + } + + @Override + public void init(ConfigurationSection s) { + chance = s.getInt("chance"); + } + + @Override + public void save(ConfigurationSection s) { + s.set("chance", chance); + } +} diff --git a/src/think/rpgitems/power/PowerPotionHit.java b/src/think/rpgitems/power/PowerPotionHit.java new file mode 100644 index 00000000..cbb0a4f5 --- /dev/null +++ b/src/think/rpgitems/power/PowerPotionHit.java @@ -0,0 +1,71 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.power; + +import java.util.Random; + +import org.bukkit.ChatColor; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; + +import think.rpgitems.data.Locale; +import think.rpgitems.power.types.PowerHit; + +public class PowerPotionHit extends Power implements PowerHit { + + public int chance = 20; + private Random random = new Random(); + public PotionEffectType type = PotionEffectType.HARM; + public int duration = 20; + public int amplifier = 1; + + @Override + public void hit(Player player, LivingEntity e, double damage) { + if (item.getHasPermission() == true && player.hasPermission(item.getPermission()) == false){ + }else if (random.nextInt(chance) == 0) + e.addPotionEffect(new PotionEffect(type, duration, amplifier)); + } + + @Override + public String displayText(String locale) { + return ChatColor.GREEN + String.format(Locale.get("power.potionhit", locale), (int) ((1d / (double) chance) * 100d), type.getName().toLowerCase().replace('_', ' ')); + } + + @Override + public String getName() { + return "potionhit"; + } + + @Override + public void init(ConfigurationSection s) { + chance = s.getInt("chance", 20); + duration = s.getInt("duration", 20); + amplifier = s.getInt("amplifier", 1); + type = PotionEffectType.getByName(s.getString("type", PotionEffectType.HARM.getName())); + } + + @Override + public void save(ConfigurationSection s) { + s.set("chance", chance); + s.set("duration", duration); + s.set("amplifier", amplifier); + s.set("type", type.getName()); + } +} diff --git a/src/think/rpgitems/power/PowerPotionSelf.java b/src/think/rpgitems/power/PowerPotionSelf.java new file mode 100644 index 00000000..31df8167 --- /dev/null +++ b/src/think/rpgitems/power/PowerPotionSelf.java @@ -0,0 +1,83 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.power; + +import org.bukkit.ChatColor; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Player; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; + +import think.rpgitems.data.Locale; +import think.rpgitems.data.RPGValue; +import think.rpgitems.power.types.PowerRightClick; + +public class PowerPotionSelf extends Power implements PowerRightClick { + + public long cooldownTime = 20; + public int amplifier = 3; + public int time = 20; + public PotionEffectType type = PotionEffectType.HEAL; + + @Override + public void rightClick(Player player) { + long cooldown; + if (item.getHasPermission() == true && player.hasPermission(item.getPermission()) == false){ + }else{ + RPGValue value = RPGValue.get(player, item, "potionself.cooldown"); + if (value == null) { + cooldown = System.currentTimeMillis() / 50; + value = new RPGValue(player, item, "potionself.cooldown", cooldown); + } else { + cooldown = value.asLong(); + } + if (cooldown <= System.currentTimeMillis() / 50) { + value.set(System.currentTimeMillis() / 50 + cooldownTime); + player.addPotionEffect(new PotionEffect(type, time, amplifier)); + } else { + player.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.cooldown", Locale.getPlayerLocale(player)), ((double) (cooldown - System.currentTimeMillis() / 50)) / 20d)); + } + } + } + + @Override + public void init(ConfigurationSection s) { + cooldownTime = s.getLong("cooldown"); + amplifier = s.getInt("amp"); + time = s.getInt("time"); + type = PotionEffectType.getByName(s.getString("type", "heal")); + } + + @Override + public void save(ConfigurationSection s) { + s.set("cooldown", cooldownTime); + s.set("amp", amplifier); + s.set("time", time); + s.set("type", type.getName()); + } + + @Override + public String getName() { + return "potionself"; + } + + @Override + public String displayText(String locale) { + return ChatColor.GREEN + String.format(Locale.get("power.potionself", locale), type.getName().toLowerCase().replaceAll("_", " "), amplifier + 1, ((double) time) / 20d); + } + +} diff --git a/src/think/rpgitems/power/PowerPotionTick.java b/src/think/rpgitems/power/PowerPotionTick.java new file mode 100644 index 00000000..6c0a9412 --- /dev/null +++ b/src/think/rpgitems/power/PowerPotionTick.java @@ -0,0 +1,61 @@ +package think.rpgitems.power; + +import org.bukkit.ChatColor; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Player; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; + +import think.rpgitems.data.Locale; +import think.rpgitems.power.types.PowerTick; + +public class PowerPotionTick extends Power implements PowerTick { + + public int amplifier = 2; + public PotionEffectType effect = PotionEffectType.SPEED; + + @Override + public void tick(Player player) { + if (item.getHasPermission() == true && player.hasPermission(item.getPermission()) == false){ + player.sendMessage(ChatColor.RED + String.format(Locale.get("message.error.permission", Locale.getPlayerLocale(player)))); + }else{ + boolean hasEffect = false; + for (PotionEffect potionEffect : player.getActivePotionEffects()) { + if (potionEffect.getType().equals(effect) && potionEffect.getDuration() == 25) { + player.addPotionEffect(new PotionEffect(effect, 30, amplifier, true), true); + hasEffect = true; + break; + } + } + if (!hasEffect) { + player.addPotionEffect(new PotionEffect(effect, 30, amplifier, true), true); + } + } + + } + + @Override + public void init(ConfigurationSection s) { + amplifier = s.getInt("amplifier"); + effect = PotionEffectType.getByName(s.getString("effect", "heal")); + + } + + @Override + public void save(ConfigurationSection s) { + s.set("amplifier", amplifier); + s.set("effect", effect.getName()); + + } + + @Override + public String getName() { + return "potiontick"; + } + + @Override + public String displayText(String locale) { + return ChatColor.GREEN + String.format(Locale.get("power.potiontick", locale), effect.getName().toLowerCase().replaceAll("_", " "), amplifier + 1); + } + +} diff --git a/src/think/rpgitems/power/PowerRainbow.java b/src/think/rpgitems/power/PowerRainbow.java new file mode 100644 index 00000000..71db65f3 --- /dev/null +++ b/src/think/rpgitems/power/PowerRainbow.java @@ -0,0 +1,133 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.power; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.Random; + +import org.bukkit.ChatColor; +import org.bukkit.Effect; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.Sound; +import org.bukkit.block.Block; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.FallingBlock; +import org.bukkit.entity.Player; +import org.bukkit.scheduler.BukkitRunnable; +import org.bukkit.util.Vector; + +import think.rpgitems.Plugin; +import think.rpgitems.data.Locale; +import think.rpgitems.data.RPGValue; +import think.rpgitems.power.types.PowerRightClick; + +public class PowerRainbow extends Power implements PowerRightClick { + + public long cooldownTime = 20; + public int count = 5; + private Random random = new Random(); + + @Override + public void rightClick(Player player) { + long cooldown; + if (item.getHasPermission() == true && player.hasPermission(item.getPermission()) == false){ + }else{ + RPGValue value = RPGValue.get(player, item, "arrow.rainbow"); + if (value == null) { + cooldown = System.currentTimeMillis() / 50; + value = new RPGValue(player, item, "arrow.rainbow", cooldown); + } else { + cooldown = value.asLong(); + } + if (cooldown <= System.currentTimeMillis() / 50) { + value.set(System.currentTimeMillis() / 50 + cooldownTime); + player.playSound(player.getLocation(), Sound.SHOOT_ARROW, 1.0f, 1.0f); + final ArrayList blocks = new ArrayList(); + for (int i = 0; i < count; i++) { + FallingBlock block = player.getWorld().spawnFallingBlock(player.getLocation().add(0, 1.8, 0), Material.WOOL, (byte) random.nextInt(16)); + block.setVelocity(player.getLocation().getDirection().multiply(new Vector(random.nextDouble() * 2d + 0.5, random.nextDouble() * 2d + 0.5, random.nextDouble() * 2d + 0.5))); + block.setDropItem(false); + blocks.add(block); + } + (new BukkitRunnable() { + + ArrayList fallLocs = new ArrayList(); + Random random = new Random(); + + public void run() { + + Iterator l = fallLocs.iterator(); + while (l.hasNext()) { + Location loc = l.next(); + if (random.nextBoolean()) { + Block b = loc.getBlock(); + if (b.getType() == Material.WOOL) { + loc.getWorld().playEffect(loc, Effect.STEP_SOUND, Material.WOOL.getId(), b.getData()); + b.setType(Material.AIR); + } + l.remove(); + } + if (random.nextInt(5) == 0) { + break; + } + } + + Iterator it = blocks.iterator(); + while (it.hasNext()) { + FallingBlock block = it.next(); + if (block.isDead()) { + fallLocs.add(block.getLocation()); + it.remove(); + } + } + + if (fallLocs.isEmpty() && blocks.isEmpty()) { + cancel(); + } + + } + }).runTaskTimer(Plugin.plugin, 0, 5); + } else { + player.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.cooldown", Locale.getPlayerLocale(player)), ((double) (cooldown - System.currentTimeMillis() / 50)) / 20d)); + } + } + } + + @Override + public String displayText(String locale) { + return ChatColor.GREEN + String.format(Locale.get("power.rainbow", locale), count, (double) cooldownTime / 20d); + } + + @Override + public String getName() { + return "rainbow"; + } + + @Override + public void init(ConfigurationSection s) { + cooldownTime = s.getLong("cooldown", 20); + count = s.getInt("count", 5); + } + + @Override + public void save(ConfigurationSection s) { + s.set("cooldown", cooldownTime); + s.set("count", count); + } +} diff --git a/src/think/rpgitems/power/PowerRumble.java b/src/think/rpgitems/power/PowerRumble.java new file mode 100644 index 00000000..d2de1a1c --- /dev/null +++ b/src/think/rpgitems/power/PowerRumble.java @@ -0,0 +1,136 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.power; + +import java.util.Random; + +import org.bukkit.ChatColor; +import org.bukkit.Effect; +import org.bukkit.Location; +import org.bukkit.block.Block; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; +import org.bukkit.scheduler.BukkitRunnable; +import org.bukkit.util.Vector; + +import think.rpgitems.Plugin; +import think.rpgitems.data.Locale; +import think.rpgitems.data.RPGValue; +import think.rpgitems.power.types.PowerRightClick; + +public class PowerRumble extends Power implements PowerRightClick { + + public long cooldownTime = 20; + public int power = 2; + public int distance = 15; + + @Override + public void init(ConfigurationSection s) { + cooldownTime = s.getLong("cooldown", 20); + power = s.getInt("power", 2); + distance = s.getInt("distance", 15); + } + + @Override + public void save(ConfigurationSection s) { + s.set("cooldown", cooldownTime); + s.set("power", power); + s.set("distance", distance); + } + + @Override + public void rightClick(final Player player) { + long cooldown; + if (item.getHasPermission() == true && player.hasPermission(item.getPermission()) == false){ + }else{ + RPGValue value = RPGValue.get(player, item, "rumble.cooldown"); + if (value == null) { + cooldown = System.currentTimeMillis() / 50; + value = new RPGValue(player, item, "rumble.cooldown", cooldown); + } else { + cooldown = value.asLong(); + } + if (cooldown <= System.currentTimeMillis() / 50) { + value.set(System.currentTimeMillis() / 50 + cooldownTime); + final Location location = player.getLocation().add(0, -0.2, 0); + final Vector direction = player.getLocation().getDirection(); + direction.setY(0); + direction.normalize(); + BukkitRunnable task = new BukkitRunnable() { + + private int count = 0; + + public void run() { + Location above = location.clone().add(0, 1, 0); + if (above.getBlock().getType().isSolid() || !location.getBlock().getType().isSolid()) { + cancel(); + return; + } + + Location temp = location.clone(); + for (int x = -2; x <= 2; x++) { + for (int z = -2; z <= 2; z++) { + temp.setX(x + location.getBlockX()); + temp.setZ(z + location.getBlockZ()); + Block block = temp.getBlock(); + temp.getWorld().playEffect(temp, Effect.STEP_SOUND, block.getTypeId()); + } + } + Entity[] near = getNearbyEntities(location, 1.5); + boolean hit = false; + Random random = new Random(); + for (Entity e : near) { + if (e != player) { + hit = true; + break; + } + } + if (hit) { + location.getWorld().createExplosion(location.getX(), location.getY(), location.getZ(), power, false, false); + near = getNearbyEntities(location, 2.5); + for (Entity e : near) { + if (e != player) + e.setVelocity(new Vector(random.nextGaussian() / 4d, 1d + random.nextDouble() * (double) power, random.nextGaussian() / 4d)); + } + cancel(); + return; + } + location.add(direction); + if (count >= distance) { + cancel(); + } + count++; + } + }; + task.runTaskTimer(Plugin.plugin, 0, 3); + } else { + player.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.cooldown", Locale.getPlayerLocale(player)), ((double) (cooldown - System.currentTimeMillis() / 50)) / 20d)); + } + } + } + + @Override + public String getName() { + return "rumble"; + } + + @Override + public String displayText(String locale) { + return ChatColor.GREEN + String.format(Locale.get("power.rumble", locale), (double) cooldownTime / 20d); + } +} diff --git a/src/think/rpgitems/power/PowerRush.java b/src/think/rpgitems/power/PowerRush.java new file mode 100644 index 00000000..d73169f8 --- /dev/null +++ b/src/think/rpgitems/power/PowerRush.java @@ -0,0 +1,79 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.power; + +import org.bukkit.ChatColor; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Player; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; + +import think.rpgitems.data.Locale; +import think.rpgitems.data.RPGValue; +import think.rpgitems.power.types.PowerRightClick; + +@Deprecated +public class PowerRush extends Power implements PowerRightClick { + + private long cd = 20; + private int speed = 3; + private int time = 20; + + @Override + public void rightClick(Player player) { + long cooldown; + if (item.getHasPermission() == true && player.hasPermission(item.getPermission()) == false){ + }else{ + RPGValue value = RPGValue.get(player, item, "rush.cooldown"); + if (value == null) { + cooldown = System.currentTimeMillis() / 50; + value = new RPGValue(player, item, "rush.cooldown", cooldown); + } else { + cooldown = value.asLong(); + } + if (cooldown <= System.currentTimeMillis() / 50) { + value.set(System.currentTimeMillis() / 50 + cd); + player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, time, speed)); + } + } + } + + @Override + public void init(ConfigurationSection s) { + cd = s.getLong("cooldown"); + speed = s.getInt("speed"); + time = s.getInt("time"); + } + + @Override + public void save(ConfigurationSection s) { + s.set("cooldown", cd); + s.set("speed", speed); + s.set("time", time); + } + + @Override + public String getName() { + return "rush"; + } + + @Override + public String displayText(String locale) { + return ChatColor.GREEN + "Gives temporary speed boost"; + } + +} diff --git a/src/think/rpgitems/power/PowerSkyHook.java b/src/think/rpgitems/power/PowerSkyHook.java new file mode 100644 index 00000000..9f87ba2b --- /dev/null +++ b/src/think/rpgitems/power/PowerSkyHook.java @@ -0,0 +1,112 @@ +package think.rpgitems.power; + +import org.bukkit.ChatColor; +import org.bukkit.GameMode; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Player; +import org.bukkit.scheduler.BukkitRunnable; +import org.bukkit.util.Vector; + +import think.rpgitems.Plugin; +import think.rpgitems.data.Locale; +import think.rpgitems.data.RPGValue; +import think.rpgitems.power.types.PowerRightClick; + +public class PowerSkyHook extends Power implements PowerRightClick { + + public Material railMaterial = Material.GLASS; + public int hookDistance = 10; + + @Override + public void rightClick(final Player player) { + if (item.getHasPermission() == true && player.hasPermission(item.getPermission()) == false){ + }else{ + RPGValue isHooking = RPGValue.get(player, item, "skyhook.isHooking"); + if (isHooking == null) { + isHooking = new RPGValue(player, item, "skyhook.isHooking", false); + } + if (isHooking.asBoolean()) { + player.setVelocity(player.getLocation().getDirection()); + isHooking.set(false); + return; + } + Block block = player.getTargetBlock(null, hookDistance); + if (block.getType() != railMaterial) { + player.sendMessage(ChatColor.AQUA + Locale.get("message.skyhook.fail", Locale.getPlayerLocale(player))); + return; + } + isHooking.set(true); + final Location location = player.getLocation(); + player.setAllowFlight(true); + player.setVelocity(location.getDirection().multiply(block.getLocation().distance(location) / 2d)); + player.setFlying(true); + (new BukkitRunnable() { + + private int delay = 0; + + @Override + public void run() { + if (!player.getAllowFlight()) { + cancel(); + RPGValue.get(player, item, "skyhook.isHooking").set(false); + return; + } + if (!RPGValue.get(player, item, "skyhook.isHooking").asBoolean()) { + player.setFlying(false); + if (player.getGameMode() != GameMode.CREATIVE) + player.setAllowFlight(false); + cancel(); + return; + } + player.setFlying(true); + player.getLocation(location); + location.add(0, 2.4, 0); + if (delay < 20) { + delay++; + if (location.getBlock().getType() == railMaterial) { + delay = 20; + } + return; + } + Vector dir = location.getDirection().setY(0).normalize(); + location.add(dir); + if (location.getBlock().getType() != railMaterial) { + player.setFlying(false); + if (player.getGameMode() != GameMode.CREATIVE) + player.setAllowFlight(false); + cancel(); + RPGValue.get(player, item, "skyhook.isHooking").set(false); + return; + } + player.setVelocity(dir.multiply(0.5)); + + } + }).runTaskTimer(Plugin.plugin, 0, 0); + } + } + @Override + public void init(ConfigurationSection s) { + railMaterial = Material.valueOf(s.getString("railMaterial", "GLASS")); + hookDistance = s.getInt("hookDistance", 10); + } + + @Override + public void save(ConfigurationSection s) { + s.set("railMaterial", railMaterial.toString()); + s.set("hookDistance", hookDistance); + } + + @Override + public String getName() { + return "skyhook"; + } + + @Override + public String displayText(String locale) { + return ChatColor.GREEN + Locale.get("power.skyhook", locale); + } + +} diff --git a/src/think/rpgitems/power/PowerTNTCannon.java b/src/think/rpgitems/power/PowerTNTCannon.java new file mode 100644 index 00000000..65cd6b60 --- /dev/null +++ b/src/think/rpgitems/power/PowerTNTCannon.java @@ -0,0 +1,75 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.power; + +import org.bukkit.ChatColor; +import org.bukkit.Sound; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Player; +import org.bukkit.entity.TNTPrimed; + +import think.rpgitems.data.Locale; +import think.rpgitems.data.RPGValue; +import think.rpgitems.power.types.PowerRightClick; + +public class PowerTNTCannon extends Power implements PowerRightClick { + + public long cooldownTime = 20; + + @Override + public void rightClick(Player player) { + long cooldown; + if (item.getHasPermission() == true && player.hasPermission(item.getPermission()) == false){ + }else{ + RPGValue value = RPGValue.get(player, item, "tnt.cooldown"); + if (value == null) { + cooldown = System.currentTimeMillis() / 50; + value = new RPGValue(player, item, "tnt.cooldown", cooldown); + } else { + cooldown = value.asLong(); + } + if (cooldown <= System.currentTimeMillis() / 50) { + value.set(System.currentTimeMillis() / 50 + cooldownTime); + player.playSound(player.getLocation(), Sound.SHOOT_ARROW, 1.0f, 1.0f); + TNTPrimed tnt = player.getWorld().spawn(player.getLocation().add(0, 1.8, 0), TNTPrimed.class); + tnt.setVelocity(player.getLocation().getDirection().multiply(2d)); + } else { + player.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.cooldown", Locale.getPlayerLocale(player)), ((double) (cooldown - System.currentTimeMillis() / 50)) / 20d)); + } + } + } + + @Override + public String displayText(String locale) { + return ChatColor.GREEN + String.format(Locale.get("power.tntcannon", locale), (double) cooldownTime / 20d); + } + + @Override + public String getName() { + return "tntcannon"; + } + + @Override + public void init(ConfigurationSection s) { + cooldownTime = s.getLong("cooldown", 20); + } + + @Override + public void save(ConfigurationSection s) { + s.set("cooldown", cooldownTime); + } +} diff --git a/src/think/rpgitems/power/PowerTeleport.java b/src/think/rpgitems/power/PowerTeleport.java new file mode 100644 index 00000000..0715b7d4 --- /dev/null +++ b/src/think/rpgitems/power/PowerTeleport.java @@ -0,0 +1,143 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.power; + +import org.bukkit.ChatColor; +import org.bukkit.Effect; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.Sound; +import org.bukkit.World; +import org.bukkit.block.Block; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Player; +import org.bukkit.entity.Projectile; +import org.bukkit.util.BlockIterator; + +import think.rpgitems.data.Locale; +import think.rpgitems.data.RPGValue; +import think.rpgitems.power.types.PowerProjectileHit; +import think.rpgitems.power.types.PowerRightClick; + +public class PowerTeleport extends Power implements PowerRightClick, PowerProjectileHit { + + public int distance = 5; + public long cooldownTime = 20; + + @Override + public void rightClick(Player player) { + long cooldown; + if (item.getHasPermission() == true && player.hasPermission(item.getPermission()) == false){ + }else{ + RPGValue value = RPGValue.get(player, item, "teleport.cooldown"); + if (value == null) { + cooldown = System.currentTimeMillis() / 50; + value = new RPGValue(player, item, "teleport.cooldown", cooldown); + } else { + cooldown = value.asLong(); + } + if (cooldown <= System.currentTimeMillis() / 50) { + value.set(System.currentTimeMillis() / 50 + cooldownTime); + // float dist = 0; + World world = player.getWorld(); + Location start = player.getLocation(); + start.setY(start.getY() + 1.6); + // Location current = new Location(world, 0, 0, 0); + Block lastSafe = world.getBlockAt(start); + // Keeping the old method because BlockIterator could get removed (irc) + // double dir = Math.toRadians(start.getYaw()) + (Math.PI / 2d); + // double dirY = Math.toRadians(start.getPitch()) + (Math.PI / 2d); + BlockIterator bi = new BlockIterator(player, distance); + // while (dist < distance) { + while (bi.hasNext()) { + // current.setX(start.getX() + dist * Math.cos(dir) * + // Math.sin(dirY)); + // current.setY(start.getY() + dist * Math.cos(dirY)); + // current.setZ(start.getZ() + dist * Math.sin(dir) * + // Math.sin(dirY)); + Block block = bi.next();// world.getBlockAt(current); + if (!block.getType().isSolid() || (block.getType() == Material.AIR)) { + lastSafe = block; + } else { + break; + } + // dist+= 0.5; + } + Location newLoc = lastSafe.getLocation(); + newLoc.setPitch(start.getPitch()); + newLoc.setYaw(start.getYaw()); + player.teleport(newLoc); + world.playEffect(newLoc, Effect.ENDER_SIGNAL, 0); + world.playSound(newLoc, Sound.ENDERMAN_TELEPORT, 1.0f, 0.3f); + } else { + player.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.cooldown", Locale.getPlayerLocale(player)), ((double) (cooldown - System.currentTimeMillis() / 50)) / 20d)); + } + } + } + + @Override + public void projectileHit(Player player, Projectile p) { + long cooldown; + RPGValue value = RPGValue.get(player, item, "teleport.cooldown"); + if (value == null) { + cooldown = System.currentTimeMillis() / 50; + value = new RPGValue(player, item, "teleport.cooldown", cooldown); + } else { + cooldown = value.asLong(); + } + if (cooldown <= System.currentTimeMillis() / 50) { + value.set(System.currentTimeMillis() / 50 + cooldownTime); + World world = player.getWorld(); + Location start = player.getLocation(); + Location newLoc = p.getLocation(); + if (start.distanceSquared(newLoc) >= distance * distance) { + player.sendMessage(ChatColor.AQUA + Locale.get("message.too.far", Locale.getPlayerLocale(player))); + return; + } + newLoc.setPitch(start.getPitch()); + ; + newLoc.setYaw(start.getYaw()); + player.teleport(newLoc); + world.playEffect(newLoc, Effect.ENDER_SIGNAL, 0); + world.playSound(newLoc, Sound.ENDERMAN_TELEPORT, 1.0f, 0.3f); + } else { + player.sendMessage(ChatColor.AQUA + String.format(Locale.get("message.cooldown", Locale.getPlayerLocale(player)), ((double) (cooldown - System.currentTimeMillis() / 50)) / 20d)); + } + } + + @Override + public void init(ConfigurationSection s) { + cooldownTime = s.getLong("cooldown"); + distance = s.getInt("distance"); + } + + @Override + public void save(ConfigurationSection s) { + s.set("cooldown", cooldownTime); + s.set("distance", distance); + } + + @Override + public String getName() { + return "teleport"; + } + + @Override + public String displayText(String locale) { + return ChatColor.GREEN + String.format(Locale.get("power.teleport", locale), distance, (double) cooldownTime / 20d); + } +} diff --git a/src/think/rpgitems/power/PowerTicker.java b/src/think/rpgitems/power/PowerTicker.java new file mode 100644 index 00000000..37ad8be2 --- /dev/null +++ b/src/think/rpgitems/power/PowerTicker.java @@ -0,0 +1,32 @@ +package think.rpgitems.power; + +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; +import org.bukkit.scheduler.BukkitRunnable; + +import think.rpgitems.item.ItemManager; +import think.rpgitems.item.RPGItem; + +public class PowerTicker extends BukkitRunnable { + + @Override + public void run() { + Player[] players = Bukkit.getOnlinePlayers(); + for (Player player : players) { + ItemStack[] armour = player.getInventory().getArmorContents(); + for (ItemStack part : armour) { + RPGItem item = ItemManager.toRPGItem(part); + if (item == null) + continue; + item.tick(player); + } + ItemStack part = player.getItemInHand(); + RPGItem item = ItemManager.toRPGItem(part); + if (item == null) + continue; + item.tick(player); + } + } + +} diff --git a/src/think/rpgitems/power/PowerUnbreakable.java b/src/think/rpgitems/power/PowerUnbreakable.java new file mode 100644 index 00000000..253951eb --- /dev/null +++ b/src/think/rpgitems/power/PowerUnbreakable.java @@ -0,0 +1,55 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.power; + +import org.bukkit.ChatColor; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; + +import think.rpgitems.data.Locale; +import think.rpgitems.power.types.PowerHit; + +public class PowerUnbreakable extends Power implements PowerHit { + + @SuppressWarnings("deprecation") + @Override + public void hit(Player player, LivingEntity e, double damage) { + player.getItemInHand().setDurability((short) 0); + player.updateInventory(); + } + + @Override + public void init(ConfigurationSection s) { + + } + + @Override + public void save(ConfigurationSection s) { + + } + + @Override + public String getName() { + return "unbreakable"; + } + + @Override + public String displayText(String locale) { + return ChatColor.GREEN + Locale.get("power.unbreakable", locale); + } +} diff --git a/src/think/rpgitems/power/PowerUnbreaking.java b/src/think/rpgitems/power/PowerUnbreaking.java new file mode 100644 index 00000000..1a14b108 --- /dev/null +++ b/src/think/rpgitems/power/PowerUnbreaking.java @@ -0,0 +1,64 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.power; + +import java.util.Random; + +import org.bukkit.ChatColor; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; + +import think.rpgitems.data.Locale; +import think.rpgitems.power.types.PowerHit; + +public class PowerUnbreaking extends Power implements PowerHit { + + public int level = 1; + private Random random = new Random(); + + @SuppressWarnings("deprecation") + @Override + public void hit(Player player, LivingEntity e, double damage) { + if (random.nextDouble() < ((double) level) / 100d) { + System.out.println(player.getItemInHand().getDurability()); + player.getItemInHand().setDurability((short) (player.getItemInHand().getDurability() - 1)); + System.out.println(player.getItemInHand().getDurability()); + player.updateInventory(); + } + } + + @Override + public void init(ConfigurationSection s) { + level = s.getInt("level", 1); + } + + @Override + public void save(ConfigurationSection s) { + s.set("level", level); + } + + @Override + public String getName() { + return "unbreaking"; + } + + @Override + public String displayText(String locale) { + return String.format(ChatColor.GREEN + Locale.get("power.unbreaking", locale), level); + } +} diff --git a/src/think/rpgitems/power/types/Power.java b/src/think/rpgitems/power/types/Power.java new file mode 100644 index 00000000..6e9a2243 --- /dev/null +++ b/src/think/rpgitems/power/types/Power.java @@ -0,0 +1,5 @@ +package think.rpgitems.power.types; + +public interface Power { + public String getName(); +} diff --git a/src/think/rpgitems/power/types/PowerHit.java b/src/think/rpgitems/power/types/PowerHit.java new file mode 100644 index 00000000..0acd6d1b --- /dev/null +++ b/src/think/rpgitems/power/types/PowerHit.java @@ -0,0 +1,8 @@ +package think.rpgitems.power.types; + +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; + +public interface PowerHit extends Power { + public void hit(Player player, LivingEntity e, double damage); +} diff --git a/src/think/rpgitems/power/types/PowerLeftClick.java b/src/think/rpgitems/power/types/PowerLeftClick.java new file mode 100644 index 00000000..fc6fe4c1 --- /dev/null +++ b/src/think/rpgitems/power/types/PowerLeftClick.java @@ -0,0 +1,7 @@ +package think.rpgitems.power.types; + +import org.bukkit.entity.Player; + +public interface PowerLeftClick extends Power { + public void leftClick(Player player); +} diff --git a/src/think/rpgitems/power/types/PowerProjectileHit.java b/src/think/rpgitems/power/types/PowerProjectileHit.java new file mode 100644 index 00000000..09f8b702 --- /dev/null +++ b/src/think/rpgitems/power/types/PowerProjectileHit.java @@ -0,0 +1,8 @@ +package think.rpgitems.power.types; + +import org.bukkit.entity.Player; +import org.bukkit.entity.Projectile; + +public interface PowerProjectileHit extends Power { + public void projectileHit(Player player, Projectile arrow); +} diff --git a/src/think/rpgitems/power/types/PowerRightClick.java b/src/think/rpgitems/power/types/PowerRightClick.java new file mode 100644 index 00000000..9fbdafd1 --- /dev/null +++ b/src/think/rpgitems/power/types/PowerRightClick.java @@ -0,0 +1,7 @@ +package think.rpgitems.power.types; + +import org.bukkit.entity.Player; + +public interface PowerRightClick extends Power { + public void rightClick(Player player); +} diff --git a/src/think/rpgitems/power/types/PowerTick.java b/src/think/rpgitems/power/types/PowerTick.java new file mode 100644 index 00000000..71c86a9a --- /dev/null +++ b/src/think/rpgitems/power/types/PowerTick.java @@ -0,0 +1,7 @@ +package think.rpgitems.power.types; + +import org.bukkit.entity.Player; + +public interface PowerTick extends Power { + public void tick(Player player); +} diff --git a/src/think/rpgitems/support/WorldGuard.java b/src/think/rpgitems/support/WorldGuard.java new file mode 100644 index 00000000..a2cda3ae --- /dev/null +++ b/src/think/rpgitems/support/WorldGuard.java @@ -0,0 +1,58 @@ +/* + * This file is part of RPG Items. + * + * RPG Items 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. + * + * RPG Items 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 RPG Items. If not, see . + */ +package think.rpgitems.support; + +import org.bukkit.Location; +import org.bukkit.entity.Player; +import org.bukkit.plugin.Plugin; + +import com.sk89q.worldguard.bukkit.WorldGuardPlugin; +import com.sk89q.worldguard.protection.flags.DefaultFlag; + +public class WorldGuard { + + private static WorldGuardPlugin plugin; + private static boolean hasSupport = false; + public static boolean useWorldGuard = true; + + public static void init(think.rpgitems.Plugin plugin2) { + Plugin plugin = plugin2.getServer().getPluginManager().getPlugin("WorldGuard"); + useWorldGuard = plugin2.getConfig().getBoolean("support.worldguard", false); + if (plugin == null || !(plugin instanceof WorldGuardPlugin)) { + return; + } + hasSupport = true; + WorldGuard.plugin = (WorldGuardPlugin) plugin; + think.rpgitems.Plugin.logger.info("[RPG Items] World Guard found"); + } + + public static boolean isEnabled() { + return hasSupport; + } + + public static boolean canBuild(Player player, Location location) { + if (!hasSupport || !useWorldGuard) + return true; + return plugin.canBuild(player, location); + } + + public static boolean canPvP(Location location) { + if (!hasSupport || !useWorldGuard) + return true; + return plugin.getRegionManager(location.getWorld()).getApplicableRegions(location).allows(DefaultFlag.PVP); + } +}