mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2026-02-18 17:53:00 +01:00
Compare commits
313 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2151fbb6c0 | ||
|
|
3945a681a3 | ||
|
|
592382a5d3 | ||
|
|
72bfe63ebf | ||
|
|
6d883821a8 | ||
|
|
415786d67e | ||
|
|
d8aa3a5f14 | ||
|
|
f5fc941916 | ||
|
|
8254a8ab0f | ||
|
|
fadbaf429d | ||
|
|
a80507078d | ||
|
|
d13549ff6a | ||
|
|
0f89a9e1e8 | ||
|
|
c8f2521670 | ||
|
|
32135d5647 | ||
|
|
dc5b37d560 | ||
|
|
e873902e1b | ||
|
|
fe21aa0aa9 | ||
|
|
19842ebc35 | ||
|
|
ee1e128c5a | ||
|
|
d099bc562b | ||
|
|
69dfd5645a | ||
|
|
5db7225bc4 | ||
|
|
80374333b6 | ||
|
|
885ec70d28 | ||
|
|
8d00468412 | ||
|
|
5d9ac614c2 | ||
|
|
0f8a418efd | ||
|
|
ed2e9a993d | ||
|
|
f689f048b2 | ||
|
|
906bc01b91 | ||
|
|
4641e4701c | ||
|
|
88e40080fb | ||
|
|
e0fa23359f | ||
|
|
4ab71bcf36 | ||
|
|
652a27eb38 | ||
|
|
d56fe82bfd | ||
|
|
6c20df7839 | ||
|
|
423eb97e0f | ||
|
|
0b43dd2747 | ||
|
|
f2fccd4a64 | ||
|
|
a7292c3a2c | ||
|
|
0c1072f7cf | ||
|
|
cea80f98e8 | ||
|
|
985e69c529 | ||
|
|
a2b3e6fa83 | ||
|
|
ee986970fe | ||
|
|
345fa122c5 | ||
|
|
fae5693db8 | ||
|
|
093f368545 | ||
|
|
a41fc22899 | ||
|
|
5f51f7f9b0 | ||
|
|
de2a0403d2 | ||
|
|
e2d13034a8 | ||
|
|
e55006f662 | ||
|
|
64b46a88c9 | ||
|
|
69b7c3077f | ||
|
|
f158858262 | ||
|
|
7aa7de75a2 | ||
|
|
6cc22a3b63 | ||
|
|
649ce1c147 | ||
|
|
1281843d45 | ||
|
|
e31aea3492 | ||
|
|
26e3403ff4 | ||
|
|
e5922bf3e7 | ||
|
|
2b9baaf0ea | ||
|
|
8ad4e20cab | ||
|
|
1511c5737b | ||
|
|
57bf414d59 | ||
|
|
16a0a3364a | ||
|
|
d09512373b | ||
|
|
dfd1e311d1 | ||
|
|
26c9ba0c3b | ||
|
|
d7d1d0b58d | ||
|
|
a0ab16eaa7 | ||
|
|
cae4b47538 | ||
|
|
dd445dbac5 | ||
|
|
4b26732f51 | ||
|
|
bf38fc9819 | ||
|
|
aff6b0925f | ||
|
|
a7f259ea3c | ||
|
|
3a1ee58339 | ||
|
|
6b0c46b634 | ||
|
|
6b36a030f6 | ||
|
|
df92c43578 | ||
|
|
f481741bb5 | ||
|
|
77b0dd725c | ||
|
|
f850c0ead6 | ||
|
|
7ad9b2ed58 | ||
|
|
695d76dcf4 | ||
|
|
19ea6707fe | ||
|
|
649bccb0d0 | ||
|
|
73f1c08366 | ||
|
|
b98120192a | ||
|
|
1cd7181d26 | ||
|
|
fb35e7dd5d | ||
|
|
1c4275ce37 | ||
|
|
3ff9a28fa7 | ||
|
|
04f13ab090 | ||
|
|
e42b9db159 | ||
|
|
deb3a3bd48 | ||
|
|
6708947332 | ||
|
|
1f0fcb119d | ||
|
|
bdb74d4719 | ||
|
|
19ab8b89f5 | ||
|
|
10fa9e5465 | ||
|
|
1fe259eb7a | ||
|
|
cd56dc7f98 | ||
|
|
8cf9601af4 | ||
|
|
b39c02154a | ||
|
|
a2e41f31ed | ||
|
|
5d8b049a45 | ||
|
|
336adf9530 | ||
|
|
708cfc23b6 | ||
|
|
06b2a89646 | ||
|
|
b782225dde | ||
|
|
85640f88b2 | ||
|
|
a372ca34e6 | ||
|
|
4acc0b63fd | ||
|
|
edf6f7560b | ||
|
|
66e0cc33bf | ||
|
|
498e3eb35c | ||
|
|
2aa7e37e13 | ||
|
|
09c5b8727a | ||
|
|
02a67e330a | ||
|
|
37364d6c86 | ||
|
|
86166a58e1 | ||
|
|
935e494705 | ||
|
|
94387045e4 | ||
|
|
20ae2dbeea | ||
|
|
d1b522b534 | ||
|
|
89802e23e2 | ||
|
|
cb4b5d1c71 | ||
|
|
472bfa51da | ||
|
|
162dbaed0f | ||
|
|
6f9fc26ab5 | ||
|
|
b199568ec3 | ||
|
|
ff258e0cbf | ||
|
|
68dd18067e | ||
|
|
799e11c36c | ||
|
|
f274d47c81 | ||
|
|
ca3b7f2172 | ||
|
|
22c9fca915 | ||
|
|
e4d312a11f | ||
|
|
a3f0de1c84 | ||
|
|
4826056bbe | ||
|
|
6f2f99dda0 | ||
|
|
d06ec5e452 | ||
|
|
94cb118a7e | ||
|
|
bebc70634b | ||
|
|
186c9189ca | ||
|
|
324b69cba1 | ||
|
|
802af464cd | ||
|
|
0c8b46acee | ||
|
|
182219f00d | ||
|
|
828f5ad173 | ||
|
|
95da5a4535 | ||
|
|
324bcd9b91 | ||
|
|
98ed75e4e0 | ||
|
|
3d5bb334f6 | ||
|
|
c74f43a1ad | ||
|
|
f5451b7d59 | ||
|
|
3dbaf061ed | ||
|
|
19ac0e6ba6 | ||
|
|
a509b0e9d3 | ||
|
|
5c63e9779e | ||
|
|
9ef9ffd16f | ||
|
|
93e223b2cc | ||
|
|
c4a0ae64aa | ||
|
|
933a7ffc69 | ||
|
|
b0253f9913 | ||
|
|
7eb1d43201 | ||
|
|
1f843bc3a2 | ||
|
|
c17bc7d332 | ||
|
|
c308121c47 | ||
|
|
d0d9868b5f | ||
|
|
8f3dce4ee9 | ||
|
|
de0a6dd3ee | ||
|
|
5d06341612 | ||
|
|
470b29c229 | ||
|
|
c915bb8312 | ||
|
|
f8869c177f | ||
|
|
c0a7b276b4 | ||
|
|
fa35fd9e45 | ||
|
|
3f8077d615 | ||
|
|
3b9e85e976 | ||
|
|
b024b45e02 | ||
|
|
a3cf3401bb | ||
|
|
bc12e0d100 | ||
|
|
96be29ef63 | ||
|
|
0f2029a32d | ||
|
|
aa14c1bc1f | ||
|
|
d052af9207 | ||
|
|
ad2ed37d0a | ||
|
|
1943ce884a | ||
|
|
b23fa36543 | ||
|
|
887f8f3e0c | ||
|
|
227b554488 | ||
|
|
20064f36ef | ||
|
|
decdddb9ec | ||
|
|
1b0fac78ae | ||
|
|
d864a2391e | ||
|
|
b08aead536 | ||
|
|
cca04468de | ||
|
|
e997c32c6c | ||
|
|
a1d5eaa846 | ||
|
|
4e9333e823 | ||
|
|
b75e7470ae | ||
|
|
484cbccc1b | ||
|
|
5d4d4d3498 | ||
|
|
82e34a5b02 | ||
|
|
a9b1ebb063 | ||
|
|
c942feb868 | ||
|
|
7003311b7e | ||
|
|
2549e23fd2 | ||
|
|
40af51fc05 | ||
|
|
06d3d8a18f | ||
|
|
992e6bce86 | ||
|
|
6e59087f6d | ||
|
|
e94473b21b | ||
|
|
8da49ba796 | ||
|
|
bc8f073f3f | ||
|
|
9589924235 | ||
|
|
fed21a7cb9 | ||
|
|
a97783ed86 | ||
|
|
7982e33823 | ||
|
|
7cf549ba88 | ||
|
|
0386d52e7c | ||
|
|
e7b763c8ea | ||
|
|
c805b17929 | ||
|
|
877bf7905b | ||
|
|
c45b03b1d8 | ||
|
|
f4d84dbd52 | ||
|
|
28d73a33ab | ||
|
|
9c9247b9c1 | ||
|
|
50684e9ca0 | ||
|
|
b5e4bebd75 | ||
|
|
b9de8e6d13 | ||
|
|
939344816e | ||
|
|
441015d6a5 | ||
|
|
841832846f | ||
|
|
eb0bf07d2c | ||
|
|
fc622dcde2 | ||
|
|
e77be3350f | ||
|
|
b4637a825e | ||
|
|
a2fc694c8d | ||
|
|
06c0b4cc11 | ||
|
|
ea2ae0b5c3 | ||
|
|
1bf9cfa422 | ||
|
|
3d699e612a | ||
|
|
a202d6168b | ||
|
|
786a5f9325 | ||
|
|
1910b76b13 | ||
|
|
bda72f28ed | ||
|
|
27e60ef85b | ||
|
|
58dc45d344 | ||
|
|
082dcebf9b | ||
|
|
a652fcd026 | ||
|
|
717c2d2869 | ||
|
|
3124712cfb | ||
|
|
081b5f6728 | ||
|
|
71c14ab07b | ||
|
|
900d58a6f4 | ||
|
|
70756c2a2e | ||
|
|
5b40f2e2e9 | ||
|
|
3d60c057ea | ||
|
|
105b8b5a91 | ||
|
|
9278ca4d27 | ||
|
|
d97e97ae5f | ||
|
|
5cbee8a4ab | ||
|
|
fe9db6c9ad | ||
|
|
a4845abc45 | ||
|
|
470b29eeca | ||
|
|
f87f7f6feb | ||
|
|
5e8a8aac53 | ||
|
|
2672e218f4 | ||
|
|
02a728bdea | ||
|
|
3a812612de | ||
|
|
4fdbce24d7 | ||
|
|
52458041f0 | ||
|
|
4a1e5a0dcc | ||
|
|
f6c7ac6d98 | ||
|
|
76675422ea | ||
|
|
7dee6db362 | ||
|
|
e8030c59f1 | ||
|
|
4b642d4953 | ||
|
|
346b7862af | ||
|
|
3ec661cc02 | ||
|
|
d7f066b07e | ||
|
|
e54500fa90 | ||
|
|
a2c83425f2 | ||
|
|
41ce19b835 | ||
|
|
9c11a6ffb0 | ||
|
|
e36cd8109d | ||
|
|
ee83e93269 | ||
|
|
0b4692e303 | ||
|
|
e99b5a4abf | ||
|
|
a419c4d4fe | ||
|
|
ca80a7d463 | ||
|
|
716e6296e5 | ||
|
|
6382bec05a | ||
|
|
20248212ae | ||
|
|
86e373b493 | ||
|
|
b4b0bbd081 | ||
|
|
17bacbf9d6 | ||
|
|
b869fb0ca5 | ||
|
|
c70a23dd5c | ||
|
|
f9e7ae22f2 | ||
|
|
30fb2770a6 | ||
|
|
11e1dc7ec8 | ||
|
|
5645c29dd8 | ||
|
|
44e954efeb | ||
|
|
4ffb20f3bb |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -33,4 +33,7 @@
|
||||
.idea/
|
||||
|
||||
# Project Stuff
|
||||
/src/main/resources/mcMMO
|
||||
/src/main/resources/mcMMO
|
||||
|
||||
# Other Libraries
|
||||
*.jar
|
||||
@@ -1,5 +1,98 @@
|
||||
Changelog:
|
||||
#Versions without changelogs probably had very small misc fixes, like tweaks to the source code
|
||||
Versions without changelogs probably had very small misc fixes, like tweaks to the source code
|
||||
|
||||
Key:
|
||||
+ Addition
|
||||
= Fix
|
||||
! Change
|
||||
- Removal
|
||||
|
||||
Version 1.3.00-dev
|
||||
+ Added ability to customize drops for Excavation skill (treasures.yml)
|
||||
+ Added ability to customize drops for Fishing skill (treasures.yml)
|
||||
+ Added messages to nearby players when your abilities wear off
|
||||
+ Added jungle trees to Woodcutting XP tables
|
||||
+ Added player notification for when they stop Bleeding
|
||||
+ Added configuration option to control mcMMO reporting damage events
|
||||
+ Added hunger regain bonuses to Herbalism skill
|
||||
+ Added Blast Mining subskills to Mining
|
||||
+ Added Fast Food Service subskill to Taming
|
||||
+ Added size limit to Tree Feller in config as Tree Feller Threshold
|
||||
+ Added /inspect (works on offline players)
|
||||
+ Added /addlevels commands
|
||||
+ Added /mcremove command which lets you remove users from MySQL or FlatFile
|
||||
+ Added config values for XP multipliers for different hostile mobs
|
||||
+ Added 'mcmmo.commands.inspect' permission node for the new /inspect command
|
||||
+ Added Impact & Greater Impact subskills to Axes
|
||||
+ Re-added mcMMO reporting damage events
|
||||
= Fixed bug with updating MySQL tables to include fishing on servers using custom table prefixes
|
||||
= Fixed bug where Disarm didn't work at all ever
|
||||
= Fixed bug where Swords command showed Bleed Length twice instead of Bleed Chance
|
||||
= Fixed bug where Tree Feller wasn't checking for Tree Feller permission
|
||||
= Fixed bug where Leaf Blower required Tree Feller permissions rather than Woodcutting permissions
|
||||
= Fixed Leaf Blower preventing the use of shears to collect leaves
|
||||
= Fixed Green Thumb & Green Terra not consuming or requiring seeds to replant Wheat
|
||||
= Fixed Super Breaker & Giga Drill Breaker failing to damage tools
|
||||
= Fixed Tree Feller not giving proper XP for different kinds of trees
|
||||
= Fixed Skill Abilities conflicting with NoCheat
|
||||
= Fixed memory leak with mob spawner tracking
|
||||
= Fixed /mcability not respecting permissions
|
||||
= Prettied up new config files
|
||||
= Various skill function optimizations
|
||||
! Changed how mcMMO calculates distance between two points (optimizations)
|
||||
! Changed how mcMMO handles MySQL connections (optimizations)
|
||||
! Changed the description /mcmmo provides to be more up to date and relevant
|
||||
! Changed mcMMO user information to be stored for 2 minutes after log out to reduce lag on rejoins
|
||||
! Changed Food+ to be named Farmer's Diet in Herbalism
|
||||
! Changed default values of Woodcutting XP tables
|
||||
! Changed 'Pine' to be renamed 'Oak' in Woodcutting XP tables
|
||||
! Changed the name of Unarmed Apprentice/Mastery to Iron Arm Style
|
||||
! Changed Axes to gain bonus damage every 50 skill levels
|
||||
! Changed Unarmed to start with a +3 DMG (1 Heart = 2 DMG) bonus from Iron Arm Style to make leveling it more viable
|
||||
! Changed Unarmed to gain bonus damage every 50 skill levels
|
||||
! Changed Unarmed to gain more bonus damage total than before
|
||||
! Changed Unarmed to have a max disarm chance of 33.3% rather than 25%
|
||||
! Changed Tree Feller to take down entire trees
|
||||
! Changed mob spawn tracking to use Unique Entity ID instead of Entity Object
|
||||
! Changed stats command name to mcstats for better plugin compatibility
|
||||
! Changed god mode to turn off if player enters world where he does not have mcgod permission
|
||||
! Changed Taming to also gain XP from animal taming
|
||||
! Changed Swords Bleeding effect to never kill
|
||||
! Changed Bleeding to never go beyond 10 ticks
|
||||
! Changed to use Bukkit's built-in ignoreCancelledEvents system
|
||||
! Changed chat logging for /p & /a
|
||||
! Changed Tree Feller to use per-use ArrayList
|
||||
- Removed /mcstats console functionality
|
||||
- Removed /whois command (replaced with /inspect which has similar functionality)
|
||||
- Removed Master/Apprentice chat notifications to reduce spam
|
||||
- Removed MySpawn system (You can still use Chimaera Wings) due to being outdated and unwanted
|
||||
- Removed duplicate settings in config.yml
|
||||
- Removed unused settings from config.yml (HP Regen)
|
||||
- Removed Nether Brick from Mining XP Tables
|
||||
- Removed Stone Brick from Mining XP Tables
|
||||
|
||||
Version 1.2.12
|
||||
- Fixed issue that caused terrible MySQL performance and negative XP on levelup (Issue #134)
|
||||
- Fixed addxp command taking xprate and skill modifiers into account
|
||||
- Added anonymous usage statistics (you can opt out in plugins/PluginMetrics/config.yml)
|
||||
- Modified onEntityDamage priority to have better compatibility with other plugins (Factions, WorldGuard, etc...)
|
||||
- Fixed /mcgod & /mmoedit permissions defaulting to true
|
||||
- Fixed Fishing not working or handing out XP
|
||||
- Fixed error with Skull Splitter / Serrated Strikes that caused server instability and log spam
|
||||
- Fixed config.yml not having values for End Stone & other new mining blocks
|
||||
- Fixed Green Thumb/Green Terra not correctly planting wheat (Issue #133)
|
||||
|
||||
Version 1.2.11
|
||||
- Removed legacy Permission & PEX dependency. (PEX still works fine with mcMMO)
|
||||
- Made Smooth Brick to Mossy Brick and Dirt to Grass for green thumb configurable (Issue #120)
|
||||
- Added MagmaCube to XP tables
|
||||
- Made optimizations to Skull Splitter/Serrated Strikes
|
||||
- Made it so players take damage if they try to log out with Serrated Strikes stacked onto them (Issue #131)
|
||||
- Changed mcMMO to save data periodically to optimize performance with FlatFile & MySQL (Issue #138)
|
||||
- Added a configurable save interval for the new save system
|
||||
- Fixed a bug with the odds calculations for Serrated Strikes
|
||||
- Fixed several commands not working from console (mmoedit, etc..) (Issue #150)
|
||||
- Added a success message when executing xprate from console
|
||||
|
||||
Version 1.2.10
|
||||
- Fixed issue with receiving Woodcutting XP for all blocks broken (Issue #103)
|
||||
|
||||
346
LICENSE
Normal file
346
LICENSE
Normal file
@@ -0,0 +1,346 @@
|
||||
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.
|
||||
@@ -16,10 +16,7 @@ Hearing that people enjoy mcMMO and seeing the daily youtube videos about my mod
|
||||
=== Compiling
|
||||
|
||||
Required Libraries:
|
||||
* CraftBukkit
|
||||
* Spout API
|
||||
* Permissions
|
||||
* PermissionsEx
|
||||
|
||||
Required to Run:
|
||||
* Bukkit
|
||||
|
||||
41
pom.xml
41
pom.xml
@@ -2,12 +2,12 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||
<artifactId>mcMMO</artifactId>
|
||||
<version>1.2.10</version>
|
||||
<version>1.3.00</version>
|
||||
<name>mcMMO</name>
|
||||
<url>https://github.com/TheYeti/mcMMO</url>
|
||||
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
||||
<issueManagement>
|
||||
<system>GitHub</system>
|
||||
<url>https://github.com/TheYeti/mcMMO/issues</url>
|
||||
<url>http://issues.mcmmo.org</url>
|
||||
<system>JIRA</system>
|
||||
</issueManagement>
|
||||
<build>
|
||||
<finalName>mcMMO</finalName>
|
||||
@@ -95,10 +95,20 @@
|
||||
</build>
|
||||
<repositories>
|
||||
<repository>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>always</updatePolicy>
|
||||
<checksumPolicy>fail</checksumPolicy>
|
||||
</snapshots>
|
||||
<id>bukkit-repo</id>
|
||||
<url>http://repo.bukkit.org/content/groups/public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>always</updatePolicy>
|
||||
<checksumPolicy>fail</checksumPolicy>
|
||||
</snapshots>
|
||||
<id>spout-repo</id>
|
||||
<url>http://nexus.getspout.org/content/groups/public/</url>
|
||||
</repository>
|
||||
@@ -107,28 +117,7 @@
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.1-R4-SNAPSHOT</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>craftbukkit</artifactId>
|
||||
<version>1.1-R3</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.nijikokun.bukkit</groupId>
|
||||
<artifactId>Permissions</artifactId>
|
||||
<version>3.1.6</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.tehkode.permissions</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.18</version>
|
||||
<version>1.1-R6-SNAPSHOT</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
/*
|
||||
This file is part of mcMMO.
|
||||
|
||||
mcMMO 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.
|
||||
mcMMO 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.
|
||||
|
||||
mcMMO 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.
|
||||
mcMMO 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 mcMMO. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with mcMMO. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.gmail.nossr50;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.*;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.events.FakeEntityDamageByEntityEvent;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.party.Party;
|
||||
import com.gmail.nossr50.skills.Acrobatics;
|
||||
@@ -39,412 +39,399 @@ import com.gmail.nossr50.skills.Unarmed;
|
||||
|
||||
public class Combat
|
||||
{
|
||||
public static void combatChecks(EntityDamageEvent event, mcMMO pluginx)
|
||||
public static void combatChecks(EntityDamageByEntityEvent event, mcMMO pluginx)
|
||||
{
|
||||
if(event.isCancelled() || event.getDamage() == 0)
|
||||
if(event.isCancelled() || event.getDamage() == 0 || event.getEntity().isDead())
|
||||
return;
|
||||
|
||||
if(event instanceof EntityDamageByEntityEvent)
|
||||
{
|
||||
/*
|
||||
* OFFENSIVE CHECKS FOR PLAYERS VERSUS ENTITIES
|
||||
*/
|
||||
if(((EntityDamageByEntityEvent) event).getDamager() instanceof Player)
|
||||
{
|
||||
//Declare Things
|
||||
EntityDamageByEntityEvent eventb = (EntityDamageByEntityEvent) event;
|
||||
Player attacker = (Player)((EntityDamageByEntityEvent) event).getDamager();
|
||||
PlayerProfile PPa = Users.getProfile(attacker);
|
||||
|
||||
//Damage modifiers
|
||||
if(mcPermissions.getInstance().unarmed(attacker) && attacker.getItemInHand().getTypeId() == 0) //Unarmed
|
||||
Unarmed.unarmedBonus(attacker, eventb);
|
||||
if(m.isAxes(attacker.getItemInHand()) && mcPermissions.getInstance().axes(attacker) && Users.getProfile(attacker).getSkillLevel(SkillType.AXES) >= 500)
|
||||
event.setDamage(event.getDamage()+4);
|
||||
|
||||
//If there are any abilities to activate
|
||||
combatAbilityChecks(attacker, PPa, pluginx);
|
||||
|
||||
//Check for offensive procs
|
||||
if(!(((EntityDamageByEntityEvent) event).getDamager() instanceof Arrow))
|
||||
{
|
||||
if(mcPermissions.getInstance().axes(attacker))
|
||||
Axes.axeCriticalCheck(attacker, eventb, pluginx); //Axe Criticals
|
||||
|
||||
if(!pluginx.misc.bleedTracker.contains((LivingEntity) event.getEntity())) //Swords Bleed
|
||||
Swords.bleedCheck(attacker, (LivingEntity)event.getEntity(), pluginx);
|
||||
|
||||
if(event.getEntity() instanceof Player && mcPermissions.getInstance().unarmed(attacker))
|
||||
{
|
||||
Player defender = (Player)event.getEntity();
|
||||
Unarmed.disarmProcCheck(attacker, defender);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Modify the event damage if Attacker is Berserk
|
||||
if(PPa.getBerserkMode())
|
||||
event.setDamage(event.getDamage() + (event.getDamage() / 2));
|
||||
|
||||
//Handle Ability Interactions
|
||||
if(PPa.getSkullSplitterMode() && m.isAxes(attacker.getItemInHand()))
|
||||
Axes.applyAoeDamage(attacker, eventb, pluginx);
|
||||
if(PPa.getSerratedStrikesMode() && m.isSwords(attacker.getItemInHand()))
|
||||
Swords.applySerratedStrikes(attacker, eventb, pluginx);
|
||||
|
||||
//Experience
|
||||
if(event.getEntity() instanceof Player)
|
||||
{
|
||||
Player defender = (Player)event.getEntity();
|
||||
PlayerProfile PPd = Users.getProfile(defender);
|
||||
if(attacker != null && defender != null && LoadProperties.pvpxp)
|
||||
{
|
||||
if(System.currentTimeMillis() >= (PPd.getRespawnATS()*1000) + 5000
|
||||
&& ((PPd.getLastLogin()+5)*1000) < System.currentTimeMillis()
|
||||
&& defender.getHealth() >= 1)
|
||||
{
|
||||
//Prevent a ridiculous amount of XP being granted by capping it at the remaining health of the mob
|
||||
int hpLeft = defender.getHealth(), xpinc = 0;
|
||||
|
||||
if(hpLeft < event.getDamage())
|
||||
xpinc = hpLeft;
|
||||
else
|
||||
xpinc = event.getDamage();
|
||||
|
||||
int xp = (int) (xpinc * 2 * LoadProperties.pvpxprewardmodifier);
|
||||
|
||||
if(m.isAxes(attacker.getItemInHand()) && mcPermissions.getInstance().axes(attacker))
|
||||
PPa.addXP(SkillType.AXES, xp*10, attacker);
|
||||
if(m.isSwords(attacker.getItemInHand()) && mcPermissions.getInstance().swords(attacker))
|
||||
PPa.addXP(SkillType.SWORDS, xp*10, attacker);
|
||||
if(attacker.getItemInHand().getTypeId() == 0 && mcPermissions.getInstance().unarmed(attacker))
|
||||
PPa.addXP(SkillType.UNARMED, xp*10, attacker);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!pluginx.misc.mobSpawnerList.contains(event.getEntity()))
|
||||
{
|
||||
int xp = getXp(event.getEntity(), event);
|
||||
//Declare Things
|
||||
Entity damager = event.getDamager();
|
||||
LivingEntity target = (LivingEntity) event.getEntity();
|
||||
int damage = event.getDamage();
|
||||
|
||||
if(m.isSwords(attacker.getItemInHand()) && mcPermissions.getInstance().swords(attacker))
|
||||
PPa.addXP(SkillType.SWORDS, xp*10, attacker);
|
||||
else if(m.isAxes(attacker.getItemInHand()) && mcPermissions.getInstance().axes(attacker))
|
||||
PPa.addXP(SkillType.AXES, xp*10, attacker);
|
||||
else if(attacker.getItemInHand().getTypeId() == 0 && mcPermissions.getInstance().unarmed(attacker))
|
||||
PPa.addXP(SkillType.UNARMED, xp*10, attacker);
|
||||
}
|
||||
Skills.XpCheckAll(attacker);
|
||||
|
||||
if(event.getEntity() instanceof Wolf)
|
||||
{
|
||||
Wolf theWolf = (Wolf)event.getEntity();
|
||||
|
||||
if(attacker.getItemInHand().getTypeId() == 352 && mcPermissions.getInstance().taming(attacker))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
if(theWolf.isTamed())
|
||||
{
|
||||
attacker.sendMessage(mcLocale.getString("Combat.BeastLore")+" "+
|
||||
mcLocale.getString("Combat.BeastLoreOwner", new Object[] {Taming.getOwnerName(theWolf)})+" "+
|
||||
mcLocale.getString("Combat.BeastLoreHealthWolfTamed", new Object[] {theWolf.getHealth()}));
|
||||
}
|
||||
else
|
||||
{
|
||||
attacker.sendMessage(mcLocale.getString("Combat.BeastLore")+" "+
|
||||
mcLocale.getString("Combat.BeastLoreHealthWolf", new Object[] {theWolf.getHealth()}));
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* PLAYER VERSUS ENTITIES
|
||||
*/
|
||||
if(damager instanceof Player)
|
||||
{
|
||||
Player attacker = (Player) event.getDamager();
|
||||
ItemStack itemInHand = attacker.getItemInHand();
|
||||
PlayerProfile PPa = Users.getProfile(attacker);
|
||||
|
||||
//If there are any abilities to activate
|
||||
combatAbilityChecks(attacker, PPa);
|
||||
|
||||
//Damage modifiers and proc checks
|
||||
if(m.isSwords(itemInHand) && mcPermissions.getInstance().swords(attacker))
|
||||
{
|
||||
if(!pluginx.misc.bleedTracker.contains(target)) //Bleed
|
||||
Swords.bleedCheck(attacker, target, pluginx);
|
||||
|
||||
if (!(event instanceof FakeEntityDamageByEntityEvent) && PPa.getSerratedStrikesMode())
|
||||
Swords.applySerratedStrikes(attacker, event, pluginx);
|
||||
|
||||
if(target instanceof Player)
|
||||
PvPExperienceGain(attacker, PPa, (Player) target, damage, SkillType.SWORDS);
|
||||
else if(!pluginx.misc.mobSpawnerList.contains(target.getEntityId()))
|
||||
PvEExperienceGain(attacker, PPa, target, damage, SkillType.SWORDS);
|
||||
}
|
||||
else if(m.isAxes(itemInHand) && mcPermissions.getInstance().axes(attacker))
|
||||
{
|
||||
Axes.axesBonus(attacker, event);
|
||||
|
||||
Axes.axeCriticalCheck(attacker, event, pluginx); //Critical hit
|
||||
|
||||
//Impact
|
||||
if(event.getEntity() instanceof LivingEntity)
|
||||
Axes.impact(attacker, (LivingEntity)event.getEntity());
|
||||
|
||||
if (!(event instanceof FakeEntityDamageByEntityEvent) && PPa.getSkullSplitterMode())
|
||||
Axes.applyAoeDamage(attacker, event, pluginx);
|
||||
|
||||
if(target instanceof Player)
|
||||
PvPExperienceGain(attacker, PPa, (Player) target, event.getDamage(), SkillType.AXES);
|
||||
else if(!pluginx.misc.mobSpawnerList.contains(target.getEntityId()))
|
||||
PvEExperienceGain(attacker, PPa, target, event.getDamage(), SkillType.AXES);
|
||||
}
|
||||
else if(itemInHand.getTypeId() == 0 && mcPermissions.getInstance().unarmed(attacker)) //Unarmed
|
||||
{
|
||||
Unarmed.unarmedBonus(attacker, event);
|
||||
if(PPa.getBerserkMode())
|
||||
event.setDamage(event.getDamage() + (event.getDamage() / 2));
|
||||
|
||||
if(target instanceof Player)
|
||||
Unarmed.disarmProcCheck(attacker, (Player) target); //Disarm
|
||||
|
||||
if(target instanceof Player)
|
||||
PvPExperienceGain(attacker, PPa, (Player) target, event.getDamage(), SkillType.UNARMED);
|
||||
else if(!pluginx.misc.mobSpawnerList.contains(target.getEntityId()))
|
||||
PvEExperienceGain(attacker, PPa, target, event.getDamage(), SkillType.UNARMED);
|
||||
}
|
||||
|
||||
//Player use bone on wolf.
|
||||
else if(target instanceof Wolf)
|
||||
{
|
||||
Wolf wolf = (Wolf) target;
|
||||
|
||||
if(itemInHand.getTypeId() == 352 && mcPermissions.getInstance().taming(attacker))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
if(wolf.isTamed())
|
||||
attacker.sendMessage(mcLocale.getString("Combat.BeastLore")+" "+
|
||||
mcLocale.getString("Combat.BeastLoreOwner", new Object[] {Taming.getOwnerName(wolf)})+" "+
|
||||
mcLocale.getString("Combat.BeastLoreHealthWolfTamed", new Object[] {wolf.getHealth()}));
|
||||
else
|
||||
attacker.sendMessage(mcLocale.getString("Combat.BeastLore")+" "+
|
||||
mcLocale.getString("Combat.BeastLoreHealthWolf", new Object[] {wolf.getHealth()}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TAMING (WOLVES VERSUS ENTITIES)
|
||||
*/
|
||||
else if(damager instanceof Wolf)
|
||||
{
|
||||
Wolf wolf = (Wolf) damager;
|
||||
|
||||
if (wolf.isTamed() && Taming.ownerOnline(wolf, pluginx))
|
||||
{
|
||||
Player master = Taming.getOwner(wolf, pluginx);
|
||||
if (master == null) //Can it really happen?
|
||||
return;
|
||||
|
||||
PlayerProfile PPo = Users.getProfile(master);
|
||||
if(mcPermissions.getInstance().taming(master))
|
||||
{
|
||||
//Fast Food Service
|
||||
Taming.fastFoodService(PPo, wolf, event);
|
||||
|
||||
//Sharpened Claws
|
||||
Taming.sharpenedClaws(PPo, event);
|
||||
|
||||
//Gore
|
||||
Taming.gore(PPo, event, master, pluginx);
|
||||
|
||||
//Reward XP
|
||||
Taming.rewardXp(event, pluginx, master);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* OFFENSIVE CHECKS FOR WOLVES VERSUS ENTITIES
|
||||
*/
|
||||
if(event instanceof EntityDamageByEntityEvent && ((EntityDamageByEntityEvent) event).getDamager() instanceof Wolf)
|
||||
{
|
||||
EntityDamageByEntityEvent eventb = (EntityDamageByEntityEvent) event;
|
||||
Wolf theWolf = (Wolf) eventb.getDamager();
|
||||
if(theWolf.isTamed() && Taming.ownerOnline(theWolf, pluginx))
|
||||
{
|
||||
if(Taming.getOwner(theWolf, pluginx) == null)
|
||||
return;
|
||||
Player master = Taming.getOwner(theWolf, pluginx);
|
||||
PlayerProfile PPo = Users.getProfile(master);
|
||||
|
||||
if(mcPermissions.getInstance().taming(master))
|
||||
{
|
||||
//Sharpened Claws
|
||||
if(PPo.getSkillLevel(SkillType.TAMING) >= 750)
|
||||
{
|
||||
event.setDamage(event.getDamage() + 2);
|
||||
}
|
||||
|
||||
//Gore
|
||||
if(Math.random() * 1000 <= PPo.getSkillLevel(SkillType.TAMING))
|
||||
{
|
||||
event.setDamage(event.getDamage() * 2);
|
||||
|
||||
if(event.getEntity() instanceof Player)
|
||||
{
|
||||
Player target = (Player)event.getEntity();
|
||||
target.sendMessage(mcLocale.getString("Combat.StruckByGore")); //$NON-NLS-1$
|
||||
Users.getProfile(target).setBleedTicks(2);
|
||||
}
|
||||
else
|
||||
pluginx.misc.addToBleedQue((LivingEntity) event.getEntity());
|
||||
|
||||
master.sendMessage(mcLocale.getString("Combat.Gore")); //$NON-NLS-1$
|
||||
}
|
||||
if(!event.getEntity().isDead() && !pluginx.misc.mobSpawnerList.contains(event.getEntity()))
|
||||
{
|
||||
int xp = getXp(event.getEntity(), event);
|
||||
Users.getProfile(master).addXP(SkillType.TAMING, xp*10, master);
|
||||
|
||||
if(event.getEntity() instanceof Player)
|
||||
{
|
||||
xp = (event.getDamage() * 2);
|
||||
Users.getProfile(master).addXP(SkillType.TAMING, (int)((xp*10)*1.5), master);
|
||||
}
|
||||
Skills.XpCheckSkill(SkillType.TAMING, master);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//Another offensive check for Archery
|
||||
if(event instanceof EntityDamageByEntityEvent && event.getCause() == DamageCause.PROJECTILE && ((EntityDamageByEntityEvent) event).getDamager() instanceof Arrow)
|
||||
else if(damager instanceof Arrow)
|
||||
archeryCheck((EntityDamageByEntityEvent)event, pluginx);
|
||||
|
||||
|
||||
/*
|
||||
* DEFENSIVE CHECKS
|
||||
*/
|
||||
if(event instanceof EntityDamageByEntityEvent && event.getEntity() instanceof Player)
|
||||
if(target instanceof Player)
|
||||
{
|
||||
Swords.counterAttackChecks((EntityDamageByEntityEvent)event);
|
||||
Acrobatics.dodgeChecks((EntityDamageByEntityEvent)event);
|
||||
Swords.counterAttackChecks(event);
|
||||
Acrobatics.dodgeChecks(event);
|
||||
}
|
||||
/*
|
||||
|
||||
/*
|
||||
* DEFENSIVE CHECKS FOR WOLVES
|
||||
*/
|
||||
|
||||
if(event.getEntity() instanceof Wolf)
|
||||
else if(target instanceof Wolf)
|
||||
{
|
||||
Wolf theWolf = (Wolf) event.getEntity();
|
||||
|
||||
if(theWolf.isTamed() && Taming.ownerOnline(theWolf, pluginx))
|
||||
{
|
||||
if(Taming.getOwner(theWolf, pluginx) == null)
|
||||
return;
|
||||
|
||||
Player master = Taming.getOwner(theWolf, pluginx);
|
||||
PlayerProfile PPo = Users.getProfile(master);
|
||||
if(mcPermissions.getInstance().taming(master))
|
||||
{
|
||||
//Shock-Proof
|
||||
if((event.getCause() == DamageCause.ENTITY_EXPLOSION || event.getCause() == DamageCause.BLOCK_EXPLOSION) && PPo.getSkillLevel(SkillType.TAMING) >= 500)
|
||||
{
|
||||
event.setDamage(2);
|
||||
}
|
||||
|
||||
//Thick Fur
|
||||
if(PPo.getSkillLevel(SkillType.TAMING) >= 250)
|
||||
event.setDamage(event.getDamage() / 2);
|
||||
}
|
||||
}
|
||||
Wolf wolf = (Wolf) target;
|
||||
if(wolf.isTamed() && Taming.ownerOnline(wolf, pluginx))
|
||||
Taming.preventDamage(event, pluginx);
|
||||
}
|
||||
}
|
||||
|
||||
public static void combatAbilityChecks(Player attacker, PlayerProfile PPa, Plugin pluginx)
|
||||
public static void combatAbilityChecks(Player attacker, PlayerProfile PPa)
|
||||
{
|
||||
//Check to see if any abilities need to be activated
|
||||
if(PPa.getAxePreparationMode())
|
||||
Axes.skullSplitterCheck(attacker);
|
||||
Skills.abilityCheck(attacker, SkillType.AXES);
|
||||
if(PPa.getSwordsPreparationMode())
|
||||
Swords.serratedStrikesActivationCheck(attacker);
|
||||
Skills.abilityCheck(attacker, SkillType.SWORDS);
|
||||
if(PPa.getFistsPreparationMode())
|
||||
Unarmed.berserkActivationCheck(attacker);
|
||||
Skills.abilityCheck(attacker, SkillType.UNARMED);
|
||||
}
|
||||
|
||||
public static void archeryCheck(EntityDamageByEntityEvent event, mcMMO pluginx)
|
||||
{
|
||||
Arrow arrow = (Arrow)event.getDamager();
|
||||
Entity y = arrow.getShooter();
|
||||
Entity x = event.getEntity();
|
||||
if(x instanceof Player)
|
||||
{
|
||||
Player defender = (Player)x;
|
||||
PlayerProfile PPd = Users.getProfile(defender);
|
||||
if(PPd == null)
|
||||
Users.addUser(defender);
|
||||
if(mcPermissions.getInstance().unarmed(defender) && defender.getItemInHand().getTypeId() == 0)
|
||||
{
|
||||
if(defender != null && PPd.getSkillLevel(SkillType.UNARMED) >= 1000)
|
||||
{
|
||||
if(Math.random() * 1000 <= 500)
|
||||
{
|
||||
event.setCancelled(true);
|
||||
defender.sendMessage(mcLocale.getString("Combat.ArrowDeflect")); //$NON-NLS-1$
|
||||
return;
|
||||
}
|
||||
} else if(defender != null && Math.random() * 1000 <= (PPd.getSkillLevel(SkillType.UNARMED) / 2))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
defender.sendMessage(mcLocale.getString("Combat.ArrowDeflect")); //$NON-NLS-1$
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* If attacker is player
|
||||
*/
|
||||
if(y instanceof Player)
|
||||
{
|
||||
Player attacker = (Player)y;
|
||||
PlayerProfile PPa = Users.getProfile(attacker);
|
||||
if(mcPermissions.getInstance().archery(attacker))
|
||||
{
|
||||
Archery.trackArrows(pluginx, x, event, attacker);
|
||||
|
||||
/*
|
||||
* IGNITION
|
||||
*/
|
||||
Archery.ignitionCheck(x, event, attacker);
|
||||
/*
|
||||
* Defender is Monster
|
||||
*/
|
||||
if(!pluginx.misc.mobSpawnerList.contains(x))
|
||||
{
|
||||
int xp = getXp(event.getEntity(), event);
|
||||
PPa.addXP(SkillType.ARCHERY, xp*10, attacker);
|
||||
}
|
||||
/*
|
||||
* Attacker is Player
|
||||
*/
|
||||
if(x instanceof Player){
|
||||
Player defender = (Player)x;
|
||||
PlayerProfile PPd = Users.getProfile(defender);
|
||||
/*
|
||||
* Stuff for the daze proc
|
||||
*/
|
||||
if(PPa.inParty() && PPd.inParty())
|
||||
{
|
||||
if(Party.getInstance().inSameParty(defender, attacker))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* PVP XP
|
||||
*/
|
||||
if(LoadProperties.pvpxp && !Party.getInstance().inSameParty(attacker, defender)
|
||||
&& ((PPd.getLastLogin()+5)*1000) < System.currentTimeMillis() && !attacker.getName().equals(defender.getName()))
|
||||
{
|
||||
int xp = (int) ((event.getDamage() * 2) * 10);
|
||||
PPa.addXP(SkillType.ARCHERY, xp, attacker);
|
||||
}
|
||||
/*
|
||||
* DAZE PROC
|
||||
*/
|
||||
Archery.dazeCheck(defender, attacker);
|
||||
}
|
||||
}
|
||||
Skills.XpCheckSkill(SkillType.ARCHERY, attacker);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to damage target for value dmg with reason CUSTOM
|
||||
*
|
||||
* @param target LivingEntity which to attempt to damage
|
||||
* @param dmg Amount of damage to attempt to do
|
||||
*/
|
||||
public static void dealDamage(LivingEntity target, int dmg){
|
||||
dealDamage(target, dmg, EntityDamageEvent.DamageCause.CUSTOM);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to damage target for value dmg with reason cause
|
||||
*
|
||||
* @param target LivingEntity which to attempt to damage
|
||||
* @param dmg Amount of damage to attempt to do
|
||||
* @param cause DamageCause to pass to damage event
|
||||
*/
|
||||
public static void dealDamage(LivingEntity target, int dmg, DamageCause cause) {
|
||||
EntityDamageEvent ede = new EntityDamageEvent(target, cause, dmg);
|
||||
Bukkit.getPluginManager().callEvent(ede);
|
||||
if(ede.isCancelled()) return;
|
||||
|
||||
target.damage(ede.getDamage());
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to damage target for value dmg with reason ENTITY_ATTACK with damager attacker
|
||||
*
|
||||
* @param target LivingEntity which to attempt to damage
|
||||
* @param dmg Amount of damage to attempt to do
|
||||
* @param attacker Player to pass to event as damager
|
||||
*/
|
||||
public static void dealDamage(LivingEntity target, int dmg, Player attacker) {
|
||||
EntityDamageEvent ede = new EntityDamageByEntityEvent(attacker, target, EntityDamageEvent.DamageCause.ENTITY_ATTACK, dmg);
|
||||
Bukkit.getPluginManager().callEvent(ede);
|
||||
|
||||
target.damage(ede.getDamage());
|
||||
}
|
||||
|
||||
public static boolean pvpAllowed(EntityDamageByEntityEvent event, World world)
|
||||
{
|
||||
if(!event.getEntity().getWorld().getPVP())
|
||||
return false;
|
||||
//If it made it this far, pvp is enabled
|
||||
return true;
|
||||
}
|
||||
public static int getXp(Entity entity, EntityDamageEvent event)
|
||||
{
|
||||
int xp = 0;
|
||||
if(entity instanceof LivingEntity)
|
||||
{
|
||||
LivingEntity le = (LivingEntity)entity;
|
||||
//Prevent a ridiculous amount of XP being granted by capping it at the remaining health of the entity
|
||||
int hpLeft = le.getHealth(), xpinc = 0;
|
||||
Entity y = arrow.getShooter();
|
||||
Entity x = event.getEntity();
|
||||
if(x instanceof Player)
|
||||
{
|
||||
Player defender = (Player)x;
|
||||
PlayerProfile PPd = Users.getProfile(defender);
|
||||
if(PPd == null)
|
||||
Users.addUser(defender);
|
||||
if(mcPermissions.getInstance().unarmed(defender) && defender.getItemInHand().getTypeId() == 0)
|
||||
{
|
||||
if(defender != null && PPd.getSkillLevel(SkillType.UNARMED) >= 1000)
|
||||
{
|
||||
if(Math.random() * 1000 <= 500)
|
||||
{
|
||||
event.setCancelled(true);
|
||||
defender.sendMessage(mcLocale.getString("Combat.ArrowDeflect")); //$NON-NLS-1$
|
||||
return;
|
||||
}
|
||||
} else if(defender != null && Math.random() * 1000 <= (PPd.getSkillLevel(SkillType.UNARMED) / 2))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
defender.sendMessage(mcLocale.getString("Combat.ArrowDeflect")); //$NON-NLS-1$
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* If attacker is player
|
||||
*/
|
||||
if(y instanceof Player)
|
||||
{
|
||||
Player attacker = (Player)y;
|
||||
PlayerProfile PPa = Users.getProfile(attacker);
|
||||
int damage = event.getDamage();
|
||||
if(mcPermissions.getInstance().archery(attacker) && damage > 0)
|
||||
{
|
||||
Archery.trackArrows(pluginx, x, PPa);
|
||||
|
||||
if(hpLeft < event.getDamage())
|
||||
/*
|
||||
* IGNITION
|
||||
*/
|
||||
Archery.ignitionCheck(x, attacker);
|
||||
/*
|
||||
* Defender is Monster
|
||||
*/
|
||||
if(!pluginx.misc.mobSpawnerList.contains(x.getEntityId()))
|
||||
{
|
||||
int xp = getXp(x, damage);
|
||||
PPa.addXP(SkillType.ARCHERY, xp*10, attacker);
|
||||
}
|
||||
/*
|
||||
* Attacker is Player
|
||||
*/
|
||||
if(x instanceof Player){
|
||||
Player defender = (Player)x;
|
||||
PlayerProfile PPd = Users.getProfile(defender);
|
||||
/*
|
||||
* Stuff for the daze proc
|
||||
*/
|
||||
if(PPa.inParty() && PPd.inParty())
|
||||
{
|
||||
if(Party.getInstance().inSameParty(defender, attacker))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* PVP XP
|
||||
*/
|
||||
if(LoadProperties.pvpxp && ((PPd.getLastLogin()+5)*1000) < System.currentTimeMillis() && !attacker.getName().equals(defender.getName()))
|
||||
{
|
||||
int xp = (int) ((damage * 2) * 10);
|
||||
PPa.addXP(SkillType.ARCHERY, xp, attacker);
|
||||
}
|
||||
/*
|
||||
* DAZE PROC
|
||||
*/
|
||||
Archery.dazeCheck(defender, attacker);
|
||||
}
|
||||
}
|
||||
Skills.XpCheckSkill(SkillType.ARCHERY, attacker);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to damage target for value dmg with reason CUSTOM
|
||||
*
|
||||
* @param target LivingEntity which to attempt to damage
|
||||
* @param dmg Amount of damage to attempt to do
|
||||
*/
|
||||
public static void dealDamage(LivingEntity target, int dmg){
|
||||
dealDamage(target, dmg, EntityDamageEvent.DamageCause.CUSTOM);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to damage target for value dmg with reason cause
|
||||
*
|
||||
* @param target LivingEntity which to attempt to damage
|
||||
* @param dmg Amount of damage to attempt to do
|
||||
* @param cause DamageCause to pass to damage event
|
||||
*/
|
||||
public static void dealDamage(LivingEntity target, int dmg, DamageCause cause) {
|
||||
if(LoadProperties.eventCallback) {
|
||||
EntityDamageEvent ede = new EntityDamageEvent(target, cause, dmg);
|
||||
Bukkit.getPluginManager().callEvent(ede);
|
||||
if(ede.isCancelled()) return;
|
||||
|
||||
target.damage(ede.getDamage());
|
||||
} else {
|
||||
target.damage(dmg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to damage target for value dmg with reason ENTITY_ATTACK with damager attacker
|
||||
*
|
||||
* @param target LivingEntity which to attempt to damage
|
||||
* @param dmg Amount of damage to attempt to do
|
||||
* @param attacker Player to pass to event as damager
|
||||
*/
|
||||
public static void dealDamage(LivingEntity target, int dmg, Player attacker) {
|
||||
if(LoadProperties.eventCallback) {
|
||||
EntityDamageEvent ede = (EntityDamageByEntityEvent) new FakeEntityDamageByEntityEvent(attacker, target, EntityDamageEvent.DamageCause.ENTITY_ATTACK, dmg);
|
||||
Bukkit.getPluginManager().callEvent(ede);
|
||||
if(ede.isCancelled()) return;
|
||||
|
||||
target.damage(ede.getDamage());
|
||||
} else {
|
||||
target.damage(dmg);
|
||||
}
|
||||
}
|
||||
|
||||
private static void PvPExperienceGain(Player attacker, PlayerProfile PPa, Player defender, int damage, SkillType skillType)
|
||||
{
|
||||
if (!LoadProperties.pvpxp)
|
||||
return;
|
||||
|
||||
PlayerProfile PPd = Users.getProfile(defender);
|
||||
|
||||
if(System.currentTimeMillis() >= (PPd.getRespawnATS()*1000) + 5000
|
||||
&& ((PPd.getLastLogin()+5)*1000) < System.currentTimeMillis()
|
||||
&& defender.getHealth() >= 1)
|
||||
{
|
||||
//Prevent a ridiculous amount of XP being granted by capping it at the remaining health of the mob
|
||||
int hpLeft = defender.getHealth(), xpinc = 0;
|
||||
|
||||
if(hpLeft < damage)
|
||||
{
|
||||
if(hpLeft > 0)
|
||||
xpinc = hpLeft;
|
||||
else
|
||||
xpinc = event.getDamage();
|
||||
xpinc = 0;
|
||||
} else
|
||||
xpinc = damage;
|
||||
|
||||
int xp = (int) (xpinc * 2 * LoadProperties.pvpxprewardmodifier);
|
||||
PPa.addXP(skillType, xp*10, attacker);
|
||||
Skills.XpCheckSkill(skillType, attacker);
|
||||
}
|
||||
}
|
||||
|
||||
private static void PvEExperienceGain(Player attacker, PlayerProfile PPa, LivingEntity target, int damage, SkillType skillType)
|
||||
{
|
||||
int xp = getXp(target, damage);
|
||||
PPa.addXP(skillType, xp*10, attacker);
|
||||
}
|
||||
|
||||
public static int getXp(Entity entity, int damage)
|
||||
{
|
||||
int xp = 0;
|
||||
if(entity instanceof LivingEntity)
|
||||
{
|
||||
LivingEntity le = (LivingEntity) entity;
|
||||
//Prevent a ridiculous amount of XP being granted by capping it at the remaining health of the entity
|
||||
int hpLeft = le.getHealth();
|
||||
int xpinc = 0;
|
||||
|
||||
if(hpLeft < damage)
|
||||
{
|
||||
if(hpLeft > 0)
|
||||
xpinc = hpLeft;
|
||||
else
|
||||
xpinc = 0;
|
||||
}
|
||||
else
|
||||
xpinc = damage;
|
||||
|
||||
if(entity instanceof Animals)
|
||||
xp = (int) (xpinc * LoadProperties.animalXP);
|
||||
else
|
||||
{
|
||||
xp = (int) (xpinc * 1);
|
||||
} else
|
||||
{
|
||||
if(entity instanceof Enderman)
|
||||
xp = (xpinc * 2);
|
||||
else if(entity instanceof Creeper)
|
||||
xp = (xpinc * 4);
|
||||
else if(entity instanceof Silverfish)
|
||||
xp = (xpinc * 3);
|
||||
else if(entity instanceof CaveSpider)
|
||||
xp = (xpinc * 3);
|
||||
else if(entity instanceof Spider)
|
||||
xp = (xpinc * 3);
|
||||
else if(entity instanceof Skeleton)
|
||||
xp = (xpinc * 2);
|
||||
else if(entity instanceof Zombie)
|
||||
xp = (xpinc * 2);
|
||||
else if(entity instanceof PigZombie)
|
||||
xp = (xpinc * 3);
|
||||
else if(entity instanceof Slime)
|
||||
xp = (xpinc * 2);
|
||||
else if(entity instanceof Ghast)
|
||||
xp = (xpinc * 3);
|
||||
else if(entity instanceof Blaze)
|
||||
xp = (xpinc * 3);
|
||||
else if(entity instanceof EnderDragon)
|
||||
xp = (xpinc * 8);
|
||||
EntityType type = entity.getType();
|
||||
switch(type){
|
||||
case BLAZE:
|
||||
xp = (int) (xpinc * LoadProperties.blazeXP);
|
||||
break;
|
||||
case CAVE_SPIDER:
|
||||
xp = (int) (xpinc * LoadProperties.cavespiderXP);
|
||||
break;
|
||||
case CREEPER:
|
||||
xp = (int) (xpinc * LoadProperties.creeperXP);
|
||||
break;
|
||||
case ENDER_DRAGON:
|
||||
xp = (int) (xpinc * LoadProperties.enderdragonXP);
|
||||
break;
|
||||
case ENDERMAN:
|
||||
xp = (int) (xpinc * LoadProperties.endermanXP);
|
||||
break;
|
||||
case GHAST:
|
||||
xp = (int) (xpinc * LoadProperties.ghastXP);
|
||||
break;
|
||||
case MAGMA_CUBE:
|
||||
xp = (int) (xpinc * LoadProperties.magmacubeXP);
|
||||
break;
|
||||
case PIG_ZOMBIE:
|
||||
xp = (int) (xpinc * LoadProperties.pigzombieXP);
|
||||
break;
|
||||
case SILVERFISH:
|
||||
xp = (int) (xpinc * LoadProperties.silverfishXP);
|
||||
break;
|
||||
case SKELETON:
|
||||
xp = (int) (xpinc * LoadProperties.skeletonXP);
|
||||
break;
|
||||
case SLIME:
|
||||
xp = (int) (xpinc * LoadProperties.slimeXP);
|
||||
break;
|
||||
case SPIDER:
|
||||
xp = (int) (xpinc * LoadProperties.spiderXP);
|
||||
break;
|
||||
case ZOMBIE:
|
||||
xp = (int) (xpinc * LoadProperties.zombieXP);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return xp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,11 +29,36 @@ import com.gmail.nossr50.config.LoadProperties;
|
||||
public class Database {
|
||||
|
||||
private mcMMO plugin;
|
||||
private String connectionString;
|
||||
private String connectionString = "jdbc:mysql://" + LoadProperties.MySQLserverName + ":" + LoadProperties.MySQLport + "/" + LoadProperties.MySQLdbName + "?user=" + LoadProperties.MySQLuserName + "&password=" + LoadProperties.MySQLdbPass;
|
||||
private boolean isConnected = false;
|
||||
private Connection conn = null;
|
||||
|
||||
public void connect()
|
||||
{
|
||||
try
|
||||
{
|
||||
System.out.println("[mcMMO] Attempting connection to MySQL...");
|
||||
conn = DriverManager.getConnection(connectionString);
|
||||
isConnected = true;
|
||||
System.out.println("[mcMMO] Connection to MySQL established!");
|
||||
} catch (SQLException ex)
|
||||
{
|
||||
isConnected = false;
|
||||
ex.printStackTrace();
|
||||
System.out.println("SQLException: " + ex.getMessage());
|
||||
System.out.println("SQLState: " + ex.getSQLState());
|
||||
System.out.println("VendorError: " + ex.getErrorCode());
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isConnected()
|
||||
{
|
||||
return isConnected;
|
||||
}
|
||||
|
||||
public Database(mcMMO instance) {
|
||||
connect(); //Connect to MySQL
|
||||
this.plugin = instance;
|
||||
this.connectionString = "jdbc:mysql://" + LoadProperties.MySQLserverName + ":" + LoadProperties.MySQLport + "/" + LoadProperties.MySQLdbName + "?user=" + LoadProperties.MySQLuserName + "&password=" + LoadProperties.MySQLdbPass;
|
||||
// Load the driver instance
|
||||
try {
|
||||
Class.forName("com.mysql.jdbc.Driver");
|
||||
@@ -47,6 +72,7 @@ public class Database {
|
||||
System.out.println("VendorError: " + e.getErrorCode());
|
||||
}
|
||||
}
|
||||
|
||||
//Create the DB structure
|
||||
public void createStructure() {
|
||||
Write("CREATE TABLE IF NOT EXISTS `" + LoadProperties.MySQLtablePrefix + "huds` (`user_id` int(10) unsigned NOT NULL,"
|
||||
@@ -70,6 +96,7 @@ public class Database {
|
||||
+ "`swords` int(32) unsigned NOT NULL DEFAULT '0',"
|
||||
+ "`axes` int(32) unsigned NOT NULL DEFAULT '0',"
|
||||
+ "`acrobatics` int(32) unsigned NOT NULL DEFAULT '0',"
|
||||
+ "`blast_mining` int(32) unsigned NOT NULL DEFAULT '0',"
|
||||
+ "PRIMARY KEY (`user_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
|
||||
Write("CREATE TABLE IF NOT EXISTS `" + LoadProperties.MySQLtablePrefix + "skills` (`user_id` int(10) unsigned NOT NULL,"
|
||||
+ "`taming` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||
@@ -97,27 +124,22 @@ public class Database {
|
||||
+ "`axes` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||
+ "`acrobatics` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||
+ "PRIMARY KEY (`user_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
|
||||
Write("CREATE TABLE IF NOT EXISTS `" + LoadProperties.MySQLtablePrefix + "spawn` (`user_id` int(10) NOT NULL,"
|
||||
+ "`x` int(64) NOT NULL DEFAULT '0',"
|
||||
+ "`y` int(64) NOT NULL DEFAULT '0',"
|
||||
+ "`z` int(64) NOT NULL DEFAULT '0',"
|
||||
+ "`world` varchar(50) NOT NULL DEFAULT '',"
|
||||
+ "PRIMARY KEY (`user_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
|
||||
|
||||
Write("DROP TABLE IF EXISTS `"+LoadProperties.MySQLtablePrefix+"skills2`");
|
||||
Write("DROP TABLE IF EXISTS `"+LoadProperties.MySQLtablePrefix+"experience2`");
|
||||
Write("DROP TABLE IF EXISTS `"+LoadProperties.MySQLtablePrefix+"spawn`");
|
||||
|
||||
checkDatabaseStructure();
|
||||
checkDatabaseStructureForBlastMining();
|
||||
}
|
||||
|
||||
public void checkDatabaseStructure()
|
||||
{
|
||||
String sql = "SELECT * FROM `mcmmo_experience` ORDER BY `"+LoadProperties.MySQLtablePrefix+"experience`.`fishing` ASC LIMIT 0 , 30";
|
||||
String sql = "SELECT * FROM `"+LoadProperties.MySQLtablePrefix+"experience` ORDER BY `"+LoadProperties.MySQLtablePrefix+"experience`.`fishing` ASC LIMIT 0 , 30";
|
||||
|
||||
ResultSet rs = null;
|
||||
HashMap<Integer, ArrayList<String>> Rows = new HashMap<Integer, ArrayList<String>>();
|
||||
try {
|
||||
Connection conn = DriverManager.getConnection(connectionString);
|
||||
PreparedStatement stmt = conn.prepareStatement(sql);
|
||||
if (stmt.executeQuery() != null) {
|
||||
stmt.executeQuery();
|
||||
@@ -130,28 +152,64 @@ public class Database {
|
||||
Rows.put(rs.getRow(), Col);
|
||||
}
|
||||
}
|
||||
conn.close();
|
||||
} catch (SQLException ex) {
|
||||
System.out.println("Updating mcMMO MySQL tables...");
|
||||
System.out.println("Updating mcMMO MySQL tables for Fishing...");
|
||||
Write("ALTER TABLE `"+LoadProperties.MySQLtablePrefix + "skills` ADD `fishing` int(10) NOT NULL DEFAULT '0' ;");
|
||||
Write("ALTER TABLE `"+LoadProperties.MySQLtablePrefix + "experience` ADD `fishing` int(10) NOT NULL DEFAULT '0' ;");
|
||||
}
|
||||
}
|
||||
|
||||
public void checkDatabaseStructureForBlastMining()
|
||||
{
|
||||
String sql = "SELECT * FROM `"+LoadProperties.MySQLtablePrefix+"cooldowns` ORDER BY `"+LoadProperties.MySQLtablePrefix+"cooldowns`.`blast_mining` ASC LIMIT 0 , 30";
|
||||
|
||||
ResultSet rs = null;
|
||||
HashMap<Integer, ArrayList<String>> Rows = new HashMap<Integer, ArrayList<String>>();
|
||||
try {
|
||||
PreparedStatement stmt = conn.prepareStatement(sql);
|
||||
if (stmt.executeQuery() != null) {
|
||||
stmt.executeQuery();
|
||||
rs = stmt.getResultSet();
|
||||
while (rs.next()) {
|
||||
ArrayList<String> Col = new ArrayList<String>();
|
||||
for (int i = 1; i <= rs.getMetaData().getColumnCount(); i++) {
|
||||
Col.add(rs.getString(i));
|
||||
}
|
||||
Rows.put(rs.getRow(), Col);
|
||||
}
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
System.out.println("Updating mcMMO MySQL tables for Blast Mining...");
|
||||
Write("ALTER TABLE `"+LoadProperties.MySQLtablePrefix + "cooldowns` ADD `blast_mining` int(32) NOT NULL DEFAULT '0' ;");
|
||||
}
|
||||
}
|
||||
|
||||
// write query
|
||||
public boolean Write(String sql) {
|
||||
try {
|
||||
Connection conn = DriverManager.getConnection(connectionString);
|
||||
PreparedStatement stmt = conn.prepareStatement(sql);
|
||||
stmt.executeUpdate();
|
||||
conn.close();
|
||||
return true;
|
||||
} catch (SQLException ex) {
|
||||
System.out.println("SQLException: " + ex.getMessage());
|
||||
System.out.println("SQLState: " + ex.getSQLState());
|
||||
System.out.println("VendorError: " + ex.getErrorCode());
|
||||
return false;
|
||||
}
|
||||
if(conn != null)
|
||||
{
|
||||
try {
|
||||
PreparedStatement stmt = conn.prepareStatement(sql);
|
||||
stmt.executeUpdate();
|
||||
return true;
|
||||
} catch (SQLException ex) {
|
||||
System.out.println("SQLException: " + ex.getMessage());
|
||||
System.out.println("SQLState: " + ex.getSQLState());
|
||||
System.out.println("VendorError: " + ex.getErrorCode());
|
||||
return false;
|
||||
}
|
||||
} else
|
||||
{
|
||||
isConnected = false;
|
||||
connect(); //Attempt to reconnect
|
||||
if(isConnected = true)
|
||||
{
|
||||
Write(sql); //Try the same operation again now that we are connected
|
||||
} else {
|
||||
System.out.println("[mcMMO] Unable to connect to MySQL! Make sure the SQL server is online!");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get Int
|
||||
@@ -159,26 +217,35 @@ public class Database {
|
||||
public Integer GetInt(String sql) {
|
||||
ResultSet rs = null;
|
||||
Integer result = 0;
|
||||
try {
|
||||
Connection conn = DriverManager.getConnection(connectionString);
|
||||
PreparedStatement stmt = conn.prepareStatement(sql);
|
||||
stmt = conn.prepareStatement(sql);
|
||||
if (stmt.executeQuery() != null) {
|
||||
stmt.executeQuery();
|
||||
rs = stmt.getResultSet();
|
||||
if (rs.next()) {
|
||||
result = rs.getInt(1);
|
||||
} else {
|
||||
result = 0;
|
||||
}
|
||||
}
|
||||
conn.close();
|
||||
} catch (SQLException ex) {
|
||||
System.out.println("SQLException: " + ex.getMessage());
|
||||
System.out.println("SQLState: " + ex.getSQLState());
|
||||
System.out.println("VendorError: " + ex.getErrorCode());
|
||||
if(conn != null)
|
||||
{
|
||||
try {
|
||||
PreparedStatement stmt = conn.prepareStatement(sql);
|
||||
stmt = conn.prepareStatement(sql);
|
||||
if (stmt.executeQuery() != null) {
|
||||
stmt.executeQuery();
|
||||
rs = stmt.getResultSet();
|
||||
if (rs.next()) {
|
||||
result = rs.getInt(1);
|
||||
} else {
|
||||
result = 0;
|
||||
}
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
System.out.println("SQLException: " + ex.getMessage());
|
||||
System.out.println("SQLState: " + ex.getSQLState());
|
||||
System.out.println("VendorError: " + ex.getErrorCode());
|
||||
}
|
||||
} else {
|
||||
isConnected = false;
|
||||
connect(); //Attempt to reconnect
|
||||
if(isConnected = true)
|
||||
{
|
||||
GetInt(sql); //Try the same operation again now that we are connected
|
||||
} else {
|
||||
System.out.println("[mcMMO] Unable to connect to MySQL! Make sure the SQL server is online!");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -186,25 +253,35 @@ public class Database {
|
||||
public HashMap<Integer, ArrayList<String>> Read(String sql) {
|
||||
ResultSet rs = null;
|
||||
HashMap<Integer, ArrayList<String>> Rows = new HashMap<Integer, ArrayList<String>>();
|
||||
try {
|
||||
Connection conn = DriverManager.getConnection(connectionString);
|
||||
PreparedStatement stmt = conn.prepareStatement(sql);
|
||||
if (stmt.executeQuery() != null) {
|
||||
stmt.executeQuery();
|
||||
rs = stmt.getResultSet();
|
||||
while (rs.next()) {
|
||||
ArrayList<String> Col = new ArrayList<String>();
|
||||
for (int i = 1; i <= rs.getMetaData().getColumnCount(); i++) {
|
||||
Col.add(rs.getString(i));
|
||||
}
|
||||
Rows.put(rs.getRow(), Col);
|
||||
}
|
||||
}
|
||||
conn.close();
|
||||
} catch (SQLException ex) {
|
||||
System.out.println("SQLException: " + ex.getMessage());
|
||||
System.out.println("SQLState: " + ex.getSQLState());
|
||||
System.out.println("VendorError: " + ex.getErrorCode());
|
||||
if(conn != null)
|
||||
{
|
||||
try {
|
||||
PreparedStatement stmt = conn.prepareStatement(sql);
|
||||
if (stmt.executeQuery() != null) {
|
||||
stmt.executeQuery();
|
||||
rs = stmt.getResultSet();
|
||||
while (rs.next()) {
|
||||
ArrayList<String> Col = new ArrayList<String>();
|
||||
for (int i = 1; i <= rs.getMetaData().getColumnCount(); i++) {
|
||||
Col.add(rs.getString(i));
|
||||
}
|
||||
Rows.put(rs.getRow(), Col);
|
||||
}
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
System.out.println("SQLException: " + ex.getMessage());
|
||||
System.out.println("SQLState: " + ex.getSQLState());
|
||||
System.out.println("VendorError: " + ex.getErrorCode());
|
||||
}
|
||||
} else {
|
||||
isConnected = false;
|
||||
connect(); //Attempt to reconnect
|
||||
if(isConnected = true)
|
||||
{
|
||||
Read(sql); //Attempt the same operation again now that we are connected
|
||||
} else {
|
||||
System.out.println("[mcMMO] Unable to connect to MySQL! Make sure the SQL server is online!");
|
||||
}
|
||||
}
|
||||
return Rows;
|
||||
}
|
||||
|
||||
@@ -16,16 +16,15 @@
|
||||
*/
|
||||
package com.gmail.nossr50;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import com.gmail.nossr50.config.*;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.skills.*;
|
||||
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.skills.Skills;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
|
||||
public class Item {
|
||||
@@ -34,41 +33,24 @@ public class Item {
|
||||
{
|
||||
ItemStack inhand = player.getItemInHand();
|
||||
if(LoadProperties.chimaeraWingEnable && inhand.getTypeId() == LoadProperties.chimaeraId)
|
||||
{
|
||||
chimaerawing(player, plugin);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void chimaerawing(Player player, Plugin plugin)
|
||||
{
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
ItemStack is = player.getItemInHand();
|
||||
Block block = player.getLocation().getBlock();
|
||||
if(mcPermissions.getInstance().chimaeraWing(player) && is.getTypeId() == LoadProperties.chimaeraId)
|
||||
int chimaeraID = LoadProperties.chimaeraId;
|
||||
int itemsUsed = LoadProperties.feathersConsumedByChimaeraWing;
|
||||
if(mcPermissions.getInstance().chimaeraWing(player) && is.getTypeId() == chimaeraID)
|
||||
{
|
||||
if(Skills.cooldownOver(player, PP.getRecentlyHurt(), 60) && is.getAmount() >= LoadProperties.feathersConsumedByChimaeraWing)
|
||||
if(Skills.cooldownOver(player, PP.getRecentlyHurt(), 60) && is.getAmount() >= itemsUsed)
|
||||
{
|
||||
Block derp = player.getLocation().getBlock();
|
||||
int y = derp.getY();
|
||||
ItemStack[] inventory = player.getInventory().getContents();
|
||||
for(ItemStack x : inventory){
|
||||
if(x != null && x.getTypeId() == LoadProperties.chimaeraId){
|
||||
if(x.getAmount() >= LoadProperties.feathersConsumedByChimaeraWing + 1)
|
||||
{
|
||||
x.setAmount(x.getAmount() - LoadProperties.feathersConsumedByChimaeraWing);
|
||||
player.getInventory().setContents(inventory);
|
||||
player.updateInventory();
|
||||
break;
|
||||
} else {
|
||||
x.setAmount(0);
|
||||
x.setTypeId(0);
|
||||
player.getInventory().setContents(inventory);
|
||||
player.updateInventory();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
player.setItemInHand(new ItemStack(chimaeraID, is.getAmount() - itemsUsed));
|
||||
|
||||
while(y < 127)
|
||||
{
|
||||
y++;
|
||||
@@ -82,23 +64,18 @@ public class Item {
|
||||
}
|
||||
}
|
||||
}
|
||||
if(PP.getMySpawn(player) != null)
|
||||
{
|
||||
Location mySpawn = PP.getMySpawn(player);
|
||||
if(mySpawn != null){
|
||||
player.teleport(mySpawn); //Do it twice to prevent weird stuff
|
||||
player.teleport(mySpawn);
|
||||
}
|
||||
} else {
|
||||
|
||||
if(player.getBedSpawnLocation() != null && player.getBedSpawnLocation().getBlock().getType().equals(Material.BED_BLOCK))
|
||||
player.teleport(player.getBedSpawnLocation());
|
||||
else
|
||||
player.teleport(player.getWorld().getSpawnLocation());
|
||||
}
|
||||
|
||||
player.sendMessage(mcLocale.getString("Item.ChimaeraWingPass")); //$NON-NLS-1$
|
||||
} else if (!Skills.cooldownOver(player, PP.getRecentlyHurt(), 60) && is.getAmount() >= 10)
|
||||
{
|
||||
player.sendMessage(mcLocale.getString("Item.InjuredWait", new Object[] {Skills.calculateTimeLeft(player, PP.getRecentlyHurt(), 60)})); //$NON-NLS-1$
|
||||
} else if (is.getTypeId() == LoadProperties.chimaeraId && is.getAmount() <= 9){
|
||||
player.sendMessage(mcLocale.getString("Item.NeedFeathers")); //$NON-NLS-1$
|
||||
}
|
||||
else if (!Skills.cooldownOver(player, PP.getRecentlyHurt(), 60) && is.getAmount() >= itemsUsed)
|
||||
player.sendMessage(mcLocale.getString("Item.InjuredWait", new Object[] {Skills.calculateTimeLeft(player, PP.getRecentlyHurt(), 60)})); //$NON-NLS-1$
|
||||
else if (is.getTypeId() == LoadProperties.chimaeraId && is.getAmount() <= itemsUsed)
|
||||
player.sendMessage(mcLocale.getString("Item.NeedFeathers")); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,8 +53,6 @@ public class Leaderboard
|
||||
Tree Unarmed = new Tree();
|
||||
Tree Taming = new Tree();
|
||||
Tree Fishing = new Tree();
|
||||
Tree Enchanting = new Tree();
|
||||
Tree Alchemy = new Tree();
|
||||
Tree PowerLevel = new Tree();
|
||||
|
||||
//Add Data To Trees
|
||||
@@ -148,8 +146,6 @@ public class Leaderboard
|
||||
leaderWrite(Acrobatics.inOrder(), SkillType.ACROBATICS); //$NON-NLS-1$
|
||||
leaderWrite(Taming.inOrder(), SkillType.TAMING); //$NON-NLS-1$
|
||||
leaderWrite(Fishing.inOrder(), SkillType.FISHING); //$NON-NLS-1$
|
||||
leaderWrite(Alchemy.inOrder(), SkillType.ALCHEMY); //$NON-NLS-1$
|
||||
leaderWrite(Enchanting.inOrder(), SkillType.ENCHANTING); //$NON-NLS-1$
|
||||
leaderWrite(PowerLevel.inOrder(), SkillType.ALL); //$NON-NLS-1$
|
||||
}
|
||||
public static void leaderWrite(PlayerStat[] ps, SkillType skillType)
|
||||
|
||||
569
src/main/java/com/gmail/nossr50/Metrics.java
Normal file
569
src/main/java/com/gmail/nossr50/Metrics.java
Normal file
@@ -0,0 +1,569 @@
|
||||
/*
|
||||
* Copyright 2011 Tyler Blair. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and contributors and should not be interpreted as representing official policies,
|
||||
* either expressed or implied, of anybody else.
|
||||
*/
|
||||
|
||||
package com.gmail.nossr50;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.PluginDescriptionFile;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.Proxy;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
public class Metrics {
|
||||
|
||||
/**
|
||||
* The current revision number
|
||||
*/
|
||||
private final static int REVISION = 5;
|
||||
|
||||
/**
|
||||
* The base url of the metrics domain
|
||||
*/
|
||||
private static final String BASE_URL = "http://metrics.griefcraft.com";
|
||||
|
||||
/**
|
||||
* The url used to report a server's status
|
||||
*/
|
||||
private static final String REPORT_URL = "/report/%s";
|
||||
|
||||
/**
|
||||
* The file where guid and opt out is stored in
|
||||
*/
|
||||
private static final String CONFIG_FILE = "plugins/PluginMetrics/config.yml";
|
||||
|
||||
/**
|
||||
* The separator to use for custom data. This MUST NOT change unless you are hosting your own
|
||||
* version of metrics and want to change it.
|
||||
*/
|
||||
private static final String CUSTOM_DATA_SEPARATOR = "~~";
|
||||
|
||||
/**
|
||||
* Interval of time to ping (in minutes)
|
||||
*/
|
||||
private final static int PING_INTERVAL = 10;
|
||||
|
||||
/**
|
||||
* A map of all of the graphs for each plugin
|
||||
*/
|
||||
private Map<Plugin, Set<Graph>> graphs = Collections.synchronizedMap(new HashMap<Plugin, Set<Graph>>());
|
||||
|
||||
/**
|
||||
* A convenient map of the default Graph objects (used by addCustomData mainly)
|
||||
*/
|
||||
private Map<Plugin, Graph> defaultGraphs = Collections.synchronizedMap(new HashMap<Plugin, Graph>());
|
||||
|
||||
/**
|
||||
* The plugin configuration file
|
||||
*/
|
||||
private final YamlConfiguration configuration;
|
||||
|
||||
/**
|
||||
* Unique server id
|
||||
*/
|
||||
private String guid;
|
||||
|
||||
public Metrics() throws IOException {
|
||||
// load the config
|
||||
File file = new File(CONFIG_FILE);
|
||||
configuration = YamlConfiguration.loadConfiguration(file);
|
||||
|
||||
// add some defaults
|
||||
configuration.addDefault("opt-out", false);
|
||||
configuration.addDefault("guid", UUID.randomUUID().toString());
|
||||
|
||||
// Do we need to create the file?
|
||||
if (configuration.get("guid", null) == null) {
|
||||
configuration.options().header("http://metrics.griefcraft.com").copyDefaults(true);
|
||||
configuration.save(file);
|
||||
}
|
||||
|
||||
// Load the guid then
|
||||
guid = configuration.getString("guid");
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct and create a Graph that can be used to separate specific plotters to their own graphs
|
||||
* on the metrics website. Plotters can be added to the graph object returned.
|
||||
*
|
||||
* @param plugin
|
||||
* @param type
|
||||
* @param name
|
||||
* @return Graph object created. Will never return NULL under normal circumstances unless bad parameters are given
|
||||
*/
|
||||
public Graph createGraph(Plugin plugin, Graph.Type type, String name) {
|
||||
if (plugin == null || type == null || name == null) {
|
||||
throw new IllegalArgumentException("All arguments must not be null");
|
||||
}
|
||||
|
||||
// Construct the graph object
|
||||
Graph graph = new Graph(type, name);
|
||||
|
||||
// Get the graphs for the plugin
|
||||
Set<Graph> graphs = getOrCreateGraphs(plugin);
|
||||
|
||||
// Now we can add our graph
|
||||
graphs.add(graph);
|
||||
|
||||
// and return back
|
||||
return graph;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a custom data plotter for a given plugin
|
||||
*
|
||||
* @param plugin
|
||||
* @param plotter
|
||||
*/
|
||||
public void addCustomData(Plugin plugin, Plotter plotter) {
|
||||
// The default graph for the plugin
|
||||
Graph graph = getOrCreateDefaultGraph(plugin);
|
||||
|
||||
// Add the plotter to the graph o/
|
||||
graph.addPlotter(plotter);
|
||||
|
||||
// Ensure the default graph is included in the submitted graphs
|
||||
getOrCreateGraphs(plugin).add(graph);
|
||||
}
|
||||
|
||||
/**
|
||||
* Begin measuring a plugin
|
||||
*
|
||||
* @param plugin
|
||||
*/
|
||||
public void beginMeasuringPlugin(final Plugin plugin) {
|
||||
// Did we opt out?
|
||||
if (configuration.getBoolean("opt-out", false)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Begin hitting the server with glorious data
|
||||
plugin.getServer().getScheduler().scheduleAsyncRepeatingTask(plugin, new Runnable() {
|
||||
private boolean firstPost = true;
|
||||
|
||||
public void run() {
|
||||
try {
|
||||
// We use the inverse of firstPost because if it is the first time we are posting,
|
||||
// it is not a interval ping, so it evaluates to FALSE
|
||||
// Each time thereafter it will evaluate to TRUE, i.e PING!
|
||||
postPlugin(plugin, !firstPost);
|
||||
|
||||
// After the first post we set firstPost to false
|
||||
// Each post thereafter will be a ping
|
||||
firstPost = false;
|
||||
} catch (IOException e) {
|
||||
System.out.println("[Metrics] " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}, 0, PING_INTERVAL * 1200);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic method that posts a plugin to the metrics website
|
||||
*
|
||||
* @param plugin
|
||||
*/
|
||||
private void postPlugin(Plugin plugin, boolean isPing) throws IOException {
|
||||
// The plugin's description file containg all of the plugin data such as name, version, author, etc
|
||||
PluginDescriptionFile description = plugin.getDescription();
|
||||
|
||||
// The author string, created with description.getAuthors()
|
||||
// Authors are separated by a comma
|
||||
String authors = "";
|
||||
|
||||
// Add each author to the string
|
||||
for (String author : description.getAuthors()) {
|
||||
authors += author + ", ";
|
||||
}
|
||||
|
||||
// If there were any authors at all, we need to remove the last 2 characters
|
||||
// the last 2 characters are the last comma and space
|
||||
if (!authors.isEmpty()) {
|
||||
authors = authors.substring(0, authors.length() - 2);
|
||||
}
|
||||
|
||||
// Construct the post data
|
||||
String data = encode("guid") + '=' + encode(guid)
|
||||
+ encodeDataPair("authors", authors)
|
||||
+ encodeDataPair("version", description.getVersion())
|
||||
+ encodeDataPair("server", Bukkit.getVersion())
|
||||
+ encodeDataPair("players", Integer.toString(Bukkit.getServer().getOnlinePlayers().length))
|
||||
+ encodeDataPair("revision", String.valueOf(REVISION));
|
||||
|
||||
// If we're pinging, append it
|
||||
if (isPing) {
|
||||
data += encodeDataPair("ping", "true");
|
||||
}
|
||||
|
||||
// Add any custom data available for the plugin
|
||||
Set<Graph> graphs = getOrCreateGraphs(plugin);
|
||||
|
||||
// Acquire a lock on the graphs, which lets us make the assumption we also lock everything
|
||||
// inside of the graph (e.g plotters)
|
||||
synchronized(graphs) {
|
||||
Iterator<Graph> iter = graphs.iterator();
|
||||
|
||||
while (iter.hasNext()) {
|
||||
Graph graph = iter.next();
|
||||
|
||||
// Because we have a lock on the graphs set already, it is reasonable to assume
|
||||
// that our lock transcends down to the individual plotters in the graphs also.
|
||||
// Because our methods are private, no one but us can reasonably access this list
|
||||
// without reflection so this is a safe assumption without adding more code.
|
||||
for (Plotter plotter : graph.getPlotters()) {
|
||||
// The key name to send to the metrics server
|
||||
// The format is C-GRAPHNAME-PLOTTERNAME where separator - is defined at the top
|
||||
// Legacy (R4) submitters use the format Custom%s, or CustomPLOTTERNAME
|
||||
String key = String.format("C%s%s%s%s", CUSTOM_DATA_SEPARATOR, graph.getName(), CUSTOM_DATA_SEPARATOR, plotter.getColumnName());
|
||||
|
||||
// The value to send, which for the foreseeable future is just the string
|
||||
// value of plotter.getValue()
|
||||
String value = Integer.toString(plotter.getValue());
|
||||
|
||||
// Add it to the http post data :)
|
||||
data += encodeDataPair(key, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create the url
|
||||
URL url = new URL(BASE_URL + String.format(REPORT_URL, plugin.getDescription().getName()));
|
||||
|
||||
// Connect to the website
|
||||
URLConnection connection;
|
||||
|
||||
// Mineshafter creates a socks proxy, so we can safely bypass it
|
||||
// It does not reroute POST requests so we need to go around it
|
||||
if (isMineshafterPresent()) {
|
||||
connection = url.openConnection(Proxy.NO_PROXY);
|
||||
} else {
|
||||
connection = url.openConnection();
|
||||
}
|
||||
|
||||
connection.setDoOutput(true);
|
||||
|
||||
// Write the data
|
||||
OutputStreamWriter writer = new OutputStreamWriter(connection.getOutputStream());
|
||||
writer.write(data);
|
||||
writer.flush();
|
||||
|
||||
// Now read the response
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
|
||||
String response = reader.readLine();
|
||||
|
||||
// close resources
|
||||
writer.close();
|
||||
reader.close();
|
||||
|
||||
if (response.startsWith("ERR")) {
|
||||
throw new IOException(response); //Throw the exception
|
||||
} else {
|
||||
// Is this the first update this hour?
|
||||
if (response.contains("OK This is your first update this hour")) {
|
||||
synchronized (graphs) {
|
||||
Iterator<Graph> iter = graphs.iterator();
|
||||
|
||||
while (iter.hasNext()) {
|
||||
Graph graph = iter.next();
|
||||
|
||||
for (Plotter plotter : graph.getPlotters()) {
|
||||
plotter.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//if (response.startsWith("OK")) - We should get "OK" followed by an optional description if everything goes right
|
||||
}
|
||||
|
||||
/**
|
||||
* Get or create the Set of graphs for a specific plugin
|
||||
*
|
||||
* @param plugin
|
||||
* @return
|
||||
*/
|
||||
private Set<Graph> getOrCreateGraphs(Plugin plugin) {
|
||||
Set<Graph> theGraphs = graphs.get(plugin);
|
||||
|
||||
// Create the Set if it does not already exist
|
||||
if (theGraphs == null) {
|
||||
theGraphs = Collections.synchronizedSet(new HashSet<Graph>());
|
||||
graphs.put(plugin, theGraphs);
|
||||
}
|
||||
|
||||
return theGraphs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the default graph for a plugin and if it does not exist, create one
|
||||
*
|
||||
* @param plugin
|
||||
* @return
|
||||
*/
|
||||
private Graph getOrCreateDefaultGraph(Plugin plugin) {
|
||||
Graph graph = defaultGraphs.get(plugin);
|
||||
|
||||
// Not yet created :(
|
||||
if (graph == null) {
|
||||
graph = new Graph(Graph.Type.Line, "Default");
|
||||
defaultGraphs.put(plugin, graph);
|
||||
}
|
||||
|
||||
return graph;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if mineshafter is present. If it is, we need to bypass it to send POST requests
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private boolean isMineshafterPresent() {
|
||||
try {
|
||||
Class.forName("mineshafter.MineServer");
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode a key/value data pair to be used in a HTTP post request. This INCLUDES a & so the first
|
||||
* key/value pair MUST be included manually, e.g:
|
||||
* <p>
|
||||
* String httpData = encode("guid") + "=" + encode("1234") + encodeDataPair("authors") + "..";
|
||||
* </p>
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
private static String encodeDataPair(String key, String value) throws UnsupportedEncodingException {
|
||||
return "&" + encode(key) + "=" + encode(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode text as UTF-8
|
||||
*
|
||||
* @param text
|
||||
* @return
|
||||
*/
|
||||
private static String encode(String text) throws UnsupportedEncodingException {
|
||||
return URLEncoder.encode(text, "UTF-8");
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a custom graph on the website
|
||||
*/
|
||||
public static class Graph {
|
||||
|
||||
/**
|
||||
* The graph's type that will be visible on the website
|
||||
*/
|
||||
public static enum Type {
|
||||
|
||||
/**
|
||||
* A simple line graph which also includes a scrollable timeline viewer to view
|
||||
* as little or as much of the data as possible.
|
||||
*/
|
||||
Line,
|
||||
|
||||
/**
|
||||
* An area graph. This is the same as a line graph except the area under the curve is shaded
|
||||
*/
|
||||
Area,
|
||||
|
||||
/**
|
||||
* A column graph, which is a graph where the data is represented by columns on the vertical axis,
|
||||
* i.e they go up and down.
|
||||
*/
|
||||
Column,
|
||||
|
||||
/**
|
||||
* A pie graph. The graph is generated by taking the data for the last hour and summing it
|
||||
* together. Then the percentage for each plotter is calculated via round( (plot / total) * 100, 2 )
|
||||
*/
|
||||
Pie
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* What the graph should be plotted as
|
||||
*/
|
||||
private final Type type;
|
||||
|
||||
/**
|
||||
* The graph's name, alphanumeric and spaces only :)
|
||||
* If it does not comply to the above when submitted, it is rejected
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
/**
|
||||
* The set of plotters that are contained within this graph
|
||||
*/
|
||||
private final Set<Plotter> plotters = new LinkedHashSet<Plotter>();
|
||||
|
||||
private Graph(Type type, String name) {
|
||||
this.type = type;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the graph's name
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a plotter to the graph, which will be used to plot entries
|
||||
*
|
||||
* @param plotter
|
||||
*/
|
||||
public void addPlotter(Plotter plotter) {
|
||||
plotters.add(plotter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a plotter from the graph
|
||||
*
|
||||
* @param plotter
|
||||
*/
|
||||
public void removePlotter(Plotter plotter) {
|
||||
plotters.remove(plotter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an <b>unmodifiable</b> set of the plotter objects in the graph
|
||||
* @return
|
||||
*/
|
||||
public Set<Plotter> getPlotters() {
|
||||
return Collections.unmodifiableSet(plotters);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return (type.hashCode() * 17) ^ name.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
if (!(object instanceof Graph)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Graph graph = (Graph) object;
|
||||
return graph.type == type && graph.name.equals(name);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface used to collect custom data for a plugin
|
||||
*/
|
||||
public static abstract class Plotter {
|
||||
|
||||
/**
|
||||
* The plot's name
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
/**
|
||||
* Construct a plotter with the default plot name
|
||||
*/
|
||||
public Plotter() {
|
||||
this("Default");
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a plotter with a specific plot name
|
||||
*
|
||||
* @param name
|
||||
*/
|
||||
public Plotter(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current value for the plotted point
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract int getValue();
|
||||
|
||||
/**
|
||||
* Get the column name for the plotted point
|
||||
*
|
||||
* @return the plotted point's column name
|
||||
*/
|
||||
public String getColumnName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called after the website graphs have been updated
|
||||
*/
|
||||
public void reset() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getColumnName().hashCode() + getValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
if (!(object instanceof Plotter)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Plotter plotter = (Plotter) object;
|
||||
return plotter.name.equals(name) && plotter.getValue() == getValue();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -70,7 +70,8 @@ public class Users {
|
||||
|
||||
public static void addUser(Player player)
|
||||
{
|
||||
players.put(player, new PlayerProfile(player));
|
||||
if(!players.containsKey(player))
|
||||
players.put(player, new PlayerProfile(player.getName()));
|
||||
}
|
||||
public static void clearUsers()
|
||||
{
|
||||
@@ -82,26 +83,43 @@ public class Users {
|
||||
|
||||
public static void removeUser(Player player)
|
||||
{
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
|
||||
if(PP != null)
|
||||
//Only remove PlayerProfile if user is offline and we have it in memory
|
||||
if(!player.isOnline() && players.containsKey(player))
|
||||
{
|
||||
PP.save();
|
||||
if(players.containsKey(player))
|
||||
players.remove(player);
|
||||
players.get(player).save();
|
||||
players.remove(player);
|
||||
}
|
||||
}
|
||||
|
||||
public static void removeUserByName(String playerName)
|
||||
{
|
||||
Player target = null;
|
||||
for(Player player : players.keySet())
|
||||
{
|
||||
PlayerProfile PP = players.get(player);
|
||||
if(PP.getPlayerName().equals(playerName))
|
||||
{
|
||||
target = player;
|
||||
}
|
||||
}
|
||||
|
||||
players.remove(target);
|
||||
}
|
||||
|
||||
public static PlayerProfile getProfile(Player player){
|
||||
if(players.get(player) != null)
|
||||
return players.get(player);
|
||||
else
|
||||
{
|
||||
players.put(player, new PlayerProfile(player));
|
||||
players.put(player, new PlayerProfile(player.getName()));
|
||||
return players.get(player);
|
||||
}
|
||||
}
|
||||
|
||||
public static PlayerProfile getOfflineProfile(String playerName){
|
||||
return new PlayerProfile(playerName, false);
|
||||
}
|
||||
|
||||
public static Users getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new Users();
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.gmail.nossr50.commands.general;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.skills.Skills;
|
||||
|
||||
public class AddlevelsCommand implements CommandExecutor{
|
||||
private final mcMMO plugin;
|
||||
|
||||
public AddlevelsCommand(mcMMO instance) {
|
||||
this.plugin = instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
Player player = null;
|
||||
if (sender instanceof Player) {
|
||||
player = (Player) sender;
|
||||
}
|
||||
|
||||
if (player != null && !mcPermissions.getInstance().mmoedit(player)) {
|
||||
sender.sendMessage("This command requires permissions.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(sender instanceof Player)) {
|
||||
if (args.length < 2) {
|
||||
System.out.println("Usage is /addlevels playername skillname levels");
|
||||
return true;
|
||||
} else if (args.length == 3) {
|
||||
if ((plugin.getServer().getPlayer(args[0]) != null) && m.isInt(args[2]) && Skills.isSkill(args[1])) {
|
||||
int levels = Integer.valueOf(args[2]);
|
||||
Users.getProfile(plugin.getServer().getPlayer(args[0])).addLevels(Skills.getSkillType(args[1]), levels);
|
||||
System.out.println(args[1] + " has been modified for " + plugin.getServer().getPlayer(args[0]).getName() + ".");
|
||||
}
|
||||
} else {
|
||||
System.out.println("Usage is /addlevels playername skillname levels");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
|
||||
if (!mcPermissions.getInstance().mmoedit(player)) {
|
||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
||||
return true;
|
||||
}
|
||||
if (args.length < 2) {
|
||||
player.sendMessage(ChatColor.RED + "Usage is /addlevels playername skillname levels");
|
||||
return true;
|
||||
}
|
||||
if (args.length == 3) {
|
||||
if ((plugin.getServer().getPlayer(args[0]) != null) && m.isInt(args[2]) && Skills.isSkill(args[1])) {
|
||||
int levels = Integer.valueOf(args[2]);
|
||||
Users.getProfile(plugin.getServer().getPlayer(args[0])).addLevels(Skills.getSkillType(args[1]), levels);
|
||||
player.sendMessage(ChatColor.RED + args[1] + " has been modified.");
|
||||
}
|
||||
} else if (args.length == 2) {
|
||||
if (m.isInt(args[1]) && Skills.isSkill(args[0])) {
|
||||
int levels = Integer.valueOf(args[1]);
|
||||
PP.addLevels(Skills.getSkillType(args[0]), levels);
|
||||
player.sendMessage(ChatColor.RED + args[0] + " has been modified.");
|
||||
}
|
||||
} else {
|
||||
player.sendMessage(ChatColor.RED + "Usage is /addlevels playername skillname newvalue");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,6 @@ import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.skills.Skills;
|
||||
|
||||
@@ -23,16 +22,16 @@ public class AddxpCommand implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!mcPermissions.permissionsEnabled) {
|
||||
Player player = null;
|
||||
if (sender instanceof Player) {
|
||||
player = (Player) sender;
|
||||
}
|
||||
|
||||
if (player != null && !mcPermissions.getInstance().mmoedit(player)) {
|
||||
sender.sendMessage("This command requires permissions.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!LoadProperties.addxpEnable) {
|
||||
sender.sendMessage("This command is not enabled.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(sender instanceof Player)) {
|
||||
if (args.length < 2) {
|
||||
// No console aliasing yet
|
||||
@@ -42,7 +41,7 @@ public class AddxpCommand implements CommandExecutor {
|
||||
} else if (args.length == 3) {
|
||||
if ((plugin.getServer().getPlayer(args[0]) != null) && m.isInt(args[2]) && Skills.isSkill(args[1])) {
|
||||
int newvalue = Integer.valueOf(args[2]);
|
||||
Users.getProfile(plugin.getServer().getPlayer(args[0])).addXP(Skills.getSkillType(args[1]), newvalue, plugin.getServer().getPlayer(args[0]));
|
||||
Users.getProfile(plugin.getServer().getPlayer(args[0])).addXPOverrideNoBonus(Skills.getSkillType(args[1]), newvalue);
|
||||
plugin.getServer().getPlayer(args[0]).sendMessage(ChatColor.GREEN + "Experience granted!");
|
||||
System.out.println(args[1] + " has been modified for " + plugin.getServer().getPlayer(args[0]).getName() + ".");
|
||||
Skills.XpCheckAll(plugin.getServer().getPlayer(args[0]));
|
||||
@@ -55,8 +54,6 @@ public class AddxpCommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
|
||||
if (!mcPermissions.getInstance().mmoedit(player)) {
|
||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
||||
return true;
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
package com.gmail.nossr50.commands.general;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
|
||||
public class ClearmyspawnCommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!LoadProperties.clearmyspawnEnable || !LoadProperties.enableMySpawn) {
|
||||
sender.sendMessage("This command is not enabled.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(sender instanceof Player)) {
|
||||
sender.sendMessage("This command does not support console useage.");
|
||||
return true;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
|
||||
if (!mcPermissions.getInstance().mySpawn(player)) {
|
||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
||||
return true;
|
||||
}
|
||||
|
||||
double x = Bukkit.getServer().getWorlds().get(0).getSpawnLocation().getX();
|
||||
double y = Bukkit.getServer().getWorlds().get(0).getSpawnLocation().getY();
|
||||
double z = Bukkit.getServer().getWorlds().get(0).getSpawnLocation().getZ();
|
||||
String worldname = Bukkit.getServer().getWorlds().get(0).getName();
|
||||
PP.setMySpawn(x, y, z, worldname);
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.MyspawnCleared"));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
package com.gmail.nossr50.commands.general;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.skills.Skills;
|
||||
|
||||
public class InspectCommand implements CommandExecutor {
|
||||
private final mcMMO plugin;
|
||||
|
||||
public InspectCommand(mcMMO instance) {
|
||||
this.plugin = instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
|
||||
Player player = null;
|
||||
if (sender instanceof Player) {
|
||||
player = (Player) sender;
|
||||
}
|
||||
|
||||
if (sender instanceof Player && !mcPermissions.getInstance().inspect(player)) {
|
||||
sender.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args.length < 1) {
|
||||
sender.sendMessage(ChatColor.RED + "Proper usage is /whois <playername>");
|
||||
return true;
|
||||
}
|
||||
|
||||
// if split[1] is an online player
|
||||
if (plugin.getServer().getPlayer(args[0]) != null)
|
||||
{
|
||||
Player target = plugin.getServer().getPlayer(args[0]);
|
||||
PlayerProfile PPt = Users.getProfile(target);
|
||||
|
||||
//If they are not an Op they have to be close
|
||||
if(sender instanceof Player && !player.isOp() && !m.isNear(player.getLocation(), target.getLocation(), 5))
|
||||
{
|
||||
sender.sendMessage("You are too far away to inspect that player!");
|
||||
}
|
||||
|
||||
sender.sendMessage(ChatColor.GREEN + "mcMMO Stats for " + ChatColor.YELLOW + target.getName());
|
||||
|
||||
sender.sendMessage(ChatColor.GOLD + "-=GATHERING SKILLS=-");
|
||||
if (mcPermissions.getInstance().excavation(target))
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.ExcavationSkill"), PPt.getSkillLevel(SkillType.EXCAVATION), PPt.getSkillXpLevel(SkillType.EXCAVATION), PPt.getXpToLevel(SkillType.EXCAVATION)));
|
||||
if (mcPermissions.getInstance().fishing(target))
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.FishingSkill"), PPt.getSkillLevel(SkillType.FISHING), PPt.getSkillXpLevel(SkillType.FISHING), PPt.getXpToLevel(SkillType.FISHING)));
|
||||
if (mcPermissions.getInstance().herbalism(target))
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.HerbalismSkill"), PPt.getSkillLevel(SkillType.HERBALISM), PPt.getSkillXpLevel(SkillType.HERBALISM), PPt.getXpToLevel(SkillType.HERBALISM)));
|
||||
if (mcPermissions.getInstance().mining(target))
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.MiningSkill"), PPt.getSkillLevel(SkillType.MINING), PPt.getSkillXpLevel(SkillType.MINING), PPt.getXpToLevel(SkillType.MINING)));
|
||||
if (mcPermissions.getInstance().woodcutting(target))
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.WoodcuttingSkill"), PPt.getSkillLevel(SkillType.WOODCUTTING), PPt.getSkillXpLevel(SkillType.WOODCUTTING), PPt.getXpToLevel(SkillType.WOODCUTTING)));
|
||||
|
||||
sender.sendMessage(ChatColor.GOLD + "-=COMBAT SKILLS=-");
|
||||
if (mcPermissions.getInstance().axes(target))
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AxesSkill"), PPt.getSkillLevel(SkillType.AXES), PPt.getSkillXpLevel(SkillType.AXES), PPt.getXpToLevel(SkillType.AXES)));
|
||||
if (mcPermissions.getInstance().archery(target))
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.ArcherySkill"), PPt.getSkillLevel(SkillType.ARCHERY), PPt.getSkillXpLevel(SkillType.ARCHERY), PPt.getXpToLevel(SkillType.ARCHERY)));
|
||||
if (mcPermissions.getInstance().swords(target))
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.SwordsSkill"), PPt.getSkillLevel(SkillType.SWORDS), PPt.getSkillXpLevel(SkillType.SWORDS), PPt.getXpToLevel(SkillType.SWORDS)));
|
||||
if (mcPermissions.getInstance().taming(target))
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.TamingSkill"), PPt.getSkillLevel(SkillType.TAMING), PPt.getSkillXpLevel(SkillType.TAMING), PPt.getXpToLevel(SkillType.TAMING)));
|
||||
if (mcPermissions.getInstance().unarmed(target))
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.UnarmedSkill"), PPt.getSkillLevel(SkillType.UNARMED), PPt.getSkillXpLevel(SkillType.UNARMED), PPt.getXpToLevel(SkillType.UNARMED)));
|
||||
|
||||
sender.sendMessage(ChatColor.GOLD + "-=MISC SKILLS=-");
|
||||
if (mcPermissions.getInstance().acrobatics(target))
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AcrobaticsSkill"), PPt.getSkillLevel(SkillType.ACROBATICS), PPt.getSkillXpLevel(SkillType.ACROBATICS), PPt.getXpToLevel(SkillType.ACROBATICS)));
|
||||
if (mcPermissions.getInstance().repair(target))
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.RepairSkill"), PPt.getSkillLevel(SkillType.REPAIR), PPt.getSkillXpLevel(SkillType.REPAIR), PPt.getXpToLevel(SkillType.REPAIR)));
|
||||
|
||||
sender.sendMessage(mcLocale.getString("mcPlayerListener.PowerLevel") + ChatColor.GREEN + (m.getPowerLevel(target)));
|
||||
} else {
|
||||
if(sender instanceof Player && !player.isOp())
|
||||
{
|
||||
sender.sendMessage("That player is offline, inspecting offline players is limited to Ops!");
|
||||
return true;
|
||||
}
|
||||
|
||||
PlayerProfile PPt = Users.getOfflineProfile(args[0]);
|
||||
|
||||
if(!PPt.isLoaded())
|
||||
{
|
||||
sender.sendMessage("Player does not exist in the database!");
|
||||
return true;
|
||||
}
|
||||
|
||||
System.out.println(PPt.isLoaded());
|
||||
|
||||
sender.sendMessage(ChatColor.GREEN + "mcMMO Stats for Offline Player " + ChatColor.YELLOW + args[0]);
|
||||
|
||||
sender.sendMessage(ChatColor.GOLD + "-=GATHERING SKILLS=-");
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.ExcavationSkill"), PPt.getSkillLevel(SkillType.EXCAVATION), PPt.getSkillXpLevel(SkillType.EXCAVATION), PPt.getXpToLevel(SkillType.EXCAVATION)));
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.FishingSkill"), PPt.getSkillLevel(SkillType.FISHING), PPt.getSkillXpLevel(SkillType.FISHING), PPt.getXpToLevel(SkillType.FISHING)));
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.HerbalismSkill"), PPt.getSkillLevel(SkillType.HERBALISM), PPt.getSkillXpLevel(SkillType.HERBALISM), PPt.getXpToLevel(SkillType.HERBALISM)));
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.MiningSkill"), PPt.getSkillLevel(SkillType.MINING), PPt.getSkillXpLevel(SkillType.MINING), PPt.getXpToLevel(SkillType.MINING)));
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.WoodcuttingSkill"), PPt.getSkillLevel(SkillType.WOODCUTTING), PPt.getSkillXpLevel(SkillType.WOODCUTTING), PPt.getXpToLevel(SkillType.WOODCUTTING)));
|
||||
|
||||
sender.sendMessage(ChatColor.GOLD + "-=COMBAT SKILLS=-");
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AxesSkill"), PPt.getSkillLevel(SkillType.AXES), PPt.getSkillXpLevel(SkillType.AXES), PPt.getXpToLevel(SkillType.AXES)));
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.ArcherySkill"), PPt.getSkillLevel(SkillType.ARCHERY), PPt.getSkillXpLevel(SkillType.ARCHERY), PPt.getXpToLevel(SkillType.ARCHERY)));
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.SwordsSkill"), PPt.getSkillLevel(SkillType.SWORDS), PPt.getSkillXpLevel(SkillType.SWORDS), PPt.getXpToLevel(SkillType.SWORDS)));
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.TamingSkill"), PPt.getSkillLevel(SkillType.TAMING), PPt.getSkillXpLevel(SkillType.TAMING), PPt.getXpToLevel(SkillType.TAMING)));
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.UnarmedSkill"), PPt.getSkillLevel(SkillType.UNARMED), PPt.getSkillXpLevel(SkillType.UNARMED), PPt.getXpToLevel(SkillType.UNARMED)));
|
||||
|
||||
sender.sendMessage(ChatColor.GOLD + "-=MISC SKILLS=-");
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AcrobaticsSkill"), PPt.getSkillLevel(SkillType.ACROBATICS), PPt.getSkillXpLevel(SkillType.ACROBATICS), PPt.getXpToLevel(SkillType.ACROBATICS)));
|
||||
sender.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.RepairSkill"), PPt.getSkillLevel(SkillType.REPAIR), PPt.getSkillXpLevel(SkillType.REPAIR), PPt.getXpToLevel(SkillType.REPAIR)));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -9,32 +9,31 @@ import org.bukkit.entity.Player;
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.skills.Skills;
|
||||
|
||||
public class StatsCommand implements CommandExecutor {
|
||||
public class McstatsCommand implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!LoadProperties.statsEnable) {
|
||||
sender.sendMessage("This command is not enabled.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(sender instanceof Player)) {
|
||||
sender.sendMessage("This command does not support console useage.");
|
||||
return true;
|
||||
}
|
||||
Player player = null;
|
||||
if (sender instanceof Player) {
|
||||
player = (Player) sender;
|
||||
}
|
||||
|
||||
if (!(sender instanceof Player)) {
|
||||
sender.sendMessage("This command does not support console useage.");
|
||||
return true;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.YourStats"));
|
||||
|
||||
if (mcPermissions.getEnabled())
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.NoSkillNote"));
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.NoSkillNote"));
|
||||
|
||||
ChatColor header = ChatColor.GOLD;
|
||||
|
||||
@@ -57,8 +56,6 @@ public class StatsCommand implements CommandExecutor {
|
||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AxesSkill"), PP.getSkillLevel(SkillType.AXES), PP.getSkillXpLevel(SkillType.AXES), PP.getXpToLevel(SkillType.AXES)));
|
||||
if (mcPermissions.getInstance().archery(player))
|
||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.ArcherySkill"), PP.getSkillLevel(SkillType.ARCHERY), PP.getSkillXpLevel(SkillType.ARCHERY), PP.getXpToLevel(SkillType.ARCHERY)));
|
||||
// if(mcPermissions.getInstance().sorcery(player))
|
||||
// player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.SorcerySkill"), PP.getSkill("sorcery"), PP.getSkill("sorceryXP"), PP.getXpToLevel("excavation")));
|
||||
if (mcPermissions.getInstance().swords(player))
|
||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.SwordsSkill"), PP.getSkillLevel(SkillType.SWORDS), PP.getSkillXpLevel(SkillType.SWORDS), PP.getXpToLevel(SkillType.SWORDS)));
|
||||
if (mcPermissions.getInstance().taming(player))
|
||||
@@ -71,10 +68,6 @@ public class StatsCommand implements CommandExecutor {
|
||||
player.sendMessage(header + "-=MISC SKILLS=-");
|
||||
if (mcPermissions.getInstance().acrobatics(player))
|
||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AcrobaticsSkill"), PP.getSkillLevel(SkillType.ACROBATICS), PP.getSkillXpLevel(SkillType.ACROBATICS), PP.getXpToLevel(SkillType.ACROBATICS)));
|
||||
// if(mcPermissions.getInstance().alchemy(player))
|
||||
// player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AlchemySkill"), PP.getSkillLevel(SkillType.ALCHEMY), PP.getSkillXpLevel(SkillType.ALCHEMY), PP.getXpToLevel(SkillType.ALCHEMY)));
|
||||
// if(mcPermissions.getInstance().enchanting(player))
|
||||
// player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.EnchantingSkill"), PP.getSkillLevel(SkillType.ENCHANTING), PP.getSkillXpLevel(SkillType.ENCHANTING), PP.getXpToLevel(SkillType.ENCHANTING)));
|
||||
if (mcPermissions.getInstance().repair(player))
|
||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.RepairSkill"), PP.getSkillLevel(SkillType.REPAIR), PP.getSkillXpLevel(SkillType.REPAIR), PP.getXpToLevel(SkillType.REPAIR)));
|
||||
}
|
||||
@@ -10,7 +10,6 @@ import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.skills.Skills;
|
||||
@@ -24,16 +23,16 @@ public class MmoeditCommand implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!mcPermissions.permissionsEnabled) {
|
||||
Player player = null;
|
||||
if (sender instanceof Player) {
|
||||
player = (Player) sender;
|
||||
}
|
||||
|
||||
if (player != null && !mcPermissions.getInstance().mmoedit(player)) {
|
||||
sender.sendMessage("This command requires permissions.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!LoadProperties.mmoeditEnable) {
|
||||
sender.sendMessage("This command is not enabled.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(sender instanceof Player)) {
|
||||
if (args.length < 2) {
|
||||
System.out.println("Usage is /mmoedit playername skillname newvalue");
|
||||
@@ -51,7 +50,6 @@ public class MmoeditCommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
|
||||
if (!mcPermissions.getInstance().mmoedit(player)) {
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
package com.gmail.nossr50.commands.general;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
|
||||
public class MyspawnCommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!LoadProperties.myspawnEnable || !LoadProperties.enableMySpawn) {
|
||||
sender.sendMessage("This command is not enabled.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(sender instanceof Player)) {
|
||||
sender.sendMessage("This command does not support console useage.");
|
||||
return true;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
|
||||
if (!mcPermissions.getInstance().mySpawn(player)) {
|
||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
||||
return true;
|
||||
}
|
||||
if (System.currentTimeMillis() < (PP.getMySpawnATS() * 1000) + 3600000) {
|
||||
long x = (((PP.getMySpawnATS() * 1000) + 3600000) - System.currentTimeMillis());
|
||||
int y = (int) (x / 60000);
|
||||
int z = (int) ((x / 1000) - (y * 60));
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.MyspawnTimeNotice", new Object[] { y, z }));
|
||||
return true;
|
||||
}
|
||||
PP.setMySpawnATS(System.currentTimeMillis());
|
||||
if (PP.getMySpawn(player) != null) {
|
||||
Location mySpawn = PP.getMySpawn(player);
|
||||
|
||||
if (mySpawn != null) {
|
||||
// It's done twice because it acts oddly when you are in another world
|
||||
player.teleport(mySpawn);
|
||||
player.teleport(mySpawn);
|
||||
}
|
||||
} else {
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.MyspawnNotExist"));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
package com.gmail.nossr50.commands.general;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.skills.Skills;
|
||||
|
||||
public class WhoisCommand implements CommandExecutor {
|
||||
private final mcMMO plugin;
|
||||
|
||||
public WhoisCommand(mcMMO instance) {
|
||||
this.plugin = instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!LoadProperties.whoisEnable) {
|
||||
sender.sendMessage("This command is not enabled.");
|
||||
return true;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
|
||||
if (!mcPermissions.getInstance().whois(player)) {
|
||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args.length < 1) {
|
||||
player.sendMessage(ChatColor.RED + "Proper usage is /whois <playername>");
|
||||
return true;
|
||||
}
|
||||
// if split[1] is a player
|
||||
if (plugin.getServer().getPlayer(args[0]) != null) {
|
||||
Player target = plugin.getServer().getPlayer(args[0]);
|
||||
PlayerProfile PPt = Users.getProfile(target);
|
||||
|
||||
player.sendMessage(ChatColor.GREEN + "~~WHOIS RESULTS~~");
|
||||
player.sendMessage(target.getName());
|
||||
if (PPt.inParty())
|
||||
player.sendMessage("Party: " + PPt.getParty());
|
||||
player.sendMessage("Health: " + target.getHealth() + ChatColor.GRAY + " (20 is full health)");
|
||||
player.sendMessage("OP: " + target.isOp());
|
||||
player.sendMessage(ChatColor.GREEN + "mcMMO Stats for " + ChatColor.YELLOW + target.getName());
|
||||
|
||||
player.sendMessage(ChatColor.GOLD + "-=GATHERING SKILLS=-");
|
||||
if (mcPermissions.getInstance().excavation(target))
|
||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.ExcavationSkill"), PPt.getSkillLevel(SkillType.EXCAVATION), PPt.getSkillXpLevel(SkillType.EXCAVATION), PPt.getXpToLevel(SkillType.EXCAVATION)));
|
||||
if (mcPermissions.getInstance().fishing(target))
|
||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.FishingSkill"), PPt.getSkillLevel(SkillType.FISHING), PPt.getSkillXpLevel(SkillType.FISHING), PPt.getXpToLevel(SkillType.FISHING)));
|
||||
if (mcPermissions.getInstance().herbalism(target))
|
||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.HerbalismSkill"), PPt.getSkillLevel(SkillType.HERBALISM), PPt.getSkillXpLevel(SkillType.HERBALISM), PPt.getXpToLevel(SkillType.HERBALISM)));
|
||||
if (mcPermissions.getInstance().mining(target))
|
||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.MiningSkill"), PPt.getSkillLevel(SkillType.MINING), PPt.getSkillXpLevel(SkillType.MINING), PPt.getXpToLevel(SkillType.MINING)));
|
||||
if (mcPermissions.getInstance().woodcutting(target))
|
||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.WoodcuttingSkill"), PPt.getSkillLevel(SkillType.WOODCUTTING), PPt.getSkillXpLevel(SkillType.WOODCUTTING), PPt.getXpToLevel(SkillType.WOODCUTTING)));
|
||||
|
||||
player.sendMessage(ChatColor.GOLD + "-=COMBAT SKILLS=-");
|
||||
if (mcPermissions.getInstance().axes(target))
|
||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AxesSkill"), PPt.getSkillLevel(SkillType.AXES), PPt.getSkillXpLevel(SkillType.AXES), PPt.getXpToLevel(SkillType.AXES)));
|
||||
if (mcPermissions.getInstance().archery(player))
|
||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.ArcherySkill"), PPt.getSkillLevel(SkillType.ARCHERY), PPt.getSkillXpLevel(SkillType.ARCHERY), PPt.getXpToLevel(SkillType.ARCHERY)));
|
||||
// if(mcPermissions.getInstance().sorcery(target))
|
||||
// player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.SorcerySkill"), PPt.getSkill("sorcery"), PPt.getSkill("sorceryXP"), PPt.getXpToLevel("excavation")));
|
||||
if (mcPermissions.getInstance().swords(target))
|
||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.SwordsSkill"), PPt.getSkillLevel(SkillType.SWORDS), PPt.getSkillXpLevel(SkillType.SWORDS), PPt.getXpToLevel(SkillType.SWORDS)));
|
||||
if (mcPermissions.getInstance().taming(target))
|
||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.TamingSkill"), PPt.getSkillLevel(SkillType.TAMING), PPt.getSkillXpLevel(SkillType.TAMING), PPt.getXpToLevel(SkillType.TAMING)));
|
||||
if (mcPermissions.getInstance().unarmed(target))
|
||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.UnarmedSkill"), PPt.getSkillLevel(SkillType.UNARMED), PPt.getSkillXpLevel(SkillType.UNARMED), PPt.getXpToLevel(SkillType.UNARMED)));
|
||||
|
||||
player.sendMessage(ChatColor.GOLD + "-=MISC SKILLS=-");
|
||||
if (mcPermissions.getInstance().acrobatics(target))
|
||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AcrobaticsSkill"), PPt.getSkillLevel(SkillType.ACROBATICS), PPt.getSkillXpLevel(SkillType.ACROBATICS), PPt.getXpToLevel(SkillType.ACROBATICS)));
|
||||
// if(mcPermissions.getInstance().alchemy(target))
|
||||
// player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AlchemySkill"), PPt.getSkillLevel(SkillType.ALCHEMY), PPt.getSkillXpLevel(SkillType.ALCHEMY), PPt.getXpToLevel(SkillType.ALCHEMY)));
|
||||
// if(mcPermissions.getInstance().enchanting(target))
|
||||
// player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.EnchantingSkill"), PPt.getSkillLevel(SkillType.ENCHANTING), PPt.getSkillXpLevel(SkillType.ENCHANTING), PPt.getXpToLevel(SkillType.ENCHANTING)));
|
||||
if (mcPermissions.getInstance().repair(target))
|
||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.RepairSkill"), PPt.getSkillLevel(SkillType.REPAIR), PPt.getSkillXpLevel(SkillType.REPAIR), PPt.getXpToLevel(SkillType.REPAIR)));
|
||||
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.PowerLevel") + ChatColor.GREEN + (m.getPowerLevel(target)));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -19,16 +19,12 @@ public class XprateCommand implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!LoadProperties.xprateEnable) {
|
||||
sender.sendMessage("This command is not enabled.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(sender instanceof Player)) {
|
||||
if(args.length <= 0)
|
||||
{
|
||||
System.out.println(mcLocale.getString("Commands.xprate.proper", new Object[] {"/xprate"}));
|
||||
System.out.println(mcLocale.getString("Commands.xprate.proper2", new Object[] {"/xprate"}));
|
||||
System.out.println(mcLocale.getString("Commands.xprate.proper", new Object[] {"xprate"}));
|
||||
System.out.println(mcLocale.getString("Commands.xprate.proper2", new Object[] {"xprate"}));
|
||||
}
|
||||
|
||||
if(args.length == 1 && args[0].equalsIgnoreCase("reset"))
|
||||
@@ -67,6 +63,8 @@ public class XprateCommand implements CommandExecutor {
|
||||
x.sendMessage(ChatColor.GOLD+"XP EVENT FOR mcMMO HAS STARTED!");
|
||||
x.sendMessage(ChatColor.GOLD+"mcMMO XP RATE IS NOW "+LoadProperties.xpGainMultiplier+"x!!");
|
||||
}
|
||||
|
||||
System.out.println("The XP RATE was modified to "+LoadProperties.xpGainMultiplier);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -81,8 +79,8 @@ public class XprateCommand implements CommandExecutor {
|
||||
}
|
||||
if(args.length <= 0)
|
||||
{
|
||||
player.sendMessage(mcLocale.getString("Commands.xprate.proper", new Object[] {"/xprate"}));
|
||||
player.sendMessage(mcLocale.getString("Commands.xprate.proper2", new Object[] {"/xprate"}));
|
||||
player.sendMessage(mcLocale.getString("Commands.xprate.proper", new Object[] {"xprate"}));
|
||||
player.sendMessage(mcLocale.getString("Commands.xprate.proper2", new Object[] {"xprate"}));
|
||||
}
|
||||
if(args.length == 1 && args[0].equalsIgnoreCase("reset"))
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.gmail.nossr50.commands.mc;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -7,20 +8,19 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
|
||||
public class McabilityCommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!mcPermissions.permissionsEnabled) {
|
||||
sender.sendMessage("This command requires permissions.");
|
||||
return true;
|
||||
}
|
||||
Player player = null;
|
||||
if (sender instanceof Player) {
|
||||
player = (Player) sender;
|
||||
}
|
||||
|
||||
if (!LoadProperties.mcabilityEnable) {
|
||||
sender.sendMessage("This command is not enabled.");
|
||||
if (player != null && !mcPermissions.getInstance().mcAbility(player)) {
|
||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@ public class McabilityCommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
|
||||
if (PP.getAbilityUse()) {
|
||||
|
||||
@@ -7,16 +7,11 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
|
||||
public class MccCommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!LoadProperties.mccEnable) {
|
||||
sender.sendMessage("This command is not enabled.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(sender instanceof Player)) {
|
||||
sender.sendMessage("This command does not support console useage.");
|
||||
@@ -42,22 +37,17 @@ public class MccCommand implements CommandExecutor {
|
||||
player.sendMessage("/ptp " + mcLocale.getString("m.mccPartyTeleport"));
|
||||
}
|
||||
player.sendMessage(mcLocale.getString("m.mccOtherCommands"));
|
||||
player.sendMessage("/stats " + ChatColor.RED + " " + mcLocale.getString("m.mccStats"));
|
||||
player.sendMessage("/mcstats " + ChatColor.RED + " " + mcLocale.getString("m.mccStats"));
|
||||
player.sendMessage("/mctop <skillname> <page> " + ChatColor.RED + mcLocale.getString("m.mccLeaderboards"));
|
||||
|
||||
if (mcPermissions.getInstance().mySpawn(player)) {
|
||||
player.sendMessage("/myspawn " + ChatColor.RED + mcLocale.getString("m.mccMySpawn"));
|
||||
player.sendMessage("/clearmyspawn " + ChatColor.RED + mcLocale.getString("m.mccClearMySpawn"));
|
||||
}
|
||||
|
||||
if (mcPermissions.getInstance().mcAbility(player))
|
||||
player.sendMessage("/mcability" + ChatColor.RED + " " + mcLocale.getString("m.mccToggleAbility"));
|
||||
|
||||
if (mcPermissions.getInstance().adminChat(player))
|
||||
player.sendMessage("/a " + ChatColor.RED + mcLocale.getString("m.mccAdminToggle"));
|
||||
|
||||
if (mcPermissions.getInstance().whois(player))
|
||||
player.sendMessage("/whois " + mcLocale.getString("m.mccWhois"));
|
||||
if (mcPermissions.getInstance().inspect(player))
|
||||
player.sendMessage("/inspect " + mcLocale.getString("m.mccInspect"));
|
||||
|
||||
if (mcPermissions.getInstance().mmoedit(player))
|
||||
player.sendMessage("/mmoedit" + mcLocale.getString("m.mccMmoedit"));
|
||||
|
||||
@@ -8,17 +8,12 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
|
||||
public class McgodCommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!LoadProperties.mcgodEnable) {
|
||||
sender.sendMessage("This command is not enabled.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(sender instanceof Player)) {
|
||||
sender.sendMessage("This command does not support console useage.");
|
||||
@@ -28,12 +23,12 @@ public class McgodCommand implements CommandExecutor {
|
||||
Player player = (Player) sender;
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
|
||||
if (mcPermissions.permissionsEnabled) {
|
||||
if (!mcPermissions.getInstance().mcgod(player)) {
|
||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
||||
return true;
|
||||
}
|
||||
if (!mcPermissions.getInstance().mcgod(player)) {
|
||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mcPermissions.getInstance().mcgod(player)) {
|
||||
if (PP.getGodMode()) {
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.GodModeDisabled"));
|
||||
PP.toggleGodMode();
|
||||
|
||||
@@ -1,31 +1,19 @@
|
||||
package com.gmail.nossr50.commands.mc;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.getspout.spoutapi.player.SpoutPlayer;
|
||||
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
|
||||
public class McmmoCommand implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!LoadProperties.mcmmoEnable) {
|
||||
sender.sendMessage("This command is not enabled.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(sender instanceof Player)) {
|
||||
sender.sendMessage("This command does not support console useage.");
|
||||
@@ -34,8 +22,7 @@ public class McmmoCommand implements CommandExecutor {
|
||||
|
||||
Player player = (Player) sender;
|
||||
|
||||
player.sendMessage(ChatColor.RED + "-----[]" + ChatColor.GREEN + "mcMMO" + ChatColor.RED + "[]-----");
|
||||
String description = mcLocale.getString("mcMMO.Description", new Object[] { "/mcc" });
|
||||
String description = mcLocale.getString("mcMMO.Description", new Object[] { "mcc" });
|
||||
String[] mcSplit = description.split(",");
|
||||
|
||||
for (String x : mcSplit) {
|
||||
@@ -45,10 +32,10 @@ public class McmmoCommand implements CommandExecutor {
|
||||
if (LoadProperties.spoutEnabled && player instanceof SpoutPlayer) {
|
||||
SpoutPlayer sPlayer = (SpoutPlayer) player;
|
||||
if (LoadProperties.donateMessage)
|
||||
player.sendMessage(ChatColor.GREEN + "[mcMMO] Donate! Paypal theno1yeti@gmail.com");
|
||||
sPlayer.sendMessage(ChatColor.YELLOW + "[mcMMO]"+ChatColor.GOLD+" Donate! Paypal "+ChatColor.GREEN+"theno1yeti@gmail.com");
|
||||
} else {
|
||||
if (LoadProperties.donateMessage)
|
||||
player.sendMessage(ChatColor.GREEN + "If you like my work you can donate via Paypal: theno1yeti@gmail.com");
|
||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO]"+ChatColor.GOLD+" Donate! Paypal "+ChatColor.GREEN+"theno1yeti@gmail.com");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -9,7 +9,6 @@ import org.bukkit.entity.Player;
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
|
||||
@@ -22,10 +21,6 @@ public class McrefreshCommand implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!LoadProperties.mcrefreshEnable) {
|
||||
sender.sendMessage("This command is not enabled.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(sender instanceof Player)) {
|
||||
sender.sendMessage("This command does not support console useage.");
|
||||
@@ -54,37 +49,16 @@ public class McrefreshCommand implements CommandExecutor {
|
||||
PP.setFistsPreparationMode(false);
|
||||
PP.setSwordsPreparationMode(false);
|
||||
PP.setPickaxePreparationMode(false);
|
||||
/*
|
||||
* GREEN TERRA
|
||||
*/
|
||||
PP.setGreenTerraMode(false);
|
||||
PP.setGreenTerraDeactivatedTimeStamp((long) 0);
|
||||
|
||||
/*
|
||||
* GIGA DRILL BREAKER
|
||||
*/
|
||||
|
||||
//RESET COOLDOWNS
|
||||
PP.resetCooldowns();
|
||||
PP.setGreenTerraMode(false);
|
||||
PP.setGigaDrillBreakerMode(false);
|
||||
PP.setGigaDrillBreakerDeactivatedTimeStamp((long) 0);
|
||||
/*
|
||||
* SERRATED STRIKE
|
||||
*/
|
||||
PP.setSerratedStrikesMode(false);
|
||||
PP.setSerratedStrikesDeactivatedTimeStamp((long) 0);
|
||||
/*
|
||||
* SUPER BREAKER
|
||||
*/
|
||||
PP.setSuperBreakerMode(false);
|
||||
PP.setSuperBreakerDeactivatedTimeStamp((long) 0);
|
||||
/*
|
||||
* TREE FELLER
|
||||
*/
|
||||
PP.setTreeFellerMode(false);
|
||||
PP.setTreeFellerDeactivatedTimeStamp((long) 0);
|
||||
/*
|
||||
* BERSERK
|
||||
*/
|
||||
PP.setBerserkMode(false);
|
||||
PP.setBerserkDeactivatedTimeStamp((long) 0);
|
||||
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.AbilitiesRefreshed"));
|
||||
|
||||
|
||||
109
src/main/java/com/gmail/nossr50/commands/mc/McremoveCommand.java
Normal file
109
src/main/java/com/gmail/nossr50/commands/mc/McremoveCommand.java
Normal file
@@ -0,0 +1,109 @@
|
||||
package com.gmail.nossr50.commands.mc;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
|
||||
public class McremoveCommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
Player player = null;
|
||||
|
||||
if (sender instanceof Player) {
|
||||
player = (Player) sender;
|
||||
}
|
||||
|
||||
if (player != null && !mcPermissions.getInstance().mcremove(player)) {
|
||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
||||
return true;
|
||||
}
|
||||
|
||||
if(args.length == 0)
|
||||
{
|
||||
sender.sendMessage("Correct usage is /mcremove [Player Name]");
|
||||
return true;
|
||||
}
|
||||
|
||||
String playerName = args[0]; //Player that we are going to remove
|
||||
|
||||
//If the server is using MySQL
|
||||
if(LoadProperties.useMySQL)
|
||||
{
|
||||
int userId = mcMMO.database.GetInt("SELECT id FROM "+LoadProperties.MySQLtablePrefix+"users WHERE user = '" + playerName + "'");
|
||||
|
||||
//Remove user from tables
|
||||
mcMMO.database.Write("DELETE FROM "
|
||||
+LoadProperties.MySQLdbName+"."
|
||||
+LoadProperties.MySQLtablePrefix+"users WHERE "
|
||||
+LoadProperties.MySQLtablePrefix+"users.id="+userId);
|
||||
|
||||
mcMMO.database.Write("DELETE FROM "
|
||||
+LoadProperties.MySQLdbName+"."
|
||||
+LoadProperties.MySQLtablePrefix+"cooldowns WHERE "
|
||||
+LoadProperties.MySQLtablePrefix+"cooldowns.user_id="+userId);
|
||||
|
||||
mcMMO.database.Write("DELETE FROM "
|
||||
+LoadProperties.MySQLdbName+"."
|
||||
+LoadProperties.MySQLtablePrefix+"huds WHERE "
|
||||
+LoadProperties.MySQLtablePrefix+"huds.user_id="+userId);
|
||||
|
||||
mcMMO.database.Write("DELETE FROM "
|
||||
+LoadProperties.MySQLdbName+"."
|
||||
+LoadProperties.MySQLtablePrefix+"skills WHERE "
|
||||
+LoadProperties.MySQLtablePrefix+"skills.user_id="+userId);
|
||||
|
||||
mcMMO.database.Write("DELETE FROM "
|
||||
+LoadProperties.MySQLdbName+"."
|
||||
+LoadProperties.MySQLtablePrefix+"experience WHERE "
|
||||
+LoadProperties.MySQLtablePrefix+"experience.user_id="+userId);
|
||||
|
||||
sender.sendMessage("User "+playerName+" removed from MySQL DB!");
|
||||
} else {
|
||||
//FlatFile removal
|
||||
//TODO: Properly remove users from FlatFile, it's going to be a huge bitch with how our FlatFile system works. Let's adopt SQLite support.
|
||||
if(Bukkit.getServer().getPlayer(playerName) != null)
|
||||
{
|
||||
Player targetPlayer = Bukkit.getServer().getPlayer(playerName);
|
||||
if(targetPlayer.isOnline())
|
||||
{
|
||||
Users.getProfile(targetPlayer).resetAllData();
|
||||
sender.sendMessage("User "+playerName+" removed from FlatFile DB!");
|
||||
} else {
|
||||
sender.sendMessage("[mcMMO] This command is not fully functional for FlatFile yet, the player needs to be online.");
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
sender.sendMessage("[mcMMO] This command is not fully functional for FlatFile yet, the player needs to be online.");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//Force PlayerProfile stuff to update
|
||||
if(Bukkit.getServer().getPlayer(playerName) != null)
|
||||
{
|
||||
Player targetPlayer = Bukkit.getServer().getPlayer(playerName);
|
||||
if(targetPlayer.isOnline())
|
||||
{
|
||||
targetPlayer.kickPlayer("[mcMMO] Stats have been reset! Rejoin!");
|
||||
Users.removeUserByName(playerName);
|
||||
} else {
|
||||
Users.removeUser(targetPlayer);
|
||||
}
|
||||
} else {
|
||||
Users.removeUserByName(playerName);
|
||||
}
|
||||
|
||||
sender.sendMessage("[mcMMO] mcremove operation completed.");
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -20,10 +20,6 @@ import com.gmail.nossr50.skills.Skills;
|
||||
public class MctopCommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!LoadProperties.mctopEnable) {
|
||||
sender.sendMessage("This command is not enabled.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(sender instanceof Player)) {
|
||||
sender.sendMessage("This command does not support console useage.");
|
||||
|
||||
@@ -44,10 +44,12 @@ public class ACommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
Player player = null;
|
||||
if (sender instanceof Player) {
|
||||
player = (Player) sender;
|
||||
}
|
||||
|
||||
if (!mcPermissions.getInstance().adminChat(player) && !player.isOp()) {
|
||||
if (player != null && !mcPermissions.getInstance().adminChat(player) && !player.isOp()) {
|
||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
||||
return true;
|
||||
}
|
||||
@@ -70,19 +72,23 @@ public class ACommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (PP.getPartyChatMode())
|
||||
PP.togglePartyChat();
|
||||
|
||||
PP.toggleAdminChat();
|
||||
|
||||
if (PP.getAdminChatMode()) {
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.AdminChatOn"));
|
||||
// player.sendMessage(ChatColor.AQUA + "Admin chat toggled " + ChatColor.GREEN + "On");
|
||||
} else {
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.AdminChatOff"));
|
||||
// player.sendMessage(ChatColor.AQUA + "Admin chat toggled " + ChatColor.RED + "Off");
|
||||
if(player != null)
|
||||
{
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
|
||||
if (PP.getPartyChatMode())
|
||||
PP.togglePartyChat();
|
||||
|
||||
PP.toggleAdminChat();
|
||||
|
||||
if (PP.getAdminChatMode()) {
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.AdminChatOn"));
|
||||
// player.sendMessage(ChatColor.AQUA + "Admin chat toggled " + ChatColor.GREEN + "On");
|
||||
} else {
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.AdminChatOff"));
|
||||
// player.sendMessage(ChatColor.AQUA + "Admin chat toggled " + ChatColor.RED + "Off");
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.party.Party;
|
||||
@@ -16,10 +15,6 @@ import com.gmail.nossr50.party.Party;
|
||||
public class AcceptCommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!LoadProperties.acceptEnable) {
|
||||
sender.sendMessage("This command is not enabled.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(sender instanceof Player)) {
|
||||
sender.sendMessage("This command does not support console useage.");
|
||||
|
||||
@@ -9,7 +9,6 @@ import org.bukkit.entity.Player;
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.party.Party;
|
||||
@@ -23,10 +22,6 @@ public class InviteCommand implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!LoadProperties.inviteEnable) {
|
||||
sender.sendMessage("This command is not enabled.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(sender instanceof Player)) {
|
||||
sender.sendMessage("This command does not support console useage.");
|
||||
|
||||
@@ -26,10 +26,6 @@ public class PCommand implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!LoadProperties.partyEnable) {
|
||||
sender.sendMessage("This command is not enabled.");
|
||||
return true;
|
||||
}
|
||||
|
||||
// Console message?
|
||||
if (!(sender instanceof Player)) {
|
||||
@@ -72,7 +68,7 @@ public class PCommand implements CommandExecutor {
|
||||
|
||||
String name = (LoadProperties.pDisplayNames) ? player.getDisplayName() : player.getName();
|
||||
String pPrefix = ChatColor.GREEN + "(" + ChatColor.WHITE + name + ChatColor.GREEN + ") ";
|
||||
log.log(Level.INFO, "[P](" + PP.getParty() + ")" + "<" + name + "> " + pMessage);
|
||||
log.log(Level.INFO, "[P](" + PP.getParty() + ")<" + name + "> " + pMessage);
|
||||
|
||||
for (Player herp : Bukkit.getServer().getOnlinePlayers()) {
|
||||
if (Users.getProfile(herp).inParty()) {
|
||||
|
||||
@@ -9,7 +9,6 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.party.Party;
|
||||
@@ -17,10 +16,6 @@ import com.gmail.nossr50.party.Party;
|
||||
public class PartyCommand implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!LoadProperties.partyEnable) {
|
||||
sender.sendMessage("This command is not enabled.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(sender instanceof Player)) {
|
||||
sender.sendMessage("This command does not support console useage.");
|
||||
@@ -73,6 +68,44 @@ public class PartyCommand implements CommandExecutor {
|
||||
}
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.YouAreInParty", new Object[] { PP.getParty() }));
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.PartyMembers") + " (" + tempList + ChatColor.GREEN + ")");
|
||||
|
||||
//Master Apprentice Stuff
|
||||
//Show the player all their bonuses when they type /party
|
||||
|
||||
/*
|
||||
for(Player a : Party.getInstance().getPartyMembers(player))
|
||||
{
|
||||
if(Party.getInstance().isPartyLeader(a.getName(), PP.getParty()) && !a.getName().equals(player.getName()))
|
||||
{
|
||||
PlayerProfile LP = Users.getProfile(a);
|
||||
for(SkillType type : SkillType.values())
|
||||
{
|
||||
//Skip this one
|
||||
if(type == SkillType.ALL)
|
||||
continue;
|
||||
|
||||
if(LP.getSkillLevel(type) > PP.getSkillLevel(type))
|
||||
{
|
||||
//Tell them what their skill bonus is for this skill
|
||||
int leaderLevel = LP.getSkillLevel(type);
|
||||
int difference = leaderLevel - PP.getSkillLevel(type);
|
||||
|
||||
double bonusModifier = (difference*0.75D)/100D;
|
||||
double trueBonus = bonusModifier * 100;
|
||||
player.sendMessage("You get "+trueBonus+"% more XP from "+type.toString());
|
||||
//double percent = (trueBonus/100)*100;
|
||||
} else
|
||||
{
|
||||
//Tell them they have no bonus.. or not
|
||||
}
|
||||
}
|
||||
} else if(Party.getInstance().isPartyLeader(a.getName(), PP.getParty()) && a.getName().equals(player.getName()))
|
||||
{
|
||||
//Tell them they are providing bonuses
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
return true;
|
||||
} else if (args.length == 1) {
|
||||
if (args[0].equals("q") && PP.inParty()) {
|
||||
|
||||
@@ -9,7 +9,6 @@ import org.bukkit.entity.Player;
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
|
||||
@@ -22,10 +21,6 @@ public class PtpCommand implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!LoadProperties.ptpEnable) {
|
||||
sender.sendMessage("This command is not enabled.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(sender instanceof Player)) {
|
||||
sender.sendMessage("This command does not support console useage.");
|
||||
|
||||
@@ -49,4 +49,4 @@ public class AcrobaticsCommand implements CommandExecutor {
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,8 +29,14 @@ public class AxesCommand implements CommandExecutor {
|
||||
percentage = String.valueOf((skillvalue / 1000) * 100);
|
||||
else
|
||||
percentage = "75";
|
||||
|
||||
int bonusDmg = Users.getProfile(player).getSkillLevel(SkillType.AXES)/50;
|
||||
if(bonusDmg > 4)
|
||||
bonusDmg = 4;
|
||||
|
||||
int ticks = 2;
|
||||
short durDmg = 5;
|
||||
durDmg+=Users.getProfile(player).getSkillLevel(SkillType.AXES)/30;
|
||||
int x = PP.getSkillLevel(SkillType.AXES);
|
||||
while (x >= 50) {
|
||||
x -= 50;
|
||||
@@ -47,15 +53,15 @@ public class AxesCommand implements CommandExecutor {
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsAxes1_0"), mcLocale.getString("m.EffectsAxes1_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsAxes2_0"), mcLocale.getString("m.EffectsAxes2_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsAxes3_0"), mcLocale.getString("m.EffectsAxes3_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsAxes4_0"), mcLocale.getString("m.EffectsAxes4_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsAxes5_0"), mcLocale.getString("m.EffectsAxes5_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.YourStats") }));
|
||||
player.sendMessage(mcLocale.getString("m.AxesCritChance", new Object[] { percentage }));
|
||||
|
||||
if (PP.getSkillLevel(SkillType.AXES) < 500)
|
||||
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockAxes1") }));
|
||||
else
|
||||
player.sendMessage(mcLocale.getString("m.AbilityBonusTemplate", new Object[] { mcLocale.getString("m.AbilBonusAxes1_0"), mcLocale.getString("m.AbilBonusAxes1_1") }));
|
||||
|
||||
player.sendMessage(mcLocale.getString("m.AxesSkullLength", new Object[] { ticks }));
|
||||
|
||||
player.sendMessage(mcLocale.getString("m.AbilityBonusTemplate", new Object[] { mcLocale.getString("m.AbilBonusAxes1_0"), mcLocale.getString("m.AbilBonusAxes1_1", new Object[] {bonusDmg}) }));
|
||||
player.sendMessage(mcLocale.getString("m.AbilityBonusTemplate", new Object[] { mcLocale.getString("m.AbilBonusAxes2_0"), mcLocale.getString("m.AbilBonusAxes2_1", new Object[] {durDmg}) }));
|
||||
player.sendMessage(mcLocale.getString("m.AbilityBonusTemplate", new Object[] { mcLocale.getString("m.AbilBonusAxes3_0"), mcLocale.getString("m.AbilBonusAxes3_1", new Object[] {1}) }));
|
||||
player.sendMessage(mcLocale.getString("m.AxesSkullLength", new Object[] { ticks }));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,10 @@ public class HerbalismCommand implements CommandExecutor {
|
||||
bonus++;
|
||||
if (PP.getSkillLevel(SkillType.HERBALISM) >= 600)
|
||||
bonus++;
|
||||
if (PP.getSkillLevel(SkillType.HERBALISM) >= 800)
|
||||
bonus++;
|
||||
if (PP.getSkillLevel(SkillType.HERBALISM) >= 1000)
|
||||
bonus++;
|
||||
|
||||
int ticks = 2;
|
||||
int x = PP.getSkillLevel(SkillType.HERBALISM);
|
||||
@@ -51,11 +55,13 @@ public class HerbalismCommand implements CommandExecutor {
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsHerbalism1_0"), mcLocale.getString("m.EffectsHerbalism1_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsHerbalism2_0"), mcLocale.getString("m.EffectsHerbalism2_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsHerbalism3_0"), mcLocale.getString("m.EffectsHerbalism3_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsHerbalism4_0"), mcLocale.getString("m.EffectsHerbalism4_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsHerbalism5_0"), mcLocale.getString("m.EffectsHerbalism5_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.YourStats") }));
|
||||
player.sendMessage(mcLocale.getString("m.HerbalismGreenTerraLength", new Object[] { ticks }));
|
||||
player.sendMessage(mcLocale.getString("m.HerbalismGreenThumbChance", new Object[] { gpercentage }));
|
||||
player.sendMessage(mcLocale.getString("m.HerbalismGreenThumbStage", new Object[] { bonus }));
|
||||
player.sendMessage(mcLocale.getString("m.HerbalismFoodPlus", new Object[] { bonus } ));
|
||||
player.sendMessage(mcLocale.getString("m.HerbalismDoubleDropChance", new Object[] { percentage }));
|
||||
|
||||
return true;
|
||||
|
||||
@@ -30,6 +30,46 @@ public class MiningCommand implements CommandExecutor {
|
||||
x -= 50;
|
||||
ticks++;
|
||||
}
|
||||
|
||||
int rank = 0;
|
||||
int damage = 0;
|
||||
int radius = 0;
|
||||
if(PP.getSkillLevel(SkillType.MINING) >= 125 && PP.getSkillLevel(SkillType.MINING) < 250)
|
||||
rank = 1;
|
||||
if(PP.getSkillLevel(SkillType.MINING) >= 250 && PP.getSkillLevel(SkillType.MINING) < 375){
|
||||
rank = 2;
|
||||
radius = 1;
|
||||
}
|
||||
if(PP.getSkillLevel(SkillType.MINING) >= 375 && PP.getSkillLevel(SkillType.MINING) < 500){
|
||||
rank = 3;
|
||||
radius = 1;
|
||||
}
|
||||
if(PP.getSkillLevel(SkillType.MINING) >= 500 && PP.getSkillLevel(SkillType.MINING) < 625){
|
||||
rank = 4;
|
||||
damage = 25;
|
||||
radius = 2;
|
||||
}
|
||||
if(PP.getSkillLevel(SkillType.MINING) >= 625 && PP.getSkillLevel(SkillType.MINING) < 750){
|
||||
rank = 5;
|
||||
damage = 25;
|
||||
radius = 2;
|
||||
}
|
||||
if(PP.getSkillLevel(SkillType.MINING) >= 750 && PP.getSkillLevel(SkillType.MINING) < 875){
|
||||
rank = 6;
|
||||
damage = 50;
|
||||
radius = 3;
|
||||
}
|
||||
if(PP.getSkillLevel(SkillType.MINING) >= 875 && PP.getSkillLevel(SkillType.MINING) < 1000){
|
||||
rank = 7;
|
||||
damage = 50;
|
||||
radius = 3;
|
||||
}
|
||||
if(PP.getSkillLevel(SkillType.MINING) >= 1000){
|
||||
rank = 8;
|
||||
damage = 100;
|
||||
radius = 4;
|
||||
}
|
||||
|
||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.SkillMining") }));
|
||||
player.sendMessage(mcLocale.getString("m.XPGain", new Object[] { mcLocale.getString("m.XPGainMining") }));
|
||||
|
||||
@@ -39,9 +79,50 @@ public class MiningCommand implements CommandExecutor {
|
||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.Effects") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsMining1_0"), mcLocale.getString("m.EffectsMining1_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsMining2_0"), mcLocale.getString("m.EffectsMining2_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsMining3_0"), mcLocale.getString("m.EffectsMining3_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsMining4_0"), mcLocale.getString("m.EffectsMining4_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsMining5_0"), mcLocale.getString("m.EffectsMining5_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.YourStats") }));
|
||||
player.sendMessage(mcLocale.getString("m.MiningDoubleDropChance", new Object[] { percentage }));
|
||||
player.sendMessage(mcLocale.getString("m.MiningSuperBreakerLength", new Object[] { ticks }));
|
||||
if (PP.getSkillLevel(SkillType.MINING) < 125)
|
||||
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockMining1") }));
|
||||
else{
|
||||
switch (rank){
|
||||
case 1:
|
||||
player.sendMessage(mcLocale.getString("m.MiningBlastMining", new Object[] { rank, mcLocale.getString("m.BlastMining1") }));
|
||||
break;
|
||||
case 2:
|
||||
player.sendMessage(mcLocale.getString("m.MiningBlastMining", new Object[] { rank, mcLocale.getString("m.BlastMining2") }));
|
||||
break;
|
||||
case 3:
|
||||
player.sendMessage(mcLocale.getString("m.MiningBlastMining", new Object[] { rank, mcLocale.getString("m.BlastMining3") }));
|
||||
break;
|
||||
case 4:
|
||||
player.sendMessage(mcLocale.getString("m.MiningBlastMining", new Object[] { rank, mcLocale.getString("m.BlastMining4") }));
|
||||
break;
|
||||
case 5:
|
||||
player.sendMessage(mcLocale.getString("m.MiningBlastMining", new Object[] { rank, mcLocale.getString("m.BlastMining5") }));
|
||||
break;
|
||||
case 6:
|
||||
player.sendMessage(mcLocale.getString("m.MiningBlastMining", new Object[] { rank, mcLocale.getString("m.BlastMining6") }));
|
||||
break;
|
||||
case 7:
|
||||
player.sendMessage(mcLocale.getString("m.MiningBlastMining", new Object[] { rank, mcLocale.getString("m.BlastMining7") }));
|
||||
break;
|
||||
case 8:
|
||||
player.sendMessage(mcLocale.getString("m.MiningBlastMining", new Object[] { rank, mcLocale.getString("m.BlastMining8") }));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (PP.getSkillLevel(SkillType.MINING) < 250)
|
||||
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockMining2") }));
|
||||
else
|
||||
player.sendMessage(mcLocale.getString("m.MiningBiggerBombs", new Object[] { radius }));
|
||||
if (PP.getSkillLevel(SkillType.MINING) < 500)
|
||||
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockMining3") }));
|
||||
else
|
||||
player.sendMessage(mcLocale.getString("m.MiningDemolitionsExpertDamageDecrease", new Object[] { damage }));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -42,11 +42,9 @@ public class RepairCommand implements CommandExecutor {
|
||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.YourStats") }));
|
||||
player.sendMessage(mcLocale.getString("m.RepairRepairMastery", new Object[] { repairmastery }));
|
||||
player.sendMessage(mcLocale.getString("m.RepairSuperRepairChance", new Object[] { percentage }));
|
||||
player.sendMessage(mcLocale.getString("m.ArcaneForgingRank", new Object[] { Repair.getArcaneForgingRank(PP) }));
|
||||
player.sendMessage(mcLocale.getString("m.ArcaneEnchantKeepChance", new Object[] { Repair.getEnchantChance(Repair.getArcaneForgingRank(PP)) }));
|
||||
player.sendMessage(mcLocale.getString("m.ArcaneEnchantDowngradeChance", new Object[] { Repair.getDowngradeChance(Repair.getArcaneForgingRank(PP)) }));
|
||||
player.sendMessage(mcLocale.getString("m.ArcaneForgingMilestones"));
|
||||
player.sendMessage(mcLocale.getString("m.ArcaneForgingMilestones2"));
|
||||
player.sendMessage(mcLocale.getString("m.ArcaneForgingRank", new Object[] { Repair.getArcaneForgingRank(PP.getSkillLevel(SkillType.REPAIR)) }));
|
||||
player.sendMessage(mcLocale.getString("m.ArcaneEnchantKeepChance", new Object[] { Repair.getEnchantChance(Repair.getArcaneForgingRank(PP.getSkillLevel(SkillType.REPAIR))) }));
|
||||
player.sendMessage(mcLocale.getString("m.ArcaneEnchantDowngradeChance", new Object[] { Repair.getDowngradeChance(Repair.getArcaneForgingRank(PP.getSkillLevel(SkillType.REPAIR))) }));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public class SwordsCommand implements CommandExecutor {
|
||||
player.sendMessage(mcLocale.getString("m.SwordsCounterAttChance", new Object[] { counterattackpercentage }));
|
||||
player.sendMessage(mcLocale.getString("m.SwordsBleedLength", new Object[] { bleedrank }));
|
||||
player.sendMessage(mcLocale.getString("m.SwordsTickNote"));
|
||||
player.sendMessage(mcLocale.getString("m.SwordsBleedLength", new Object[] { percentage }));
|
||||
player.sendMessage(mcLocale.getString("m.SwordsBleedChance", new Object[] { percentage }));
|
||||
player.sendMessage(mcLocale.getString("m.SwordsSSLength", new Object[] { ticks }));
|
||||
|
||||
return true;
|
||||
|
||||
@@ -40,6 +40,7 @@ public class TamingCommand implements CommandExecutor {
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsTaming5_0"), mcLocale.getString("m.EffectsTaming5_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsTaming6_0"), mcLocale.getString("m.EffectsTaming6_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsTaming7_0"), mcLocale.getString("m.EffectsTaming7_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsTaming8_0"), mcLocale.getString("m.EffectsTaming8_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTaming7_2", new Object[] { LoadProperties.bonesConsumedByCOTW }));
|
||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.YourStats") }));
|
||||
|
||||
@@ -62,7 +63,11 @@ public class TamingCommand implements CommandExecutor {
|
||||
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockTaming4") }));
|
||||
else
|
||||
player.sendMessage(mcLocale.getString("m.AbilityBonusTemplate", new Object[] { mcLocale.getString("m.AbilBonusTaming4_0"), mcLocale.getString("m.AbilBonusTaming4_1") }));
|
||||
|
||||
if (PP.getSkillLevel(SkillType.TAMING) < 50)
|
||||
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockTaming5") }));
|
||||
else
|
||||
player.sendMessage(mcLocale.getString("m.AbilityBonusTemplate", new Object[] { mcLocale.getString("m.AbilBonusTaming5_0"), mcLocale.getString("m.AbilBonusTaming5_1") }));
|
||||
|
||||
player.sendMessage(mcLocale.getString("m.TamingGoreChance", new Object[] { percentage }));
|
||||
|
||||
return true;
|
||||
|
||||
@@ -26,9 +26,9 @@ public class UnarmedCommand implements CommandExecutor {
|
||||
float skillvalue = (float) PP.getSkillLevel(SkillType.UNARMED);
|
||||
|
||||
if (PP.getSkillLevel(SkillType.UNARMED) < 1000)
|
||||
percentage = String.valueOf((skillvalue / 4000) * 100);
|
||||
percentage = String.valueOf((skillvalue / 3000) * 100);
|
||||
else
|
||||
percentage = "25";
|
||||
percentage = "33.3";
|
||||
|
||||
if (PP.getSkillLevel(SkillType.UNARMED) < 1000)
|
||||
arrowpercentage = String.valueOf(((skillvalue / 1000) * 100) / 2);
|
||||
@@ -41,6 +41,11 @@ public class UnarmedCommand implements CommandExecutor {
|
||||
x -= 50;
|
||||
ticks++;
|
||||
}
|
||||
|
||||
int bonus = 3 + (PP.getSkillLevel(SkillType.UNARMED)/50);
|
||||
|
||||
if(bonus > 8)
|
||||
bonus = 8;
|
||||
|
||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.SkillUnarmed") }));
|
||||
player.sendMessage(mcLocale.getString("m.XPGain", new Object[] { mcLocale.getString("m.XPGainUnarmed") }));
|
||||
@@ -52,20 +57,13 @@ public class UnarmedCommand implements CommandExecutor {
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsUnarmed1_0"), mcLocale.getString("m.EffectsUnarmed1_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsUnarmed2_0"), mcLocale.getString("m.EffectsUnarmed2_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsUnarmed3_0"), mcLocale.getString("m.EffectsUnarmed3_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsUnarmed4_0"), mcLocale.getString("m.EffectsUnarmed4_1") }));
|
||||
//player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsUnarmed4_0"), mcLocale.getString("m.EffectsUnarmed4_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsUnarmed5_0"), mcLocale.getString("m.EffectsUnarmed5_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.YourStats") }));
|
||||
player.sendMessage(mcLocale.getString("m.UnarmedArrowDeflectChance", new Object[] { arrowpercentage }));
|
||||
player.sendMessage(mcLocale.getString("m.UnarmedDisarmChance", new Object[] { percentage }));
|
||||
|
||||
if (PP.getSkillLevel(SkillType.UNARMED) < 250) {
|
||||
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockUnarmed1") }));
|
||||
} else if (PP.getSkillLevel(SkillType.UNARMED) >= 250 && PP.getSkillLevel(SkillType.UNARMED) < 500) {
|
||||
player.sendMessage(mcLocale.getString("m.AbilityBonusTemplate", new Object[] { mcLocale.getString("m.AbilBonusUnarmed1_0"), mcLocale.getString("m.AbilBonusUnarmed1_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockUnarmed2") }));
|
||||
} else {
|
||||
player.sendMessage(mcLocale.getString("m.AbilityBonusTemplate", new Object[] { mcLocale.getString("m.AbilBonusUnarmed2_0"), mcLocale.getString("m.AbilBonusUnarmed2_1") }));
|
||||
}
|
||||
player.sendMessage(mcLocale.getString("m.AbilityBonusTemplate", new Object[] { mcLocale.getString("m.AbilBonusUnarmed2_0"), mcLocale.getString("m.AbilBonusUnarmed2_1", new Object[] {bonus}) }));
|
||||
|
||||
player.sendMessage(mcLocale.getString("m.UnarmedBerserkLength", new Object[] { ticks }));
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public class XplockCommand implements CommandExecutor {
|
||||
Player player = (Player) sender;
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
|
||||
if (args.length >= 1 && Skills.isSkill(args[0]) && mcPermissions.permission(player, "mcmmo.skills." + Skills.getSkillType(args[0]).toString().toLowerCase())) {
|
||||
if (args.length >= 1 && Skills.isSkill(args[0]) && mcPermissions.getInstance().permission(player, "mcmmo.skills." + Skills.getSkillType(args[0]).toString().toLowerCase())) {
|
||||
if (PP.getXpBarLocked()) {
|
||||
PP.setSkillLock(Skills.getSkillType(args[0]));
|
||||
player.sendMessage(mcLocale.getString("Commands.xplock.locked", new Object[] { m.getCapitalized(PP.getSkillLock().toString()) }));
|
||||
@@ -52,7 +52,7 @@ public class XplockCommand implements CommandExecutor {
|
||||
}
|
||||
} else if (args.length >= 1 && !Skills.isSkill(args[0])) {
|
||||
player.sendMessage("Commands.xplock.invalid");
|
||||
} else if (args.length >= 2 && Skills.isSkill(args[0]) && !mcPermissions.permission(player, "mcmmo.skills." + Skills.getSkillType(args[0]).toString().toLowerCase())) {
|
||||
} else if (args.length >= 2 && Skills.isSkill(args[0]) && !mcPermissions.getInstance().permission(player, "mcmmo.skills." + Skills.getSkillType(args[0]).toString().toLowerCase())) {
|
||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -19,58 +19,49 @@ package com.gmail.nossr50.config;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
|
||||
import com.gmail.nossr50.datatypes.HUDType;
|
||||
|
||||
public class LoadProperties {
|
||||
public static Boolean enableOnlyActivateWhenSneaking,
|
||||
enableAbilityMessages, enableAbilities, showDisplayName, showFaces,
|
||||
watch, xplockEnable, xpbar, xpicon, partybar, string, bucket, web,
|
||||
xprateEnable, slimeballs, spoutEnabled, donateMessage,
|
||||
chimaeraWingEnable, xpGainsMobSpawners, myspawnEnable, mccEnable,
|
||||
mcmmoEnable, partyEnable, inviteEnable, acceptEnable, whoisEnable,
|
||||
statsEnable, addxpEnable, ptpEnable, mmoeditEnable,
|
||||
clearmyspawnEnable, mcgodEnable, mcabilityEnable, mctopEnable,
|
||||
mcrefreshEnable, aEnable, pEnable, enableMotd, enableMySpawn,
|
||||
enableRegen, enableCobbleToMossy, useMySQL, cocoabeans, mushrooms,
|
||||
toolsLoseDurabilityFromAbilities, pvpxp, miningrequirespickaxe,
|
||||
excavationRequiresShovel, woodcuttingrequiresaxe, eggs, apples,
|
||||
cake, music, diamond, glowstone, slowsand, sulphur, netherrack,
|
||||
bones, coal, clay, anvilmessages, mayDowngradeEnchants,
|
||||
mayLoseEnchants, fishingDrops, leatherArmor, ironArmor, goldArmor,
|
||||
diamondArmor, woodenTools, stoneTools, ironTools, goldTools,
|
||||
diamondTools, enderPearl, blazeRod, records, glowstoneDust,
|
||||
fishingDiamonds, aDisplayNames, pDisplayNames;
|
||||
xplockEnable, xpbar, xpicon, partybar, xprateEnable, spoutEnabled,
|
||||
donateMessage, chimaeraWingEnable, xpGainsMobSpawners,
|
||||
mccEnable, mcmmoEnable, partyEnable, inviteEnable, acceptEnable,
|
||||
inspectEnable, mcstatsEnable, addxpEnable, ptpEnable, mmoeditEnable, mcremoveEnable,
|
||||
mcgodEnable, mcabilityEnable, mctopEnable,
|
||||
addlevelsEnable, mcrefreshEnable, aEnable, pEnable, enableMotd,
|
||||
enableCobbleToMossy, useMySQL, toolsLoseDurabilityFromAbilities,
|
||||
pvpxp, miningrequirespickaxe, excavationRequiresShovel,
|
||||
woodcuttingrequiresaxe, anvilmessages, mayDowngradeEnchants,
|
||||
mayLoseEnchants, fishingDrops, aDisplayNames, pDisplayNames, enableSmoothToMossy,
|
||||
enableDirtToGrass, statsTracking, eventCallback, herbalismHungerBonus,
|
||||
repairArmor, repairTools;
|
||||
|
||||
public static String MySQLtablePrefix, MySQLuserName,
|
||||
MySQLserverName, MySQLdbName, MySQLdbPass, nWood, nStone,
|
||||
nIron, nGold, nDiamond, locale, nString, nLeather;
|
||||
|
||||
public static int mfishing, mwatch, xpbar_x, xpbar_y, xpicon_x, xpicon_y,
|
||||
mstring, mbucket, mweb, chimaeraId, msandstone, mcocoa,
|
||||
water_thunder, cure_self, cure_other, mslimeballs, mbones,
|
||||
msulphur, mslowsand, mmushroom2, mglowstone2, mmelon, mmusic,
|
||||
mdiamond2, mbase, mapple, meggs, mcake, mpine, mbirch, mspruce,
|
||||
public static int treeFellerThreshold, mjungle, mtameWolf, mfishing, xpbar_x, xpbar_y, xpicon_x, xpicon_y,
|
||||
chimaeraId, msandstone, mbase, moak, mbirch, mspruce, mmelon,
|
||||
mcactus, mmushroom, mflower, msugar, mpumpkin, mwheat, mgold,
|
||||
mdiamond, miron, mredstone, mlapis, mobsidian, mnetherrack,
|
||||
mglowstone, mcoal, mstone, MySQLport, xpGainMultiplier,
|
||||
superBreakerCooldown, greenTerraCooldown, gigaDrillBreakerCooldown,
|
||||
superBreakerCooldown, blastMiningCooldown, greenTerraCooldown, gigaDrillBreakerCooldown,
|
||||
treeFellerCooldown, berserkCooldown, serratedStrikeCooldown,
|
||||
skullSplitterCooldown, abilityDurabilityLoss,
|
||||
feathersConsumedByChimaeraWing, bonesConsumedByCOTW,
|
||||
repairdiamondlevel, rWood, rStone, rIron, rGold, rDiamond, rString,
|
||||
rLeather, downgradeRank1, downgradeRank2, downgradeRank3,
|
||||
downgradeRank4, keepEnchantsRank1, keepEnchantsRank2,
|
||||
keepEnchantsRank3, keepEnchantsRank4, fishingDropChanceTier1,
|
||||
fishingDropChanceTier2, fishingDropChanceTier3,
|
||||
fishingDropChanceTier4, fishingDropChanceTier5, mnetherwart,
|
||||
mvines, mlilypad, mnetherbrick, mendstone, mmossstone, mstonebrick,
|
||||
keepEnchantsRank3, keepEnchantsRank4, mnetherwart,
|
||||
mvines, mlilypad, mendstone, mmossstone,
|
||||
levelCapAcrobatics, levelCapArchery, levelCapAxes, levelCapExcavation,
|
||||
levelCapFishing, levelCapHerbalism, levelCapMining, levelCapRepair,
|
||||
levelCapSwords, levelCapTaming, levelCapUnarmed, levelCapWoodcutting,
|
||||
anvilID;
|
||||
anvilID, saveInterval, fishingTier1, fishingTier2, fishingTier3, fishingTier4, fishingTier5,
|
||||
repairStoneLevel, repairIronLevel, repairGoldLevel, arcaneRank1, arcaneRank2, arcaneRank3, arcaneRank4,
|
||||
detonatorID;
|
||||
|
||||
public static double xpbackground_r, xpbackground_g, xpbackground_b,
|
||||
xpborder_r, xpborder_g, xpborder_b, fishing_r, fishing_g,
|
||||
@@ -82,9 +73,10 @@ public class LoadProperties {
|
||||
unarmed_r, unarmed_g, unarmed_b, woodcutting_r, woodcutting_g,
|
||||
woodcutting_b, pvpxprewardmodifier, tamingxpmodifier,
|
||||
miningxpmodifier, repairxpmodifier, woodcuttingxpmodifier,
|
||||
sorceryxpmodifier, unarmedxpmodifier, herbalismxpmodifier,
|
||||
fishingxpmodifier, unarmedxpmodifier, herbalismxpmodifier,
|
||||
excavationxpmodifier, archeryxpmodifier, swordsxpmodifier,
|
||||
axesxpmodifier, acrobaticsxpmodifier;
|
||||
axesxpmodifier, acrobaticsxpmodifier, animalXP, creeperXP, skeletonXP, spiderXP, ghastXP, slimeXP,
|
||||
zombieXP, pigzombieXP, endermanXP, cavespiderXP, silverfishXP, blazeXP, magmacubeXP, enderdragonXP;
|
||||
|
||||
public static HUDType defaulthud;
|
||||
protected static File configFile;
|
||||
@@ -144,27 +136,24 @@ public class LoadProperties {
|
||||
}
|
||||
|
||||
private void loadKeys() {
|
||||
plugin.getLogger().info("Loading Config File...");
|
||||
plugin.getLogger().info("Loading mcMMO config.yml File...");
|
||||
|
||||
// Setup default HUD
|
||||
String temp = readString("Spout.HUD.Default", "STANDARD");
|
||||
for (HUDType x : HUDType.values()) {
|
||||
if (x.toString().equalsIgnoreCase(temp)) {
|
||||
if (x.toString().equalsIgnoreCase(temp))
|
||||
defaulthud = x;
|
||||
}
|
||||
}
|
||||
|
||||
enableAbilityMessages = readBoolean("Abilities.Messages", true);
|
||||
enableAbilities = readBoolean("Abilities.Enabled", true);
|
||||
|
||||
donateMessage = readBoolean("Commands.mcmmo.Donate_Message", true);
|
||||
xpGainsMobSpawners = readBoolean("XP.Gains.Mobspawners.Enabled", false);
|
||||
xpGainsMobSpawners = readBoolean("Experience.Gains.Mobspawners.Enabled", false);
|
||||
|
||||
bonesConsumedByCOTW = readInteger("Skills.Taming.Call_Of_The_Wild.Bones_Required", 10);
|
||||
|
||||
xpbar = readBoolean("Spout.XP.Bar.Enabled", true);
|
||||
// web_url = readString("Spout.Images.URL_DIR",
|
||||
// "http://mcmmo.rycochet.net/mcmmo/");
|
||||
xpicon = readBoolean("Spout.XP.Icon.Enabled", true);
|
||||
xpbar_x = readInteger("Spout.XP.Bar.X_POS", 95);
|
||||
xpbar_y = readInteger("Spout.XP.Bar.Y_POS", 6);
|
||||
@@ -219,23 +208,7 @@ public class LoadProperties {
|
||||
xpbackground_g = readDouble("Spout.HUD.Retro.Colors.Background.GREEN", 0.75);
|
||||
xpbackground_b = readDouble("Spout.HUD.Retro.Colors.Background.BLUE", 0.75);
|
||||
|
||||
msulphur = readInteger("Experience.Excavation.Sulphur", 30);
|
||||
mbones = readInteger("Experience.Excavation.Bones", 30);
|
||||
mbase = readInteger("Experience.Excavation.Base", 40);
|
||||
mmushroom2 = readInteger("Experience.Excavation.Mushroom", 80);
|
||||
mslowsand = readInteger("Experience.Excavation.Slowsand", 80);
|
||||
mglowstone2 = readInteger("Experience.Excavation.Glowstone", 80);
|
||||
mmusic = readInteger("Experience.Excavation.Music", 3000);
|
||||
mdiamond2 = readInteger("Experience.Excavation.Diamond", 1000);
|
||||
mapple = readInteger("Experience.Excavation.Apple", 100);
|
||||
meggs = readInteger("Experience.Excavation.Eggs", 100);
|
||||
mcake = readInteger("Experience.Excavation.Cake", 3000);
|
||||
mcocoa = readInteger("Experience.Excavation.Cocoa_Beans", 100);
|
||||
mslimeballs = readInteger("Experience.Excavation.Slimeballs", 100);
|
||||
mstring = readInteger("Experience.Excavation.String", 200);
|
||||
mbucket = readInteger("Experience.Excavation.Bucket", 100);
|
||||
mweb = readInteger("Experience.Excavation.Web", 150);
|
||||
mwatch = readInteger("Experience.Excavation.Watch", 200);
|
||||
|
||||
msugar = readInteger("Experience.Herbalism.Sugar_Cane", 30);
|
||||
mwheat = readInteger("Experience.Herbalism.Wheat", 50);
|
||||
@@ -247,10 +220,12 @@ public class LoadProperties {
|
||||
mnetherwart = readInteger("Experience.Herbalism.Nether_Wart", 50);
|
||||
mlilypad = readInteger("Experience.Herbalism.Lily_Pads", 100);
|
||||
mvines = readInteger("Experience.Herbalism.Vines", 10);
|
||||
herbalismHungerBonus = readBoolean("Skills.Herbalism.Hunger_Bonus", true);
|
||||
|
||||
mpine = readInteger("Experience.Woodcutting.Pine", 70);
|
||||
mbirch = readInteger("Experience.Woodcutting.Birch", 80);
|
||||
mspruce = readInteger("Experience.Woodcutting.Spruce", 90);
|
||||
moak = readInteger("Experience.Woodcutting.Oak", 70);
|
||||
mbirch = readInteger("Experience.Woodcutting.Birch", 90);
|
||||
mspruce = readInteger("Experience.Woodcutting.Spruce", 80);
|
||||
mjungle = readInteger("Experience.Woodcutting.Jungle", 100);
|
||||
|
||||
mgold = readInteger("Experience.Mining.Gold", 250);
|
||||
mdiamond = readInteger("Experience.Mining.Diamond", 750);
|
||||
@@ -263,10 +238,10 @@ public class LoadProperties {
|
||||
mcoal = readInteger("Experience.Mining.Coal", 100);
|
||||
mstone = readInteger("Experience.Mining.Stone", 30);
|
||||
msandstone = readInteger("Experience.Mining.Sandstone", 30);
|
||||
mnetherbrick = readInteger("Experience.Mining.Nether_Brick", 30);
|
||||
mendstone = readInteger("Experience.Mining.End_Stone", 150);
|
||||
mmossstone = readInteger("Experience.Mining.Moss_Stone", 30);
|
||||
mstonebrick = readInteger("Experience.Mining.Stone_Brick", 30);
|
||||
|
||||
mtameWolf = readInteger("Experience.Taming.Animal_Taming.Wolf", 250);
|
||||
|
||||
mfishing = readInteger("Experience.Fishing.Base", 800);
|
||||
|
||||
@@ -275,10 +250,12 @@ public class LoadProperties {
|
||||
greenTerraCooldown = readInteger("Abilities.Cooldowns.Green_Terra", 240);
|
||||
superBreakerCooldown = readInteger("Abilities.Cooldowns.Super_Breaker", 240);
|
||||
gigaDrillBreakerCooldown = readInteger("Abilities.Cooldowns.Giga_Drill_Breaker", 240);
|
||||
treeFellerThreshold = readInteger("Abilities.Limits.Tree_Feller_Threshold", 500);
|
||||
treeFellerCooldown = readInteger("Abilities.Cooldowns.Tree_Feller", 240);
|
||||
berserkCooldown = readInteger("Abilities.Cooldowns.Berserk", 240);
|
||||
serratedStrikeCooldown = readInteger("Abilities.Cooldowns.Serrated_Strikes", 240);
|
||||
skullSplitterCooldown = readInteger("Abilities.Cooldowns.Skull_Splitter", 240);
|
||||
blastMiningCooldown = readInteger("Abilities.Cooldowns.Blast_Mining", 60);
|
||||
|
||||
MySQLserverName = readString("MySQL.Server.Address", "localhost");
|
||||
if (readString("MySQL.Database.User.Password", null) != null)
|
||||
@@ -294,10 +271,13 @@ public class LoadProperties {
|
||||
|
||||
locale = readString("General.Locale", "en_us");
|
||||
enableMotd = readBoolean("General.MOTD.Enabled", true);
|
||||
enableMySpawn = readBoolean("General.MySpawn.Enabled", true);
|
||||
enableRegen = readBoolean("General.HP_Regeneration.Enabled", true);
|
||||
saveInterval = readInteger("General.Save_Interval", 10);
|
||||
statsTracking = readBoolean("General.Stats_Tracking", true);
|
||||
eventCallback = readBoolean("General.Event_Callback", true);
|
||||
|
||||
enableCobbleToMossy = readBoolean("Skills.Herbalism.Green_Thumb.Cobble_To_Mossy", true);
|
||||
enableSmoothToMossy = readBoolean("Skills.Herbalism.Green_Thumb.SmoothBrick_To_MossyBrick", true);
|
||||
enableDirtToGrass = readBoolean("Skills.Herbalism.Green_Thumb.Dirt_To_Grass", true);
|
||||
|
||||
xpGainMultiplier = readInteger("Experience.Gains.Multiplier.Global", 1);
|
||||
toolsLoseDurabilityFromAbilities = readBoolean("Abilities.Tools.Durability_Loss_Enabled", true);
|
||||
@@ -307,14 +287,19 @@ public class LoadProperties {
|
||||
chimaeraId = readInteger("Items.Chimaera_Wing.Item_ID", 288);
|
||||
chimaeraWingEnable = readBoolean("Items.Chimaera_Wing.Enabled", true);
|
||||
|
||||
pvpxp = readBoolean("XP.PVP.Rewards", true);
|
||||
pvpxp = readBoolean("Experience.PVP.Rewards", true);
|
||||
pvpxprewardmodifier = readDouble("Experience.Gains.Multiplier.PVP", 1.0);
|
||||
|
||||
miningrequirespickaxe = readBoolean("Skills.Mining.Requires_Pickaxe", true);
|
||||
excavationRequiresShovel = readBoolean("Skills.Excavation.Requires_Shovel", true);
|
||||
woodcuttingrequiresaxe = readBoolean("Skills.Woodcutting.Requires_Axe", true);
|
||||
repairArmor = readBoolean("Skills.Repair.Can_Repair_Armor", true);
|
||||
repairTools = readBoolean("Skills.Repair.Can_Repair_Tools", true);
|
||||
repairdiamondlevel = readInteger("Skills.Repair.Diamond.Level_Required", 50);
|
||||
repairIronLevel = readInteger("Skills.Repair.Iron.Level_Required", 0);
|
||||
repairGoldLevel = readInteger("Skills.Repair.Gold.Level_Required", 0);
|
||||
repairStoneLevel = readInteger("Skills.Repair.Stone.Level_Required", 0);
|
||||
|
||||
sorceryxpmodifier = readDouble("Experience.Formula.Multiplier.Sorcery", 1.0);
|
||||
tamingxpmodifier = readDouble("Experience.Formula.Multiplier.Taming", 1.0);
|
||||
miningxpmodifier = readDouble("Experience.Formula.Multiplier.Mining", 1.0);
|
||||
repairxpmodifier = readDouble("Experience.Formula.Multiplier.Repair", 1.0);
|
||||
@@ -326,6 +311,7 @@ public class LoadProperties {
|
||||
swordsxpmodifier = readDouble("Experience.Formula.Multiplier.Swords", 1.0);
|
||||
axesxpmodifier = readDouble("Experience.Formula.Multiplier.Axes", 1.0);
|
||||
acrobaticsxpmodifier = readDouble("Experience.Formula.Multiplier.Acrobatics", 1.0);
|
||||
fishingxpmodifier = readDouble("Experience.Forumla.Multiplier.Fishing", 1.0);
|
||||
|
||||
anvilmessages = readBoolean("Skills.Repair.Anvil_Messages", true);
|
||||
anvilID = readInteger("Skills.Repair.Anvil_ID", 42);
|
||||
@@ -363,73 +349,62 @@ public class LoadProperties {
|
||||
downgradeRank2 = readInteger("Arcane_Forging.Downgrades.Chance.Rank_2", 50);
|
||||
downgradeRank3 = readInteger("Arcane_Forging.Downgrades.Chance.Rank_3", 25);
|
||||
downgradeRank4 = readInteger("Arcane_Forging.Downgrades.Chance.Rank_4", 15);
|
||||
mayLoseEnchants = readBoolean("Arcane_Forging.May_Lose_Enchants.Enabled", true);
|
||||
mayLoseEnchants = readBoolean("Arcane_Forging.May_Lose_Enchants", true);
|
||||
keepEnchantsRank1 = readInteger("Arcane_Forging.Keep_Enchants.Chance.Rank_1", 10);
|
||||
keepEnchantsRank2 = readInteger("Arcane_Forging.Keep_Enchants.Chance.Rank_2", 20);
|
||||
keepEnchantsRank3 = readInteger("Arcane_Forging.Keep_Enchants.Chance.Rank_3", 30);
|
||||
keepEnchantsRank4 = readInteger("Arcane_Forging.Keep_Enchants.Chance.Rank_4", 40);
|
||||
arcaneRank1 = readInteger("Arcane_Forging.Rank_Levels.Rank_1", 100);
|
||||
arcaneRank2 = readInteger("Arcane_Forging.Rank_Levels.Rank_2", 250);
|
||||
arcaneRank3 = readInteger("Arcane_Forging.Rank_Levels.Rank_3", 500);
|
||||
arcaneRank4 = readInteger("Arcane_Forging.Rank_Levels.Rank_4", 750);
|
||||
|
||||
cocoabeans = readBoolean("Excavation.Drops.Cocoa_Beans", true);
|
||||
mushrooms = readBoolean("Excavation.Drops.Mushrooms", true);
|
||||
glowstone = readBoolean("Excavation.Drops.Glowstone", true);
|
||||
eggs = readBoolean("Excavation.Drops.Eggs", true);
|
||||
apples = readBoolean("Excavation.Drops.Apples", true);
|
||||
cake = readBoolean("Excavation.Drops.Cake", true);
|
||||
music = readBoolean("Excavation.Drops.Music", true);
|
||||
diamond = readBoolean("Excavation.Drops.Diamond", true);
|
||||
slowsand = readBoolean("Excavation.Drops.Slowsand", true);
|
||||
sulphur = readBoolean("Excavation.Drops.Sulphur", true);
|
||||
netherrack = readBoolean("Excavation.Drops.Netherrack", true);
|
||||
bones = readBoolean("Excavation.Drops.Bones", true);
|
||||
slimeballs = readBoolean("Excavation.Drops.Slimeballs", true);
|
||||
watch = readBoolean("Excavation.Drops.Watch", true);
|
||||
string = readBoolean("Excavation.Drops.String", true);
|
||||
bucket = readBoolean("Excavation.Drops.Bucket", true);
|
||||
web = readBoolean("Excavation.Drops.Web", true);
|
||||
|
||||
fishingDrops = readBoolean("Fishing.Drops.Item_Drops_Enabled", true);
|
||||
fishingDropChanceTier1 = readInteger("Fishing.Drops.Drop_Chance.Tier_1", 20);
|
||||
fishingDropChanceTier2 = readInteger("Fishing.Drops.Drop_Chance.Tier_2", 25);
|
||||
fishingDropChanceTier3 = readInteger("Fishing.Drops.Drop_Chance.Tier_3", 30);
|
||||
fishingDropChanceTier4 = readInteger("Fishing.Drops.Drop_Chance.Tier_4", 35);
|
||||
fishingDropChanceTier5 = readInteger("Fishing.Drops.Drop_Chance.Tier_5", 40);
|
||||
leatherArmor = readBoolean("Fishing.Drops.Leather_Armor", true);
|
||||
ironArmor = readBoolean("Fishing.Drops.Iron_Armor", true);
|
||||
goldArmor = readBoolean("Fishing.Drops.Gold_Armor", true);
|
||||
diamondArmor = readBoolean("Fishing.Drops.Diamond_Armor", true);
|
||||
woodenTools = readBoolean("Fishing.Drops.Wooden_Tools", true);
|
||||
stoneTools = readBoolean("Fishing.Drops.Stone_Tools", true);
|
||||
ironTools = readBoolean("Fishing.Drops.Iron_Tools", true);
|
||||
goldTools = readBoolean("Fishing.Drops.Gold_Tools", true);
|
||||
diamondTools = readBoolean("Fishing.Drops.Diamond_Tools", true);
|
||||
enderPearl = readBoolean("Fishing.Drops.Ender_Pearl", true);
|
||||
blazeRod = readBoolean("Fishing.Drops.Blaze_Rod", true);
|
||||
records = readBoolean("Fishing.Drops.Records", true);
|
||||
glowstoneDust = readBoolean("Fishing.Drops.Glowstone_Dust", true);
|
||||
fishingDiamonds = readBoolean("Fishing.Drops.Diamonds", true);
|
||||
fishingDrops = readBoolean("Fishing.Drops_Enabled", true);
|
||||
fishingTier1 = readInteger("Fishing.Tier_Levels.Tier1", 0);
|
||||
fishingTier2 = readInteger("Fishing.Tier_Levels.Tier2", 200);
|
||||
fishingTier3 = readInteger("Fishing.Tier_Levels.Tier3", 400);
|
||||
fishingTier4 = readInteger("Fishing.Tier_Levels.Tier4", 600);
|
||||
fishingTier5 = readInteger("Fishing.Tier_Levels.Tier5", 800);
|
||||
|
||||
xplockEnable = readBoolean("Commands.xplock.Enabled", true);
|
||||
xprateEnable = readBoolean("Commands.xprate.Enabled", true);
|
||||
mctopEnable = readBoolean("Commands.mctop.Enabled", true);
|
||||
addxpEnable = readBoolean("Commands.addxp.Enabled", true);
|
||||
addlevelsEnable = readBoolean("Commands.addlevels.Enabled", true);
|
||||
mcabilityEnable = readBoolean("Commands.mcability.Enabled", true);
|
||||
mcrefreshEnable = readBoolean("Commands.mcrefresh.Enabled", true);
|
||||
mcmmoEnable = readBoolean("Commands.mcmmo.Enabled", true);
|
||||
mccEnable = readBoolean("Commands.mcc.Enabled", true);
|
||||
mcgodEnable = readBoolean("Commands.mcgod.Enabled", true);
|
||||
statsEnable = readBoolean("Commands.stats.Enabled", true);
|
||||
mcstatsEnable = readBoolean("Commands.mcstats.Enabled", true);
|
||||
mmoeditEnable = readBoolean("Commands.mmoedit.Enabled", true);
|
||||
mcremoveEnable = readBoolean("Commands.mcremove.Enable", true);
|
||||
ptpEnable = readBoolean("Commands.ptp.Enabled", true);
|
||||
partyEnable = readBoolean("Commands.party.Enabled", true);
|
||||
myspawnEnable = readBoolean("Commands.myspawn.Enabled", true);
|
||||
whoisEnable = readBoolean("Commands.whois.Enabled", true);
|
||||
inspectEnable = readBoolean("Commands.inspect.Enabled", true);
|
||||
inviteEnable = readBoolean("Commands.invite.Enabled", true);
|
||||
acceptEnable = readBoolean("Commands.accept.Enabled", true);
|
||||
clearmyspawnEnable = readBoolean("Commands.clearmyspawn.Enabled", true);
|
||||
aEnable = readBoolean("Commands.a.Enabled", true);
|
||||
pEnable = readBoolean("Commands.p.Enabled", true);
|
||||
|
||||
aDisplayNames = readBoolean("Commands.a.Display_Names", true);
|
||||
pDisplayNames = readBoolean("Commands.p.Display_Names", true);
|
||||
|
||||
animalXP = readDouble("Experience.Combat.Multiplier.Animals", 1.0);
|
||||
creeperXP = readDouble("Experience.Combat.Multiplier.Creeper", 4.0);
|
||||
skeletonXP = readDouble("Experience.Combat.Multiplier.Skeleton", 2.0);
|
||||
spiderXP = readDouble("Experience.Combat.Multiplier.Spider", 3.0);
|
||||
ghastXP = readDouble("Experience.Combat.Multiplier.Ghast", 3.0);
|
||||
slimeXP = readDouble("Experience.Combat.Multiplier.Slime", 2.0);
|
||||
zombieXP = readDouble("Experience.Combat.Multiplier.Zombie", 2.0);
|
||||
pigzombieXP = readDouble("Experience.Combat.Multiplier.Pig_Zombie", 3.0);
|
||||
endermanXP = readDouble("Experience.Combat.Multiplier.Enderman", 2.0);
|
||||
cavespiderXP = readDouble("Experience.Combat.Multiplier.Cave_Spider", 3.0);
|
||||
silverfishXP = readDouble("Experience.Combat.Multiplier.Silverfish", 3.0);
|
||||
blazeXP = readDouble("Experience.Combat.Multiplier.Blaze", 3.0);
|
||||
magmacubeXP = readDouble("Experience.Combat.Multiplier.Magma_Cube", 2.0);
|
||||
enderdragonXP = readDouble("Experience.Combat.Multiplier.Ender_Dragon", 8.0);
|
||||
|
||||
detonatorID = readInteger("Skills.Mining.Detonator_ID", 259);
|
||||
}
|
||||
}
|
||||
219
src/main/java/com/gmail/nossr50/config/LoadTreasures.java
Normal file
219
src/main/java/com/gmail/nossr50/config/LoadTreasures.java
Normal file
@@ -0,0 +1,219 @@
|
||||
package com.gmail.nossr50.config;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.treasure.ExcavationTreasure;
|
||||
import com.gmail.nossr50.datatypes.treasure.FishingTreasure;
|
||||
import com.gmail.nossr50.datatypes.treasure.Treasure;
|
||||
|
||||
public class LoadTreasures {
|
||||
|
||||
public static List<ExcavationTreasure> excavationFromDirt = new ArrayList<ExcavationTreasure>();
|
||||
public static List<ExcavationTreasure> excavationFromGrass = new ArrayList<ExcavationTreasure>();
|
||||
public static List<ExcavationTreasure> excavationFromSand = new ArrayList<ExcavationTreasure>();
|
||||
public static List<ExcavationTreasure> excavationFromGravel = new ArrayList<ExcavationTreasure>();
|
||||
public static List<ExcavationTreasure> excavationFromClay = new ArrayList<ExcavationTreasure>();
|
||||
public static List<ExcavationTreasure> excavationFromMycel = new ArrayList<ExcavationTreasure>();
|
||||
public static List<ExcavationTreasure> excavationFromSoulSand = new ArrayList<ExcavationTreasure>();
|
||||
public static List<FishingTreasure> fishingRewardsTier1 = new ArrayList<FishingTreasure>();
|
||||
public static List<FishingTreasure> fishingRewardsTier2 = new ArrayList<FishingTreasure>();
|
||||
public static List<FishingTreasure> fishingRewardsTier3 = new ArrayList<FishingTreasure>();
|
||||
public static List<FishingTreasure> fishingRewardsTier4 = new ArrayList<FishingTreasure>();
|
||||
public static List<FishingTreasure> fishingRewardsTier5 = new ArrayList<FishingTreasure>();
|
||||
|
||||
protected static File configFile;
|
||||
protected static File dataFolder;
|
||||
protected final mcMMO plugin;
|
||||
protected static FileConfiguration config;
|
||||
|
||||
public LoadTreasures(mcMMO plugin) {
|
||||
this.plugin = plugin;
|
||||
dataFolder = plugin.getDataFolder();
|
||||
configFile = new File(dataFolder, File.separator + "treasures.yml");
|
||||
config = plugin.getTreasuresConfig();
|
||||
}
|
||||
|
||||
public void load() {
|
||||
// If not exist, copy from the jar
|
||||
if (!configFile.exists()) {
|
||||
dataFolder.mkdir();
|
||||
plugin.saveTreasuresConfig();
|
||||
}
|
||||
addDefaults();
|
||||
loadKeys();
|
||||
}
|
||||
|
||||
private static void saveConfig() {
|
||||
try {
|
||||
config.save(configFile);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void addDefaults() {
|
||||
// Load from included config.yml
|
||||
config.options().copyDefaults(true);
|
||||
saveConfig();
|
||||
}
|
||||
|
||||
private Boolean readBoolean(String root, Boolean def) {
|
||||
Boolean result = config.getBoolean(root, def);
|
||||
return result;
|
||||
}
|
||||
|
||||
private void loadKeys()
|
||||
{
|
||||
plugin.getLogger().info("Loading mcMMO treasures.yml File...");
|
||||
|
||||
// Load treasures
|
||||
Map<String, Treasure> treasures = new HashMap<String, Treasure>();
|
||||
|
||||
ConfigurationSection treasureSection = config.getConfigurationSection("Treasures");
|
||||
Set<String> treasureConfigSet = treasureSection.getKeys(false);
|
||||
Iterator<String> iterator = treasureConfigSet.iterator();
|
||||
while(iterator.hasNext())
|
||||
{
|
||||
String treasureName = iterator.next();
|
||||
|
||||
// Validate all the things!
|
||||
List<String> reason = new ArrayList<String>();
|
||||
|
||||
if(!config.contains("Treasures." + treasureName + ".ID")) reason.add("Missing ID");
|
||||
if(!config.contains("Treasures." + treasureName + ".Amount")) reason.add("Missing Amount");
|
||||
if(!config.contains("Treasures." + treasureName + ".Data")) reason.add("Missing Data");
|
||||
|
||||
int id = config.getInt("Treasures." + treasureName + ".ID");
|
||||
int amount = config.getInt("Treasures." + treasureName + ".Amount");
|
||||
int data = config.getInt("Treasures." + treasureName + ".Data");
|
||||
|
||||
if(Material.getMaterial(id) == null) reason.add("Invlid id: " + id);
|
||||
if(amount < 1) reason.add("Invalid amount: " + amount);
|
||||
if(data > 127 || data < -128) reason.add("Invalid data: " + data);
|
||||
|
||||
if(!config.contains("Treasures." + treasureName + ".XP")) reason.add("Missing XP");
|
||||
if(!config.contains("Treasures." + treasureName + ".Drop_Chance")) reason.add("Missing Drop_Chance");
|
||||
if(!config.contains("Treasures." + treasureName + ".Drop_Level")) reason.add("Missing Drop_Level");
|
||||
|
||||
int xp = config.getInt("Treasures." + treasureName + ".XP");
|
||||
Double dropChance = config.getDouble("Treasures." + treasureName + ".Drop_Chance");
|
||||
int dropLevel = config.getInt("Treasures." + treasureName + ".Drop_Level");
|
||||
|
||||
if(xp < 0) reason.add("Invalid xp: " + xp);
|
||||
if(dropChance < 0) reason.add("Invalid Drop_Chance: " + dropChance);
|
||||
if(dropLevel < 0) reason.add("Invalid Drop_Level: " + dropLevel);
|
||||
|
||||
ItemStack item = new ItemStack(id, amount, (byte) 0, (byte) data);
|
||||
|
||||
if(readBoolean("Treasures." + treasureName + ".Drops_From.Fishing", false)) {
|
||||
if(config.getConfigurationSection("Treasures." + treasureName + ".Drops_From").getKeys(false).size() != 1)
|
||||
reason.add("Fishing drops cannot also be excavation drops");
|
||||
|
||||
if(!config.contains("Treasures." + treasureName + ".Max_Level")) reason.add("Missing Max_Level");
|
||||
int maxLevel = config.getInt("Treasures." + treasureName + ".Max_Level");
|
||||
|
||||
if(maxLevel < 0) reason.add("Invalid Max_Level: " + maxLevel);
|
||||
|
||||
if(noErrorsInTreasure(reason)) {
|
||||
FishingTreasure fTreasure = new FishingTreasure(item, xp, dropChance, dropLevel, maxLevel);
|
||||
treasures.put(treasureName, fTreasure);
|
||||
}
|
||||
} else {
|
||||
ExcavationTreasure eTreasure = new ExcavationTreasure(item, xp, dropChance, dropLevel);
|
||||
if(readBoolean("Treasures." + treasureName + ".Drops_From.Dirt", false))
|
||||
eTreasure.setDropsFromDirt();
|
||||
if(readBoolean("Treasures." + treasureName + ".Drops_From.Grass", false))
|
||||
eTreasure.setDropsFromGrass();
|
||||
if(readBoolean("Treasures." + treasureName + ".Drops_From.Sand", false))
|
||||
eTreasure.setDropsFromSand();
|
||||
if(readBoolean("Treasures." + treasureName + ".Drops_From.Gravel", false))
|
||||
eTreasure.setDropsFromGravel();
|
||||
if(readBoolean("Treasures." + treasureName + ".Drops_From.Clay", false))
|
||||
eTreasure.setDropsFromClay();
|
||||
if(readBoolean("Treasures." + treasureName + ".Drops_From.Mycelium", false))
|
||||
eTreasure.setDropsFromMycel();
|
||||
if(readBoolean("Treasures." + treasureName + ".Drops_From.Soul_Sand", false))
|
||||
eTreasure.setDropsFromSoulSand();
|
||||
|
||||
if(readBoolean("Treasures." + treasureName + ".Drops_From.Fishing", false)) {
|
||||
reason.add("Excavation drops cannot also be fishing drops");
|
||||
}
|
||||
|
||||
if(noErrorsInTreasure(reason)) {
|
||||
treasures.put(treasureName, eTreasure);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<String> excavationTreasures = config.getStringList("Excavation.Treasure");
|
||||
List<String> fishingTreasures = config.getStringList("Fishing.Treasure");
|
||||
|
||||
Iterator<String> treasureIterator = treasures.keySet().iterator();
|
||||
while(treasureIterator.hasNext()) {
|
||||
String treasureKey = treasureIterator.next();
|
||||
Treasure treasure = treasures.get(treasureKey);
|
||||
|
||||
if(treasure instanceof FishingTreasure) {
|
||||
if(!fishingTreasures.contains(treasureKey)) continue;
|
||||
|
||||
FishingTreasure fTreasure = (FishingTreasure) treasure;
|
||||
int dropLevel = fTreasure.getDropLevel();
|
||||
int maxLevel = fTreasure.getMaxLevel();
|
||||
|
||||
if(dropLevel <= LoadProperties.fishingTier1 && maxLevel >= LoadProperties.fishingTier1)
|
||||
fishingRewardsTier1.add(fTreasure);
|
||||
if(dropLevel <= LoadProperties.fishingTier2 && maxLevel >= LoadProperties.fishingTier2)
|
||||
fishingRewardsTier2.add(fTreasure);
|
||||
if(dropLevel <= LoadProperties.fishingTier3 && maxLevel >= LoadProperties.fishingTier3)
|
||||
fishingRewardsTier3.add(fTreasure);
|
||||
if(dropLevel <= LoadProperties.fishingTier4 && maxLevel >= LoadProperties.fishingTier4)
|
||||
fishingRewardsTier4.add(fTreasure);
|
||||
if(dropLevel <= LoadProperties.fishingTier5 && maxLevel >= LoadProperties.fishingTier5)
|
||||
fishingRewardsTier5.add(fTreasure);
|
||||
|
||||
} else if(treasure instanceof ExcavationTreasure) {
|
||||
if(!excavationTreasures.contains(treasureKey)) continue;
|
||||
|
||||
ExcavationTreasure eTreasure = (ExcavationTreasure) treasure;
|
||||
if(eTreasure.getDropsFromDirt())
|
||||
excavationFromDirt.add(eTreasure);
|
||||
if(eTreasure.getDropsFromGrass())
|
||||
excavationFromGrass.add(eTreasure);
|
||||
if(eTreasure.getDropsFromSand())
|
||||
excavationFromSand.add(eTreasure);
|
||||
if(eTreasure.getDropsFromGravel())
|
||||
excavationFromGravel.add(eTreasure);
|
||||
if(eTreasure.getDropsFromClay())
|
||||
excavationFromClay.add(eTreasure);
|
||||
if(eTreasure.getDropsFromMycel())
|
||||
excavationFromMycel.add(eTreasure);
|
||||
if(eTreasure.getDropsFromSoulSand())
|
||||
excavationFromSoulSand.add(eTreasure);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean noErrorsInTreasure(List<String> issues) {
|
||||
if(issues.isEmpty()) return true;
|
||||
|
||||
for(String issue : issues) {
|
||||
plugin.getLogger().warning(issue);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,9 +18,12 @@ package com.gmail.nossr50.config;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
|
||||
@@ -30,11 +33,11 @@ public class Misc
|
||||
|
||||
protected static final Logger log = Logger.getLogger("Minecraft");
|
||||
|
||||
public ArrayList<Entity> mobSpawnerList = new ArrayList<Entity>();
|
||||
public ArrayList<Integer> mobSpawnerList = new ArrayList<Integer>();
|
||||
public HashSet<Block> blockWatchList = new HashSet<Block>();
|
||||
public ArrayList<Block> treeFeller = new ArrayList<Block>();
|
||||
public HashMap<Entity, Integer> arrowTracker = new HashMap<Entity, Integer>();
|
||||
public ArrayList<LivingEntity> bleedTracker = new ArrayList<LivingEntity>();
|
||||
public HashMap<Location, Player> tntTracker = new HashMap<Location, Player>();
|
||||
mcMMO plugin = null;
|
||||
|
||||
//BLEED QUE STUFF
|
||||
|
||||
195
src/main/java/com/gmail/nossr50/datatypes/AbilityType.java
Normal file
195
src/main/java/com/gmail/nossr50/datatypes/AbilityType.java
Normal file
@@ -0,0 +1,195 @@
|
||||
package com.gmail.nossr50.datatypes;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
|
||||
public enum AbilityType
|
||||
{
|
||||
BERSERK(LoadProperties.berserkCooldown, mcLocale.getString("Skills.BerserkOn"), mcLocale.getString("Skills.BerserkOff"), "Skills.BerserkPlayer", mcLocale.getString("Skills.YourBerserk"), "Skills.BerserkPlayerOff"),
|
||||
SUPER_BREAKER(LoadProperties.superBreakerCooldown, mcLocale.getString("Skills.SuperBreakerOn"), mcLocale.getString("Skills.SuperBreakerOff"), "Skills.SuperBreakerPlayer", mcLocale.getString("Skills.YourSuperBreaker"), "Skills.SuperBreakerPlayerOff"),
|
||||
GIGA_DRILL_BREAKER(LoadProperties.gigaDrillBreakerCooldown, mcLocale.getString("Skills.GigaDrillBreakerOn"), mcLocale.getString("Skills.GigaDrillBreakerOff"), "Skills.GigaDrillBreakerPlayer", mcLocale.getString("Skills.YourGigaDrillBreaker"), "Skills.GigaDrillBreakerPlayerOff"),
|
||||
GREEN_TERRA(LoadProperties.greenTerraCooldown, mcLocale.getString("Skills.GreenTerraOn"), mcLocale.getString("Skills.GreenTerraOff"), "Skills.GreenTerraPlayer", mcLocale.getString("Skills.YourGreenTerra"), mcLocale.getString("Skills.GreenTerraPlayerOff")),
|
||||
SKULL_SPLIITER(LoadProperties.skullSplitterCooldown, mcLocale.getString("Skills.SkullSplitterOn"), mcLocale.getString("Skills.SkullSplitterOff"), "Skills.SkullSplitterPlayer", mcLocale.getString("Skills.YourSkullSplitter"), "Skills.SkullSplitterPlayerOff"),
|
||||
TREE_FELLER(LoadProperties.treeFellerCooldown, mcLocale.getString("Skills.TreeFellerOn"), mcLocale.getString("Skills.TreeFellerOff"), "Skills.TreeFellerPlayer", mcLocale.getString("Skills.YourTreeFeller"), "Skills.TreeFellerPlayerOff"),
|
||||
SERRATED_STRIKES(LoadProperties.skullSplitterCooldown, mcLocale.getString("Skills.SerratedStrikesOn"), mcLocale.getString("Skills.SerratedStrikesOff"), "Skills.SerratedStrikesPlayer", mcLocale.getString("Skills.YourSerratedStrikes"), "Skills.SerratedStrikesPlayerOff"),
|
||||
BLAST_MINING(LoadProperties.blastMiningCooldown, "NOT NEEDED FOR BLAST MINING", "NOT NEEDED FOR BLAST MINING", "Skills.BlastMiningPlayer", mcLocale.getString("Skills.YourBlastMining"), "NOT NEEDED FOR BLAST MINING");
|
||||
|
||||
private int cooldown;
|
||||
private String abilityOn;
|
||||
private String abilityOff;
|
||||
private String abilityPlayer;
|
||||
private String abilityRefresh;
|
||||
private String abilityPlayerOff;
|
||||
|
||||
private AbilityType(int cooldown, String abilityOn, String abilityOff, String abilityPlayer, String abilityRefresh, String abilityPlayerOff)
|
||||
{
|
||||
this.cooldown = cooldown;
|
||||
this.abilityOn = abilityOn;
|
||||
this.abilityOff = abilityOff;
|
||||
this.abilityPlayer = abilityPlayer;
|
||||
this.abilityRefresh = abilityRefresh;
|
||||
this.abilityPlayerOff = abilityPlayerOff;
|
||||
}
|
||||
|
||||
public int getCooldown()
|
||||
{
|
||||
return this.cooldown;
|
||||
}
|
||||
|
||||
public String getAbilityOn()
|
||||
{
|
||||
return this.abilityOn;
|
||||
}
|
||||
|
||||
public String getAbilityOff()
|
||||
{
|
||||
return this.abilityOff;
|
||||
}
|
||||
|
||||
public String getAbilityPlayer(Player player)
|
||||
{
|
||||
return mcLocale.getString(this.abilityPlayer, new Object[] {player.getName()});
|
||||
}
|
||||
|
||||
public String getAbilityPlayerOff(Player player)
|
||||
{
|
||||
return mcLocale.getString(this.abilityPlayerOff, new Object[] {player.getName()});
|
||||
}
|
||||
|
||||
public String getAbilityRefresh()
|
||||
{
|
||||
return this.abilityRefresh;
|
||||
}
|
||||
|
||||
public boolean getMode(PlayerProfile PP)
|
||||
{
|
||||
switch(this)
|
||||
{
|
||||
case BERSERK:
|
||||
return PP.getBerserkMode();
|
||||
case SUPER_BREAKER:
|
||||
return PP.getSuperBreakerMode();
|
||||
case GIGA_DRILL_BREAKER:
|
||||
return PP.getGigaDrillBreakerMode();
|
||||
case GREEN_TERRA:
|
||||
return PP.getGreenTerraMode();
|
||||
case SKULL_SPLIITER:
|
||||
return PP.getSkullSplitterMode();
|
||||
case TREE_FELLER:
|
||||
return PP.getTreeFellerMode();
|
||||
case SERRATED_STRIKES:
|
||||
return PP.getSerratedStrikesMode();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setMode(PlayerProfile PP, boolean bool)
|
||||
{
|
||||
switch(this)
|
||||
{
|
||||
case BERSERK:
|
||||
PP.setBerserkMode(bool);
|
||||
break;
|
||||
case SUPER_BREAKER:
|
||||
PP.setSuperBreakerMode(bool);
|
||||
break;
|
||||
case GIGA_DRILL_BREAKER:
|
||||
PP.setGigaDrillBreakerMode(bool);
|
||||
break;
|
||||
case GREEN_TERRA:
|
||||
PP.setGreenTerraMode(bool);
|
||||
break;
|
||||
case SKULL_SPLIITER:
|
||||
PP.setSkullSplitterMode(bool);
|
||||
break;
|
||||
case TREE_FELLER:
|
||||
PP.setTreeFellerMode(bool);
|
||||
break;
|
||||
case SERRATED_STRIKES:
|
||||
PP.setSerratedStrikesMode(bool);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getInformed(PlayerProfile PP)
|
||||
{
|
||||
switch(this)
|
||||
{
|
||||
case BLAST_MINING:
|
||||
return PP.getBlastMiningInformed();
|
||||
case BERSERK:
|
||||
return PP.getBerserkInformed();
|
||||
case SUPER_BREAKER:
|
||||
return PP.getSuperBreakerInformed();
|
||||
case GIGA_DRILL_BREAKER:
|
||||
return PP.getGigaDrillBreakerInformed();
|
||||
case GREEN_TERRA:
|
||||
return PP.getGreenTerraInformed();
|
||||
case SKULL_SPLIITER:
|
||||
return PP.getSkullSplitterInformed();
|
||||
case TREE_FELLER:
|
||||
return PP.getTreeFellerInformed();
|
||||
case SERRATED_STRIKES:
|
||||
return PP.getSerratedStrikesInformed();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setInformed(PlayerProfile PP, boolean bool)
|
||||
{
|
||||
switch(this)
|
||||
{
|
||||
case BLAST_MINING:
|
||||
PP.setBlastMiningInformed(bool);
|
||||
break;
|
||||
case BERSERK:
|
||||
PP.setBerserkInformed(bool);
|
||||
break;
|
||||
case SUPER_BREAKER:
|
||||
PP.setSuperBreakerInformed(bool);
|
||||
break;
|
||||
case GIGA_DRILL_BREAKER:
|
||||
PP.setGigaDrillBreakerInformed(bool);
|
||||
break;
|
||||
case GREEN_TERRA:
|
||||
PP.setGreenTerraInformed(bool);
|
||||
break;
|
||||
case SKULL_SPLIITER:
|
||||
PP.setSkullSplitterInformed(bool);
|
||||
break;
|
||||
case TREE_FELLER:
|
||||
PP.setTreeFellerInformed(bool);
|
||||
break;
|
||||
case SERRATED_STRIKES:
|
||||
PP.setSerratedStrikesInformed(bool);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getPermissions(Player player)
|
||||
{
|
||||
switch(this)
|
||||
{
|
||||
case BERSERK:
|
||||
return mcPermissions.getInstance().unarmedAbility(player);
|
||||
case GIGA_DRILL_BREAKER:
|
||||
return mcPermissions.getInstance().excavationAbility(player);
|
||||
case GREEN_TERRA:
|
||||
return mcPermissions.getInstance().herbalismAbility(player);
|
||||
case SERRATED_STRIKES:
|
||||
return mcPermissions.getInstance().swordsAbility(player);
|
||||
case SKULL_SPLIITER:
|
||||
return mcPermissions.getInstance().axesAbility(player);
|
||||
case SUPER_BREAKER:
|
||||
return mcPermissions.getInstance().miningAbility(player);
|
||||
case TREE_FELLER:
|
||||
return mcPermissions.getInstance().woodCuttingAbility(player);
|
||||
case BLAST_MINING:
|
||||
return mcPermissions.getInstance().blastMining(player);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -25,20 +25,16 @@ import java.util.ArrayList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.events.McMMOPlayerXpGainEvent;
|
||||
import com.gmail.nossr50.party.Party;
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
|
||||
|
||||
|
||||
public class PlayerProfile
|
||||
{
|
||||
protected final Logger log = Logger.getLogger("Minecraft");
|
||||
@@ -47,41 +43,41 @@ public class PlayerProfile
|
||||
private HUDType hud;
|
||||
|
||||
//MISC
|
||||
private String party, myspawn, myspawnworld, invite;
|
||||
private String party, invite;
|
||||
|
||||
//TOGGLES
|
||||
private boolean partyhud = true, spoutcraft = false, filling = false, xpbarlocked = false, placedAnvil = false, partyChatMode = false, adminChatMode = false, godMode = false, greenTerraMode, partyChatOnly = false, greenTerraInformed = true, berserkInformed = true, skullSplitterInformed = true, gigaDrillBreakerInformed = true,
|
||||
superBreakerInformed = true, serratedStrikesInformed = true, treeFellerInformed = true, dead, abilityuse = true, treeFellerMode, superBreakerMode, gigaDrillBreakerMode,
|
||||
private boolean loaded = false, partyhud = true, spoutcraft = false, filling = false, xpbarlocked = false, placedAnvil = false, partyChatMode = false, adminChatMode = false, godMode = false, greenTerraMode, partyChatOnly = false, greenTerraInformed = true, berserkInformed = true, skullSplitterInformed = true, gigaDrillBreakerInformed = true,
|
||||
superBreakerInformed = true, blastMiningInformed = true, serratedStrikesInformed = true, treeFellerInformed = true, dead, abilityuse = true, treeFellerMode, superBreakerMode, gigaDrillBreakerMode,
|
||||
serratedStrikesMode, hoePreparationMode = false, shovelPreparationMode = false, swordsPreparationMode = false, fistsPreparationMode = false, pickaxePreparationMode = false, axePreparationMode = false, skullSplitterMode, berserkMode;
|
||||
|
||||
//TIMESTAMPS
|
||||
//ATS = (Time of) Activation Time Stamp
|
||||
//DATS = (Time of) Deactivation Time Stamp
|
||||
private int xpGainATS = 0, recentlyHurt = 0, berserkATS = 0, berserkDATS = 0, gigaDrillBreakerATS = 0, gigaDrillBreakerDATS = 0,
|
||||
respawnATS = 0, mySpawnATS = 0, greenTerraATS = 0, greenTerraDATS = 0, superBreakerATS = 0, superBreakerDATS = 0, serratedStrikesATS = 0, serratedStrikesDATS = 0, treeFellerATS = 0, treeFellerDATS = 0,
|
||||
skullSplitterATS = 0, skullSplitterDATS = 0, hoePreparationATS = 0, axePreparationATS = 0, pickaxePreparationATS = 0, fistsPreparationATS = 0, shovelPreparationATS = 0, swordsPreparationATS = 0;
|
||||
private int xpGainATS = 0, recentlyHurt = 0, respawnATS, hoePreparationATS, shovelPreparationATS, swordsPreparationATS, fistsPreparationATS, axePreparationATS, pickaxePreparationATS;
|
||||
|
||||
private SkillType lastgained = null, skillLock = null;
|
||||
|
||||
//MySQL STUFF
|
||||
private int xpbarinc=0, lastlogin=0, userid = 0, bleedticks = 0;
|
||||
|
||||
//MAGIC STUFF
|
||||
private int mana = 0;
|
||||
private int greenDyeCycleSel = 0, greenDyeCycle = 0, blueDyeCycle = 0, blueDyeCycleSel = 0;
|
||||
public boolean dyeChanged = false;
|
||||
|
||||
private String playername;
|
||||
private String playerName;
|
||||
|
||||
//Time to HashMap this shiz
|
||||
HashMap<SkillType, Integer> skills = new HashMap<SkillType, Integer>(); //Skills and XP
|
||||
HashMap<SkillType, Integer> skillsXp = new HashMap<SkillType, Integer>(); //Skills and XP
|
||||
HashMap<AbilityType, Integer> skillsDATS = new HashMap<AbilityType, Integer>(); //Skill ATS
|
||||
|
||||
String location = "plugins/mcMMO/FlatFileStuff/mcmmo.users";
|
||||
|
||||
public PlayerProfile(Player player)
|
||||
public PlayerProfile(String name)
|
||||
{
|
||||
hud = LoadProperties.defaulthud;
|
||||
//Setup the HashMap for ability DATS
|
||||
for(AbilityType abilityType : AbilityType.values())
|
||||
{
|
||||
skillsDATS.put(abilityType, 0);
|
||||
}
|
||||
|
||||
//Setup the HashMap for the skills
|
||||
for(SkillType skillType : SkillType.values())
|
||||
{
|
||||
@@ -92,18 +88,51 @@ public class PlayerProfile
|
||||
}
|
||||
}
|
||||
|
||||
playername = player.getName();
|
||||
playerName = name;
|
||||
if (LoadProperties.useMySQL)
|
||||
{
|
||||
if(!loadMySQL(player)) {
|
||||
addMySQLPlayer(player);
|
||||
loadMySQL(player);//This is probably not needed anymore, could just delete
|
||||
if(!loadMySQL()) {
|
||||
addMySQLPlayer();
|
||||
loadMySQL();//This is probably not needed anymore, could just delete
|
||||
}
|
||||
} else {
|
||||
if(!load()) { addPlayer(); }
|
||||
if(!load()) { addPlayer();}
|
||||
}
|
||||
lastlogin = ((Long) (System.currentTimeMillis()/1000)).intValue();
|
||||
}
|
||||
|
||||
public PlayerProfile(String name, boolean addNew)
|
||||
{
|
||||
hud = LoadProperties.defaulthud;
|
||||
//Setup the HashMap for ability DATS
|
||||
for(AbilityType abilityType : AbilityType.values())
|
||||
{
|
||||
skillsDATS.put(abilityType, 0);
|
||||
}
|
||||
|
||||
//Setup the HashMap for the skills
|
||||
for(SkillType skillType : SkillType.values())
|
||||
{
|
||||
if(skillType != SkillType.ALL)
|
||||
{
|
||||
skills.put(skillType, 0);
|
||||
skillsXp.put(skillType, 0);
|
||||
}
|
||||
}
|
||||
|
||||
playerName = name;
|
||||
if (LoadProperties.useMySQL)
|
||||
{
|
||||
if(!loadMySQL() && addNew) {
|
||||
addMySQLPlayer();
|
||||
loadMySQL();//This is probably not needed anymore, could just delete
|
||||
}
|
||||
} else {
|
||||
if(!load() && addNew) { addPlayer(); loaded = true; }
|
||||
}
|
||||
lastlogin = ((Long) (System.currentTimeMillis()/1000)).intValue();
|
||||
}
|
||||
|
||||
public int getLastLogin()
|
||||
{
|
||||
return lastlogin;
|
||||
@@ -113,10 +142,10 @@ public class PlayerProfile
|
||||
return userid;
|
||||
}
|
||||
|
||||
public boolean loadMySQL(Player p)
|
||||
public boolean loadMySQL()
|
||||
{
|
||||
Integer id = 0;
|
||||
id = mcMMO.database.GetInt("SELECT id FROM "+LoadProperties.MySQLtablePrefix+"users WHERE user = '" + p.getName() + "'");
|
||||
id = mcMMO.database.GetInt("SELECT id FROM "+LoadProperties.MySQLtablePrefix+"users WHERE user = '" + playerName + "'");
|
||||
if(id == 0)
|
||||
return false;
|
||||
this.userid = id;
|
||||
@@ -141,11 +170,8 @@ public class PlayerProfile
|
||||
}
|
||||
HashMap<Integer, ArrayList<String>> users = mcMMO.database.Read("SELECT lastlogin, party FROM "+LoadProperties.MySQLtablePrefix+"users WHERE id = " + id);
|
||||
//lastlogin = Integer.parseInt(users.get(1).get(0));
|
||||
party = users.get(1).get(1);
|
||||
HashMap<Integer, ArrayList<String>> spawn = mcMMO.database.Read("SELECT world, x, y, z FROM "+LoadProperties.MySQLtablePrefix+"spawn WHERE user_id = " + id);
|
||||
myspawnworld = spawn.get(1).get(0);
|
||||
myspawn = spawn.get(1).get(1) + "," + spawn.get(1).get(2) + "," + spawn.get(1).get(3);
|
||||
HashMap<Integer, ArrayList<String>> cooldowns = mcMMO.database.Read("SELECT mining, woodcutting, unarmed, herbalism, excavation, swords, axes FROM "+LoadProperties.MySQLtablePrefix+"cooldowns WHERE user_id = " + id);
|
||||
party = users.get(1).get(1);
|
||||
HashMap<Integer, ArrayList<String>> cooldowns = mcMMO.database.Read("SELECT mining, woodcutting, unarmed, herbalism, excavation, swords, axes, blast_mining FROM "+LoadProperties.MySQLtablePrefix+"cooldowns WHERE user_id = " + id);
|
||||
/*
|
||||
* I'm still learning MySQL, this is a fix for adding a new table
|
||||
* its not pretty but it works
|
||||
@@ -156,13 +182,14 @@ public class PlayerProfile
|
||||
}
|
||||
else
|
||||
{
|
||||
superBreakerDATS = Integer.valueOf(cooldowns.get(1).get(0));
|
||||
treeFellerDATS = Integer.valueOf(cooldowns.get(1).get(1));
|
||||
berserkDATS = Integer.valueOf(cooldowns.get(1).get(2));
|
||||
greenTerraDATS = Integer.valueOf(cooldowns.get(1).get(3));
|
||||
gigaDrillBreakerDATS = Integer.valueOf(cooldowns.get(1).get(4));
|
||||
serratedStrikesDATS = Integer.valueOf(cooldowns.get(1).get(5));
|
||||
skullSplitterDATS = Integer.valueOf(cooldowns.get(1).get(6));
|
||||
skillsDATS.put(AbilityType.SUPER_BREAKER, Integer.valueOf(cooldowns.get(1).get(0)));
|
||||
skillsDATS.put(AbilityType.TREE_FELLER, Integer.valueOf(cooldowns.get(1).get(1)));
|
||||
skillsDATS.put(AbilityType.BERSERK, Integer.valueOf(cooldowns.get(1).get(2)));
|
||||
skillsDATS.put(AbilityType.GREEN_TERRA, Integer.valueOf(cooldowns.get(1).get(3)));
|
||||
skillsDATS.put(AbilityType.GIGA_DRILL_BREAKER, Integer.valueOf(cooldowns.get(1).get(4)));
|
||||
skillsDATS.put(AbilityType.SERRATED_STRIKES, Integer.valueOf(cooldowns.get(1).get(5)));
|
||||
skillsDATS.put(AbilityType.SKULL_SPLIITER, Integer.valueOf(cooldowns.get(1).get(6)));
|
||||
skillsDATS.put(AbilityType.BLAST_MINING, Integer.valueOf(cooldowns.get(1).get(7)));
|
||||
}
|
||||
HashMap<Integer, ArrayList<String>> stats = mcMMO.database.Read("SELECT taming, mining, repair, woodcutting, unarmed, herbalism, excavation, archery, swords, axes, acrobatics, fishing FROM "+LoadProperties.MySQLtablePrefix+"skills WHERE user_id = " + id);
|
||||
skills.put(SkillType.TAMING, Integer.valueOf(stats.get(1).get(0)));
|
||||
@@ -190,18 +217,18 @@ public class PlayerProfile
|
||||
skillsXp.put(SkillType.AXES, Integer.valueOf(experience.get(1).get(9)));
|
||||
skillsXp.put(SkillType.ACROBATICS, Integer.valueOf(experience.get(1).get(10)));
|
||||
skillsXp.put(SkillType.FISHING, Integer.valueOf(experience.get(1).get(11)));
|
||||
loaded = true;
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public void addMySQLPlayer(Player p) {
|
||||
public void addMySQLPlayer() {
|
||||
Integer id = 0;
|
||||
mcMMO.database.Write("INSERT INTO "+LoadProperties.MySQLtablePrefix+"users (user, lastlogin) VALUES ('" + p.getName() + "'," + System.currentTimeMillis() / 1000 +")");
|
||||
id = mcMMO.database.GetInt("SELECT id FROM "+LoadProperties.MySQLtablePrefix+"users WHERE user = '" + p.getName() + "'");
|
||||
mcMMO.database.Write("INSERT INTO "+LoadProperties.MySQLtablePrefix+"users (user, lastlogin) VALUES ('" + playerName + "'," + System.currentTimeMillis() / 1000 +")");
|
||||
id = mcMMO.database.GetInt("SELECT id FROM "+LoadProperties.MySQLtablePrefix+"users WHERE user = '" + playerName + "'");
|
||||
mcMMO.database.Write("INSERT INTO "+LoadProperties.MySQLtablePrefix+"cooldowns (user_id) VALUES ("+id+")");
|
||||
mcMMO.database.Write("INSERT INTO "+LoadProperties.MySQLtablePrefix+"spawn (user_id) VALUES ("+id+")");
|
||||
mcMMO.database.Write("INSERT INTO "+LoadProperties.MySQLtablePrefix+"skills (user_id) VALUES ("+id+")");
|
||||
mcMMO.database.Write("INSERT INTO "+LoadProperties.MySQLtablePrefix+"experience (user_id) VALUES ("+id+")");
|
||||
this.userid = id;
|
||||
@@ -219,14 +246,11 @@ public class PlayerProfile
|
||||
//Find if the line contains the player we want.
|
||||
String[] character = line.split(":");
|
||||
|
||||
if(!character[0].equals(playername)){continue;}
|
||||
if(!character[0].equals(playerName)){continue;}
|
||||
|
||||
//Get Mining
|
||||
if(character.length > 1 && m.isInt(character[1]))
|
||||
skills.put(SkillType.MINING, Integer.valueOf(character[1]));
|
||||
//Myspawn
|
||||
if(character.length > 2)
|
||||
myspawn = character[2];
|
||||
//Party
|
||||
if(character.length > 3)
|
||||
party = character[3];
|
||||
@@ -269,26 +293,24 @@ public class PlayerProfile
|
||||
skillsXp.put(SkillType.AXES, Integer.valueOf(character[21]));
|
||||
if(character.length > 22 && m.isInt(character[22]))
|
||||
skillsXp.put(SkillType.ACROBATICS, Integer.valueOf(character[22]));
|
||||
if(character.length > 23 && m.isInt(character[23]))
|
||||
myspawnworld = character[23];
|
||||
if(character.length > 24 && m.isInt(character[24]))
|
||||
skills.put(SkillType.TAMING, Integer.valueOf(character[24]));
|
||||
if(character.length > 25 && m.isInt(character[25]))
|
||||
skillsXp.put(SkillType.TAMING, Integer.valueOf(character[25]));
|
||||
if(character.length > 26)
|
||||
berserkDATS = Integer.valueOf(character[26]);
|
||||
skillsDATS.put(AbilityType.BERSERK, Integer.valueOf(character[26]));
|
||||
if(character.length > 27)
|
||||
gigaDrillBreakerDATS = Integer.valueOf(character[27]);
|
||||
skillsDATS.put(AbilityType.GIGA_DRILL_BREAKER, Integer.valueOf(character[27]));
|
||||
if(character.length > 28)
|
||||
treeFellerDATS = Integer.valueOf(character[28]);
|
||||
skillsDATS.put(AbilityType.TREE_FELLER, Integer.valueOf(character[28]));
|
||||
if(character.length > 29)
|
||||
greenTerraDATS = Integer.valueOf(character[29]);
|
||||
skillsDATS.put(AbilityType.GREEN_TERRA, Integer.valueOf(character[29]));
|
||||
if(character.length > 30)
|
||||
serratedStrikesDATS = Integer.valueOf(character[30]);
|
||||
skillsDATS.put(AbilityType.SERRATED_STRIKES, Integer.valueOf(character[30]));
|
||||
if(character.length > 31)
|
||||
skullSplitterDATS = Integer.valueOf(character[31]);
|
||||
skillsDATS.put(AbilityType.SKULL_SPLIITER, Integer.valueOf(character[31]));
|
||||
if(character.length > 32)
|
||||
superBreakerDATS = Integer.valueOf(character[32]);
|
||||
skillsDATS.put(AbilityType.SUPER_BREAKER, Integer.valueOf(character[32]));
|
||||
if(character.length > 33)
|
||||
{
|
||||
for(HUDType x : HUDType.values())
|
||||
@@ -303,7 +325,10 @@ public class PlayerProfile
|
||||
skills.put(SkillType.FISHING, Integer.valueOf(character[34]));
|
||||
if(character.length > 35)
|
||||
skillsXp.put(SkillType.FISHING, Integer.valueOf(character[35]));
|
||||
if(character.length > 36)
|
||||
skillsDATS.put(AbilityType.BLAST_MINING, Integer.valueOf(character[36]));
|
||||
in.close();
|
||||
loaded = true;
|
||||
return true;
|
||||
}
|
||||
in.close();
|
||||
@@ -324,15 +349,15 @@ public class PlayerProfile
|
||||
+" hudtype = '"+hud.toString()+"' WHERE user_id = "+this.userid);
|
||||
mcMMO.database.Write("UPDATE "+LoadProperties.MySQLtablePrefix+"users SET lastlogin = " + timestamp.intValue() + " WHERE id = " + this.userid);
|
||||
mcMMO.database.Write("UPDATE "+LoadProperties.MySQLtablePrefix+"users SET party = '"+this.party+"' WHERE id = " +this.userid);
|
||||
mcMMO.database.Write("UPDATE "+LoadProperties.MySQLtablePrefix+"spawn SET world = '" + this.myspawnworld + "', x = " +getX()+", y = "+getY()+", z = "+getZ()+" WHERE user_id = "+this.userid);
|
||||
mcMMO.database.Write("UPDATE "+LoadProperties.MySQLtablePrefix+"cooldowns SET "
|
||||
+" mining = "+(superBreakerDATS)
|
||||
+", woodcutting = "+(treeFellerDATS)
|
||||
+", unarmed = "+(berserkDATS)
|
||||
+", herbalism = "+(greenTerraDATS)
|
||||
+", excavation = "+(gigaDrillBreakerDATS)
|
||||
+", swords = " +(serratedStrikesDATS)
|
||||
+", axes = "+(skullSplitterDATS)
|
||||
+" mining = " + skillsDATS.get(AbilityType.SUPER_BREAKER)
|
||||
+", woodcutting = " + skillsDATS.get(AbilityType.TREE_FELLER)
|
||||
+", unarmed = " + skillsDATS.get(AbilityType.BERSERK)
|
||||
+", herbalism = " + skillsDATS.get(AbilityType.GREEN_TERRA)
|
||||
+", excavation = " + skillsDATS.get(AbilityType.GIGA_DRILL_BREAKER)
|
||||
+", swords = " + skillsDATS.get(AbilityType.SERRATED_STRIKES)
|
||||
+", axes = " + skillsDATS.get(AbilityType.SKULL_SPLIITER)
|
||||
+", blast_mining = " + skillsDATS.get(AbilityType.BLAST_MINING)
|
||||
+" WHERE user_id = "+this.userid);
|
||||
mcMMO.database.Write("UPDATE "+LoadProperties.MySQLtablePrefix+"skills SET "
|
||||
+" taming = "+skills.get(SkillType.TAMING)
|
||||
@@ -377,15 +402,15 @@ public class PlayerProfile
|
||||
{
|
||||
//Read the line in and copy it to the output it's not the player
|
||||
//we want to edit
|
||||
if(!line.split(":")[0].equalsIgnoreCase(playername))
|
||||
if(!line.split(":")[0].equalsIgnoreCase(playerName))
|
||||
{
|
||||
writer.append(line).append("\r\n");
|
||||
|
||||
//Otherwise write the new player information
|
||||
} else {
|
||||
writer.append(playername + ":");
|
||||
writer.append(playerName + ":");
|
||||
writer.append(skills.get(SkillType.MINING) + ":");
|
||||
writer.append(myspawn + ":");
|
||||
writer.append("" + ":");
|
||||
writer.append(party+":");
|
||||
writer.append(skillsXp.get(SkillType.MINING) + ":");
|
||||
writer.append(skills.get(SkillType.WOODCUTTING) + ":");
|
||||
@@ -406,21 +431,22 @@ public class PlayerProfile
|
||||
writer.append(skillsXp.get(SkillType.SWORDS) + ":");
|
||||
writer.append(skillsXp.get(SkillType.AXES) + ":");
|
||||
writer.append(skillsXp.get(SkillType.ACROBATICS) + ":");
|
||||
writer.append(myspawnworld+":");
|
||||
writer.append(""+":");
|
||||
writer.append(skills.get(SkillType.TAMING) + ":");
|
||||
writer.append(skillsXp.get(SkillType.TAMING) + ":");
|
||||
//Need to store the DATS of abilities nao
|
||||
//Berserk, Gigadrillbreaker, Tree Feller, Green Terra, Serrated Strikes, Skull Splitter, Super Breaker
|
||||
writer.append(String.valueOf(berserkDATS)+":");
|
||||
writer.append(String.valueOf(gigaDrillBreakerDATS)+":");
|
||||
writer.append(String.valueOf(treeFellerDATS)+":");
|
||||
writer.append(String.valueOf(greenTerraDATS)+":");
|
||||
writer.append(String.valueOf(serratedStrikesDATS)+":");
|
||||
writer.append(String.valueOf(skullSplitterDATS)+":");
|
||||
writer.append(String.valueOf(superBreakerDATS)+":");
|
||||
writer.append(String.valueOf(skillsDATS.get(AbilityType.BERSERK))+":");
|
||||
writer.append(String.valueOf(skillsDATS.get(AbilityType.GIGA_DRILL_BREAKER))+":");
|
||||
writer.append(String.valueOf(skillsDATS.get(AbilityType.TREE_FELLER))+":");
|
||||
writer.append(String.valueOf(skillsDATS.get(AbilityType.GREEN_TERRA))+":");
|
||||
writer.append(String.valueOf(skillsDATS.get(AbilityType.SERRATED_STRIKES))+":");
|
||||
writer.append(String.valueOf(skillsDATS.get(AbilityType.SKULL_SPLIITER))+":");
|
||||
writer.append(String.valueOf(skillsDATS.get(AbilityType.SUPER_BREAKER))+":");
|
||||
writer.append(hud.toString()+":");
|
||||
writer.append(skills.get(SkillType.FISHING) + ":");
|
||||
writer.append(skillsXp.get(SkillType.FISHING) + ":");
|
||||
writer.append(String.valueOf(skillsDATS.get(AbilityType.BLAST_MINING)) + ":");
|
||||
writer.append("\r\n");
|
||||
}
|
||||
}
|
||||
@@ -434,6 +460,29 @@ public class PlayerProfile
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void resetAllData()
|
||||
{
|
||||
//This will reset everything to default values and then save the information to FlatFile/MySQL
|
||||
for(SkillType skillType : SkillType.values())
|
||||
{
|
||||
if(skillType == SkillType.ALL)
|
||||
continue;
|
||||
skills.put(skillType, 0);
|
||||
skillsXp.put(skillType, 0);
|
||||
}
|
||||
|
||||
for(AbilityType abilityType : AbilityType.values())
|
||||
{
|
||||
skillsDATS.put(abilityType, 0);
|
||||
}
|
||||
|
||||
//Misc stuff
|
||||
party = "";
|
||||
|
||||
save();
|
||||
}
|
||||
|
||||
public void addPlayer()
|
||||
{
|
||||
try {
|
||||
@@ -442,9 +491,9 @@ public class PlayerProfile
|
||||
BufferedWriter out = new BufferedWriter(file);
|
||||
|
||||
//Add the player to the end
|
||||
out.append(playername + ":");
|
||||
out.append(playerName + ":");
|
||||
out.append(0 + ":"); //mining
|
||||
out.append(myspawn+":");
|
||||
out.append(""+":");
|
||||
out.append(party+":");
|
||||
out.append(0+":"); //XP
|
||||
out.append(0+":"); //woodcutting
|
||||
@@ -465,7 +514,7 @@ public class PlayerProfile
|
||||
out.append(0+":"); //swordsXP
|
||||
out.append(0+":"); //axesXP
|
||||
out.append(0+":"); //acrobaticsXP
|
||||
out.append(myspawnworld+":");
|
||||
out.append(""+":");
|
||||
out.append(0+":"); //taming
|
||||
out.append(0+":"); //tamingXP
|
||||
out.append(0+":"); //DATS
|
||||
@@ -478,6 +527,7 @@ public class PlayerProfile
|
||||
out.append(LoadProperties.defaulthud.toString()+":");//HUD
|
||||
out.append(0+":"); //Fishing
|
||||
out.append(0+":"); //FishingXP
|
||||
out.append(0+":"); //Blast Mining
|
||||
|
||||
//Add more in the same format as the line above
|
||||
|
||||
@@ -491,6 +541,10 @@ public class PlayerProfile
|
||||
{
|
||||
partyhud = !partyhud;
|
||||
}
|
||||
public boolean isLoaded()
|
||||
{
|
||||
return loaded;
|
||||
}
|
||||
public boolean getPartyHUD()
|
||||
{
|
||||
return partyhud;
|
||||
@@ -577,60 +631,10 @@ public class PlayerProfile
|
||||
{
|
||||
partyChatMode = !partyChatMode;
|
||||
}
|
||||
|
||||
public void setMana(int newvalue)
|
||||
{
|
||||
mana = newvalue;
|
||||
}
|
||||
|
||||
public int getCurrentMana()
|
||||
{
|
||||
return mana;
|
||||
}
|
||||
public void setDyeChanged(Boolean bool)
|
||||
{
|
||||
dyeChanged = bool;
|
||||
}
|
||||
public boolean getDyeChanged()
|
||||
{
|
||||
return dyeChanged;
|
||||
}
|
||||
public void setBlueDyeCycle(int newvalue)
|
||||
{
|
||||
blueDyeCycle = newvalue;
|
||||
}
|
||||
public int getBlueDyeCycle()
|
||||
{
|
||||
return blueDyeCycle;
|
||||
}
|
||||
public void setBlueDyeCycleSel(int newvalue)
|
||||
{
|
||||
blueDyeCycleSel = newvalue;
|
||||
}
|
||||
public int getBlueDyeCycleSel()
|
||||
{
|
||||
return blueDyeCycleSel;
|
||||
}
|
||||
public void setGreenDyeCycle(int newvalue)
|
||||
{
|
||||
greenDyeCycle = newvalue;
|
||||
}
|
||||
public int getGreenDyeCycle()
|
||||
{
|
||||
return greenDyeCycle;
|
||||
}
|
||||
public void setGreenDyeCycleSel(int newvalue)
|
||||
{
|
||||
greenDyeCycleSel = newvalue;
|
||||
}
|
||||
public int getGreenDyeCycleSel()
|
||||
{
|
||||
return greenDyeCycleSel;
|
||||
}
|
||||
|
||||
public boolean isPlayer(String player)
|
||||
{
|
||||
return player.equals(playername);
|
||||
return player.equals(Bukkit.getPlayer(playerName));
|
||||
}
|
||||
public boolean getPartyChatOnlyToggle(){return partyChatOnly;}
|
||||
public void togglePartyChatOnly(){partyChatOnly = !partyChatOnly;}
|
||||
@@ -641,13 +645,6 @@ public class PlayerProfile
|
||||
{
|
||||
abilityuse = !abilityuse;
|
||||
}
|
||||
public long getMySpawnATS(){
|
||||
return mySpawnATS;
|
||||
}
|
||||
public void setMySpawnATS(long newvalue)
|
||||
{
|
||||
mySpawnATS = (int) (newvalue/1000);
|
||||
}
|
||||
public void decreaseBleedTicks()
|
||||
{
|
||||
bleedticks--;
|
||||
@@ -657,9 +654,17 @@ public class PlayerProfile
|
||||
}
|
||||
public void setBleedTicks(Integer newvalue){
|
||||
bleedticks = newvalue;
|
||||
|
||||
//Cap maximum ticks at 10
|
||||
if(bleedticks > 10)
|
||||
bleedticks = 10;
|
||||
}
|
||||
public void addBleedTicks(Integer newvalue){
|
||||
bleedticks+=newvalue;
|
||||
|
||||
//Cap maximum ticks at 10
|
||||
if(bleedticks > 10)
|
||||
bleedticks = 10;
|
||||
}
|
||||
/*
|
||||
* EXPLOIT PREVENTION
|
||||
@@ -673,7 +678,7 @@ public class PlayerProfile
|
||||
public boolean getHoePreparationMode(){
|
||||
return hoePreparationMode;
|
||||
}
|
||||
public void setHoePreparationMode(Boolean bool){
|
||||
public void setHoePreparationMode(boolean bool){
|
||||
hoePreparationMode = bool;
|
||||
}
|
||||
public long getHoePreparationATS(){
|
||||
@@ -689,7 +694,7 @@ public class PlayerProfile
|
||||
public boolean getSwordsPreparationMode(){
|
||||
return swordsPreparationMode;
|
||||
}
|
||||
public void setSwordsPreparationMode(Boolean bool){
|
||||
public void setSwordsPreparationMode(boolean bool){
|
||||
swordsPreparationMode = bool;
|
||||
}
|
||||
public long getSwordsPreparationATS(){
|
||||
@@ -704,7 +709,7 @@ public class PlayerProfile
|
||||
public boolean getShovelPreparationMode(){
|
||||
return shovelPreparationMode;
|
||||
}
|
||||
public void setShovelPreparationMode(Boolean bool){
|
||||
public void setShovelPreparationMode(boolean bool){
|
||||
shovelPreparationMode = bool;
|
||||
}
|
||||
public long getShovelPreparationATS(){
|
||||
@@ -719,7 +724,7 @@ public class PlayerProfile
|
||||
public boolean getFistsPreparationMode(){
|
||||
return fistsPreparationMode;
|
||||
}
|
||||
public void setFistsPreparationMode(Boolean bool){
|
||||
public void setFistsPreparationMode(boolean bool){
|
||||
fistsPreparationMode = bool;
|
||||
}
|
||||
public long getFistsPreparationATS(){
|
||||
@@ -734,7 +739,7 @@ public class PlayerProfile
|
||||
public boolean getAxePreparationMode(){
|
||||
return axePreparationMode;
|
||||
}
|
||||
public void setAxePreparationMode(Boolean bool){
|
||||
public void setAxePreparationMode(boolean bool){
|
||||
axePreparationMode = bool;
|
||||
}
|
||||
public long getAxePreparationATS(){
|
||||
@@ -749,169 +754,111 @@ public class PlayerProfile
|
||||
public boolean getPickaxePreparationMode(){
|
||||
return pickaxePreparationMode;
|
||||
}
|
||||
public void setPickaxePreparationMode(Boolean bool){
|
||||
public void setPickaxePreparationMode(boolean bool){
|
||||
pickaxePreparationMode = bool;
|
||||
}
|
||||
public long getPickaxePreparationATS(){
|
||||
return pickaxePreparationATS;
|
||||
return pickaxePreparationATS;
|
||||
}
|
||||
public void setPickaxePreparationATS(long newvalue){
|
||||
pickaxePreparationATS = (int) (newvalue/1000);
|
||||
pickaxePreparationATS = (int) (newvalue/1000);
|
||||
}
|
||||
/*
|
||||
* GREEN TERRA MODE
|
||||
*/
|
||||
public boolean getGreenTerraInformed() {return greenTerraInformed;}
|
||||
public void setGreenTerraInformed(Boolean bool){
|
||||
public void setGreenTerraInformed(boolean bool){
|
||||
greenTerraInformed = bool;
|
||||
}
|
||||
public boolean getGreenTerraMode(){
|
||||
return greenTerraMode;
|
||||
}
|
||||
public void setGreenTerraMode(Boolean bool){
|
||||
public void setGreenTerraMode(boolean bool){
|
||||
greenTerraMode = bool;
|
||||
}
|
||||
public long getGreenTerraActivatedTimeStamp() {return greenTerraATS;}
|
||||
public void setGreenTerraActivatedTimeStamp(Long newvalue){
|
||||
greenTerraATS = (int) (newvalue/1000);
|
||||
}
|
||||
public long getGreenTerraDeactivatedTimeStamp() {return greenTerraDATS;}
|
||||
public void setGreenTerraDeactivatedTimeStamp(Long newvalue){
|
||||
greenTerraDATS = (int) (newvalue/1000);
|
||||
save();
|
||||
}
|
||||
|
||||
/*
|
||||
* BERSERK MODE
|
||||
*/
|
||||
public boolean getBerserkInformed() {return berserkInformed;}
|
||||
public void setBerserkInformed(Boolean bool){
|
||||
public void setBerserkInformed(boolean bool){
|
||||
berserkInformed = bool;
|
||||
}
|
||||
public boolean getBerserkMode(){
|
||||
return berserkMode;
|
||||
}
|
||||
public void setBerserkMode(Boolean bool){
|
||||
public void setBerserkMode(boolean bool){
|
||||
berserkMode = bool;
|
||||
}
|
||||
public long getBerserkActivatedTimeStamp() {return berserkATS;}
|
||||
public void setBerserkActivatedTimeStamp(Long newvalue){
|
||||
berserkATS = (int) (newvalue/1000);
|
||||
}
|
||||
public long getBerserkDeactivatedTimeStamp() {return berserkDATS;}
|
||||
public void setBerserkDeactivatedTimeStamp(Long newvalue){
|
||||
berserkDATS = (int) (newvalue/1000);
|
||||
save();
|
||||
}
|
||||
/*
|
||||
* SKULL SPLITTER
|
||||
*/
|
||||
public boolean getSkullSplitterInformed() {return skullSplitterInformed;}
|
||||
public void setSkullSplitterInformed(Boolean bool){
|
||||
public void setSkullSplitterInformed(boolean bool){
|
||||
skullSplitterInformed = bool;
|
||||
}
|
||||
public boolean getSkullSplitterMode(){
|
||||
return skullSplitterMode;
|
||||
}
|
||||
public void setSkullSplitterMode(Boolean bool){
|
||||
public void setSkullSplitterMode(boolean bool){
|
||||
skullSplitterMode = bool;
|
||||
}
|
||||
public long getSkullSplitterActivatedTimeStamp() {return skullSplitterATS;}
|
||||
public void setSkullSplitterActivatedTimeStamp(Long newvalue){
|
||||
skullSplitterATS = (int) (newvalue/1000);
|
||||
}
|
||||
public long getSkullSplitterDeactivatedTimeStamp() {return skullSplitterDATS;}
|
||||
public void setSkullSplitterDeactivatedTimeStamp(Long newvalue){
|
||||
skullSplitterDATS = (int) (newvalue/1000);
|
||||
save();
|
||||
}
|
||||
/*
|
||||
* SERRATED STRIKES
|
||||
*/
|
||||
public boolean getSerratedStrikesInformed() {return serratedStrikesInformed;}
|
||||
public void setSerratedStrikesInformed(Boolean bool){
|
||||
public void setSerratedStrikesInformed(boolean bool){
|
||||
serratedStrikesInformed = bool;
|
||||
}
|
||||
public boolean getSerratedStrikesMode(){
|
||||
return serratedStrikesMode;
|
||||
}
|
||||
public void setSerratedStrikesMode(Boolean bool){
|
||||
public void setSerratedStrikesMode(boolean bool){
|
||||
serratedStrikesMode = bool;
|
||||
}
|
||||
public long getSerratedStrikesActivatedTimeStamp() {return serratedStrikesATS;}
|
||||
public void setSerratedStrikesActivatedTimeStamp(Long newvalue){
|
||||
serratedStrikesATS = (int) (newvalue/1000);
|
||||
}
|
||||
public long getSerratedStrikesDeactivatedTimeStamp() {return serratedStrikesDATS;}
|
||||
public void setSerratedStrikesDeactivatedTimeStamp(Long newvalue){
|
||||
serratedStrikesDATS = (int) (newvalue/1000);
|
||||
save();
|
||||
}
|
||||
/*
|
||||
* GIGA DRILL BREAKER
|
||||
*/
|
||||
public boolean getGigaDrillBreakerInformed() {return gigaDrillBreakerInformed;}
|
||||
public void setGigaDrillBreakerInformed(Boolean bool){
|
||||
public void setGigaDrillBreakerInformed(boolean bool){
|
||||
gigaDrillBreakerInformed = bool;
|
||||
}
|
||||
public boolean getGigaDrillBreakerMode(){
|
||||
return gigaDrillBreakerMode;
|
||||
}
|
||||
public void setGigaDrillBreakerMode(Boolean bool){
|
||||
public void setGigaDrillBreakerMode(boolean bool){
|
||||
gigaDrillBreakerMode = bool;
|
||||
}
|
||||
public long getGigaDrillBreakerActivatedTimeStamp() {return gigaDrillBreakerATS;}
|
||||
public void setGigaDrillBreakerActivatedTimeStamp(Long newvalue){
|
||||
gigaDrillBreakerATS = (int) (newvalue/1000);
|
||||
}
|
||||
public long getGigaDrillBreakerDeactivatedTimeStamp() {return gigaDrillBreakerDATS;}
|
||||
public void setGigaDrillBreakerDeactivatedTimeStamp(Long newvalue){
|
||||
gigaDrillBreakerDATS = (int) (newvalue/1000);
|
||||
save();
|
||||
}
|
||||
/*
|
||||
* TREE FELLER STUFF
|
||||
*/
|
||||
public boolean getTreeFellerInformed() {return treeFellerInformed;}
|
||||
public void setTreeFellerInformed(Boolean bool){
|
||||
public void setTreeFellerInformed(boolean bool){
|
||||
treeFellerInformed = bool;
|
||||
}
|
||||
public boolean getTreeFellerMode(){
|
||||
return treeFellerMode;
|
||||
}
|
||||
public void setTreeFellerMode(Boolean bool){
|
||||
public void setTreeFellerMode(boolean bool){
|
||||
treeFellerMode = bool;
|
||||
}
|
||||
public long getTreeFellerActivatedTimeStamp() {return treeFellerATS;}
|
||||
public void setTreeFellerActivatedTimeStamp(Long newvalue){
|
||||
treeFellerATS = (int) (newvalue/1000);
|
||||
}
|
||||
public long getTreeFellerDeactivatedTimeStamp() {return treeFellerDATS;}
|
||||
public void setTreeFellerDeactivatedTimeStamp(Long newvalue){
|
||||
treeFellerDATS = (int) (newvalue/1000);
|
||||
save();
|
||||
}
|
||||
/*
|
||||
* MINING
|
||||
*/
|
||||
public boolean getSuperBreakerInformed() {return superBreakerInformed;}
|
||||
public void setSuperBreakerInformed(Boolean bool){
|
||||
public void setSuperBreakerInformed(boolean bool){
|
||||
superBreakerInformed = bool;
|
||||
}
|
||||
public boolean getBlastMiningInformed() {return blastMiningInformed;}
|
||||
public void setBlastMiningInformed(boolean bool){
|
||||
blastMiningInformed = bool;
|
||||
}
|
||||
public boolean getSuperBreakerMode(){
|
||||
return superBreakerMode;
|
||||
}
|
||||
public void setSuperBreakerMode(Boolean bool){
|
||||
public void setSuperBreakerMode(boolean bool){
|
||||
superBreakerMode = bool;
|
||||
}
|
||||
public long getSuperBreakerActivatedTimeStamp() {return superBreakerATS;}
|
||||
public void setSuperBreakerActivatedTimeStamp(Long newvalue){
|
||||
superBreakerATS = (int) (newvalue/1000);
|
||||
}
|
||||
public long getSuperBreakerDeactivatedTimeStamp() {return superBreakerDATS;}
|
||||
public void setSuperBreakerDeactivatedTimeStamp(Long newvalue){
|
||||
superBreakerDATS = (int) (newvalue/1000);
|
||||
save();
|
||||
}
|
||||
public long getRecentlyHurt(){
|
||||
return recentlyHurt;
|
||||
}
|
||||
@@ -921,7 +868,6 @@ public class PlayerProfile
|
||||
public void skillUp(SkillType skillType, int newvalue)
|
||||
{
|
||||
skills.put(skillType, skills.get(skillType)+newvalue);
|
||||
save();
|
||||
}
|
||||
public Integer getSkillLevel(SkillType skillType)
|
||||
{
|
||||
@@ -935,7 +881,51 @@ public class PlayerProfile
|
||||
{
|
||||
skills.put(skillType, 0);
|
||||
}
|
||||
|
||||
public long getSkillDATS(AbilityType abilityType)
|
||||
{
|
||||
//Is this actually unused, or should it actually be returning the convertedBack variable?
|
||||
//It *is* unused, I don't think I put this here so I'm going to comment it out - nossr50
|
||||
//long convertedBack = skillsDATS.get(abilityType) * 1000;
|
||||
return skillsDATS.get(abilityType);
|
||||
}
|
||||
public void setSkillDATS(AbilityType abilityType, long value)
|
||||
{
|
||||
int wearsOff = (int) (value * .001D);
|
||||
skillsDATS.put(abilityType, wearsOff);
|
||||
}
|
||||
public void resetCooldowns()
|
||||
{
|
||||
for(AbilityType x : skillsDATS.keySet())
|
||||
{
|
||||
skillsDATS.put(x, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds XP to the player, doesn't calculate for XP Rate
|
||||
* @param skillType The skill to add XP to
|
||||
* @param newvalue The amount of XP to add
|
||||
*/
|
||||
public void addXPOverrideNoBonus(SkillType skillType, int newvalue)
|
||||
{
|
||||
if(skillType == SkillType.ALL)
|
||||
{
|
||||
for(SkillType x : SkillType.values())
|
||||
{
|
||||
if(x == SkillType.ALL)
|
||||
continue;
|
||||
Bukkit.getPluginManager().callEvent(new McMMOPlayerXpGainEvent(Bukkit.getPlayer(playerName), x, newvalue));
|
||||
skillsXp.put(x, skillsXp.get(x)+newvalue);
|
||||
}
|
||||
} else {
|
||||
int xp = newvalue;
|
||||
|
||||
Bukkit.getPluginManager().callEvent(new McMMOPlayerXpGainEvent(Bukkit.getPlayer(playerName), skillType, xp));
|
||||
skillsXp.put(skillType, skillsXp.get(skillType)+xp);
|
||||
lastgained = skillType;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds XP to the player, this ignores skill modifiers
|
||||
* @param skillType The skill to add XP to
|
||||
@@ -949,18 +939,21 @@ public class PlayerProfile
|
||||
{
|
||||
if(x == SkillType.ALL)
|
||||
continue;
|
||||
Bukkit.getPluginManager().callEvent(new McMMOPlayerXpGainEvent(Bukkit.getPlayer(playerName), x, newvalue));
|
||||
skillsXp.put(x, skillsXp.get(x)+newvalue);
|
||||
}
|
||||
} else {
|
||||
int xp = newvalue;
|
||||
|
||||
xp=xp*LoadProperties.xpGainMultiplier;
|
||||
Bukkit.getPluginManager().callEvent(new McMMOPlayerXpGainEvent(Bukkit.getPlayer(playerName), skillType, xp));
|
||||
skillsXp.put(skillType, skillsXp.get(skillType)+xp);
|
||||
lastgained = skillType;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds XP to the player, this is affected by skill modifiers
|
||||
* Adds XP to the player, this is affected by skill modifiers and xp rate
|
||||
* @param skillType The skill to add XP to
|
||||
* @param newvalue The amount of XP to add
|
||||
*/
|
||||
@@ -973,7 +966,7 @@ public class PlayerProfile
|
||||
xpGainATS = (int) (System.currentTimeMillis()/1000);
|
||||
|
||||
double bonusModifier = 0;
|
||||
String leaderName = "";
|
||||
//String leaderName = "";
|
||||
|
||||
if(inParty())
|
||||
{
|
||||
@@ -981,8 +974,8 @@ public class PlayerProfile
|
||||
{
|
||||
if(x.isOnline() && !x.getName().equals(thisplayer.getName()) && Party.getInstance().isPartyLeader(x.getName(), this.getParty()))
|
||||
{
|
||||
leaderName = x.getName();
|
||||
if(m.getDistance(thisplayer.getLocation(), x.getLocation()) < 25)
|
||||
//leaderName = x.getName();
|
||||
if(m.isNear(thisplayer.getLocation(), x.getLocation(), 25))
|
||||
{
|
||||
PlayerProfile PartyLeader = Users.getProfile(x);
|
||||
if(PartyLeader.getSkillLevel(skillType) >= this.getSkillLevel(skillType))
|
||||
@@ -1001,6 +994,7 @@ public class PlayerProfile
|
||||
{
|
||||
if(x == SkillType.ALL)
|
||||
continue;
|
||||
Bukkit.getPluginManager().callEvent(new McMMOPlayerXpGainEvent(Bukkit.getPlayer(playerName), x, newvalue));
|
||||
skillsXp.put(x, skillsXp.get(x)+newvalue);
|
||||
}
|
||||
} else {
|
||||
@@ -1041,6 +1035,9 @@ public class PlayerProfile
|
||||
case AXES:
|
||||
xp=(int) (xp/LoadProperties.axesxpmodifier);
|
||||
break;
|
||||
case FISHING:
|
||||
xp=(int) (xp/LoadProperties.fishingxpmodifier);
|
||||
break;
|
||||
}
|
||||
xp=xp*LoadProperties.xpGainMultiplier;
|
||||
|
||||
@@ -1050,15 +1047,15 @@ public class PlayerProfile
|
||||
bonusModifier = 2;
|
||||
|
||||
double trueBonus = bonusModifier * xp;
|
||||
double oldxp = xp;
|
||||
//double oldxp = xp;
|
||||
xp+=trueBonus;
|
||||
double percent = (trueBonus/oldxp)*100;
|
||||
thisplayer.sendMessage(ChatColor.GREEN+"XP: "+oldxp+" Bonus XP: "+trueBonus+" Total: "+xp+ChatColor.GOLD+" [Master: "+leaderName+" " +" +"+(int)percent+"%]");
|
||||
//double percent = (trueBonus/oldxp)*100;
|
||||
//thisplayer.sendMessage(ChatColor.GREEN+"XP: "+oldxp+" Bonus XP: "+trueBonus+" Total: "+xp+ChatColor.GOLD+" [Master: "+leaderName+" " +" +"+(int)percent+"%]");
|
||||
}
|
||||
Bukkit.getPluginManager().callEvent(new McMMOPlayerXpGainEvent(Bukkit.getPlayer(playerName), skillType, xp));
|
||||
skillsXp.put(skillType, skillsXp.get(skillType)+xp);
|
||||
lastgained = skillType;
|
||||
}
|
||||
//save();
|
||||
}
|
||||
|
||||
public void removeXP(SkillType skillType, int newvalue)
|
||||
@@ -1080,7 +1077,6 @@ public class PlayerProfile
|
||||
} else {
|
||||
skillsXp.put(skillType, skillsXp.get(skillType)-newvalue);
|
||||
}
|
||||
//save();
|
||||
}
|
||||
public void acceptInvite()
|
||||
{
|
||||
@@ -1124,10 +1120,45 @@ public class PlayerProfile
|
||||
skillsXp.put(SkillType.FISHING, 0);
|
||||
} else {
|
||||
skills.put(skillType, newvalue);
|
||||
skillsXp.put(skillType, newvalue);
|
||||
skillsXp.put(skillType, 0);
|
||||
}
|
||||
save();
|
||||
}
|
||||
|
||||
public void addLevels(SkillType skillType, int levels)
|
||||
{
|
||||
if(skillType == SkillType.ALL)
|
||||
{
|
||||
skills.put(SkillType.TAMING, skills.get(SkillType.TAMING)+levels);
|
||||
skills.put(SkillType.MINING, skills.get(SkillType.MINING)+levels);
|
||||
skills.put(SkillType.WOODCUTTING, skills.get(SkillType.WOODCUTTING)+levels);
|
||||
skills.put(SkillType.REPAIR, skills.get(SkillType.REPAIR)+levels);
|
||||
skills.put(SkillType.HERBALISM, skills.get(SkillType.HERBALISM)+levels);
|
||||
skills.put(SkillType.ACROBATICS, skills.get(SkillType.ACROBATICS)+levels);
|
||||
skills.put(SkillType.SWORDS, skills.get(SkillType.SWORDS)+levels);
|
||||
skills.put(SkillType.ARCHERY, skills.get(SkillType.ARCHERY)+levels);
|
||||
skills.put(SkillType.UNARMED, skills.get(SkillType.UNARMED)+levels);
|
||||
skills.put(SkillType.EXCAVATION, skills.get(SkillType.EXCAVATION)+levels);
|
||||
skills.put(SkillType.AXES, skills.get(SkillType.AXES)+levels);
|
||||
skills.put(SkillType.FISHING, skills.get(SkillType.FISHING)+levels);
|
||||
|
||||
skillsXp.put(SkillType.TAMING, 0);
|
||||
skillsXp.put(SkillType.MINING, 0);
|
||||
skillsXp.put(SkillType.WOODCUTTING, 0);
|
||||
skillsXp.put(SkillType.REPAIR, 0);
|
||||
skillsXp.put(SkillType.HERBALISM, 0);
|
||||
skillsXp.put(SkillType.ACROBATICS, 0);
|
||||
skillsXp.put(SkillType.SWORDS, 0);
|
||||
skillsXp.put(SkillType.ARCHERY, 0);
|
||||
skillsXp.put(SkillType.UNARMED, 0);
|
||||
skillsXp.put(SkillType.EXCAVATION, 0);
|
||||
skillsXp.put(SkillType.AXES, 0);
|
||||
skillsXp.put(SkillType.FISHING, 0);
|
||||
} else {
|
||||
skills.put(skillType, skills.get(skillType)+levels);
|
||||
skillsXp.put(skillType, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public Integer getXpToLevel(SkillType skillType)
|
||||
{
|
||||
return (int) ((1020+(skills.get(skillType) * 20)));
|
||||
@@ -1137,14 +1168,12 @@ public class PlayerProfile
|
||||
public void setParty(String newParty)
|
||||
{
|
||||
party = newParty;
|
||||
save();
|
||||
}
|
||||
//Retrieve the player's party
|
||||
public String getParty() {return party;}
|
||||
//Remove party
|
||||
public void removeParty() {
|
||||
party = null;
|
||||
save();
|
||||
}
|
||||
//Retrieve whether or not the player is in a party
|
||||
public boolean inParty()
|
||||
@@ -1164,73 +1193,13 @@ public class PlayerProfile
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public String getMySpawnWorld()
|
||||
{
|
||||
if(myspawnworld != null && !myspawnworld.equals("") && !myspawnworld.equals("null")){
|
||||
return myspawnworld;
|
||||
} else {
|
||||
return Bukkit.getServer().getWorlds().get(0).toString();
|
||||
}
|
||||
}
|
||||
//Save a users spawn location
|
||||
public void setMySpawn(double x, double y, double z, String myspawnworldlocation){
|
||||
myspawn = x+","+y+","+z;
|
||||
myspawnworld = myspawnworldlocation;
|
||||
save();
|
||||
}
|
||||
public String getX(){
|
||||
if(myspawn != null)
|
||||
{
|
||||
String[] split = myspawn.split(",");
|
||||
return split[0];
|
||||
}
|
||||
else
|
||||
return null;
|
||||
}
|
||||
public String getY(){
|
||||
if(myspawn != null)
|
||||
{
|
||||
String[] split = myspawn.split(",");
|
||||
return split[1];
|
||||
}
|
||||
else
|
||||
return null;
|
||||
}
|
||||
public String getZ(){
|
||||
if(myspawn != null)
|
||||
{
|
||||
String[] split = myspawn.split(",");
|
||||
return split[2];
|
||||
}
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isDead(){
|
||||
return dead;
|
||||
}
|
||||
public Location getMySpawn(Player player)
|
||||
|
||||
public String getPlayerName()
|
||||
{
|
||||
Location loc = null;
|
||||
if(myspawn != null)
|
||||
{
|
||||
if(m.isDouble(getX()) && m.isDouble(getY()) && m.isDouble(getZ()))
|
||||
loc = new Location(player.getWorld(),(Double.parseDouble(getX())), Double.parseDouble(getY()), Double.parseDouble(getZ()));
|
||||
else
|
||||
return null;
|
||||
} else
|
||||
return null;
|
||||
|
||||
loc.setYaw(0);
|
||||
loc.setPitch(0);
|
||||
if(loc.getX() != 0 && loc.getY() != 0 && loc.getZ() != 0 && loc.getWorld() != null)
|
||||
{
|
||||
if(Bukkit.getServer().getWorld(this.getMySpawnWorld()) != null)
|
||||
loc.setWorld(Bukkit.getServer().getWorld(this.getMySpawnWorld()));
|
||||
else
|
||||
loc.setWorld(Bukkit.getServer().getWorlds().get(0));
|
||||
return loc;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
return playerName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,21 +16,97 @@
|
||||
*/
|
||||
package com.gmail.nossr50.datatypes;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
|
||||
public enum SkillType
|
||||
{
|
||||
ACROBATICS,
|
||||
ALCHEMY,
|
||||
ACROBATICS(LoadProperties.levelCapAcrobatics),
|
||||
ALL, //This one is just for convenience
|
||||
ARCHERY,
|
||||
AXES,
|
||||
EXCAVATION,
|
||||
ENCHANTING,
|
||||
FISHING,
|
||||
HERBALISM,
|
||||
MINING,
|
||||
REPAIR,
|
||||
SWORDS,
|
||||
TAMING,
|
||||
UNARMED,
|
||||
WOODCUTTING;
|
||||
ARCHERY(LoadProperties.levelCapArchery),
|
||||
AXES(AbilityType.SKULL_SPLIITER, LoadProperties.levelCapAxes, ToolType.AXE),
|
||||
EXCAVATION(AbilityType.GIGA_DRILL_BREAKER, LoadProperties.levelCapExcavation, ToolType.SHOVEL),
|
||||
FISHING(LoadProperties.levelCapFishing),
|
||||
HERBALISM(AbilityType.GREEN_TERRA, LoadProperties.levelCapHerbalism, ToolType.HOE),
|
||||
MINING(AbilityType.SUPER_BREAKER, LoadProperties.levelCapMining, ToolType.PICKAXE),
|
||||
REPAIR(LoadProperties.levelCapRepair),
|
||||
SWORDS(AbilityType.SERRATED_STRIKES, LoadProperties.levelCapSwords, ToolType.SWORD),
|
||||
TAMING(LoadProperties.levelCapTaming),
|
||||
UNARMED(AbilityType.BERSERK, LoadProperties.levelCapUnarmed, ToolType.FISTS),
|
||||
WOODCUTTING(AbilityType.TREE_FELLER, LoadProperties.levelCapWoodcutting, ToolType.AXE);
|
||||
|
||||
private AbilityType ability;
|
||||
private int maxLevel;
|
||||
private ToolType tool;
|
||||
|
||||
private SkillType()
|
||||
{
|
||||
this.ability = null;
|
||||
this.maxLevel = 0;
|
||||
this.tool = null;
|
||||
}
|
||||
|
||||
private SkillType(AbilityType ability, int maxLevel, ToolType tool)
|
||||
{
|
||||
this.ability = ability;
|
||||
this.maxLevel = maxLevel;
|
||||
this.tool = tool;
|
||||
}
|
||||
|
||||
private SkillType(int maxLevel)
|
||||
{
|
||||
this(null, maxLevel, null);
|
||||
}
|
||||
|
||||
public AbilityType getAbility()
|
||||
{
|
||||
return this.ability;
|
||||
}
|
||||
|
||||
public int getMaxLevel()
|
||||
{
|
||||
if(maxLevel > 0)
|
||||
return maxLevel;
|
||||
else
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
|
||||
public ToolType getTool()
|
||||
{
|
||||
return this.tool;
|
||||
}
|
||||
|
||||
public boolean getPermissions(Player player)
|
||||
{
|
||||
switch(this)
|
||||
{
|
||||
case ACROBATICS:
|
||||
return mcPermissions.getInstance().acrobatics(player);
|
||||
case ARCHERY:
|
||||
return mcPermissions.getInstance().archery(player);
|
||||
case AXES:
|
||||
return mcPermissions.getInstance().axes(player);
|
||||
case EXCAVATION:
|
||||
return mcPermissions.getInstance().excavation(player);
|
||||
case FISHING:
|
||||
return mcPermissions.getInstance().fishing(player);
|
||||
case HERBALISM:
|
||||
return mcPermissions.getInstance().herbalism(player);
|
||||
case MINING:
|
||||
return mcPermissions.getInstance().mining(player);
|
||||
case REPAIR:
|
||||
return mcPermissions.getInstance().repair(player);
|
||||
case SWORDS:
|
||||
return mcPermissions.getInstance().swords(player);
|
||||
case TAMING:
|
||||
return mcPermissions.getInstance().taming(player);
|
||||
case UNARMED:
|
||||
return mcPermissions.getInstance().unarmed(player);
|
||||
case WOODCUTTING:
|
||||
return mcPermissions.getInstance().woodcutting(player);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
147
src/main/java/com/gmail/nossr50/datatypes/ToolType.java
Normal file
147
src/main/java/com/gmail/nossr50/datatypes/ToolType.java
Normal file
@@ -0,0 +1,147 @@
|
||||
package com.gmail.nossr50.datatypes;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
|
||||
public enum ToolType
|
||||
{
|
||||
AXE(mcLocale.getString("Skills.LowerAxe"), mcLocale.getString("Skills.ReadyAxe")),
|
||||
FISTS(mcLocale.getString("Skills.LowerFists"), mcLocale.getString("Skills.ReadyFists")),
|
||||
HOE(mcLocale.getString("Skills.LowerHoe"), mcLocale.getString("Skills.ReadyHoe")),
|
||||
PICKAXE(mcLocale.getString("Skills.LowerPickAxe"), mcLocale.getString("Skills.ReadyPickAxe")),
|
||||
SHOVEL(mcLocale.getString("Skills.LowerShovel"), mcLocale.getString("Skills.ReadyShovel")),
|
||||
SWORD(mcLocale.getString("Skills.LowerSword"), mcLocale.getString("Skills.ReadySword"));
|
||||
|
||||
private String lowerTool;
|
||||
private String raiseTool;
|
||||
|
||||
private ToolType(String lowerTool, String raiseTool)
|
||||
{
|
||||
this.lowerTool = lowerTool;
|
||||
this.raiseTool = raiseTool;
|
||||
}
|
||||
|
||||
public String getLowerTool()
|
||||
{
|
||||
return this.lowerTool;
|
||||
}
|
||||
|
||||
public String getRaiseTool()
|
||||
{
|
||||
return this.raiseTool;
|
||||
}
|
||||
|
||||
public boolean getToolMode(PlayerProfile PP)
|
||||
{
|
||||
switch(this)
|
||||
{
|
||||
case AXE:
|
||||
return PP.getAxePreparationMode();
|
||||
case FISTS:
|
||||
return PP.getFistsPreparationMode();
|
||||
case HOE:
|
||||
return PP.getHoePreparationMode();
|
||||
case PICKAXE:
|
||||
return PP.getPickaxePreparationMode();
|
||||
case SHOVEL:
|
||||
return PP.getShovelPreparationMode();
|
||||
case SWORD:
|
||||
return PP.getSwordsPreparationMode();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setToolMode(PlayerProfile PP, boolean bool)
|
||||
{
|
||||
switch(this)
|
||||
{
|
||||
case AXE:
|
||||
PP.setAxePreparationMode(bool);
|
||||
break;
|
||||
case FISTS:
|
||||
PP.setFistsPreparationMode(bool);
|
||||
break;
|
||||
case HOE:
|
||||
PP.setHoePreparationMode(bool);
|
||||
break;
|
||||
case PICKAXE:
|
||||
PP.setPickaxePreparationMode(bool);
|
||||
break;
|
||||
case SHOVEL:
|
||||
PP.setShovelPreparationMode(bool);
|
||||
break;
|
||||
case SWORD:
|
||||
PP.setSwordsPreparationMode(bool);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public long getToolATS(PlayerProfile PP)
|
||||
{
|
||||
switch(this)
|
||||
{
|
||||
case AXE:
|
||||
return PP.getAxePreparationATS();
|
||||
case FISTS:
|
||||
return PP.getFistsPreparationATS();
|
||||
case HOE:
|
||||
return PP.getHoePreparationATS();
|
||||
case PICKAXE:
|
||||
return PP.getPickaxePreparationATS();
|
||||
case SHOVEL:
|
||||
return PP.getShovelPreparationATS();
|
||||
case SWORD:
|
||||
return PP.getSwordsPreparationATS();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void setToolATS(PlayerProfile PP, long ats)
|
||||
{
|
||||
switch(this)
|
||||
{
|
||||
case AXE:
|
||||
PP.setAxePreparationATS(ats);
|
||||
break;
|
||||
case FISTS:
|
||||
PP.setFistsPreparationATS(ats);
|
||||
break;
|
||||
case HOE:
|
||||
PP.setHoePreparationATS(ats);
|
||||
break;
|
||||
case PICKAXE:
|
||||
PP.setPickaxePreparationATS(ats);
|
||||
break;
|
||||
case SHOVEL:
|
||||
PP.setShovelPreparationATS(ats);
|
||||
break;
|
||||
case SWORD:
|
||||
PP.setSwordsPreparationATS(ats);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean inHand(ItemStack is)
|
||||
{
|
||||
switch(this)
|
||||
{
|
||||
case AXE:
|
||||
return m.isAxes(is);
|
||||
case FISTS:
|
||||
return is.getType().equals(Material.AIR);
|
||||
case HOE:
|
||||
return m.isHoe(is);
|
||||
case PICKAXE:
|
||||
return m.isMiningPick(is);
|
||||
case SHOVEL:
|
||||
return m.isShovel(is);
|
||||
case SWORD:
|
||||
return m.isSwords(is);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
package com.gmail.nossr50.datatypes.treasure;
|
||||
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class ExcavationTreasure extends Treasure {
|
||||
// dirt grass sand gravel clay mycel soulsand
|
||||
// 00000001 - dirt 1
|
||||
// 00000010 - grass 2
|
||||
// 00000100 - sand 4
|
||||
// 00001000 - gravel 8
|
||||
// 00010000 - clay 16
|
||||
// 00100000 - mycel 32
|
||||
// 01000000 - soulsand 64
|
||||
private byte dropsFrom = 0x0;
|
||||
|
||||
public ExcavationTreasure(ItemStack drop, int xp, Double dropChance, int dropLevel) {
|
||||
super(drop, xp, dropChance, dropLevel);
|
||||
}
|
||||
|
||||
// Raw getters and setters
|
||||
public byte getDropsFrom() {
|
||||
return dropsFrom;
|
||||
}
|
||||
|
||||
public void setDropsFrom(byte dropsFrom) {
|
||||
this.dropsFrom = dropsFrom;
|
||||
}
|
||||
|
||||
// Getters
|
||||
public boolean getDropsFromDirt() {
|
||||
return getDropFromMask(1);
|
||||
}
|
||||
|
||||
public boolean getDropsFromGrass() {
|
||||
return getDropFromMask(2);
|
||||
}
|
||||
|
||||
public boolean getDropsFromSand() {
|
||||
return getDropFromMask(4);
|
||||
}
|
||||
|
||||
public boolean getDropsFromGravel() {
|
||||
return getDropFromMask(8);
|
||||
}
|
||||
|
||||
public boolean getDropsFromClay() {
|
||||
return getDropFromMask(16);
|
||||
}
|
||||
|
||||
public boolean getDropsFromMycel() {
|
||||
return getDropFromMask(32);
|
||||
}
|
||||
|
||||
public boolean getDropsFromSoulSand() {
|
||||
return getDropFromMask(64);
|
||||
}
|
||||
|
||||
private boolean getDropFromMask(int mask) {
|
||||
return ((dropsFrom & mask) > 0) ? true : false;
|
||||
}
|
||||
|
||||
// Setters
|
||||
public void setDropsFromDirt() {
|
||||
setDropFromMask(1);
|
||||
}
|
||||
|
||||
public void setDropsFromGrass() {
|
||||
setDropFromMask(2);
|
||||
}
|
||||
|
||||
public void setDropsFromSand() {
|
||||
setDropFromMask(4);
|
||||
}
|
||||
|
||||
public void setDropsFromGravel() {
|
||||
setDropFromMask(8);
|
||||
}
|
||||
|
||||
public void setDropsFromClay() {
|
||||
setDropFromMask(16);
|
||||
}
|
||||
|
||||
public void setDropsFromMycel() {
|
||||
setDropFromMask(32);
|
||||
}
|
||||
|
||||
public void setDropsFromSoulSand() {
|
||||
setDropFromMask(64);
|
||||
}
|
||||
|
||||
private void setDropFromMask(int mask) {
|
||||
dropsFrom |= mask;
|
||||
}
|
||||
|
||||
// Un-setters
|
||||
public void unsetDropsFromDirt() {
|
||||
unsetDropFromMask(1);
|
||||
}
|
||||
|
||||
public void unsetDropsFromGrass() {
|
||||
unsetDropFromMask(2);
|
||||
}
|
||||
|
||||
public void unsetDropsFromSand() {
|
||||
unsetDropFromMask(4);
|
||||
}
|
||||
|
||||
public void unsetDropsFromGravel() {
|
||||
unsetDropFromMask(8);
|
||||
}
|
||||
|
||||
public void unsetDropsFromClay() {
|
||||
unsetDropFromMask(16);
|
||||
}
|
||||
|
||||
public void unsetDropsFromMycel() {
|
||||
unsetDropFromMask(32);
|
||||
}
|
||||
|
||||
public void unsetDropsFromSoulSand() {
|
||||
unsetDropFromMask(64);
|
||||
}
|
||||
|
||||
private void unsetDropFromMask(int mask) {
|
||||
dropsFrom &= ~mask;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.gmail.nossr50.datatypes.treasure;
|
||||
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class FishingTreasure extends Treasure {
|
||||
private int maxLevel;
|
||||
|
||||
public FishingTreasure(ItemStack drop, int xp, Double dropChance, int dropLevel, int maxLevel) {
|
||||
super(drop, xp, dropChance, dropLevel);
|
||||
this.setMaxLevel(maxLevel);
|
||||
}
|
||||
|
||||
public int getMaxLevel() {
|
||||
return maxLevel;
|
||||
}
|
||||
|
||||
public void setMaxLevel(int maxLevel) {
|
||||
this.maxLevel = maxLevel;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.gmail.nossr50.datatypes.treasure;
|
||||
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public abstract class Treasure {
|
||||
private int xp;
|
||||
private Double dropChance;
|
||||
private int dropLevel;
|
||||
|
||||
private ItemStack drop;
|
||||
|
||||
public Treasure(ItemStack drop, int xp, Double dropChance, int dropLevel) {
|
||||
this.drop = drop;
|
||||
this.xp = xp;
|
||||
this.dropChance = dropChance;
|
||||
this.dropLevel = dropLevel;
|
||||
}
|
||||
|
||||
public ItemStack getDrop() {
|
||||
return drop;
|
||||
}
|
||||
|
||||
public void setDrop(ItemStack drop) {
|
||||
this.drop = drop;
|
||||
}
|
||||
|
||||
public int getXp() {
|
||||
return xp;
|
||||
}
|
||||
|
||||
public void setXp(int xp) {
|
||||
this.xp = xp;
|
||||
}
|
||||
|
||||
public Double getDropChance() {
|
||||
return dropChance;
|
||||
}
|
||||
|
||||
public void setDropChance(Double dropChance) {
|
||||
this.dropChance = dropChance;
|
||||
}
|
||||
|
||||
public int getDropLevel() {
|
||||
return dropLevel;
|
||||
}
|
||||
|
||||
public void setDropLevel(int dropLevel) {
|
||||
this.dropLevel = dropLevel;
|
||||
}
|
||||
}
|
||||
@@ -1,29 +1,28 @@
|
||||
/*
|
||||
This file is part of mcMMO.
|
||||
|
||||
mcMMO 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.
|
||||
|
||||
mcMMO 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 mcMMO. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.gmail.nossr50.datatypes;
|
||||
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
|
||||
public class FakeBlockBreakEvent extends BlockBreakEvent {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public FakeBlockBreakEvent(Block theBlock, Player player) {
|
||||
super(theBlock, player);
|
||||
}
|
||||
/*
|
||||
This file is part of mcMMO.
|
||||
|
||||
mcMMO 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.
|
||||
|
||||
mcMMO 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 mcMMO. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.gmail.nossr50.events;
|
||||
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
|
||||
public class FakeBlockBreakEvent extends BlockBreakEvent {
|
||||
|
||||
public FakeBlockBreakEvent(Block theBlock, Player player) {
|
||||
super(theBlock, player);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.gmail.nossr50.events;
|
||||
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
|
||||
public class FakeEntityDamageByEntityEvent extends EntityDamageByEntityEvent {
|
||||
public FakeEntityDamageByEntityEvent(Entity damager, Entity damagee, DamageCause cause, int damage) {
|
||||
super(damager, damagee, cause, damage);
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,6 @@ import org.bukkit.inventory.ItemStack;
|
||||
/**
|
||||
* Called when mcMMO is preparing to drop an item
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class McMMOItemSpawnEvent extends Event implements Cancellable {
|
||||
private Location location;
|
||||
private ItemStack itemStack;
|
||||
|
||||
@@ -25,7 +25,6 @@ import com.gmail.nossr50.datatypes.SkillType;
|
||||
/**
|
||||
* Called when a user levels up in a skill
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class McMMOPlayerLevelUpEvent extends Event {
|
||||
private Player player;
|
||||
private SkillType skill;
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
This file is part of mcMMO.
|
||||
|
||||
mcMMO 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.
|
||||
|
||||
mcMMO 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 mcMMO. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.gmail.nossr50.events;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
|
||||
public class McMMOPlayerXpGainEvent extends Event {
|
||||
private Player player;
|
||||
private SkillType skill;
|
||||
private int xpGained;
|
||||
|
||||
public McMMOPlayerXpGainEvent(Player player, SkillType skill, int xpGained) {
|
||||
this.player = player;
|
||||
this.skill = skill;
|
||||
this.xpGained = xpGained;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Player gaining experience (can be null)
|
||||
*/
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return SkillType that is gaining experience
|
||||
*/
|
||||
public SkillType getSkill() {
|
||||
return skill;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The number experience gained in this event
|
||||
*/
|
||||
public int getXpGained() {
|
||||
return xpGained;
|
||||
}
|
||||
|
||||
/** Rest of file is required boilerplate for custom events **/
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
||||
@@ -25,10 +25,9 @@ import com.gmail.nossr50.spout.SpoutStuff;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Statistic;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
@@ -37,17 +36,15 @@ import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.block.BlockDamageEvent;
|
||||
import org.bukkit.event.block.BlockFromToEvent;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.event.player.PlayerAnimationEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import org.getspout.spoutapi.SpoutManager;
|
||||
import org.getspout.spoutapi.player.SpoutPlayer;
|
||||
import org.getspout.spoutapi.sound.SoundEffect;
|
||||
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.skills.*;
|
||||
import com.gmail.nossr50.datatypes.FakeBlockBreakEvent;
|
||||
|
||||
import net.minecraft.server.Enchantment;
|
||||
import com.gmail.nossr50.events.FakeBlockBreakEvent;
|
||||
|
||||
public class mcBlockListener implements Listener
|
||||
{
|
||||
@@ -58,212 +55,147 @@ public class mcBlockListener implements Listener
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onBlockPlace(BlockPlaceEvent event)
|
||||
{
|
||||
if(event.isCancelled()) return;
|
||||
|
||||
//Setup some basic vars
|
||||
{
|
||||
//Setup some basic variables
|
||||
Block block;
|
||||
Player player = event.getPlayer();
|
||||
|
||||
//When blocks are placed on snow this event reports the wrong block.
|
||||
if (event.getBlockReplacedState() != null && event.getBlockReplacedState().getTypeId() == 78)
|
||||
{
|
||||
block = event.getBlockAgainst();
|
||||
}
|
||||
else
|
||||
{
|
||||
block = event.getBlock();
|
||||
}
|
||||
|
||||
int id = block.getTypeId();
|
||||
Material mat = block.getType();
|
||||
|
||||
//TNT placement checks - needed for Blast Mining
|
||||
if(id == 46 && mcPermissions.getInstance().blastMining(player))
|
||||
plugin.misc.tntTracker.put(block.getLocation(), player);
|
||||
|
||||
//Check if the blocks placed should be monitored so they do not give out XP in the future
|
||||
if(m.shouldBeWatched(block))
|
||||
{
|
||||
int id = block.getTypeId();
|
||||
|
||||
if(m.shouldBeWatched(mat))
|
||||
{
|
||||
//Only needed for blocks that use their block data (wood, pumpkins, etc.)
|
||||
if (id == 17 || id == 73 || id == 74 || id == 81 || id == 83 || id == 86 || id == 91 || id == 106 || id == 98)
|
||||
boolean shouldBeChanged = true;
|
||||
|
||||
switch(mat)
|
||||
{
|
||||
case CACTUS:
|
||||
case GLOWING_REDSTONE_ORE:
|
||||
case JACK_O_LANTERN:
|
||||
case LOG:
|
||||
case PUMPKIN:
|
||||
case REDSTONE_ORE:
|
||||
case SUGAR_CANE_BLOCK:
|
||||
case VINE:
|
||||
shouldBeChanged = false; //We don't want these added to changeQueue
|
||||
plugin.misc.blockWatchList.add(block);
|
||||
else {
|
||||
//block.setData((byte) 5); //Change the byte
|
||||
//The following is a method to get around a breakage in 1.1-R2 and onward
|
||||
//it should be removed as soon as functionality to change a block
|
||||
//in this event returns.
|
||||
plugin.changeQueue.push(block);
|
||||
break;
|
||||
case BROWN_MUSHROOM:
|
||||
case RED_MUSHROOM:
|
||||
case RED_ROSE:
|
||||
case YELLOW_FLOWER:
|
||||
case WATER_LILY:
|
||||
plugin.fastChangeQueue.push(block);
|
||||
break;
|
||||
}
|
||||
|
||||
if(shouldBeChanged)
|
||||
plugin.changeQueue.push(block);
|
||||
}
|
||||
|
||||
if(block.getTypeId() == LoadProperties.anvilID && LoadProperties.anvilmessages)
|
||||
if(id == LoadProperties.anvilID && LoadProperties.anvilmessages)
|
||||
{
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
if(LoadProperties.spoutEnabled)
|
||||
if(!PP.getPlacedAnvil())
|
||||
{
|
||||
SpoutPlayer sPlayer = SpoutManager.getPlayer(player);
|
||||
if(sPlayer.isSpoutCraftEnabled())
|
||||
{
|
||||
if(!PP.getPlacedAnvil())
|
||||
{
|
||||
sPlayer.sendNotification("[mcMMO] Anvil Placed", "Right click to repair!", Material.IRON_BLOCK);
|
||||
PP.togglePlacedAnvil();
|
||||
}
|
||||
if(LoadProperties.spoutEnabled)
|
||||
{
|
||||
SpoutPlayer sPlayer = SpoutManager.getPlayer(player);
|
||||
if(sPlayer.isSpoutCraftEnabled())
|
||||
sPlayer.sendNotification("[mcMMO] Anvil Placed", "Right click to repair!", Material.IRON_BLOCK);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!PP.getPlacedAnvil())
|
||||
{
|
||||
event.getPlayer().sendMessage(mcLocale.getString("mcBlockListener.PlacedAnvil")); //$NON-NLS-1$
|
||||
PP.togglePlacedAnvil();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!PP.getPlacedAnvil())
|
||||
{
|
||||
event.getPlayer().sendMessage(mcLocale.getString("mcBlockListener.PlacedAnvil")); //$NON-NLS-1$
|
||||
PP.togglePlacedAnvil();
|
||||
}
|
||||
event.getPlayer().sendMessage(mcLocale.getString("mcBlockListener.PlacedAnvil")); //$NON-NLS-1$
|
||||
|
||||
PP.togglePlacedAnvil();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onBlockBreak(BlockBreakEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
Block block = event.getBlock();
|
||||
int id = block.getTypeId();
|
||||
ItemStack inhand = player.getItemInHand();
|
||||
if(event.isCancelled())
|
||||
return;
|
||||
if (event instanceof FakeBlockBreakEvent)
|
||||
|
||||
if(event instanceof FakeBlockBreakEvent)
|
||||
return;
|
||||
|
||||
/*
|
||||
* HERBALISM
|
||||
*/
|
||||
/*
|
||||
* HERBALISM
|
||||
*/
|
||||
|
||||
//Green Terra
|
||||
if(PP.getHoePreparationMode() && mcPermissions.getInstance().herbalismAbility(player) && block.getTypeId() == 59 && block.getData() == (byte) 0x07)
|
||||
{
|
||||
Herbalism.greenTerraCheck(player, block);
|
||||
}
|
||||
if(PP.getHoePreparationMode() && mcPermissions.getInstance().herbalismAbility(player) && ((id == 59 && block.getData() == (byte) 0x07) || Herbalism.canBeGreenTerra(block)))
|
||||
Skills.abilityCheck(player, SkillType.HERBALISM);
|
||||
|
||||
//Wheat && Triple drops
|
||||
if(PP.getGreenTerraMode() && Herbalism.canBeGreenTerra(block))
|
||||
{
|
||||
Herbalism.herbalismProcCheck(block, player, event, plugin);
|
||||
Herbalism.greenTerraWheat(player, block, event, plugin);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(mcPermissions.getInstance().herbalism(player) && block.getData() != (byte) 5)
|
||||
Herbalism.herbalismProcCheck(block, player, event, plugin);
|
||||
|
||||
/*
|
||||
* MINING
|
||||
*/
|
||||
|
||||
//TNT removal checks - needed for Blast Mining
|
||||
if(id == 46 && plugin.misc.tntTracker.containsKey(block.getLocation()))
|
||||
plugin.misc.tntTracker.remove(block.getLocation());
|
||||
|
||||
if(mcPermissions.getInstance().mining(player))
|
||||
{
|
||||
if(LoadProperties.miningrequirespickaxe)
|
||||
{
|
||||
if(m.isMiningPick(inhand))
|
||||
{
|
||||
Mining.miningBlockCheck(player, block, plugin);
|
||||
}
|
||||
} else
|
||||
{
|
||||
if(LoadProperties.miningrequirespickaxe && m.isMiningPick(inhand))
|
||||
Mining.miningBlockCheck(player, block, plugin);
|
||||
else if(!LoadProperties.miningrequirespickaxe)
|
||||
Mining.miningBlockCheck(player, block, plugin);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* WOOD CUTTING
|
||||
*/
|
||||
|
||||
if(mcPermissions.getInstance().woodcutting(player))
|
||||
if(mcPermissions.getInstance().woodcutting(player) && id == 17)
|
||||
{
|
||||
if(LoadProperties.woodcuttingrequiresaxe)
|
||||
{
|
||||
if(m.isAxes(inhand))
|
||||
{
|
||||
WoodCutting.woodcuttingBlockCheck(player, block, plugin);
|
||||
}
|
||||
} else
|
||||
{
|
||||
if(LoadProperties.woodcuttingrequiresaxe && m.isAxes(inhand))
|
||||
WoodCutting.woodcuttingBlockCheck(player, block, plugin);
|
||||
else if(!LoadProperties.woodcuttingrequiresaxe)
|
||||
WoodCutting.woodcuttingBlockCheck(player, block, plugin);
|
||||
}
|
||||
|
||||
/*
|
||||
* IF PLAYER IS USING TREEFELLER
|
||||
*/
|
||||
if(mcPermissions.getInstance().woodCuttingAbility(player)
|
||||
&& PP.getTreeFellerMode()
|
||||
&& block.getTypeId() == 17
|
||||
&& m.blockBreakSimulate(block, player))
|
||||
{
|
||||
if(LoadProperties.spoutEnabled)
|
||||
SpoutStuff.playSoundForPlayer(SoundEffect.EXPLODE, player, block.getLocation());
|
||||
|
||||
WoodCutting.treeFeller(block, player, plugin);
|
||||
for(Block blockx : plugin.misc.treeFeller)
|
||||
{
|
||||
if(blockx != null)
|
||||
{
|
||||
Material mat = Material.getMaterial(block.getTypeId());
|
||||
byte type = 0;
|
||||
if(block.getTypeId() == 17)
|
||||
type = block.getData();
|
||||
ItemStack item = new ItemStack(mat, 1, (byte)0, type);
|
||||
if(blockx.getTypeId() == 17)
|
||||
{
|
||||
m.mcDropItem(blockx.getLocation(), item);
|
||||
//XP WOODCUTTING
|
||||
if(!plugin.misc.blockWatchList.contains(block))
|
||||
{
|
||||
WoodCutting.woodCuttingProcCheck(player, blockx);
|
||||
PP.addXP(SkillType.WOODCUTTING, LoadProperties.mpine, player);
|
||||
}
|
||||
}
|
||||
if(blockx.getTypeId() == 18)
|
||||
{
|
||||
mat = Material.SAPLING;
|
||||
|
||||
item = new ItemStack(mat, 1, (short)0, (byte)(blockx.getData()-8));
|
||||
|
||||
if(Math.random() * 10 > 9)
|
||||
m.mcDropItem(blockx.getLocation(), item);
|
||||
}
|
||||
if(blockx.getType() != Material.AIR)
|
||||
player.incrementStatistic(Statistic.MINE_BLOCK, event.getBlock().getType());
|
||||
blockx.setType(Material.AIR);
|
||||
}
|
||||
}
|
||||
if(LoadProperties.toolsLoseDurabilityFromAbilities)
|
||||
{
|
||||
if(!inhand.getEnchantments().containsKey(Enchantment.DURABILITY))
|
||||
m.damageTool(player, (short) LoadProperties.abilityDurabilityLoss);
|
||||
}
|
||||
plugin.misc.treeFeller.clear();
|
||||
}
|
||||
|
||||
if(PP.getTreeFellerMode())
|
||||
WoodCutting.treeFeller(event, plugin);
|
||||
}
|
||||
|
||||
/*
|
||||
* EXCAVATION
|
||||
*/
|
||||
if(Excavation.canBeGigaDrillBroken(block) && mcPermissions.getInstance().excavation(player) && block.getData() != (byte) 5)
|
||||
Excavation.excavationProcCheck(block.getType(), block.getLocation(), player);
|
||||
/*
|
||||
* HERBALISM
|
||||
*/
|
||||
if(PP.getHoePreparationMode() && mcPermissions.getInstance().herbalism(player) && Herbalism.canBeGreenTerra(block))
|
||||
{
|
||||
Herbalism.greenTerraCheck(player, block);
|
||||
if(LoadProperties.excavationRequiresShovel && m.isShovel(inhand))
|
||||
Excavation.excavationProcCheck(block, player);
|
||||
else if(!LoadProperties.excavationRequiresShovel)
|
||||
Excavation.excavationProcCheck(block, player);
|
||||
}
|
||||
if(mcPermissions.getInstance().herbalism(player) && block.getData() != (byte) 5)
|
||||
Herbalism.herbalismProcCheck(block, player, event, plugin);
|
||||
|
||||
//Change the byte back when broken
|
||||
if(block.getData() == 5 && m.shouldBeWatched(block))
|
||||
if(block.getData() == 5 && m.shouldBeWatched(block.getType()))
|
||||
{
|
||||
block.setData((byte) 0);
|
||||
if(plugin.misc.blockWatchList.contains(block))
|
||||
@@ -273,61 +205,67 @@ public class mcBlockListener implements Listener
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onBlockDamage(BlockDamageEvent event)
|
||||
{
|
||||
if(event.isCancelled())
|
||||
return;
|
||||
Player player = event.getPlayer();
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
ItemStack inhand = player.getItemInHand();
|
||||
Block block = event.getBlock();
|
||||
|
||||
Skills.monitorSkills(player, PP);
|
||||
int id = block.getTypeId();
|
||||
|
||||
/*
|
||||
* ABILITY PREPARATION CHECKS
|
||||
*/
|
||||
if(PP.getHoePreparationMode() && Herbalism.canBeGreenTerra(block))
|
||||
Herbalism.greenTerraCheck(player, block);
|
||||
if(PP.getAxePreparationMode() && block.getTypeId() == 17)
|
||||
WoodCutting.treeFellerCheck(player, block);
|
||||
if(PP.getPickaxePreparationMode() && Mining.canBeSuperBroken(block))
|
||||
Mining.superBreakerCheck(player, block);
|
||||
if(PP.getShovelPreparationMode() && Excavation.canBeGigaDrillBroken(block))
|
||||
Excavation.gigaDrillBreakerActivationCheck(player, block);
|
||||
if(PP.getFistsPreparationMode() && (Excavation.canBeGigaDrillBroken(block) || block.getTypeId() == 78))
|
||||
Unarmed.berserkActivationCheck(player);
|
||||
if(m.abilityBlockCheck(block))
|
||||
{
|
||||
if(PP.getHoePreparationMode() && Herbalism.canBeGreenTerra(block))
|
||||
Skills.abilityCheck(player, SkillType.HERBALISM);
|
||||
if(PP.getAxePreparationMode() && id == 17 && mcPermissions.getInstance().woodCuttingAbility(player))
|
||||
Skills.abilityCheck(player, SkillType.WOODCUTTING);
|
||||
if(PP.getPickaxePreparationMode() && Mining.canBeSuperBroken(block))
|
||||
Skills.abilityCheck(player, SkillType.MINING);
|
||||
if(PP.getShovelPreparationMode() && Excavation.canBeGigaDrillBroken(block))
|
||||
Skills.abilityCheck(player, SkillType.EXCAVATION);
|
||||
}
|
||||
|
||||
if(PP.getFistsPreparationMode() && (Excavation.canBeGigaDrillBroken(block) || id == 78))
|
||||
Skills.abilityCheck(player, SkillType.UNARMED);
|
||||
|
||||
/*
|
||||
* TREE FELLAN STUFF
|
||||
* TREE FELLER STUFF
|
||||
*/
|
||||
if(LoadProperties.spoutEnabled && block.getTypeId() == 17 && Users.getProfile(player).getTreeFellerMode())
|
||||
if(LoadProperties.spoutEnabled && id == 17 && PP.getTreeFellerMode())
|
||||
SpoutStuff.playSoundForPlayer(SoundEffect.FIZZ, player, block.getLocation());
|
||||
|
||||
/*
|
||||
* GREEN TERRA STUFF
|
||||
*/
|
||||
if(PP.getGreenTerraMode() && mcPermissions.getInstance().herbalismAbility(player) && PP.getGreenTerraMode())
|
||||
{
|
||||
if(PP.getGreenTerraMode() && mcPermissions.getInstance().herbalismAbility(player))
|
||||
Herbalism.greenTerra(player, block);
|
||||
}
|
||||
|
||||
/*
|
||||
* GIGA DRILL BREAKER CHECKS
|
||||
*/
|
||||
if(PP.getGigaDrillBreakerMode()
|
||||
&& Excavation.canBeGigaDrillBroken(block)
|
||||
&& m.blockBreakSimulate(block, player)
|
||||
&& mcPermissions.getInstance().excavationAbility(player))
|
||||
if(PP.getGigaDrillBreakerMode() && Excavation.canBeGigaDrillBroken(block) && m.blockBreakSimulate(block, player, true) && mcPermissions.getInstance().excavationAbility(player))
|
||||
{
|
||||
if(LoadProperties.excavationRequiresShovel)
|
||||
if(LoadProperties.excavationRequiresShovel && m.isShovel(inhand))
|
||||
{
|
||||
if(m.isShovel(inhand)){
|
||||
event.setInstaBreak(true);
|
||||
Excavation.gigaDrillBreaker(player, block);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else if(!LoadProperties.excavationRequiresShovel){
|
||||
|
||||
if(LoadProperties.toolsLoseDurabilityFromAbilities)
|
||||
{
|
||||
if(!inhand.containsEnchantment(Enchantment.DURABILITY))
|
||||
{
|
||||
short durability = inhand.getDurability();
|
||||
durability += (LoadProperties.abilityDurabilityLoss);
|
||||
inhand.setDurability(durability);
|
||||
}
|
||||
}
|
||||
|
||||
event.setInstaBreak(true);
|
||||
Excavation.gigaDrillBreaker(player, block);
|
||||
}
|
||||
@@ -336,14 +274,12 @@ public class mcBlockListener implements Listener
|
||||
* BERSERK MODE CHECKS
|
||||
*/
|
||||
if(PP.getBerserkMode()
|
||||
&& m.blockBreakSimulate(block, player)
|
||||
&& m.blockBreakSimulate(block, player, true)
|
||||
&& player.getItemInHand().getTypeId() == 0
|
||||
&& (Excavation.canBeGigaDrillBroken(block) || block.getTypeId() == 78)
|
||||
&& (Excavation.canBeGigaDrillBroken(block) || id == 78)
|
||||
&& mcPermissions.getInstance().unarmedAbility(player))
|
||||
{
|
||||
event.setInstaBreak(true);
|
||||
PlayerAnimationEvent armswing = new PlayerAnimationEvent(player);
|
||||
Bukkit.getPluginManager().callEvent(armswing);
|
||||
|
||||
if(LoadProperties.spoutEnabled)
|
||||
SpoutStuff.playSoundForPlayer(SoundEffect.POP, player, block.getLocation());
|
||||
@@ -354,12 +290,23 @@ public class mcBlockListener implements Listener
|
||||
*/
|
||||
if(PP.getSuperBreakerMode()
|
||||
&& Mining.canBeSuperBroken(block)
|
||||
&& m.blockBreakSimulate(block, player)
|
||||
&& m.blockBreakSimulate(block, player, true)
|
||||
&& mcPermissions.getInstance().miningAbility(player))
|
||||
{
|
||||
if(LoadProperties.miningrequirespickaxe)
|
||||
{
|
||||
if(m.isMiningPick(inhand)){
|
||||
|
||||
if(LoadProperties.toolsLoseDurabilityFromAbilities)
|
||||
{
|
||||
if(!inhand.containsEnchantment(Enchantment.DURABILITY))
|
||||
{
|
||||
short durability = inhand.getDurability();
|
||||
durability += (LoadProperties.abilityDurabilityLoss);
|
||||
inhand.setDurability(durability);
|
||||
}
|
||||
}
|
||||
|
||||
event.setInstaBreak(true);
|
||||
Mining.SuperBreakerBlockCheck(player, block, plugin);
|
||||
}
|
||||
@@ -372,10 +319,10 @@ public class mcBlockListener implements Listener
|
||||
/*
|
||||
* LEAF BLOWER CHECKS
|
||||
*/
|
||||
if(block.getTypeId() == 18
|
||||
if(id == 18
|
||||
&& mcPermissions.getInstance().woodCuttingAbility(player)
|
||||
&& PP.getSkillLevel(SkillType.WOODCUTTING) >= 100
|
||||
&& m.blockBreakSimulate(block, player))
|
||||
&& m.blockBreakSimulate(block, player, true))
|
||||
{
|
||||
if(LoadProperties.woodcuttingrequiresaxe)
|
||||
{
|
||||
@@ -385,16 +332,13 @@ public class mcBlockListener implements Listener
|
||||
}
|
||||
}
|
||||
else{
|
||||
event.setInstaBreak(true);
|
||||
WoodCutting.leafBlower(player, block);
|
||||
if(inhand.getTypeId() != 359){
|
||||
event.setInstaBreak(true);
|
||||
WoodCutting.leafBlower(player, block);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(block.getType() == Material.AIR && plugin.misc.blockWatchList.contains(block))
|
||||
{
|
||||
plugin.misc.blockWatchList.remove(block);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@@ -402,9 +346,9 @@ public class mcBlockListener implements Listener
|
||||
{
|
||||
Block blockFrom = event.getBlock();
|
||||
Block blockTo = event.getToBlock();
|
||||
if(m.shouldBeWatched(blockFrom) && blockFrom.getData() == (byte)5)
|
||||
if(m.shouldBeWatched(blockFrom.getType()) && blockFrom.getData() == (byte)5)
|
||||
{
|
||||
blockTo.setData((byte)5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,9 +16,11 @@
|
||||
*/
|
||||
package com.gmail.nossr50.listeners;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.TNTPrimed;
|
||||
import org.bukkit.entity.Wolf;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
@@ -29,17 +31,22 @@ import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.entity.EntityDeathEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
||||
import org.bukkit.event.entity.EntityTameEvent;
|
||||
import org.bukkit.event.entity.ExplosionPrimeEvent;
|
||||
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
||||
|
||||
import com.gmail.nossr50.Combat;
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.party.Party;
|
||||
import com.gmail.nossr50.skills.Acrobatics;
|
||||
import com.gmail.nossr50.skills.Archery;
|
||||
import com.gmail.nossr50.skills.BlastMining;
|
||||
import com.gmail.nossr50.skills.Skills;
|
||||
import com.gmail.nossr50.skills.Taming;
|
||||
|
||||
@@ -51,23 +58,25 @@ public class mcEntityListener implements Listener
|
||||
public mcEntityListener(final mcMMO plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onEntityDamage(EntityDamageEvent event)
|
||||
{
|
||||
if(event.isCancelled())
|
||||
return;
|
||||
Entity entity = event.getEntity();
|
||||
DamageCause cause = event.getCause();
|
||||
|
||||
//Check for world pvp flag
|
||||
if(event instanceof EntityDamageByEntityEvent)
|
||||
{
|
||||
EntityDamageByEntityEvent eventb = (EntityDamageByEntityEvent)event;
|
||||
if(eventb.getEntity() instanceof Player && eventb.getDamager() instanceof Player && !event.getEntity().getWorld().getPVP())
|
||||
if(eventb.getEntity() instanceof Player && eventb.getDamager() instanceof Player && !entity.getWorld().getPVP())
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* CHECK FOR INVULNERABILITY
|
||||
*/
|
||||
if(event.getEntity() instanceof Player)
|
||||
if(entity instanceof Player)
|
||||
{
|
||||
Player defender = (Player)event.getEntity();
|
||||
PlayerProfile PPd = Users.getProfile(defender);
|
||||
@@ -77,53 +86,27 @@ public class mcEntityListener implements Listener
|
||||
Users.addUser(defender);
|
||||
}
|
||||
|
||||
if(event.getEntity() instanceof LivingEntity)
|
||||
if(entity instanceof LivingEntity)
|
||||
{
|
||||
//CraftEntity cEntity = (CraftEntity)event.getEntity();
|
||||
//if(cEntity.getHandle() instanceof EntityLiving)
|
||||
{
|
||||
LivingEntity entityliving = (LivingEntity)event.getEntity();
|
||||
LivingEntity entityliving = (LivingEntity)entity;
|
||||
if(entityliving.getNoDamageTicks() < entityliving.getMaximumNoDamageTicks()/2.0F)
|
||||
{
|
||||
Entity x = event.getEntity();
|
||||
DamageCause type = event.getCause();
|
||||
if(event.getEntity() instanceof Wolf && ((Wolf)event.getEntity()).isTamed() && Taming.getOwner(((Wolf)event.getEntity()), plugin) != null)
|
||||
{
|
||||
Wolf theWolf = (Wolf) event.getEntity();
|
||||
Player master = Taming.getOwner(theWolf, plugin);
|
||||
PlayerProfile PPo = Users.getProfile(master);
|
||||
if(master == null || PPo == null)
|
||||
return;
|
||||
//Environmentally Aware
|
||||
if((event.getCause() == DamageCause.CONTACT || event.getCause() == DamageCause.LAVA || event.getCause() == DamageCause.FIRE) && PPo.getSkillLevel(SkillType.TAMING) >= 100)
|
||||
{
|
||||
if(event.getDamage() < ((Wolf) event.getEntity()).getHealth())
|
||||
{
|
||||
event.getEntity().teleport(Taming.getOwner(theWolf, plugin).getLocation());
|
||||
master.sendMessage(mcLocale.getString("mcEntityListener.WolfComesBack")); //$NON-NLS-1$
|
||||
event.getEntity().setFireTicks(0);
|
||||
}
|
||||
}
|
||||
if(event.getCause() == DamageCause.FALL && PPo.getSkillLevel(SkillType.TAMING) >= 100)
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
//Thick Fur
|
||||
if(event.getCause() == DamageCause.FIRE_TICK)
|
||||
{
|
||||
event.getEntity().setFireTicks(0);
|
||||
}
|
||||
}
|
||||
if(entity instanceof Wolf && ((Wolf)entity).isTamed() && Taming.getOwner(((Wolf)entity), plugin) != null)
|
||||
Taming.preventDamage(event, plugin);
|
||||
|
||||
/*
|
||||
* ACROBATICS
|
||||
*/
|
||||
if(x instanceof Player){
|
||||
Player player = (Player)x;
|
||||
if(type == DamageCause.FALL){
|
||||
if(entity instanceof Player){
|
||||
Player player = (Player)entity;
|
||||
/*
|
||||
* ACROBATICS
|
||||
*/
|
||||
if(cause == DamageCause.FALL && mcPermissions.getInstance().acrobatics(player))
|
||||
Acrobatics.acrobaticsCheck(player, event);
|
||||
}
|
||||
/*
|
||||
* Demolitions Expert
|
||||
*/
|
||||
if(cause == DamageCause.BLOCK_EXPLOSION && mcPermissions.getInstance().blastMining(player))
|
||||
BlastMining.demolitionsExpertise(Users.getProfile(player).getSkillLevel(SkillType.MINING), event);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -133,25 +116,24 @@ public class mcEntityListener implements Listener
|
||||
{
|
||||
EntityDamageByEntityEvent eventb = (EntityDamageByEntityEvent) event;
|
||||
Entity f = eventb.getDamager();
|
||||
Entity e = event.getEntity();
|
||||
/*
|
||||
* PARTY CHECKS
|
||||
*/
|
||||
if(event.getEntity() instanceof Player && f instanceof Player)
|
||||
if(entity instanceof Player && f instanceof Player)
|
||||
{
|
||||
Player defender = (Player)e;
|
||||
Player defender = (Player)entity;
|
||||
Player attacker = (Player)f;
|
||||
if(Party.getInstance().inSameParty(defender, attacker))
|
||||
event.setCancelled(true);
|
||||
}
|
||||
Combat.combatChecks(event, plugin);
|
||||
Combat.combatChecks(eventb, plugin);
|
||||
}
|
||||
/*
|
||||
* Check to see if the defender took damage so we can apply recently hurt
|
||||
*/
|
||||
if(event.getEntity() instanceof Player)
|
||||
if(entity instanceof Player)
|
||||
{
|
||||
Player herpderp = (Player)event.getEntity();
|
||||
Player herpderp = (Player)entity;
|
||||
if(!event.isCancelled() && event.getDamage() >= 1)
|
||||
{
|
||||
Users.getProfile(herpderp).setRecentlyHurt(System.currentTimeMillis());
|
||||
@@ -165,24 +147,23 @@ public class mcEntityListener implements Listener
|
||||
@EventHandler
|
||||
public void onEntityDeath(EntityDeathEvent event)
|
||||
{
|
||||
Entity x = event.getEntity();
|
||||
LivingEntity x = event.getEntity();
|
||||
x.setFireTicks(0);
|
||||
|
||||
//Remove bleed track
|
||||
if(plugin.misc.bleedTracker.contains((LivingEntity)x))
|
||||
plugin.misc.addToBleedRemovalQue((LivingEntity)x);
|
||||
|
||||
Skills.arrowRetrievalCheck(x, plugin);
|
||||
/*
|
||||
if(Config.getInstance().isMobSpawnTracked(x)){
|
||||
Config.getInstance().removeMobSpawnTrack(x);
|
||||
}
|
||||
*/
|
||||
if(x instanceof Player){
|
||||
Player player = (Player)x;
|
||||
Users.getProfile(player).setBleedTicks(0);
|
||||
//Remove mob from mob spawner list
|
||||
if(plugin.misc.mobSpawnerList.contains(x.getEntityId()))
|
||||
{
|
||||
plugin.misc.mobSpawnerList.remove((Object)x.getEntityId());
|
||||
}
|
||||
|
||||
//Remove bleed track
|
||||
if(plugin.misc.bleedTracker.contains(x))
|
||||
plugin.misc.addToBleedRemovalQue(x);
|
||||
|
||||
Archery.arrowRetrievalCheck(x, plugin);
|
||||
|
||||
if(x instanceof Player)
|
||||
Users.getProfile((Player)x).setBleedTicks(0);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@@ -191,23 +172,156 @@ public class mcEntityListener implements Listener
|
||||
SpawnReason reason = event.getSpawnReason();
|
||||
|
||||
if(reason == SpawnReason.SPAWNER && !LoadProperties.xpGainsMobSpawners)
|
||||
{
|
||||
plugin.misc.mobSpawnerList.add(event.getEntity());
|
||||
}
|
||||
plugin.misc.mobSpawnerList.add(event.getEntity().getEntityId());
|
||||
}
|
||||
|
||||
public boolean isBow(ItemStack is){
|
||||
if (is.getTypeId() == 261){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@EventHandler (priority = EventPriority.LOW)
|
||||
public void onExplosionPrime(ExplosionPrimeEvent event)
|
||||
{
|
||||
if(event.getEntity() instanceof TNTPrimed)
|
||||
{
|
||||
Location location = event.getEntity().getLocation();
|
||||
|
||||
//Ugly code to make it recognize the location
|
||||
location.setX(location.getBlockX()+1);
|
||||
location.setY(location.getBlockY());
|
||||
location.setZ(location.getBlockZ()+1);
|
||||
|
||||
if(plugin.misc.tntTracker.containsKey(location))
|
||||
{
|
||||
Player player = plugin.misc.tntTracker.get(location);
|
||||
BlastMining.biggerBombs(Users.getProfile(player).getSkillLevel(SkillType.MINING), event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler (priority = EventPriority.LOW)
|
||||
public void onEnitityExplode(EntityExplodeEvent event)
|
||||
{
|
||||
if(event.getEntity() instanceof TNTPrimed)
|
||||
{
|
||||
Location location = event.getEntity().getLocation();
|
||||
|
||||
//Ugly code to make it recognize the location
|
||||
location.setX(location.getBlockX()+1);
|
||||
location.setY(location.getBlockY());
|
||||
location.setZ(location.getBlockZ()+1);
|
||||
|
||||
if(plugin.misc.tntTracker.containsKey(location))
|
||||
{
|
||||
Player player = plugin.misc.tntTracker.get(location);
|
||||
BlastMining.dropProcessing(player, event, plugin);
|
||||
plugin.misc.tntTracker.remove(location);
|
||||
}
|
||||
}
|
||||
}
|
||||
public boolean isPlayer(Entity entity){
|
||||
if (entity instanceof Player) {
|
||||
return true;
|
||||
} else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler (priority = EventPriority.LOW)
|
||||
public void onFoodLevelChange(FoodLevelChangeEvent event)
|
||||
{
|
||||
if(LoadProperties.herbalismHungerBonus)
|
||||
{
|
||||
if(event.getEntity() instanceof Player)
|
||||
{
|
||||
Player player = (Player) event.getEntity();
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
int currentFoodLevel = player.getFoodLevel();
|
||||
int newFoodLevel = event.getFoodLevel();
|
||||
|
||||
//Some foods have 3 ranks
|
||||
//Some foods have 5 ranks
|
||||
//The number of ranks is based on how 'common' the item is
|
||||
//We can adjust this quite easily if we find something is giving too much of a bonus
|
||||
|
||||
if(newFoodLevel > currentFoodLevel)
|
||||
{
|
||||
int food = player.getItemInHand().getTypeId();
|
||||
int herbLevel = PP.getSkillLevel(SkillType.HERBALISM);
|
||||
int foodChange = newFoodLevel - currentFoodLevel;
|
||||
|
||||
switch(food)
|
||||
{
|
||||
case 297:
|
||||
{
|
||||
//BREAD (297) RESTORES 2 1/2 HUNGER
|
||||
//Restores 5 HUNGER @ 1000
|
||||
if(herbLevel >= 200 && herbLevel < 400)
|
||||
foodChange = foodChange + 1;
|
||||
else if(herbLevel >= 400 && herbLevel < 600)
|
||||
foodChange = foodChange + 2;
|
||||
else if(herbLevel >= 600 && herbLevel < 800)
|
||||
foodChange = foodChange + 3;
|
||||
else if(herbLevel >= 800 && herbLevel < 1000)
|
||||
foodChange = foodChange + 4;
|
||||
else if(herbLevel >= 1000)
|
||||
foodChange = foodChange + 5;
|
||||
break;
|
||||
}
|
||||
case 357:
|
||||
{
|
||||
//COOKIE (357) RESTORES 1/2 HUNGER
|
||||
//RESTORES 2 HUNGER @ 1000
|
||||
if(herbLevel >= 200 && herbLevel < 600)
|
||||
foodChange = foodChange + 1;
|
||||
else if(herbLevel >= 600 && herbLevel < 1000)
|
||||
foodChange = foodChange + 2;
|
||||
else if(herbLevel >= 1000)
|
||||
foodChange = foodChange + 3;
|
||||
break;
|
||||
}
|
||||
case 360:
|
||||
{
|
||||
//MELON (360) RESTORES 1 HUNGER
|
||||
//RESTORES 2 1/2 HUNGER @ 1000
|
||||
if(herbLevel >= 200 && herbLevel < 600)
|
||||
foodChange = foodChange + 1;
|
||||
else if(herbLevel >= 600 && herbLevel < 1000)
|
||||
foodChange = foodChange + 2;
|
||||
else if(herbLevel >= 1000)
|
||||
foodChange = foodChange + 3;
|
||||
break;
|
||||
}
|
||||
case 282:
|
||||
{
|
||||
//STEW (282) RESTORES 4 HUNGER
|
||||
//RESTORES 6 1/2 HUNGER @ 1000
|
||||
if(herbLevel >= 200 && herbLevel < 400)
|
||||
foodChange = foodChange + 1;
|
||||
else if(herbLevel >= 400 && herbLevel < 600)
|
||||
foodChange = foodChange + 2;
|
||||
else if(herbLevel >= 600 && herbLevel < 800)
|
||||
foodChange = foodChange + 3;
|
||||
else if(herbLevel >= 800 && herbLevel < 1000)
|
||||
foodChange = foodChange + 4;
|
||||
else if(herbLevel >= 1000)
|
||||
foodChange = foodChange + 5;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//Make sure we don't go over the max value
|
||||
newFoodLevel = currentFoodLevel + foodChange;
|
||||
if(newFoodLevel > 20)
|
||||
event.setFoodLevel(20);
|
||||
if(newFoodLevel <= 20)
|
||||
event.setFoodLevel(newFoodLevel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler (priority = EventPriority.MONITOR)
|
||||
public void onEntityTame(EntityTameEvent event)
|
||||
{
|
||||
Player player = (Player) event.getOwner();
|
||||
if(mcPermissions.getInstance().taming(player))
|
||||
{
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
if(event.getEntity() instanceof Wolf)
|
||||
{
|
||||
PP.addXP(SkillType.TAMING, LoadProperties.mtameWolf, player);
|
||||
Skills.XpCheckSkill(SkillType.TAMING, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,21 +21,20 @@ import java.util.logging.Logger;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.craftbukkit.command.ColouredConsoleSender;
|
||||
import org.bukkit.craftbukkit.entity.CraftItem;
|
||||
import org.bukkit.entity.CreatureType;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.TNTPrimed;
|
||||
import org.bukkit.entity.Wolf;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.player.PlayerChangedWorldEvent;
|
||||
import org.bukkit.event.player.PlayerChatEvent;
|
||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||
import org.bukkit.event.player.PlayerFishEvent;
|
||||
@@ -45,8 +44,9 @@ import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerLoginEvent;
|
||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.event.player.PlayerRespawnEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.Combat;
|
||||
import com.gmail.nossr50.Item;
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
@@ -54,14 +54,14 @@ import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.commands.general.XprateCommand;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.runnables.RemoveProfileFromMemoryTask;
|
||||
import com.gmail.nossr50.spout.SpoutStuff;
|
||||
import com.gmail.nossr50.spout.mmoHelper;
|
||||
import com.gmail.nossr50.datatypes.AbilityType;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.party.Party;
|
||||
import com.gmail.nossr50.skills.Fishing;
|
||||
import com.gmail.nossr50.skills.Herbalism;
|
||||
import com.gmail.nossr50.skills.Repair;
|
||||
import com.gmail.nossr50.skills.Skills;
|
||||
|
||||
@@ -69,102 +69,94 @@ import com.gmail.nossr50.skills.Skills;
|
||||
public class mcPlayerListener implements Listener
|
||||
{
|
||||
protected static final Logger log = Logger.getLogger("Minecraft"); //$NON-NLS-1$
|
||||
public Location spawn = null;
|
||||
private mcMMO plugin;
|
||||
|
||||
public mcPlayerListener(mcMMO instance)
|
||||
{
|
||||
plugin = instance;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onPlayerWorldChangeEvent(PlayerChangedWorldEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
|
||||
if(PP.getGodMode())
|
||||
{
|
||||
if(!mcPermissions.getInstance().mcgod(player))
|
||||
{
|
||||
PP.toggleGodMode();
|
||||
player.sendMessage("[mcMMO] God Mode not permitted on this world (See Permissions)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onPlayerFish(PlayerFishEvent event)
|
||||
{
|
||||
if(mcPermissions.getInstance().fishing(event.getPlayer()))
|
||||
Player player = event.getPlayer();
|
||||
if(mcPermissions.getInstance().fishing(player))
|
||||
{
|
||||
if(event.getState() == State.CAUGHT_FISH)
|
||||
State state = event.getState();
|
||||
Entity caught = event.getCaught();
|
||||
if(state== State.CAUGHT_FISH)
|
||||
{
|
||||
if(event.getCaught() instanceof CraftItem)
|
||||
{
|
||||
if(caught instanceof org.bukkit.entity.Item)
|
||||
Fishing.processResults(event);
|
||||
}
|
||||
} else if (event.getState() == State.CAUGHT_ENTITY)
|
||||
}
|
||||
else if (state == State.CAUGHT_ENTITY)
|
||||
{
|
||||
if(Users.getProfile(event.getPlayer()).getSkillLevel(SkillType.FISHING) >= 150 && event.getCaught() instanceof LivingEntity)
|
||||
{
|
||||
int skillLevel = Users.getProfile(player).getSkillLevel(SkillType.FISHING);
|
||||
if(skillLevel >= 150 && caught instanceof LivingEntity)
|
||||
Fishing.shakeMob(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@EventHandler(ignoreCancelled = true)
|
||||
public void onPlayerPickupItem(PlayerPickupItemEvent event)
|
||||
{
|
||||
if(Users.getProfile(event.getPlayer()).getBerserkMode())
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerRespawn(PlayerRespawnEvent event)
|
||||
{
|
||||
|
||||
Player player = event.getPlayer();
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
if(LoadProperties.enableMySpawn && mcPermissions.getInstance().mySpawn(player))
|
||||
{
|
||||
if(player != null && PP != null)
|
||||
{
|
||||
PP.setRespawnATS(System.currentTimeMillis());
|
||||
|
||||
Location mySpawn = PP.getMySpawn(player);
|
||||
|
||||
if(mySpawn != null)
|
||||
{
|
||||
{
|
||||
event.setRespawnLocation(mySpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onPlayerLogin(PlayerLoginEvent event)
|
||||
{
|
||||
Users.addUser(event.getPlayer());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onPlayerQuit(PlayerQuitEvent event)
|
||||
{
|
||||
|
||||
/*
|
||||
* GARBAGE COLLECTION
|
||||
*/
|
||||
//Discard the PlayerProfile object
|
||||
Player player = event.getPlayer();
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
if(LoadProperties.spoutEnabled && SpoutStuff.playerHUDs.containsKey(player))
|
||||
SpoutStuff.playerHUDs.remove(player);
|
||||
|
||||
if(LoadProperties.spoutEnabled)
|
||||
{
|
||||
if(SpoutStuff.playerHUDs.containsKey(player))
|
||||
SpoutStuff.playerHUDs.remove(player);
|
||||
if(mmoHelper.containers.containsKey(player))
|
||||
mmoHelper.containers.remove(player);
|
||||
}
|
||||
//Bleed it out
|
||||
if(PP.getBleedTicks() > 0)
|
||||
Combat.dealDamage(player, PP.getBleedTicks()*2);
|
||||
|
||||
Users.removeUser(event.getPlayer());
|
||||
//Save PlayerData to MySQL/FlatFile on player quit
|
||||
PP.save();
|
||||
|
||||
//Schedule PlayerProfile removal 2 minutes after quitting
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new RemoveProfileFromMemoryTask(player), 2400);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onPlayerJoin(PlayerJoinEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
if(mcPermissions.getInstance().motd(player) && LoadProperties.enableMotd)
|
||||
{
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.MOTD", new Object[] {plugin.getDescription().getVersion(), "/mcmmo"}));
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.MOTD", new Object[] {plugin.getDescription().getVersion(), "mcmmo"}));
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.WIKI"));
|
||||
}
|
||||
//THIS IS VERY BAD WAY TO DO THINGS, NEED BETTER WAY
|
||||
@@ -179,27 +171,16 @@ public class mcPlayerListener implements Listener
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
Action action = event.getAction();
|
||||
Block block = event.getClickedBlock();
|
||||
|
||||
ItemStack is = player.getItemInHand();
|
||||
|
||||
/*
|
||||
* Ability checks
|
||||
*/
|
||||
if(action == Action.RIGHT_CLICK_BLOCK)
|
||||
{
|
||||
ItemStack is = player.getItemInHand();
|
||||
if(LoadProperties.enableMySpawn && block != null && player != null)
|
||||
{
|
||||
if(block.getTypeId() == 26 && mcPermissions.getInstance().setMySpawn(player))
|
||||
{
|
||||
Location loc = player.getLocation();
|
||||
if(mcPermissions.getInstance().setMySpawn(player)){
|
||||
PP.setMySpawn(loc.getX(), loc.getY(), loc.getZ(), loc.getWorld().getName());
|
||||
}
|
||||
//player.sendMessage(mcLocale.getString("mcPlayerListener.MyspawnSet"));
|
||||
}
|
||||
}
|
||||
Material mat = block.getType();
|
||||
|
||||
if(block != null && player != null && mcPermissions.getInstance().repair(player)
|
||||
&& event.getClickedBlock().getTypeId() == LoadProperties.anvilID && (Repair.isTools(player.getItemInHand()) || Repair.isArmor(player.getItemInHand())))
|
||||
if(block != null && mcPermissions.getInstance().repair(player) && block.getTypeId() == LoadProperties.anvilID && (Repair.isTools(is) || Repair.isArmor(is)))
|
||||
{
|
||||
Repair.repairCheck(player, is, event.getClickedBlock());
|
||||
event.setCancelled(true);
|
||||
@@ -208,54 +189,67 @@ public class mcPlayerListener implements Listener
|
||||
|
||||
if(LoadProperties.enableAbilities && m.abilityBlockCheck(block))
|
||||
{
|
||||
if(block != null && m.isHoe(player.getItemInHand()) && block.getTypeId() != 3 && block.getTypeId() != 2 && block.getTypeId() != 60){
|
||||
Skills.hoeReadinessCheck(player);
|
||||
}
|
||||
Skills.abilityActivationCheck(player);
|
||||
if(block != null && m.isHoe(is) && !mat.equals(Material.DIRT) && !mat.equals(Material.GRASS) && !mat.equals(Material.SOIL))
|
||||
Skills.activationCheck(player, SkillType.HERBALISM);
|
||||
|
||||
Skills.activationCheck(player, SkillType.AXES);
|
||||
Skills.activationCheck(player, SkillType.EXCAVATION);
|
||||
Skills.activationCheck(player, SkillType.MINING);
|
||||
Skills.activationCheck(player, SkillType.SWORDS);
|
||||
Skills.activationCheck(player, SkillType.UNARMED);
|
||||
Skills.activationCheck(player, SkillType.WOODCUTTING);
|
||||
}
|
||||
|
||||
//GREEN THUMB
|
||||
if(block != null && mcPermissions.getInstance().herbalism(player) && (block.getType() == Material.COBBLESTONE || block.getType() == Material.DIRT || block.getType() == Material.SMOOTH_BRICK) && player.getItemInHand().getType() == Material.SEEDS)
|
||||
if(block != null && mcPermissions.getInstance().herbalism(player) && (mat.equals(Material.COBBLESTONE) || mat.equals(Material.DIRT) || mat.equals(Material.SMOOTH_BRICK)) && is.getType().equals(Material.SEEDS))
|
||||
{
|
||||
boolean pass = false;
|
||||
if(Herbalism.hasSeeds(player))
|
||||
{
|
||||
Herbalism.removeSeeds(player);
|
||||
int seeds = is.getAmount();
|
||||
player.setItemInHand(new ItemStack(Material.SEEDS, seeds - 1));
|
||||
|
||||
if(block.getType() == Material.DIRT || block.getType() == Material.COBBLESTONE || block.getType() == Material.SMOOTH_BRICK)
|
||||
if(Math.random() * 1500 <= PP.getSkillLevel(SkillType.HERBALISM) && m.blockBreakSimulate(block, player, false))
|
||||
{
|
||||
switch(mat)
|
||||
{
|
||||
if(Math.random() * 1500 <= PP.getSkillLevel(SkillType.HERBALISM) && m.blockBreakSimulate(block, player))
|
||||
case COBBLESTONE:
|
||||
if(LoadProperties.enableCobbleToMossy)
|
||||
{
|
||||
switch(block.getType())
|
||||
{
|
||||
case COBBLESTONE:
|
||||
if(LoadProperties.enableCobbleToMossy)
|
||||
{
|
||||
block.setType(Material.MOSSY_COBBLESTONE);
|
||||
pass = true;
|
||||
}
|
||||
break;
|
||||
case DIRT:
|
||||
pass = true;
|
||||
block.setType(Material.GRASS);
|
||||
break;
|
||||
case SMOOTH_BRICK:
|
||||
pass = true;
|
||||
block.setData((byte)1);
|
||||
break;
|
||||
}
|
||||
if(pass == false)
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.GreenThumbFail"));
|
||||
block.setType(Material.MOSSY_COBBLESTONE);
|
||||
pass = true;
|
||||
}
|
||||
break;
|
||||
case DIRT:
|
||||
if(LoadProperties.enableDirtToGrass)
|
||||
{
|
||||
block.setType(Material.GRASS);
|
||||
pass = true;
|
||||
}
|
||||
break;
|
||||
case SMOOTH_BRICK:
|
||||
if(LoadProperties.enableSmoothToMossy)
|
||||
{
|
||||
pass = true;
|
||||
block.setData((byte)1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if(pass == false)
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.GreenThumbFail"));
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(LoadProperties.enableAbilities && action == Action.RIGHT_CLICK_AIR)
|
||||
{
|
||||
Skills.hoeReadinessCheck(player);
|
||||
Skills.abilityActivationCheck(player);
|
||||
Skills.activationCheck(player, SkillType.AXES);
|
||||
Skills.activationCheck(player, SkillType.EXCAVATION);
|
||||
Skills.activationCheck(player, SkillType.HERBALISM);
|
||||
Skills.activationCheck(player, SkillType.MINING);
|
||||
Skills.activationCheck(player, SkillType.SWORDS);
|
||||
Skills.activationCheck(player, SkillType.UNARMED);
|
||||
Skills.activationCheck(player, SkillType.WOODCUTTING);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -263,15 +257,12 @@ public class mcPlayerListener implements Listener
|
||||
*/
|
||||
if(action == Action.RIGHT_CLICK_AIR)
|
||||
Item.itemchecks(player, plugin);
|
||||
if(action == Action.RIGHT_CLICK_BLOCK)
|
||||
{
|
||||
if(m.abilityBlockCheck(event.getClickedBlock()))
|
||||
Item.itemchecks(player, plugin);
|
||||
}
|
||||
if(action == Action.RIGHT_CLICK_BLOCK && m.abilityBlockCheck(block))
|
||||
Item.itemchecks(player, plugin);
|
||||
|
||||
if(player.isSneaking() && mcPermissions.getInstance().taming(player) && (action == Action.RIGHT_CLICK_AIR || action == Action.RIGHT_CLICK_BLOCK))
|
||||
{
|
||||
if(player.getItemInHand().getType() == Material.BONE && player.getItemInHand().getAmount() > 9)
|
||||
if(is.getType().equals(Material.BONE) && is.getAmount() >= LoadProperties.bonesConsumedByCOTW)
|
||||
{
|
||||
for(Entity x : player.getNearbyEntities(40, 40, 40))
|
||||
{
|
||||
@@ -281,33 +272,49 @@ public class mcPlayerListener implements Listener
|
||||
return;
|
||||
}
|
||||
}
|
||||
World world = player.getWorld();
|
||||
world.spawnCreature(player.getLocation(), CreatureType.WOLF);
|
||||
|
||||
ItemStack[] inventory = player.getInventory().getContents();
|
||||
for(ItemStack x : inventory){
|
||||
if(x != null && x.getAmount() > LoadProperties.bonesConsumedByCOTW-1 && x.getType() == Material.BONE){
|
||||
if(x.getAmount() >= LoadProperties.bonesConsumedByCOTW)
|
||||
{
|
||||
x.setAmount(x.getAmount() - LoadProperties.bonesConsumedByCOTW);
|
||||
player.getInventory().setContents(inventory);
|
||||
player.updateInventory();
|
||||
break;
|
||||
} else {
|
||||
x.setAmount(0);
|
||||
x.setTypeId(0);
|
||||
player.getInventory().setContents(inventory);
|
||||
player.updateInventory();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
World world = player.getWorld();
|
||||
world.spawnCreature(player.getLocation(), EntityType.WOLF);
|
||||
|
||||
int bones = is.getAmount();
|
||||
bones = bones - LoadProperties.bonesConsumedByCOTW;
|
||||
player.setItemInHand(new ItemStack(Material.BONE, bones));
|
||||
player.sendMessage(mcLocale.getString("m.TamingSummon"));
|
||||
}
|
||||
}
|
||||
|
||||
//BLAST MINING
|
||||
if((action == Action.RIGHT_CLICK_BLOCK || action == Action.RIGHT_CLICK_AIR) && is.getTypeId() == LoadProperties.detonatorID)
|
||||
{
|
||||
Block b = player.getTargetBlock(null, 100);
|
||||
if(b.getType().equals(Material.TNT) && mcPermissions.getInstance().blastMining(player) && m.blockBreakSimulate(b, player, true) && Users.getProfile(player).getSkillLevel(SkillType.MINING) >= 125)
|
||||
{
|
||||
AbilityType ability = AbilityType.BLAST_MINING;
|
||||
//Check cooldown
|
||||
if(!Skills.cooldownOver(player, (PP.getSkillDATS(ability) * 1000), ability.getCooldown()))
|
||||
{
|
||||
player.sendMessage(mcLocale.getString("Skills.TooTired") + ChatColor.YELLOW + " (" + Skills.calculateTimeLeft(player, (PP.getSkillDATS(ability) * 1000), ability.getCooldown()) + "s)");
|
||||
return;
|
||||
}
|
||||
//Send message to nearby players
|
||||
for(Player y : player.getWorld().getPlayers())
|
||||
{
|
||||
if(y != player && m.isNear(player.getLocation(), y.getLocation(), 10))
|
||||
y.sendMessage(ability.getAbilityPlayer(player));
|
||||
}
|
||||
|
||||
player.sendMessage(ChatColor.GRAY+"**BOOM**");
|
||||
|
||||
TNTPrimed tnt = player.getWorld().spawn(b.getLocation(), TNTPrimed.class);
|
||||
b.setType(Material.AIR);
|
||||
tnt.setFuseTicks(0);
|
||||
PP.setSkillDATS(ability, System.currentTimeMillis()); //Save DATS for Blast Mining
|
||||
PP.setBlastMiningInformed(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
||||
public void onPlayerChat(PlayerChatEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
@@ -322,11 +329,7 @@ public class mcPlayerListener implements Listener
|
||||
if(Party.getInstance().inSameParty(player, x))
|
||||
x.sendMessage(format);
|
||||
}
|
||||
if(Bukkit.getServer() instanceof ColouredConsoleSender)
|
||||
{
|
||||
ColouredConsoleSender ccs = (ColouredConsoleSender) Bukkit.getServer();
|
||||
ccs.sendMessage(ChatColor.GREEN+"[P]"+format); //Colors, woot!
|
||||
}
|
||||
log.log(Level.INFO, "[P](" + PP.getParty() + ")<" + name + ">" + event.getMessage());
|
||||
} else if (PP.getAdminChatMode()) {
|
||||
event.setCancelled(true);
|
||||
String name = (LoadProperties.aDisplayNames) ? player.getDisplayName() : player.getName();
|
||||
@@ -336,16 +339,10 @@ public class mcPlayerListener implements Listener
|
||||
if(x.isOp() || mcPermissions.getInstance().adminChat(x))
|
||||
x.sendMessage(format);
|
||||
}
|
||||
if(Bukkit.getServer() instanceof ColouredConsoleSender)
|
||||
{
|
||||
ColouredConsoleSender ccs = (ColouredConsoleSender) Bukkit.getServer();
|
||||
ccs.sendMessage(ChatColor.AQUA+"[A]"+format); //Colors, woot!
|
||||
} else {
|
||||
log.log(Level.INFO, "[A]"+format);
|
||||
}
|
||||
log.log(Level.INFO, "[A]<" + name + ">" + event.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Dynamically aliasing commands need to be re-done.
|
||||
// For now, using a command with an alias will send both the original command, and the mcMMO command
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
This file is part of mcMMO.
|
||||
|
||||
mcMMO 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.
|
||||
|
||||
mcMMO 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 mcMMO. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.gmail.nossr50.listeners;
|
||||
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
|
||||
import com.gmail.nossr50.events.McMMOPlayerXpGainEvent;
|
||||
|
||||
/**
|
||||
* Listener for listening to our own events, only really useful for catching errors
|
||||
*/
|
||||
public class mcSelfListener implements Listener {
|
||||
@EventHandler
|
||||
public void onPlayerXpGain(McMMOPlayerXpGainEvent event) {
|
||||
int xp = event.getXpGained();
|
||||
if(xp < 0) {
|
||||
try {
|
||||
throw new Exception("Gained negative XP!");
|
||||
} catch (Exception e) {
|
||||
System.out.println(e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,12 +26,14 @@ import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.*;
|
||||
import org.bukkit.event.player.PlayerAnimationEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import com.gmail.nossr50.config.*;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.FakeBlockBreakEvent;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.events.FakeBlockBreakEvent;
|
||||
import com.gmail.nossr50.events.McMMOItemSpawnEvent;
|
||||
import com.gmail.nossr50.skills.Repair;
|
||||
|
||||
public class m
|
||||
{
|
||||
@@ -53,25 +55,9 @@ public class m
|
||||
public static int getInt(String string)
|
||||
{
|
||||
if(isInt(string))
|
||||
{
|
||||
return Integer.parseInt(string);
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public static Double getDouble(String string)
|
||||
{
|
||||
if(isDouble(string))
|
||||
{
|
||||
return Double.parseDouble(string);
|
||||
}
|
||||
else
|
||||
{
|
||||
return (double) 0;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isDouble(String string)
|
||||
@@ -86,16 +72,51 @@ public class m
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean shouldBeWatched(Block block)
|
||||
/**
|
||||
* Checks to see if a block type awards XP.
|
||||
*
|
||||
* @param material Block type to check
|
||||
* @return true if the block type awards XP, false otherwise
|
||||
*/
|
||||
public static boolean shouldBeWatched(Material material)
|
||||
{
|
||||
int id = block.getTypeId();
|
||||
return shouldBeWatched(id);
|
||||
}
|
||||
public static boolean shouldBeWatched(int id) {
|
||||
return id == 2 || id == 3 || id == 12 || id == 13 || id == 82 || //Excavation
|
||||
id == 1 || id == 14 || id == 15 || id == 16 || id == 21 || id == 24 || id == 49 || id == 56 || id == 73 || id == 74 || id == 87 || id == 89 || id == 112 || id == 121 || id == 48 || id == 98 || //Mining
|
||||
id == 17 || id == 37 || id == 38 || id == 39 || id == 40 || id == 81 || id == 83 || id == 86 || id == 91 || id == 103 || id == 106 || id == 111 || //Woodcutting & Herbalism
|
||||
id == LoadProperties.anvilID; //Anvil
|
||||
switch(material){
|
||||
case BROWN_MUSHROOM:
|
||||
case CACTUS:
|
||||
case CLAY:
|
||||
case COAL_ORE:
|
||||
case DIAMOND_ORE:
|
||||
case DIRT:
|
||||
case ENDER_STONE:
|
||||
case GLOWING_REDSTONE_ORE:
|
||||
case GLOWSTONE:
|
||||
case GOLD_ORE:
|
||||
case GRASS:
|
||||
case GRAVEL:
|
||||
case IRON_ORE:
|
||||
case JACK_O_LANTERN:
|
||||
case LAPIS_ORE:
|
||||
case LOG:
|
||||
case MELON_BLOCK:
|
||||
case MOSSY_COBBLESTONE:
|
||||
case MYCEL:
|
||||
case NETHERRACK:
|
||||
case OBSIDIAN:
|
||||
case PUMPKIN:
|
||||
case RED_MUSHROOM:
|
||||
case RED_ROSE:
|
||||
case REDSTONE_ORE:
|
||||
case SAND:
|
||||
case SANDSTONE:
|
||||
case SOUL_SAND:
|
||||
case STONE:
|
||||
case SUGAR_CANE_BLOCK:
|
||||
case VINE:
|
||||
case WATER_LILY:
|
||||
case YELLOW_FLOWER:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static int getPowerLevel(Player player)
|
||||
@@ -129,8 +150,15 @@ public class m
|
||||
return x;
|
||||
}
|
||||
|
||||
public static boolean blockBreakSimulate(Block block, Player player)
|
||||
public static boolean blockBreakSimulate(Block block, Player player, Boolean shouldArmSwing)
|
||||
{
|
||||
//Support for NoCheat
|
||||
if(shouldArmSwing)
|
||||
{
|
||||
PlayerAnimationEvent armswing = new PlayerAnimationEvent(player);
|
||||
Bukkit.getPluginManager().callEvent(armswing);
|
||||
}
|
||||
|
||||
FakeBlockBreakEvent event = new FakeBlockBreakEvent(block, player);
|
||||
if(block != null && player != null){
|
||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||
@@ -144,112 +172,66 @@ public class m
|
||||
return false; //Return false if something went wrong
|
||||
}
|
||||
}
|
||||
|
||||
public static void damageTool(Player player, short damage)
|
||||
{
|
||||
if(player.getItemInHand().getTypeId() == 0)
|
||||
return;
|
||||
player.getItemInHand().setDurability((short) (player.getItemInHand().getDurability() + damage));
|
||||
if(player.getItemInHand().getDurability() >= getMaxDurability(getTier(player), player.getItemInHand()))
|
||||
{
|
||||
ItemStack[] inventory = player.getInventory().getContents();
|
||||
for(ItemStack x : inventory)
|
||||
{
|
||||
if(x != null && x.getTypeId() == player.getItemInHand().getTypeId() && x.getDurability() == player.getItemInHand().getDurability()){
|
||||
x.setTypeId(0);
|
||||
x.setAmount(0);
|
||||
player.getInventory().setContents(inventory);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static Integer getTier(Player player)
|
||||
{
|
||||
int i = player.getItemInHand().getTypeId();
|
||||
if(i == 268 || i == 269 || i == 270 || i == 271 || i == 290){
|
||||
return 1; //WOOD
|
||||
} else if (i == 272 || i == 273 || i == 274 || i == 275 || i == 291){
|
||||
return 2; //STONE
|
||||
} else if (i == 256 || i == 257 || i == 258 || i == 267 || i == 292){
|
||||
return 3; //IRON
|
||||
} else if (i == 283 || i == 284 || i == 285 || i == 286 || i == 294){
|
||||
return 1; //GOLD
|
||||
} else if (i == 276 || i == 277 || i == 278 || i == 279 || i == 293){
|
||||
return 4; //DIAMOND
|
||||
} else {
|
||||
return 1; //UNRECOGNIZED
|
||||
}
|
||||
ItemStack is = player.getItemInHand();
|
||||
if(Repair.isWoodTools(is))
|
||||
return 1;
|
||||
if(Repair.isStoneTools(is))
|
||||
return 2;
|
||||
if(Repair.isIronTools(is))
|
||||
return 3;
|
||||
if(Repair.isGoldTools(is))
|
||||
return 1;
|
||||
if(Repair.isDiamondTools(is))
|
||||
return 4;
|
||||
|
||||
return 1;
|
||||
}
|
||||
public static Integer getMaxDurability(Integer tier, ItemStack item)
|
||||
{
|
||||
int id = item.getTypeId();
|
||||
if(tier == 1){
|
||||
if((id == 283 || id == 284 || id == 285 || id == 286 || id == 294)){
|
||||
return 33; //GOLD
|
||||
} else {
|
||||
return 60; //WOOD
|
||||
}
|
||||
} else if (tier == 2){
|
||||
return 132;
|
||||
} else if (tier == 3){
|
||||
return 251;
|
||||
} else if (tier == 4){
|
||||
return 1562;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public static double getDistance(Location loca, Location locb)
|
||||
{
|
||||
return Math.sqrt(Math.pow(loca.getX() - locb.getX(), 2) + Math.pow(loca.getY() - locb.getY(), 2)
|
||||
+ Math.pow(loca.getZ() - locb.getZ(), 2));
|
||||
}
|
||||
|
||||
public static boolean abilityBlockCheck(Block block)
|
||||
{
|
||||
int i = block.getTypeId();
|
||||
if(i == 107 ||i == 117 || i == 116 || i == 96 || i == 68 || i == 355 || i == 26 || i == 323 || i == 25 || i == 54 || i == 69 || i == 92 || i == 77 || i == 58 || i == 61 || i == 62 || i == LoadProperties.anvilID || i == 71 || i == 64 || i == 84 || i == 324 || i == 330){
|
||||
return false;
|
||||
} else {
|
||||
|
||||
public static boolean isNear(Location first, Location second, int maxDistance) {
|
||||
double relX = first.getX() - second.getX();
|
||||
double relY = first.getY() - second.getY();
|
||||
double relZ = first.getZ() - second.getZ();
|
||||
double dist = relX * relX + relY * relY + relZ * relZ;
|
||||
|
||||
if (dist < maxDistance * maxDistance)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isBlockAround(Location loc, Integer radius, Integer typeid)
|
||||
{
|
||||
Block blockx = loc.getBlock();
|
||||
int ox = blockx.getX();
|
||||
int oy = blockx.getY();
|
||||
int oz = blockx.getZ();
|
||||
for (int cx = -radius; cx <= radius; cx++) {
|
||||
for (int cy = -radius; cy <= radius; cy++) {
|
||||
for (int cz = -radius; cz <= radius; cz++) {
|
||||
Block block = loc.getWorld().getBlockAt(ox + cx, oy + cy, oz + cz);
|
||||
if (block.getTypeId() == typeid) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static Integer calculateHealth(Integer health, Integer newvalue){
|
||||
if((health + newvalue) > 20){
|
||||
return 20;
|
||||
} else {
|
||||
return health+newvalue;
|
||||
}
|
||||
}
|
||||
public Integer calculateMinusHealth(Integer health, Integer newvalue){
|
||||
if((health - newvalue) < 1){
|
||||
return 0;
|
||||
} else {
|
||||
return health-newvalue;
|
||||
|
||||
public static boolean abilityBlockCheck(Block block)
|
||||
{
|
||||
switch(block.getType()){
|
||||
case BED_BLOCK:
|
||||
case BREWING_STAND:
|
||||
case BURNING_FURNACE:
|
||||
case CAKE_BLOCK:
|
||||
case CHEST:
|
||||
case DISPENSER:
|
||||
case ENCHANTMENT_TABLE:
|
||||
case FENCE_GATE:
|
||||
case FURNACE:
|
||||
case IRON_DOOR_BLOCK:
|
||||
case JUKEBOX:
|
||||
case LEVER:
|
||||
case NOTE_BLOCK:
|
||||
case STONE_BUTTON:
|
||||
case TRAP_DOOR:
|
||||
case WALL_SIGN:
|
||||
case WOODEN_DOOR:
|
||||
case WORKBENCH:
|
||||
return false;
|
||||
}
|
||||
|
||||
if(block.getTypeId() == LoadProperties.anvilID)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean isInt(String string)
|
||||
{
|
||||
try
|
||||
@@ -262,14 +244,25 @@ public class m
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public static void mcDropItem(Location location, int id)
|
||||
|
||||
public static void mcDropItems(Location location, ItemStack is, int quantity)
|
||||
{
|
||||
if(location == null) return;
|
||||
|
||||
Material mat = Material.getMaterial(id);
|
||||
ItemStack item = new ItemStack(mat, 1, (byte) 0, (byte) 0);
|
||||
mcDropItem(location, item);
|
||||
for(int i = 0; i < quantity; i++)
|
||||
mcDropItem(location, is);
|
||||
}
|
||||
|
||||
public static void mcRandomDropItem(Location location, ItemStack is, int chance)
|
||||
{
|
||||
if(Math.random() * 100 < chance)
|
||||
mcDropItem(location, is);
|
||||
}
|
||||
|
||||
public static void mcRandomDropItems(Location location, ItemStack is, int chance, int quantity)
|
||||
{
|
||||
for(int i = 0; i < quantity; i++)
|
||||
mcRandomDropItem(location, is, chance);
|
||||
}
|
||||
|
||||
public static void mcDropItem(Location location, ItemStack itemStack) {
|
||||
// We can't get the item until we spawn it and we want to make it cancellable, so we have a custom event.
|
||||
McMMOItemSpawnEvent event = new McMMOItemSpawnEvent(location, itemStack);
|
||||
@@ -281,38 +274,132 @@ public class m
|
||||
|
||||
public static boolean isSwords(ItemStack is)
|
||||
{
|
||||
int id = is.getTypeId();
|
||||
return id == 268 || id == 267 || id == 272 || id == 283 || id == 276;
|
||||
switch(is.getType()){
|
||||
case DIAMOND_SWORD:
|
||||
case GOLD_SWORD:
|
||||
case IRON_SWORD:
|
||||
case STONE_SWORD:
|
||||
case WOOD_SWORD:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isHoe(ItemStack is)
|
||||
{
|
||||
int id = is.getTypeId();
|
||||
return id == 290 || id == 291 || id == 292 || id == 293 || id == 294;
|
||||
switch(is.getType()){
|
||||
case DIAMOND_HOE:
|
||||
case GOLD_HOE:
|
||||
case IRON_HOE:
|
||||
case STONE_HOE:
|
||||
case WOOD_HOE:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isShovel(ItemStack is)
|
||||
{
|
||||
int id = is.getTypeId();
|
||||
return id == 269 || id == 273 || id == 277 || id == 284 || id == 256;
|
||||
switch(is.getType()){
|
||||
case DIAMOND_SPADE:
|
||||
case GOLD_SPADE:
|
||||
case IRON_SPADE:
|
||||
case STONE_SPADE:
|
||||
case WOOD_SPADE:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isAxes(ItemStack is)
|
||||
{
|
||||
int id = is.getTypeId();
|
||||
return id == 271 || id == 258 || id == 286 || id == 279 || id == 275;
|
||||
switch(is.getType()){
|
||||
case DIAMOND_AXE:
|
||||
case GOLD_AXE:
|
||||
case IRON_AXE:
|
||||
case STONE_AXE:
|
||||
case WOOD_AXE:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isMiningPick(ItemStack is)
|
||||
{
|
||||
int id = is.getTypeId();
|
||||
return id == 270 || id == 274 || id == 285 || id == 257 || id == 278;
|
||||
switch(is.getType()){
|
||||
case DIAMOND_PICKAXE:
|
||||
case GOLD_PICKAXE:
|
||||
case IRON_PICKAXE:
|
||||
case STONE_PICKAXE:
|
||||
case WOOD_PICKAXE:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// public boolean isGold(ItemStack is)
|
||||
// {
|
||||
// int id = is.getTypeId();
|
||||
// return id == 283 || id == 284 || id == 285 || id == 286 || id == 294 || id == 314 || id == 315 || id == 316 || id == 317;
|
||||
// }
|
||||
|
||||
public static boolean isHelmet(ItemStack is)
|
||||
{
|
||||
switch(is.getType()){
|
||||
case DIAMOND_HELMET:
|
||||
case GOLD_HELMET:
|
||||
case IRON_HELMET:
|
||||
case LEATHER_HELMET:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isChestplate(ItemStack is)
|
||||
{
|
||||
switch(is.getType()){
|
||||
case DIAMOND_CHESTPLATE:
|
||||
case GOLD_CHESTPLATE:
|
||||
case IRON_CHESTPLATE:
|
||||
case LEATHER_CHESTPLATE:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isPants(ItemStack is)
|
||||
{
|
||||
switch(is.getType()){
|
||||
case DIAMOND_LEGGINGS:
|
||||
case GOLD_LEGGINGS:
|
||||
case IRON_LEGGINGS:
|
||||
case LEATHER_LEGGINGS:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isBoots(ItemStack is)
|
||||
{
|
||||
switch(is.getType()){
|
||||
case DIAMOND_BOOTS:
|
||||
case GOLD_BOOTS:
|
||||
case IRON_BOOTS:
|
||||
case LEATHER_BOOTS:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isOre(Block block)
|
||||
{
|
||||
switch (block.getType()) {
|
||||
case COAL_ORE:
|
||||
case DIAMOND_ORE:
|
||||
case GLOWING_REDSTONE_ORE:
|
||||
case GOLD_ORE:
|
||||
case IRON_ORE:
|
||||
case LAPIS_ORE:
|
||||
case REDSTONE_ORE:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void convertToMySQL()
|
||||
{
|
||||
if(!LoadProperties.useMySQL)
|
||||
@@ -405,8 +492,6 @@ public class m
|
||||
+ LoadProperties.MySQLtablePrefix
|
||||
+ "users SET lastlogin = " + 0
|
||||
+ " WHERE id = " + id);
|
||||
//if(getDouble(x) > 0 && getDouble(y) > 0 && getDouble(z) > 0)
|
||||
//mcMMO.database.Write("UPDATE "+LoadProperties.MySQLtablePrefix+"spawn SET world = '" + myspawnworld + "', x = " +getDouble(x)+", y = "+getDouble(y)+", z = "+getDouble(z)+" WHERE user_id = "+id);
|
||||
mcMMO.database.Write("UPDATE "
|
||||
+ LoadProperties.MySQLtablePrefix
|
||||
+ "skills SET " + " taming = taming+"
|
||||
@@ -456,9 +541,6 @@ public class m
|
||||
+ LoadProperties.MySQLtablePrefix
|
||||
+ "users WHERE user = '"
|
||||
+ playerName + "'");
|
||||
mcMMO.database.Write("INSERT INTO "
|
||||
+ LoadProperties.MySQLtablePrefix
|
||||
+ "spawn (user_id) VALUES (" + id + ")");
|
||||
mcMMO.database.Write("INSERT INTO "
|
||||
+ LoadProperties.MySQLtablePrefix
|
||||
+ "skills (user_id) VALUES (" + id + ")");
|
||||
@@ -475,10 +557,6 @@ public class m
|
||||
+ LoadProperties.MySQLtablePrefix
|
||||
+ "users SET party = '" + party
|
||||
+ "' WHERE id = " + id);
|
||||
/*
|
||||
if(getDouble(x) > 0 && getDouble(y) > 0 && getDouble(z) > 0)
|
||||
mcMMO.database.Write("UPDATE "+LoadProperties.MySQLtablePrefix+"spawn SET world = '" + myspawnworld + "', x = " +getDouble(x)+", y = "+getDouble(y)+", z = "+getDouble(z)+" WHERE user_id = "+id);
|
||||
*/
|
||||
mcMMO.database.Write("UPDATE "
|
||||
+ LoadProperties.MySQLtablePrefix
|
||||
+ "skills SET " + " taming = "
|
||||
@@ -525,4 +603,4 @@ public class m
|
||||
}
|
||||
}, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,19 @@
|
||||
/*
|
||||
This file is part of mcMMO.
|
||||
Copyright (C) 2012 Matt 'The Yeti' Burnett & mcMMO Development
|
||||
Copyright (C) 2010-2011 'nossr50'
|
||||
|
||||
mcMMO is free software: you can redistribute it and/or modify
|
||||
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.
|
||||
|
||||
mcMMO is distributed in the hope that it will be useful,
|
||||
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 mcMMO. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.gmail.nossr50;
|
||||
|
||||
@@ -32,7 +33,6 @@ import com.gmail.nossr50.listeners.mcPlayerListener;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.party.Party;
|
||||
import com.gmail.nossr50.skills.*;
|
||||
import com.nijikokun.bukkit.Permissions.Permissions;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
@@ -45,16 +45,20 @@ import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.PluginDescriptionFile;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.getspout.spoutapi.SpoutManager;
|
||||
import org.getspout.spoutapi.player.FileManager;
|
||||
@@ -62,17 +66,6 @@ import org.getspout.spoutapi.player.FileManager;
|
||||
|
||||
public class mcMMO extends JavaPlugin
|
||||
{
|
||||
/*
|
||||
* I never expected mcMMO to get so popular!
|
||||
* Thanks for all the support for the mod
|
||||
* Thanks to the people who have worked on the code
|
||||
* Thanks to the donators who helped me out financially
|
||||
* Thanks to the server admins who use my mod :)
|
||||
*
|
||||
* This mod is open source, and its going to stay that way >:3
|
||||
*
|
||||
* Donate via paypal to nossr50@gmail.com (A million thanks to anyone that does!)
|
||||
*/
|
||||
|
||||
public static String maindirectory = "plugins" + File.separator + "mcMMO";
|
||||
File file = new File(maindirectory + File.separator + "config.yml");
|
||||
@@ -83,12 +76,14 @@ public class mcMMO extends JavaPlugin
|
||||
private final mcBlockListener blockListener = new mcBlockListener(this);
|
||||
private final mcEntityListener entityListener = new mcEntityListener(this);
|
||||
|
||||
public static mcPermissions permissionHandler = new mcPermissions();
|
||||
private Permissions permissions;
|
||||
//Queue for block data change for R2+ fix
|
||||
public ArrayDeque<Block> changeQueue = new ArrayDeque<Block>();
|
||||
public ArrayDeque<Block> fastChangeQueue = new ArrayDeque<Block>();
|
||||
|
||||
private Runnable mcMMO_Timer = new mcTimer(this); //BLEED AND REGENERATION
|
||||
private Runnable ChangeDataValueTimer = new ChangeDataValueTimer(this); //R2 block place workaround
|
||||
//private Timer mcMMO_SpellTimer = new Timer(true);
|
||||
private Runnable mcMMO_SaveTimer = new mcSaveTimer(this); //Periodic saving of Player Data
|
||||
private Runnable ChangeDataValueTimer = new ChangeDataValueTimer(changeQueue); //R2 block place workaround
|
||||
private Runnable FastChangeDataValueTimer = new ChangeDataValueTimer(fastChangeQueue);
|
||||
|
||||
//Alias - Command
|
||||
public HashMap<String, String> aliasMap = new HashMap<String, String>();
|
||||
@@ -98,14 +93,14 @@ public class mcMMO extends JavaPlugin
|
||||
|
||||
//Config file stuff
|
||||
LoadProperties config;
|
||||
LoadTreasures config2;
|
||||
|
||||
//Jar stuff
|
||||
public static File mcmmo;
|
||||
|
||||
//Queue for block data change for R2+ fix
|
||||
public ArrayDeque<Block> changeQueue = new ArrayDeque<Block>();
|
||||
|
||||
public void onEnable()
|
||||
{
|
||||
final Plugin thisPlugin = this;
|
||||
mcmmo = this.getFile();
|
||||
new File(maindirectory).mkdir();
|
||||
|
||||
@@ -128,6 +123,9 @@ public class mcMMO extends JavaPlugin
|
||||
this.config = new LoadProperties(this);
|
||||
this.config.load();
|
||||
|
||||
this.config2 = new LoadTreasures(this);
|
||||
this.config2.load();
|
||||
|
||||
Party.getInstance().loadParties();
|
||||
new Party(this);
|
||||
|
||||
@@ -150,7 +148,6 @@ public class mcMMO extends JavaPlugin
|
||||
pm.registerEvents(entityListener, this);
|
||||
|
||||
PluginDescriptionFile pdfFile = this.getDescription();
|
||||
mcPermissions.initialize(getServer());
|
||||
|
||||
if(LoadProperties.useMySQL)
|
||||
{
|
||||
@@ -162,9 +159,13 @@ public class mcMMO extends JavaPlugin
|
||||
for(Player player : getServer().getOnlinePlayers()){Users.addUser(player);} //In case of reload add all users back into PlayerProfile
|
||||
System.out.println(pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!" );
|
||||
|
||||
//Periodic save timer (Saves every 10 minutes)
|
||||
Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, mcMMO_SaveTimer, 0, LoadProperties.saveInterval * 1200);
|
||||
|
||||
Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, mcMMO_Timer, 0, 20);
|
||||
//R2+ block place fix
|
||||
Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, ChangeDataValueTimer, 0, 10);
|
||||
Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, FastChangeDataValueTimer, 0, 1);
|
||||
|
||||
registerCommands();
|
||||
|
||||
@@ -177,17 +178,23 @@ public class mcMMO extends JavaPlugin
|
||||
|
||||
FileManager FM = SpoutManager.getFileManager();
|
||||
FM.addToPreLoginCache(this, SpoutStuff.getFiles());
|
||||
|
||||
/*
|
||||
Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this,
|
||||
new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
mmoHelper.updateAll();
|
||||
}
|
||||
}, 20, 20);
|
||||
*/
|
||||
}
|
||||
|
||||
if(LoadProperties.statsTracking) {
|
||||
//Plugin Metrics running in a new thread
|
||||
new Thread(new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
// create a new metrics object
|
||||
Metrics metrics = new Metrics();
|
||||
|
||||
// 'this' in this context is the Plugin object
|
||||
metrics.beginMeasuringPlugin(thisPlugin);
|
||||
} catch (IOException e) {
|
||||
// Failed to submit the stats :-(
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,12 +256,18 @@ public class mcMMO extends JavaPlugin
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
return PP.inParty();
|
||||
}
|
||||
public Permissions getPermissions() {
|
||||
return permissions;
|
||||
}
|
||||
public void onDisable() {
|
||||
Bukkit.getServer().getScheduler().cancelTasks(this);
|
||||
System.out.println("mcMMO was disabled.");
|
||||
|
||||
public void onDisable()
|
||||
{
|
||||
//Make sure to save player information if the server shuts down
|
||||
for(Player x : Bukkit.getServer().getOnlinePlayers())
|
||||
{
|
||||
Users.getProfile(x).save();
|
||||
}
|
||||
|
||||
Bukkit.getServer().getScheduler().cancelTasks(this); //This removes our tasks
|
||||
|
||||
System.out.println("mcMMO was disabled."); //How informative!
|
||||
}
|
||||
|
||||
private void registerCommands() {
|
||||
@@ -290,6 +303,7 @@ public class mcMMO extends JavaPlugin
|
||||
getCommand("woodcutting").setExecutor(new WoodcuttingCommand());
|
||||
|
||||
//Mc* commands
|
||||
if(LoadProperties.mcremoveEnable) getCommand("mcremove").setExecutor(new McremoveCommand());
|
||||
if(LoadProperties.mcabilityEnable) getCommand("mcability").setExecutor(new McabilityCommand());
|
||||
if(LoadProperties.mccEnable) getCommand("mcc").setExecutor(new MccCommand());
|
||||
if(LoadProperties.mcgodEnable) getCommand("mcgod").setExecutor(new McgodCommand());
|
||||
@@ -307,12 +321,11 @@ public class mcMMO extends JavaPlugin
|
||||
|
||||
//Other commands
|
||||
if(LoadProperties.addxpEnable) getCommand("addxp").setExecutor(new AddxpCommand(this));
|
||||
if(LoadProperties.clearmyspawnEnable) getCommand("clearmyspawn").setExecutor(new ClearmyspawnCommand());
|
||||
if(LoadProperties.addlevelsEnable) getCommand("addlevels").setExecutor(new AddlevelsCommand(this));
|
||||
if(LoadProperties.mmoeditEnable) getCommand("mmoedit").setExecutor(new MmoeditCommand(this));
|
||||
getCommand("mmoupdate").setExecutor(new MmoupdateCommand());
|
||||
if(LoadProperties.myspawnEnable) getCommand("myspawn").setExecutor(new MyspawnCommand());
|
||||
if(LoadProperties.statsEnable) getCommand("stats").setExecutor(new StatsCommand());
|
||||
if(LoadProperties.whoisEnable) getCommand("whois").setExecutor(new WhoisCommand(this));
|
||||
if(LoadProperties.mcstatsEnable) getCommand("mcstats").setExecutor(new McstatsCommand());
|
||||
if(LoadProperties.inspectEnable) getCommand("inspect").setExecutor(new InspectCommand(this));
|
||||
if(LoadProperties.xprateEnable) getCommand("xprate").setExecutor(new XprateCommand());
|
||||
|
||||
//Spout commands
|
||||
@@ -374,4 +387,43 @@ public class mcMMO extends JavaPlugin
|
||||
|
||||
return new String(buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
* Boilerplate Custom Config Stuff
|
||||
*/
|
||||
|
||||
private FileConfiguration treasuresConfig = null;
|
||||
private File treasuresConfigFile = null;
|
||||
|
||||
public void reloadTreasuresConfig() {
|
||||
if (treasuresConfigFile == null) {
|
||||
treasuresConfigFile = new File(getDataFolder(), "treasures.yml");
|
||||
}
|
||||
treasuresConfig = YamlConfiguration.loadConfiguration(treasuresConfigFile);
|
||||
|
||||
// Look for defaults in the jar
|
||||
InputStream defConfigStream = getResource("treasures.yml");
|
||||
if (defConfigStream != null) {
|
||||
YamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defConfigStream);
|
||||
treasuresConfig.setDefaults(defConfig);
|
||||
}
|
||||
}
|
||||
|
||||
public FileConfiguration getTreasuresConfig() {
|
||||
if (treasuresConfig == null) {
|
||||
reloadTreasuresConfig();
|
||||
}
|
||||
return treasuresConfig;
|
||||
}
|
||||
|
||||
public void saveTreasuresConfig() {
|
||||
if (treasuresConfig == null || treasuresConfigFile == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
treasuresConfig.save(treasuresConfigFile);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(JavaPlugin.class.getName()).log(Level.SEVERE, "Could not save config to " + treasuresConfigFile, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,337 +16,121 @@
|
||||
*/
|
||||
package com.gmail.nossr50;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import ru.tehkode.permissions.PermissionManager;
|
||||
import ru.tehkode.permissions.bukkit.PermissionsEx;
|
||||
|
||||
import com.nijiko.permissions.PermissionHandler;
|
||||
import com.nijikokun.bukkit.Permissions.Permissions;
|
||||
|
||||
public class mcPermissions
|
||||
{
|
||||
private static volatile mcPermissions instance;
|
||||
|
||||
private enum PermissionType {
|
||||
PEX, PERMISSIONS, BUKKIT
|
||||
}
|
||||
|
||||
private static PermissionType permissionType;
|
||||
private static Object PHandle;
|
||||
public static boolean permissionsEnabled = false;
|
||||
|
||||
public static void initialize(Server server)
|
||||
{
|
||||
Logger log = Logger.getLogger("Minecraft");
|
||||
|
||||
if(permissionsEnabled && permissionType != PermissionType.PERMISSIONS) return;
|
||||
|
||||
Plugin PEXtest = server.getPluginManager().getPlugin("PermissionsEx");
|
||||
Plugin test = server.getPluginManager().getPlugin("Permissions");
|
||||
if(PEXtest != null) {
|
||||
PHandle = (PermissionManager) PermissionsEx.getPermissionManager();
|
||||
permissionType = PermissionType.PEX;
|
||||
permissionsEnabled = true;
|
||||
log.info("[mcMMO] PermissionsEx found, using PermissionsEx.");
|
||||
} else if(test != null) {
|
||||
PHandle = (PermissionHandler) ((Permissions) test).getHandler();
|
||||
permissionType = PermissionType.PERMISSIONS;
|
||||
permissionsEnabled = true;
|
||||
log.info("[mcMMO] Permissions version "+test.getDescription().getVersion()+" found, using Permissions.");
|
||||
} else {
|
||||
permissionType = PermissionType.BUKKIT;
|
||||
permissionsEnabled = true;
|
||||
log.info("[mcMMO] Using Bukkit Permissions.");
|
||||
}
|
||||
public boolean permission(Player player, String perm) {
|
||||
return player.hasPermission(perm);
|
||||
}
|
||||
|
||||
public static boolean getEnabled()
|
||||
{
|
||||
return permissionsEnabled;
|
||||
}
|
||||
|
||||
public static boolean permission(Player player, String permission)
|
||||
{
|
||||
if(!permissionsEnabled) return player.isOp();
|
||||
switch(permissionType) {
|
||||
case PEX:
|
||||
return ((PermissionManager) PHandle).has(player, permission);
|
||||
case PERMISSIONS:
|
||||
return ((PermissionHandler) PHandle).has(player, permission);
|
||||
case BUKKIT:
|
||||
return player.hasPermission(permission);
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public boolean admin(Player player){
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.admin");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.admin");
|
||||
}
|
||||
public boolean mcrefresh(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.tools.mcrefresh");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.tools.mcrefresh");
|
||||
}
|
||||
public boolean mcremove(Player player) {
|
||||
return player.hasPermission("mcmmo.tools.mcremove");
|
||||
}
|
||||
public boolean mmoedit(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.tools.mmoedit");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.tools.mmoedit");
|
||||
}
|
||||
public boolean herbalismAbility(Player player){
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.ability.herbalism");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.ability.herbalism");
|
||||
}
|
||||
public boolean excavationAbility(Player player){
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.ability.excavation");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.ability.excavation");
|
||||
}
|
||||
public boolean unarmedAbility(Player player){
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.ability.unarmed");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.ability.unarmed");
|
||||
}
|
||||
public boolean chimaeraWing(Player player){
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.item.chimaerawing");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.item.chimaerawing");
|
||||
}
|
||||
public boolean miningAbility(Player player){
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.ability.mining");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.ability.mining");
|
||||
}
|
||||
public boolean axesAbility(Player player){
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.ability.axes");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.ability.axes");
|
||||
}
|
||||
public boolean swordsAbility(Player player){
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.ability.swords");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.ability.swords");
|
||||
}
|
||||
public boolean woodCuttingAbility(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.ability.woodcutting");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.ability.woodcutting");
|
||||
}
|
||||
public boolean mcgod(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.tools.mcgod");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public boolean regeneration(Player player){
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.regeneration");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.tools.mcgod");
|
||||
}
|
||||
public boolean motd(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.motd");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.motd");
|
||||
}
|
||||
public boolean mcAbility(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.commands.ability");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public boolean mySpawn(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.commands.myspawn");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public boolean setMySpawn(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.commands.setmyspawn");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.commands.ability");
|
||||
}
|
||||
public boolean partyChat(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.chat.partychat");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.chat.partychat");
|
||||
}
|
||||
public boolean partyLock(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.chat.partylock");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.chat.partylock");
|
||||
}
|
||||
public boolean partyTeleport(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.commands.ptp");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.commands.ptp");
|
||||
}
|
||||
public boolean whois(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.commands.whois");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
public boolean inspect(Player player) {
|
||||
return player.hasPermission("mcmmo.commands.inspect");
|
||||
}
|
||||
public boolean party(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.commands.party");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.commands.party");
|
||||
}
|
||||
public boolean adminChat(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.chat.adminchat");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.chat.adminchat");
|
||||
}
|
||||
public static mcPermissions getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new mcPermissions();
|
||||
instance = new mcPermissions();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
public boolean taming(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.skills.taming");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.skills.taming");
|
||||
}
|
||||
public boolean mining(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.skills.mining");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.skills.mining");
|
||||
}
|
||||
public boolean blastMining(Player player) {
|
||||
return player.hasPermission("mcmmo.skills.blastmining");
|
||||
}
|
||||
public boolean fishing(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.skills.fishing");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public boolean alchemy(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.skills.alchemy");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public boolean enchanting(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.skills.enchanting");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.skills.fishing");
|
||||
}
|
||||
public boolean woodcutting(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.skills.woodcutting");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.skills.woodcutting");
|
||||
}
|
||||
public boolean repair(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.skills.repair");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.skills.repair");
|
||||
}
|
||||
public boolean unarmed(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.skills.unarmed");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.skills.unarmed");
|
||||
}
|
||||
public boolean archery(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.skills.archery");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.skills.archery");
|
||||
}
|
||||
public boolean herbalism(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.skills.herbalism");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.skills.herbalism");
|
||||
}
|
||||
public boolean excavation(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.skills.excavation");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.skills.excavation");
|
||||
}
|
||||
public boolean swords(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.skills.swords");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.skills.swords");
|
||||
}
|
||||
public boolean axes(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.skills.axes");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.skills.axes");
|
||||
}
|
||||
public boolean acrobatics(Player player) {
|
||||
if (permissionsEnabled) {
|
||||
return permission(player, "mcmmo.skills.acrobatics");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return player.hasPermission("mcmmo.skills.acrobatics");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,10 +32,8 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.spout.util.ArrayListString;
|
||||
|
||||
|
||||
public class Party
|
||||
@@ -118,7 +116,6 @@ public class Party
|
||||
|
||||
public void informPartyMembers(Player player, Player[] players)
|
||||
{
|
||||
int x = 0;
|
||||
for(Player p : players)
|
||||
{
|
||||
if(player != null && p != null)
|
||||
@@ -126,7 +123,6 @@ public class Party
|
||||
if(inSameParty(player, p) && !p.getName().equals(player.getName()))
|
||||
{
|
||||
p.sendMessage(mcLocale.getString("Party.InformedOnJoin", new Object[] {player.getName()}));
|
||||
x++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -148,22 +144,6 @@ public class Party
|
||||
}
|
||||
return players;
|
||||
}
|
||||
public ArrayListString getPartyMembersByName(Player player)
|
||||
{
|
||||
ArrayListString players = new ArrayListString();
|
||||
|
||||
for(Player p : Bukkit.getServer().getOnlinePlayers())
|
||||
{
|
||||
if(p.isOnline())
|
||||
{
|
||||
if(inSameParty(player, p))
|
||||
{
|
||||
players.add(p.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
return players;
|
||||
}
|
||||
|
||||
public void informPartyMembersOwnerChange(String newOwner) {
|
||||
Player newOwnerPlayer = plugin.getServer().getPlayer(newOwner);
|
||||
@@ -171,14 +151,12 @@ public class Party
|
||||
}
|
||||
|
||||
public void informPartyMembersOwnerChange(Player newOwner, Player[] players) {
|
||||
int x = 0;
|
||||
for(Player p : players){
|
||||
if(newOwner != null && p != null){
|
||||
if(inSameParty(newOwner, p))
|
||||
{
|
||||
//TODO: Needs more locale.
|
||||
p.sendMessage(newOwner.getName()+" is the new party owner.");
|
||||
x++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -191,13 +169,11 @@ public class Party
|
||||
|
||||
public void informPartyMembersQuit(Player player, Player[] players)
|
||||
{
|
||||
int x = 0;
|
||||
for(Player p : players){
|
||||
if(player != null && p != null){
|
||||
if(inSameParty(player, p) && !p.getName().equals(player.getName()))
|
||||
{
|
||||
p.sendMessage(mcLocale.getString("Party.InformedOnQuit", new Object[] {player.getName()}));
|
||||
x++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,30 +16,30 @@
|
||||
*/
|
||||
package com.gmail.nossr50.runnables;
|
||||
|
||||
import org.bukkit.block.Block;
|
||||
import java.util.ArrayDeque;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import org.bukkit.block.Block;
|
||||
|
||||
/*
|
||||
* This file was created for a breakage introduced in 1.1-R2
|
||||
* It should be removed afterwards if the breakage is removed.
|
||||
*/
|
||||
public class ChangeDataValueTimer implements Runnable {
|
||||
private mcMMO plugin;
|
||||
private ArrayDeque<Block> queue;
|
||||
|
||||
public ChangeDataValueTimer(mcMMO instance) {
|
||||
this.plugin = instance;
|
||||
public ChangeDataValueTimer(ArrayDeque<Block> queue) {
|
||||
this.queue = queue;
|
||||
}
|
||||
|
||||
public void run() {
|
||||
int size = plugin.changeQueue.size();
|
||||
int size = queue.size();
|
||||
if(size == 0) return;
|
||||
if(size > 25) {
|
||||
size = (int) Math.floor(size / 10);
|
||||
}
|
||||
|
||||
for(int i = 0; i < size; i++) {
|
||||
Block change = plugin.changeQueue.poll();
|
||||
Block change = queue.poll();
|
||||
if(change == null) continue;
|
||||
change.setData((byte) 5);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.gmail.nossr50.runnables;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.Users;
|
||||
|
||||
public class RemoveProfileFromMemoryTask implements Runnable {
|
||||
private Player player;
|
||||
|
||||
public RemoveProfileFromMemoryTask(Player player) {
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Users.removeUser(player);
|
||||
}
|
||||
}
|
||||
40
src/main/java/com/gmail/nossr50/runnables/mcSaveTimer.java
Normal file
40
src/main/java/com/gmail/nossr50/runnables/mcSaveTimer.java
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
This file is part of mcMMO.
|
||||
|
||||
mcMMO 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.
|
||||
|
||||
mcMMO 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 mcMMO. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.gmail.nossr50.runnables;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
|
||||
public class mcSaveTimer implements Runnable {
|
||||
private final mcMMO plugin;
|
||||
|
||||
public mcSaveTimer(final mcMMO plugin)
|
||||
{
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
public void run()
|
||||
{
|
||||
//All player data will be saved periodically through this
|
||||
for(Player player : plugin.getServer().getOnlinePlayers())
|
||||
{
|
||||
Users.getProfile(player).save();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,10 @@ import org.bukkit.entity.*;
|
||||
import com.gmail.nossr50.Combat;
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.AbilityType;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.skills.Skills;
|
||||
import com.gmail.nossr50.skills.Swords;
|
||||
|
||||
@@ -50,20 +53,43 @@ public class mcTimer implements Runnable
|
||||
/*
|
||||
* MONITOR SKILLS
|
||||
*/
|
||||
Skills.monitorSkills(player, PP, curTime);
|
||||
Skills.monitorSkill(player, PP, curTime, SkillType.AXES);
|
||||
Skills.monitorSkill(player, PP, curTime, SkillType.EXCAVATION);
|
||||
Skills.monitorSkill(player, PP, curTime, SkillType.HERBALISM);
|
||||
Skills.monitorSkill(player, PP, curTime, SkillType.MINING);
|
||||
Skills.monitorSkill(player, PP, curTime, SkillType.SWORDS);
|
||||
Skills.monitorSkill(player, PP, curTime, SkillType.UNARMED);
|
||||
Skills.monitorSkill(player, PP, curTime, SkillType.WOODCUTTING);
|
||||
|
||||
/*
|
||||
* COOLDOWN MONITORING
|
||||
*/
|
||||
Skills.watchCooldowns(player, PP, curTime);
|
||||
Skills.watchCooldown(player, PP, curTime, AbilityType.SKULL_SPLIITER);
|
||||
Skills.watchCooldown(player, PP, curTime, AbilityType.GIGA_DRILL_BREAKER);
|
||||
Skills.watchCooldown(player, PP, curTime, AbilityType.GREEN_TERRA);
|
||||
Skills.watchCooldown(player, PP, curTime, AbilityType.SUPER_BREAKER);
|
||||
Skills.watchCooldown(player, PP, curTime, AbilityType.SERRATED_STRIKES);
|
||||
Skills.watchCooldown(player, PP, curTime, AbilityType.BERSERK);
|
||||
Skills.watchCooldown(player, PP, curTime, AbilityType.TREE_FELLER);
|
||||
Skills.watchCooldown(player, PP, curTime, AbilityType.BLAST_MINING);
|
||||
|
||||
/*
|
||||
* PLAYER BLEED MONITORING
|
||||
*/
|
||||
if(thecount % 2 == 0 && PP.getBleedTicks() >= 1)
|
||||
{
|
||||
Combat.dealDamage(player, 2);
|
||||
//Never kill with Bleeding
|
||||
if(player.getHealth() - 2 < 0)
|
||||
{
|
||||
if(player.getHealth() - 1 > 0)
|
||||
Combat.dealDamage(player, 1);
|
||||
} else
|
||||
Combat.dealDamage(player, 2);
|
||||
|
||||
PP.decreaseBleedTicks();
|
||||
|
||||
if(PP.getBleedTicks() == 0)
|
||||
player.sendMessage(mcLocale.getString("Swords.StoppedBleeding"));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -30,46 +30,46 @@ import com.gmail.nossr50.datatypes.SkillType;
|
||||
public class Acrobatics {
|
||||
public static void acrobaticsCheck(Player player, EntityDamageEvent event)
|
||||
{
|
||||
if(player != null && mcPermissions.getInstance().acrobatics(player))
|
||||
{
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
int acrovar = PP.getSkillLevel(SkillType.ACROBATICS);
|
||||
|
||||
if(player.isSneaking())
|
||||
acrovar = acrovar * 2;
|
||||
|
||||
if(Math.random() * 1000 <= acrovar && !event.isCancelled())
|
||||
{
|
||||
int threshold = 7;
|
||||
if(player.isSneaking())
|
||||
threshold = 14;
|
||||
|
||||
int newDamage = event.getDamage() - threshold;
|
||||
if(newDamage < 0)
|
||||
newDamage = 0;
|
||||
/*
|
||||
* Check for death
|
||||
*/
|
||||
if(player.getHealth() - newDamage >= 1){
|
||||
if(!event.isCancelled())
|
||||
PP.addXP(SkillType.ACROBATICS, (event.getDamage() * 8)*10, player);
|
||||
Skills.XpCheckSkill(SkillType.ACROBATICS, player);
|
||||
event.setDamage(newDamage);
|
||||
if(event.getDamage() <= 0)
|
||||
event.setCancelled(true);
|
||||
if(player.isSneaking()){
|
||||
player.sendMessage(ChatColor.GREEN+"**GRACEFUL ROLL**");
|
||||
} else {
|
||||
player.sendMessage("**ROLL**");
|
||||
}
|
||||
}
|
||||
} else if (!event.isCancelled()){
|
||||
if(player.getHealth() - event.getDamage() >= 1){
|
||||
PP.addXP(SkillType.ACROBATICS, (event.getDamage() * 12)*10, player);
|
||||
Skills.XpCheckSkill(SkillType.ACROBATICS, player);
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
int acrovar = PP.getSkillLevel(SkillType.ACROBATICS);
|
||||
|
||||
if(player.isSneaking())
|
||||
acrovar = acrovar * 2;
|
||||
|
||||
if(Math.random() * 1000 <= acrovar && !event.isCancelled())
|
||||
{
|
||||
int threshold = 7;
|
||||
|
||||
if(player.isSneaking())
|
||||
threshold = 14;
|
||||
|
||||
int newDamage = event.getDamage() - threshold;
|
||||
|
||||
if(newDamage < 0)
|
||||
newDamage = 0;
|
||||
|
||||
/*
|
||||
* Check for death
|
||||
*/
|
||||
if(player.getHealth() - newDamage >= 1){
|
||||
if(!event.isCancelled())
|
||||
PP.addXP(SkillType.ACROBATICS, (event.getDamage() * 8)*10, player);
|
||||
Skills.XpCheckSkill(SkillType.ACROBATICS, player);
|
||||
event.setDamage(newDamage);
|
||||
if(event.getDamage() <= 0)
|
||||
event.setCancelled(true);
|
||||
if(player.isSneaking()){
|
||||
player.sendMessage(ChatColor.GREEN+"**GRACEFUL ROLL**");
|
||||
} else {
|
||||
player.sendMessage("**ROLL**");
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (!event.isCancelled()){
|
||||
if(player.getHealth() - event.getDamage() >= 1){
|
||||
PP.addXP(SkillType.ACROBATICS, (event.getDamage() * 12)*10, player);
|
||||
Skills.XpCheckSkill(SkillType.ACROBATICS, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void dodgeChecks(EntityDamageByEntityEvent event){
|
||||
Player defender = (Player) event.getEntity();
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.gmail.nossr50.skills;
|
||||
|
||||
public class Alchemy {
|
||||
|
||||
}
|
||||
@@ -19,8 +19,10 @@ package com.gmail.nossr50.skills;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
@@ -29,34 +31,16 @@ import com.gmail.nossr50.party.Party;
|
||||
|
||||
public class Archery
|
||||
{
|
||||
public static void trackArrows(mcMMO pluginx, Entity x, EntityDamageByEntityEvent event, Player attacker)
|
||||
public static void trackArrows(mcMMO pluginx, Entity x, PlayerProfile PPa)
|
||||
{
|
||||
PlayerProfile PPa = Users.getProfile(attacker);
|
||||
if(!pluginx.misc.arrowTracker.containsKey(x) && event.getDamage() > 0)
|
||||
{
|
||||
int skillLevel = PPa.getSkillLevel(SkillType.ARCHERY);
|
||||
if(!pluginx.misc.arrowTracker.containsKey(x))
|
||||
pluginx.misc.arrowTracker.put(x, 0);
|
||||
if(attacker != null)
|
||||
{
|
||||
if( (Math.random() * 1000 <= PPa.getSkillLevel(SkillType.ARCHERY)) || PPa.getSkillLevel(SkillType.ARCHERY) > 1000)
|
||||
{
|
||||
pluginx.misc.arrowTracker.put(x, 1);
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
if(event.getDamage() > 0)
|
||||
{
|
||||
if(attacker != null)
|
||||
{
|
||||
if( (Math.random() * 1000 <= PPa.getSkillLevel(SkillType.ARCHERY)) || PPa.getSkillLevel(SkillType.ARCHERY) > 1000)
|
||||
{
|
||||
pluginx.misc.arrowTracker.put(x, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(skillLevel > 1000 || (Math.random() * 1000 <= skillLevel))
|
||||
pluginx.misc.arrowTracker.put(x, 1);
|
||||
}
|
||||
public static void ignitionCheck(Entity x, EntityDamageByEntityEvent event, Player attacker)
|
||||
|
||||
public static void ignitionCheck(Entity x, Player attacker)
|
||||
{
|
||||
//Check to see if PVP for this world is disabled before executing
|
||||
if(!x.getWorld().getPVP())
|
||||
@@ -65,55 +49,68 @@ public class Archery
|
||||
PlayerProfile PPa = Users.getProfile(attacker);
|
||||
if(Math.random() * 100 >= 75)
|
||||
{
|
||||
int ignition = 20;
|
||||
ignition += (PPa.getSkillLevel(SkillType.ARCHERY)/200)*20;
|
||||
|
||||
int ignition = 20;
|
||||
if(PPa.getSkillLevel(SkillType.ARCHERY) >= 200)
|
||||
ignition+=20;
|
||||
if(PPa.getSkillLevel(SkillType.ARCHERY) >= 400)
|
||||
ignition+=20;
|
||||
if(PPa.getSkillLevel(SkillType.ARCHERY) >= 600)
|
||||
ignition+=20;
|
||||
if(PPa.getSkillLevel(SkillType.ARCHERY) >= 800)
|
||||
ignition+=20;
|
||||
if(PPa.getSkillLevel(SkillType.ARCHERY) >= 1000)
|
||||
ignition+=20;
|
||||
if(ignition > 120)
|
||||
ignition = 120;
|
||||
|
||||
if(x instanceof Player)
|
||||
{
|
||||
Player Defender = (Player)x;
|
||||
if(!Party.getInstance().inSameParty(attacker, Defender))
|
||||
Player defender = (Player)x;
|
||||
if(!Party.getInstance().inSameParty(attacker, defender))
|
||||
{
|
||||
event.getEntity().setFireTicks(ignition);
|
||||
defender.setFireTicks(ignition);
|
||||
attacker.sendMessage(mcLocale.getString("Combat.Ignition")); //$NON-NLS-1$
|
||||
Defender.sendMessage(mcLocale.getString("Combat.BurningArrowHit")); //$NON-NLS-1$
|
||||
defender.sendMessage(mcLocale.getString("Combat.BurningArrowHit")); //$NON-NLS-1$
|
||||
}
|
||||
} else {
|
||||
event.getEntity().setFireTicks(ignition);
|
||||
attacker.sendMessage(mcLocale.getString("Combat.Ignition")); //$NON-NLS-1$
|
||||
}
|
||||
else
|
||||
{
|
||||
x.setFireTicks(ignition);
|
||||
attacker.sendMessage(mcLocale.getString("Combat.Ignition")); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void dazeCheck(Player defender, Player attacker)
|
||||
{
|
||||
PlayerProfile PPa = Users.getProfile(attacker);
|
||||
int skillLevel = Users.getProfile(attacker).getSkillLevel(SkillType.ARCHERY);
|
||||
|
||||
Location loc = defender.getLocation();
|
||||
if(Math.random() * 10 > 5)
|
||||
{
|
||||
loc.setPitch(90);
|
||||
} else {
|
||||
loc.setPitch(90);
|
||||
else
|
||||
loc.setPitch(-90);
|
||||
}
|
||||
if(PPa.getSkillLevel(SkillType.ARCHERY) >= 1000){
|
||||
if(Math.random() * 1000 <= 500){
|
||||
|
||||
if(skillLevel >= 1000)
|
||||
{
|
||||
if(Math.random() * 1000 <= 500)
|
||||
{
|
||||
defender.teleport(loc);
|
||||
defender.sendMessage(mcLocale.getString("Combat.TouchedFuzzy")); //$NON-NLS-1$
|
||||
attacker.sendMessage(mcLocale.getString("Combat.TargetDazed")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
} else if(Math.random() * 2000 <= PPa.getSkillLevel(SkillType.ARCHERY)){
|
||||
}
|
||||
else if(Math.random() * 2000 <= skillLevel)
|
||||
{
|
||||
defender.teleport(loc);
|
||||
defender.sendMessage(mcLocale.getString("Combat.TouchedFuzzy")); //$NON-NLS-1$
|
||||
attacker.sendMessage(mcLocale.getString("Combat.TargetDazed")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
}
|
||||
|
||||
public static void arrowRetrievalCheck(Entity entity, mcMMO plugin)
|
||||
{
|
||||
if(plugin.misc.arrowTracker.containsKey(entity))
|
||||
{
|
||||
Integer x = 0;
|
||||
while(x < plugin.misc.arrowTracker.get(entity))
|
||||
{
|
||||
m.mcDropItem(entity.getLocation(), new ItemStack(262, 1));
|
||||
x++;
|
||||
}
|
||||
}
|
||||
plugin.misc.arrowTracker.remove(entity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,61 +17,40 @@
|
||||
package com.gmail.nossr50.skills;
|
||||
|
||||
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.Wolf;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.Combat;
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.party.Party;
|
||||
|
||||
public class Axes {
|
||||
public static void skullSplitterCheck(Player player){
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
if(m.isAxes(player.getItemInHand()) && mcPermissions.getInstance().axesAbility(player)){
|
||||
/*
|
||||
* CHECK FOR AXE PREP MODE
|
||||
*/
|
||||
if(PP.getAxePreparationMode())
|
||||
{
|
||||
PP.setAxePreparationMode(false);
|
||||
}
|
||||
int ticks = 2;
|
||||
int x = PP.getSkillLevel(SkillType.AXES);
|
||||
while(x >= 50){
|
||||
x-=50;
|
||||
ticks++;
|
||||
}
|
||||
|
||||
if(!PP.getSkullSplitterMode() && Skills.cooldownOver(player, (PP.getSkullSplitterDeactivatedTimeStamp()*1000), LoadProperties.skullSplitterCooldown))
|
||||
{
|
||||
player.sendMessage(mcLocale.getString("Skills.SkullSplitterOn"));
|
||||
for(Player y : player.getWorld().getPlayers()){
|
||||
if(y != null && y != player && m.getDistance(player.getLocation(), y.getLocation()) < 10)
|
||||
y.sendMessage(mcLocale.getString("Skills.SkullSplitterPlayer", new Object[] {player.getName()}));
|
||||
}
|
||||
PP.setSkullSplitterActivatedTimeStamp(System.currentTimeMillis());
|
||||
PP.setSkullSplitterDeactivatedTimeStamp(System.currentTimeMillis() + (ticks * 1000));
|
||||
PP.setSkullSplitterMode(true);
|
||||
}
|
||||
if(!PP.getSkullSplitterMode() && !Skills.cooldownOver(player, (PP.getSkullSplitterDeactivatedTimeStamp()*1000), LoadProperties.skullSplitterCooldown)){
|
||||
player.sendMessage(mcLocale.getString("Skills.TooTired")
|
||||
+ChatColor.YELLOW+" ("+Skills.calculateTimeLeft(player, (PP.getSkullSplitterDeactivatedTimeStamp()*1000), LoadProperties.skullSplitterCooldown)+"s)");
|
||||
}
|
||||
}
|
||||
public static void axesBonus(Player attacker, EntityDamageByEntityEvent event)
|
||||
{
|
||||
int bonus = 0;
|
||||
|
||||
//Add 1 DMG for every 50 skill levels
|
||||
bonus += Users.getProfile(attacker).getSkillLevel(SkillType.AXES)/50;
|
||||
|
||||
if(bonus > 4)
|
||||
bonus = 4;
|
||||
|
||||
event.setDamage(event.getDamage() + bonus);
|
||||
}
|
||||
public static void axeCriticalCheck(Player attacker, EntityDamageByEntityEvent event, Plugin pluginx)
|
||||
{
|
||||
Entity x = event.getEntity();
|
||||
|
||||
if(x instanceof Wolf){
|
||||
Wolf wolf = (Wolf)x;
|
||||
if(Taming.getOwner(wolf, pluginx) != null)
|
||||
@@ -85,89 +64,150 @@ public class Axes {
|
||||
PlayerProfile PPa = Users.getProfile(attacker);
|
||||
if(m.isAxes(attacker.getItemInHand()) && mcPermissions.getInstance().axes(attacker)){
|
||||
if(PPa.getSkillLevel(SkillType.AXES) >= 750){
|
||||
if(Math.random() * 1000 <= 750){
|
||||
if(Math.random() * 1000 <= 750 && !x.isDead()){
|
||||
if(x instanceof Player){
|
||||
int damage = (event.getDamage() * 2) - (event.getDamage() / 2);
|
||||
event.setDamage(damage);
|
||||
Player player = (Player)x;
|
||||
player.sendMessage(ChatColor.DARK_RED + "You were CRITICALLY hit!");
|
||||
}
|
||||
if(x instanceof Player){
|
||||
event.setDamage(event.getDamage() * 2 - event.getDamage() / 2);
|
||||
} else {
|
||||
event.setDamage(event.getDamage() * 2);
|
||||
else {
|
||||
int damage = event.getDamage() * 2;
|
||||
event.setDamage(damage);
|
||||
}
|
||||
attacker.sendMessage(ChatColor.RED+"CRITICAL HIT!");
|
||||
}
|
||||
} else if(Math.random() * 1000 <= PPa.getSkillLevel(SkillType.AXES)){
|
||||
} else if(Math.random() * 1000 <= PPa.getSkillLevel(SkillType.AXES) && !x.isDead()){
|
||||
if(x instanceof Player){
|
||||
int damage = (event.getDamage() * 2) - (event.getDamage() / 2);
|
||||
event.setDamage(damage);
|
||||
Player player = (Player)x;
|
||||
player.sendMessage(ChatColor.DARK_RED + "You were CRITICALLY hit!");
|
||||
}
|
||||
if(x instanceof Player){
|
||||
event.setDamage(event.getDamage() * 2 - event.getDamage() / 2);
|
||||
} else {
|
||||
event.setDamage(event.getDamage() * 2);
|
||||
else {
|
||||
int damage = event.getDamage() * 2;
|
||||
event.setDamage(damage);
|
||||
}
|
||||
attacker.sendMessage(ChatColor.RED+"CRITICAL HIT!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void impact(Player attacker, LivingEntity target)
|
||||
{
|
||||
//TODO: Finish this skill, the idea is you will greatly damage an opponents armor and when they are armor less you have a proc that will stun them and deal additional damage.
|
||||
boolean didImpact = false;
|
||||
|
||||
if(target instanceof Player)
|
||||
{
|
||||
Player targetPlayer = (Player) target;
|
||||
int emptySlots = 0;
|
||||
short durDmg = 5; //Start with 5 durability dmg
|
||||
|
||||
durDmg+=Users.getProfile(attacker).getSkillLevel(SkillType.AXES)/30; //Every 30 Skill Levels you gain 1 durability dmg
|
||||
|
||||
System.out.println(durDmg);
|
||||
|
||||
for(ItemStack x : targetPlayer.getInventory().getArmorContents())
|
||||
{
|
||||
if(x.getType() == Material.AIR)
|
||||
{
|
||||
emptySlots++;
|
||||
} else {
|
||||
x.setDurability((short) (x.getDurability()+durDmg)); //Damage armor piece
|
||||
}
|
||||
}
|
||||
|
||||
if(emptySlots == 4)
|
||||
{
|
||||
didImpact = applyImpact(attacker, target);
|
||||
if(didImpact)
|
||||
targetPlayer.sendMessage(mcLocale.getString("Axes.GreaterImpactOnSelf"));
|
||||
}
|
||||
} else {
|
||||
//Since mobs are technically unarmored this will always trigger
|
||||
didImpact = applyImpact(attacker, target);
|
||||
}
|
||||
|
||||
if(didImpact)
|
||||
{
|
||||
attacker.sendMessage(mcLocale.getString("Axes.GreaterImpactOnEnemy"));
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean applyImpact(Player attacker, LivingEntity target)
|
||||
{
|
||||
if(Math.random() * 100 > 75)
|
||||
{
|
||||
Combat.dealDamage(target, 2, attacker);
|
||||
target.setVelocity(attacker.getLocation().getDirection().normalize().multiply(1.5D));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void applyAoeDamage(Player attacker, EntityDamageByEntityEvent event, Plugin pluginx)
|
||||
{
|
||||
int targets = 0;
|
||||
|
||||
int dmgAmount = (event.getDamage()/2);
|
||||
|
||||
//Setup minimum damage
|
||||
if(dmgAmount < 1)
|
||||
dmgAmount = 1;
|
||||
|
||||
if(event.getEntity() instanceof LivingEntity)
|
||||
{
|
||||
LivingEntity x = (LivingEntity) event.getEntity();
|
||||
targets = m.getTier(attacker);
|
||||
|
||||
for(Entity derp : x.getWorld().getEntities())
|
||||
{
|
||||
if(m.getDistance(x.getLocation(), derp.getLocation()) < 5)
|
||||
{
|
||||
|
||||
|
||||
//Make sure the Wolf is not friendly
|
||||
if(derp instanceof Wolf)
|
||||
for(Entity derp : x.getNearbyEntities(2.5, 2.5, 2.5))
|
||||
{
|
||||
//Make sure the Wolf is not friendly
|
||||
if(derp instanceof Wolf)
|
||||
{
|
||||
Wolf hurrDurr = (Wolf)derp;
|
||||
if(Taming.getOwner(hurrDurr, pluginx) == attacker)
|
||||
continue;
|
||||
if(Party.getInstance().inSameParty(attacker, Taming.getOwner(hurrDurr, pluginx)))
|
||||
continue;
|
||||
}
|
||||
|
||||
//Damage nearby LivingEntities
|
||||
if(derp instanceof LivingEntity && targets >= 1)
|
||||
{
|
||||
if(derp instanceof Player)
|
||||
{
|
||||
Wolf hurrDurr = (Wolf)derp;
|
||||
if(Taming.getOwner(hurrDurr, pluginx) == attacker)
|
||||
continue;
|
||||
if(Party.getInstance().inSameParty(attacker, Taming.getOwner(hurrDurr, pluginx)))
|
||||
continue;
|
||||
}
|
||||
//Damage nearby LivingEntities
|
||||
if(derp instanceof LivingEntity && targets >= 1)
|
||||
{
|
||||
if(derp instanceof Player)
|
||||
{
|
||||
Player target = (Player)derp;
|
||||
|
||||
if(Users.getProfile(target).getGodMode())
|
||||
continue;
|
||||
Player target = (Player)derp;
|
||||
|
||||
if(Users.getProfile(target).getGodMode())
|
||||
continue;
|
||||
|
||||
if(target.getName().equals(attacker.getName()))
|
||||
continue;
|
||||
|
||||
if(Party.getInstance().inSameParty(attacker, target))
|
||||
continue;
|
||||
if(targets >= 1 && derp.getWorld().getPVP())
|
||||
{
|
||||
Combat.dealDamage(target, event.getDamage() / 2, attacker);
|
||||
target.sendMessage(ChatColor.DARK_RED+"Struck by CLEAVE!");
|
||||
targets--;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LivingEntity target = (LivingEntity)derp;
|
||||
Combat.dealDamage(target, event.getDamage() / 2, attacker);
|
||||
targets--;
|
||||
}
|
||||
if(target.getName().equals(attacker.getName()))
|
||||
continue;
|
||||
|
||||
if(Party.getInstance().inSameParty(attacker, target))
|
||||
continue;
|
||||
|
||||
if(target.isDead())
|
||||
continue;
|
||||
|
||||
if(targets >= 1 && derp.getWorld().getPVP())
|
||||
{
|
||||
Combat.dealDamage(target, dmgAmount, attacker);
|
||||
target.sendMessage(ChatColor.DARK_RED+"Struck by CLEAVE!");
|
||||
targets--;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LivingEntity target = (LivingEntity)derp;
|
||||
Combat.dealDamage(target, dmgAmount, attacker);
|
||||
targets--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
279
src/main/java/com/gmail/nossr50/skills/BlastMining.java
Normal file
279
src/main/java/com/gmail/nossr50/skills/BlastMining.java
Normal file
@@ -0,0 +1,279 @@
|
||||
/*
|
||||
This file is part of mcMMO.
|
||||
|
||||
mcMMO 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.
|
||||
|
||||
mcMMO 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 mcMMO. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.gmail.nossr50.skills;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
||||
import org.bukkit.event.entity.ExplosionPrimeEvent;
|
||||
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
|
||||
public class BlastMining{
|
||||
|
||||
public static void explosionBlockDrops(Block block, Location loc)
|
||||
{
|
||||
int id = block.getTypeId();
|
||||
ItemStack item = new ItemStack(id, 1);
|
||||
|
||||
switch (id){
|
||||
//GLOWSTONE
|
||||
case 89:
|
||||
item = new ItemStack(348, 1);
|
||||
m.mcDropItems(loc, item, 2);
|
||||
m.mcRandomDropItems(loc, item, 50, 2);
|
||||
break;
|
||||
//REDSTONE
|
||||
case 73:
|
||||
item = new ItemStack(331, 1);
|
||||
m.mcDropItems(loc, item, 4);
|
||||
m.mcRandomDropItem(loc, item, 50);
|
||||
break;
|
||||
case 74:
|
||||
item = new ItemStack(331, 1);
|
||||
m.mcDropItems(loc, item, 4);
|
||||
m.mcRandomDropItem(loc, item, 50);
|
||||
break;
|
||||
//LAPIS
|
||||
case 21:
|
||||
item = new ItemStack(351, 1, (byte)0,(byte)0x4);
|
||||
m.mcDropItems(loc, item, 4);
|
||||
m.mcRandomDropItems(loc, item, 50, 4);
|
||||
break;
|
||||
//DIAMOND
|
||||
case 56:
|
||||
item = new ItemStack(264, 1);
|
||||
m.mcDropItem(loc, item);
|
||||
break;
|
||||
//STONE
|
||||
case 1:
|
||||
item = new ItemStack(4, 1);
|
||||
m.mcDropItem(loc, item);
|
||||
break;
|
||||
//COAL
|
||||
case 16:
|
||||
item = new ItemStack(263, 1);
|
||||
m.mcDropItem(loc, item);
|
||||
break;
|
||||
default:
|
||||
m.mcDropItem(loc, item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public static List<Block> explosionYields(List<Block> ores, List<Block> debris, float yield, float oreBonus, float debrisReduction, Location location, int extraDrops)
|
||||
{
|
||||
Iterator<Block> iterator2 = ores.iterator();
|
||||
List<Block> blocksDropped = new ArrayList<Block>();
|
||||
while(iterator2.hasNext())
|
||||
{
|
||||
Block temp = iterator2.next();
|
||||
if((float)Math.random() < (yield + oreBonus))
|
||||
{
|
||||
blocksDropped.add(temp);
|
||||
explosionBlockDrops(temp, location);
|
||||
if(extraDrops == 2)
|
||||
blocksDropped.add(temp);
|
||||
explosionBlockDrops(temp, location);
|
||||
if(extraDrops == 3)
|
||||
blocksDropped.add(temp);
|
||||
explosionBlockDrops(temp, location);
|
||||
}
|
||||
}
|
||||
|
||||
if(yield - debrisReduction != 0)
|
||||
{
|
||||
Iterator<Block> iterator3 = debris.iterator();
|
||||
while(iterator3.hasNext())
|
||||
{
|
||||
Block temp = iterator3.next();
|
||||
if((float)Math.random() < (yield - debrisReduction))
|
||||
explosionBlockDrops(temp, location);
|
||||
}
|
||||
}
|
||||
return blocksDropped;
|
||||
}
|
||||
|
||||
/*
|
||||
* Process the drops from the explosion
|
||||
*/
|
||||
public static void dropProcessing(Player player, EntityExplodeEvent event, mcMMO plugin)
|
||||
{
|
||||
int skillLevel = Users.getProfile(player).getSkillLevel(SkillType.MINING);
|
||||
float yield = event.getYield();
|
||||
Location location = event.getLocation();
|
||||
List<Block> blocks = event.blockList();
|
||||
Iterator<Block> iterator = blocks.iterator();
|
||||
|
||||
List<Block> ores = new ArrayList<Block>();
|
||||
List<Block> debris = new ArrayList<Block>();
|
||||
|
||||
List<Block> xp = new ArrayList<Block>();
|
||||
|
||||
while(iterator.hasNext())
|
||||
{
|
||||
Block temp = iterator.next();
|
||||
if(temp.getData() != 5 && !plugin.misc.blockWatchList.contains(temp))
|
||||
{
|
||||
if(m.isOre(temp))
|
||||
ores.add(temp);
|
||||
else
|
||||
debris.add(temp);
|
||||
}
|
||||
}
|
||||
|
||||
//Normal explosion
|
||||
if(skillLevel < 125)
|
||||
return;
|
||||
|
||||
event.setYield(0);
|
||||
//+35% ores, -10% debris
|
||||
if(skillLevel >= 125 && skillLevel < 250)
|
||||
xp = explosionYields(ores, debris, yield, .35f, .10f, location, 1);
|
||||
|
||||
//+40% ores, -20% debris
|
||||
if(skillLevel >= 250 && skillLevel < 375)
|
||||
xp = explosionYields(ores, debris, yield, .40f, .20f, location, 1);
|
||||
|
||||
//No debris, +45% ores
|
||||
if(skillLevel >= 375 && skillLevel < 500)
|
||||
xp = explosionYields(ores, debris, yield, .45f, .30f, location, 1);
|
||||
|
||||
//No debris, +50% ores
|
||||
if(skillLevel >= 500 && skillLevel < 625)
|
||||
xp = explosionYields(ores, debris, yield, .50f, .30f, location, 1);
|
||||
|
||||
//Double Drops, No Debris, +55% ores
|
||||
if(skillLevel >= 625 && skillLevel < 750)
|
||||
xp = explosionYields(ores, debris, yield, .55f, .30f, location, 2);
|
||||
|
||||
//Double Drops, No Debris, +60% ores
|
||||
if(skillLevel >= 750 && skillLevel < 875)
|
||||
xp = explosionYields(ores, debris, yield, .60f, .30f, location, 2);
|
||||
|
||||
//Triple Drops, No debris, +65% ores
|
||||
if(skillLevel >= 875 && skillLevel < 1000)
|
||||
xp = explosionYields(ores, debris, yield, .65f, .30f, location, 3);
|
||||
|
||||
//Triple Drops, No debris, +70% ores
|
||||
if(skillLevel >= 1000)
|
||||
xp = explosionYields(ores, debris, yield, .70f, .30f, location, 3);
|
||||
|
||||
for(Block block : xp)
|
||||
{
|
||||
blastMiningXP(player, block, plugin);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Bigger Bombs (Unlocked at Mining 250)
|
||||
*
|
||||
* Increases radius of explosion by 1 at 250.
|
||||
* Increases radius of explosion by 2 at 500.
|
||||
* Increases radius of explosion by 3 at 750.
|
||||
* Increases radius of explosion by 4 at 1000.
|
||||
*/
|
||||
public static void biggerBombs(int skillLevel, ExplosionPrimeEvent event)
|
||||
{
|
||||
float radius = event.getRadius();
|
||||
if(skillLevel < 250)
|
||||
return;
|
||||
if(skillLevel >= 250)
|
||||
radius++;
|
||||
if(skillLevel >= 500)
|
||||
radius++;
|
||||
if(skillLevel >= 750)
|
||||
radius++;
|
||||
if(skillLevel >= 1000)
|
||||
radius++;
|
||||
|
||||
event.setRadius(radius);
|
||||
}
|
||||
|
||||
/*
|
||||
* Demolitions Expertise (Unlocked at Mining 500)
|
||||
*
|
||||
* Reduces explosion damage to 1/4 of normal at 500.
|
||||
* Reduces explosion damage to 1/2 of normal at 750.
|
||||
* Reduces explosion damage to 0 at 1000.
|
||||
*/
|
||||
public static void demolitionsExpertise(int skill, EntityDamageEvent event)
|
||||
{
|
||||
int damage = event.getDamage();
|
||||
if(skill < 500)
|
||||
return;
|
||||
if(skill >= 500 && skill < 750)
|
||||
damage = damage/4;
|
||||
if(skill >= 750 && skill < 1000)
|
||||
damage = damage/2;
|
||||
if(skill >= 1000)
|
||||
damage = 0;
|
||||
|
||||
event.setDamage(damage);
|
||||
}
|
||||
|
||||
public static void blastMiningXP(Player player, Block block, mcMMO plugin)
|
||||
{
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
if(plugin.misc.blockWatchList.contains(block) || block.getData() == (byte) 5)
|
||||
return;
|
||||
int xp = 0;
|
||||
|
||||
switch (block.getType()) {
|
||||
//COAL
|
||||
case COAL_ORE:
|
||||
xp += LoadProperties.mcoal;
|
||||
break;
|
||||
//GOLD
|
||||
case GOLD_ORE:
|
||||
xp += LoadProperties.mgold;
|
||||
break;
|
||||
//DIAMOND
|
||||
case DIAMOND_ORE:
|
||||
xp += LoadProperties.mdiamond;
|
||||
break;
|
||||
//IRON
|
||||
case IRON_ORE:
|
||||
xp += LoadProperties.miron;
|
||||
break;
|
||||
//REDSTONE
|
||||
case REDSTONE_ORE:
|
||||
xp += LoadProperties.mredstone;
|
||||
break;
|
||||
//LAPIS
|
||||
case LAPIS_ORE:
|
||||
xp += LoadProperties.mlapis;
|
||||
break;
|
||||
}
|
||||
|
||||
PP.addXP(SkillType.MINING, xp, player);
|
||||
Skills.XpCheckSkill(SkillType.MINING, player);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.gmail.nossr50.skills;
|
||||
|
||||
public class Enchanting {
|
||||
|
||||
}
|
||||
@@ -27,225 +27,137 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.event.player.PlayerAnimationEvent;
|
||||
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.spout.SpoutStuff;
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.config.LoadTreasures;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.datatypes.treasure.ExcavationTreasure;
|
||||
|
||||
import org.getspout.spoutapi.sound.SoundEffect;
|
||||
|
||||
public class Excavation
|
||||
{
|
||||
public static void gigaDrillBreakerActivationCheck(Player player, Block block)
|
||||
{
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
if(m.isShovel(player.getItemInHand()))
|
||||
{
|
||||
if(block != null)
|
||||
{
|
||||
if(!m.abilityBlockCheck(block))
|
||||
return;
|
||||
}
|
||||
if(PP.getShovelPreparationMode())
|
||||
{
|
||||
PP.setShovelPreparationMode(false);
|
||||
}
|
||||
int ticks = 2;
|
||||
int x = PP.getSkillLevel(SkillType.EXCAVATION);
|
||||
while(x >= 50)
|
||||
{
|
||||
x-=50;
|
||||
ticks++;
|
||||
}
|
||||
|
||||
if(!PP.getGigaDrillBreakerMode() && PP.getGigaDrillBreakerDeactivatedTimeStamp() < System.currentTimeMillis())
|
||||
{
|
||||
player.sendMessage(mcLocale.getString("Skills.GigaDrillBreakerOn"));
|
||||
for(Player y : player.getWorld().getPlayers())
|
||||
{
|
||||
if(y != null && y != player && m.getDistance(player.getLocation(), y.getLocation()) < 10)
|
||||
y.sendMessage(mcLocale.getString("Skills.GigaDrillBreakerPlayer", new Object[] {player.getName()}));
|
||||
}
|
||||
PP.setGigaDrillBreakerActivatedTimeStamp(System.currentTimeMillis());
|
||||
PP.setGigaDrillBreakerDeactivatedTimeStamp(System.currentTimeMillis() + (ticks * 1000));
|
||||
PP.setGigaDrillBreakerMode(true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
public static boolean canBeGigaDrillBroken(Block block)
|
||||
{
|
||||
Material t = block.getType();
|
||||
return t == Material.DIRT || t == Material.GRASS || t == Material.SAND || t == Material.GRAVEL || t == Material.CLAY || t == Material.MYCEL || t == Material.SOUL_SAND;
|
||||
switch(block.getType()){
|
||||
case CLAY:
|
||||
case DIRT:
|
||||
case GRASS:
|
||||
case GRAVEL:
|
||||
case MYCEL:
|
||||
case SAND:
|
||||
case SOUL_SAND:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static void excavationProcCheck(Material type, Location loc, Player player)
|
||||
|
||||
public static void excavationProcCheck(Block block, Player player)
|
||||
{
|
||||
if(LoadProperties.excavationRequiresShovel && !m.isShovel(player.getItemInHand()))
|
||||
return;
|
||||
Material type = block.getType();
|
||||
Location loc = block.getLocation();
|
||||
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
int skillLevel = PP.getSkillLevel(SkillType.EXCAVATION);
|
||||
ArrayList<ItemStack> is = new ArrayList<ItemStack>();
|
||||
int xp = 0;
|
||||
int xp = LoadProperties.mbase;
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case GRASS:
|
||||
if(skillLevel >= 250)
|
||||
case DIRT:
|
||||
for(ExcavationTreasure treasure : LoadTreasures.excavationFromDirt)
|
||||
{
|
||||
//CHANCE TO GET EGGS
|
||||
if(LoadProperties.eggs && Math.random() * 100 > 99)
|
||||
{
|
||||
xp+= LoadProperties.meggs;
|
||||
is.add(new ItemStack(Material.EGG, 1, (byte)0, (byte)0));
|
||||
}
|
||||
//CHANCE TO GET APPLES
|
||||
if(LoadProperties.apples && Math.random() * 100 > 99)
|
||||
{
|
||||
xp+= LoadProperties.mapple;
|
||||
is.add(new ItemStack(Material.APPLE, 1, (byte)0, (byte)0));
|
||||
}
|
||||
if(skillLevel >= treasure.getDropLevel())
|
||||
{
|
||||
if(Math.random() * 100 > (100.00 - treasure.getDropChance()))
|
||||
{
|
||||
xp += treasure.getXp();
|
||||
is.add(treasure.getDrop());
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GRASS:
|
||||
for(ExcavationTreasure treasure : LoadTreasures.excavationFromGrass)
|
||||
{
|
||||
if(skillLevel >= treasure.getDropLevel())
|
||||
{
|
||||
if(Math.random() * 100 > (100.00 - treasure.getDropChance()))
|
||||
{
|
||||
xp += treasure.getXp();
|
||||
is.add(treasure.getDrop());
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SAND:
|
||||
for(ExcavationTreasure treasure : LoadTreasures.excavationFromSand)
|
||||
{
|
||||
if(skillLevel >= treasure.getDropLevel())
|
||||
{
|
||||
if(Math.random() * 100 > (100.00 - treasure.getDropChance()))
|
||||
{
|
||||
xp += treasure.getXp();
|
||||
is.add(treasure.getDrop());
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GRAVEL:
|
||||
//CHANCE TO GET NETHERRACK
|
||||
if(LoadProperties.netherrack && skillLevel >= 850 && Math.random() * 200 > 199)
|
||||
for(ExcavationTreasure treasure : LoadTreasures.excavationFromGravel)
|
||||
{
|
||||
xp+= LoadProperties.mnetherrack;
|
||||
is.add(new ItemStack(Material.NETHERRACK, 1, (byte)0, (byte)0));
|
||||
|
||||
}
|
||||
//CHANCE TO GET SULPHUR
|
||||
if(LoadProperties.sulphur && skillLevel >= 75 && Math.random() * 10 > 9)
|
||||
{
|
||||
xp+= LoadProperties.msulphur;
|
||||
is.add(new ItemStack(Material.SULPHUR, 1, (byte)0, (byte)0));
|
||||
}
|
||||
//CHANCE TO GET BONES
|
||||
if(LoadProperties.bones && skillLevel >= 175 && Math.random() * 10 > 9)
|
||||
{
|
||||
xp+= LoadProperties.mbones;
|
||||
is.add(new ItemStack(Material.BONE, 1, (byte)0, (byte)0));
|
||||
}
|
||||
break;
|
||||
case SAND:
|
||||
//CHANCE TO GET GLOWSTONE
|
||||
if(LoadProperties.glowstone && skillLevel >= 50 && Math.random() * 100 > 95)
|
||||
{
|
||||
xp+= LoadProperties.mglowstone2;
|
||||
is.add(new ItemStack(Material.GLOWSTONE_DUST, 1, (byte)0, (byte)0));
|
||||
|
||||
}
|
||||
//CHANCE TO GET SOUL SAND
|
||||
if(LoadProperties.slowsand && skillLevel >= 650 && Math.random() * 200 > 199)
|
||||
{
|
||||
xp+= LoadProperties.mslowsand;
|
||||
is.add(new ItemStack(Material.SOUL_SAND, 1, (byte)0, (byte)0));
|
||||
if(skillLevel >= treasure.getDropLevel())
|
||||
{
|
||||
if(Math.random() * 100 > (100.00 - treasure.getDropChance()))
|
||||
{
|
||||
xp += treasure.getXp();
|
||||
is.add(treasure.getDrop());
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case CLAY:
|
||||
//CHANCE TO GET SLIMEBALLS
|
||||
if(LoadProperties.slimeballs && skillLevel >= 50 && Math.random() * 20 > 19)
|
||||
for(ExcavationTreasure treasure : LoadTreasures.excavationFromClay)
|
||||
{
|
||||
xp+= LoadProperties.mslimeballs;
|
||||
is.add(new ItemStack(Material.SLIME_BALL, 1, (byte)0, (byte)0));
|
||||
}
|
||||
//CHANCE TO GET STRING
|
||||
if(LoadProperties.string && skillLevel >= 250 && Math.random() * 20 > 19)
|
||||
{
|
||||
xp+= LoadProperties.mstring;
|
||||
is.add(new ItemStack(Material.STRING, 1, (byte)0, (byte)0));
|
||||
}
|
||||
if(skillLevel >= 500)
|
||||
{
|
||||
//CHANCE TO GET CLOCK
|
||||
if(LoadProperties.watch && Math.random() * 100 > 99)
|
||||
{
|
||||
xp+= LoadProperties.mwatch;
|
||||
is.add(new ItemStack(Material.WATCH, 1, (byte)0));
|
||||
|
||||
}
|
||||
//CHANCE TO GET BUCKET
|
||||
if(LoadProperties.bucket && Math.random() * 100 > 99)
|
||||
{
|
||||
xp+= LoadProperties.mbucket;
|
||||
is.add(new ItemStack(Material.BUCKET, 1, (byte)0, (byte)0));
|
||||
}
|
||||
}
|
||||
//CHANCE TO GET COBWEB
|
||||
if(LoadProperties.web && skillLevel >= 750 && Math.random() * 20 > 19)
|
||||
{
|
||||
xp+= LoadProperties.mweb;
|
||||
is.add(new ItemStack(Material.WEB, 1, (byte)0, (byte)0));
|
||||
if(skillLevel >= treasure.getDropLevel())
|
||||
{
|
||||
if(Math.random() * 100 > (100.00 - treasure.getDropChance()))
|
||||
{
|
||||
xp += treasure.getXp();
|
||||
is.add(treasure.getDrop());
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
//ALL MATERIALS
|
||||
if(type == Material.GRASS || type == Material.DIRT || type == Material.GRAVEL || type == Material.SAND || type == Material.CLAY || type == Material.MYCEL || type == Material.SOUL_SAND)
|
||||
{
|
||||
xp+= LoadProperties.mbase;
|
||||
//CHANCE TO GET CAKE
|
||||
if(LoadProperties.cake && skillLevel >= 750 && Math.random() * 2000 > 1999)
|
||||
{
|
||||
xp+= LoadProperties.mcake;
|
||||
is.add(new ItemStack(Material.CAKE, 1, (byte)0, (byte)0));
|
||||
}
|
||||
if(skillLevel >= 350)
|
||||
case MYCEL:
|
||||
for(ExcavationTreasure treasure : LoadTreasures.excavationFromMycel)
|
||||
{
|
||||
//CHANCE TO GET DIAMOND
|
||||
if(LoadProperties.diamond && Math.random() * 750 > 749)
|
||||
if(skillLevel >= treasure.getDropLevel())
|
||||
{
|
||||
xp+= LoadProperties.mdiamond2;
|
||||
is.add(new ItemStack(Material.DIAMOND, 1, (byte)0, (byte)0));
|
||||
}
|
||||
//CHANCE TO GET GREEN MUSIC
|
||||
if(LoadProperties.music && Math.random() * 2000 > 1999)
|
||||
{
|
||||
xp+= LoadProperties.mmusic;
|
||||
is.add(new ItemStack(Material.GREEN_RECORD, 1, (byte)0, (byte)0));
|
||||
if(Math.random() * 100 > (100.00 - treasure.getDropChance()))
|
||||
{
|
||||
xp += treasure.getXp();
|
||||
is.add(treasure.getDrop());
|
||||
}
|
||||
}
|
||||
}
|
||||
//CHANCE TO GET YELLOW MUSIC
|
||||
if(LoadProperties.music && skillLevel >= 250 && Math.random() * 2000 > 1999)
|
||||
{
|
||||
xp+= LoadProperties.mmusic;
|
||||
is.add(new ItemStack(Material.GOLD_RECORD, 1, (byte)0, (byte)0));
|
||||
}
|
||||
}
|
||||
|
||||
//GRASS OR DIRT OR MYCEL
|
||||
if(type == Material.DIRT || type == Material.GRASS || type == Material.MYCEL)
|
||||
{
|
||||
//CHANCE FOR COCOA BEANS
|
||||
if(LoadProperties.cocoabeans && skillLevel >= 50 && Math.random() * 75 > 74)
|
||||
break;
|
||||
case SOUL_SAND:
|
||||
for(ExcavationTreasure treasure : LoadTreasures.excavationFromSoulSand)
|
||||
{
|
||||
xp+= LoadProperties.mcocoa;
|
||||
is.add(new ItemStack(Material.getMaterial(351), 1, (byte)0, (byte)3));
|
||||
}
|
||||
//CHANCE FOR SHROOMS
|
||||
if(LoadProperties.mushrooms && skillLevel >= 500 && Math.random() * 200 > 199)
|
||||
{
|
||||
xp+= LoadProperties.mmushroom2;
|
||||
switch((int)(Math.random() * 2))
|
||||
if(skillLevel >= treasure.getDropLevel())
|
||||
{
|
||||
case 0:
|
||||
is.add(new ItemStack(Material.BROWN_MUSHROOM, 1, (byte)0, (byte)0));
|
||||
break;
|
||||
case 1:
|
||||
is.add(new ItemStack(Material.RED_MUSHROOM, 1, (byte)0, (byte)0));
|
||||
break;
|
||||
if(Math.random() * 100 > (100.00 - treasure.getDropChance()))
|
||||
{
|
||||
xp += treasure.getXp();
|
||||
is.add(treasure.getDrop());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//CHANCE TO GET GLOWSTONE
|
||||
if(LoadProperties.glowstone && skillLevel >= 25 && Math.random() * 100 > 95)
|
||||
{
|
||||
xp+= LoadProperties.mglowstone2;
|
||||
is.add(new ItemStack(Material.GLOWSTONE_DUST, 1, (byte)0, (byte)0));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
//Drop items
|
||||
@@ -265,16 +177,20 @@ public class Excavation
|
||||
if(LoadProperties.toolsLoseDurabilityFromAbilities)
|
||||
{
|
||||
if(!player.getItemInHand().containsEnchantment(Enchantment.DURABILITY))
|
||||
m.damageTool(player, (short) LoadProperties.abilityDurabilityLoss);
|
||||
{
|
||||
short durability = player.getItemInHand().getDurability();
|
||||
durability += LoadProperties.abilityDurabilityLoss;
|
||||
player.getItemInHand().setDurability(durability);
|
||||
}
|
||||
}
|
||||
|
||||
if(block.getData() != (byte)5)
|
||||
{
|
||||
PlayerAnimationEvent armswing = new PlayerAnimationEvent(player);
|
||||
Bukkit.getPluginManager().callEvent(armswing);
|
||||
Excavation.excavationProcCheck(block.getType(), block.getLocation(), player);
|
||||
Excavation.excavationProcCheck(block.getType(), block.getLocation(), player);
|
||||
Excavation.excavationProcCheck(block.getType(), block.getLocation(), player);
|
||||
Excavation.excavationProcCheck(block, player);
|
||||
Excavation.excavationProcCheck(block, player);
|
||||
Excavation.excavationProcCheck(block, player);
|
||||
}
|
||||
|
||||
if(LoadProperties.spoutEnabled)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package com.gmail.nossr50.skills;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
@@ -23,132 +24,70 @@ import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.PlayerInventory;
|
||||
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
|
||||
|
||||
public class Herbalism
|
||||
{
|
||||
|
||||
public static void greenTerraCheck(Player player, Block block)
|
||||
{
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
if(m.isHoe(player.getItemInHand()))
|
||||
{
|
||||
if(block != null)
|
||||
{
|
||||
if(!m.abilityBlockCheck(block))
|
||||
return;
|
||||
}
|
||||
if(PP.getHoePreparationMode())
|
||||
{
|
||||
PP.setHoePreparationMode(false);
|
||||
}
|
||||
int ticks = 2;
|
||||
int x = PP.getSkillLevel(SkillType.HERBALISM);
|
||||
while(x >= 50)
|
||||
{
|
||||
x-=50;
|
||||
ticks++;
|
||||
}
|
||||
|
||||
if(!PP.getGreenTerraMode() && Skills.cooldownOver(player, PP.getGreenTerraDeactivatedTimeStamp(), LoadProperties.greenTerraCooldown))
|
||||
{
|
||||
player.sendMessage(mcLocale.getString("Skills.GreenTerraOn"));
|
||||
for(Player y : player.getWorld().getPlayers())
|
||||
{
|
||||
if(y != null && y != player && m.getDistance(player.getLocation(), y.getLocation()) < 10)
|
||||
y.sendMessage(mcLocale.getString("Skills.GreenTerraPlayer", new Object[] {player.getName()}));
|
||||
}
|
||||
PP.setGreenTerraActivatedTimeStamp(System.currentTimeMillis());
|
||||
PP.setGreenTerraDeactivatedTimeStamp(System.currentTimeMillis() + (ticks * 1000));
|
||||
PP.setGreenTerraMode(true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
public static void greenTerraWheat(Player player, Block block, BlockBreakEvent event, mcMMO plugin)
|
||||
{
|
||||
if(block.getType() == Material.WHEAT && block.getData() == (byte) 0x07)
|
||||
{
|
||||
event.setCancelled(true);
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
Material mat = Material.getMaterial(296);
|
||||
Location loc = block.getLocation();
|
||||
ItemStack is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
||||
PP.addXP(SkillType.HERBALISM, LoadProperties.mwheat, player);
|
||||
m.mcDropItem(loc, is);
|
||||
|
||||
//DROP SOME SEEDS
|
||||
mat = Material.SEEDS;
|
||||
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
||||
m.mcDropItem(loc, is);
|
||||
|
||||
herbalismProcCheck(block, player, event, plugin);
|
||||
herbalismProcCheck(block, player, event, plugin);
|
||||
block.setData((byte) 0x03);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
public static void greenTerra(Player player, Block block){
|
||||
PlayerInventory inventory = player.getInventory();
|
||||
boolean hasSeeds = inventory.contains(Material.SEEDS);
|
||||
if(block.getType() == Material.COBBLESTONE || block.getType() == Material.DIRT){
|
||||
if(!hasSeeds(player))
|
||||
if(!hasSeeds)
|
||||
player.sendMessage("You need more seeds to spread Green Terra");
|
||||
if(hasSeeds(player) && block.getType() != Material.WHEAT)
|
||||
if(hasSeeds && block.getType() != Material.WHEAT)
|
||||
{
|
||||
removeSeeds(player);
|
||||
if(block.getType() == Material.SMOOTH_BRICK)
|
||||
block.setData((byte)1);
|
||||
if(block.getType() == Material.DIRT)
|
||||
block.setType(Material.GRASS);
|
||||
if(LoadProperties.enableCobbleToMossy && block.getType() == Material.COBBLESTONE)
|
||||
block.setType(Material.MOSSY_COBBLESTONE);
|
||||
inventory.removeItem(new ItemStack(Material.SEEDS, 1));
|
||||
player.updateInventory();
|
||||
if(LoadProperties.enableSmoothToMossy && block.getType() == Material.SMOOTH_BRICK)
|
||||
block.setData((byte)1);
|
||||
if(LoadProperties.enableDirtToGrass && block.getType() == Material.DIRT)
|
||||
block.setType(Material.GRASS);
|
||||
if(LoadProperties.enableCobbleToMossy && block.getType() == Material.COBBLESTONE)
|
||||
block.setType(Material.MOSSY_COBBLESTONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static Boolean canBeGreenTerra(Block block){
|
||||
int t = block.getTypeId();
|
||||
return t == 103 || t == 4 || t == 3 || t == 59 || t == 81 || t == 83 || t == 91 || t == 86 || t == 39 || t == 46 || t == 37 || t == 38;
|
||||
}
|
||||
public static boolean hasSeeds(Player player){
|
||||
ItemStack[] inventory = player.getInventory().getContents();
|
||||
for(ItemStack x : inventory){
|
||||
if(x != null && x.getTypeId() == 295){
|
||||
return true;
|
||||
}
|
||||
switch(block.getType()){
|
||||
case BROWN_MUSHROOM:
|
||||
case CACTUS:
|
||||
case COBBLESTONE:
|
||||
case CROPS:
|
||||
case DIRT:
|
||||
case JACK_O_LANTERN:
|
||||
case MELON_BLOCK:
|
||||
case PUMPKIN:
|
||||
case RED_MUSHROOM:
|
||||
case RED_ROSE:
|
||||
case SMOOTH_BRICK:
|
||||
case SUGAR_CANE_BLOCK:
|
||||
case VINE:
|
||||
case WATER_LILY:
|
||||
case YELLOW_FLOWER:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static void removeSeeds(Player player){
|
||||
ItemStack[] inventory = player.getInventory().getContents();
|
||||
for(ItemStack x : inventory){
|
||||
if(x != null && x.getTypeId() == 295){
|
||||
if(x.getAmount() == 1){
|
||||
x.setTypeId(0);
|
||||
x.setAmount(0);
|
||||
player.getInventory().setContents(inventory);
|
||||
} else{
|
||||
x.setAmount(x.getAmount() - 1);
|
||||
player.getInventory().setContents(inventory);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void herbalismProcCheck(Block block, Player player, BlockBreakEvent event, mcMMO plugin)
|
||||
|
||||
public static void herbalismProcCheck(final Block block, Player player, BlockBreakEvent event, mcMMO plugin)
|
||||
{
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
final PlayerProfile PP = Users.getProfile(player);
|
||||
int herbLevel = PP.getSkillLevel(SkillType.HERBALISM);
|
||||
int type = block.getTypeId();
|
||||
Location loc = block.getLocation();
|
||||
ItemStack is = null;
|
||||
Material mat = null;
|
||||
PlayerInventory inventory = player.getInventory();
|
||||
boolean hasSeeds = inventory.contains(Material.SEEDS);
|
||||
|
||||
if(plugin.misc.blockWatchList.contains(block))
|
||||
{
|
||||
@@ -158,63 +97,59 @@ public class Herbalism
|
||||
//Wheat
|
||||
if(type == 59 && block.getData() == (byte) 0x7)
|
||||
{
|
||||
mat = Material.getMaterial(296);
|
||||
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
||||
is = new ItemStack(Material.WHEAT, 1);
|
||||
PP.addXP(SkillType.HERBALISM, LoadProperties.mwheat, player);
|
||||
|
||||
if(player != null)
|
||||
{
|
||||
if((Math.random() * 1000 <= herbLevel) || herbLevel > 1000)
|
||||
if(herbLevel > 1000 || (Math.random() * 1000 <= herbLevel))
|
||||
m.mcDropItem(loc, is);
|
||||
}
|
||||
|
||||
//GREEN THUMB
|
||||
if((Math.random() * 1500 <= herbLevel) || herbLevel > 1500)
|
||||
if(hasSeeds && PP.getGreenTerraMode() || hasSeeds && (herbLevel >= 1500 || (Math.random() * 1500 <= herbLevel)))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
m.mcDropItem(loc, is);
|
||||
//DROP SOME SEEDS
|
||||
mat = Material.SEEDS;
|
||||
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
||||
is = new ItemStack(Material.SEEDS, 1);
|
||||
m.mcDropItem(loc, is);
|
||||
|
||||
block.setData((byte) 0x1); //Change it to first stage
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
|
||||
public void run() {
|
||||
block.setType(Material.CROPS);
|
||||
//This replants the wheat at a certain stage in development based on Herbalism Skill
|
||||
if(!PP.getGreenTerraMode())
|
||||
{
|
||||
if (PP.getSkillLevel(SkillType.HERBALISM) >= 600)
|
||||
block.setData((byte) 0x4);
|
||||
else if (PP.getSkillLevel(SkillType.HERBALISM) >= 400)
|
||||
block.setData((byte) 0x3);
|
||||
else if (PP.getSkillLevel(SkillType.HERBALISM) >= 200)
|
||||
block.setData((byte) 0x2);
|
||||
else
|
||||
block.setData((byte) 0x1);
|
||||
} else
|
||||
block.setData((byte) 0x4);
|
||||
}
|
||||
}, 1);
|
||||
|
||||
//Setup the bonuses
|
||||
int bonus = 0;
|
||||
if(PP.getSkillLevel(SkillType.HERBALISM) >= 200)
|
||||
bonus++;
|
||||
if(PP.getSkillLevel(SkillType.HERBALISM) >= 400)
|
||||
bonus++;
|
||||
if(PP.getSkillLevel(SkillType.HERBALISM) >= 600)
|
||||
bonus++;
|
||||
|
||||
//Change wheat to be whatever stage based on the bonus
|
||||
if(bonus == 1)
|
||||
block.setData((byte) 0x2);
|
||||
if(bonus == 2)
|
||||
block.setData((byte) 0x3);
|
||||
if(bonus == 3)
|
||||
block.setData((byte) 0x4);
|
||||
inventory.removeItem(new ItemStack(Material.SEEDS, 1));
|
||||
player.updateInventory();
|
||||
}
|
||||
}
|
||||
|
||||
//Nether Wart
|
||||
if(type == 115 && block.getData() == (byte) 0x3)
|
||||
{
|
||||
mat = Material.getMaterial(372);
|
||||
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
||||
is = new ItemStack(Material.NETHER_STALK, 1);
|
||||
PP.addXP(SkillType.HERBALISM, LoadProperties.mnetherwart, player);
|
||||
if(player != null)
|
||||
{
|
||||
if((Math.random() * 1000 <= herbLevel) || herbLevel > 1000)
|
||||
if(herbLevel > 1000 || (Math.random() * 1000 <= herbLevel))
|
||||
{
|
||||
m.mcDropItem(loc, is);
|
||||
m.mcDropItem(loc, is);
|
||||
if(Math.random() * 10 > 5)
|
||||
m.mcDropItem(loc, is);
|
||||
if(Math.random() * 10 > 5)
|
||||
m.mcDropItem(loc, is);
|
||||
if(Math.random() * 10 > 5)
|
||||
m.mcDropItem(loc, is);
|
||||
m.mcDropItems(loc, is, 2);
|
||||
m.mcRandomDropItems(loc, is, 50, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -248,10 +183,10 @@ public class Herbalism
|
||||
{
|
||||
if(materialArray[x] == Material.CACTUS)
|
||||
{
|
||||
is = new ItemStack(Material.CACTUS, 1, (byte)0, (byte)0);
|
||||
is = new ItemStack(Material.CACTUS, 1);
|
||||
if(byteArray[x] != (byte) 5)
|
||||
{
|
||||
if((Math.random() * 1000 <= herbLevel) || herbLevel > 1000)
|
||||
if(herbLevel > 1000 || (Math.random() * 1000 <= herbLevel))
|
||||
{
|
||||
m.mcDropItem(target.getLocation(), is);
|
||||
}
|
||||
@@ -286,11 +221,11 @@ public class Herbalism
|
||||
{
|
||||
if(materialArray[x] == Material.SUGAR_CANE_BLOCK)
|
||||
{
|
||||
is = new ItemStack(Material.SUGAR_CANE, 1, (byte)0, (byte)0);
|
||||
is = new ItemStack(Material.SUGAR_CANE, 1);
|
||||
//Check for being placed by the player
|
||||
if(byteArray[x] != (byte) 5)
|
||||
{
|
||||
if((Math.random() * 1000 <= herbLevel) || herbLevel > 1000)
|
||||
if(herbLevel > 1000 || (Math.random() * 1000 <= herbLevel))
|
||||
{
|
||||
m.mcDropItem(target.getLocation(), is);
|
||||
}
|
||||
@@ -305,10 +240,10 @@ public class Herbalism
|
||||
if((type == 91 || type == 86))
|
||||
{
|
||||
mat = Material.getMaterial(block.getTypeId());
|
||||
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
||||
is = new ItemStack(mat, 1);
|
||||
if(player != null)
|
||||
{
|
||||
if((Math.random() * 1000 <= herbLevel) || herbLevel > 1000)
|
||||
if(herbLevel > 1000 || (Math.random() * 1000 <= herbLevel))
|
||||
{
|
||||
m.mcDropItem(loc, is);
|
||||
}
|
||||
@@ -318,23 +253,13 @@ public class Herbalism
|
||||
//Melon
|
||||
if(type == 103)
|
||||
{
|
||||
mat = Material.getMaterial(360);
|
||||
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
||||
is = new ItemStack(Material.MELON, 1);
|
||||
if(player != null)
|
||||
{
|
||||
if((Math.random() * 1000 <= herbLevel) || herbLevel > 1000)
|
||||
if(herbLevel > 1000 || (Math.random() * 1000 <= herbLevel))
|
||||
{
|
||||
m.mcDropItem(loc, is);
|
||||
m.mcDropItem(loc, is);
|
||||
m.mcDropItem(loc, is);
|
||||
if(Math.random() * 10 > 5)
|
||||
m.mcDropItem(loc, is);
|
||||
if(Math.random() * 10 > 5)
|
||||
m.mcDropItem(loc, is);
|
||||
if(Math.random() * 10 > 5)
|
||||
m.mcDropItem(loc, is);
|
||||
if(Math.random() * 10 > 5)
|
||||
m.mcDropItem(loc, is);
|
||||
m.mcDropItems(loc, is, 3);
|
||||
m.mcRandomDropItems(loc, is, 50, 4);
|
||||
}
|
||||
}
|
||||
PP.addXP(SkillType.HERBALISM, LoadProperties.mmelon, player);
|
||||
@@ -343,10 +268,10 @@ public class Herbalism
|
||||
if(type == 39 || type == 40)
|
||||
{
|
||||
mat = Material.getMaterial(block.getTypeId());
|
||||
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
||||
is = new ItemStack(mat, 1);
|
||||
if(player != null)
|
||||
{
|
||||
if((Math.random() * 1000 <= herbLevel) || herbLevel > 1000)
|
||||
if(herbLevel > 1000 || (Math.random() * 1000 <= herbLevel))
|
||||
{
|
||||
m.mcDropItem(loc, is);
|
||||
}
|
||||
@@ -356,9 +281,9 @@ public class Herbalism
|
||||
//Flower
|
||||
if(type == 37 || type == 38){
|
||||
mat = Material.getMaterial(block.getTypeId());
|
||||
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
||||
is = new ItemStack(mat, 1);
|
||||
if(player != null){
|
||||
if((Math.random() * 1000 <= herbLevel) || herbLevel > 1000)
|
||||
if(herbLevel > 1000 || (Math.random() * 1000 <= herbLevel))
|
||||
m.mcDropItem(loc, is);
|
||||
}
|
||||
PP.addXP(SkillType.HERBALISM, LoadProperties.mflower, player);
|
||||
@@ -366,20 +291,18 @@ public class Herbalism
|
||||
//Lily Pads
|
||||
if(type == 111)
|
||||
{
|
||||
mat = Material.getMaterial(block.getTypeId());
|
||||
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
||||
is = new ItemStack(Material.WATER_LILY, 1);
|
||||
if(player != null){
|
||||
if((Math.random() * 1000 <= herbLevel) || herbLevel > 1000)
|
||||
if(herbLevel > 1000 || (Math.random() * 1000 <= herbLevel))
|
||||
m.mcDropItem(loc, is);
|
||||
}
|
||||
PP.addXP(SkillType.HERBALISM, LoadProperties.mlilypad, player);
|
||||
}
|
||||
//Vines
|
||||
if(type == 106){
|
||||
mat = Material.getMaterial(block.getTypeId());
|
||||
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
||||
is = new ItemStack(Material.VINE, 1, (byte)0, (byte)0);
|
||||
if(player != null){
|
||||
if((Math.random() * 1000 <= herbLevel) || herbLevel > 1000)
|
||||
if(herbLevel > 1000 || (Math.random() * 1000 <= herbLevel))
|
||||
m.mcDropItem(loc, is);
|
||||
}
|
||||
PP.addXP(SkillType.HERBALISM, LoadProperties.mvines, player);
|
||||
|
||||
@@ -18,8 +18,6 @@ package com.gmail.nossr50.skills;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Statistic;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@@ -34,61 +32,16 @@ import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.spout.SpoutStuff;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
|
||||
|
||||
public class Mining
|
||||
{
|
||||
public static void superBreakerCheck(Player player, Block block)
|
||||
{
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
if(m.isMiningPick(player.getItemInHand()))
|
||||
{
|
||||
if(block != null)
|
||||
{
|
||||
if(!m.abilityBlockCheck(block))
|
||||
return;
|
||||
}
|
||||
if(PP.getPickaxePreparationMode())
|
||||
{
|
||||
PP.setPickaxePreparationMode(false);
|
||||
}
|
||||
|
||||
int ticks = 2;
|
||||
int x = PP.getSkillLevel(SkillType.MINING);
|
||||
|
||||
while(x >= 50)
|
||||
{
|
||||
x-=50;
|
||||
ticks++;
|
||||
}
|
||||
|
||||
if(!PP.getSuperBreakerMode() && Skills.cooldownOver(player, PP.getSuperBreakerDeactivatedTimeStamp(), LoadProperties.superBreakerCooldown)){
|
||||
player.sendMessage(mcLocale.getString("Skills.SuperBreakerOn"));
|
||||
for(Player y : player.getWorld().getPlayers())
|
||||
{
|
||||
if(y != null && y != player && m.getDistance(player.getLocation(), y.getLocation()) < 10)
|
||||
y.sendMessage(mcLocale.getString("Skills.SuperBreakerPlayer", new Object[] {player.getName()}));
|
||||
}
|
||||
PP.setSuperBreakerActivatedTimeStamp(System.currentTimeMillis());
|
||||
PP.setSuperBreakerDeactivatedTimeStamp(System.currentTimeMillis() + (ticks * 1000));
|
||||
PP.setSuperBreakerMode(true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void blockProcSimulate(Block block, Player player)
|
||||
{
|
||||
Location loc = block.getLocation();
|
||||
int id = block.getTypeId();
|
||||
Material mat = Material.getMaterial(id);
|
||||
byte damage = 0;
|
||||
ItemStack item = new ItemStack(mat, 1, (byte)0, damage);
|
||||
|
||||
if(id != 89 && id != 73 && id != 74 && id != 56 && id != 21 && id != 1 && id != 16 && id != 112 && id != 121 && id != 48) {
|
||||
m.mcDropItem(loc, item);
|
||||
return;
|
||||
}
|
||||
ItemStack item = new ItemStack(id, 1);
|
||||
|
||||
//Drop natural block with Silk Touch
|
||||
if(player.getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH)){
|
||||
@@ -99,69 +52,43 @@ public class Mining
|
||||
switch (id){
|
||||
//GLOWSTONE
|
||||
case 89:
|
||||
mat = Material.getMaterial(348);
|
||||
item = new ItemStack(mat, 1, (byte)0, damage);
|
||||
m.mcDropItem(loc, item);
|
||||
m.mcDropItem(loc, item);
|
||||
if(Math.random() * 10 > 5)
|
||||
m.mcDropItem(loc, item);
|
||||
if(Math.random() * 10 > 5)
|
||||
m.mcDropItem(loc, item);
|
||||
item = new ItemStack(348, 1);
|
||||
m.mcDropItems(loc, item, 2);
|
||||
m.mcRandomDropItems(loc, item, 50, 2);
|
||||
break;
|
||||
//REDSTONE
|
||||
case 73:
|
||||
mat = Material.getMaterial(331);
|
||||
item = new ItemStack(mat, 1, (byte)0, damage);
|
||||
m.mcDropItem(loc, item);
|
||||
m.mcDropItem(loc, item);
|
||||
m.mcDropItem(loc, item);
|
||||
m.mcDropItem(loc, item);
|
||||
if(Math.random() * 10 > 5)
|
||||
m.mcDropItem(loc, item);
|
||||
item = new ItemStack(331, 1);
|
||||
m.mcDropItems(loc, item, 4);
|
||||
m.mcRandomDropItem(loc, item, 50);
|
||||
break;
|
||||
case 74:
|
||||
mat = Material.getMaterial(331);
|
||||
item = new ItemStack(mat, 1, (byte)0, damage);
|
||||
m.mcDropItem(loc, item);
|
||||
m.mcDropItem(loc, item);
|
||||
m.mcDropItem(loc, item);
|
||||
m.mcDropItem(loc, item);
|
||||
if(Math.random() * 10 > 5)
|
||||
m.mcDropItem(loc, item);
|
||||
item = new ItemStack(331, 1);
|
||||
m.mcDropItems(loc, item, 4);
|
||||
m.mcRandomDropItem(loc, item, 50);
|
||||
break;
|
||||
//LAPIS
|
||||
case 21:
|
||||
mat = Material.getMaterial(351);
|
||||
item = new ItemStack(mat, 1, (byte)0,(byte)0x4);
|
||||
m.mcDropItem(loc, item);
|
||||
m.mcDropItem(loc, item);
|
||||
m.mcDropItem(loc, item);
|
||||
m.mcDropItem(loc, item);
|
||||
if(Math.random() * 10 > 5)
|
||||
m.mcDropItem(loc, item);
|
||||
if(Math.random() * 10 > 5)
|
||||
m.mcDropItem(loc, item);
|
||||
if(Math.random() * 10 > 5)
|
||||
m.mcDropItem(loc, item);
|
||||
if(Math.random() * 10 > 5)
|
||||
m.mcDropItem(loc, item);
|
||||
item = new ItemStack(351, 1, (byte)0,(byte)0x4);
|
||||
m.mcDropItems(loc, item, 4);
|
||||
m.mcRandomDropItems(loc, item, 50, 4);
|
||||
break;
|
||||
//DIAMOND
|
||||
case 56:
|
||||
mat = Material.getMaterial(264);
|
||||
item = new ItemStack(mat, 1, (byte)0, damage);
|
||||
item = new ItemStack(264, 1);
|
||||
m.mcDropItem(loc, item);
|
||||
break;
|
||||
//STONE
|
||||
case 1:
|
||||
mat = Material.getMaterial(4);
|
||||
item = new ItemStack(mat, 1, (byte)0, damage);
|
||||
item = new ItemStack(4, 1);
|
||||
m.mcDropItem(loc, item);
|
||||
break;
|
||||
//COAL
|
||||
case 16:
|
||||
mat = Material.getMaterial(263);
|
||||
item = new ItemStack(mat, 1, (byte)0, damage);
|
||||
item = new ItemStack(263, 1);
|
||||
m.mcDropItem(loc, item);
|
||||
break;
|
||||
default:
|
||||
m.mcDropItem(loc, item);
|
||||
break;
|
||||
}
|
||||
@@ -169,13 +96,10 @@ public class Mining
|
||||
|
||||
public static void blockProcCheck(Block block, Player player)
|
||||
{
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
int skillLevel = Users.getProfile(player).getSkillLevel(SkillType.MINING);
|
||||
|
||||
if((Math.random() * 1000 <= PP.getSkillLevel(SkillType.MINING)) || PP.getSkillLevel(SkillType.MINING) > 1000)
|
||||
{
|
||||
if(skillLevel > 1000 || (Math.random() * 1000 <= skillLevel))
|
||||
blockProcSimulate(block, player);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public static void miningBlockCheck(Player player, Block block, mcMMO plugin)
|
||||
@@ -234,10 +158,6 @@ public class Mining
|
||||
case 21:
|
||||
xp += LoadProperties.mlapis;
|
||||
break;
|
||||
//NETHER BRICK
|
||||
case 112:
|
||||
xp += LoadProperties.mnetherbrick;
|
||||
break;
|
||||
//END STONE
|
||||
case 121:
|
||||
xp += LoadProperties.mendstone;
|
||||
@@ -246,10 +166,6 @@ public class Mining
|
||||
case 48:
|
||||
xp += LoadProperties.mmossstone;
|
||||
break;
|
||||
//STONE BRICK
|
||||
case 98:
|
||||
xp += LoadProperties.mstonebrick;
|
||||
break;
|
||||
}
|
||||
|
||||
if(canBeSuperBroken(block))
|
||||
@@ -263,8 +179,24 @@ public class Mining
|
||||
*/
|
||||
public static Boolean canBeSuperBroken(Block block)
|
||||
{
|
||||
int id = block.getTypeId();
|
||||
return id == 1 || id == 14 || id == 15 || id == 16 || id == 21 || id == 24 || id == 49 || id == 56 || id == 73 || id == 74 || id == 87 || id == 89 || id == 112 || id == 121 || id == 48 || id == 98;
|
||||
switch(block.getType()){
|
||||
case COAL_ORE:
|
||||
case DIAMOND_ORE:
|
||||
case ENDER_STONE:
|
||||
case GLOWING_REDSTONE_ORE:
|
||||
case GLOWSTONE:
|
||||
case GOLD_ORE:
|
||||
case IRON_ORE:
|
||||
case LAPIS_ORE:
|
||||
case MOSSY_COBBLESTONE:
|
||||
case NETHERRACK:
|
||||
case OBSIDIAN:
|
||||
case REDSTONE_ORE:
|
||||
case SANDSTONE:
|
||||
case STONE:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void SuperBreakerBlockCheck(Player player, Block block, mcMMO plugin)
|
||||
@@ -273,7 +205,11 @@ public class Mining
|
||||
if(LoadProperties.toolsLoseDurabilityFromAbilities)
|
||||
{
|
||||
if(!player.getItemInHand().containsEnchantment(Enchantment.DURABILITY))
|
||||
m.damageTool(player, (short) LoadProperties.abilityDurabilityLoss);
|
||||
{
|
||||
short durability = player.getItemInHand().getDurability();
|
||||
durability += LoadProperties.abilityDurabilityLoss;
|
||||
player.getItemInHand().setDurability(durability);
|
||||
}
|
||||
}
|
||||
|
||||
//Pre-processing
|
||||
@@ -369,14 +305,6 @@ public class Mining
|
||||
blockProcCheck(block, player);
|
||||
blockProcCheck(block, player);
|
||||
}
|
||||
//NETHER BRICK
|
||||
else if(id == 112 && block.getData() != (byte) 5)
|
||||
{
|
||||
Bukkit.getPluginManager().callEvent(armswing);
|
||||
xp += LoadProperties.mnetherbrick;
|
||||
blockProcCheck(block, player);
|
||||
blockProcCheck(block, player);
|
||||
}
|
||||
//END STONE
|
||||
else if(id == 121 && block.getData() != (byte) 5)
|
||||
{
|
||||
@@ -393,15 +321,6 @@ public class Mining
|
||||
blockProcCheck(block, player);
|
||||
blockProcCheck(block, player);
|
||||
}
|
||||
//STONE BRICK
|
||||
else if(id == 98 && !plugin.misc.blockWatchList.contains(block))
|
||||
{
|
||||
Bukkit.getPluginManager().callEvent(armswing);
|
||||
xp += LoadProperties.mstonebrick;
|
||||
blockProcCheck(block, player);
|
||||
blockProcCheck(block, player);
|
||||
}
|
||||
|
||||
if(!plugin.misc.blockWatchList.contains(block) && block.getData() != (byte) 5)
|
||||
PP.addXP(SkillType.MINING, xp, player);
|
||||
if(LoadProperties.spoutEnabled)
|
||||
|
||||
@@ -16,12 +16,14 @@
|
||||
*/
|
||||
package com.gmail.nossr50.skills;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.PlayerInventory;
|
||||
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
@@ -34,9 +36,6 @@ import com.gmail.nossr50.locale.mcLocale;
|
||||
|
||||
public class Repair {
|
||||
|
||||
/*
|
||||
* Repair requirements for each material
|
||||
*/
|
||||
private static int rGold = LoadProperties.rGold;
|
||||
private static String nGold = LoadProperties.nGold;
|
||||
private static int rStone = LoadProperties.rStone;
|
||||
@@ -51,13 +50,19 @@ public class Repair {
|
||||
private static String nString = LoadProperties.nString;
|
||||
private static int rLeather = LoadProperties.rLeather;
|
||||
private static String nLeather = LoadProperties.nLeather;
|
||||
|
||||
|
||||
private static int dLevel = LoadProperties.repairdiamondlevel;
|
||||
private static int iLevel = LoadProperties.repairIronLevel;
|
||||
private static int gLevel = LoadProperties.repairGoldLevel;
|
||||
private static int sLevel = LoadProperties.repairStoneLevel;
|
||||
private static boolean spout = LoadProperties.spoutEnabled;
|
||||
|
||||
public static void repairCheck(Player player, ItemStack is, Block block){
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
short durabilityBefore = player.getItemInHand().getDurability();
|
||||
short durabilityAfter = 0;
|
||||
short dif = 0;
|
||||
|
||||
short durabilityBefore = is.getDurability();
|
||||
PlayerInventory inventory = player.getInventory();
|
||||
int skillLevel = PP.getSkillLevel(SkillType.REPAIR);
|
||||
|
||||
//Stuff for keeping enchants
|
||||
Enchantment[] enchants = new Enchantment[is.getEnchantments().size()];
|
||||
int[] enchantsLevel = new int[is.getEnchantments().size()];
|
||||
@@ -71,71 +76,39 @@ public class Repair {
|
||||
}
|
||||
|
||||
if(block != null && mcPermissions.getInstance().repair(player)){
|
||||
if(player.getItemInHand().getDurability() > 0 && player.getItemInHand().getAmount() < 2){
|
||||
if(durabilityBefore > 0 && is.getAmount() < 2){
|
||||
|
||||
/*
|
||||
* REPAIR ARMOR
|
||||
*/
|
||||
if(isArmor(is)){
|
||||
if(isArmor(is) && LoadProperties.repairArmor){
|
||||
|
||||
//DIAMOND ARMOR
|
||||
if(isDiamondArmor(is) && hasItem(player, rDiamond) && PP.getSkillLevel(SkillType.REPAIR) >= LoadProperties.repairdiamondlevel){
|
||||
removeItem(player, rDiamond);
|
||||
if(isDiamondArmor(is) && inventory.contains(rDiamond) && skillLevel >= dLevel){
|
||||
inventory.removeItem(new ItemStack(rDiamond, 1));
|
||||
repairItem(player, enchants, enchantsLevel);
|
||||
|
||||
durabilityAfter = player.getItemInHand().getDurability();
|
||||
dif = (short) (durabilityBefore - durabilityAfter);
|
||||
dif = (short) (dif * 6); //Boost XP
|
||||
PP.addXP(SkillType.REPAIR, dif*10, player);
|
||||
|
||||
//CLANG CLANG
|
||||
if(LoadProperties.spoutEnabled)
|
||||
SpoutStuff.playRepairNoise(player);
|
||||
xpHandler(player, PP, is, durabilityBefore, 6, true);
|
||||
}
|
||||
|
||||
//IRON ARMOR
|
||||
else if (isIronArmor(is) && hasItem(player, rIron)){
|
||||
removeItem(player, rIron);
|
||||
else if (isIronArmor(is) && inventory.contains(rIron) && skillLevel >= iLevel){
|
||||
inventory.removeItem(new ItemStack(rIron, 1));
|
||||
repairItem(player, enchants, enchantsLevel);
|
||||
|
||||
durabilityAfter = player.getItemInHand().getDurability();
|
||||
dif = (short) (durabilityBefore - durabilityAfter);
|
||||
dif = (short) (dif * 2); //Boost XP
|
||||
PP.addXP(SkillType.REPAIR, dif*10, player);
|
||||
|
||||
//CLANG CLANG
|
||||
if(LoadProperties.spoutEnabled)
|
||||
SpoutStuff.playRepairNoise(player);
|
||||
xpHandler(player, PP, is, durabilityBefore, 2, true);
|
||||
}
|
||||
|
||||
//GOLD ARMOR
|
||||
else if (isGoldArmor(is) && hasItem(player, rGold)){
|
||||
removeItem(player, rGold);
|
||||
else if (isGoldArmor(is) && inventory.contains(rGold) && skillLevel >= gLevel){
|
||||
inventory.removeItem(new ItemStack(rGold, 1));
|
||||
repairItem(player, enchants, enchantsLevel);
|
||||
|
||||
durabilityAfter = player.getItemInHand().getDurability();
|
||||
dif = (short) (durabilityBefore - durabilityAfter);
|
||||
dif = (short) (dif * 4); //Boost XP
|
||||
PP.addXP(SkillType.REPAIR, dif*10, player);
|
||||
|
||||
//CLANG CLANG
|
||||
if(LoadProperties.spoutEnabled)
|
||||
SpoutStuff.playRepairNoise(player);
|
||||
xpHandler(player, PP, is, durabilityBefore, 4, true);
|
||||
}
|
||||
|
||||
//LEATHER ARMOR
|
||||
else if (isLeatherArmor(is) && hasItem(player, rLeather)){
|
||||
removeItem(player, rLeather);
|
||||
else if (isLeatherArmor(is) && inventory.contains(rLeather)){
|
||||
inventory.removeItem(new ItemStack(rLeather, 1));
|
||||
repairItem(player, enchants, enchantsLevel);
|
||||
|
||||
durabilityAfter = player.getItemInHand().getDurability();
|
||||
dif = (short) (durabilityBefore - durabilityAfter);
|
||||
dif = (short) (dif * 1); //Boost XP
|
||||
PP.addXP(SkillType.REPAIR, dif*10, player);
|
||||
|
||||
//CLANG CLANG
|
||||
if(LoadProperties.spoutEnabled)
|
||||
SpoutStuff.playRepairNoise(player);
|
||||
xpHandler(player, PP, is, durabilityBefore, 1, true);
|
||||
}
|
||||
|
||||
//UNABLE TO REPAIR
|
||||
@@ -147,127 +120,48 @@ public class Repair {
|
||||
/*
|
||||
* REPAIR TOOLS
|
||||
*/
|
||||
if(isTools(is)){
|
||||
if(isTools(is) && LoadProperties.repairTools){
|
||||
|
||||
//STONE TOOLS
|
||||
if(isStoneTools(is) && hasItem(player, rStone)){
|
||||
removeItem(player, rStone);
|
||||
if(isStoneTools(is) && inventory.contains(rStone) && skillLevel >= sLevel){
|
||||
inventory.removeItem(new ItemStack(rStone, 1));
|
||||
repairItem(player, enchants, enchantsLevel);
|
||||
|
||||
durabilityAfter = player.getItemInHand().getDurability();
|
||||
dif = (short) (durabilityBefore - durabilityAfter);
|
||||
if(m.isShovel(is))
|
||||
dif = (short) (dif / 3);
|
||||
if(m.isSwords(is))
|
||||
dif = (short) (dif / 2);
|
||||
if(m.isHoe(is))
|
||||
dif = (short) (dif / 2);
|
||||
//STONE NERF
|
||||
dif = (short) (dif / 2);
|
||||
|
||||
PP.addXP(SkillType.REPAIR, dif*10, player);
|
||||
xpHandler(player, PP, is, durabilityBefore, 2, false);
|
||||
}
|
||||
|
||||
//WOOD TOOLS
|
||||
else if(isWoodTools(is) && hasItem(player,rWood)){
|
||||
removeItem(player,rWood);
|
||||
else if(isWoodTools(is) && inventory.contains(rWood)){
|
||||
inventory.removeItem(new ItemStack(rWood, 1));
|
||||
repairItem(player, enchants, enchantsLevel);
|
||||
|
||||
durabilityAfter = player.getItemInHand().getDurability();
|
||||
dif = (short) (durabilityBefore - durabilityAfter);
|
||||
if(m.isShovel(is))
|
||||
dif = (short) (dif / 3);
|
||||
if(m.isSwords(is))
|
||||
dif = (short) (dif / 2);
|
||||
if(m.isHoe(is))
|
||||
dif = (short) (dif / 2);
|
||||
//WOOD NERF
|
||||
dif = (short) (dif / 2);
|
||||
|
||||
PP.addXP(SkillType.REPAIR, dif*10, player);
|
||||
xpHandler(player, PP, is, durabilityBefore, 2, false);
|
||||
}
|
||||
|
||||
//IRON TOOLS
|
||||
else if(isIronTools(is) && hasItem(player, rIron)){
|
||||
removeItem(player, rIron);
|
||||
else if(isIronTools(is) && inventory.contains(rIron) && skillLevel >= iLevel){
|
||||
inventory.removeItem(new ItemStack(rIron, 1));
|
||||
repairItem(player, enchants, enchantsLevel);
|
||||
|
||||
durabilityAfter = player.getItemInHand().getDurability();
|
||||
dif = (short) (durabilityBefore - durabilityAfter);
|
||||
if(m.isShovel(is))
|
||||
dif = (short) (dif / 3);
|
||||
if(m.isSwords(is))
|
||||
dif = (short) (dif / 2);
|
||||
if(m.isHoe(is))
|
||||
dif = (short) (dif / 2);
|
||||
|
||||
PP.addXP(SkillType.REPAIR, dif*10, player);
|
||||
|
||||
//CLANG CLANG
|
||||
if(LoadProperties.spoutEnabled)
|
||||
SpoutStuff.playRepairNoise(player);
|
||||
|
||||
xpHandler(player, PP, is, durabilityBefore, 1, true);
|
||||
}
|
||||
|
||||
//DIAMOND TOOLS
|
||||
else if (isDiamondTools(is) && hasItem(player, rDiamond) && PP.getSkillLevel(SkillType.REPAIR) >= LoadProperties.repairdiamondlevel){
|
||||
removeItem(player, rDiamond);
|
||||
else if (isDiamondTools(is) && inventory.contains(rDiamond) && skillLevel >= dLevel){
|
||||
inventory.removeItem(new ItemStack(rDiamond, 1));
|
||||
repairItem(player, enchants, enchantsLevel);
|
||||
|
||||
durabilityAfter = player.getItemInHand().getDurability();
|
||||
dif = (short) (durabilityBefore - durabilityAfter);
|
||||
if(m.isShovel(is))
|
||||
dif = (short) (dif / 3);
|
||||
if(m.isSwords(is))
|
||||
dif = (short) (dif / 2);
|
||||
if(m.isHoe(is))
|
||||
dif = (short) (dif / 2);
|
||||
PP.addXP(SkillType.REPAIR, dif*10, player);
|
||||
|
||||
//CLANG CLANG
|
||||
if(LoadProperties.spoutEnabled)
|
||||
SpoutStuff.playRepairNoise(player);
|
||||
|
||||
xpHandler(player, PP, is, durabilityBefore, 1, true);
|
||||
}
|
||||
|
||||
//GOLD TOOLS
|
||||
else if(isGoldTools(is) && hasItem(player, rGold)){
|
||||
removeItem(player, rGold);
|
||||
else if(isGoldTools(is) && inventory.contains(rGold) && skillLevel >= gLevel){
|
||||
inventory.removeItem(new ItemStack(rGold, 1));
|
||||
repairItem(player, enchants, enchantsLevel);
|
||||
|
||||
durabilityAfter = player.getItemInHand().getDurability();
|
||||
dif = (short) (durabilityBefore - durabilityAfter);
|
||||
dif = (short) (dif * 7.6); //Boost XP for Gold to that of around Iron
|
||||
if(m.isShovel(is))
|
||||
dif = (short) (dif / 3);
|
||||
if(m.isSwords(is))
|
||||
dif = (short) (dif / 2);
|
||||
if(m.isHoe(is))
|
||||
dif = (short) (dif / 2);
|
||||
PP.addXP(SkillType.REPAIR, dif*10, player);
|
||||
|
||||
//CLANG CLANG
|
||||
if(LoadProperties.spoutEnabled)
|
||||
SpoutStuff.playRepairNoise(player);
|
||||
xpHandler(player, PP, is, durabilityBefore, 8, true);
|
||||
}
|
||||
|
||||
//BOW
|
||||
else if(isBow(is) && hasItem(player, rString)){
|
||||
removeItem(player, rString);
|
||||
else if(isBow(is) && inventory.contains(rString)){
|
||||
inventory.removeItem(new ItemStack(rString, 1));
|
||||
repairItem(player, enchants, enchantsLevel);
|
||||
|
||||
durabilityAfter = player.getItemInHand().getDurability();
|
||||
dif = (short) (durabilityBefore - durabilityAfter);
|
||||
|
||||
//STRING NERF
|
||||
dif = (short) (dif / 2);
|
||||
|
||||
PP.addXP(SkillType.REPAIR, dif*10, player);
|
||||
|
||||
|
||||
//CLANG CLANG
|
||||
if(LoadProperties.spoutEnabled)
|
||||
SpoutStuff.playRepairNoise(player);
|
||||
xpHandler(player, PP, is, durabilityBefore, 2, false);
|
||||
}
|
||||
|
||||
//UNABLE TO REPAIR
|
||||
@@ -288,22 +182,46 @@ public class Repair {
|
||||
}
|
||||
}
|
||||
|
||||
public static int getArcaneForgingRank(PlayerProfile PP){
|
||||
int rank = 0;
|
||||
|
||||
if(PP.getSkillLevel(SkillType.REPAIR) >= 750)
|
||||
rank = 4;
|
||||
public static void xpHandler(Player player, PlayerProfile PP, ItemStack is, short durabilityBefore, int modify, boolean boost)
|
||||
{
|
||||
short durabilityAfter = is.getDurability();
|
||||
short dif = (short) (durabilityBefore - durabilityAfter);
|
||||
if(boost)
|
||||
dif = (short) (dif * modify);
|
||||
if(!boost)
|
||||
dif = (short) (dif / modify);
|
||||
if(m.isShovel(is))
|
||||
dif = (short) (dif / 3);
|
||||
if(m.isSwords(is))
|
||||
dif = (short) (dif / 2);
|
||||
if(m.isHoe(is))
|
||||
dif = (short) (dif / 2);
|
||||
|
||||
else if (PP.getSkillLevel(SkillType.REPAIR) >= 500)
|
||||
rank = 3;
|
||||
PP.addXP(SkillType.REPAIR, dif*10, player);
|
||||
|
||||
else if(PP.getSkillLevel(SkillType.REPAIR) >= 250)
|
||||
rank = 2;
|
||||
//CLANG CLANG
|
||||
if(spout)
|
||||
SpoutStuff.playRepairNoise(player);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current Arcane Forging rank.
|
||||
*
|
||||
* @param skillLevel The skill level of the player whose rank is being checked
|
||||
* @return The player's current Arcane Forging rank
|
||||
*/
|
||||
public static int getArcaneForgingRank(int skillLevel)
|
||||
{
|
||||
if(skillLevel >= LoadProperties.arcaneRank4)
|
||||
return 4;
|
||||
if (skillLevel >= LoadProperties.arcaneRank3)
|
||||
return 3;
|
||||
if(skillLevel >= LoadProperties.arcaneRank2)
|
||||
return 2;
|
||||
if (skillLevel >= LoadProperties.arcaneRank1)
|
||||
return 1;
|
||||
|
||||
else if (PP.getSkillLevel(SkillType.REPAIR) >= 100)
|
||||
rank = 1;
|
||||
|
||||
return rank;
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static void addEnchants(ItemStack is, Enchantment[] enchants, int[] enchantsLvl, PlayerProfile PP, Player player){
|
||||
@@ -311,7 +229,7 @@ public class Repair {
|
||||
return;
|
||||
|
||||
int pos = 0;
|
||||
int rank = getArcaneForgingRank(PP);
|
||||
int rank = getArcaneForgingRank(PP.getSkillLevel(SkillType.REPAIR));
|
||||
|
||||
if(rank == 0)
|
||||
{
|
||||
@@ -374,7 +292,15 @@ public class Repair {
|
||||
player.sendMessage(mcLocale.getString("Repair.Downgraded"));
|
||||
}
|
||||
}
|
||||
public static int getEnchantChance(int rank){
|
||||
|
||||
/**
|
||||
* Gets chance of keeping enchantment during repair.
|
||||
*
|
||||
* @param rank Arcane Forging rank
|
||||
* @return The chance of keeping the enchantment
|
||||
*/
|
||||
public static int getEnchantChance(int rank)
|
||||
{
|
||||
switch(rank)
|
||||
{
|
||||
case 4:
|
||||
@@ -389,6 +315,13 @@ public class Repair {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets chance of enchantment being downgraded during repair.
|
||||
*
|
||||
* @param rank Arcane Forging rank
|
||||
* @return The chance of the enchantment being downgraded
|
||||
*/
|
||||
public static int getDowngradeChance(int rank)
|
||||
{
|
||||
switch(rank)
|
||||
@@ -405,357 +338,252 @@ public class Repair {
|
||||
return 100;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isArmor(ItemStack is){
|
||||
return is.getTypeId() == 306 || is.getTypeId() == 307 ||is.getTypeId() == 308 ||is.getTypeId() == 309 || //IRON
|
||||
is.getTypeId() == 310 ||is.getTypeId() == 311 ||is.getTypeId() == 312 ||is.getTypeId() == 313 || //DIAMOND
|
||||
is.getTypeId() == 314 || is.getTypeId() == 315 || is.getTypeId() == 316 || is.getTypeId() == 317 || //GOLD
|
||||
is.getTypeId() == 298 || is.getTypeId() == 299 || is.getTypeId() == 300 || is.getTypeId() == 301; //LEATHER
|
||||
return isLeatherArmor(is) || isGoldArmor(is) || isIronArmor(is) || isDiamondArmor(is);
|
||||
}
|
||||
|
||||
public static boolean isLeatherArmor(ItemStack is){
|
||||
return is.getTypeId() == 298 || is.getTypeId() == 299 || is.getTypeId() == 300 || is.getTypeId() == 301;
|
||||
}
|
||||
public static boolean isGoldArmor(ItemStack is){
|
||||
return is.getTypeId() == 314 || is.getTypeId() == 315 || is.getTypeId() == 316 || is.getTypeId() == 317;
|
||||
}
|
||||
public static boolean isIronArmor(ItemStack is){
|
||||
return is.getTypeId() == 306 || is.getTypeId() == 307 || is.getTypeId() == 308 || is.getTypeId() == 309;
|
||||
}
|
||||
public static boolean isDiamondArmor(ItemStack is){
|
||||
return is.getTypeId() == 310 || is.getTypeId() == 311 || is.getTypeId() == 312 || is.getTypeId() == 313;
|
||||
}
|
||||
public static boolean isTools(ItemStack is)
|
||||
{
|
||||
return is.getTypeId() == 359 || is.getTypeId() == 256 || is.getTypeId() == 257 || is.getTypeId() == 258 || is.getTypeId() == 267 || is.getTypeId() == 292 || //IRON
|
||||
is.getTypeId() == 276 || is.getTypeId() == 277 || is.getTypeId() == 278 || is.getTypeId() == 279 || is.getTypeId() == 293 || //DIAMOND
|
||||
is.getTypeId() == 283 || is.getTypeId() == 285 || is.getTypeId() == 286 || is.getTypeId() == 284 || is.getTypeId() == 294 || //GOLD
|
||||
is.getTypeId() == 268 || is.getTypeId() == 269 || is.getTypeId() == 270 || is.getTypeId() == 271 || is.getTypeId() == 290 ||//WOOD
|
||||
is.getTypeId() == 272 || is.getTypeId() == 273 || is.getTypeId() == 274 || is.getTypeId() == 275|| is.getTypeId() == 291 || //STONE
|
||||
is.getTypeId() == 261; //BOW
|
||||
}
|
||||
public static boolean isStoneTools(ItemStack is){
|
||||
return is.getTypeId() == 272 || is.getTypeId() == 273 || is.getTypeId() == 274 || is.getTypeId() == 275 || is.getTypeId() == 291;
|
||||
}
|
||||
public static boolean isWoodTools(ItemStack is){
|
||||
return is.getTypeId() == 268 || is.getTypeId() == 269 || is.getTypeId() == 270 || is.getTypeId() == 271 || is.getTypeId() == 290;
|
||||
}
|
||||
public static boolean isGoldTools(ItemStack is){
|
||||
return is.getTypeId() == 283 || is.getTypeId() == 285 || is.getTypeId() == 286 || is.getTypeId() == 284 || is.getTypeId() == 294;
|
||||
}
|
||||
public static boolean isIronTools(ItemStack is){
|
||||
return is.getTypeId() == 359 || is.getTypeId() == 256 || is.getTypeId() == 257 || is.getTypeId() == 258 || is.getTypeId() == 267 || is.getTypeId() == 292;
|
||||
}
|
||||
public static boolean isDiamondTools(ItemStack is){
|
||||
return is.getTypeId() == 276 || is.getTypeId() == 277 || is.getTypeId() == 278 || is.getTypeId() == 279 || is.getTypeId() == 293;
|
||||
}
|
||||
public static boolean isBow(ItemStack is){
|
||||
return is.getTypeId() == 261;
|
||||
}
|
||||
public static void removeItem(Player player, int typeid)
|
||||
{
|
||||
ItemStack[] inventory = player.getInventory().getContents();
|
||||
for(ItemStack x : inventory){
|
||||
if(x != null && x.getTypeId() == typeid){
|
||||
if(x.getAmount() == 1){
|
||||
x.setTypeId(0);
|
||||
x.setAmount(0);
|
||||
player.getInventory().setContents(inventory);
|
||||
} else{
|
||||
x.setAmount(x.getAmount() - 1);
|
||||
player.getInventory().setContents(inventory);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
public static boolean hasItem(Player player, int typeid){
|
||||
ItemStack[] inventory = player.getInventory().getContents();
|
||||
for(ItemStack x : inventory){
|
||||
if(x != null && x.getTypeId() == typeid){
|
||||
return true;
|
||||
}
|
||||
switch(is.getType()){
|
||||
case LEATHER_BOOTS:
|
||||
case LEATHER_CHESTPLATE:
|
||||
case LEATHER_HELMET:
|
||||
case LEATHER_LEGGINGS:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isGoldArmor(ItemStack is){
|
||||
switch(is.getType()){
|
||||
case GOLD_BOOTS:
|
||||
case GOLD_CHESTPLATE:
|
||||
case GOLD_HELMET:
|
||||
case GOLD_LEGGINGS:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isIronArmor(ItemStack is){
|
||||
switch(is.getType()){
|
||||
case IRON_BOOTS:
|
||||
case IRON_CHESTPLATE:
|
||||
case IRON_HELMET:
|
||||
case IRON_LEGGINGS:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isDiamondArmor(ItemStack is){
|
||||
switch(is.getType()){
|
||||
case DIAMOND_BOOTS:
|
||||
case DIAMOND_CHESTPLATE:
|
||||
case DIAMOND_HELMET:
|
||||
case DIAMOND_LEGGINGS:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isTools(ItemStack is)
|
||||
{
|
||||
return isStoneTools(is) || isWoodTools(is) || isGoldTools(is) || isIronTools(is) || isDiamondTools(is) || isBow(is);
|
||||
}
|
||||
|
||||
public static boolean isStoneTools(ItemStack is){
|
||||
switch(is.getType()){
|
||||
case STONE_AXE:
|
||||
case STONE_HOE:
|
||||
case STONE_PICKAXE:
|
||||
case STONE_SPADE:
|
||||
case STONE_SWORD:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static boolean isWoodTools(ItemStack is){
|
||||
switch(is.getType()){
|
||||
case WOOD_AXE:
|
||||
case WOOD_HOE:
|
||||
case WOOD_PICKAXE:
|
||||
case WOOD_SPADE:
|
||||
case WOOD_SWORD:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static boolean isGoldTools(ItemStack is){
|
||||
switch(is.getType()){
|
||||
case GOLD_AXE:
|
||||
case GOLD_HOE:
|
||||
case GOLD_PICKAXE:
|
||||
case GOLD_SPADE:
|
||||
case GOLD_SWORD:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static boolean isIronTools(ItemStack is){
|
||||
switch(is.getType()){
|
||||
case IRON_AXE:
|
||||
case IRON_HOE:
|
||||
case IRON_PICKAXE:
|
||||
case IRON_SPADE:
|
||||
case IRON_SWORD:
|
||||
case SHEARS:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static boolean isDiamondTools(ItemStack is){
|
||||
switch(is.getType()){
|
||||
case DIAMOND_AXE:
|
||||
case DIAMOND_HOE:
|
||||
case DIAMOND_PICKAXE:
|
||||
case DIAMOND_SPADE:
|
||||
case DIAMOND_SWORD:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static boolean isBow(ItemStack is){
|
||||
return is.getType() == Material.BOW;
|
||||
}
|
||||
|
||||
/**
|
||||
* Computes repair bonuses.
|
||||
*
|
||||
* @param player The player repairing an item
|
||||
* @param durability The durability of the item being repaired
|
||||
* @param ramt The base amount of durability repaired to the item
|
||||
* @return The final amount of durability repaired to the item
|
||||
*/
|
||||
public static short repairCalculate(Player player, short durability, int ramt){
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
float bonus = (float)(PP.getSkillLevel(SkillType.REPAIR)) / 500;
|
||||
int skillLevel = Users.getProfile(player).getSkillLevel(SkillType.REPAIR);
|
||||
float bonus = (float)(skillLevel/500);
|
||||
bonus = (ramt * bonus);
|
||||
ramt+=bonus;
|
||||
if(checkPlayerProcRepair(player)){
|
||||
if(checkPlayerProcRepair(player))
|
||||
ramt = (short) (ramt * 2);
|
||||
}
|
||||
durability-=ramt;
|
||||
if(durability < 0){
|
||||
if(durability < 0)
|
||||
durability = 0;
|
||||
}
|
||||
return durability;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the base durability amount to repair an item.
|
||||
*
|
||||
* @param is The item being repaired
|
||||
* @param player The player repairing the item
|
||||
* @return The final amount of durability repaired to the item
|
||||
*/
|
||||
public static short getRepairAmount(ItemStack is, Player player){
|
||||
short durability = is.getDurability();
|
||||
short maxDurability = is.getType().getMaxDurability();
|
||||
int ramt = 0;
|
||||
switch(is.getTypeId())
|
||||
{
|
||||
/*
|
||||
* TOOLS
|
||||
*/
|
||||
|
||||
//SHEARS
|
||||
case 359:
|
||||
ramt = Material.SHEARS.getMaxDurability() / 2;
|
||||
break;
|
||||
|
||||
//BOW
|
||||
case 261:
|
||||
ramt = Material.BOW.getMaxDurability() / 3;
|
||||
break;
|
||||
|
||||
/* WOOD TOOLS */
|
||||
|
||||
//WOOD SWORD
|
||||
case 268:
|
||||
ramt = Material.WOOD_SWORD.getMaxDurability() / 2;
|
||||
break;
|
||||
//WOOD SHOVEL
|
||||
case 269:
|
||||
ramt = Material.WOOD_SPADE.getMaxDurability();
|
||||
break;
|
||||
//WOOD PICKAXE
|
||||
case 270:
|
||||
ramt = Material.WOOD_PICKAXE.getMaxDurability() / 3;
|
||||
break;
|
||||
//WOOD AXE
|
||||
case 271:
|
||||
ramt = Material.WOOD_AXE.getMaxDurability() / 3;
|
||||
break;
|
||||
//WOOD HOE
|
||||
case 290:
|
||||
ramt = Material.WOOD_HOE.getMaxDurability() / 2;
|
||||
break;
|
||||
|
||||
/* STONE TOOLS */
|
||||
|
||||
//STONE SWORD
|
||||
case 272:
|
||||
ramt = Material.STONE_SWORD.getMaxDurability() / 2;
|
||||
break;
|
||||
//STONE SHOVEL
|
||||
case 273:
|
||||
ramt = Material.STONE_SPADE.getMaxDurability();
|
||||
break;
|
||||
//STONE PICKAXE
|
||||
case 274:
|
||||
ramt = Material.STONE_PICKAXE.getMaxDurability() / 3;
|
||||
break;
|
||||
//STONE AXE
|
||||
case 275:
|
||||
ramt = Material.STONE_AXE.getMaxDurability() / 3;
|
||||
break;
|
||||
//STONE HOE
|
||||
case 291:
|
||||
ramt = Material.STONE_HOE.getMaxDurability() / 2;
|
||||
break;
|
||||
|
||||
/* IRON TOOLS */
|
||||
|
||||
//IRON SWORD
|
||||
case 267:
|
||||
ramt = Material.IRON_SWORD.getMaxDurability() / 2;
|
||||
break;
|
||||
//IRON SHOVEL
|
||||
case 256:
|
||||
ramt = Material.IRON_SPADE.getMaxDurability();
|
||||
break;
|
||||
//IRON PICK
|
||||
case 257:
|
||||
ramt = Material.IRON_PICKAXE.getMaxDurability() / 3;
|
||||
break;
|
||||
//IRON AXE
|
||||
case 258:
|
||||
ramt = Material.IRON_AXE.getMaxDurability() / 3;
|
||||
break;
|
||||
//IRON HOE
|
||||
case 292:
|
||||
ramt = Material.IRON_HOE.getMaxDurability() / 2;
|
||||
break;
|
||||
|
||||
/* DIAMOND TOOLS */
|
||||
|
||||
//DIAMOND SWORD
|
||||
case 276:
|
||||
ramt = Material.DIAMOND_SWORD.getMaxDurability() / 2;
|
||||
break;
|
||||
//DIAMOND SHOVEL
|
||||
case 277:
|
||||
ramt = Material.DIAMOND_SPADE.getMaxDurability();
|
||||
break;
|
||||
//DIAMOND PICK
|
||||
case 278:
|
||||
ramt = Material.DIAMOND_PICKAXE.getMaxDurability() / 3;
|
||||
break;
|
||||
//DIAMOND AXE
|
||||
case 279:
|
||||
ramt = Material.DIAMOND_AXE.getMaxDurability() / 3;
|
||||
break;
|
||||
//DIAMOND HOE
|
||||
case 293:
|
||||
ramt = Material.DIAMOND_HOE.getMaxDurability() / 2;
|
||||
break;
|
||||
|
||||
/* GOLD TOOLS */
|
||||
|
||||
//GOLD SWORD
|
||||
case 283:
|
||||
ramt = Material.GOLD_SWORD.getMaxDurability() / 2;
|
||||
break;
|
||||
//GOLD SHOVEL
|
||||
case 284:
|
||||
ramt = Material.GOLD_SPADE.getMaxDurability();
|
||||
break;
|
||||
//GOLD PICK
|
||||
case 285:
|
||||
ramt = Material.GOLD_PICKAXE.getMaxDurability() / 3;
|
||||
break;
|
||||
//GOLD AXE
|
||||
case 286:
|
||||
ramt = Material.GOLD_AXE.getMaxDurability() / 3;
|
||||
break;
|
||||
//GOLD HOE
|
||||
case 294:
|
||||
ramt = Material.GOLD_HOE.getMaxDurability() / 2;
|
||||
break;
|
||||
/*
|
||||
* ARMOR
|
||||
*/
|
||||
|
||||
/* IRON ARMOR */
|
||||
|
||||
//IRON HELMET
|
||||
case 306:
|
||||
ramt = Material.IRON_HELMET.getMaxDurability() / 5;
|
||||
break;
|
||||
//IRON CHESTPLATE
|
||||
case 307:
|
||||
ramt = Material.IRON_CHESTPLATE.getMaxDurability() / 8;
|
||||
break;
|
||||
//IRON LEGGINGS
|
||||
case 308:
|
||||
ramt = Material.IRON_LEGGINGS.getMaxDurability() / 7;
|
||||
break;
|
||||
//IRON BOOTS
|
||||
case 309:
|
||||
ramt = Material.IRON_BOOTS.getMaxDurability() / 4;
|
||||
break;
|
||||
|
||||
/* DIAMOND ARMOR */
|
||||
|
||||
//DIAMOND HELMET
|
||||
case 310:
|
||||
ramt = Material.DIAMOND_HELMET.getMaxDurability() / 5;
|
||||
break;
|
||||
//DIAMOND CHESTPLATE
|
||||
case 311:
|
||||
ramt = Material.DIAMOND_CHESTPLATE.getMaxDurability() / 8;
|
||||
break;
|
||||
//DIAMOND LEGGINGS
|
||||
case 312:
|
||||
ramt = Material.DIAMOND_LEGGINGS.getMaxDurability() / 7;
|
||||
break;
|
||||
//DIAMOND BOOTS
|
||||
case 313:
|
||||
ramt = Material.DIAMOND_BOOTS.getMaxDurability() / 4;
|
||||
break;
|
||||
|
||||
/* GOLD ARMOR */
|
||||
|
||||
//GOLD HELMET
|
||||
case 314:
|
||||
ramt = Material.GOLD_HELMET.getMaxDurability() / 5;
|
||||
break;
|
||||
//GOLD CHESTPLATE
|
||||
case 315:
|
||||
ramt = Material.GOLD_CHESTPLATE.getMaxDurability() / 8;
|
||||
break;
|
||||
//GOLD LEGGINGS
|
||||
case 316:
|
||||
ramt = Material.GOLD_LEGGINGS.getMaxDurability() / 7;
|
||||
break;
|
||||
//GOLD BOOTS
|
||||
case 317:
|
||||
ramt = Material.GOLD_BOOTS.getMaxDurability() / 4;
|
||||
break;
|
||||
|
||||
/* LEATHER ARMOR */
|
||||
|
||||
//LEATHER HELMET
|
||||
case 298:
|
||||
ramt = Material.LEATHER_HELMET.getMaxDurability() / 5;
|
||||
break;
|
||||
//LEATHER CHESTPLATE
|
||||
case 299:
|
||||
ramt = Material.LEATHER_CHESTPLATE.getMaxDurability() / 8;
|
||||
break;
|
||||
//LEATHER LEGGINGS
|
||||
case 300:
|
||||
ramt = Material.LEATHER_LEGGINGS.getMaxDurability() / 7;
|
||||
break;
|
||||
//LEATHER BOOTS
|
||||
case 301:
|
||||
ramt = Material.LEATHER_BOOTS.getMaxDurability() / 4;
|
||||
break;
|
||||
}
|
||||
|
||||
if(m.isShovel(is))
|
||||
ramt = maxDurability;
|
||||
else if(m.isHoe(is) || m.isSwords(is) || is.getTypeId() == 359)
|
||||
ramt = maxDurability / 2;
|
||||
else if(m.isAxes(is) || m.isMiningPick(is) || isBow(is))
|
||||
ramt = maxDurability / 3;
|
||||
else if(m.isBoots(is))
|
||||
ramt = maxDurability / 4;
|
||||
else if(m.isHelmet(is))
|
||||
ramt = maxDurability / 5;
|
||||
else if(m.isPants(is))
|
||||
ramt = maxDurability / 7;
|
||||
else if(m.isChestplate(is))
|
||||
ramt = maxDurability / 8;
|
||||
|
||||
return repairCalculate(player, durability, ramt);
|
||||
}
|
||||
|
||||
/**
|
||||
* Informs a player that the repair has failed.
|
||||
*
|
||||
* @param is The item being repaired
|
||||
* @param player The player repairing the item
|
||||
*/
|
||||
public static void needMoreVespeneGas(ItemStack is, Player player)
|
||||
{
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
if ((isDiamondTools(is) || isDiamondArmor(is)) && PP.getSkillLevel(SkillType.REPAIR) < LoadProperties.repairdiamondlevel)
|
||||
{
|
||||
player.sendMessage(mcLocale.getString("Skills.AdeptDiamond"));
|
||||
} else if (isDiamondTools(is) && !hasItem(player, rDiamond) || isIronTools(is) && !hasItem(player, rIron) || isGoldTools(is) && !hasItem(player, rGold)){
|
||||
if(isDiamondTools(is) && !hasItem(player, rDiamond))
|
||||
player.sendMessage(mcLocale.getString("Skills.NeedMore")+" "+ChatColor.BLUE+ nDiamond);
|
||||
if(isIronTools(is) && !hasItem(player, rIron))
|
||||
player.sendMessage(mcLocale.getString("Skills.NeedMore")+" "+ChatColor.GRAY+ nIron);
|
||||
if(isGoldTools(is) && !hasItem(player, rGold))
|
||||
player.sendMessage(mcLocale.getString("Skills.NeedMore")+" "+ChatColor.GOLD+nGold);
|
||||
if(isWoodTools(is) && !hasItem(player,rWood))
|
||||
player.sendMessage(mcLocale.getString("Skills.NeedMore")+" "+ChatColor.DARK_GREEN+ nWood);
|
||||
if(isStoneTools(is) && !hasItem(player, rStone))
|
||||
player.sendMessage(mcLocale.getString("Skills.NeedMore")+" "+ChatColor.GRAY+nStone);
|
||||
} else if (isDiamondArmor(is) && !hasItem(player, rDiamond)){
|
||||
player.sendMessage(mcLocale.getString("Skills.NeedMore")+" "+ChatColor.BLUE+ nDiamond);
|
||||
} else if (isIronArmor(is) && !hasItem(player, rIron)){
|
||||
player.sendMessage(mcLocale.getString("Skills.NeedMore")+" "+ChatColor.GRAY+ nIron);
|
||||
} else if (isGoldArmor(is) && !hasItem(player, rGold)){
|
||||
player.sendMessage(mcLocale.getString("Skills.NeedMore")+" "+ChatColor.GOLD+ nGold);
|
||||
} else if (isLeatherArmor(is) && !hasItem(player, rLeather)){
|
||||
player.sendMessage(mcLocale.getString("Skills.NeedMore")+" "+ChatColor.YELLOW+ nLeather);
|
||||
} else if (isBow(is) && !hasItem(player, rString)){
|
||||
player.sendMessage(mcLocale.getString("Skills.NeedMore")+" "+ChatColor.YELLOW+ nString);
|
||||
} else if (is.getAmount() > 1)
|
||||
int skillLevel = Users.getProfile(player).getSkillLevel(SkillType.REPAIR);
|
||||
|
||||
if(is.getAmount() > 1)
|
||||
player.sendMessage(mcLocale.getString("Skills.StackedItems"));
|
||||
else
|
||||
{
|
||||
if(isDiamondTools(is) || isDiamondArmor(is))
|
||||
{
|
||||
if(skillLevel < LoadProperties.repairdiamondlevel)
|
||||
player.sendMessage(mcLocale.getString("Skills.AdeptDiamond"));
|
||||
else
|
||||
player.sendMessage(mcLocale.getString("Skills.NeedMore")+" "+ChatColor.BLUE+ nDiamond);
|
||||
}
|
||||
else if(isIronTools(is) || isIronArmor(is))
|
||||
{
|
||||
if(skillLevel < LoadProperties.repairIronLevel)
|
||||
player.sendMessage(mcLocale.getString("Skills.AdeptIron"));
|
||||
else
|
||||
player.sendMessage(mcLocale.getString("Skills.NeedMore")+" "+ChatColor.GRAY+ nIron);
|
||||
}
|
||||
else if(isGoldTools(is) || isGoldArmor(is))
|
||||
{
|
||||
if(skillLevel < LoadProperties.repairGoldLevel)
|
||||
player.sendMessage(mcLocale.getString("Skills.AdeptGold"));
|
||||
else
|
||||
player.sendMessage(mcLocale.getString("Skills.NeedMore")+" "+ChatColor.GOLD+nGold);
|
||||
}
|
||||
else if(isStoneTools(is))
|
||||
{
|
||||
if(skillLevel < LoadProperties.repairStoneLevel)
|
||||
player.sendMessage(mcLocale.getString("Skills.AdeptStone"));
|
||||
else
|
||||
player.sendMessage(mcLocale.getString("Skills.NeedMore")+" "+ChatColor.GRAY+nStone);
|
||||
}
|
||||
else if(isWoodTools(is))
|
||||
player.sendMessage(mcLocale.getString("Skills.NeedMore")+" "+ChatColor.DARK_GREEN+ nWood);
|
||||
else if (isLeatherArmor(is))
|
||||
player.sendMessage(mcLocale.getString("Skills.NeedMore")+" "+ChatColor.YELLOW+ nLeather);
|
||||
else if (isBow(is))
|
||||
player.sendMessage(mcLocale.getString("Skills.NeedMore")+" "+ChatColor.YELLOW+ nString);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks for Super Repair bonus.
|
||||
*
|
||||
* @param player The player repairing an item.
|
||||
* @return true if bonus granted, false otherwise
|
||||
*/
|
||||
public static boolean checkPlayerProcRepair(Player player)
|
||||
{
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
if(player != null)
|
||||
int skillLevel = Users.getProfile(player).getSkillLevel(SkillType.REPAIR);
|
||||
if(skillLevel > 1000 || (Math.random() * 1000 <= skillLevel))
|
||||
{
|
||||
if((Math.random() * 1000 <= PP.getSkillLevel(SkillType.REPAIR)) || PP.getSkillLevel(SkillType.REPAIR) > 1000)
|
||||
{
|
||||
player.sendMessage(mcLocale.getString("Skills.FeltEasy"));
|
||||
return true;
|
||||
}
|
||||
player.sendMessage(mcLocale.getString("Skills.FeltEasy"));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Repairs an item.
|
||||
*
|
||||
* @param player The player repairing an item
|
||||
* @param enchants The enchantments on the item
|
||||
* @param enchantsLevel The level of the enchantments on the item
|
||||
*/
|
||||
public static void repairItem(Player player, Enchantment[] enchants, int[] enchantsLevel)
|
||||
{
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
ItemStack is = player.getItemInHand();
|
||||
//Handle the enchantments
|
||||
addEnchants(player.getItemInHand(), enchants, enchantsLevel, PP, player);
|
||||
player.getItemInHand().setDurability(getRepairAmount(is, player));
|
||||
addEnchants(is, enchants, enchantsLevel, PP, player);
|
||||
is.setDurability(getRepairAmount(is, player));
|
||||
}
|
||||
}
|
||||
@@ -20,285 +20,104 @@ import java.util.logging.Logger;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.getspout.spoutapi.SpoutManager;
|
||||
import org.getspout.spoutapi.player.SpoutPlayer;
|
||||
|
||||
import com.gmail.nossr50.Leaderboard;
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.spout.SpoutStuff;
|
||||
import com.gmail.nossr50.datatypes.AbilityType;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.PlayerStat;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.datatypes.ToolType;
|
||||
import com.gmail.nossr50.events.McMMOPlayerLevelUpEvent;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
|
||||
|
||||
public class Skills
|
||||
{
|
||||
protected static final Logger log = Logger.getLogger("Minecraft");
|
||||
|
||||
public void updateSQLfromFile(Player player){
|
||||
|
||||
}
|
||||
public static boolean cooldownOver(Player player, long oldTime, int cooldown){
|
||||
long currentTime = System.currentTimeMillis();
|
||||
if(currentTime - oldTime >= (cooldown * 1000)){
|
||||
if(currentTime - oldTime >= (cooldown * 1000))
|
||||
return true;
|
||||
} else {
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public boolean hasArrows(Player player){
|
||||
for(ItemStack x : player.getInventory().getContents()){
|
||||
if (x.getTypeId() == 262){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public void addArrows(Player player){
|
||||
for(ItemStack x : player.getInventory().getContents()){
|
||||
if (x.getTypeId() == 262){
|
||||
x.setAmount(x.getAmount() + 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static int calculateTimeLeft(Player player, long deactivatedTimeStamp, int cooldown)
|
||||
{
|
||||
return (int) (((deactivatedTimeStamp + (cooldown * 1000)) - System.currentTimeMillis())/1000);
|
||||
}
|
||||
|
||||
public static void watchCooldowns(Player player, PlayerProfile PP, long curTime){
|
||||
if(!PP.getGreenTerraInformed() && curTime - (PP.getGreenTerraDeactivatedTimeStamp()*1000) >= (LoadProperties.greenTerraCooldown * 1000)){
|
||||
PP.setGreenTerraInformed(true);
|
||||
player.sendMessage(mcLocale.getString("Skills.YourGreenTerra"));
|
||||
}
|
||||
if(!PP.getTreeFellerInformed() && curTime - (PP.getTreeFellerDeactivatedTimeStamp()*1000) >= (LoadProperties.greenTerraCooldown * 1000)){
|
||||
PP.setTreeFellerInformed(true);
|
||||
player.sendMessage(mcLocale.getString("Skills.YourTreeFeller"));
|
||||
}
|
||||
if(!PP.getSuperBreakerInformed() && curTime - (PP.getSuperBreakerDeactivatedTimeStamp()*1000) >= (LoadProperties.superBreakerCooldown * 1000)){
|
||||
PP.setSuperBreakerInformed(true);
|
||||
player.sendMessage(mcLocale.getString("Skills.YourSuperBreaker"));
|
||||
}
|
||||
if(!PP.getSerratedStrikesInformed() && curTime - (PP.getSerratedStrikesDeactivatedTimeStamp()*1000) >= (LoadProperties.serratedStrikeCooldown * 1000)){
|
||||
PP.setSerratedStrikesInformed(true);
|
||||
player.sendMessage(mcLocale.getString("Skills.YourSerratedStrikes"));
|
||||
}
|
||||
if(!PP.getBerserkInformed() && curTime - (PP.getBerserkDeactivatedTimeStamp()*1000) >= (LoadProperties.berserkCooldown * 1000)){
|
||||
PP.setBerserkInformed(true);
|
||||
player.sendMessage(mcLocale.getString("Skills.YourBerserk"));
|
||||
}
|
||||
if(!PP.getSkullSplitterInformed() && curTime - (PP.getSkullSplitterDeactivatedTimeStamp()*1000) >= (LoadProperties.skullSplitterCooldown * 1000)){
|
||||
PP.setSkullSplitterInformed(true);
|
||||
player.sendMessage(mcLocale.getString("Skills.YourSkullSplitter"));
|
||||
}
|
||||
if(!PP.getGigaDrillBreakerInformed() && curTime - (PP.getGigaDrillBreakerDeactivatedTimeStamp()*1000) >= (LoadProperties.gigaDrillBreakerCooldown * 1000)){
|
||||
PP.setGigaDrillBreakerInformed(true);
|
||||
player.sendMessage(mcLocale.getString("Skills.YourGigaDrillBreaker"));
|
||||
public static void watchCooldown(Player player, PlayerProfile PP, long curTime, AbilityType ability)
|
||||
{
|
||||
if(!ability.getInformed(PP) && curTime - (PP.getSkillDATS(ability) * 1000) >= (ability.getCooldown() * 1000))
|
||||
{
|
||||
ability.setInformed(PP, true);
|
||||
player.sendMessage(ability.getAbilityRefresh());
|
||||
}
|
||||
}
|
||||
public static void hoeReadinessCheck(Player player)
|
||||
|
||||
public static void activationCheck(Player player, SkillType skill)
|
||||
{
|
||||
if(LoadProperties.enableOnlyActivateWhenSneaking && !player.isSneaking())
|
||||
return;
|
||||
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
if(mcPermissions.getInstance().herbalismAbility(player) && m.isHoe(player.getItemInHand()) && !PP.getHoePreparationMode()){
|
||||
if(!PP.getGreenTerraMode() && !cooldownOver(player, (PP.getGreenTerraDeactivatedTimeStamp()*1000), LoadProperties.greenTerraCooldown)){
|
||||
player.sendMessage(mcLocale.getString("Skills.TooTired")
|
||||
+ChatColor.YELLOW+" ("+calculateTimeLeft(player, (PP.getGreenTerraDeactivatedTimeStamp()*1000), LoadProperties.greenTerraCooldown)+"s)");
|
||||
return;
|
||||
}
|
||||
if(LoadProperties.enableAbilityMessages)
|
||||
player.sendMessage(mcLocale.getString("Skills.ReadyHoe"));
|
||||
PP.setHoePreparationATS(System.currentTimeMillis());
|
||||
PP.setHoePreparationMode(true);
|
||||
}
|
||||
}
|
||||
public static void monitorSkills(Player player, PlayerProfile PP) {
|
||||
monitorSkills(player, PP, System.currentTimeMillis());
|
||||
}
|
||||
public static void monitorSkills(Player player, PlayerProfile PP, long curTime){
|
||||
if(PP.getHoePreparationMode() && curTime - (PP.getHoePreparationATS()*1000) >= 4000){
|
||||
PP.setHoePreparationMode(false);
|
||||
player.sendMessage(mcLocale.getString("Skills.LowerHoe"));
|
||||
}
|
||||
if(PP.getAxePreparationMode() && curTime - (PP.getAxePreparationATS()*1000) >= 4000){
|
||||
PP.setAxePreparationMode(false);
|
||||
player.sendMessage(mcLocale.getString("Skills.LowerAxe"));
|
||||
}
|
||||
if(PP.getPickaxePreparationMode() && curTime - (PP.getPickaxePreparationATS()*1000) >= 4000){
|
||||
PP.setPickaxePreparationMode(false);
|
||||
player.sendMessage(mcLocale.getString("Skills.LowerPickAxe"));
|
||||
}
|
||||
if(PP.getSwordsPreparationMode() && curTime - (PP.getSwordsPreparationATS()*1000) >= 4000){
|
||||
PP.setSwordsPreparationMode(false);
|
||||
player.sendMessage(mcLocale.getString("Skills.LowerSword"));
|
||||
}
|
||||
if(PP.getFistsPreparationMode() && curTime - (PP.getFistsPreparationATS()*1000) >= 4000){
|
||||
PP.setFistsPreparationMode(false);
|
||||
player.sendMessage(mcLocale.getString("Skills.LowerFists"));
|
||||
}
|
||||
if(PP.getShovelPreparationMode() && curTime - (PP.getShovelPreparationATS()*1000) >= 4000){
|
||||
PP.setShovelPreparationMode(false);
|
||||
player.sendMessage(mcLocale.getString("Skills.LowerShovel"));
|
||||
}
|
||||
|
||||
/*
|
||||
* HERBALISM ABILITY
|
||||
*/
|
||||
if(mcPermissions.getInstance().herbalismAbility(player)){
|
||||
if(PP.getGreenTerraMode() && (PP.getGreenTerraDeactivatedTimeStamp()*1000) <= curTime){
|
||||
PP.setGreenTerraMode(false);
|
||||
PP.setGreenTerraInformed(false);
|
||||
player.sendMessage(mcLocale.getString("Skills.GreenTerraOff"));
|
||||
}
|
||||
}
|
||||
/*
|
||||
* AXES ABILITY
|
||||
*/
|
||||
if(mcPermissions.getInstance().axesAbility(player)){
|
||||
if(PP.getSkullSplitterMode() && (PP.getSkullSplitterDeactivatedTimeStamp()*1000) <= curTime){
|
||||
PP.setSkullSplitterMode(false);
|
||||
PP.setSkullSplitterInformed(false);
|
||||
player.sendMessage(mcLocale.getString("Skills.SkullSplitterOff"));
|
||||
}
|
||||
}
|
||||
/*
|
||||
* WOODCUTTING ABILITY
|
||||
*/
|
||||
if(mcPermissions.getInstance().woodCuttingAbility(player)){
|
||||
if(PP.getTreeFellerMode() && (PP.getTreeFellerDeactivatedTimeStamp()*1000) <= curTime){
|
||||
PP.setTreeFellerMode(false);
|
||||
PP.setTreeFellerInformed(false);
|
||||
player.sendMessage(mcLocale.getString("Skills.TreeFellerOff"));
|
||||
}
|
||||
}
|
||||
/*
|
||||
* MINING ABILITY
|
||||
*/
|
||||
if(mcPermissions.getInstance().miningAbility(player)){
|
||||
if(PP.getSuperBreakerMode() && (PP.getSuperBreakerDeactivatedTimeStamp()*1000) <= curTime){
|
||||
PP.setSuperBreakerMode(false);
|
||||
PP.setSuperBreakerInformed(false);
|
||||
player.sendMessage(mcLocale.getString("Skills.SuperBreakerOff"));
|
||||
}
|
||||
}
|
||||
/*
|
||||
* EXCAVATION ABILITY
|
||||
*/
|
||||
if(mcPermissions.getInstance().excavationAbility(player)){
|
||||
if(PP.getGigaDrillBreakerMode() && (PP.getGigaDrillBreakerDeactivatedTimeStamp()*1000) <= curTime){
|
||||
PP.setGigaDrillBreakerMode(false);
|
||||
PP.setGigaDrillBreakerInformed(false);
|
||||
player.sendMessage(mcLocale.getString("Skills.GigaDrillBreakerOff"));
|
||||
}
|
||||
}
|
||||
/*
|
||||
* SWORDS ABILITY
|
||||
*/
|
||||
if(mcPermissions.getInstance().swordsAbility(player)){
|
||||
if(PP.getSerratedStrikesMode() && (PP.getSerratedStrikesDeactivatedTimeStamp()*1000) <= curTime){
|
||||
PP.setSerratedStrikesMode(false);
|
||||
PP.setSerratedStrikesInformed(false);
|
||||
player.sendMessage(mcLocale.getString("Skills.SerratedStrikesOff"));
|
||||
}
|
||||
}
|
||||
/*
|
||||
* UNARMED ABILITY
|
||||
*/
|
||||
if(mcPermissions.getInstance().unarmedAbility(player)){
|
||||
if(PP.getBerserkMode() && (PP.getBerserkDeactivatedTimeStamp()*1000) <= curTime){
|
||||
PP.setBerserkMode(false);
|
||||
PP.setBerserkInformed(false);
|
||||
player.sendMessage(mcLocale.getString("Skills.BerserkOff"));
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void abilityActivationCheck(Player player)
|
||||
{
|
||||
if(LoadProperties.enableOnlyActivateWhenSneaking && !player.isSneaking())
|
||||
return;
|
||||
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
if(PP != null)
|
||||
AbilityType ability = skill.getAbility();
|
||||
ToolType tool = skill.getTool();
|
||||
|
||||
if(!PP.getAbilityUse() || PP.getSuperBreakerMode() || PP.getSerratedStrikesMode() || PP.getTreeFellerMode() || PP.getGreenTerraMode() || PP.getBerserkMode() || PP.getGigaDrillBreakerMode())
|
||||
return;
|
||||
|
||||
if(ability.getPermissions(player) && tool.inHand(player.getItemInHand()) && !tool.getToolMode(PP))
|
||||
{
|
||||
if(!PP.getAbilityUse() || PP.getSuperBreakerMode() || PP.getSerratedStrikesMode() || PP.getTreeFellerMode() || PP.getGreenTerraMode() || PP.getBerserkMode() || PP.getGigaDrillBreakerMode())
|
||||
return;
|
||||
if(mcPermissions.getInstance().miningAbility(player) && m.isMiningPick(player.getItemInHand()) && !PP.getPickaxePreparationMode())
|
||||
{
|
||||
if(!PP.getSuperBreakerMode() && !cooldownOver(player, (PP.getSuperBreakerDeactivatedTimeStamp()*1000), LoadProperties.superBreakerCooldown))
|
||||
{
|
||||
player.sendMessage(mcLocale.getString("Skills.TooTired")
|
||||
+ChatColor.YELLOW+" ("+calculateTimeLeft(player, (PP.getSuperBreakerDeactivatedTimeStamp()*1000), LoadProperties.superBreakerCooldown)+"s)");
|
||||
return;
|
||||
}
|
||||
if(LoadProperties.enableAbilityMessages)
|
||||
player.sendMessage(mcLocale.getString("Skills.ReadyPickAxe"));
|
||||
PP.setPickaxePreparationATS(System.currentTimeMillis());
|
||||
PP.setPickaxePreparationMode(true);
|
||||
}
|
||||
if(mcPermissions.getInstance().excavationAbility(player) && m.isShovel(player.getItemInHand()) && !PP.getShovelPreparationMode())
|
||||
{
|
||||
if(!PP.getGigaDrillBreakerMode() && !cooldownOver(player, (PP.getGigaDrillBreakerDeactivatedTimeStamp()*1000), LoadProperties.gigaDrillBreakerCooldown))
|
||||
{
|
||||
player.sendMessage(mcLocale.getString("Skills.TooTired")
|
||||
+ChatColor.YELLOW+" ("+calculateTimeLeft(player, (PP.getGigaDrillBreakerDeactivatedTimeStamp()*1000), LoadProperties.gigaDrillBreakerCooldown)+"s)");
|
||||
return;
|
||||
}
|
||||
if(LoadProperties.enableAbilityMessages)
|
||||
player.sendMessage(mcLocale.getString("Skills.ReadyShovel"));
|
||||
PP.setShovelPreparationATS(System.currentTimeMillis());
|
||||
PP.setShovelPreparationMode(true);
|
||||
}
|
||||
if(mcPermissions.getInstance().swordsAbility(player) && m.isSwords(player.getItemInHand()) && !PP.getSwordsPreparationMode())
|
||||
{
|
||||
if(!PP.getSerratedStrikesMode() && !cooldownOver(player, (PP.getSerratedStrikesDeactivatedTimeStamp()*1000), LoadProperties.serratedStrikeCooldown))
|
||||
{
|
||||
player.sendMessage(mcLocale.getString("Skills.TooTired")
|
||||
+ChatColor.YELLOW+" ("+calculateTimeLeft(player, (PP.getSerratedStrikesDeactivatedTimeStamp()*1000), LoadProperties.serratedStrikeCooldown)+"s)");
|
||||
return;
|
||||
}
|
||||
if(LoadProperties.enableAbilityMessages)
|
||||
player.sendMessage(mcLocale.getString("Skills.ReadySword"));
|
||||
PP.setSwordsPreparationATS(System.currentTimeMillis());
|
||||
PP.setSwordsPreparationMode(true);
|
||||
}
|
||||
if(mcPermissions.getInstance().unarmedAbility(player) && player.getItemInHand().getTypeId() == 0 && !PP.getFistsPreparationMode())
|
||||
{
|
||||
if(!PP.getBerserkMode() && !cooldownOver(player, (PP.getBerserkDeactivatedTimeStamp()*1000), LoadProperties.berserkCooldown))
|
||||
{
|
||||
player.sendMessage(mcLocale.getString("Skills.TooTired")
|
||||
+ChatColor.YELLOW+" ("+calculateTimeLeft(player, (PP.getBerserkDeactivatedTimeStamp()*1000), LoadProperties.berserkCooldown)+"s)");
|
||||
return;
|
||||
}
|
||||
if(LoadProperties.enableAbilityMessages)
|
||||
player.sendMessage(mcLocale.getString("Skills.ReadyFists"));
|
||||
PP.setFistsPreparationATS(System.currentTimeMillis());
|
||||
PP.setFistsPreparationMode(true);
|
||||
}
|
||||
if((mcPermissions.getInstance().axesAbility(player) || mcPermissions.getInstance().woodCuttingAbility(player)) && !PP.getAxePreparationMode())
|
||||
{
|
||||
if(m.isAxes(player.getItemInHand()))
|
||||
{
|
||||
if(LoadProperties.enableAbilityMessages)
|
||||
player.sendMessage(mcLocale.getString("Skills.ReadyAxe"));
|
||||
PP.setAxePreparationATS(System.currentTimeMillis());
|
||||
PP.setAxePreparationMode(true);
|
||||
}
|
||||
}
|
||||
if(!ability.getMode(PP) && !cooldownOver(player, (PP.getSkillDATS(ability) * 1000), ability.getCooldown()))
|
||||
{
|
||||
player.sendMessage(mcLocale.getString("Skills.TooTired") + ChatColor.YELLOW + " (" + calculateTimeLeft(player, (PP.getSkillDATS(ability) * 1000), ability.getCooldown()) + "s)");
|
||||
return;
|
||||
}
|
||||
|
||||
if(LoadProperties.enableAbilityMessages)
|
||||
player.sendMessage(tool.getRaiseTool());
|
||||
|
||||
tool.setToolATS(PP, System.currentTimeMillis());
|
||||
tool.setToolMode(PP, true);
|
||||
}
|
||||
}
|
||||
|
||||
public static void monitorSkill(Player player, PlayerProfile PP, long curTime, SkillType skill)
|
||||
{
|
||||
ToolType tool = skill.getTool();
|
||||
AbilityType ability = skill.getAbility();
|
||||
if(tool.getToolMode(PP) && curTime - (tool.getToolATS(PP) * 1000) >= 4000)
|
||||
{
|
||||
tool.setToolMode(PP, false);
|
||||
player.sendMessage(tool.getLowerTool());
|
||||
}
|
||||
|
||||
if(ability.getPermissions(player))
|
||||
{
|
||||
if(ability.getMode(PP) && (PP.getSkillDATS(ability) * 1000) <= curTime)
|
||||
{
|
||||
ability.setMode(PP, false);
|
||||
ability.setInformed(PP, false);
|
||||
player.sendMessage(ability.getAbilityOff());
|
||||
|
||||
for(Player y : player.getWorld().getPlayers())
|
||||
{
|
||||
if(y != player && m.isNear(player.getLocation(), y.getLocation(), 10))
|
||||
y.sendMessage(ability.getAbilityPlayerOff(player));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void ProcessLeaderboardUpdate(SkillType skillType, Player player)
|
||||
{
|
||||
@@ -315,11 +134,6 @@ public class Skills
|
||||
|
||||
public static void XpCheckSkill(SkillType skillType, Player player)
|
||||
{
|
||||
if(skillType == SkillType.ALL) {
|
||||
XpCheckAll(player);
|
||||
return;
|
||||
}
|
||||
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
|
||||
if(PP.getSkillXpLevel(skillType) >= PP.getXpToLevel(skillType))
|
||||
@@ -328,14 +142,18 @@ public class Skills
|
||||
|
||||
while(PP.getSkillXpLevel(skillType) >= PP.getXpToLevel(skillType))
|
||||
{
|
||||
if(getSkillMaxLevel(skillType) >= PP.getSkillLevel(skillType) + 1) {
|
||||
if(skillType.getMaxLevel() >= PP.getSkillLevel(skillType) + 1)
|
||||
{
|
||||
skillups++;
|
||||
PP.removeXP(skillType, PP.getXpToLevel(skillType));
|
||||
PP.skillUp(skillType, 1);
|
||||
|
||||
McMMOPlayerLevelUpEvent eventToFire = new McMMOPlayerLevelUpEvent(player, skillType);
|
||||
Bukkit.getPluginManager().callEvent(eventToFire);
|
||||
} else
|
||||
{
|
||||
PP.removeXP(skillType, PP.getXpToLevel(skillType));
|
||||
}
|
||||
PP.removeXP(skillType, PP.getXpToLevel(skillType));
|
||||
}
|
||||
|
||||
if(!LoadProperties.useMySQL)
|
||||
@@ -383,36 +201,7 @@ public class Skills
|
||||
XpCheckSkill(x, player);
|
||||
}
|
||||
}
|
||||
public static int getSkillMaxLevel(SkillType skillType) {
|
||||
switch(skillType) {
|
||||
case ACROBATICS:
|
||||
return (LoadProperties.levelCapAcrobatics > 0) ? LoadProperties.levelCapAcrobatics : Integer.MAX_VALUE;
|
||||
case ARCHERY:
|
||||
return (LoadProperties.levelCapArchery > 0) ? LoadProperties.levelCapArchery : Integer.MAX_VALUE;
|
||||
case AXES:
|
||||
return (LoadProperties.levelCapAxes > 0) ? LoadProperties.levelCapAxes : Integer.MAX_VALUE;
|
||||
case EXCAVATION:
|
||||
return (LoadProperties.levelCapExcavation > 0) ? LoadProperties.levelCapExcavation : Integer.MAX_VALUE;
|
||||
case FISHING:
|
||||
return (LoadProperties.levelCapFishing > 0) ? LoadProperties.levelCapFishing : Integer.MAX_VALUE;
|
||||
case HERBALISM:
|
||||
return (LoadProperties.levelCapHerbalism > 0) ? LoadProperties.levelCapHerbalism : Integer.MAX_VALUE;
|
||||
case MINING:
|
||||
return (LoadProperties.levelCapMining > 0) ? LoadProperties.levelCapMining : Integer.MAX_VALUE;
|
||||
case REPAIR:
|
||||
return (LoadProperties.levelCapRepair > 0) ? LoadProperties.levelCapRepair : Integer.MAX_VALUE;
|
||||
case SWORDS:
|
||||
return (LoadProperties.levelCapSwords > 0) ? LoadProperties.levelCapSwords : Integer.MAX_VALUE;
|
||||
case TAMING:
|
||||
return (LoadProperties.levelCapTaming > 0) ? LoadProperties.levelCapTaming : Integer.MAX_VALUE;
|
||||
case UNARMED:
|
||||
return (LoadProperties.levelCapUnarmed > 0) ? LoadProperties.levelCapUnarmed : Integer.MAX_VALUE;
|
||||
case WOODCUTTING:
|
||||
return (LoadProperties.levelCapWoodcutting > 0) ? LoadProperties.levelCapWoodcutting : Integer.MAX_VALUE;
|
||||
default:
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
}
|
||||
|
||||
public static SkillType getSkillType(String skillName)
|
||||
{
|
||||
for(SkillType x : SkillType.values())
|
||||
@@ -422,6 +211,7 @@ public class Skills
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean isSkill(String skillname){
|
||||
skillname = skillname.toUpperCase();
|
||||
for(SkillType x : SkillType.values())
|
||||
@@ -431,19 +221,8 @@ public class Skills
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static void arrowRetrievalCheck(Entity entity, mcMMO plugin)
|
||||
{
|
||||
if(plugin.misc.arrowTracker.containsKey(entity))
|
||||
{
|
||||
Integer x = 0;
|
||||
while(x < plugin.misc.arrowTracker.get(entity))
|
||||
{
|
||||
m.mcDropItem(entity.getLocation(), 262);
|
||||
x++;
|
||||
}
|
||||
}
|
||||
plugin.misc.arrowTracker.remove(entity);
|
||||
}
|
||||
|
||||
//We should probably rework this - it's a fairly ugly way to do this, compared to our other command formatting.
|
||||
public static String getSkillStats(String skillname, Integer level, Integer XP, Integer XPToLevel)
|
||||
{
|
||||
ChatColor parColor = ChatColor.DARK_AQUA;
|
||||
@@ -453,6 +232,7 @@ public class Skills
|
||||
|
||||
return skillColor+skillname+LvlColor+level+parColor+" XP"+"("+xpColor+XP+parColor+"/"+xpColor+XPToLevel+parColor+")";
|
||||
}
|
||||
|
||||
public static boolean hasCombatSkills(Player player)
|
||||
{
|
||||
if(mcPermissions.getInstance().axes(player) || mcPermissions.getInstance().archery(player) || mcPermissions.getInstance().swords(player) || mcPermissions.getInstance().taming(player) || mcPermissions.getInstance().unarmed(player))
|
||||
@@ -460,13 +240,15 @@ public class Skills
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean hasGatheringSkills(Player player)
|
||||
{
|
||||
if(mcPermissions.getInstance().excavation(player) || mcPermissions.getInstance().herbalism(player) || mcPermissions.getInstance().mining(player) || mcPermissions.getInstance().woodcutting(player))
|
||||
if(mcPermissions.getInstance().excavation(player) || mcPermissions.getInstance().fishing(player) || mcPermissions.getInstance().herbalism(player) || mcPermissions.getInstance().mining(player) || mcPermissions.getInstance().woodcutting(player))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean hasMiscSkills(Player player)
|
||||
{
|
||||
if(mcPermissions.getInstance().acrobatics(player) || mcPermissions.getInstance().repair(player))
|
||||
@@ -474,4 +256,34 @@ public class Skills
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check to see if an ability can be activated.
|
||||
*
|
||||
* @param player The player activating the ability
|
||||
* @param type The skill the ability is based on
|
||||
*/
|
||||
public static void abilityCheck(Player player, SkillType type)
|
||||
{
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
AbilityType ability = type.getAbility();
|
||||
if(type.getTool().inHand(player.getItemInHand()))
|
||||
{
|
||||
if(type.getTool().getToolMode(PP))
|
||||
type.getTool().setToolMode(PP, false);
|
||||
|
||||
int ticks = 2 + (PP.getSkillLevel(type) / 50);
|
||||
if(!ability.getMode(PP) && cooldownOver(player, PP.getSkillDATS(ability), ability.getCooldown()))
|
||||
{
|
||||
player.sendMessage(ability.getAbilityOn());
|
||||
for(Player y : player.getWorld().getPlayers())
|
||||
{
|
||||
if(y != player && m.isNear(player.getLocation(), y.getLocation(), 10))
|
||||
y.sendMessage(ability.getAbilityPlayer(player));
|
||||
}
|
||||
PP.setSkillDATS(ability, System.currentTimeMillis()+(ticks*1000));
|
||||
ability.setMode(PP, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,43 +29,10 @@ import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.party.Party;
|
||||
|
||||
public class Swords
|
||||
{
|
||||
public static void serratedStrikesActivationCheck(Player player){
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
if(m.isSwords(player.getItemInHand()))
|
||||
{
|
||||
if(PP.getSwordsPreparationMode())
|
||||
{
|
||||
PP.setSwordsPreparationMode(false);
|
||||
}
|
||||
int ticks = 2;
|
||||
int x = PP.getSkillLevel(SkillType.SWORDS);
|
||||
while(x >= 50)
|
||||
{
|
||||
x-=50;
|
||||
ticks++;
|
||||
}
|
||||
|
||||
if(!PP.getSerratedStrikesMode() && PP.getSerratedStrikesDeactivatedTimeStamp() < System.currentTimeMillis())
|
||||
{
|
||||
player.sendMessage(mcLocale.getString("Skills.SerratedStrikesOn"));
|
||||
for(Player y : player.getWorld().getPlayers())
|
||||
{
|
||||
if(y != null && y != player && m.getDistance(player.getLocation(), y.getLocation()) < 10)
|
||||
y.sendMessage(mcLocale.getString("Skills.SerratedStrikesPlayer", new Object[] {player.getName()}));
|
||||
}
|
||||
PP.setSerratedStrikesActivatedTimeStamp(System.currentTimeMillis());
|
||||
PP.setSerratedStrikesDeactivatedTimeStamp(System.currentTimeMillis() + (ticks * 1000));
|
||||
PP.setSerratedStrikesMode(true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void bleedCheck(Player attacker, LivingEntity x, mcMMO pluginx)
|
||||
{
|
||||
PlayerProfile PPa = Users.getProfile(attacker);
|
||||
@@ -84,7 +51,7 @@ public class Swords
|
||||
if(mcPermissions.getInstance().swords(attacker) && m.isSwords(attacker.getItemInHand())){
|
||||
if(PPa.getSkillLevel(SkillType.SWORDS) >= 750)
|
||||
{
|
||||
if(Math.random() * 1000 >= 750)
|
||||
if(Math.random() * 1000 <= 750)
|
||||
{
|
||||
if(!(x instanceof Player))
|
||||
pluginx.misc.addToBleedQue(x);
|
||||
@@ -113,64 +80,65 @@ public class Swords
|
||||
{
|
||||
int targets = 0;
|
||||
|
||||
int dmgAmount = (event.getDamage()/4);
|
||||
|
||||
//Setup minimum damage
|
||||
if(dmgAmount < 1)
|
||||
dmgAmount = 1;
|
||||
|
||||
if(event.getEntity() instanceof LivingEntity)
|
||||
{
|
||||
LivingEntity x = (LivingEntity) event.getEntity();
|
||||
targets = m.getTier(attacker);
|
||||
|
||||
for(Entity derp : x.getWorld().getEntities())
|
||||
for(Entity derp : x.getNearbyEntities(2.5, 2.5, 2.5))
|
||||
{
|
||||
if(m.getDistance(x.getLocation(), derp.getLocation()) < 5)
|
||||
{
|
||||
|
||||
|
||||
//Make sure the Wolf is not friendly
|
||||
if(derp instanceof Wolf)
|
||||
//Make sure the Wolf is not friendly
|
||||
if(derp instanceof Wolf)
|
||||
{
|
||||
Wolf hurrDurr = (Wolf)derp;
|
||||
if(Taming.getOwner(hurrDurr, pluginx) == attacker)
|
||||
continue;
|
||||
if(Party.getInstance().inSameParty(attacker, Taming.getOwner(hurrDurr, pluginx)))
|
||||
continue;
|
||||
}
|
||||
//Damage nearby LivingEntities
|
||||
if(derp instanceof LivingEntity && targets >= 1)
|
||||
{
|
||||
if(derp instanceof Player)
|
||||
{
|
||||
Wolf hurrDurr = (Wolf)derp;
|
||||
if(Taming.getOwner(hurrDurr, pluginx) == attacker)
|
||||
continue;
|
||||
if(Party.getInstance().inSameParty(attacker, Taming.getOwner(hurrDurr, pluginx)))
|
||||
continue;
|
||||
}
|
||||
//Damage nearby LivingEntities
|
||||
if(derp instanceof LivingEntity && targets >= 1)
|
||||
Player target = (Player)derp;
|
||||
|
||||
if(target.getName().equals(attacker.getName()))
|
||||
continue;
|
||||
|
||||
if(Users.getProfile(target).getGodMode())
|
||||
continue;
|
||||
|
||||
if(Party.getInstance().inSameParty(attacker, target))
|
||||
continue;
|
||||
if(targets >= 1 && derp.getWorld().getPVP())
|
||||
{
|
||||
Combat.dealDamage(target, dmgAmount, attacker);
|
||||
target.sendMessage(ChatColor.DARK_RED+"Struck by Serrated Strikes!");
|
||||
Users.getProfile(target).addBleedTicks(5);
|
||||
targets--;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(derp instanceof Player)
|
||||
{
|
||||
Player target = (Player)derp;
|
||||
|
||||
if(target.getName().equals(attacker.getName()))
|
||||
continue;
|
||||
|
||||
if(Users.getProfile(target).getGodMode())
|
||||
continue;
|
||||
|
||||
if(Party.getInstance().inSameParty(attacker, target))
|
||||
continue;
|
||||
if(targets >= 1 && derp.getWorld().getPVP())
|
||||
{
|
||||
Combat.dealDamage(target, event.getDamage() / 4, attacker);
|
||||
target.sendMessage(ChatColor.DARK_RED+"Struck by Serrated Strikes!");
|
||||
Users.getProfile(target).addBleedTicks(5);
|
||||
targets--;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!pluginx.misc.bleedTracker.contains(derp))
|
||||
pluginx.misc.addToBleedQue((LivingEntity)derp);
|
||||
|
||||
LivingEntity target = (LivingEntity)derp;
|
||||
Combat.dealDamage(target, event.getDamage() / 4, attacker);
|
||||
targets--;
|
||||
}
|
||||
if(!pluginx.misc.bleedTracker.contains(derp))
|
||||
pluginx.misc.addToBleedQue((LivingEntity)derp);
|
||||
|
||||
LivingEntity target = (LivingEntity)derp;
|
||||
Combat.dealDamage(target, dmgAmount, attacker);
|
||||
targets--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void counterAttackChecks(EntityDamageByEntityEvent event)
|
||||
{
|
||||
@@ -209,6 +177,7 @@ public class Swords
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void bleedSimulate(mcMMO plugin)
|
||||
{
|
||||
//Add items from Que list to BleedTrack list
|
||||
@@ -235,9 +204,7 @@ public class Swords
|
||||
//Bleed monsters/animals
|
||||
for(LivingEntity x : plugin.misc.bleedTracker)
|
||||
{
|
||||
if(x == null){continue;}
|
||||
|
||||
if(x.getHealth() <= 0)
|
||||
if(x == null || x.isDead())
|
||||
{
|
||||
plugin.misc.addToBleedRemovalQue(x);
|
||||
continue;
|
||||
|
||||
@@ -1,29 +1,104 @@
|
||||
/*
|
||||
This file is part of mcMMO.
|
||||
|
||||
mcMMO 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.
|
||||
mcMMO 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.
|
||||
|
||||
mcMMO 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.
|
||||
mcMMO 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 mcMMO. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with mcMMO. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.gmail.nossr50.skills;
|
||||
|
||||
import org.bukkit.entity.AnimalTamer;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Wolf;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import com.gmail.nossr50.Combat;
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
|
||||
public class Taming
|
||||
{
|
||||
public static void rewardXp(EntityDamageEvent event, mcMMO pluginx, Player master)
|
||||
{
|
||||
Entity entity = event.getEntity();
|
||||
if(!pluginx.misc.mobSpawnerList.contains(entity.getEntityId()))
|
||||
{
|
||||
int xp = Combat.getXp(entity, event.getDamage());
|
||||
Users.getProfile(master).addXP(SkillType.TAMING, xp*10, master);
|
||||
|
||||
if(entity instanceof Player)
|
||||
{
|
||||
xp = (event.getDamage() * 2);
|
||||
Users.getProfile(master).addXP(SkillType.TAMING, (int)((xp*10)*1.5), master);
|
||||
}
|
||||
Skills.XpCheckSkill(SkillType.TAMING, master);
|
||||
}
|
||||
}
|
||||
|
||||
public static void fastFoodService(PlayerProfile PPo, Wolf theWolf, EntityDamageEvent event)
|
||||
{
|
||||
int health = theWolf.getHealth();
|
||||
int maxHealth = theWolf.getMaxHealth();
|
||||
int damage = event.getDamage();
|
||||
if(PPo.getSkillLevel(SkillType.TAMING) >= 50)
|
||||
{
|
||||
if(health < maxHealth)
|
||||
{
|
||||
if(Math.random() * 10 > 5)
|
||||
{
|
||||
if(health + damage <= maxHealth)
|
||||
theWolf.setHealth(health + damage);
|
||||
else
|
||||
theWolf.setHealth(maxHealth);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void sharpenedClaws(PlayerProfile PPo, EntityDamageEvent event)
|
||||
{
|
||||
if(PPo.getSkillLevel(SkillType.TAMING) >= 750)
|
||||
{
|
||||
event.setDamage(event.getDamage() + 2);
|
||||
}
|
||||
}
|
||||
|
||||
public static void gore(PlayerProfile PPo, EntityDamageEvent event, Player master, mcMMO pluginx)
|
||||
{
|
||||
if(Math.random() * 1000 <= PPo.getSkillLevel(SkillType.TAMING))
|
||||
{
|
||||
Entity entity = event.getEntity();
|
||||
event.setDamage(event.getDamage() * 2);
|
||||
|
||||
if(entity instanceof Player)
|
||||
{
|
||||
Player target = (Player)entity;
|
||||
target.sendMessage(mcLocale.getString("Combat.StruckByGore")); //$NON-NLS-1$
|
||||
Users.getProfile(target).setBleedTicks(2);
|
||||
}
|
||||
else
|
||||
pluginx.misc.addToBleedQue((LivingEntity)entity);
|
||||
|
||||
master.sendMessage(mcLocale.getString("Combat.Gore")); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean ownerOnline(Wolf theWolf, Plugin pluginx)
|
||||
{
|
||||
for(Player x : pluginx.getServer().getOnlinePlayers())
|
||||
@@ -62,15 +137,36 @@ public class Taming
|
||||
Player owner = null;
|
||||
|
||||
if (theWolf.getOwner() instanceof Player)
|
||||
{
|
||||
owner = (Player)theWolf.getOwner();
|
||||
}
|
||||
|
||||
if(owner != null)
|
||||
{
|
||||
return owner.getName();
|
||||
}
|
||||
else
|
||||
return "Offline Master";
|
||||
}
|
||||
|
||||
public static void preventDamage(EntityDamageEvent event, mcMMO plugin)
|
||||
{
|
||||
DamageCause cause = event.getCause();
|
||||
Entity entity = event.getEntity();
|
||||
Wolf theWolf = (Wolf)entity;
|
||||
Player master = getOwner(theWolf, plugin);
|
||||
int skillLevel = Users.getProfile(master).getSkillLevel(SkillType.TAMING);
|
||||
|
||||
//Environmentally Aware
|
||||
if((cause == DamageCause.CONTACT || cause == DamageCause.LAVA || cause == DamageCause.FIRE) && skillLevel >= 100)
|
||||
{
|
||||
if(event.getDamage() < theWolf.getHealth())
|
||||
{
|
||||
entity.teleport(Taming.getOwner(theWolf, plugin).getLocation());
|
||||
master.sendMessage(mcLocale.getString("mcEntityListener.WolfComesBack")); //$NON-NLS-1$
|
||||
entity.setFireTicks(0);
|
||||
}
|
||||
}
|
||||
if(cause == DamageCause.FALL && skillLevel >= 100)
|
||||
event.setCancelled(true);
|
||||
|
||||
//Thick Fur
|
||||
if(cause == DamageCause.FIRE_TICK)
|
||||
event.getEntity().setFireTicks(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,97 +16,55 @@
|
||||
*/
|
||||
package com.gmail.nossr50.skills;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
|
||||
public class Unarmed {
|
||||
public static void berserkActivationCheck(Player player)
|
||||
{
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
if(player.getItemInHand().getTypeId() == 0)
|
||||
{
|
||||
if(PP.getFistsPreparationMode())
|
||||
{
|
||||
PP.setFistsPreparationMode(false);
|
||||
}
|
||||
int ticks = 2;
|
||||
int x = PP.getSkillLevel(SkillType.UNARMED);
|
||||
while(x >= 50){
|
||||
x-=50;
|
||||
ticks++;
|
||||
}
|
||||
|
||||
if(!PP.getBerserkMode() && Skills.cooldownOver(player, PP.getBerserkDeactivatedTimeStamp(), LoadProperties.berserkCooldown))
|
||||
{
|
||||
player.sendMessage(mcLocale.getString("Skills.BerserkOn"));
|
||||
for(Player y : player.getWorld().getPlayers())
|
||||
{
|
||||
if(y != null && y != player && m.getDistance(player.getLocation(), y.getLocation()) < 10)
|
||||
y.sendMessage(mcLocale.getString("Skills.BerserkPlayer", new Object[] {player.getName()}));
|
||||
}
|
||||
PP.setBerserkActivatedTimeStamp(System.currentTimeMillis());
|
||||
PP.setBerserkDeactivatedTimeStamp(System.currentTimeMillis() + (ticks * 1000));
|
||||
PP.setBerserkMode(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void unarmedBonus(Player attacker, EntityDamageByEntityEvent event)
|
||||
{
|
||||
PlayerProfile PPa = Users.getProfile(attacker);
|
||||
int bonus = 0;
|
||||
if (PPa.getSkillLevel(SkillType.UNARMED) >= 250)
|
||||
bonus+=2;
|
||||
if (PPa.getSkillLevel(SkillType.UNARMED) >= 500)
|
||||
bonus+=4;
|
||||
event.setDamage(event.getDamage()+bonus);
|
||||
int bonus = 3;
|
||||
|
||||
//Add 1 DMG for every 50 skill levels
|
||||
bonus += Users.getProfile(attacker).getSkillLevel(SkillType.UNARMED)/50;
|
||||
|
||||
if(bonus > 8)
|
||||
bonus = 8;
|
||||
|
||||
event.setDamage(event.getDamage() + bonus);
|
||||
}
|
||||
|
||||
public static void disarmProcCheck(Player attacker, Player defender)
|
||||
{
|
||||
PlayerProfile PP = Users.getProfile(attacker);
|
||||
if(attacker.getItemInHand().getTypeId() == 0)
|
||||
int skillLevel = Users.getProfile(attacker).getSkillLevel(SkillType.UNARMED);
|
||||
if(defender.getItemInHand() != null && defender.getItemInHand().getType() != Material.AIR)
|
||||
{
|
||||
if(PP.getSkillLevel(SkillType.UNARMED) >= 1000)
|
||||
if(skillLevel >= 1000)
|
||||
{
|
||||
if(Math.random() * 4000 <= 1000)
|
||||
{
|
||||
Location loc = defender.getLocation();
|
||||
if(defender.getItemInHand() != null && defender.getItemInHand().getTypeId() != 0)
|
||||
{
|
||||
defender.sendMessage(mcLocale.getString("Skills.Disarmed"));
|
||||
ItemStack item = defender.getItemInHand();
|
||||
if(item != null)
|
||||
{
|
||||
m.mcDropItem(loc, item);
|
||||
ItemStack itemx = null;
|
||||
defender.setItemInHand(itemx);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(Math.random() * 4000 <= PP.getSkillLevel(SkillType.UNARMED)){
|
||||
Location loc = defender.getLocation();
|
||||
if(defender.getItemInHand() != null && defender.getItemInHand().getTypeId() != 0)
|
||||
{
|
||||
defender.sendMessage(mcLocale.getString("Skills.Disarmed"));
|
||||
ItemStack item = defender.getItemInHand();
|
||||
if(item != null)
|
||||
{
|
||||
m.mcDropItem(loc, item);
|
||||
ItemStack itemx = null;
|
||||
defender.setItemInHand(itemx);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(Math.random() * 3000 <= 1000)
|
||||
{
|
||||
ItemStack item = defender.getItemInHand();
|
||||
defender.sendMessage(mcLocale.getString("Skills.Disarmed"));
|
||||
m.mcDropItem(defender.getLocation(), item);
|
||||
defender.setItemInHand(null);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(Math.random() * 3000 <= skillLevel)
|
||||
{
|
||||
ItemStack item = defender.getItemInHand();
|
||||
defender.sendMessage(mcLocale.getString("Skills.Disarmed"));
|
||||
m.mcDropItem(defender.getLocation(), item);
|
||||
defender.setItemInHand(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,14 +17,13 @@
|
||||
package com.gmail.nossr50.skills;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.Statistic;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.player.PlayerAnimationEvent;
|
||||
import org.bukkit.Bukkit;
|
||||
import com.gmail.nossr50.Users;
|
||||
@@ -35,14 +34,184 @@ import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
import com.gmail.nossr50.spout.SpoutStuff;
|
||||
import com.gmail.nossr50.config.*;
|
||||
|
||||
import org.getspout.spoutapi.sound.SoundEffect;
|
||||
|
||||
|
||||
public class WoodCutting
|
||||
{
|
||||
static int w = 0;
|
||||
private static boolean isdone = false;
|
||||
|
||||
public static void treeFeller(BlockBreakEvent event, mcMMO plugin)
|
||||
{
|
||||
//Setup vars
|
||||
Player player = event.getPlayer();
|
||||
Block firstBlock = event.getBlock();
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
World world = firstBlock.getWorld();
|
||||
|
||||
//Prepare array
|
||||
ArrayList<Block> toBeFelled = new ArrayList<Block>();
|
||||
|
||||
//NOTE: Tree Feller will cut upwards like how you actually fell trees
|
||||
processTreeFelling(firstBlock, world, toBeFelled, plugin);
|
||||
removeBlocks(toBeFelled, player, PP, plugin);
|
||||
}
|
||||
|
||||
private static void removeBlocks(ArrayList<Block> toBeFelled, Player player, PlayerProfile PP, mcMMO plugin)
|
||||
{
|
||||
if(toBeFelled.size() > LoadProperties.treeFellerThreshold)
|
||||
{
|
||||
player.sendMessage(mcLocale.getString("Skills.Woodcutting.TreeFellerThreshold"));
|
||||
return;
|
||||
}
|
||||
int durabilityLoss = 0, xp = 0;
|
||||
//Prepare ItemStacks
|
||||
ItemStack item;
|
||||
ItemStack oak = new ItemStack(Material.LOG, 1, (byte)0, (byte)0);
|
||||
ItemStack spruce = new ItemStack(Material.LOG, 1, (byte)0, (byte)1);
|
||||
ItemStack birch = new ItemStack(Material.LOG, 1, (byte)0, (byte)2);
|
||||
ItemStack jungle = new ItemStack(Material.LOG, 1, (byte)0, (byte)3);
|
||||
|
||||
for(Block x : toBeFelled)
|
||||
{
|
||||
if(m.blockBreakSimulate(x, player, true))
|
||||
{
|
||||
if(x.getType() == Material.LOG)
|
||||
{
|
||||
switch(x.getData())
|
||||
{
|
||||
case 0:
|
||||
item = oak;
|
||||
break;
|
||||
case 1:
|
||||
item = spruce;
|
||||
break;
|
||||
case 2:
|
||||
item = birch;
|
||||
break;
|
||||
case 3:
|
||||
item = jungle;
|
||||
break;
|
||||
default:
|
||||
item = oak;
|
||||
break;
|
||||
}
|
||||
|
||||
//ItemStack item = new ItemStack(x.getType(), 1, (byte)0, type);
|
||||
|
||||
if(!plugin.misc.blockWatchList.contains(x))
|
||||
{
|
||||
WoodCutting.woodCuttingProcCheck(player, x);
|
||||
|
||||
switch(x.getData())
|
||||
{
|
||||
case 0:
|
||||
xp += LoadProperties.moak;
|
||||
break;
|
||||
case 1:
|
||||
xp += LoadProperties.mspruce;
|
||||
break;
|
||||
case 2:
|
||||
xp += LoadProperties.mbirch;
|
||||
break;
|
||||
case 3:
|
||||
xp += LoadProperties.mjungle;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//Remove the block
|
||||
x.setData((byte) 0);
|
||||
x.setType(Material.AIR);
|
||||
|
||||
//Drop the block
|
||||
m.mcDropItem(x.getLocation(), item);
|
||||
|
||||
//Damage the tool more if the Tree is larger
|
||||
durabilityLoss++;
|
||||
|
||||
} else if(x.getType() == Material.LEAVES)
|
||||
{
|
||||
Material mat = Material.SAPLING;
|
||||
item = new ItemStack(mat, 1, (short)0, (byte)(x.getData()-8));
|
||||
|
||||
//90% chance to drop sapling
|
||||
if(Math.random() * 10 > 9)
|
||||
m.mcRandomDropItem(x.getLocation(), item, 90);
|
||||
|
||||
//Remove the block
|
||||
x.setData((byte) 0);
|
||||
x.setType(Material.AIR);
|
||||
|
||||
//Damage the tool more if the Tree is larger
|
||||
durabilityLoss++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PP.addXP(SkillType.WOODCUTTING, xp, player);
|
||||
Skills.XpCheckSkill(SkillType.WOODCUTTING, player);
|
||||
|
||||
if(LoadProperties.toolsLoseDurabilityFromAbilities)
|
||||
{
|
||||
if(!player.getItemInHand().containsEnchantment(Enchantment.DURABILITY))
|
||||
{
|
||||
short durability = player.getItemInHand().getDurability();
|
||||
durability += (LoadProperties.abilityDurabilityLoss * durabilityLoss);
|
||||
player.getItemInHand().setDurability(durability);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean treeFellerCompatible(Block block)
|
||||
{
|
||||
return block.getType() == Material.LOG || block.getType() == Material.LEAVES || block.getType() == Material.AIR;
|
||||
}
|
||||
|
||||
private static void processTreeFelling(Block currentBlock, World world, ArrayList<Block> toBeFelled, mcMMO plugin)
|
||||
{
|
||||
int x = currentBlock.getX(), y = currentBlock.getY(), z = currentBlock.getZ();
|
||||
|
||||
if(currentBlock.getType() == Material.LOG || currentBlock.getType() == Material.LEAVES)
|
||||
toBeFelled.add(currentBlock);
|
||||
|
||||
//These 2 are to make sure that Tree Feller isn't so aggressive
|
||||
boolean isAirOrLeaves = currentBlock.getType() == Material.LEAVES || currentBlock.getType() == Material.AIR;
|
||||
|
||||
Block xPositive = world.getBlockAt(x+1, y, z);
|
||||
Block xNegative = world.getBlockAt(x-1, y, z);
|
||||
Block zPositive = world.getBlockAt(x, y, z+1);
|
||||
Block zNegative = world.getBlockAt(x, y, z-1);
|
||||
|
||||
if(!plugin.misc.blockWatchList.contains(currentBlock) &&
|
||||
!isTooAgressive(isAirOrLeaves, xPositive) && treeFellerCompatible(xPositive) && !toBeFelled.contains(xPositive))
|
||||
processTreeFelling(xPositive, world, toBeFelled, plugin);
|
||||
if(!plugin.misc.blockWatchList.contains(currentBlock) &&
|
||||
!isTooAgressive(isAirOrLeaves, xNegative) && treeFellerCompatible(xNegative) && !toBeFelled.contains(xNegative))
|
||||
processTreeFelling(xNegative, world, toBeFelled, plugin);
|
||||
if(!plugin.misc.blockWatchList.contains(currentBlock) &&
|
||||
!isTooAgressive(isAirOrLeaves, zPositive) && treeFellerCompatible(zPositive) && !toBeFelled.contains(zPositive))
|
||||
processTreeFelling(zPositive, world, toBeFelled, plugin);
|
||||
if(!plugin.misc.blockWatchList.contains(currentBlock) &&
|
||||
!isTooAgressive(isAirOrLeaves, zNegative) && treeFellerCompatible(zNegative) && !toBeFelled.contains(zNegative))
|
||||
processTreeFelling(zNegative, world, toBeFelled, plugin);
|
||||
|
||||
//Finally go Y+
|
||||
Block yPositive = world.getBlockAt(x, y+1, z);
|
||||
|
||||
if(treeFellerCompatible(yPositive))
|
||||
{
|
||||
if(!plugin.misc.blockWatchList.contains(currentBlock) && !toBeFelled.contains(yPositive))
|
||||
{
|
||||
processTreeFelling(yPositive, world, toBeFelled, plugin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isTooAgressive(boolean bool, Block block)
|
||||
{
|
||||
return bool && (block.getType() == Material.AIR || block.getType() == Material.LEAVES);
|
||||
}
|
||||
|
||||
public static void woodCuttingProcCheck(Player player, Block block)
|
||||
{
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
@@ -50,127 +219,13 @@ public class WoodCutting
|
||||
Material mat = Material.getMaterial(block.getTypeId());
|
||||
if(player != null)
|
||||
{
|
||||
if((Math.random() * 1000 <= PP.getSkillLevel(SkillType.WOODCUTTING)) || PP.getSkillLevel(SkillType.WOODCUTTING) > 1000)
|
||||
if(PP.getSkillLevel(SkillType.WOODCUTTING) > 1000 || (Math.random() * 1000 <= PP.getSkillLevel(SkillType.WOODCUTTING)))
|
||||
{
|
||||
ItemStack item = new ItemStack(mat, 1, (short) 0, type);
|
||||
m.mcDropItem(block.getLocation(), item);
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void treeFellerCheck(Player player, Block block)
|
||||
{
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
if(m.isAxes(player.getItemInHand()))
|
||||
{
|
||||
if(block != null)
|
||||
{
|
||||
if(!m.abilityBlockCheck(block))
|
||||
return;
|
||||
}
|
||||
/*
|
||||
* CHECK FOR AXE PREP MODE
|
||||
*/
|
||||
if(PP.getAxePreparationMode())
|
||||
{
|
||||
PP.setAxePreparationMode(false);
|
||||
}
|
||||
int ticks = 2;
|
||||
int x = PP.getSkillLevel(SkillType.WOODCUTTING);
|
||||
while(x >= 50)
|
||||
{
|
||||
x-=50;
|
||||
ticks++;
|
||||
}
|
||||
|
||||
if(!PP.getTreeFellerMode() && Skills.cooldownOver(player, (PP.getTreeFellerDeactivatedTimeStamp()*1000), LoadProperties.treeFellerCooldown))
|
||||
{
|
||||
player.sendMessage(mcLocale.getString("Skills.TreeFellerOn"));
|
||||
for(Player y : player.getWorld().getPlayers())
|
||||
{
|
||||
if(y != null && y != player && m.getDistance(player.getLocation(), y.getLocation()) < 10)
|
||||
y.sendMessage(mcLocale.getString("Skills.TreeFellerPlayer", new Object[] {player.getName()}));
|
||||
}
|
||||
PP.setTreeFellerActivatedTimeStamp(System.currentTimeMillis());
|
||||
PP.setTreeFellerDeactivatedTimeStamp(System.currentTimeMillis() + (ticks * 1000));
|
||||
PP.setTreeFellerMode(true);
|
||||
}
|
||||
if(!PP.getTreeFellerMode() && !Skills.cooldownOver(player, (PP.getTreeFellerDeactivatedTimeStamp()*1000), LoadProperties.treeFellerCooldown)){
|
||||
player.sendMessage(ChatColor.RED+"You are too tired to use that ability again."
|
||||
+ChatColor.YELLOW+" ("+Skills.calculateTimeLeft(player, (PP.getTreeFellerDeactivatedTimeStamp()*1000), LoadProperties.treeFellerCooldown)+"s)");
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void treeFeller(Block block, Player player, mcMMO plugin){
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
int radius = 1;
|
||||
if(PP.getSkillLevel(SkillType.WOODCUTTING) >= 500)
|
||||
radius++;
|
||||
if(PP.getSkillLevel(SkillType.WOODCUTTING) >= 950)
|
||||
radius++;
|
||||
ArrayList<Block> blocklist = new ArrayList<Block>();
|
||||
ArrayList<Block> toAdd = new ArrayList<Block>();
|
||||
if(block != null)
|
||||
blocklist.add(block);
|
||||
while(isdone == false){
|
||||
addBlocksToTreeFelling(blocklist, toAdd, radius);
|
||||
}
|
||||
//This needs to be a hashmap too!
|
||||
isdone = false;
|
||||
/*
|
||||
* Add blocks from the temporary 'toAdd' array list into the 'treeFeller' array list
|
||||
* We use this temporary list to prevent concurrent modification exceptions
|
||||
*/
|
||||
for(Block x : toAdd)
|
||||
{
|
||||
if(!plugin.misc.treeFeller.contains(x))
|
||||
plugin.misc.treeFeller.add(x);
|
||||
}
|
||||
toAdd.clear();
|
||||
}
|
||||
public static void addBlocksToTreeFelling(ArrayList<Block> blocklist, ArrayList<Block> toAdd, Integer radius)
|
||||
{
|
||||
int u = 0;
|
||||
for (Block x : blocklist)
|
||||
{
|
||||
u++;
|
||||
if(toAdd.contains(x))
|
||||
continue;
|
||||
w = 0;
|
||||
Location loc = x.getLocation();
|
||||
int vx = x.getX();
|
||||
int vy = x.getY();
|
||||
int vz = x.getZ();
|
||||
|
||||
/*
|
||||
* Run through the blocks around the broken block to see if they qualify to be 'felled'
|
||||
*/
|
||||
for (int cx = -radius; cx <= radius; cx++) {
|
||||
for (int cy = -radius; cy <= radius; cy++) {
|
||||
for (int cz = -radius; cz <= radius; cz++) {
|
||||
Block blocktarget = loc.getWorld().getBlockAt(vx + cx, vy + cy, vz + cz);
|
||||
if (!blocklist.contains(blocktarget) && !toAdd.contains(blocktarget) && (blocktarget.getTypeId() == 17 || blocktarget.getTypeId() == 18)) {
|
||||
toAdd.add(blocktarget);
|
||||
w++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Add more blocks to blocklist so they can be 'felled'
|
||||
*/
|
||||
for(Block xx : toAdd)
|
||||
{
|
||||
if(!blocklist.contains(xx))
|
||||
blocklist.add(xx);
|
||||
}
|
||||
if(u >= blocklist.size())
|
||||
{
|
||||
isdone = true;
|
||||
} else {
|
||||
isdone = false;
|
||||
}
|
||||
}
|
||||
|
||||
public static void woodcuttingBlockCheck(Player player, Block block, mcMMO plugin)
|
||||
{
|
||||
@@ -184,7 +239,7 @@ public class WoodCutting
|
||||
switch(data)
|
||||
{
|
||||
case 0:
|
||||
xp += LoadProperties.mpine;
|
||||
xp += LoadProperties.moak;
|
||||
break;
|
||||
case 1:
|
||||
xp += LoadProperties.mspruce;
|
||||
@@ -192,6 +247,9 @@ public class WoodCutting
|
||||
case 2:
|
||||
xp += LoadProperties.mbirch;
|
||||
break;
|
||||
case 3:
|
||||
xp += LoadProperties.mjungle;
|
||||
break;
|
||||
}
|
||||
|
||||
if(block.getTypeId() == 17)
|
||||
@@ -210,7 +268,11 @@ public class WoodCutting
|
||||
if(LoadProperties.toolsLoseDurabilityFromAbilities)
|
||||
{
|
||||
if(!player.getItemInHand().containsEnchantment(Enchantment.DURABILITY))
|
||||
m.damageTool(player, (short) LoadProperties.abilityDurabilityLoss);
|
||||
{
|
||||
short durability = player.getItemInHand().getDurability();
|
||||
durability += LoadProperties.abilityDurabilityLoss;
|
||||
player.getItemInHand().setDurability(durability);
|
||||
}
|
||||
}
|
||||
|
||||
if(LoadProperties.spoutEnabled)
|
||||
|
||||
@@ -125,7 +125,7 @@ public class SpoutStuff
|
||||
|
||||
for(SkillType y : SkillType.values())
|
||||
{
|
||||
if(y == SkillType.ALL || y == SkillType.ENCHANTING || y == SkillType.ALCHEMY)
|
||||
if(y == SkillType.ALL)
|
||||
continue;
|
||||
|
||||
String theFileNameA = m.getCapitalized(y.toString())+".png";
|
||||
@@ -189,7 +189,7 @@ public class SpoutStuff
|
||||
//Standard XP Icons
|
||||
for(SkillType y : SkillType.values())
|
||||
{
|
||||
if(y == SkillType.ALL || y == SkillType.ENCHANTING || y == SkillType.ALCHEMY)
|
||||
if(y == SkillType.ALL)
|
||||
continue;
|
||||
files.add(new File(dir+"HUD/Standard/"+m.getCapitalized(y.toString())+".png"));
|
||||
files.add(new File(dir+"HUD/Retro/"+m.getCapitalized(y.toString())+"_r.png"));
|
||||
|
||||
@@ -1,269 +0,0 @@
|
||||
/*
|
||||
* This file is from mmoMinecraft (http://code.google.com/p/mmo-minecraft/).
|
||||
*
|
||||
* mmoMinecraft 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.gmail.nossr50.spout;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Tameable;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.entity.*;
|
||||
import org.getspout.spoutapi.gui.Container;
|
||||
import org.getspout.spoutapi.gui.GenericContainer;
|
||||
import org.getspout.spoutapi.gui.Widget;
|
||||
import org.getspout.spoutapi.gui.WidgetAnchor;
|
||||
import org.getspout.spoutapi.player.SpoutPlayer;
|
||||
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.party.Party;
|
||||
import com.gmail.nossr50.spout.util.GenericLivingEntity;
|
||||
|
||||
public class mmoHelper
|
||||
{
|
||||
|
||||
/**
|
||||
* A map of player containers, each container is their party bar
|
||||
*/
|
||||
public static HashMap<Player, GenericContainer> containers = new HashMap<Player, GenericContainer>();
|
||||
|
||||
/**
|
||||
* Get the percentage health of a Player.
|
||||
* @param player The Player we're interested in
|
||||
* @return The percentage of max health
|
||||
*/
|
||||
public static int getHealth(Entity player) {
|
||||
if (player != null && player instanceof LivingEntity) {
|
||||
try {
|
||||
return Math.min(((LivingEntity) player).getHealth() * 5, 100);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the colour of a LivingEntity target from a player's point of view.
|
||||
* @param player The player viewing the target
|
||||
* @param target The target to name
|
||||
* @return The name to use
|
||||
*/
|
||||
public static String getColor(Player player, LivingEntity target) {
|
||||
if (target instanceof Player) {
|
||||
if (((Player) target).isOp()) {
|
||||
return ChatColor.GOLD.toString();
|
||||
}
|
||||
return ChatColor.YELLOW.toString();
|
||||
} else {
|
||||
if (target instanceof Monster) {
|
||||
if (player != null && player.equals(((Monster) target).getTarget())) {
|
||||
return ChatColor.RED.toString();
|
||||
} else {
|
||||
return ChatColor.YELLOW.toString();
|
||||
}
|
||||
} else if (target instanceof WaterMob) {
|
||||
return ChatColor.GREEN.toString();
|
||||
} else if (target instanceof Flying) {
|
||||
return ChatColor.YELLOW.toString();
|
||||
} else if (target instanceof Animals) {
|
||||
if (player != null && player.equals(((Animals) target).getTarget())) {
|
||||
return ChatColor.RED.toString();
|
||||
} else if (target instanceof Tameable) {
|
||||
Tameable pet = (Tameable) target;
|
||||
if (pet.isTamed()) {
|
||||
return ChatColor.GREEN.toString();
|
||||
} else {
|
||||
return ChatColor.YELLOW.toString();
|
||||
}
|
||||
} else {
|
||||
return ChatColor.GRAY.toString();
|
||||
}
|
||||
} else {
|
||||
return ChatColor.GRAY.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the percentage armour of a Player.
|
||||
* @param player The Player we're interested in
|
||||
* @return The percentage of max armour
|
||||
*/
|
||||
public static int getArmor(Entity player) {
|
||||
if (player != null && player instanceof Player) {
|
||||
int armor = 0, max, multi[] = {15, 30, 40, 15};
|
||||
ItemStack inv[] = ((Player) player).getInventory().getArmorContents();
|
||||
for (int i = 0; i < inv.length; i++) {
|
||||
max = inv[i].getType().getMaxDurability();
|
||||
if (max >= 0) {
|
||||
armor += multi[i] * (max - inv[i].getDurability()) / max;
|
||||
}
|
||||
}
|
||||
return armor;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static String getSimpleName(LivingEntity target, boolean showOwner) {
|
||||
String name = "";
|
||||
if (target instanceof Player) {
|
||||
if (LoadProperties.showDisplayName) {
|
||||
name += ((Player) target).getName();
|
||||
} else {
|
||||
name += ((Player) target).getDisplayName();
|
||||
}
|
||||
} else if (target instanceof HumanEntity) {
|
||||
name += ((HumanEntity) target).getName();
|
||||
} else {
|
||||
if (target instanceof Tameable) {
|
||||
if (((Tameable) target).isTamed()) {
|
||||
if (showOwner && ((Tameable) target).getOwner() instanceof Player) {
|
||||
if (LoadProperties.showDisplayName) {
|
||||
name += ((Player) ((Tameable) target).getOwner()).getName() + "'s ";
|
||||
} else {
|
||||
name += ((Player) ((Tameable) target).getOwner()).getDisplayName() + "'s ";
|
||||
}
|
||||
} else {
|
||||
name += "Pet ";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (target instanceof Chicken) {
|
||||
name += "Chicken";
|
||||
} else if (target instanceof Cow) {
|
||||
name += "Cow";
|
||||
} else if (target instanceof Creeper) {
|
||||
name += "Creeper";
|
||||
} else if (target instanceof Ghast) {
|
||||
name += "Ghast";
|
||||
} else if (target instanceof Giant) {
|
||||
name += "Giant";
|
||||
} else if (target instanceof Pig) {
|
||||
name += "Pig";
|
||||
} else if (target instanceof PigZombie) {
|
||||
name += "PigZombie";
|
||||
} else if (target instanceof Sheep) {
|
||||
name += "Sheep";
|
||||
} else if (target instanceof Slime) {
|
||||
name += "Slime";
|
||||
} else if (target instanceof Skeleton) {
|
||||
name += "Skeleton";
|
||||
} else if (target instanceof Spider) {
|
||||
name += "Spider";
|
||||
} else if (target instanceof Squid) {
|
||||
name += "Squid";
|
||||
} else if (target instanceof Wolf) {
|
||||
name += "Wolf";
|
||||
} else if (target instanceof Zombie) {
|
||||
name += "Zombie";
|
||||
} else if (target instanceof Monster) {
|
||||
name += "Monster";
|
||||
} else if (target instanceof Creature) {
|
||||
name += "Creature";
|
||||
} else {
|
||||
name += "Unknown";
|
||||
}
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
public static LivingEntity[] getPets(HumanEntity player) {
|
||||
ArrayList<LivingEntity> pets = new ArrayList<LivingEntity>();
|
||||
if (player != null && (!(player instanceof Player) || ((Player) player).isOnline())) {
|
||||
String name = player.getName();
|
||||
for (World world : Bukkit.getServer().getWorlds()) {
|
||||
for (LivingEntity entity : world.getLivingEntities()) {
|
||||
if (entity instanceof Tameable && ((Tameable) entity).isTamed() && ((Tameable) entity).getOwner() instanceof Player) {
|
||||
if (name.equals(((Player) ((Tameable) entity).getOwner()).getName())) {
|
||||
pets.add(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
LivingEntity[] list = new LivingEntity[pets.size()];
|
||||
pets.toArray(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
public static void update(Player player)
|
||||
{
|
||||
//boolean show_pets = true;
|
||||
Container container = containers.get(player);
|
||||
|
||||
if (container != null)
|
||||
{
|
||||
int index = 0;
|
||||
Widget[] bars = container.getChildren();
|
||||
for (String name : Party.getInstance().getPartyMembersByName(player).meFirst(player.getName()))
|
||||
{
|
||||
GenericLivingEntity bar;
|
||||
if (index >= bars.length)
|
||||
{
|
||||
container.addChild(bar = new GenericLivingEntity());
|
||||
} else {
|
||||
bar = (GenericLivingEntity)bars[index];
|
||||
}
|
||||
bar.setEntity(name, Party.getInstance().isPartyLeader(name, Users.getProfile(Bukkit.getServer().getPlayer(name)).getParty()) ? ChatColor.GREEN + "@" : "");
|
||||
//bar.setTargets(show_pets ? getPets(Bukkit.getServer().getPlayer(name)) : null);
|
||||
index++;
|
||||
}
|
||||
while (index < bars.length) {
|
||||
container.removeChild(bars[index++]);
|
||||
}
|
||||
container.updateLayout();
|
||||
}
|
||||
}
|
||||
|
||||
public static void initialize(SpoutPlayer sPlayer, Plugin plugin)
|
||||
{
|
||||
GenericContainer container = new GenericContainer();
|
||||
|
||||
container.setAlign(WidgetAnchor.TOP_LEFT)
|
||||
.setAnchor(WidgetAnchor.TOP_LEFT)
|
||||
.setX(3)
|
||||
.setY(3)
|
||||
.setWidth(427)
|
||||
.setHeight(240)
|
||||
.setFixed(true);
|
||||
|
||||
mmoHelper.containers.put(sPlayer, container);
|
||||
|
||||
sPlayer.getMainScreen().attachWidget(plugin, container);
|
||||
}
|
||||
/**
|
||||
* Update all parties.
|
||||
*/
|
||||
public static void updateAll() {
|
||||
for(Player x : Bukkit.getServer().getOnlinePlayers())
|
||||
{
|
||||
if(Users.getProfile(x).inParty())
|
||||
{
|
||||
update(x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
/*
|
||||
* This file is part of mmoMinecraft (http://code.google.com/p/mmo-minecraft/).
|
||||
*
|
||||
* mmoMinecraft 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.gmail.nossr50.spout.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Case insensitive ArrayList<String>.
|
||||
* Overrides the .contains(), .indexOf(), .lastIndexOf() and .remove() methods.
|
||||
*/
|
||||
public class ArrayListString extends ArrayList<String> {
|
||||
|
||||
private static final long serialVersionUID = -8111006526598412404L;
|
||||
|
||||
/**
|
||||
* Returns true if this list contains the specified string.
|
||||
* @param o String whose presence in this list is to be tested
|
||||
* @return true if this list contains the specified string
|
||||
*/
|
||||
public boolean contains(String o) {
|
||||
for (String e : this) {
|
||||
if (o == null ? e == null : o.equalsIgnoreCase(e)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the index of the first occurrence of the specified string in this list, or -1 if this list does not contain the string.
|
||||
* @param o String to search for
|
||||
* @return The index of the first occurrence of the specified string in this list, or -1 if this list does not contain the string
|
||||
*/
|
||||
public int indexOf(String o) {
|
||||
for (int i = 0; i < this.size(); i++) {
|
||||
if (o == null ? get(i) == null : o.equalsIgnoreCase(get(i))) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the index of the last occurrence of the specified string in this list, or -1 if this list does not contain the string.
|
||||
* @param o String to search for
|
||||
* @return The index of the last occurrence of the specified string in this list, or -1 if this list does not contain the string
|
||||
*/
|
||||
public int lastIndexOf(String o) {
|
||||
for (int i = size() - 1; i >= 0; i--) {
|
||||
if (o == null ? get(i) == null : o.equalsIgnoreCase(get(i))) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the first occurrence of the specified string from this list, if it is present. If the list does not contain the string, it is unchanged.
|
||||
* @param o String to be removed from this list, if present
|
||||
* @return true if this list contained the specified string
|
||||
*/
|
||||
public boolean remove(String o) {
|
||||
int i = indexOf(o);
|
||||
if (i != -1) {
|
||||
remove(i);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the element at the specified position in this list.
|
||||
* This is for finding the correct capitalisation of an element.
|
||||
* @param index String to search for
|
||||
* @return the correctly capitalised element
|
||||
*/
|
||||
public String get(String index) {
|
||||
int i = this.indexOf(index);
|
||||
if (i != -1) {
|
||||
return this.get(i);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ArrayListString meFirst(String name) {
|
||||
ArrayListString copy = new ArrayListString();
|
||||
if (this.contains(name)) {
|
||||
copy.add(name);
|
||||
}
|
||||
for (String next : this) {
|
||||
if (!next.equalsIgnoreCase(name)) {
|
||||
copy.add(next);
|
||||
}
|
||||
}
|
||||
return copy;
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
/*
|
||||
* This file is part of mmoMinecraft (https://github.com/mmoMinecraftDev).
|
||||
*
|
||||
* mmoMinecraft 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.gmail.nossr50.spout.util;
|
||||
|
||||
import org.getspout.spoutapi.gui.GenericTexture;
|
||||
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
|
||||
public final class GenericFace extends GenericTexture {
|
||||
|
||||
private static String facePath = "http://face.rycochet.net/";
|
||||
private static int defaultSize = 8;
|
||||
private String name;
|
||||
|
||||
public GenericFace() {
|
||||
this("", defaultSize);
|
||||
}
|
||||
|
||||
public GenericFace(String name) {
|
||||
this(name, defaultSize);
|
||||
}
|
||||
|
||||
public GenericFace(String name, int size) {
|
||||
if (LoadProperties.showFaces) {
|
||||
this.setWidth(size).setHeight(size).setFixed(true);
|
||||
setName(name);
|
||||
} else {
|
||||
this.setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public GenericFace setName(String name) {
|
||||
if (LoadProperties.showFaces) {
|
||||
this.name = name == null ? "" : name;
|
||||
super.setUrl(facePath + this.name + ".png");
|
||||
super.setDirty(true);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public GenericFace setSize(int size) {
|
||||
if (LoadProperties.showFaces) {
|
||||
super.setWidth(size).setHeight(size);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -1,227 +0,0 @@
|
||||
/*
|
||||
* This file is part of mmoHelperMinecraft (https://github.com/mmoHelperMinecraftDev).
|
||||
*
|
||||
* mmoHelperMinecraft 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.gmail.nossr50.spout.util;
|
||||
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.getspout.spoutapi.gui.*;
|
||||
|
||||
import com.gmail.nossr50.spout.mmoHelper;
|
||||
|
||||
public class GenericLivingEntity extends GenericContainer {
|
||||
|
||||
private Container _space;
|
||||
private Label _label;
|
||||
private Gradient _health;
|
||||
private Gradient _armor;
|
||||
private GenericFace _face;
|
||||
private int health = 100;
|
||||
private int armor = 100;
|
||||
private int def_width = 80;
|
||||
private int def_height = 14;
|
||||
private boolean target = false;
|
||||
String face = "~";
|
||||
String label = "";
|
||||
|
||||
public GenericLivingEntity() {
|
||||
super();
|
||||
Color black = new Color(0, 0, 0, 0.75f);
|
||||
|
||||
this.addChildren(
|
||||
new GenericContainer( // Used for the bar, this.children with an index 1+ are targets
|
||||
_space = (Container) new GenericContainer()
|
||||
.setMinWidth(def_width / 4)
|
||||
.setMaxWidth(def_width / 4)
|
||||
.setVisible(target),
|
||||
new GenericContainer(
|
||||
new GenericGradient()
|
||||
.setTopColor(black)
|
||||
.setBottomColor(black)
|
||||
.setPriority(RenderPriority.Highest),
|
||||
new GenericContainer(
|
||||
_health = (Gradient) new GenericGradient(),
|
||||
_armor = (Gradient) new GenericGradient()
|
||||
) .setMargin(1)
|
||||
.setPriority(RenderPriority.High),
|
||||
new GenericContainer(
|
||||
_face = (GenericFace) new GenericFace()
|
||||
.setMargin(3, 0, 3, 3),
|
||||
_label = (Label) new GenericLabel()
|
||||
.setMargin(3)
|
||||
) .setLayout(ContainerType.HORIZONTAL)
|
||||
) .setLayout(ContainerType.OVERLAY)
|
||||
) .setLayout(ContainerType.HORIZONTAL)
|
||||
.setMargin(0, 0, 1, 0)
|
||||
.setFixed(true)
|
||||
.setWidth(def_width)
|
||||
.setHeight(def_height)
|
||||
) .setAlign(WidgetAnchor.TOP_LEFT)
|
||||
.setFixed(true)
|
||||
.setWidth(def_width)
|
||||
.setHeight(def_height + 1);
|
||||
|
||||
this.setHealthColor(new Color(1f, 0, 0, 0.75f));
|
||||
this.setArmorColor(new Color(0.75f, 0.75f, 0.75f, 0.75f));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the display from a possibly offline player
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
public GenericLivingEntity setEntity(String name) {
|
||||
return setEntity(name, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the display from a possibly offline player
|
||||
* @param name
|
||||
* @param prefix Place before the name
|
||||
* @return
|
||||
*/
|
||||
public GenericLivingEntity setEntity(String name, String prefix) {
|
||||
Player player = this.getPlugin().getServer().getPlayer(name);
|
||||
if (player != null && player.isOnline()) {
|
||||
return setEntity(player, prefix);
|
||||
}
|
||||
setHealth(0);
|
||||
setArmor(0);
|
||||
setLabel((!"".equals(prefix) ? prefix : "") + mmoHelper.getColor(screen != null ? screen.getPlayer() : null, null) + name);
|
||||
setFace("~" + name);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the display from a player or living entity
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public GenericLivingEntity setEntity(LivingEntity entity) {
|
||||
return setEntity(entity, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the display from a player or living entity
|
||||
* @param entity
|
||||
* @param prefix Place before the name
|
||||
* @return
|
||||
*/
|
||||
public GenericLivingEntity setEntity(LivingEntity entity, String prefix) {
|
||||
if (entity != null && entity instanceof LivingEntity) {
|
||||
setHealth(mmoHelper.getHealth(entity)); // Needs a maxHealth() check
|
||||
setArmor(mmoHelper.getArmor(entity));
|
||||
setLabel((!"".equals(prefix) ? prefix : "") + mmoHelper.getColor(screen != null ? screen.getPlayer() : null, entity) + mmoHelper.getSimpleName(entity, !target));
|
||||
setFace(entity instanceof Player ? ((Player)entity).getName() : "+" + mmoHelper.getSimpleName(entity,false).replaceAll(" ", ""));
|
||||
} else {
|
||||
setHealth(0);
|
||||
setArmor(0);
|
||||
setLabel("");
|
||||
setFace("");
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the targets of this entity - either actual targets, or pets etc
|
||||
* @param targets
|
||||
* @return
|
||||
*/
|
||||
public GenericLivingEntity setTargets(LivingEntity... targets) {
|
||||
Widget[] widgets = this.getChildren();
|
||||
if (targets == null) {
|
||||
targets = new LivingEntity[0]; // zero-length array is easier to handle
|
||||
}
|
||||
for (int i=targets.length + 1; i<widgets.length; i++) {
|
||||
this.removeChild(widgets[i]);
|
||||
}
|
||||
for (int i=0; i<targets.length; i++) {
|
||||
GenericLivingEntity child;
|
||||
if (widgets.length > i + 1) {
|
||||
child = (GenericLivingEntity) widgets[i+1];
|
||||
} else {
|
||||
this.addChild(child = new GenericLivingEntity());
|
||||
}
|
||||
child.setTarget(true);
|
||||
child.setEntity(targets[i]);
|
||||
}
|
||||
setHeight((targets.length + 1) * (def_height + 1));
|
||||
updateLayout();
|
||||
return this;
|
||||
}
|
||||
|
||||
public GenericLivingEntity setTarget(boolean target) {
|
||||
if (this.target != target) {
|
||||
this.target = target;
|
||||
_space.setVisible(target);
|
||||
updateLayout();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public GenericLivingEntity setHealth(int health) {
|
||||
if (this.health != health) {
|
||||
this.health = health;
|
||||
updateLayout();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public GenericLivingEntity setHealthColor(Color color) {
|
||||
_health.setTopColor(color).setBottomColor(color);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GenericLivingEntity setArmor(int armor) {
|
||||
if (this.armor != armor) {
|
||||
this.armor = armor;
|
||||
updateLayout();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public GenericLivingEntity setArmorColor(Color color) {
|
||||
_armor.setTopColor(color).setBottomColor(color);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GenericLivingEntity setLabel(String label) {
|
||||
if (!this.label.equals(label)) {
|
||||
this.label = label;
|
||||
_label.setText(label).setDirty(true);
|
||||
updateLayout();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public GenericLivingEntity setFace(String name) {
|
||||
if (!this.face.equals(name)) {
|
||||
this.face = name;
|
||||
_face.setVisible(!name.isEmpty());
|
||||
_face.setName(name);
|
||||
updateLayout();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container updateLayout() {
|
||||
super.updateLayout();
|
||||
_armor.setWidth((_armor.getContainer().getWidth() * armor) / 100).setDirty(true);
|
||||
_health.setWidth((_health.getContainer().getWidth() * health) / 100).setDirty(true);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,305 @@
|
||||
#
|
||||
# mcMMO configuration
|
||||
# First generated on ${project.version}-b${BUILD_NUMBER}
|
||||
#
|
||||
#####
|
||||
|
||||
#
|
||||
# Settings for mcMMO in general
|
||||
###
|
||||
General:
|
||||
Locale: en_us
|
||||
MOTD:
|
||||
Enabled: true
|
||||
#Amount of time (in minutes) to wait between saves of player information
|
||||
Save_Interval: 10
|
||||
#Allow mcMMO to report on basic anonymous usage
|
||||
Stats_Tracking: true
|
||||
#Allow mcMMO to inform other plugins of damage being dealt
|
||||
Event_Callback: true
|
||||
|
||||
#
|
||||
# Settings for using a mySQL database
|
||||
###
|
||||
MySQL:
|
||||
Enabled: false
|
||||
Database:
|
||||
User:
|
||||
Name: UserName
|
||||
Password: UserPassword
|
||||
Name: DataBaseName
|
||||
TablePrefix: mcmmo_
|
||||
Server:
|
||||
Port: 3306
|
||||
Address: localhost
|
||||
|
||||
#
|
||||
# Settings for mcMMO items
|
||||
###
|
||||
Items:
|
||||
Chimaera_Wing:
|
||||
Enabled: true
|
||||
Feather_Cost: 10
|
||||
Item_ID: 288
|
||||
|
||||
#
|
||||
# Settings for Arcane Forging
|
||||
###
|
||||
Arcane_Forging:
|
||||
May_Lose_Enchants: true
|
||||
Rank_Levels:
|
||||
Rank_1: 100
|
||||
Rank_2: 250
|
||||
Rank_3: 500
|
||||
Rank_4: 750
|
||||
Keep_Enchants:
|
||||
Chance:
|
||||
Rank_4: 40
|
||||
Rank_3: 30
|
||||
Rank_2: 20
|
||||
Rank_1: 10
|
||||
Downgrades:
|
||||
Enabled: true
|
||||
Chance:
|
||||
Rank_4: 15
|
||||
Rank_3: 25
|
||||
Rank_2: 50
|
||||
Rank_1: 75
|
||||
|
||||
#
|
||||
# Settings for Fishing
|
||||
###
|
||||
Fishing:
|
||||
Drops_Enabled: true
|
||||
Tier_Levels:
|
||||
Tier1: 0
|
||||
Tier2: 200
|
||||
Tier3: 400
|
||||
Tier4: 600
|
||||
Tier5: 800
|
||||
|
||||
#
|
||||
# Settings for Abilities
|
||||
###
|
||||
Abilities:
|
||||
Enabled: true
|
||||
Messages: true
|
||||
Activation:
|
||||
Only_Activate_When_Sneaking: false
|
||||
Cooldowns:
|
||||
Blast_Mining: 60
|
||||
Giga_Drill_Breaker: 240
|
||||
Berserk: 240
|
||||
Green_Terra: 240
|
||||
Skull_Splitter: 240
|
||||
Serrated_Strikes: 240
|
||||
Tree_Feller: 240
|
||||
Super_Breaker: 240
|
||||
Limits:
|
||||
Tree_Feller_Threshold: 500
|
||||
Tools:
|
||||
Durability_Loss_Enabled: true
|
||||
Durability_Loss: 2
|
||||
|
||||
#
|
||||
# Settings for Skills
|
||||
###
|
||||
Skills:
|
||||
Acrobatics:
|
||||
Level_Cap: 0 #Level cap of 0 for no limit
|
||||
Archery:
|
||||
Level_Cap: 0
|
||||
Axes:
|
||||
Level_Cap: 0
|
||||
Excavation:
|
||||
Level_Cap: 0
|
||||
Requires_Shovel: true
|
||||
Fishing:
|
||||
Level_Cap: 0
|
||||
Herbalism:
|
||||
Level_Cap: 0
|
||||
Green_Thumb:
|
||||
Cobble_To_Mossy: true
|
||||
SmoothBrick_To_MossyBrick: true
|
||||
Dirt_To_Grass: true
|
||||
Hunger_Bonus: true
|
||||
Mining:
|
||||
Level_Cap: 0
|
||||
Requires_Pickaxe: true
|
||||
Detonator_ID: 259
|
||||
Repair:
|
||||
Level_Cap: 0
|
||||
Anvil_Messages: true
|
||||
Anvil_ID: 42
|
||||
Can_Repair_Armor: true
|
||||
Can_Repair_Tools: true
|
||||
Leather:
|
||||
Name: Leather
|
||||
ID: 334
|
||||
String:
|
||||
Name: String
|
||||
ID: 287
|
||||
Stone:
|
||||
Name: Cobblestone
|
||||
Level_Required: 0
|
||||
ID: 4
|
||||
Wood:
|
||||
Name: Wood Planks
|
||||
ID: 5
|
||||
Gold:
|
||||
Name: Gold Bars
|
||||
Level_Required: 0
|
||||
ID: 266
|
||||
Iron:
|
||||
Name: Iron Bars
|
||||
Level_Required: 0
|
||||
ID: 265
|
||||
Diamond:
|
||||
Name: Diamond
|
||||
Level_Required: 50
|
||||
ID: 264
|
||||
Swords:
|
||||
Level_Cap: 0
|
||||
Taming:
|
||||
Level_Cap: 0
|
||||
Call_Of_The_Wild:
|
||||
Bones_Required: 10
|
||||
Unarmed:
|
||||
Level_Cap: 0
|
||||
Woodcutting:
|
||||
Level_Cap: 0
|
||||
Requires_Axe: true
|
||||
|
||||
#
|
||||
# Settings for XP distribution
|
||||
###
|
||||
Experience:
|
||||
Gains:
|
||||
Mobspawners:
|
||||
Enabled: false
|
||||
Multiplier:
|
||||
PVP: 1
|
||||
Global: 1.0
|
||||
PVP:
|
||||
Rewards: true
|
||||
Formula:
|
||||
Multiplier:
|
||||
Swords: 1.0
|
||||
Taming: 1.0
|
||||
Acrobatics: 1.0
|
||||
Excavation: 1.0
|
||||
Herbalism: 1.0
|
||||
Unarmed: 1.0
|
||||
Woodcutting: 1.0
|
||||
Mining: 1.0
|
||||
Archery: 1.0
|
||||
Axes: 1.0
|
||||
Repair: 1.0
|
||||
Fishing: 1.0
|
||||
Fishing:
|
||||
Base: 800
|
||||
Excavation:
|
||||
Base: 40
|
||||
Woodcutting:
|
||||
Oak: 70
|
||||
Spruce: 80
|
||||
Birch: 90
|
||||
Jungle: 100
|
||||
Herbalism:
|
||||
Sugar_Cane: 30
|
||||
Cactus: 30
|
||||
Flowers: 100
|
||||
Pumpkin: 20
|
||||
Mushrooms: 150
|
||||
Wheat: 50
|
||||
Melon: 20
|
||||
Nether_Wart: 50
|
||||
Lily_Pads: 100
|
||||
Vines: 10
|
||||
Mining:
|
||||
Sandstone: 30
|
||||
Glowstone: 30
|
||||
Lapis: 400
|
||||
Obsidian: 150
|
||||
Stone: 30
|
||||
Netherrack: 30
|
||||
Gold: 350
|
||||
Redstone: 150
|
||||
Coal: 100
|
||||
Diamond: 750
|
||||
Iron: 250
|
||||
End_Stone: 150
|
||||
Moss_Stone: 30
|
||||
Taming:
|
||||
Animal_Taming:
|
||||
Wolf: 250
|
||||
Combat:
|
||||
Multiplier:
|
||||
Animals: 1.0
|
||||
Creeper: 4.0
|
||||
Skeleton: 2.0
|
||||
Spider: 3.0
|
||||
Zombie: 2.0
|
||||
Pig_Zombie: 3.0
|
||||
Enderman: 2.0
|
||||
Cave_Spider: 3.0
|
||||
Silverfish: 3.0
|
||||
Blaze: 3.0
|
||||
Magma_Cube: 2.0
|
||||
Ender_Dragon: 8.0
|
||||
Slime: 2.0
|
||||
Ghast: 3.0
|
||||
#
|
||||
# Settings for commands
|
||||
###
|
||||
Commands:
|
||||
invite:
|
||||
Enabled: true
|
||||
mctop:
|
||||
Enabled: true
|
||||
xplock:
|
||||
Enabled: true
|
||||
inspect:
|
||||
Enabled: true
|
||||
mcc:
|
||||
Enabled: true
|
||||
mcremove:
|
||||
Enabled: true
|
||||
mmoedit:
|
||||
Enabled: true
|
||||
accept:
|
||||
Enabled: true
|
||||
mcstats:
|
||||
Enabled: true
|
||||
mcability:
|
||||
Enabled: true
|
||||
party:
|
||||
Enabled: true
|
||||
xprate:
|
||||
Enabled: true
|
||||
mcgod:
|
||||
Enabled: true
|
||||
mcmmo:
|
||||
Enabled: true
|
||||
Donate_Message: true
|
||||
mcrefresh:
|
||||
Enabled: true
|
||||
addxp:
|
||||
Enabled: true
|
||||
addlevels:
|
||||
Enabled: true
|
||||
ptp:
|
||||
Enabled: true
|
||||
p:
|
||||
Enabled: true
|
||||
Display_Names: true
|
||||
a:
|
||||
Enabled: true
|
||||
Display_Names: true
|
||||
|
||||
#
|
||||
# Settings for Spout features
|
||||
###
|
||||
Spout:
|
||||
Menu:
|
||||
Key: KEY_M
|
||||
@@ -79,275 +376,4 @@ Spout:
|
||||
Mining:
|
||||
BLUE: 0.75
|
||||
GREEN: 0.3
|
||||
RED: 0.3
|
||||
Fishing:
|
||||
Drops:
|
||||
Gold_Tools: true
|
||||
Diamond_Armor: true
|
||||
Stone_Tools: true
|
||||
Diamonds: true
|
||||
Iron_Armor: true
|
||||
Iron_Tools: true
|
||||
Diamond_Tools: true
|
||||
Item_Drops_Enabled: true
|
||||
Records: true
|
||||
Blaze_Rod: true
|
||||
Leather_Armor: true
|
||||
Drop_Chance:
|
||||
Tier_1: 20
|
||||
Tier_2: 25
|
||||
Tier_3: 30
|
||||
Tier_4: 35
|
||||
Tier_5: 40
|
||||
Gold_Armor: true
|
||||
Glowstone_Dust: true
|
||||
Ender_Pearl: true
|
||||
Wooden_Tools: true
|
||||
Skills:
|
||||
Acrobatics:
|
||||
Level_Cap: 0 #Level cap of 0 for no limit
|
||||
Archery:
|
||||
Level_Cap: 0
|
||||
Axes:
|
||||
Level_Cap: 0
|
||||
Excavation:
|
||||
Level_Cap: 0
|
||||
Requires_Shovel: true
|
||||
Fishing:
|
||||
Level_Cap: 0
|
||||
Herbalism:
|
||||
Level_Cap: 0
|
||||
Green_Thumb:
|
||||
Cobble_To_Mossy: true
|
||||
Mining:
|
||||
Level_Cap: 0
|
||||
Requires_Pickaxe: true
|
||||
Repair:
|
||||
Level_Cap: 0
|
||||
Leather:
|
||||
Name: Leather
|
||||
ID: 334
|
||||
String:
|
||||
Name: String
|
||||
ID: 287
|
||||
Stone:
|
||||
Name: Cobblestone
|
||||
ID: 4
|
||||
Wood:
|
||||
Name: Wood Planks
|
||||
ID: 5
|
||||
Gold:
|
||||
Name: Gold Bars
|
||||
ID: 266
|
||||
Anvil_Messages: true
|
||||
Anvil_ID: 42
|
||||
Diamond:
|
||||
Name: Diamond
|
||||
Level_Required: 50
|
||||
ID: 264
|
||||
Iron:
|
||||
Name: Iron Bars
|
||||
ID: 265
|
||||
Swords:
|
||||
Level_Cap: 0
|
||||
Taming:
|
||||
Level_Cap: 0
|
||||
Call_Of_The_Wild:
|
||||
Bones_Required: 10
|
||||
Unarmed:
|
||||
Level_Cap: 0
|
||||
Woodcutting:
|
||||
Level_Cap: 0
|
||||
Requires_Axe: true
|
||||
Experience:
|
||||
Fishing:
|
||||
Base: 800
|
||||
Formula:
|
||||
Multiplier:
|
||||
Swords: 1.0
|
||||
Taming: 1.0
|
||||
Acrobatics: 1.0
|
||||
Sorcery: 1.0
|
||||
Excavation: 1.0
|
||||
Herbalism: 1.0
|
||||
Unarmed: 1.0
|
||||
Woodcutting: 1.0
|
||||
Mining: 1.0
|
||||
Archery: 1.0
|
||||
Axes: 1.0
|
||||
Repair: 1.0
|
||||
Gains:
|
||||
Mobspawners:
|
||||
Enabled: false
|
||||
Multiplier:
|
||||
PVP: 1
|
||||
Global: 1.0
|
||||
PVP:
|
||||
Rewards: true
|
||||
Excavation:
|
||||
Base: 40
|
||||
Cake: 3000
|
||||
Sulphur: 30
|
||||
Bones: 30
|
||||
Map: 200
|
||||
Slimeballs: 100
|
||||
Bucket: 100
|
||||
Apple: 100
|
||||
Mushroom: 80
|
||||
Eggs: 100
|
||||
Slowsand: 80
|
||||
Watch: 200
|
||||
Web: 150
|
||||
String: 200
|
||||
Glowstone: 80
|
||||
Music: 3000
|
||||
Diamond: 1000
|
||||
Cocoa_Beans: 100
|
||||
Woodcutting:
|
||||
Birch: 70
|
||||
Spruce: 80
|
||||
Pine: 90
|
||||
Herbalism:
|
||||
Sugar_Cane: 30
|
||||
Cactus: 30
|
||||
Flowers: 100
|
||||
Pumpkin: 20
|
||||
Mushrooms: 150
|
||||
Wheat: 50
|
||||
Melon: 20
|
||||
Nether_Wart: 50
|
||||
Lily_Pads: 100
|
||||
Vines: 10
|
||||
Mining:
|
||||
Sandstone: 30
|
||||
Glowstone: 30
|
||||
Lapis: 400
|
||||
Obsidian: 150
|
||||
Stone: 30
|
||||
Netherrack: 30
|
||||
Gold: 350
|
||||
Redstone: 150
|
||||
Coal: 100
|
||||
Diamond: 750
|
||||
Iron: 250
|
||||
MySQL:
|
||||
Enabled: false
|
||||
Database:
|
||||
User:
|
||||
Name: UserName
|
||||
Password: UserPassword
|
||||
Name: DataBaseName
|
||||
TablePrefix: mcmmo_
|
||||
Server:
|
||||
Port: 3306
|
||||
Address: localhost
|
||||
XP:
|
||||
Gains:
|
||||
Mobspawners:
|
||||
Enabled: false
|
||||
PVP:
|
||||
Rewards: true
|
||||
General:
|
||||
HP_Regeneration:
|
||||
Enabled: true
|
||||
Locale: en_us
|
||||
MySpawn:
|
||||
Enabled: true
|
||||
MOTD:
|
||||
Enabled: true
|
||||
Excavation:
|
||||
Drops:
|
||||
Cake: true
|
||||
Sulphur: true
|
||||
Bones: true
|
||||
Apples: true
|
||||
Map: true
|
||||
Slimeballs: true
|
||||
Bucket: true
|
||||
Netherrack: true
|
||||
Mushrooms: true
|
||||
Eggs: true
|
||||
Slowsand: true
|
||||
Watch: true
|
||||
Web: true
|
||||
String: true
|
||||
Glowstone: true
|
||||
Music: true
|
||||
Diamond: true
|
||||
Cocoa_Beans: true
|
||||
Arcane_Forging:
|
||||
Keep_Enchants:
|
||||
Chance:
|
||||
Rank_4: 40
|
||||
Rank_3: 30
|
||||
Rank_2: 20
|
||||
Rank_1: 10
|
||||
May_Lose_Enchants:
|
||||
Enabled: true
|
||||
Downgrades:
|
||||
Enabled: true
|
||||
Chance:
|
||||
Rank_4: 15
|
||||
Rank_3: 25
|
||||
Rank_2: 50
|
||||
Rank_1: 75
|
||||
Abilities:
|
||||
Activation:
|
||||
Only_Activate_When_Sneaking: false
|
||||
Enabled: true
|
||||
Messages: true
|
||||
Cooldowns:
|
||||
Giga_Drill_Breaker: 240
|
||||
Berserk: 240
|
||||
Green_Terra: 240
|
||||
Skull_Splitter: 240
|
||||
Serrated_Strikes: 240
|
||||
Tree_Feller: 240
|
||||
Super_Breaker: 240
|
||||
Tools:
|
||||
Durability_Loss: 2
|
||||
Durability_Loss_Enabled: true
|
||||
Commands:
|
||||
invite:
|
||||
Enabled: true
|
||||
mctop:
|
||||
Enabled: true
|
||||
xplock:
|
||||
Enabled: true
|
||||
whois:
|
||||
Enabled: true
|
||||
mcc:
|
||||
Enabled: true
|
||||
mmoedit:
|
||||
Enabled: true
|
||||
accept:
|
||||
Enabled: true
|
||||
stats:
|
||||
Enabled: true
|
||||
mcability:
|
||||
Enabled: true
|
||||
party:
|
||||
Enabled: true
|
||||
xprate:
|
||||
Enabled: true
|
||||
mcgod:
|
||||
Enabled: true
|
||||
mcmmo:
|
||||
Enabled: true
|
||||
Donate_Message: true
|
||||
mcrefresh:
|
||||
Enabled: true
|
||||
myspawn:
|
||||
Enabled: true
|
||||
addxp:
|
||||
Enabled: true
|
||||
clearmyspawn:
|
||||
Enabled: true
|
||||
ptp:
|
||||
Enabled: true
|
||||
p:
|
||||
Enabled: true
|
||||
Display_Names: true
|
||||
a:
|
||||
Enabled: true
|
||||
Display_Names: true
|
||||
RED: 0.3
|
||||
@@ -27,7 +27,7 @@ m.mccMySpawn=[[YELLOW]]- Teleport zum Spawnpunkt
|
||||
m.mccClearMySpawn=[[YELLOW]]- Spawnpunkt loeschen
|
||||
m.mccToggleAbility=[[YELLOW]]- Faehigkeitsaktivierung mit rechtsklick an/aus schalten
|
||||
m.mccAdminToggle=[[YELLOW]]- Adminchat aktivieren
|
||||
m.mccWhois=[[WHITE]][playername] [[YELLOW]]- Detailierte Spielerinfos zeigen
|
||||
m.mccInspect=[[WHITE]][playername] [[YELLOW]]- Detailierte Spielerinfos zeigen
|
||||
m.mccMmoedit=[playername] [skill] [newvalue] [[YELLOW]]- Ziel modifizieren
|
||||
m.mccMcGod=[[YELLOW]]- God Mode
|
||||
m.mccSkillInfo=[[WHITE]][skillname] [[YELLOW]]- Detailierte Skillinfos zeigen
|
||||
@@ -40,7 +40,7 @@ m.AbilityBonusTemplate=[[YELLOW]]{0}: [[GREEN]]{1}
|
||||
m.Effects=EFFEKTE
|
||||
m.YourStats=[[DARK_AQUA]]_______ [[YELLOW]]DEINE WERTE [[DARK_AQUA]]_______
|
||||
m.SkillTaming=Bestienkunde (Taming)
|
||||
m.XPGainTaming=[[YELLOW]]wenn deine Woelfe angreifen
|
||||
m.XPGainTaming=Animal Taming, or combat w/ your wolves
|
||||
m.EffectsTaming1_0=[[YELLOW]]Bestienkunde
|
||||
m.EffectsTaming1_1=[[AQUA]]mit Knochen schlagen inspiziert Woelfe
|
||||
m.EffectsTaming2_0=[[YELLOW]]Biss
|
||||
@@ -99,11 +99,19 @@ m.EffectsAxes1_0=[[YELLOW]]Schaedelspalter (Faehigkeit)
|
||||
m.EffectsAxes1_1=[[AQUA]]Verursacht Flaechenschaden
|
||||
m.EffectsAxes2_0=[[YELLOW]]Kritischer Schlag
|
||||
m.EffectsAxes2_1=[[AQUA]]doppelter Schaden
|
||||
m.EffectsAxes3_0=[[YELLOW]]Axtmeister (500 Skilllevel)
|
||||
m.EffectsAxes3_1=[[AQUA]]Modifiziert Schaden
|
||||
m.AbilLockAxes1=[[DARK_AQUA]]gesperrt bis 500+ Skilllevel(Axtmeister)
|
||||
m.AbilBonusAxes1_0=[[YELLOW]]Axtmeister
|
||||
m.AbilBonusAxes1_1=[[AQUA]]4 Bonus-Schaden
|
||||
m.EffectsAxes3_0=Axe Mastery
|
||||
m.EffectsAxes3_1=Adds bonus DMG
|
||||
m.EffectsAxes4_0=Impact
|
||||
m.EffectsAxes4_1=Strike with enough force to shatter armor
|
||||
m.EffectsAxes5_0=Greater Impact
|
||||
m.EffectsAxes5_1=Deal bonus damage to unarmored foes
|
||||
m.AbilLockAxes1=LOCKED UNTIL 500+ SKILL (AXE MASTERY)
|
||||
m.AbilBonusAxes1_0=Axe Mastery
|
||||
m.AbilBonusAxes1_1=Bonus {0} damage
|
||||
m.AbilBonusAxes2_0=Impact
|
||||
m.AbilBonusAxes2_1=Deal {0} DMG to armor
|
||||
m.AbilBonusAxes3_0=Greater Impact
|
||||
m.AbilBonusAxes3_1=Deal {0} Bonus DMG to the unarmored
|
||||
m.AxesCritChance=[[YELLOW]]Chance fuer kritische Treffer: [[GREEN]]{0}%
|
||||
m.AxesSkullLength=[[YELLOW]]Schaedelspalter Dauer: [[GREEN]]{0}s
|
||||
m.SkillSwords=Schwert (Swords)
|
||||
@@ -161,18 +169,12 @@ m.EffectsUnarmed1_0=[[YELLOW]]Berserker (Faehigkeit)
|
||||
m.EffectsUnarmed1_1=[[AQUA]]+50% Schaden, bricht weiches Material (Bsp. Erde)
|
||||
m.EffectsUnarmed2_0=[[YELLOW]]Entwaffnen (Spieler)
|
||||
m.EffectsUnarmed2_1=[[AQUA]]Droppt Item welches Feind in Hand haelt
|
||||
m.EffectsUnarmed3_0=[[YELLOW]]Faustkampfmeister
|
||||
m.EffectsUnarmed3_1=[[AQUA]]grosse Schadenssteigerung
|
||||
m.EffectsUnarmed4_0=[[YELLOW]]Faustkampflehrling
|
||||
m.EffectsUnarmed4_1=[[AQUA]]Schadens-Bonus
|
||||
m.EffectsUnarmed3_0=Iron Arm Style
|
||||
m.EffectsUnarmed3_1=Hardens your arm over time
|
||||
m.EffectsUnarmed5_0=[[YELLOW]]Pfeil ablenken
|
||||
m.EffectsUnarmed5_1=[[AQUA]]wehrt Pfeile ab
|
||||
m.AbilLockUnarmed1=[[DARK_AQUA]]gesperrt bis 250+ Skilllevel (Faustkampflehrling)
|
||||
m.AbilLockUnarmed2=[[DARK_AQUA]]gesperrt bis 500+ Skilllevel (Faustkampfmeister)
|
||||
m.AbilBonusUnarmed1_0=[[YELLOW]]Faustkampflehrling
|
||||
m.AbilBonusUnarmed1_1=[[AQUA]]+2 Schadens-Bonus
|
||||
m.AbilBonusUnarmed2_0=[[YELLOW]]Faustkampfmeister
|
||||
m.AbilBonusUnarmed2_1=[[AQUA]]+4 Schadens-Bonus
|
||||
m.AbilBonusUnarmed2_0=Iron Arm Style
|
||||
m.AbilBonusUnarmed2_1=+{0} DMG Upgrade
|
||||
m.UnarmedArrowDeflectChance=[[YELLOW]]Pfeil ablenken Chance: [[GREEN]]{0}%
|
||||
m.UnarmedDisarmChance=[[YELLOW]]Entwaffnen Chance: [[GREEN]]{0}%
|
||||
m.UnarmedBerserkLength=[[YELLOW]]Berserker Dauer: [[GREEN]]{0}s
|
||||
@@ -184,15 +186,15 @@ m.EffectsHerbalism2_0=[[YELLOW]]Gruener Daumen (Weizen)
|
||||
m.EffectsHerbalism2_1=[[AQUA]]automatisches neupflanzen nach ernten
|
||||
m.EffectsHerbalism3_0=[[YELLOW]]Gruener Daumen (Cobble)
|
||||
m.EffectsHerbalism3_1=[[AQUA]]verwandelt Cobblestone zu Mossy Cobblestone mithilfe von Samen
|
||||
m.EffectsHerbalism4_0=[[YELLOW]]Nahrung+
|
||||
m.EffectsHerbalism4_1=[[AQUA]]Modifiziert Heilung von Brot/Suppe
|
||||
m.EffectsHerbalism4_0=Farmer's Diet
|
||||
m.EffectsHerbalism4_1=Improves hunger restored from herbalist foods
|
||||
m.EffectsHerbalism5_0=[[YELLOW]]Doppelte Drops (Alle Kraeuter)
|
||||
m.EffectsHerbalism5_1=[[AQUA]]doppelte Anzahl Items
|
||||
m.HerbalismGreenTerraLength=[[YELLOW]]Gruene Welt Dauer: [[GREEN]]{0}s
|
||||
m.HerbalismGreenThumbChance=[[YELLOW]]Gruener Daumen Chance: [[GREEN]]{0}%
|
||||
m.HerbalismGreenThumbStage=[[YELLOW]]Gruener Daumen Stufe: [[GREEN]] Getreide waechst auf Stufe {0}
|
||||
m.HerbalismDoubleDropChance=[[YELLOW]]Doppelte Drop Chance: [[GREEN]]{0}%
|
||||
m.HerbalismFoodPlus=[[YELLOW]]Nahrung+ (Rang{0}): [[GREEN]]Bonus-Heilung {0}
|
||||
m.HerbalismFoodPlus=[[RED]]Farmers Diet: [[YELLOW]]Rank {0}
|
||||
m.SkillExcavation=Graben (Excavation)
|
||||
m.XPGainExcavation=[[YELLOW]]Graben und Finden von Schaetzen
|
||||
m.EffectsExcavation1_0=[[YELLOW]]Giga Bohrer (Faehigkeit)
|
||||
@@ -306,22 +308,12 @@ Skills.NeedMore=[[DARK_AQUA]]Hierfuer brauchst du mehr [[YELLOW]]
|
||||
Skills.AdeptDiamond=[[DARK_RED]]Du bist nicht talentiert genug um Diamantwerkzeuge zu reparieren
|
||||
Skills.FullDurability=[[AQUA]]Dieses Item hat volle Haltbarkeit
|
||||
Skills.Disarmed=[[DARK_RED]]Du wurdest entwaffnet!
|
||||
mcPlayerListener.SorcerySkill=Zauberkunst Skill (Sorcery):
|
||||
m.SkillSorcery=Zauberkunst (Sorcery)
|
||||
Sorcery.HasCast=[[YELLOW]]**ZAUBERN**[[YELLOW]]
|
||||
Sorcery.Current_Mana=[[DARK_AQUA]]MP
|
||||
Sorcery.SpellSelected=[[YELLOW]]-=([[YELLOW]]{0}[[YELLOW]])=- [[RED]]([[AQUA]]{1}[[RED]])
|
||||
Sorcery.Cost=[[RED]][COST] {0} MP
|
||||
Sorcery.OOM=[[DARK_AQUA]][[[YELLOW]]{2}[[DARK_AQUA]]][[DARK_AQUA]] Kein Mana [[YELLOW]]([[RED]]{0}[[YELLOW]]/[[AQUA]]{1}[[YELLOW]])
|
||||
Sorcery.Water.Thunder=GEWITTER
|
||||
Sorcery.Curative.Self=HEILEN (SELBST)
|
||||
Sorcery.Curative.Other=HEILEN (ANDERE)
|
||||
m.LVL=[[AQUA]]LVL: [[GREEN]]{0} [[DARK_AQUA]]XP[[YELLOW]] ([[AQUA]]{1}[[YELLOW]]/[[AQUA]]{2}[[YELLOW]])
|
||||
Combat.BeastLore=[[YELLOW]]**BESTIENKUNDE**
|
||||
Combat.BeastLoreOwner=[[DARK_AQUA]]Besitzer ([[RED]]{0}[[DARK_AQUA]])
|
||||
Combat.BeastLoreHealthWolfTamed=[[DARK_AQUA]]Gesundheit ([[YELLOW]]{0}[[DARK_AQUA]]/20)
|
||||
Combat.BeastLoreHealthWolf=[[DARK_AQUA]]Gesundheit ([[YELLOW]]{0}[[DARK_AQUA]]/8)
|
||||
mcMMO.Description=[[DARK_AQUA]]Q: Was ist mcMMO? [[GRAY]]mcMMO is ein Open Source [[GOLD]]RPG Plugin[[GRAY]] fuer,[[GRAY]]Bukkit von [[RED]]nossr50 [[GRAY]]welches Minecraft viele Skills hinzufuegt.,[[GRAY]]Man kann auf vielen Wegen Erfahrung sammeln.,[[GRAY]]Um mehr ueber einen Skill zu erfahren gebe [[GREEN]]/SKILLNAME[[GRAY]] ein.,[[DARK_AQUA]]Q: Was macht es genau? [[GRAY]]Beispiel: Mit [[DARK_AQUA]]Mining[[GRAY]] bekommst du passive,[[GRAY]]Fertigkeiten wie [[RED]]Doppelte Drops[[GRAY]] oder Aktive wie den,[[RED]]Super-Brecher[[GRAY]] welcher dir per Rechtsklick aktiviert erlaubt,[[GRAY]]fuer einige Zeit (basierend auf deinem Lvl) schneller zu Minen[[GRAY]],[[BLUE]]Mining [[GRAY]]zu leveln ist so einfach wie seltene Materialien zu,[[GRAY]]bekommen! [[DARK_AQUA]]Q: Was heisst das? [[GRAY]]Alle Skills von [[GOLD]]mcMMO[[GRAY]] fuegen,[[GRAY]]coole neue Sachen hinzu! [[GRAY]]Du kannst [[GREEN]]/{0}[[GRAY]] eingeben [[GRAY]]um dir die,[[GRAY]]Commands anzeigen zu lassen. [[GRAY]]Das Ziel,[[GRAY]]von [[GOLD]]mcMMO[[GRAY]] ist es dir ein hochwertiges [[GOLD]]RPG-System[[GRAY]] zu bieten.,[[DARK_AQUA]]Q: Wo kann ich neue Ideen vorschlagen?,[[GRAY]]Im mcMMO Thema auf [[AQUA]]dev.bukkit.org[[GRAY]],[[DARK_AQUA]]Q: Wie mache ich dies und das?,[[RED]]Bitte [[GRAY]]schau in das mcMMO WIKI! [[AQUA]]mcmmo.wikia.com,[[DARK_GRAY]]Uebersetzung: Jobsti
|
||||
mcMMO.Description=mcMMO.Description=[[DARK_AQUA]]About the [[YELLOW]]mcMMO[[DARK_AQUA]] Project:,[[GOLD]]mcMMO is an [[RED]]open source[[GOLD]] RPG mod created in February 2011,[[GOLD]]by [[BLUE]]nossr50[[GOLD]]. The goal is to provide a quality RPG experience.,[[DARK_AQUA]]Tips:,[[GOLD]] - [[GREEN]]Use [[RED]]/mcc[[GREEN]] to see commands,[[GOLD]] - [[GREEN]]Type [[RED]]/SKILLNAME[[GREEN]] to see detailed skill info,[[DARK_AQUA]]Developers:,[[GOLD]] - [[GREEN]]TheYeti [[BLUE]](Project Lead & Developer),[[GOLD]] - [[GREEN]]NuclearW [[BLUE]](Developer),[[GOLD]] - [[GREEN]]GJ [[BLUE]](Developer),[[GOLD]] - [[GREEN]]nossr50 [[BLUE]](Developer & Creator),[[DARK_AQUA]]Useful Links:,[[GOLD]] - [[GREEN]]issues.mcmmo.org[[GOLD]] Bug Reporting,[[GOLD]] - [[GREEN]]#mcmmo @ irc.esper.net[[GOLD]] IRC Chat,[[GOLD]] - [[GREEN]]www.mcmmo.org[[GOLD]] Official Website,[[GOLD]] - [[GREEN]]http://bit.ly/x3Yvry[[GOLD]] Bukkit Forum Thread,[[GOLD]] - [[GREEN]]https://twitter.com/#!/mcmmo_dev[[GOLD]] mcMMO Twitter,[[DARK_AQUA]]Donation Info:
|
||||
Party.IsLocked=[[RED]]Gruppe ist gesperrt.
|
||||
Party.Locked=[[RED]]Gruppe ist gesperrt, nur der Besitzer kann neue User einladen.
|
||||
Party.IsntLocked=[[AQUA]]Gruppe ist nicht gesperrt
|
||||
@@ -356,14 +348,8 @@ Commands.xprate.started2=[[YELLOW]]Die mcMMO XP RATE betraegt nun {0}x!!
|
||||
Commands.xplock.locked=[[YELLOW]]Deine XP BAR ist nun auf {0} gesperrt!
|
||||
Commands.xplock.unlocked=[[YELLOW]]Deine XP BAR ist nun wieder [[GREEN]]FREIGEGEBEN[[YELLOW]]!
|
||||
Commands.xplock.invalid=[[RED]]Dies ist kein gueltiger Skillname! Versuche /xplock mining
|
||||
m.SkillAlchemy=Alchemie(Alchemy)
|
||||
m.SkillEnchanting=Verzaubern (Enchanting)
|
||||
m.SkillFishing=Angeln (Fishing)
|
||||
mcPlayerListener.AlchemySkill=[[AQUA]]Alchemie Skill [[DARK_AQUA]](Alchemy):
|
||||
mcPlayerListener.EnchantingSkill=[[AQUA]]Verzauberungs Skill [[DARK_AQUA]](Enchanting):
|
||||
mcPlayerListener.FishingSkill=[[YELLOW]]Angeln Skill [[DARK_AQUA]](Fishing):
|
||||
Skills.AlchemyUp=[[AQUA]]Alchemie um [[YELLOW]]{0} erhoeht. Gesamt [[YELLOW]]({1})
|
||||
Skills.EnchantingUp=[[AQUA]]Verzaubern um [[YELLOW]]{0} erhoeht. Gesamt [[YELLOW]]({1})
|
||||
Skills.FishingUp=[[AQUA]]Angeln um [[YELLOW]]{0} erhoeht. Gesamt [[YELLOW]]({1})
|
||||
Repair.LostEnchants=[[YELLOW]]Du hast nicht genug Skill, Verzauberung verloren.
|
||||
Repair.ArcanePerfect=[[YELLOW]]Du hast die Arkanen Zauber in diesem Gegenstand erhalten.
|
||||
@@ -374,8 +360,6 @@ m.EffectsRepair5_1=[[AQUA]]Verzauberte Gegenstaende reparieren
|
||||
m.ArcaneForgingRank=[[YELLOW]]Arkanes Schmieden: [[GREEN]]Rang {0}/4
|
||||
m.ArcaneEnchantKeepChance=[[AQUA]]AS Erfolgs-Chance: [[GREEN]]{0}%
|
||||
m.ArcaneEnchantDowngradeChance=[[AQUA]]AS Downgrade-Chance: [[GREEN]]{0}%
|
||||
m.ArcaneForgingMilestones=[[YELLOW]][TIP]Arkanes Schmieden: [[AQUA]]Rang 1 = 100+, Rang 2 = 250+,
|
||||
m.ArcaneForgingMilestones2=[[AQUA]] Rang 3 = 500+, Rang 4 = 750+
|
||||
Fishing.MagicFound=[[AQUA]]Du hast etwas magisches gefunden...
|
||||
Fishing.ItemFound=[[AQUA]]Du hast einen Schatz gefunden!
|
||||
m.SkillFishing=Angeln (Fishing)
|
||||
@@ -394,4 +378,45 @@ m.TamingSummon=[[YELLOW]]Beschwoerung abgeschlossen
|
||||
m.TamingSummonFailed=[[YELLOW]]Du hast zu viele Woelfe um dich um weitere zu beschwoeren.
|
||||
m.EffectsTaming7_0=[[YELLOW]]Ruf der Wildniss
|
||||
m.EffectsTaming7_1=[[AQUA]]Beschwoere einen Wolf auf deine Seite
|
||||
m.EffectsTaming7_2=[[YELLOW]]Info: [[AQUA]]Ducken und Rechtsklick mit {0} Knochen in der Hand
|
||||
m.EffectsTaming7_2=[[YELLOW]]Info: [[AQUA]]Ducken und Rechtsklick mit {0} Knochen in der Hand
|
||||
m.EffectsTaming8_0=Fast Food Service
|
||||
m.EffectsTaming8_1=Chance for wolves to heal on attack
|
||||
m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE)
|
||||
m.AbilBonusTaming5_0=Fast Food Service
|
||||
m.AbilBonusTaming5_1=50% Chance for heal on attack
|
||||
Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]!
|
||||
m.EffectsMining3_0=Blast Mining
|
||||
m.EffectsMining3_1=Bonuses to mining with TNT
|
||||
m.EffectsMining4_0=Bigger Bombs
|
||||
m.EffectsMining4_1=Increases TNT explosion radius
|
||||
m.EffectsMining5_0=Demolitions Expertise
|
||||
m.EffectsMining5_1=Decreases damage from TNT explosions
|
||||
m.AbilLockMining1=LOCKED UNTIL 125+ SKILL (BLAST MINING)
|
||||
m.AbilLockMining2=LOCKED UNTIL 250+ SKILL (BIGGER BOMBS)
|
||||
m.AbilLockMining3=LOCKED UNTIL 500+ SKILL (DEMOLITIONS EXPERTISE)
|
||||
m.MiningBiggerBombs=[[RED]]Blast Radius Increase: [[YELLOW]]+{0}
|
||||
m.MiningDemolitionsExpertDamageDecrease=[[RED]]Demolitions Expert Damage Decrease: [[YELLOW]]{0}%
|
||||
m.MiningBlastMining=[[RED]]Blast Mining: [[YELLOW]] Rank {0} [[GRAY]]({1})
|
||||
m.BlastMining1 = +35% ore yield
|
||||
m.BlastMining2 = +40% ore yield
|
||||
m.BlastMining3 = +45% ore yield, no debris
|
||||
m.BlastMining4 = +50% ore yield, no debris
|
||||
m.BlastMining5 = +55% ore yield, no debris, double drops
|
||||
m.BlastMining6 = +60% ore yield, no debris, double drops
|
||||
m.BlastMining7 = +65% ore yield, no debris, triple drops
|
||||
m.BlastMining8 = +70% ore yield, no debris, triple drops
|
||||
Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
|
||||
Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
|
||||
Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
|
||||
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!
|
||||
Axes.GreaterImpactOnSelf=[[RED]]**HIT BY GREATER IMPACT**
|
||||
Axes.GreaterImpactOnEnemy=[[GREEN]]**STRUCK WITH GREAT FORCE**
|
||||
Skills.BerserkPlayerOff=[[RED]]Berserk[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.GreenTerraPlayerOff=[[RED]]Green Terra[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.TreeFellerPlayerOff=[[RED]]Tree Feller[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SuperBreakerPlayerOff=[[RED]]Super Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SkullSplitterPlayerOff=[[RED]]Skull Splitter[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.GigaDrillBreakerPlayerOff=[[RED]]Giga Drill Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SerratedStrikesPlayerOff=[[RED]]Serrated Strikes[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.BlastMiningPlayer=[[GREEN]]{0}[[DARK_GREEN]] has used [[RED]]Blast Mining!
|
||||
Skills.YourBlastMining=[[GREEN]]Your [[YELLOW]]Blast Mining [[GREEN]]ability is refreshed!
|
||||
@@ -27,7 +27,7 @@ m.mccMySpawn=- Teleports to myspawn
|
||||
m.mccClearMySpawn=- Clears your MySpawn
|
||||
m.mccToggleAbility=- Toggle ability activation with right click
|
||||
m.mccAdminToggle=- Toggle admin chat
|
||||
m.mccWhois=[playername] [[RED]]- View detailed player info
|
||||
m.mccInspect=[playername] [[RED]]- View detailed player info
|
||||
m.mccMmoedit=[playername] [skill] [newvalue] [[RED]]- Modify target
|
||||
m.mccMcGod=- God Mode
|
||||
m.mccSkillInfo=[skillname] [[RED]]- View detailed information about a skill
|
||||
@@ -40,7 +40,7 @@ m.AbilityBonusTemplate=[[RED]]{0}: [[YELLOW]]{1}
|
||||
m.Effects=EFFECTS
|
||||
m.YourStats=YOUR STATS
|
||||
m.SkillTaming=TAMING
|
||||
m.XPGainTaming=Wolves getting harmed
|
||||
m.XPGainTaming=Animal Taming, or combat w/ your wolves
|
||||
m.EffectsTaming1_0=Beast Lore
|
||||
m.EffectsTaming1_1=Bone-whacking inspects wolves
|
||||
m.EffectsTaming2_0=Gore
|
||||
@@ -100,10 +100,18 @@ m.EffectsAxes1_1=Deal AoE Damage
|
||||
m.EffectsAxes2_0=Critical Strikes
|
||||
m.EffectsAxes2_1=Double Damage
|
||||
m.EffectsAxes3_0=Axe Mastery
|
||||
m.EffectsAxes3_1=Modifies Damage
|
||||
m.AbilLockAxes1=LOCKED UNTIL 500+ SKILL (AXEMASTERY)
|
||||
m.EffectsAxes3_1=Adds bonus DMG
|
||||
m.EffectsAxes4_0=Impact
|
||||
m.EffectsAxes4_1=Strike with enough force to shatter armor
|
||||
m.EffectsAxes5_0=Greater Impact
|
||||
m.EffectsAxes5_1=Deal bonus damage to unarmored foes
|
||||
m.AbilLockAxes1=LOCKED UNTIL 500+ SKILL (AXE MASTERY)
|
||||
m.AbilBonusAxes1_0=Axe Mastery
|
||||
m.AbilBonusAxes1_1=Bonus 4 damage
|
||||
m.AbilBonusAxes1_1=Bonus {0} damage
|
||||
m.AbilBonusAxes2_0=Impact
|
||||
m.AbilBonusAxes2_1=Deal {0} DMG to armor
|
||||
m.AbilBonusAxes3_0=Greater Impact
|
||||
m.AbilBonusAxes3_1=Deal {0} Bonus DMG to the unarmored
|
||||
m.AxesCritChance=[[RED]]Chance to critically strike: [[YELLOW]]{0}%
|
||||
m.AxesSkullLength=[[RED]]Skull Splitter Length: [[YELLOW]]{0}s
|
||||
m.SkillSwords=SWORDS
|
||||
@@ -141,6 +149,8 @@ m.EffectsMining1_0=Super Breaker (ABILITY)
|
||||
m.EffectsMining1_1=Speed+, Triple Drop Chance
|
||||
m.EffectsMining2_0=Double Drops
|
||||
m.EffectsMining2_1=Double the normal loot
|
||||
m.EffectsMining2_0=Double Drops
|
||||
m.EffectsMining2_1=Double the normal loot
|
||||
m.MiningDoubleDropChance=[[RED]]Double Drop Chance: [[YELLOW]]{0}%
|
||||
m.MiningSuperBreakerLength=[[RED]]Super Breaker Length: [[YELLOW]]{0}s
|
||||
m.SkillRepair=REPAIR
|
||||
@@ -161,18 +171,12 @@ m.EffectsUnarmed1_0=Berserk (ABILITY)
|
||||
m.EffectsUnarmed1_1=+50% DMG, Breaks weak materials
|
||||
m.EffectsUnarmed2_0=Disarm (Players)
|
||||
m.EffectsUnarmed2_1=Drops the foes item held in hand
|
||||
m.EffectsUnarmed3_0=Unarmed Mastery
|
||||
m.EffectsUnarmed3_1=Large Damage Upgrade
|
||||
m.EffectsUnarmed4_0=Unarmed Apprentice
|
||||
m.EffectsUnarmed4_1=Damage Upgrade
|
||||
m.EffectsUnarmed3_0=Iron Arm Style
|
||||
m.EffectsUnarmed3_1=Hardens your arm over time
|
||||
m.EffectsUnarmed5_0=Arrow Deflect
|
||||
m.EffectsUnarmed5_1=Deflect arrows
|
||||
m.AbilLockUnarmed1=LOCKED UNTIL 250+ SKILL (UNARMED APPRENTICE)
|
||||
m.AbilLockUnarmed2=LOCKED UNTIL 500+ SKILL (UNARMED MASTERY)
|
||||
m.AbilBonusUnarmed1_0=Unarmed Apprentice
|
||||
m.AbilBonusUnarmed1_1=+2 DMG Upgrade
|
||||
m.AbilBonusUnarmed2_0=Unarmed Mastery
|
||||
m.AbilBonusUnarmed2_1=+4 DMG Upgrade
|
||||
m.AbilBonusUnarmed2_0=Iron Arm Style
|
||||
m.AbilBonusUnarmed2_1=+{0} DMG Upgrade
|
||||
m.UnarmedArrowDeflectChance=[[RED]]Arrow Deflect Chance: [[YELLOW]]{0}%
|
||||
m.UnarmedDisarmChance=[[RED]]Disarm Chance: [[YELLOW]]{0}%
|
||||
m.UnarmedBerserkLength=[[RED]]Berserk Length: [[YELLOW]]{0}s
|
||||
@@ -182,17 +186,17 @@ m.EffectsHerbalism1_0=Green Terra (ABILITY)
|
||||
m.EffectsHerbalism1_1=Spread the Terra, 3x Drops
|
||||
m.EffectsHerbalism2_0=Green Thumb (Wheat)
|
||||
m.EffectsHerbalism2_1=Auto-Plants wheat when harvesting
|
||||
m.EffectsHerbalism3_0=Green Thumb (Cobble)
|
||||
m.EffectsHerbalism3_1=Cobblestone -> Mossy w/ Seeds
|
||||
m.EffectsHerbalism4_0=Food+
|
||||
m.EffectsHerbalism4_1=Modifies health received from bread/stew
|
||||
m.EffectsHerbalism3_0=Green Thumb (Cobble/Stone Brick)
|
||||
m.EffectsHerbalism3_1=Cobblestone/Stone Brick -> Mossy w/ Seeds
|
||||
m.EffectsHerbalism4_0=Farmer's Diet
|
||||
m.EffectsHerbalism4_1=Improves hunger restored from herbalist foods
|
||||
m.EffectsHerbalism5_0=Double Drops (All Herbs)
|
||||
m.EffectsHerbalism5_1=Double the normal loot
|
||||
m.HerbalismGreenTerraLength=[[RED]]Green Terra Length: [[YELLOW]]{0}s
|
||||
m.HerbalismGreenThumbChance=[[RED]]Green Thumb Chance: [[YELLOW]]{0}%
|
||||
m.HerbalismGreenThumbStage=[[RED]]Green Thumb Stage: [[YELLOW]] Wheat grows in stage {0}
|
||||
m.HerbalismDoubleDropChance=[[RED]]Double Drop Chance: [[YELLOW]]{0}%
|
||||
m.HerbalismFoodPlus=[[RED]]Food+ (Rank{0}): [[YELLOW]]Bonus {0} healing
|
||||
m.HerbalismFoodPlus=[[RED]]Farmers Diet: [[YELLOW]]Rank {0}
|
||||
m.SkillExcavation=EXCAVATION
|
||||
m.XPGainExcavation=Digging and finding treasures
|
||||
m.EffectsExcavation1_0=Giga Drill Breaker (ABILITY)
|
||||
@@ -303,25 +307,15 @@ Skills.ExcavationUp=[[YELLOW]]Excavation skill increased by {0}. Total ({1})
|
||||
Skills.FeltEasy=[[GRAY]]That felt easy.
|
||||
Skills.StackedItems=[[DARK_RED]]You can't repair stacked items
|
||||
Skills.NeedMore=[[DARK_RED]]You need more
|
||||
Skills.AdeptDiamond=[[DARK_RED]]You're not skilled enough to repair Diamond
|
||||
Skills.AdeptDiamond=[[DARK_RED]]You're not skilled enough to repair Diamond.
|
||||
Skills.FullDurability=[[GRAY]]That is at full durability.
|
||||
Skills.Disarmed=[[DARK_RED]]You have been disarmed!
|
||||
mcPlayerListener.SorcerySkill=Sorcery:
|
||||
m.SkillSorcery=SORCERY
|
||||
Sorcery.HasCast=[[GREEN]]**CASTING**[[GOLD]]
|
||||
Sorcery.Current_Mana=[[DARK_AQUA]]MP
|
||||
Sorcery.SpellSelected=[[GREEN]]-=([[GOLD]]{0}[[GREEN]])=- [[RED]]([[GRAY]]{1}[[RED]])
|
||||
Sorcery.Cost=[[RED]][COST] {0} MP
|
||||
Sorcery.OOM=[[DARK_AQUA]][[[GOLD]]{2}[[DARK_AQUA]]][[DARK_GRAY]] Out Of Mana [[YELLOW]]([[RED]]{0}[[YELLOW]]/[[GRAY]]{1}[[YELLOW]])
|
||||
Sorcery.Water.Thunder=THUNDER
|
||||
Sorcery.Curative.Self=CURE SELF
|
||||
Sorcery.Curative.Other=CURE OTHER
|
||||
m.LVL=[[DARK_GRAY]]LVL: [[GREEN]]{0} [[DARK_AQUA]]XP[[YELLOW]]([[GOLD]]{1}[[YELLOW]]/[[GOLD]]{2}[[YELLOW]])
|
||||
Combat.BeastLore=[[GREEN]]**BEAST LORE**
|
||||
Combat.BeastLoreOwner=[[DARK_AQUA]]Owner ([[RED]]{0}[[DARK_AQUA]])
|
||||
Combat.BeastLoreHealthWolfTamed=[[DARK_AQUA]]Health ([[GREEN]]{0}[[DARK_AQUA]]/20)
|
||||
Combat.BeastLoreHealthWolf=[[DARK_AQUA]]Health ([[GREEN]]{0}[[DARK_AQUA]]/8)
|
||||
mcMMO.Description=[[DARK_AQUA]]Q: WHAT IS IT?,[[GOLD]]mcMMO is an [[RED]]OPEN SOURCE[[GOLD]] RPG mod for Bukkit by [[BLUE]]nossr50,[[GOLD]]There are many skills added by mcMMO to Minecraft.,[[GOLD]]You can gain experience in many different ways,[[GOLD]]You will want to type [[GREEN]]/SKILLNAME[[GOLD]] to find out more about a skill.,[[DARK_AQUA]]Q: WHAT DOES IT DO?,[[GOLD]]As an example... in [[DARK_AQUA]]Mining[[GOLD]] you will receive benefits like,[[RED]]Double Drops[[GOLD]] or the ability [[RED]]Super Breaker[[GOLD]] which when,[[GOLD]]activated by right-click allows fast Mining during its duration,[[GOLD]]which is related to your skill level. Leveling [[BLUE]]Mining,[[GOLD]]is as simple as mining precious materials!,[[DARK_AQUA]]Q: WHAT DOES THIS MEAN?,[[GOLD]]Almost all of the skills in [[GREEN]]mcMMO[[GOLD]] add cool new things!.,[[GOLD]]You can also type [[GREEN]]/{0}[[GOLD]] to find out commands,[[GOLD]]The goal of mcMMO is to provide a quality RPG experience.,[[DARK_AQUA]]Q: WHERE DO I SUGGEST NEW STUFF!?,[[GOLD]]On the mcMMO thread in the bukkit forums!,[[DARK_AQUA]]Q: HOW DO I DO THIS AND THAT?,[[RED]]PLEASE [[GOLD]]checkout the wiki! [[DARK_AQUA]]mcmmo.wikia.com
|
||||
mcMMO.Description=[[DARK_AQUA]]About the [[YELLOW]]mcMMO[[DARK_AQUA]] Project:,[[GOLD]]mcMMO is an [[RED]]open source[[GOLD]] RPG mod created in February 2011,[[GOLD]]by [[BLUE]]nossr50[[GOLD]]. The goal is to provide a quality RPG experience.,[[DARK_AQUA]]Tips:,[[GOLD]] - [[GREEN]]Use [[RED]]/mcc[[GREEN]] to see commands,[[GOLD]] - [[GREEN]]Type [[RED]]/SKILLNAME[[GREEN]] to see detailed skill info,[[DARK_AQUA]]Developers:,[[GOLD]] - [[GREEN]]TheYeti [[BLUE]](Project Lead & Developer),[[GOLD]] - [[GREEN]]NuclearW [[BLUE]](Developer),[[GOLD]] - [[GREEN]]GJ [[BLUE]](Developer),[[GOLD]] - [[GREEN]]nossr50 [[BLUE]](Developer & Creator),[[DARK_AQUA]]Useful Links:,[[GOLD]] - [[GREEN]]issues.mcmmo.org[[GOLD]] Bug Reporting,[[GOLD]] - [[GREEN]]#mcmmo @ irc.esper.net[[GOLD]] IRC Chat,[[GOLD]] - [[GREEN]]www.mcmmo.org[[GOLD]] Official Website,[[GOLD]] - [[GREEN]]http://bit.ly/x3Yvry[[GOLD]] Bukkit Forum Thread,[[GOLD]] - [[GREEN]]https://twitter.com/#!/mcmmo_dev[[GOLD]] mcMMO Twitter,[[DARK_AQUA]]Donation Info:
|
||||
Party.Locked=[[RED]]Party is locked, only party leader may invite.
|
||||
Party.IsntLocked=[[GRAY]]Party is not locked
|
||||
Party.Unlocked=[[GRAY]]Party is unlocked
|
||||
@@ -349,14 +343,8 @@ Commands.xprate.started2=[[GOLD]]mcMMO XP RATE IS NOW {0}x!!
|
||||
Commands.xplock.locked=[[GOLD]]Your XP BAR is now locked to {0}!
|
||||
Commands.xplock.unlocked=[[GOLD]]Your XP BAR is now [[GREEN]]UNLOCKED[[GOLD]]!
|
||||
Commands.xplock.invalid=[[RED]]That is not a valid skillname! Try /xplock mining
|
||||
m.SkillAlchemy=ALCHEMY
|
||||
m.SkillEnchanting=ENCHANTING
|
||||
m.SkillFishing=FISHING
|
||||
mcPlayerListener.AlchemySkill=Alchemy:
|
||||
mcPlayerListener.EnchantingSkill=Enchanting:
|
||||
mcPlayerListener.FishingSkill=Fishing:
|
||||
Skills.AlchemyUp=[[YELLOW]]Alchemy skill increased by {0}. Total ({1})
|
||||
Skills.EnchantingUp=[[YELLOW]]Enchanting skill increased by {0}. Total ({1})
|
||||
Skills.FishingUp=[[YELLOW]]Fishing skill increased by {0}. Total ({1})
|
||||
Repair.LostEnchants=[[RED]]You were not skilled enough to keep any enchantments.
|
||||
Repair.ArcanePerfect=[[GREEN]]You have sustained the arcane energies in this item.
|
||||
@@ -367,8 +355,6 @@ m.EffectsRepair5_1=Repair magic items
|
||||
m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
|
||||
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
||||
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
||||
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
||||
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
||||
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||
Fishing.ItemFound=[[GRAY]]Treasure found!
|
||||
m.SkillFishing=FISHING
|
||||
@@ -387,4 +373,45 @@ m.TamingSummon=[[GREEN]]Summoning complete
|
||||
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
|
||||
m.EffectsTaming7_0=Call of the Wild
|
||||
m.EffectsTaming7_1=Summon a wolf to your side
|
||||
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
|
||||
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
|
||||
m.EffectsTaming8_0=Fast Food Service
|
||||
m.EffectsTaming8_1=Chance for wolves to heal on attack
|
||||
m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE)
|
||||
m.AbilBonusTaming5_0=Fast Food Service
|
||||
m.AbilBonusTaming5_1=50% Chance for heal on attack
|
||||
Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]!
|
||||
m.EffectsMining3_0=Blast Mining
|
||||
m.EffectsMining3_1=Bonuses to mining with TNT
|
||||
m.EffectsMining4_0=Bigger Bombs
|
||||
m.EffectsMining4_1=Increases TNT explosion radius
|
||||
m.EffectsMining5_0=Demolitions Expertise
|
||||
m.EffectsMining5_1=Decreases damage from TNT explosions
|
||||
m.AbilLockMining1=LOCKED UNTIL 125+ SKILL (BLAST MINING)
|
||||
m.AbilLockMining2=LOCKED UNTIL 250+ SKILL (BIGGER BOMBS)
|
||||
m.AbilLockMining3=LOCKED UNTIL 500+ SKILL (DEMOLITIONS EXPERTISE)
|
||||
m.MiningBiggerBombs=[[RED]]Blast Radius Increase: [[YELLOW]]+{0}
|
||||
m.MiningDemolitionsExpertDamageDecrease=[[RED]]Demolitions Expert Damage Decrease: [[YELLOW]]{0}%
|
||||
m.MiningBlastMining=[[RED]]Blast Mining: [[YELLOW]] Rank {0} [[GRAY]]({1})
|
||||
m.BlastMining1 = +35% ore yield
|
||||
m.BlastMining2 = +40% ore yield
|
||||
m.BlastMining3 = +45% ore yield, no debris
|
||||
m.BlastMining4 = +50% ore yield, no debris
|
||||
m.BlastMining5 = +55% ore yield, no debris, double drops
|
||||
m.BlastMining6 = +60% ore yield, no debris, double drops
|
||||
m.BlastMining7 = +65% ore yield, no debris, triple drops
|
||||
m.BlastMining8 = +70% ore yield, no debris, triple drops
|
||||
Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
|
||||
Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
|
||||
Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
|
||||
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!
|
||||
Axes.GreaterImpactOnSelf=[[RED]]**HIT BY GREATER IMPACT**
|
||||
Axes.GreaterImpactOnEnemy=[[GREEN]]**STRUCK WITH GREAT FORCE**
|
||||
Skills.BerserkPlayerOff=[[RED]]Berserk[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.GreenTerraPlayerOff=[[RED]]Green Terra[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.TreeFellerPlayerOff=[[RED]]Tree Feller[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SuperBreakerPlayerOff=[[RED]]Super Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SkullSplitterPlayerOff=[[RED]]Skull Splitter[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.GigaDrillBreakerPlayerOff=[[RED]]Giga Drill Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SerratedStrikesPlayerOff=[[RED]]Serrated Strikes[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.BlastMiningPlayer=[[GREEN]]{0}[[DARK_GREEN]] has used [[RED]]Blast Mining!
|
||||
Skills.YourBlastMining=[[GREEN]]Your [[YELLOW]]Blast Mining [[GREEN]]ability is refreshed!
|
||||
@@ -27,7 +27,7 @@ m.mccMySpawn=- Teletransportate a tu lugar de nacimiento
|
||||
m.mccClearMySpawn=- Limpia tu lugar de nacimiento
|
||||
m.mccToggleAbility=- Activa/Desactiva la activacion de la habilidad con el click derecho
|
||||
m.mccAdminToggle=- Activa/Desactiva el chat de admins
|
||||
m.mccWhois=[playername] [[RED]]- Mira informacion detallada del jugador
|
||||
m.mccInspect=[playername] [[RED]]- Mira informacion detallada del jugador
|
||||
m.mccMmoedit=[playername] [skill] [newvalue] [[RED]]- Modifica el objetivo
|
||||
m.mccMcGod=- Modo dios
|
||||
m.mccSkillInfo=[skillname] [[RED]]- Mira informacion detallada sobre una habilidad
|
||||
@@ -40,7 +40,7 @@ m.AbilityBonusTemplate=[[RED]]{0}: [[YELLOW]]{1}
|
||||
m.Effects=EFECTOS
|
||||
m.YourStats=TUS ESTADISTICAS
|
||||
m.SkillTaming=DOMADURA
|
||||
m.XPGainTaming=Lobos siendo lastimados
|
||||
m.XPGainTaming=Animal Taming, or combat w/ your wolves
|
||||
m.EffectsTaming1_0=Leyenda de bestias
|
||||
m.EffectsTaming1_1=Golpear con huesos examina a los lobos
|
||||
m.EffectsTaming2_0=Sangre
|
||||
@@ -99,11 +99,19 @@ m.EffectsAxes1_0=Cortador de cabecas (HABILIDAD)
|
||||
m.EffectsAxes1_1=Causa daños en arena
|
||||
m.EffectsAxes2_0=Golpes criticos
|
||||
m.EffectsAxes2_1=Doble de daño
|
||||
m.EffectsAxes3_0=Maestria de hacha
|
||||
m.EffectsAxes3_1=Modifica el daño
|
||||
m.AbilLockAxes1=BLOQUEADO HASTA TENER HABILIDAD +500 (MAESTRIA DE HACHA)
|
||||
m.AbilBonusAxes1_0=Maestria de hacha
|
||||
m.AbilBonusAxes1_1=4 de daño de bonus
|
||||
m.EffectsAxes3_0=Axe Mastery
|
||||
m.EffectsAxes3_1=Adds bonus DMG
|
||||
m.EffectsAxes4_0=Impact
|
||||
m.EffectsAxes4_1=Strike with enough force to shatter armor
|
||||
m.EffectsAxes5_0=Greater Impact
|
||||
m.EffectsAxes5_1=Deal bonus damage to unarmored foes
|
||||
m.AbilLockAxes1=LOCKED UNTIL 500+ SKILL (AXE MASTERY)
|
||||
m.AbilBonusAxes1_0=Axe Mastery
|
||||
m.AbilBonusAxes1_1=Bonus {0} damage
|
||||
m.AbilBonusAxes2_0=Impact
|
||||
m.AbilBonusAxes2_1=Deal {0} DMG to armor
|
||||
m.AbilBonusAxes3_0=Greater Impact
|
||||
m.AbilBonusAxes3_1=Deal {0} Bonus DMG to the unarmored
|
||||
m.AxesCritChance=[[RED]]Posibilad de golpe critico: [[YELLOW]]{0}%
|
||||
m.AxesSkullLength=[[RED]]Longitud de Cortador de cabezas: [[YELLOW]]{0}s
|
||||
m.SkillSwords=ESPADAS
|
||||
@@ -161,18 +169,12 @@ m.EffectsUnarmed1_0=Enloquecer (HABILIDAD)
|
||||
m.EffectsUnarmed1_1=+50% daño, Romper materiales fragiles
|
||||
m.EffectsUnarmed2_0=Desarmar (Jugadores)
|
||||
m.EffectsUnarmed2_1=Caida del objeto de mano del enemigo
|
||||
m.EffectsUnarmed3_0=Maestro desarmado
|
||||
m.EffectsUnarmed3_1=Mejora de grandes daños
|
||||
m.EffectsUnarmed4_0=Aprendiz desarmado
|
||||
m.EffectsUnarmed4_1=Mejora de daños
|
||||
m.EffectsUnarmed3_0=Iron Arm Style
|
||||
m.EffectsUnarmed3_1=Hardens your arm over time
|
||||
m.EffectsUnarmed5_0=Desviar flechas
|
||||
m.EffectsUnarmed5_1=Desviar flechas
|
||||
m.AbilLockUnarmed1=BLOQUEADO HASTA TENER HABILIDAD +250 (APRENDIZ DESARMADO)
|
||||
m.AbilLockUnarmed2=BLOQUEADO HASTA TENER HABILIDAD +500 (MAESTRO DESARMADO)
|
||||
m.AbilBonusUnarmed1_0=Aprendiz desarmado
|
||||
m.AbilBonusUnarmed1_1=Mejora de +2 de daño
|
||||
m.AbilBonusUnarmed2_0=Maestro desarmado
|
||||
m.AbilBonusUnarmed2_1=Mejora de +4 de daño
|
||||
m.AbilBonusUnarmed2_0=Iron Arm Style
|
||||
m.AbilBonusUnarmed2_1=+{0} DMG Upgrade
|
||||
m.UnarmedArrowDeflectChance=[[RED]]Posibilidad de Desviar flechas: [[YELLOW]]{0}%
|
||||
m.UnarmedDisarmChance=[[RED]]Posibilidad de Desarmar: [[YELLOW]]{0}%
|
||||
m.UnarmedBerserkLength=[[RED]]Posibilidad de Enloquecer: [[YELLOW]]{0}s
|
||||
@@ -184,15 +186,15 @@ m.EffectsHerbalism2_0=Dedos verdes (Trigo)
|
||||
m.EffectsHerbalism2_1=Autoplanta el trigo al recolectarlo
|
||||
m.EffectsHerbalism3_0=Dedos verdes (Piedras)
|
||||
m.EffectsHerbalism3_1=Transorma Cobblestone en Moss Stone (usa semillas)
|
||||
m.EffectsHerbalism4_0=+ Comida
|
||||
m.EffectsHerbalism4_1=Modifica la vida recivida por el pan/guiso
|
||||
m.EffectsHerbalism4_0=Farmer's Diet
|
||||
m.EffectsHerbalism4_1=Improves hunger restored from herbalist foods
|
||||
m.EffectsHerbalism5_0=Doble beneficio (Todas las hierbas)
|
||||
m.EffectsHerbalism5_1=Dobla el botin normal
|
||||
m.HerbalismGreenTerraLength=[[RED]]Duracion de Tierra verde: [[YELLOW]]{0}s
|
||||
m.HerbalismGreenThumbChance=[[RED]]Posibilidad de Dedos verdes: [[YELLOW]]{0}%
|
||||
m.HerbalismGreenThumbStage=[[RED]]Etapa de Dedos verdes: [[YELLOW]] El Trigo crece en la etapa {0}
|
||||
m.HerbalismDoubleDropChance=[[RED]]Posibilidad de Doble beneficio: [[YELLOW]]{0}%
|
||||
m.HerbalismFoodPlus=[[RED]]+ Comida (Rank{0}): [[YELLOW]]{0} de Bonus de Curacion
|
||||
m.HerbalismFoodPlus=[[RED]]Farmers Diet: [[YELLOW]]Rank {0}
|
||||
m.SkillExcavation=EXCAVACION
|
||||
m.XPGainExcavation=Excavar y encontrar tesoros
|
||||
m.EffectsExcavation1_0=Ultra perforador (HABILIDAD)
|
||||
@@ -306,22 +308,12 @@ Skills.NeedMore=[[DARK_RED]]Necesitas mas
|
||||
Skills.AdeptDiamond=[[DARK_RED]]No tienes habilidades suficientes para reparar Diamante
|
||||
Skills.FullDurability=[[GRAY]]Esto esta a su maxima duracion
|
||||
Skills.Disarmed=[[DARK_RED]]Has sido desarmado!
|
||||
mcPlayerListener.SorcerySkill=Hechiceria:
|
||||
m.SkillSorcery=HECHICERIA
|
||||
Sorcery.HasCast=[[GREEN]]**FUNDICION**[[GOLD]]
|
||||
Sorcery.Current_Mana=[[DARK_AQUA]]MP
|
||||
Sorcery.SpellSelected=[[GREEN]]-=([[GOLD]]{0}[[GREEN]])=- [[RED]]([[GRAY]]{1}[[RED]])
|
||||
Sorcery.Cost=[[RED]][COST] {0} MP
|
||||
Sorcery.OOM=[[DARK_AQUA]][[[GOLD]]{2}[[DARK_AQUA]]][[DARK_GRAY]] Sin Mana [[YELLOW]]([[RED]]{0}[[YELLOW]]/[[GRAY]]{1}[[YELLOW]])
|
||||
Sorcery.Water.Thunder=TRUENO
|
||||
Sorcery.Curative.Self=CURARSE A SI MISMO
|
||||
Sorcery.Curative.Other=CURAR A OTRO
|
||||
m.LVL=[[DARK_GRAY]]LVL: [[GREEN]]{0} [[DARK_AQUA]]EXP[[YELLOW]]([[GOLD]]{1}[[YELLOW]]/[[GOLD]]{2}[[YELLOW]])
|
||||
Combat.BeastLore=[[GREEN]]**LEYENDA DE BESTIAS**
|
||||
Combat.BeastLoreOwner=[[DARK_AQUA]]Dueño ([[RED]]{0}[[DARK_AQUA]])
|
||||
Combat.BeastLoreHealthWolfTamed=[[DARK_AQUA]]Salud ([[GREEN]]{0}[[DARK_AQUA]]/20)
|
||||
Combat.BeastLoreHealthWolf=[[DARK_AQUA]]Salud ([[GREEN]]{0}[[DARK_AQUA]]/8)
|
||||
mcMMO.Description=[[DARK_AQUA]]Q: QUE ES ESTO?,[[GOLD]]mcMMO es un MOD de [[RED]]CODIGO LIBRE[[GOLD]] para Bukkit por [[BLUE]]nossr50,[[GOLD]]Hay muchas habilidades añadidas por mcMMO para Minecraft.,[[GOLD]]Puedes ganar experiencia de muchas formas diferentes,[[GOLD]]Tu querras escribir [[GREEN]]/SKILLNAME[[GOLD]] para saber mas sobre una habilidad.,[[DARK_AQUA]]Q: QUE HACE?,[[GOLD]]Por ejemplo... en [[DARK_AQUA]]Mineria[[GOLD]] recibiras recompensas como,[[RED]]Doble beneficio[[GOLD]] o la habilidad [[RED]]Super Rompedor[[GOLD]] que cuando[[GOLD]] se activa con el click derecho permite la Mineria durante su duracion,[[GOLD]]que esta relacionado con tu nivel de habilidad. Subiendo de nivel en [[BLUE]]Mineria,[[GOLD]]es tan sencillo como minar simples materiales!
|
||||
mcMMO.Description=[[DARK_AQUA]]About the [[YELLOW]]mcMMO[[DARK_AQUA]] Project:,[[GOLD]]mcMMO is an [[RED]]open source[[GOLD]] RPG mod created in February 2011,[[GOLD]]by [[BLUE]]nossr50[[GOLD]]. The goal is to provide a quality RPG experience.,[[DARK_AQUA]]Tips:,[[GOLD]] - [[GREEN]]Use [[RED]]/mcc[[GREEN]] to see commands,[[GOLD]] - [[GREEN]]Type [[RED]]/SKILLNAME[[GREEN]] to see detailed skill info,[[DARK_AQUA]]Developers:,[[GOLD]] - [[GREEN]]TheYeti [[BLUE]](Project Lead & Developer),[[GOLD]] - [[GREEN]]NuclearW [[BLUE]](Developer),[[GOLD]] - [[GREEN]]GJ [[BLUE]](Developer),[[GOLD]] - [[GREEN]]nossr50 [[BLUE]](Developer & Creator),[[DARK_AQUA]]Useful Links:,[[GOLD]] - [[GREEN]]issues.mcmmo.org[[GOLD]] Bug Reporting,[[GOLD]] - [[GREEN]]#mcmmo @ irc.esper.net[[GOLD]] IRC Chat,[[GOLD]] - [[GREEN]]www.mcmmo.org[[GOLD]] Official Website,[[GOLD]] - [[GREEN]]http://bit.ly/x3Yvry[[GOLD]] Bukkit Forum Thread,[[GOLD]] - [[GREEN]]https://twitter.com/#!/mcmmo_dev[[GOLD]] mcMMO Twitter,[[DARK_AQUA]]Donation Info:
|
||||
Party.Locked=[[RED]]La fiesta esta bloqueda, solo el lider puede invitarte
|
||||
Party.IsntLocked=[[GRAY]]La fiesta no esta bloqueada
|
||||
Party.Unlocked=[[GRAY]]La fiesta esta desbloqueada
|
||||
@@ -349,14 +341,8 @@ Commands.xprate.started2=[[GOLD]]mcMMO XP RATE ES AHORA {0}x!!
|
||||
Commands.xplock.locked=[[GOLD]]Tu BARRA DE EXP esta bloqueada a {0}!
|
||||
Commands.xplock.unlocked=[[GOLD]]Tu BARRA DE EXP esta ahora [[GREEN]]DESBLOQUEADA[[GOLD]]!
|
||||
Commands.xplock.invalid=[[RED]]Ese no es un nombre de habilidad valido! Try /xplock mining
|
||||
m.SkillAlchemy=ALCHEMY
|
||||
m.SkillEnchanting=ENCHANTING
|
||||
m.SkillFishing=FISHING
|
||||
mcPlayerListener.AlchemySkill=Alchemy:
|
||||
mcPlayerListener.EnchantingSkill=Enchanting:
|
||||
mcPlayerListener.FishingSkill=Fishing:
|
||||
Skills.AlchemyUp=[[YELLOW]]Alchemy skill increased by {0}. Total ({1})
|
||||
Skills.EnchantingUp=[[YELLOW]]Enchanting skill increased by {0}. Total ({1})
|
||||
Skills.FishingUp=[[YELLOW]]Fishing skill increased by {0}. Total ({1})
|
||||
Repair.LostEnchants=[[RED]]You were not skilled enough to keep any enchantments.
|
||||
Repair.ArcanePerfect=[[GREEN]]You have sustained the arcane energies in this item.
|
||||
@@ -367,8 +353,6 @@ m.EffectsRepair5_1=Repair magic items
|
||||
m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
|
||||
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
||||
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
||||
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
||||
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
||||
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||
Fishing.ItemFound=[[GRAY]]Treasure found!
|
||||
m.SkillFishing=FISHING
|
||||
@@ -387,4 +371,45 @@ m.TamingSummon=[[GREEN]]Summoning complete
|
||||
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
|
||||
m.EffectsTaming7_0=Call of the Wild
|
||||
m.EffectsTaming7_1=Summon a wolf to your side
|
||||
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
|
||||
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
|
||||
m.EffectsTaming8_0=Fast Food Service
|
||||
m.EffectsTaming8_1=Chance for wolves to heal on attack
|
||||
m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE)
|
||||
m.AbilBonusTaming5_0=Fast Food Service
|
||||
m.AbilBonusTaming5_1=50% Chance for heal on attack
|
||||
Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]!
|
||||
m.EffectsMining3_0=Blast Mining
|
||||
m.EffectsMining3_1=Bonuses to mining with TNT
|
||||
m.EffectsMining4_0=Bigger Bombs
|
||||
m.EffectsMining4_1=Increases TNT explosion radius
|
||||
m.EffectsMining5_0=Demolitions Expertise
|
||||
m.EffectsMining5_1=Decreases damage from TNT explosions
|
||||
m.AbilLockMining1=LOCKED UNTIL 125+ SKILL (BLAST MINING)
|
||||
m.AbilLockMining2=LOCKED UNTIL 250+ SKILL (BIGGER BOMBS)
|
||||
m.AbilLockMining3=LOCKED UNTIL 500+ SKILL (DEMOLITIONS EXPERTISE)
|
||||
m.MiningBiggerBombs=[[RED]]Blast Radius Increase: [[YELLOW]]+{0}
|
||||
m.MiningDemolitionsExpertDamageDecrease=[[RED]]Demolitions Expert Damage Decrease: [[YELLOW]]{0}%
|
||||
m.MiningBlastMining=[[RED]]Blast Mining: [[YELLOW]] Rank {0} [[GRAY]]({1})
|
||||
m.BlastMining1 = +35% ore yield
|
||||
m.BlastMining2 = +40% ore yield
|
||||
m.BlastMining3 = +45% ore yield, no debris
|
||||
m.BlastMining4 = +50% ore yield, no debris
|
||||
m.BlastMining5 = +55% ore yield, no debris, double drops
|
||||
m.BlastMining6 = +60% ore yield, no debris, double drops
|
||||
m.BlastMining7 = +65% ore yield, no debris, triple drops
|
||||
m.BlastMining8 = +70% ore yield, no debris, triple drops
|
||||
Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
|
||||
Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
|
||||
Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
|
||||
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!
|
||||
Axes.GreaterImpactOnSelf=[[RED]]**HIT BY GREATER IMPACT**
|
||||
Axes.GreaterImpactOnEnemy=[[GREEN]]**STRUCK WITH GREAT FORCE**
|
||||
Skills.BerserkPlayerOff=[[RED]]Berserk[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.GreenTerraPlayerOff=[[RED]]Green Terra[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.TreeFellerPlayerOff=[[RED]]Tree Feller[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SuperBreakerPlayerOff=[[RED]]Super Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SkullSplitterPlayerOff=[[RED]]Skull Splitter[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.GigaDrillBreakerPlayerOff=[[RED]]Giga Drill Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SerratedStrikesPlayerOff=[[RED]]Serrated Strikes[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.BlastMiningPlayer=[[GREEN]]{0}[[DARK_GREEN]] has used [[RED]]Blast Mining!
|
||||
Skills.YourBlastMining=[[GREEN]]Your [[YELLOW]]Blast Mining [[GREEN]]ability is refreshed!
|
||||
@@ -27,7 +27,7 @@ m.mccMySpawn=- Siirt
|
||||
m.mccClearMySpawn=- Tyhjää myspawnisi
|
||||
m.mccToggleAbility=- Laita taitojen aktivointi oikealla näppäimellä päälle/pois
|
||||
m.mccAdminToggle=- Laita admin juttelu päälle/pois
|
||||
m.mccWhois=[playername] [[RED]]- Näytä yksityiskohtaiset tiedot pelaajasta
|
||||
m.mccInspect=[playername] [[RED]]- Näytä yksityiskohtaiset tiedot pelaajasta
|
||||
m.mccMmoedit=[playername] [skill] [newvalue] [[RED]]- Muokkaa kohdetta
|
||||
m.mccMcGod=- "God Mode"
|
||||
m.mccSkillInfo=[skillname] [[RED]]- Näytä ykistyiskohtaiset tiedot taidosta
|
||||
@@ -40,7 +40,7 @@ m.AbilityBonusTemplate=[[RED]]{0}: [[YELLOW]]{1}
|
||||
m.Effects=EFEKTIT
|
||||
m.YourStats=TILASTOSI
|
||||
m.SkillTaming=KESYTTÄMINEN
|
||||
m.XPGainTaming=Susien satuttaminen
|
||||
m.XPGainTaming=Animal Taming, or combat w/ your wolves
|
||||
m.EffectsTaming1_0=Pedon Tarina
|
||||
m.EffectsTaming1_1=Luulla lyöminen tutkii susia
|
||||
m.EffectsTaming2_0=Pisto
|
||||
@@ -99,11 +99,19 @@ m.EffectsAxes1_0=Kallonhalkoja (TAITO)
|
||||
m.EffectsAxes1_1=Tee aluevahinkoa
|
||||
m.EffectsAxes2_0=Kriittiset Iskut
|
||||
m.EffectsAxes2_1=Tuplavahinko
|
||||
m.EffectsAxes3_0=Kirveiden Herra (500 TAITO)
|
||||
m.EffectsAxes3_1=Muokkaa vahinkoa
|
||||
m.AbilLockAxes1=LUKITTU KUNNES 500+ TAITO (KIRVEIDEN HERRA)
|
||||
m.AbilBonusAxes1_0=Kirveiden Herra
|
||||
m.AbilBonusAxes1_1=+4 Vahinko
|
||||
m.EffectsAxes3_0=Axe Mastery
|
||||
m.EffectsAxes3_1=Adds bonus DMG
|
||||
m.EffectsAxes4_0=Impact
|
||||
m.EffectsAxes4_1=Strike with enough force to shatter armor
|
||||
m.EffectsAxes5_0=Greater Impact
|
||||
m.EffectsAxes5_1=Deal bonus damage to unarmored foes
|
||||
m.AbilLockAxes1=LOCKED UNTIL 500+ SKILL (AXE MASTERY)
|
||||
m.AbilBonusAxes1_0=Axe Mastery
|
||||
m.AbilBonusAxes1_1=Bonus {0} damage
|
||||
m.AbilBonusAxes2_0=Impact
|
||||
m.AbilBonusAxes2_1=Deal {0} DMG to armor
|
||||
m.AbilBonusAxes3_0=Greater Impact
|
||||
m.AbilBonusAxes3_1=Deal {0} Bonus DMG to the unarmored
|
||||
m.AxesCritChance=[[RED]]Todennäköisyys iskeä kriittisesti: [[YELLOW]]{0}%
|
||||
m.AxesSkullLength=[[RED]]Kallonhalkojan kesto: [[YELLOW]]{0}s
|
||||
m.SkillSwords=MIEKAT
|
||||
@@ -161,18 +169,12 @@ m.EffectsUnarmed1_0=Raivop
|
||||
m.EffectsUnarmed1_1=+50% vahinko, rikkoo heikkoja materiaaleja
|
||||
m.EffectsUnarmed2_0=Aseista riisuminen (Pelaajat)
|
||||
m.EffectsUnarmed2_1=Pudottaa vihollisen esineen kädestä
|
||||
m.EffectsUnarmed3_0=Aseistamattomuuden Herra
|
||||
m.EffectsUnarmed3_1=Suuri vahingonlisäys
|
||||
m.EffectsUnarmed4_0=Aseistamattomuuden Aloittelija
|
||||
m.EffectsUnarmed4_1=Vahingonlisäys
|
||||
m.EffectsUnarmed3_0=Iron Arm Style
|
||||
m.EffectsUnarmed3_1=Hardens your arm over time
|
||||
m.EffectsUnarmed5_0=Nuolentorjunta
|
||||
m.EffectsUnarmed5_1=Torjuu nuolia
|
||||
m.AbilLockUnarmed1=LUKITTU KUNNES 250+ TAITO (ASEISTAMATTOMUUDEN ALOITTELIJA)
|
||||
m.AbilLockUnarmed2=LUKITTU KUNNES 500+ TAITO (ASEISTAMATTOMUUDEN HERRA)
|
||||
m.AbilBonusUnarmed1_0=Aseistamattomuuden Aloittelija
|
||||
m.AbilBonusUnarmed1_1=+2 Vahinko
|
||||
m.AbilBonusUnarmed2_0=Aseistamattomuuden Herra
|
||||
m.AbilBonusUnarmed2_1=+4 Vahinko
|
||||
m.AbilBonusUnarmed2_0=Iron Arm Style
|
||||
m.AbilBonusUnarmed2_1=+{0} DMG Upgrade
|
||||
m.UnarmedArrowDeflectChance=[[RED]]Nuolentorjunnan todennäköisyys: [[YELLOW]]{0}%
|
||||
m.UnarmedDisarmChance=[[RED]]Aseista riisumisen todennäköisyys: [[YELLOW]]{0}%
|
||||
m.UnarmedBerserkLength=[[RED]]Raivopään kesto: [[YELLOW]]{0}s
|
||||
@@ -184,15 +186,15 @@ m.EffectsHerbalism2_0=Viherpeukalo (Vehn
|
||||
m.EffectsHerbalism2_1=Istuttaa vehnää automaattisesti kun keräät vehnää
|
||||
m.EffectsHerbalism3_0=Viherpeukalo (Mukulakivi)
|
||||
m.EffectsHerbalism3_1=Mukulakivi -> Sammaleinen mukulakivi ja siemeniä
|
||||
m.EffectsHerbalism4_0=Ruoka+
|
||||
m.EffectsHerbalism4_1=Muokkaa terveyttä jota saat leivästä/muhennoksesta
|
||||
m.EffectsHerbalism4_0=Farmer's Diet
|
||||
m.EffectsHerbalism4_1=Improves hunger restored from herbalist foods
|
||||
m.EffectsHerbalism5_0=Tuplasaalis (Kaikki yrtit)
|
||||
m.EffectsHerbalism5_1=Tuplaa normaali saaliin määrä
|
||||
m.HerbalismGreenTerraLength=[[RED]]Vihermaan kesto: [[YELLOW]]{0}s
|
||||
m.HerbalismGreenThumbChance=[[RED]]Viherpeukalon todennäköisyys: [[YELLOW]]{0}%
|
||||
m.HerbalismGreenThumbStage=[[RED]]Viherpeukalon vaihe: [[YELLOW]] Vehnä kasvaa {0}:ssa vaiheessa
|
||||
m.HerbalismDoubleDropChance=[[RED]]Tuplasaaliin todennäköisyys: [[YELLOW]]{0}%
|
||||
m.HerbalismFoodPlus=[[RED]]Ruoka+ (Rank{0}): [[YELLOW]]Bonus {0} terveyden määrä
|
||||
m.HerbalismFoodPlus=[[RED]]Farmers Diet: [[YELLOW]]Rank {0}
|
||||
m.SkillExcavation=KAIVANTO
|
||||
m.XPGainExcavation=Kaivamalla ja löytämällä aarteita
|
||||
m.EffectsExcavation1_0=Giga Drill Breaker (TAITO)
|
||||
@@ -300,7 +302,7 @@ Skills.MiningUp=[[YELLOW]]Mining skill increased by {0}. Total ({1})
|
||||
Skills.WoodcuttingUp=[[YELLOW]]Woodcutting skill increased by {0}. Total ({1})
|
||||
Skills.RepairUp=[[YELLOW]]Repair skill increased by {0}. Total ({1})
|
||||
Skills.ExcavationUp=[[YELLOW]]Excavation skill increased by {0}. Total ({1})
|
||||
mcMMO.Description=[[DARK_AQUA]]Q: WHAT IS IT?,[[GOLD]]mcMMO is an [[RED]]OPEN SOURCE[[GOLD]] RPG mod for Bukkit by [[BLUE]]nossr50,[[GOLD]]There are many skills added by mcMMO to Minecraft.,[[GOLD]]You can gain experience in many different ways,[[GOLD]]You will want to type [[GREEN]]/SKILLNAME[[GOLD]] to find out more about a skill.,[[DARK_AQUA]]Q: WHAT DOES IT DO?,[[GOLD]]As an example... in [[DARK_AQUA]]Mining[[GOLD]] you will receive benefits like,[[RED]]Double Drops[[GOLD]] or the ability [[RED]]Super Breaker[[GOLD]] which when,[[GOLD]]activated by right-click allows fast Mining during its duration,[[GOLD]]which is related to your skill level. Leveling [[BLUE]]Mining,[[GOLD]]is as simple as mining precious materials!,[[DARK_AQUA]]Q: WHAT DOES THIS MEAN?,[[GOLD]]Almost all of the skills in [[GREEN]]mcMMO[[GOLD]] add cool new things!.,[[GOLD]]You can also type [[GREEN]]/{0}[[GOLD]] to find out commands,[[GOLD]]The goal of mcMMO is to provide a quality RPG experience.,[[DARK_AQUA]]Q: WHERE DO I SUGGEST NEW STUFF!?,[[GOLD]]On the mcMMO thread in the bukkit forums!,[[DARK_AQUA]]Q: HOW DO I DO THIS AND THAT?,[[RED]]PLEASE [[GOLD]]checkout the wiki! [[DARK_AQUA]]mcmmo.wikia.com
|
||||
mcMMO.Description=[[DARK_AQUA]]About the [[YELLOW]]mcMMO[[DARK_AQUA]] Project:,[[GOLD]]mcMMO is an [[RED]]open source[[GOLD]] RPG mod created in February 2011,[[GOLD]]by [[BLUE]]nossr50[[GOLD]]. The goal is to provide a quality RPG experience.,[[DARK_AQUA]]Tips:,[[GOLD]] - [[GREEN]]Use [[RED]]/mcc[[GREEN]] to see commands,[[GOLD]] - [[GREEN]]Type [[RED]]/SKILLNAME[[GREEN]] to see detailed skill info,[[DARK_AQUA]]Developers:,[[GOLD]] - [[GREEN]]TheYeti [[BLUE]](Project Lead & Developer),[[GOLD]] - [[GREEN]]NuclearW [[BLUE]](Developer),[[GOLD]] - [[GREEN]]GJ [[BLUE]](Developer),[[GOLD]] - [[GREEN]]nossr50 [[BLUE]](Developer & Creator),[[DARK_AQUA]]Useful Links:,[[GOLD]] - [[GREEN]]issues.mcmmo.org[[GOLD]] Bug Reporting,[[GOLD]] - [[GREEN]]#mcmmo @ irc.esper.net[[GOLD]] IRC Chat,[[GOLD]] - [[GREEN]]www.mcmmo.org[[GOLD]] Official Website,[[GOLD]] - [[GREEN]]http://bit.ly/x3Yvry[[GOLD]] Bukkit Forum Thread,[[GOLD]] - [[GREEN]]https://twitter.com/#!/mcmmo_dev[[GOLD]] mcMMO Twitter,[[DARK_AQUA]]Donation Info:
|
||||
Party.Locked=[[RED]]Party is locked, only party leader may invite.
|
||||
Party.IsntLocked=[[GRAY]]Party is not locked
|
||||
Party.Unlocked=[[GRAY]]Party is unlocked
|
||||
@@ -328,14 +330,8 @@ Commands.xprate.started2=[[GOLD]]mcMMO XP RATE IS NOW {0}x!!
|
||||
Commands.xplock.locked=[[GOLD]]Your XP BAR is now locked to {0}!
|
||||
Commands.xplock.unlocked=[[GOLD]]Your XP BAR is now [[GREEN]]UNLOCKED[[GOLD]]!
|
||||
Commands.xplock.invalid=[[RED]]That is not a valid skillname! Try /xplock mining
|
||||
m.SkillAlchemy=ALCHEMY
|
||||
m.SkillEnchanting=ENCHANTING
|
||||
m.SkillFishing=FISHING
|
||||
mcPlayerListener.AlchemySkill=Alchemy:
|
||||
mcPlayerListener.EnchantingSkill=Enchanting:
|
||||
m.SkillFishing=FISHING
|
||||
mcPlayerListener.FishingSkill=Fishing:
|
||||
Skills.AlchemyUp=[[YELLOW]]Alchemy skill increased by {0}. Total ({1})
|
||||
Skills.EnchantingUp=[[YELLOW]]Enchanting skill increased by {0}. Total ({1})
|
||||
Skills.FishingUp=[[YELLOW]]Fishing skill increased by {0}. Total ({1})
|
||||
Repair.LostEnchants=[[RED]]You were not skilled enough to keep any enchantments.
|
||||
Repair.ArcanePerfect=[[GREEN]]You have sustained the arcane energies in this item.
|
||||
@@ -346,8 +342,6 @@ m.EffectsRepair5_1=Repair magic items
|
||||
m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
|
||||
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
||||
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
||||
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
||||
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
||||
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||
Fishing.ItemFound=[[GRAY]]Treasure found!
|
||||
m.SkillFishing=FISHING
|
||||
@@ -366,4 +360,45 @@ m.TamingSummon=[[GREEN]]Summoning complete
|
||||
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
|
||||
m.EffectsTaming7_0=Call of the Wild
|
||||
m.EffectsTaming7_1=Summon a wolf to your side
|
||||
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
|
||||
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
|
||||
m.EffectsTaming8_0=Fast Food Service
|
||||
m.EffectsTaming8_1=Chance for wolves to heal on attack
|
||||
m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE)
|
||||
m.AbilBonusTaming5_0=Fast Food Service
|
||||
m.AbilBonusTaming5_1=50% Chance for heal on attack
|
||||
Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]!
|
||||
m.EffectsMining3_0=Blast Mining
|
||||
m.EffectsMining3_1=Bonuses to mining with TNT
|
||||
m.EffectsMining4_0=Bigger Bombs
|
||||
m.EffectsMining4_1=Increases TNT explosion radius
|
||||
m.EffectsMining5_0=Demolitions Expertise
|
||||
m.EffectsMining5_1=Decreases damage from TNT explosions
|
||||
m.AbilLockMining1=LOCKED UNTIL 125+ SKILL (BLAST MINING)
|
||||
m.AbilLockMining2=LOCKED UNTIL 250+ SKILL (BIGGER BOMBS)
|
||||
m.AbilLockMining3=LOCKED UNTIL 500+ SKILL (DEMOLITIONS EXPERTISE)
|
||||
m.MiningBiggerBombs=[[RED]]Blast Radius Increase: [[YELLOW]]+{0}
|
||||
m.MiningDemolitionsExpertDamageDecrease=[[RED]]Demolitions Expert Damage Decrease: [[YELLOW]]{0}%
|
||||
m.MiningBlastMining=[[RED]]Blast Mining: [[YELLOW]] Rank {0} [[GRAY]]({1})
|
||||
m.BlastMining1 = +35% ore yield
|
||||
m.BlastMining2 = +40% ore yield
|
||||
m.BlastMining3 = +45% ore yield, no debris
|
||||
m.BlastMining4 = +50% ore yield, no debris
|
||||
m.BlastMining5 = +55% ore yield, no debris, double drops
|
||||
m.BlastMining6 = +60% ore yield, no debris, double drops
|
||||
m.BlastMining7 = +65% ore yield, no debris, triple drops
|
||||
m.BlastMining8 = +70% ore yield, no debris, triple drops
|
||||
Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
|
||||
Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
|
||||
Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
|
||||
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!
|
||||
Axes.GreaterImpactOnSelf=[[RED]]**HIT BY GREATER IMPACT**
|
||||
Axes.GreaterImpactOnEnemy=[[GREEN]]**STRUCK WITH GREAT FORCE**
|
||||
Skills.BerserkPlayerOff=[[RED]]Berserk[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.GreenTerraPlayerOff=[[RED]]Green Terra[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.TreeFellerPlayerOff=[[RED]]Tree Feller[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SuperBreakerPlayerOff=[[RED]]Super Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SkullSplitterPlayerOff=[[RED]]Skull Splitter[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.GigaDrillBreakerPlayerOff=[[RED]]Giga Drill Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SerratedStrikesPlayerOff=[[RED]]Serrated Strikes[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.BlastMiningPlayer=[[GREEN]]{0}[[DARK_GREEN]] has used [[RED]]Blast Mining!
|
||||
Skills.YourBlastMining=[[GREEN]]Your [[YELLOW]]Blast Mining [[GREEN]]ability is refreshed!
|
||||
@@ -27,7 +27,7 @@ m.mccMySpawn=- Vous t
|
||||
m.mccClearMySpawn=- Éfface votre point de spawn
|
||||
m.mccToggleAbility=- Active les capacités spéciales avec clic droit
|
||||
m.mccAdminToggle=- Active le chat admin
|
||||
m.mccWhois=[playername] [[RED]]- Voir les infos détaillées du joueur
|
||||
m.mccInspect=[playername] [[RED]]- Voir les infos détaillées du joueur
|
||||
m.mccMmoedit=[playername] [skill] [newvalue] [[RED]]- Modifier
|
||||
m.mccMcGod=- Mode dieu
|
||||
m.mccSkillInfo=[skillname] [[RED]]- Afficher des informations détaillées d'une compétence
|
||||
@@ -40,7 +40,7 @@ m.AbilityBonusTemplate=[[RED]]{0}: [[YELLOW]]{1}
|
||||
m.Effects=EFFETS
|
||||
m.YourStats=VOS STATS
|
||||
m.SkillTaming=DRESSAGE
|
||||
m.XPGainTaming=Attaquer avec un loup
|
||||
m.XPGainTaming=Animal Taming, or combat w/ your wolves
|
||||
m.EffectsTaming1_0=Connaissance des bêtes
|
||||
m.EffectsTaming1_1=Inspecte un loup avec un os
|
||||
m.EffectsTaming2_0=Morsures
|
||||
@@ -99,11 +99,19 @@ m.EffectsAxes1_0=Fendeur de cr
|
||||
m.EffectsAxes1_1=provoque des dégâts de zone
|
||||
m.EffectsAxes2_0=Coup critiques
|
||||
m.EffectsAxes2_1=double les dégâts
|
||||
m.EffectsAxes3_0=Maîtrise de la hache (niveau 500)
|
||||
m.EffectsAxes3_1=Augmente les dégâts
|
||||
m.AbilLockAxes1=Débloqué au niveau 500 (Maîtrise de la hache)
|
||||
m.AbilBonusAxes1_0=Maîtrise de la hache
|
||||
m.AbilBonusAxes1_1=4 Blessures en bonus
|
||||
m.EffectsAxes3_0=Axe Mastery
|
||||
m.EffectsAxes3_1=Adds bonus DMG
|
||||
m.EffectsAxes4_0=Impact
|
||||
m.EffectsAxes4_1=Strike with enough force to shatter armor
|
||||
m.EffectsAxes5_0=Greater Impact
|
||||
m.EffectsAxes5_1=Deal bonus damage to unarmored foes
|
||||
m.AbilLockAxes1=LOCKED UNTIL 500+ SKILL (AXE MASTERY)
|
||||
m.AbilBonusAxes1_0=Axe Mastery
|
||||
m.AbilBonusAxes1_1=Bonus {0} damage
|
||||
m.AbilBonusAxes2_0=Impact
|
||||
m.AbilBonusAxes2_1=Deal {0} DMG to armor
|
||||
m.AbilBonusAxes3_0=Greater Impact
|
||||
m.AbilBonusAxes3_1=Deal {0} Bonus DMG to the unarmored
|
||||
m.AxesCritChance=[[RED]]Chances de coup critique : [[YELLOW]]{0}%
|
||||
m.AxesSkullLength=[[RED]]Durée de votre capacité spéciale : [[YELLOW]]{0}s
|
||||
m.SkillSwords=ÉPÉE
|
||||
@@ -161,18 +169,12 @@ m.EffectsUnarmed1_0=Berserk (capacit
|
||||
m.EffectsUnarmed1_1=+50% de dégâts, brise les matériaux faibles
|
||||
m.EffectsUnarmed2_0=Désarmer (les joueurs)
|
||||
m.EffectsUnarmed2_1=Vole l'objet que l'ennemi a dans la main
|
||||
m.EffectsUnarmed3_0=Apprenti du désarmement
|
||||
m.EffectsUnarmed3_1=Plus de dégâts
|
||||
m.EffectsUnarmed4_0=Maîtrise du désarmement
|
||||
m.EffectsUnarmed4_1=Beaucoup plus de dégâts
|
||||
m.EffectsUnarmed3_0=Iron Arm Style
|
||||
m.EffectsUnarmed3_1=Hardens your arm over time
|
||||
m.EffectsUnarmed5_0=Déviation des flèches
|
||||
m.EffectsUnarmed5_1=Dévie les flèches qui vous foncent dessus
|
||||
m.AbilLockUnarmed1=Débloqué au niveau 250 (Apprenti du désarmement)
|
||||
m.AbilLockUnarmed2=Débloqué au niveau 500 (Maîtrise du désarmement)
|
||||
m.AbilBonusUnarmed1_0=Apprenti du désarmement
|
||||
m.AbilBonusUnarmed1_1=+2 dégâts
|
||||
m.AbilBonusUnarmed2_0=Maîtrise du désarmement
|
||||
m.AbilBonusUnarmed2_1=+4 dégâts
|
||||
m.AbilBonusUnarmed2_0=Iron Arm Style
|
||||
m.AbilBonusUnarmed2_1=+{0} DMG Upgrade
|
||||
m.UnarmedArrowDeflectChance=[[RED]]Chances dévier les flèches : [[YELLOW]]{0}%
|
||||
m.UnarmedDisarmChance=[[RED]]Chances de Désarmer : [[YELLOW]]{0}%
|
||||
m.UnarmedBerserkLength=[[RED]]Durée de votre capacité spéciale : [[YELLOW]]{0}s
|
||||
@@ -184,15 +186,15 @@ m.EffectsHerbalism2_0=Main verte (Bl
|
||||
m.EffectsHerbalism2_1=Auto-plantes du blé lors de la récolte
|
||||
m.EffectsHerbalism3_0=Main verte (Cobblestone)
|
||||
m.EffectsHerbalism3_1=Transforme la Cobble en Mossy avec des graines
|
||||
m.EffectsHerbalism4_0=Nouriture+
|
||||
m.EffectsHerbalism4_1=Modifie la santé reçue via le pain / ragoût
|
||||
m.EffectsHerbalism4_0=Farmer's Diet
|
||||
m.EffectsHerbalism4_1=Improves hunger restored from herbalist foods
|
||||
m.EffectsHerbalism5_0=Double butin (Toutes cultures)
|
||||
m.EffectsHerbalism5_1=Double les récoltes
|
||||
m.HerbalismGreenTerraLength=[[RED]]Durée de la capacité spéciale : [[YELLOW]]{0}s
|
||||
m.HerbalismGreenThumbChance=[[RED]]Cances d'obtenir la main verte : [[YELLOW]]{0}%
|
||||
m.HerbalismGreenThumbStage=[[RED]]Main verte par niveaux : [[YELLOW]] Wheat grows in stage {0}
|
||||
m.HerbalismDoubleDropChance=[[RED]]Chances du Double Butin : [[YELLOW]]{0}%
|
||||
m.HerbalismFoodPlus=[[RED]]Nourriture+ (Rang {0}): [[YELLOW]]{0} plus nourissant
|
||||
m.HerbalismFoodPlus=[[RED]]Farmers Diet: [[YELLOW]]Rank {0}
|
||||
m.SkillExcavation=EXCAVATION
|
||||
m.XPGainExcavation=Creuser et trouver des trésors
|
||||
m.EffectsExcavation1_0=Super broyeur (capacité spéciale)
|
||||
@@ -306,22 +308,12 @@ Skills.NeedMore=[[DARK_RED]]Vous devez en avoir plus
|
||||
Skills.AdeptDiamond=[[DARK_RED]]Vous n'avez pas encore le niveau nécessaire pour réparer du diamant
|
||||
Skills.FullDurability=[[GRAY]]Cet objet est déjà en bonne état.
|
||||
Skills.Disarmed=[[DARK_RED]]Vous avez été désarmé !
|
||||
mcPlayerListener.SorcerySkill=Sorcery:
|
||||
m.SkillSorcery=SORCERY
|
||||
Sorcery.HasCast=[[GREEN]]**CASTING**[[GOLD]]
|
||||
Sorcery.Current_Mana=[[DARK_AQUA]]MP
|
||||
Sorcery.SpellSelected=[[GREEN]]-=([[GOLD]]{0}[[GREEN]])=- [[RED]]([[GRAY]]{1}[[RED]])
|
||||
Sorcery.Cost=[[RED]][COST] {0} MP
|
||||
Sorcery.OOM=[[DARK_AQUA]][[[GOLD]]{2}[[DARK_AQUA]]][[DARK_GRAY]] Out Of Mana [[YELLOW]]([[RED]]{0}[[YELLOW]]/[[GRAY]]{1}[[YELLOW]])
|
||||
Sorcery.Water.Thunder=THUNDER
|
||||
Sorcery.Curative.Self=CURE SELF
|
||||
Sorcery.Curative.Other=CURE OTHER
|
||||
m.LVL=NIVEAU [[GREEN]]{0} - [[DARK_AQUA]]XP : [[YELLOW]][[[GOLD]]{1}[[YELLOW]]/[[GOLD]]{2}[[YELLOW]]]
|
||||
Combat.BeastLore=[[GREEN]]**Connaissances des bêtes**
|
||||
Combat.BeastLoreOwner=[[DARK_AQUA]]Propriétaire ([[RED]]{0}[[DARK_AQUA]])
|
||||
Combat.BeastLoreHealthWolfTamed=[[DARK_AQUA]]Vie ([[GREEN]]{0}[[DARK_AQUA]]/20)
|
||||
Combat.BeastLoreHealthWolf=[[DARK_AQUA]]Vie ([[GREEN]]{0}[[DARK_AQUA]]/8)
|
||||
mcMMO.Description=[[DARK_AQUA]]Q: QU'EST-CE QUE C'EST ?,[[GOLD]]mcMMO est un plugin RPG [[RED]]OPEN SOURCE[[GOLD]] pour Bukkit créé par [[BLUE]]nossr50,[[GOLD]]mcMMO ajoute beaucoup de compétences dans Minecraft,[[GOLD]]Vous pouvez gagner de l'expérience de différentes façons,[[GOLD]]Vous devriez taper [[GREEN]]/NOM_COMPETENCE[[GOLD]] pour en savoir plus.,[[DARK_AQUA]]Q: QU'EST-CE QUE ÇA FAIT?,[[GOLD]]Par exemple... en [[DARK_AQUA]]Minant[[GOLD]] Vous allez recevoir des bénéfices comme,[[RED]]le Double Butin[[GOLD]] ou la compétence [[RED]]Super Breaker[[GOLD]] qui lorsqu'elle est,[[GOLD]]activée avec clique droit permet de miner vite, sa durée,[[GOLD]]dépend du niveau de votre compétence. Améliorer [[BLUE]]Le Minage,[[GOLD]]Est aussi simple que de mine des ressources précieuses !,[[DARK_AQUA]]Q: QU'EST-CE QUE ÇA VEUT DIRE ?,[[GOLD]]Presque toutes les compétences dans [[GREEN]]mcMMO[[GOLD]] Sont des nouveaux trucs cools!.,[[GOLD]]Tapez [[GREEN]]/{0}[[GOLD]] pour trouver les commandes,[[GOLD]]Le but de mcMMO est de créer une expérience RPG de qualité.,[[DARK_AQUA]]Q: OÙ JE PEUX SUGGÉRER DES IDÉES !?,[[DARK_AQUA]]bit.ly/MCmmoIDEA,[[DARK_AQUA]]Q: COMMENT JE FAIS CI ET ÇA?,[[RED]]MERCI [[GOLD]]d'aller voir le wiki ! [[DARK_AQUA]]mcmmo.wikia.com
|
||||
mcMMO.Description=[[DARK_AQUA]]About the [[YELLOW]]mcMMO[[DARK_AQUA]] Project:,[[GOLD]]mcMMO is an [[RED]]open source[[GOLD]] RPG mod created in February 2011,[[GOLD]]by [[BLUE]]nossr50[[GOLD]]. The goal is to provide a quality RPG experience.,[[DARK_AQUA]]Tips:,[[GOLD]] - [[GREEN]]Use [[RED]]/mcc[[GREEN]] to see commands,[[GOLD]] - [[GREEN]]Type [[RED]]/SKILLNAME[[GREEN]] to see detailed skill info,[[DARK_AQUA]]Developers:,[[GOLD]] - [[GREEN]]TheYeti [[BLUE]](Project Lead & Developer),[[GOLD]] - [[GREEN]]NuclearW [[BLUE]](Developer),[[GOLD]] - [[GREEN]]GJ [[BLUE]](Developer),[[GOLD]] - [[GREEN]]nossr50 [[BLUE]](Developer & Creator),[[DARK_AQUA]]Useful Links:,[[GOLD]] - [[GREEN]]issues.mcmmo.org[[GOLD]] Bug Reporting,[[GOLD]] - [[GREEN]]#mcmmo @ irc.esper.net[[GOLD]] IRC Chat,[[GOLD]] - [[GREEN]]www.mcmmo.org[[GOLD]] Official Website,[[GOLD]] - [[GREEN]]http://bit.ly/x3Yvry[[GOLD]] Bukkit Forum Thread,[[GOLD]] - [[GREEN]]https://twitter.com/#!/mcmmo_dev[[GOLD]] mcMMO Twitter,[[DARK_AQUA]]Donation Info:
|
||||
Party.Locked=[[RED]]Party is locked, only party leader may invite.
|
||||
Party.IsntLocked=[[GRAY]]Party is not locked
|
||||
Party.Unlocked=[[GRAY]]Party is unlocked
|
||||
@@ -349,14 +341,8 @@ Commands.xprate.started2=[[GOLD]]mcMMO XP RATE IS NOW {0}x!!
|
||||
Commands.xplock.locked=[[GOLD]]Your XP BAR is now locked to {0}!
|
||||
Commands.xplock.unlocked=[[GOLD]]Your XP BAR is now [[GREEN]]UNLOCKED[[GOLD]]!
|
||||
Commands.xplock.invalid=[[RED]]That is not a valid skillname! Try /xplock mining
|
||||
m.SkillAlchemy=ALCHEMY
|
||||
m.SkillEnchanting=ENCHANTING
|
||||
m.SkillFishing=FISHING
|
||||
mcPlayerListener.AlchemySkill=Alchemy:
|
||||
mcPlayerListener.EnchantingSkill=Enchanting:
|
||||
mcPlayerListener.FishingSkill=Fishing:
|
||||
Skills.AlchemyUp=[[YELLOW]]Alchemy skill increased by {0}. Total ({1})
|
||||
Skills.EnchantingUp=[[YELLOW]]Enchanting skill increased by {0}. Total ({1})
|
||||
Skills.FishingUp=[[YELLOW]]Fishing skill increased by {0}. Total ({1})
|
||||
Repair.LostEnchants=[[RED]]You were not skilled enough to keep any enchantments.
|
||||
Repair.ArcanePerfect=[[GREEN]]You have sustained the arcane energies in this item.
|
||||
@@ -367,8 +353,6 @@ m.EffectsRepair5_1=Repair magic items
|
||||
m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
|
||||
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
||||
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
||||
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
||||
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
||||
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||
Fishing.ItemFound=[[GRAY]]Treasure found!
|
||||
m.SkillFishing=FISHING
|
||||
@@ -387,4 +371,45 @@ m.TamingSummon=[[GREEN]]Summoning complete
|
||||
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
|
||||
m.EffectsTaming7_0=Call of the Wild
|
||||
m.EffectsTaming7_1=Summon a wolf to your side
|
||||
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
|
||||
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
|
||||
m.EffectsTaming8_0=Fast Food Service
|
||||
m.EffectsTaming8_1=Chance for wolves to heal on attack
|
||||
m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE)
|
||||
m.AbilBonusTaming5_0=Fast Food Service
|
||||
m.AbilBonusTaming5_1=50% Chance for heal on attack
|
||||
Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]!
|
||||
m.EffectsMining3_0=Blast Mining
|
||||
m.EffectsMining3_1=Bonuses to mining with TNT
|
||||
m.EffectsMining4_0=Bigger Bombs
|
||||
m.EffectsMining4_1=Increases TNT explosion radius
|
||||
m.EffectsMining5_0=Demolitions Expertise
|
||||
m.EffectsMining5_1=Decreases damage from TNT explosions
|
||||
m.AbilLockMining1=LOCKED UNTIL 125+ SKILL (BLAST MINING)
|
||||
m.AbilLockMining2=LOCKED UNTIL 250+ SKILL (BIGGER BOMBS)
|
||||
m.AbilLockMining3=LOCKED UNTIL 500+ SKILL (DEMOLITIONS EXPERTISE)
|
||||
m.MiningBiggerBombs=[[RED]]Blast Radius Increase: [[YELLOW]]+{0}
|
||||
m.MiningDemolitionsExpertDamageDecrease=[[RED]]Demolitions Expert Damage Decrease: [[YELLOW]]{0}%
|
||||
m.MiningBlastMining=[[RED]]Blast Mining: [[YELLOW]] Rank {0} [[GRAY]]({1})
|
||||
m.BlastMining1 = +35% ore yield
|
||||
m.BlastMining2 = +40% ore yield
|
||||
m.BlastMining3 = +45% ore yield, no debris
|
||||
m.BlastMining4 = +50% ore yield, no debris
|
||||
m.BlastMining5 = +55% ore yield, no debris, double drops
|
||||
m.BlastMining6 = +60% ore yield, no debris, double drops
|
||||
m.BlastMining7 = +65% ore yield, no debris, triple drops
|
||||
m.BlastMining8 = +70% ore yield, no debris, triple drops
|
||||
Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
|
||||
Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
|
||||
Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
|
||||
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!
|
||||
Axes.GreaterImpactOnSelf=[[RED]]**HIT BY GREATER IMPACT**
|
||||
Axes.GreaterImpactOnEnemy=[[GREEN]]**STRUCK WITH GREAT FORCE**
|
||||
Skills.BerserkPlayerOff=[[RED]]Berserk[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.GreenTerraPlayerOff=[[RED]]Green Terra[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.TreeFellerPlayerOff=[[RED]]Tree Feller[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SuperBreakerPlayerOff=[[RED]]Super Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SkullSplitterPlayerOff=[[RED]]Skull Splitter[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.GigaDrillBreakerPlayerOff=[[RED]]Giga Drill Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SerratedStrikesPlayerOff=[[RED]]Serrated Strikes[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.BlastMiningPlayer=[[GREEN]]{0}[[DARK_GREEN]] has used [[RED]]Blast Mining!
|
||||
Skills.YourBlastMining=[[GREEN]]Your [[YELLOW]]Blast Mining [[GREEN]]ability is refreshed!
|
||||
@@ -33,7 +33,7 @@ m.mccMySpawn=- Teleporteer naar MySpawn
|
||||
m.mccClearMySpawn=- Verwijder je MySpawn
|
||||
m.mccToggleAbility=- Doe ability activatie aan/uit
|
||||
m.mccAdminToggle=- Doe admin chat aan/uit
|
||||
m.mccWhois=[playername] [[RED]]- Laat informatie zien over speler
|
||||
m.mccInspect=[playername] [[RED]]- Laat informatie zien over speler
|
||||
m.mccMmoedit=[playername] [skill] [newvalue] [[RED]]- Verander levels
|
||||
m.mccMcGod=- God Modus
|
||||
m.mccSkillInfo=[skillname] [[RED]]- Laat informatie zien over een skill
|
||||
@@ -46,7 +46,7 @@ m.AbilityBonusTemplate=[[RED]]{0}: [[YELLOW]]{1}
|
||||
m.Effects=EFFECTEN
|
||||
m.YourStats=JOUW STATUS
|
||||
m.SkillTaming=TEMMEN
|
||||
m.XPGainTaming=Wolven krijgen schade
|
||||
m.XPGainTaming=Animal Taming, or combat w/ your wolves
|
||||
m.EffectsTaming1_0=Wolfinspectie
|
||||
m.EffectsTaming1_1=Bone-meal inspecteert wolven
|
||||
m.EffectsTaming2_0=Gestold bloed
|
||||
@@ -105,11 +105,19 @@ m.EffectsAxes1_0=Schedelsplijter (ABILITY)
|
||||
m.EffectsAxes1_1=Geef schade rond om je heen
|
||||
m.EffectsAxes2_0=Critical Strikes
|
||||
m.EffectsAxes2_1=Dubbele schade
|
||||
m.EffectsAxes3_0=Bijl Master (500 SKILL)
|
||||
m.EffectsAxes3_1=Verhoogt schade
|
||||
m.AbilLockAxes1=GEBLOKEERD TOT 500+ SKILL (BIJL MASTER)
|
||||
m.AbilBonusAxes1_0=Bijl Master
|
||||
m.AbilBonusAxes1_1=4 schade extra
|
||||
m.EffectsAxes3_0=Axe Mastery
|
||||
m.EffectsAxes3_1=Adds bonus DMG
|
||||
m.EffectsAxes4_0=Impact
|
||||
m.EffectsAxes4_1=Strike with enough force to shatter armor
|
||||
m.EffectsAxes5_0=Greater Impact
|
||||
m.EffectsAxes5_1=Deal bonus damage to unarmored foes
|
||||
m.AbilLockAxes1=LOCKED UNTIL 500+ SKILL (AXE MASTERY)
|
||||
m.AbilBonusAxes1_0=Axe Mastery
|
||||
m.AbilBonusAxes1_1=Bonus {0} damage
|
||||
m.AbilBonusAxes2_0=Impact
|
||||
m.AbilBonusAxes2_1=Deal {0} DMG to armor
|
||||
m.AbilBonusAxes3_0=Greater Impact
|
||||
m.AbilBonusAxes3_1=Deal {0} Bonus DMG to the unarmored
|
||||
m.AxesCritChance=[[RED]]Kans op Critical Strikes: [[YELLOW]]{0}%
|
||||
m.AxesSkullLength=[[RED]]Schedelsplijter lengte: [[YELLOW]]{0}s
|
||||
m.SkillSwords=ZWAARDEN
|
||||
@@ -167,18 +175,12 @@ m.EffectsUnarmed1_0=Onbewapende gek (ABILITY)
|
||||
m.EffectsUnarmed1_1=+50% schade, hak zachte materialen weg
|
||||
m.EffectsUnarmed2_0=Ontwapen (Players)
|
||||
m.EffectsUnarmed2_1=Dropt het wapen van de vijand
|
||||
m.EffectsUnarmed3_0=Onbewapende held
|
||||
m.EffectsUnarmed3_1=Nog meer schade
|
||||
m.EffectsUnarmed4_0=Onbewapende leerling
|
||||
m.EffectsUnarmed4_1=Meer schade
|
||||
m.EffectsUnarmed3_0=Iron Arm Style
|
||||
m.EffectsUnarmed3_1=Hardens your arm over time
|
||||
m.EffectsUnarmed5_0=Pijlafwijking
|
||||
m.EffectsUnarmed5_1=Laat pijlen afwijken
|
||||
m.AbilLockUnarmed1=GEBLOKEERD TOT 250+ SKILL (Onbewapende leerling)
|
||||
m.AbilLockUnarmed2=GEBLOKEERD TOT 500+ SKILL (Onbewapende held)
|
||||
m.AbilBonusUnarmed1_0=Onbewapende leerling
|
||||
m.AbilBonusUnarmed1_1=+2 meer schade
|
||||
m.AbilBonusUnarmed2_0=Onbewapende held
|
||||
m.AbilBonusUnarmed2_1=+4 meer schade
|
||||
m.AbilBonusUnarmed2_0=Iron Arm Style
|
||||
m.AbilBonusUnarmed2_1=+{0} DMG Upgrade
|
||||
m.UnarmedArrowDeflectChance=[[RED]]Kans op Pijlafwijking: [[YELLOW]]{0}%
|
||||
m.UnarmedDisarmChance=[[RED]]Kans op Ontwapening: [[YELLOW]]{0}%
|
||||
m.UnarmedBerserkLength=[[RED]]Lengte van Onbewapende gek: [[YELLOW]]{0}s
|
||||
@@ -190,15 +192,15 @@ m.EffectsHerbalism2_0=Groene vingers (Wheat)
|
||||
m.EffectsHerbalism2_1=Plant wheat bij het oogsten
|
||||
m.EffectsHerbalism3_0=Groene vingers (Cobble)
|
||||
m.EffectsHerbalism3_1=Maakt van cobblestone moss-stone met seeds
|
||||
m.EffectsHerbalism4_0=Voedsel+
|
||||
m.EffectsHerbalism4_1=Verhoogt de heling van brood en stews
|
||||
m.EffectsHerbalism4_0=Farmer's Diet
|
||||
m.EffectsHerbalism4_1=Improves hunger restored from herbalist foods
|
||||
m.EffectsHerbalism5_0=Dubbele Drop (Alle planten)
|
||||
m.EffectsHerbalism5_1=Dubbele drop van planten
|
||||
m.HerbalismGreenTerraLength=[[RED]]Groene Aarde lengte: [[YELLOW]]{0}s
|
||||
m.HerbalismGreenThumbChance=[[RED]]Kans op Groene vingers: [[YELLOW]]{0}%
|
||||
m.HerbalismGreenThumbStage=[[RED]]Groene vingers periode: [[YELLOW]] Wheat groeit in periode {0}
|
||||
m.HerbalismDoubleDropChance=[[RED]]Kans op Dubbele Drop: [[YELLOW]]{0}%
|
||||
m.HerbalismFoodPlus=[[RED]]Voedsel+ (Rank{0}): [[YELLOW]]Bonus {0} heling
|
||||
m.HerbalismFoodPlus=[[RED]]Farmers Diet: [[YELLOW]]Rank {0}
|
||||
m.SkillExcavation=UITGRAVING
|
||||
m.XPGainExcavation=Graven
|
||||
m.EffectsExcavation1_0=Giga Drilboor (ABILITY)
|
||||
@@ -312,22 +314,12 @@ Skills.NeedMore=[[DARK_RED]]Je hebt te weinig
|
||||
Skills.AdeptDiamond=[[DARK_RED]]Je bent niet goed genoeg om diamond te repareren.
|
||||
Skills.FullDurability=[[GRAY]]Dat is nog helemaal heel.
|
||||
Skills.Disarmed=[[DARK_RED]]Je bent ontwapend!
|
||||
mcPlayerListener.SorcerySkill=Tovenarij:
|
||||
m.SkillSorcery=TOVERNARIJ
|
||||
Sorcery.HasCast=[[GREEN]]**UITROEPEN VAN**[[GOLD]]
|
||||
Sorcery.Current_Mana=[[DARK_AQUA]]MP
|
||||
Sorcery.SpellSelected=[[GREEN]]-=([[GOLD]]{0}[[GREEN]])=- [[RED]]([[GRAY]]{1}[[RED]])
|
||||
Sorcery.Cost=[[RED]][COST] {0} MP
|
||||
Sorcery.OOM=[[DARK_AQUA]][[[GOLD]]{2}[[DARK_AQUA]]][[DARK_GRAY]] Geen Mana meer [[YELLOW]]([[RED]]{0}[[YELLOW]]/[[GRAY]]{1}[[YELLOW]])
|
||||
Sorcery.Water.Thunder=DONDER
|
||||
Sorcery.Curative.Self=HEEL JEZELF
|
||||
Sorcery.Curative.Other=HEEL EEN ANDER
|
||||
m.LVL=[[DARK_GRAY]]LVL: [[GREEN]]{0} [[DARK_AQUA]]XP[[YELLOW]]([[GOLD]]{1}[[YELLOW]]/[[GOLD]]{2}[[YELLOW]])
|
||||
Combat.BeastLore=[[GREEN]]**WOLFINSPECTIE**
|
||||
Combat.BeastLoreOwner=[[DARK_AQUA]]Eigenaar ([[RED]]{0}[[DARK_AQUA]])
|
||||
Combat.BeastLoreHealthWolfTamed=[[DARK_AQUA]]Levens ([[GREEN]]{0}[[DARK_AQUA]]/20)
|
||||
Combat.BeastLoreHealthWolf=[[DARK_AQUA]]Levens ([[GREEN]]{0}[[DARK_AQUA]]/8)
|
||||
mcMMO.Description=[[DARK_AQUA]]Q: WHAT IS IT?,[[GOLD]]mcMMO is an [[RED]]OPEN SOURCE[[GOLD]] RPG mod for Bukkit by [[BLUE]]nossr50,[[GOLD]]There are many skills added by mcMMO to Minecraft.,[[GOLD]]You can gain experience in many different ways,[[GOLD]]You will want to type [[GREEN]]/SKILLNAME[[GOLD]] to find out more about a skill.,[[DARK_AQUA]]Q: WHAT DOES IT DO?,[[GOLD]]As an example... in [[DARK_AQUA]]Mining[[GOLD]] you will receive benefits like,[[RED]]Double Drops[[GOLD]] or the ability [[RED]]Super Breaker[[GOLD]] which when,[[GOLD]]activated by right-click allows fast Mining during its duration,[[GOLD]]which is related to your skill level. Leveling [[BLUE]]Mining,[[GOLD]]is as simple as mining precious materials!,[[DARK_AQUA]]Q: WHAT DOES THIS MEAN?,[[GOLD]]Almost all of the skills in [[GREEN]]mcMMO[[GOLD]] add cool new things!.,[[GOLD]]You can also type [[GREEN]]/{0}[[GOLD]] to find out commands,[[GOLD]]The goal of mcMMO is to provide a quality RPG experience.,[[DARK_AQUA]]Q: WHERE DO I SUGGEST NEW STUFF!?,[[GOLD]]On the mcMMO thread in the bukkit forums!,[[DARK_AQUA]]Q: HOW DO I DO THIS AND THAT?,[[RED]]PLEASE [[GOLD]]checkout the wiki! [[DARK_AQUA]]mcmmo.wikia.com
|
||||
mcMMO.Description=[[DARK_AQUA]]About the [[YELLOW]]mcMMO[[DARK_AQUA]] Project:,[[GOLD]]mcMMO is an [[RED]]open source[[GOLD]] RPG mod created in February 2011,[[GOLD]]by [[BLUE]]nossr50[[GOLD]]. The goal is to provide a quality RPG experience.,[[DARK_AQUA]]Tips:,[[GOLD]] - [[GREEN]]Use [[RED]]/mcc[[GREEN]] to see commands,[[GOLD]] - [[GREEN]]Type [[RED]]/SKILLNAME[[GREEN]] to see detailed skill info,[[DARK_AQUA]]Developers:,[[GOLD]] - [[GREEN]]TheYeti [[BLUE]](Project Lead & Developer),[[GOLD]] - [[GREEN]]NuclearW [[BLUE]](Developer),[[GOLD]] - [[GREEN]]GJ [[BLUE]](Developer),[[GOLD]] - [[GREEN]]nossr50 [[BLUE]](Developer & Creator),[[DARK_AQUA]]Useful Links:,[[GOLD]] - [[GREEN]]issues.mcmmo.org[[GOLD]] Bug Reporting,[[GOLD]] - [[GREEN]]#mcmmo @ irc.esper.net[[GOLD]] IRC Chat,[[GOLD]] - [[GREEN]]www.mcmmo.org[[GOLD]] Official Website,[[GOLD]] - [[GREEN]]http://bit.ly/x3Yvry[[GOLD]] Bukkit Forum Thread,[[GOLD]] - [[GREEN]]https://twitter.com/#!/mcmmo_dev[[GOLD]] mcMMO Twitter,[[DARK_AQUA]]Donation Info:
|
||||
Party.Locked=[[RED]]Party is locked, only party leader may invite.
|
||||
Party.IsntLocked=[[GRAY]]Party is not locked
|
||||
Party.Unlocked=[[GRAY]]Party is unlocked
|
||||
@@ -355,14 +347,8 @@ Commands.xprate.started2=[[GOLD]]mcMMO XP RATE IS NOW {0}x!!
|
||||
Commands.xplock.locked=[[GOLD]]Your XP BAR is now locked to {0}!
|
||||
Commands.xplock.unlocked=[[GOLD]]Your XP BAR is now [[GREEN]]UNLOCKED[[GOLD]]!
|
||||
Commands.xplock.invalid=[[RED]]That is not a valid skillname! Try /xplock mining
|
||||
m.SkillAlchemy=ALCHEMY
|
||||
m.SkillEnchanting=ENCHANTING
|
||||
m.SkillFishing=FISHING
|
||||
mcPlayerListener.AlchemySkill=Alchemy:
|
||||
mcPlayerListener.EnchantingSkill=Enchanting:
|
||||
mcPlayerListener.FishingSkill=Fishing:
|
||||
Skills.AlchemyUp=[[YELLOW]]Alchemy skill increased by {0}. Total ({1})
|
||||
Skills.EnchantingUp=[[YELLOW]]Enchanting skill increased by {0}. Total ({1})
|
||||
Skills.FishingUp=[[YELLOW]]Fishing skill increased by {0}. Total ({1})
|
||||
Repair.LostEnchants=[[RED]]You were not skilled enough to keep any enchantments.
|
||||
Repair.ArcanePerfect=[[GREEN]]You have sustained the arcane energies in this item.
|
||||
@@ -373,8 +359,6 @@ m.EffectsRepair5_1=Repair magic items
|
||||
m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
|
||||
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
||||
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
||||
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
||||
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
||||
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||
Fishing.ItemFound=[[GRAY]]Treasure found!
|
||||
m.SkillFishing=FISHING
|
||||
@@ -393,4 +377,45 @@ m.TamingSummon=[[GREEN]]Summoning complete
|
||||
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
|
||||
m.EffectsTaming7_0=Call of the Wild
|
||||
m.EffectsTaming7_1=Summon a wolf to your side
|
||||
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
|
||||
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
|
||||
m.EffectsTaming8_0=Fast Food Service
|
||||
m.EffectsTaming8_1=Chance for wolves to heal on attack
|
||||
m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE)
|
||||
m.AbilBonusTaming5_0=Fast Food Service
|
||||
m.AbilBonusTaming5_1=50% Chance for heal on attack
|
||||
Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]!
|
||||
m.EffectsMining3_0=Blast Mining
|
||||
m.EffectsMining3_1=Bonuses to mining with TNT
|
||||
m.EffectsMining4_0=Bigger Bombs
|
||||
m.EffectsMining4_1=Increases TNT explosion radius
|
||||
m.EffectsMining5_0=Demolitions Expertise
|
||||
m.EffectsMining5_1=Decreases damage from TNT explosions
|
||||
m.AbilLockMining1=LOCKED UNTIL 125+ SKILL (BLAST MINING)
|
||||
m.AbilLockMining2=LOCKED UNTIL 250+ SKILL (BIGGER BOMBS)
|
||||
m.AbilLockMining3=LOCKED UNTIL 500+ SKILL (DEMOLITIONS EXPERTISE)
|
||||
m.MiningBiggerBombs=[[RED]]Blast Radius Increase: [[YELLOW]]+{0}
|
||||
m.MiningDemolitionsExpertDamageDecrease=[[RED]]Demolitions Expert Damage Decrease: [[YELLOW]]{0}%
|
||||
m.MiningBlastMining=[[RED]]Blast Mining: [[YELLOW]] Rank {0} [[GRAY]]({1})
|
||||
m.BlastMining1 = +35% ore yield
|
||||
m.BlastMining2 = +40% ore yield
|
||||
m.BlastMining3 = +45% ore yield, no debris
|
||||
m.BlastMining4 = +50% ore yield, no debris
|
||||
m.BlastMining5 = +55% ore yield, no debris, double drops
|
||||
m.BlastMining6 = +60% ore yield, no debris, double drops
|
||||
m.BlastMining7 = +65% ore yield, no debris, triple drops
|
||||
m.BlastMining8 = +70% ore yield, no debris, triple drops
|
||||
Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
|
||||
Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
|
||||
Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
|
||||
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!
|
||||
Axes.GreaterImpactOnSelf=[[RED]]**HIT BY GREATER IMPACT**
|
||||
Axes.GreaterImpactOnEnemy=[[GREEN]]**STRUCK WITH GREAT FORCE**
|
||||
Skills.BerserkPlayerOff=[[RED]]Berserk[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.GreenTerraPlayerOff=[[RED]]Green Terra[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.TreeFellerPlayerOff=[[RED]]Tree Feller[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SuperBreakerPlayerOff=[[RED]]Super Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SkullSplitterPlayerOff=[[RED]]Skull Splitter[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.GigaDrillBreakerPlayerOff=[[RED]]Giga Drill Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SerratedStrikesPlayerOff=[[RED]]Serrated Strikes[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.BlastMiningPlayer=[[GREEN]]{0}[[DARK_GREEN]] has used [[RED]]Blast Mining!
|
||||
Skills.YourBlastMining=[[GREEN]]Your [[YELLOW]]Blast Mining [[GREEN]]ability is refreshed!
|
||||
@@ -27,7 +27,7 @@ m.mccMySpawn=- Teleportuje do twojego spawna.
|
||||
m.mccClearMySpawn=- Kasuje twoj spawn i zmienia na domyslny.
|
||||
m.mccToggleAbility=- Wlacza specjalna umiejetnosc prawym przyciskiem myszy.
|
||||
m.mccAdminToggle=- Wlacza chat adminow.
|
||||
m.mccWhois=[nazwa gracza] [[RED]]- Zobacz szczegolowe informacje o graczu.
|
||||
m.mccInspect=[nazwa gracza] [[RED]]- Zobacz szczegolowe informacje o graczu.
|
||||
m.mccMmoedit=[nazwa gracza] [umiejetnosc] [nowa wartosc] [[RED]]- Modyfikuje cel.
|
||||
m.mccMcGod=- Niesmiertelnosc.
|
||||
m.mccSkillInfo=/[nazwa umiejetnosci (np. Mining)] [[RED]]- Wyswietla informacje na temat umiejetnosci.
|
||||
@@ -40,7 +40,7 @@ m.AbilityBonusTemplate=[[RED]]{0}: [[YELLOW]]{1}
|
||||
m.Effects=EFEKTY
|
||||
m.YourStats=TWOJE STATYSTYKI
|
||||
m.SkillTaming=OSWAJANIE
|
||||
m.XPGainTaming=Utrate zdrowia wilkow.
|
||||
m.XPGainTaming=Animal Taming, or combat w/ your wolves
|
||||
m.EffectsTaming1_0=Wiedza o zwierzetach
|
||||
m.EffectsTaming1_1=Uderz koscia aby sprawdzic wilka.
|
||||
m.EffectsTaming2_0=Krwotok
|
||||
@@ -99,11 +99,19 @@ m.EffectsAxes1_0=Berserk (UMIEJETNOSC)
|
||||
m.EffectsAxes1_1=Zadaje obrazenia wszystkiemu dookola.
|
||||
m.EffectsAxes2_0=Krytyczne uderzenie
|
||||
m.EffectsAxes2_1=Potrafisz trafic wroga tam gdzie boli, zadajac podwojne obrazenia.
|
||||
m.EffectsAxes3_0=Doswiadczony wojownik
|
||||
m.EffectsAxes3_1=Mordowanie setek potworow zwiekszylo twoja sile i celnosc. Zadajesz wiecej obrazen.
|
||||
m.AbilLockAxes1=Aby odblokowac doswiadczonego wojownika, zdobadz 500 poziom.
|
||||
m.AbilBonusAxes1_0=Doswiadczony wojownik
|
||||
m.AbilBonusAxes1_1=Zadajesz dodatkowe 4 punkty obrazen.
|
||||
m.EffectsAxes3_0=Axe Mastery
|
||||
m.EffectsAxes3_1=Adds bonus DMG
|
||||
m.EffectsAxes4_0=Impact
|
||||
m.EffectsAxes4_1=Strike with enough force to shatter armor
|
||||
m.EffectsAxes5_0=Greater Impact
|
||||
m.EffectsAxes5_1=Deal bonus damage to unarmored foes
|
||||
m.AbilLockAxes1=LOCKED UNTIL 500+ SKILL (AXE MASTERY)
|
||||
m.AbilBonusAxes1_0=Axe Mastery
|
||||
m.AbilBonusAxes1_1=Bonus {0} damage
|
||||
m.AbilBonusAxes2_0=Impact
|
||||
m.AbilBonusAxes2_1=Deal {0} DMG to armor
|
||||
m.AbilBonusAxes3_0=Greater Impact
|
||||
m.AbilBonusAxes3_1=Deal {0} Bonus DMG to the unarmored
|
||||
m.AxesCritChance=[[RED]]Szansa na krytyczne uderzenie: [[YELLOW]]{0}%
|
||||
m.AxesSkullLength=[[RED]]Dlugosc berserku: [[YELLOW]]{0} sekund
|
||||
m.SkillSwords=MIECZE
|
||||
@@ -161,18 +169,12 @@ m.EffectsUnarmed1_0=Wejscie Smoka (UMIEJETNOSC)
|
||||
m.EffectsUnarmed1_1=Polowe wieksze obrazenia, niszczy slabe przedmioty.
|
||||
m.EffectsUnarmed2_0=Rozbrojenie (Tylko graczy)
|
||||
m.EffectsUnarmed2_1=Przeciwnik upuszcza trzymany w reku przedmiot.
|
||||
m.EffectsUnarmed3_0=Wsciekle Piesci
|
||||
m.EffectsUnarmed3_1=Znaczne zwiekszenie zadawanych obrazen.
|
||||
m.EffectsUnarmed4_0=Droga Smoka
|
||||
m.EffectsUnarmed4_1=Zwiekszenie zadawanych obrazen.
|
||||
m.EffectsUnarmed3_0=Iron Arm Style
|
||||
m.EffectsUnarmed3_1=Hardens your arm over time
|
||||
m.EffectsUnarmed5_0=Odbicie strzaly
|
||||
m.EffectsUnarmed5_1=Golymi rekoma potrafisz odbic nadlatujaca strzale.
|
||||
m.AbilLockUnarmed1=Aby odblokowac Droge Smoka, zdobadz 250 poziom.
|
||||
m.AbilLockUnarmed2=Aby odblokowac Wsciekle Piesci, zdobadz 500 poziom.
|
||||
m.AbilBonusUnarmed1_0=Droga Smoka
|
||||
m.AbilBonusUnarmed1_1=Zadawane obrazenia zwiekszone o 2.
|
||||
m.AbilBonusUnarmed2_0=Wsciekle Piesci
|
||||
m.AbilBonusUnarmed2_1=Zadawane obrazenia zwiekszone o 4.
|
||||
m.AbilBonusUnarmed2_0=Iron Arm Style
|
||||
m.AbilBonusUnarmed2_1=+{0} DMG Upgrade
|
||||
m.UnarmedArrowDeflectChance=[[RED]]Szansa na odbicie strzaly: [[YELLOW]]{0}%
|
||||
m.UnarmedDisarmChance=[[RED]]Szansa na rozbrojenie: [[YELLOW]]{0}%
|
||||
m.UnarmedBerserkLength=[[RED]]Dlugosc Wejscia Smoka: [[YELLOW]]{0} sekund.
|
||||
@@ -184,15 +186,15 @@ m.EffectsHerbalism2_0=Wprawne rece (zboze)
|
||||
m.EffectsHerbalism2_1=Zbierajac zboze, od razu sadzisz nasiona.
|
||||
m.EffectsHerbalism3_0=Wprawne rece (bruk)
|
||||
m.EffectsHerbalism3_1=Zamienia bruk w porosniety mchem kamien z nasionami.
|
||||
m.EffectsHerbalism4_0=Lepsze jedzenie
|
||||
m.EffectsHerbalism4_1=Modyfikowana genetycznie zywnosc jest zdrowsza. Chleb i zupa chlebowa regeneruja wiecej zdrowia.
|
||||
m.EffectsHerbalism4_0=Farmer's Diet
|
||||
m.EffectsHerbalism4_1=Improves hunger restored from herbalist foods
|
||||
m.EffectsHerbalism5_0=Udane zbiory
|
||||
m.EffectsHerbalism5_1=Dwa razy wieksze plony wszystkich roslin.
|
||||
m.HerbalismGreenTerraLength=[[RED]]Czas trwania zielonej ziemi: [[YELLOW]]{0} sekund
|
||||
m.HerbalismGreenThumbChance=[[RED]]Szansa na wprawne rece: [[YELLOW]]{0}%
|
||||
m.HerbalismGreenThumbStage=[[RED]]Poziom wprawnych rak: [[YELLOW]] Zboze rosnie na poziomie {0}
|
||||
m.HerbalismDoubleDropChance=[[RED]]Szansa na udane zbiory: [[YELLOW]]{0}%
|
||||
m.HerbalismFoodPlus=[[RED]]Lepsze jedzenie (Ranga{0}): [[YELLOW]]Dodatkowe {0} zdrowia
|
||||
m.HerbalismFoodPlus=[[RED]]Farmers Diet: [[YELLOW]]Rank {0}
|
||||
m.SkillExcavation=WYKOPALISKA
|
||||
m.XPGainExcavation=Kopanie i odnajdywanie skarbow.
|
||||
m.EffectsExcavation1_0=Super Szybka Saperka (UMIEJETNOSC)
|
||||
@@ -306,22 +308,12 @@ Skills.NeedMore=[[DARK_RED]]Potrzebujesz wiecej
|
||||
Skills.AdeptDiamond=[[DARK_RED]]Nie potrafisz jeszcze naprawiac diamentow
|
||||
Skills.FullDurability=[[GRAY]]Ten przedmiot nie wymaga naprawy.
|
||||
Skills.Disarmed=[[DARK_RED]]Zostales rozbrojony!
|
||||
mcPlayerListener.SorcerySkill=Magia:
|
||||
m.SkillSorcery=MAGIA
|
||||
Sorcery.HasCast=[[GREEN]]**RZUCANIE ZAKLECIA**[[GOLD]]
|
||||
Sorcery.Current_Mana=[[DARK_AQUA]]Mana
|
||||
Sorcery.SpellSelected=[[GREEN]]-=([[GOLD]]{0}[[GREEN]])=- [[RED]]([[GRAY]]{1}[[RED]])
|
||||
Sorcery.Cost=[[RED]][COST] {0} Many
|
||||
Sorcery.OOM=[[DARK_AQUA]][[[GOLD]]{2}[[DARK_AQUA]]][[DARK_GRAY]] Brak Many [[YELLOW]]([[RED]]{0}[[YELLOW]]/[[GRAY]]{1}[[YELLOW]])
|
||||
Sorcery.Water.Thunder=PIORUN
|
||||
Sorcery.Curative.Self=ULECZ SIEBIE
|
||||
Sorcery.Curative.Other=ULECZ INNYCH
|
||||
m.LVL=[[DARK_GRAY]]LVL: [[GREEN]]{0} [[DARK_AQUA]]Doswiadczenia[[YELLOW]]([[GOLD]]{1}[[YELLOW]]/[[GOLD]]{2}[[YELLOW]])
|
||||
Combat.BeastLore=[[GREEN]]**WIEDZA O ZWIERZETACH**
|
||||
Combat.BeastLoreOwner=[[DARK_AQUA]]Wlasciciel ([[RED]]{0}[[DARK_AQUA]])
|
||||
Combat.BeastLoreHealthWolfTamed=[[DARK_AQUA]]Zycie ([[GREEN]]{0}[[DARK_AQUA]]/20)
|
||||
Combat.BeastLoreHealthWolf=[[DARK_AQUA]]Zycie ([[GREEN]]{0}[[DARK_AQUA]]/8)
|
||||
mcMMO.Description=[[DARK_AQUA]]P: Czym jest mcMMO?,[[GOLD]]mcMMO jest [[RED]]open source'owym[[GOLD]] RPG modem korzystajacym z Bukkita, autorstwa [[BLUE]]nossr50,[[GOLD]]mcMMO dodaje wiele umiejetnosci do Minecrafta.,[[GOLD]]Mozna rowniez zbierac doswiadczenie na rozne sposoby,[[GOLD]]Najlepiej wpisac [[GREEN]]/nazwaumiejetnosci[[GOLD]] aby dowiedziec sie wiecej o niej.,[[DARK_AQUA]]P: A co robi mcMMO?,[[GOLD]]Dla przykladu, [[DARK_AQUA]]gornictwo[[GOLD]] pozwala na [[RED]]zwiekszone zyski[[GOLD]] oraz daje mozliwosc [[RED]]szybszego kopania[[GOLD]], ktore mozna [[GOLD]]aktywowac prawym przyciskiem myszy i trwa dluzej [[GOLD]]im wyzszy masz poziom. Zdobywanie poziomow w [[BLUE]]gornictwie[[GOLD]] odbywa sie przez zwyczajne wykopywanie roznych mineralow.,[[DARK_AQUA]]P: Co to wszystko daje?,[[GOLD]]Prawie wszystkie umiejetnosci w [[GREEN]]mcMMO[[GOLD]] dodaja nowe fajne rzeczy!.,[[GOLD]]Wpisujac [[GREEN]]/{0}[[GOLD]] poznasz wszystkie dostepne polecenia,[[GOLD]]Celem mcMMO jest sprawienie aby Minecraft stal sie prawie eRPeGiem.,[[DARK_AQUA]]P: Mam genialny pomysl, dodasz to!?,[[GOLD]]Napisz w temacie mcMMO na forum bukkit i zobaczymy!,[[DARK_AQUA]]Q: A jak zrobic to albo tamto?,[[RED]]CZYTAJ [[GOLD]]strone wiki moda! [[DARK_AQUA]]mcmmo.wikia.com
|
||||
mcMMO.Description=[[DARK_AQUA]]About the [[YELLOW]]mcMMO[[DARK_AQUA]] Project:,[[GOLD]]mcMMO is an [[RED]]open source[[GOLD]] RPG mod created in February 2011,[[GOLD]]by [[BLUE]]nossr50[[GOLD]]. The goal is to provide a quality RPG experience.,[[DARK_AQUA]]Tips:,[[GOLD]] - [[GREEN]]Use [[RED]]/mcc[[GREEN]] to see commands,[[GOLD]] - [[GREEN]]Type [[RED]]/SKILLNAME[[GREEN]] to see detailed skill info,[[DARK_AQUA]]Developers:,[[GOLD]] - [[GREEN]]TheYeti [[BLUE]](Project Lead & Developer),[[GOLD]] - [[GREEN]]NuclearW [[BLUE]](Developer),[[GOLD]] - [[GREEN]]GJ [[BLUE]](Developer),[[GOLD]] - [[GREEN]]nossr50 [[BLUE]](Developer & Creator),[[DARK_AQUA]]Useful Links:,[[GOLD]] - [[GREEN]]issues.mcmmo.org[[GOLD]] Bug Reporting,[[GOLD]] - [[GREEN]]#mcmmo @ irc.esper.net[[GOLD]] IRC Chat,[[GOLD]] - [[GREEN]]www.mcmmo.org[[GOLD]] Official Website,[[GOLD]] - [[GREEN]]http://bit.ly/x3Yvry[[GOLD]] Bukkit Forum Thread,[[GOLD]] - [[GREEN]]https://twitter.com/#!/mcmmo_dev[[GOLD]] mcMMO Twitter,[[DARK_AQUA]]Donation Info:
|
||||
Party.Locked=[[RED]]Grupa jest zamknieta, tylko wlasciciel moze dodac graczy.
|
||||
Party.IsntLocked=[[GRAY]]Grupa jest otwarta dla wszystkich.
|
||||
Party.Unlocked=[[GRAY]]Grupa jest otwarta dla wszystkich.
|
||||
@@ -349,14 +341,8 @@ Commands.xprate.started2=[[GOLD]]mcMMO XP RATE IS NOW {0}x!!
|
||||
Commands.xplock.locked=[[GOLD]]Your XP BAR is now locked to {0}!
|
||||
Commands.xplock.unlocked=[[GOLD]]Your XP BAR is now [[GREEN]]UNLOCKED[[GOLD]]!
|
||||
Commands.xplock.invalid=[[RED]]That is not a valid skillname! Try /xplock mining
|
||||
m.SkillAlchemy=ALCHEMY
|
||||
m.SkillEnchanting=ENCHANTING
|
||||
m.SkillFishing=FISHING
|
||||
mcPlayerListener.AlchemySkill=Alchemy:
|
||||
mcPlayerListener.EnchantingSkill=Enchanting:
|
||||
mcPlayerListener.FishingSkill=Fishing:
|
||||
Skills.AlchemyUp=[[YELLOW]]Alchemy skill increased by {0}. Total ({1})
|
||||
Skills.EnchantingUp=[[YELLOW]]Enchanting skill increased by {0}. Total ({1})
|
||||
Skills.FishingUp=[[YELLOW]]Fishing skill increased by {0}. Total ({1})
|
||||
Repair.LostEnchants=[[RED]]You were not skilled enough to keep any enchantments.
|
||||
Repair.ArcanePerfect=[[GREEN]]You have sustained the arcane energies in this item.
|
||||
@@ -367,8 +353,6 @@ m.EffectsRepair5_1=Repair magic items
|
||||
m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
|
||||
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
||||
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
||||
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
||||
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
||||
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||
Fishing.ItemFound=[[GRAY]]Treasure found!
|
||||
m.SkillFishing=FISHING
|
||||
@@ -387,4 +371,45 @@ m.TamingSummon=[[GREEN]]Summoning complete
|
||||
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
|
||||
m.EffectsTaming7_0=Call of the Wild
|
||||
m.EffectsTaming7_1=Summon a wolf to your side
|
||||
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
|
||||
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
|
||||
m.EffectsTaming8_0=Fast Food Service
|
||||
m.EffectsTaming8_1=Chance for wolves to heal on attack
|
||||
m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE)
|
||||
m.AbilBonusTaming5_0=Fast Food Service
|
||||
m.AbilBonusTaming5_1=50% Chance for heal on attack
|
||||
Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]!
|
||||
m.EffectsMining3_0=Blast Mining
|
||||
m.EffectsMining3_1=Bonuses to mining with TNT
|
||||
m.EffectsMining4_0=Bigger Bombs
|
||||
m.EffectsMining4_1=Increases TNT explosion radius
|
||||
m.EffectsMining5_0=Demolitions Expertise
|
||||
m.EffectsMining5_1=Decreases damage from TNT explosions
|
||||
m.AbilLockMining1=LOCKED UNTIL 125+ SKILL (BLAST MINING)
|
||||
m.AbilLockMining2=LOCKED UNTIL 250+ SKILL (BIGGER BOMBS)
|
||||
m.AbilLockMining3=LOCKED UNTIL 500+ SKILL (DEMOLITIONS EXPERTISE)
|
||||
m.MiningBiggerBombs=[[RED]]Blast Radius Increase: [[YELLOW]]+{0}
|
||||
m.MiningDemolitionsExpertDamageDecrease=[[RED]]Demolitions Expert Damage Decrease: [[YELLOW]]{0}%
|
||||
m.MiningBlastMining=[[RED]]Blast Mining: [[YELLOW]] Rank {0} [[GRAY]]({1})
|
||||
m.BlastMining1 = +35% ore yield
|
||||
m.BlastMining2 = +40% ore yield
|
||||
m.BlastMining3 = +45% ore yield, no debris
|
||||
m.BlastMining4 = +50% ore yield, no debris
|
||||
m.BlastMining5 = +55% ore yield, no debris, double drops
|
||||
m.BlastMining6 = +60% ore yield, no debris, double drops
|
||||
m.BlastMining7 = +65% ore yield, no debris, triple drops
|
||||
m.BlastMining8 = +70% ore yield, no debris, triple drops
|
||||
Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
|
||||
Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
|
||||
Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
|
||||
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!
|
||||
Axes.GreaterImpactOnSelf=[[RED]]**HIT BY GREATER IMPACT**
|
||||
Axes.GreaterImpactOnEnemy=[[GREEN]]**STRUCK WITH GREAT FORCE**
|
||||
Skills.BerserkPlayerOff=[[RED]]Berserk[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.GreenTerraPlayerOff=[[RED]]Green Terra[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.TreeFellerPlayerOff=[[RED]]Tree Feller[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SuperBreakerPlayerOff=[[RED]]Super Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SkullSplitterPlayerOff=[[RED]]Skull Splitter[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.GigaDrillBreakerPlayerOff=[[RED]]Giga Drill Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SerratedStrikesPlayerOff=[[RED]]Serrated Strikes[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.BlastMiningPlayer=[[GREEN]]{0}[[DARK_GREEN]] has used [[RED]]Blast Mining!
|
||||
Skills.YourBlastMining=[[GREEN]]Your [[YELLOW]]Blast Mining [[GREEN]]ability is refreshed!
|
||||
@@ -27,7 +27,7 @@ m.mccMySpawn=- Teleportar para o spawn
|
||||
m.mccClearMySpawn=- Remove o Ponto de Spawn
|
||||
m.mccToggleAbility=- Ativa habilidades especiais com botao direito
|
||||
m.mccAdminToggle=- Ativa o chat dos admin
|
||||
m.mccWhois=[playername] [[RED]]- Ver informaçoes do jogador
|
||||
m.mccInspect=[playername] [[RED]]- Ver informaçoes do jogador
|
||||
m.mccMmoedit=[playername] [skill] [newvalue] [[RED]]- Modificar atributos do jogador
|
||||
m.mccMcGod=- Modo Deus
|
||||
m.mccSkillInfo=[skillname] [[RED]]- Ver informaçoes sobre a habilidade
|
||||
@@ -40,7 +40,7 @@ m.AbilityBonusTemplate=[[RED]]{0}: [[YELLOW]]{1}
|
||||
m.Effects=EFEITOS
|
||||
m.YourStats=SUAS ESTATISTICAS
|
||||
m.SkillTaming=DOMESTICAR
|
||||
m.XPGainTaming=Ataque com um lobo
|
||||
m.XPGainTaming=Animal Taming, or combat w/ your wolves
|
||||
m.EffectsTaming1_0=Conhecimento de Feras
|
||||
m.EffectsTaming1_1=Inspeciona um lobo com um osso
|
||||
m.EffectsTaming2_0=Mordida
|
||||
@@ -101,12 +101,19 @@ m.XPGainAxes=Atacando monstros
|
||||
m.EffectsAxes1_0=Rachador de Crânios (HABILIDADE ESPECIAL)
|
||||
m.EffectsAxes1_1=Causa Danos em Area
|
||||
m.EffectsAxes2_0=Ataques Críticos
|
||||
m.EffectsAxes2_1=Dobra o Dano
|
||||
m.EffectsAxes3_0=Mestre com Machados (NIVEL 500)
|
||||
m.EffectsAxes3_1=Aumenta o Dano
|
||||
m.AbilLockAxes1=DESBLOQUEIE NO NIVEL 500 (Mestre com Machados)
|
||||
m.AbilBonusAxes1_0=Mestre com Machados/
|
||||
m.AbilBonusAxes1_1=Bônus de 4 de dano
|
||||
m.EffectsAxes3_0=Axe Mastery
|
||||
m.EffectsAxes3_1=Adds bonus DMG
|
||||
m.EffectsAxes4_0=Impact
|
||||
m.EffectsAxes4_1=Strike with enough force to shatter armor
|
||||
m.EffectsAxes5_0=Greater Impact
|
||||
m.EffectsAxes5_1=Deal bonus damage to unarmored foes
|
||||
m.AbilLockAxes1=LOCKED UNTIL 500+ SKILL (AXE MASTERY)
|
||||
m.AbilBonusAxes1_0=Axe Mastery
|
||||
m.AbilBonusAxes1_1=Bonus {0} damage
|
||||
m.AbilBonusAxes2_0=Impact
|
||||
m.AbilBonusAxes2_1=Deal {0} DMG to armor
|
||||
m.AbilBonusAxes3_0=Greater Impact
|
||||
m.AbilBonusAxes3_1=Deal {0} Bonus DMG to the unarmored
|
||||
m.AxesCritChance=[[RED]]Chance ataque crítico: [[YELLOW]]{0}%
|
||||
m.AxesSkullLength=[[RED]]Duraçao do Rachador de Crânios: [[YELLOW]]{0}s
|
||||
|
||||
@@ -162,29 +169,21 @@ m.EffectsRepair4_0=Repara
|
||||
m.EffectsRepair4_1=Rapara Ferramentas e Armaduras de Diamante
|
||||
m.RepairRepairMastery=[[RED]]Mestre em Raparaçao: [[YELLOW]]{0}% extra restaurado
|
||||
m.RepairSuperRepairChance=[[RED]]Chance de Super Reparaçao: [[YELLOW]]{0}%
|
||||
|
||||
m.SkillUnarmed=DESARMADO
|
||||
m.XPGainUnarmed=Atacando monstros
|
||||
m.EffectsUnarmed1_0=Fúria (HABILIDADE ESPECIAL)
|
||||
m.EffectsUnarmed1_1=+50% de Dano, Quebra materiais frágeis
|
||||
m.EffectsUnarmed2_0=Desarmar (Jogadores)
|
||||
m.EffectsUnarmed2_1=Derruba a arma que o adversário está segurando
|
||||
m.EffectsUnarmed3_0=Mestre do Desarmamento
|
||||
m.EffectsUnarmed3_1=Aumenta muito o Dano
|
||||
m.EffectsUnarmed4_0=Aprendiz do Desarmamento
|
||||
m.EffectsUnarmed4_1=Aumenta o Dano
|
||||
m.EffectsUnarmed3_0=Iron Arm Style
|
||||
m.EffectsUnarmed3_1=Hardens your arm over time
|
||||
m.EffectsUnarmed5_0=Desviar Flechas
|
||||
m.EffectsUnarmed5_1=Desvia Flechas jogadas em você
|
||||
m.AbilLockUnarmed1=DESBLOQUEIE NO NIVEL 250 (APRENDIZ DE DESARMAMENTO)
|
||||
m.AbilLockUnarmed2=DESBLOQUEIE NO NIVEL 500 (MESTRE DE DESARMAMENTO)
|
||||
m.AbilBonusUnarmed1_0=Aprendiz do Desarmamento
|
||||
m.AbilBonusUnarmed1_1=+2 de Danos
|
||||
m.AbilBonusUnarmed2_0=Mestre do Desarmamento
|
||||
m.AbilBonusUnarmed2_1=+4 de Danos
|
||||
m.AbilBonusUnarmed2_0=Iron Arm Style
|
||||
m.AbilBonusUnarmed2_1=+{0} DMG Upgrade
|
||||
m.UnarmedArrowDeflectChance=[[RED]]Chance de Desviar Flechas: [[YELLOW]]{0}%
|
||||
m.UnarmedDisarmChance=[[RED]]Chance de Desarmar: [[YELLOW]]{0}%
|
||||
m.UnarmedBerserkLength=[[RED]]Duraçao da Fúria: [[YELLOW]]{0}s
|
||||
|
||||
m.SkillHerbalism=HERBALISMO
|
||||
m.XPGainHerbalism=Colhendo Ervas
|
||||
m.EffectsHerbalism1_0=Green Terra (HABILIDADE ESPECIAL)
|
||||
@@ -193,16 +192,15 @@ m.EffectsHerbalism2_0=Dedos Verdes (Trigo)
|
||||
m.EffectsHerbalism2_1=Planta automaticamente, ao colher trigo
|
||||
m.EffectsHerbalism3_0=Dedos Verdes (Pedras)
|
||||
m.EffectsHerbalism3_1=Transforma Cobblestone em Moss Stone (usa sementes)
|
||||
m.EffectsHerbalism4_0=Comida+
|
||||
m.EffectsHerbalism4_1=Aumenta a vida recebida comendo pao ou sopa
|
||||
m.EffectsHerbalism4_0=Farmer's Diet
|
||||
m.EffectsHerbalism4_1=Improves hunger restored from herbalist foods
|
||||
m.EffectsHerbalism5_0=Drop x2 (Todas Ervas)
|
||||
m.EffectsHerbalism5_1=Dobra a quantia de itens obtidos colhendo
|
||||
m.HerbalismGreenTerraLength=[[RED]]Duraçao do Green Terra: [[YELLOW]]{0}s
|
||||
m.HerbalismGreenThumbChance=[[RED]]Chance do Dedos Verdes: [[YELLOW]]{0}%
|
||||
m.HerbalismGreenThumbStage=[[RED]]Nível do Dedos Verdes: [[YELLOW]] Trigo Cresce no Nível {0}
|
||||
m.HerbalismDoubleDropChance=[[RED]]Chance de Drop x2: [[YELLOW]]{0}%
|
||||
m.HerbalismFoodPlus=[[RED]]Comida+ (Rank{0}): [[YELLOW]]Bônus de {0} de vida
|
||||
|
||||
m.HerbalismFoodPlus=[[RED]]Farmers Diet: [[YELLOW]]Rank {0}
|
||||
m.SkillExcavation=ESCAVAÇAO
|
||||
m.XPGainExcavation=Cavando e encontrando tesouros
|
||||
m.EffectsExcavation1_0=Super Broca (HABILIDADE ESPECIAL)
|
||||
@@ -210,7 +208,6 @@ m.EffectsExcavation1_1=Drop x3, EXP x3, mais velocidade
|
||||
m.EffectsExcavation2_0=Caçad/or de Tesouros
|
||||
m.EffectsExcavation2_1=Encontra itens raros enquanto cava
|
||||
m.ExcavationGreenTerraLength=[[RED]]Duraçao da Super Broca: [[YELLOW]]{0}s
|
||||
|
||||
mcBlockListener.PlacedAnvil=[[DARK_RED]] Você colocou uma bigorna, a bigorna pode reparar ferramentas e armaduras.
|
||||
mcEntityListener.WolfComesBack=[[DARK_GRAY]]Seu lobo voltou para você...
|
||||
mcPlayerListener.AbilitiesOff=Habilidade especial desabilitada
|
||||
@@ -318,24 +315,12 @@ Skills.NeedMore=[[DARK_RED]]Voc
|
||||
Skills.AdeptDiamond=[[DARK_RED]]Você nao tem o nível necessário para reparar Diamante
|
||||
Skills.FullDurability=[[GRAY]]Já está com Durabilidade cheia.
|
||||
Skills.Disarmed=[[DARK_RED]]Você foi Desarmado!
|
||||
mcPlayerListener.SorcerySkill=Feitiçaria (Sorcery):
|
||||
|
||||
m.SkillSorcery=FEITIÇARIA
|
||||
Sorcery.HasCast=[[GREEN]]*CASTING*[[GOLD]]
|
||||
Sorcery.Current_Mana=[[DARK_AQUA]]MP
|
||||
Sorcery.SpellSelected=[[GREEN]]-=([[GOLD]]{0}[[GREEN]])=- [[RED]]([[GRAY]]{1}[[RED]])
|
||||
Sorcery.Cost=[[RED]][COST] {0} MP
|
||||
Sorcery.OOM=[[DARK_AQUA]][[[GOLD]]{2}[[DARK_AQUA]]][[DARK_GRAY]] Sem Mana [[YELLOW]]([[RED]]{0}[[YELLOW]]/[[GRAY]]{1}[[YELLOW]])
|
||||
Sorcery.Water.Thunder=TROVAO
|
||||
Sorcery.Curative.Self=CURAR-SE
|
||||
Sorcery.Curative.Other=CURAR AMIGOS
|
||||
|
||||
m.LVL=[[DARK_GRAY]]LVL: [[GREEN]]{0} [[DARK_AQUA]]XP[[YELLOW]]([[GOLD]]{1}[[YELLOW]]/[[GOLD]]{2}[[YELLOW]])
|
||||
Combat.BeastLore=[[GREEN]]*CONHECIMENTO DE FERAS*
|
||||
Combat.BeastLoreOwner=[[DARK_AQUA]]Dono ([[RED]]{0}[[DARK_AQUA]])
|
||||
Combat.BeastLoreHealthWolfTamed=[[DARK_AQUA]]Health ([[GREEN]]{0}[[DARK_AQUA]]/20)
|
||||
Combat.BeastLoreHealthWolf=[[DARK_AQUA]]Vida ([[GREEN]]{0}[[DARK_AQUA]]/8)
|
||||
mcMMO.Description=[[DARK_AQUA]]Q: O QUE E? [[GOLD]]mcMMO é um mod [[RED]]OPEN SOURCE[[GOLD]] de RPG para a plataforma "Bukkit" feito por [[BLUE]]nossr50.[[GOLD]] Ele acresenta uma série de habilidades ao Minecraft. [[GOLD]]Você pode ganhar experiência de muitas maneiras.,[[GOLD]]Digite [[GREEN]]/NOME_DA_HABILIDADE[[GOLD]] para obter informaçoes sobre a habilidade.,[[DARK_AQUA]]Q: O QUE ELE FAZ? [[GOLD]]Por exemplo... em [[DARK_AQUA]]Mineraçao[[GOLD]] você receberá benefícios tais como [[RED]]Drop x2[[GOLD]] ou a habilidade [[RED]]Super Esmagador.[[GOLD]] que quando ativada com o clique direito permite minerar rapidamente durante sua duraçao. [[GOLD]]que depende do nível da sua habilidade. Aumentar o nível de [[BLUE]]Mineraçao[[GOLD]] é simples. basta minerar pedras ou minérios!,[[GOLD]]O objetivo do mcMMO é criar uma experiência de RPG de qualidade.,[[GOLD]]Digite [[GREEN]]/{0}[[GOLD]] para uma lista de comandos possíveis.,[[DARK_AQUA]]Q: ONDE POSSO SUGERIR IDEIAS!?,[[GOLD]]No tópico do mcMMO no fórum bukkit! (www.bit.ly/MCmmoIDEA),[[DARK_AQUA]]Q: Para mais informaçoes. leia a wiki do McMMO: [[RED]]mcmmo.wikia.com
|
||||
mcMMO.Description=[[DARK_AQUA]]About the [[YELLOW]]mcMMO[[DARK_AQUA]] Project:,[[GOLD]]mcMMO is an [[RED]]open source[[GOLD]] RPG mod created in February 2011,[[GOLD]]by [[BLUE]]nossr50[[GOLD]]. The goal is to provide a quality RPG experience.,[[DARK_AQUA]]Tips:,[[GOLD]] - [[GREEN]]Use [[RED]]/mcc[[GREEN]] to see commands,[[GOLD]] - [[GREEN]]Type [[RED]]/SKILLNAME[[GREEN]] to see detailed skill info,[[DARK_AQUA]]Developers:,[[GOLD]] - [[GREEN]]TheYeti [[BLUE]](Project Lead & Developer),[[GOLD]] - [[GREEN]]NuclearW [[BLUE]](Developer),[[GOLD]] - [[GREEN]]GJ [[BLUE]](Developer),[[GOLD]] - [[GREEN]]nossr50 [[BLUE]](Developer & Creator),[[DARK_AQUA]]Useful Links:,[[GOLD]] - [[GREEN]]issues.mcmmo.org[[GOLD]] Bug Reporting,[[GOLD]] - [[GREEN]]#mcmmo @ irc.esper.net[[GOLD]] IRC Chat,[[GOLD]] - [[GREEN]]www.mcmmo.org[[GOLD]] Official Website,[[GOLD]] - [[GREEN]]http://bit.ly/x3Yvry[[GOLD]] Bukkit Forum Thread,[[GOLD]] - [[GREEN]]https://twitter.com/#!/mcmmo_dev[[GOLD]] mcMMO Twitter,[[DARK_AQUA]]Donation Info:
|
||||
Party.Locked=[[RED]]Equipe está trancada, só o líder pode convidar.
|
||||
Party.IsntLocked=[[GRAY]]Equipe nao está trancada
|
||||
Party.Unlocked=[[GRAY]]Equipe foi Destrancada
|
||||
@@ -363,14 +348,8 @@ Commands.xprate.started2=[[GOLD]]XP RATE AGORA
|
||||
Commands.xplock.locked=[[GOLD]]Sua barra de XP BAR está travada em {0}!
|
||||
Commands.xplock.unlocked=[[GOLD]]Sua barra de XP foi [[GREEN]]DESTRAVADA[[GOLD]]!
|
||||
Commands.xplock.invalid=[[RED]]Nao existe habilidade com esse nome! Tente /xplock mining
|
||||
m.SkillAlchemy=ALCHEMY
|
||||
m.SkillEnchanting=ENCHANTING
|
||||
m.SkillFishing=FISHING
|
||||
mcPlayerListener.AlchemySkill=Alchemy:
|
||||
mcPlayerListener.EnchantingSkill=Enchanting:
|
||||
mcPlayerListener.FishingSkill=Fishing:
|
||||
Skills.AlchemyUp=[[YELLOW]]Alchemy skill increased by {0}. Total ({1})
|
||||
Skills.EnchantingUp=[[YELLOW]]Enchanting skill increased by {0}. Total ({1})
|
||||
Skills.FishingUp=[[YELLOW]]Fishing skill increased by {0}. Total ({1})
|
||||
Repair.LostEnchants=[[RED]]You were not skilled enough to keep any enchantments.
|
||||
Repair.ArcanePerfect=[[GREEN]]You have sustained the arcane energies in this item.
|
||||
@@ -381,8 +360,6 @@ m.EffectsRepair5_1=Repair magic items
|
||||
m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
|
||||
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
||||
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
||||
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
||||
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
||||
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||
Fishing.ItemFound=[[GRAY]]Treasure found!
|
||||
m.SkillFishing=FISHING
|
||||
@@ -401,4 +378,45 @@ m.TamingSummon=[[GREEN]]Summoning complete
|
||||
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
|
||||
m.EffectsTaming7_0=Call of the Wild
|
||||
m.EffectsTaming7_1=Summon a wolf to your side
|
||||
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
|
||||
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
|
||||
m.EffectsTaming8_0=Fast Food Service
|
||||
m.EffectsTaming8_1=Chance for wolves to heal on attack
|
||||
m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE)
|
||||
m.AbilBonusTaming5_0=Fast Food Service
|
||||
m.AbilBonusTaming5_1=50% Chance for heal on attack
|
||||
Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]!
|
||||
m.EffectsMining3_0=Blast Mining
|
||||
m.EffectsMining3_1=Bonuses to mining with TNT
|
||||
m.EffectsMining4_0=Bigger Bombs
|
||||
m.EffectsMining4_1=Increases TNT explosion radius
|
||||
m.EffectsMining5_0=Demolitions Expertise
|
||||
m.EffectsMining5_1=Decreases damage from TNT explosions
|
||||
m.AbilLockMining1=LOCKED UNTIL 125+ SKILL (BLAST MINING)
|
||||
m.AbilLockMining2=LOCKED UNTIL 250+ SKILL (BIGGER BOMBS)
|
||||
m.AbilLockMining3=LOCKED UNTIL 500+ SKILL (DEMOLITIONS EXPERTISE)
|
||||
m.MiningBiggerBombs=[[RED]]Blast Radius Increase: [[YELLOW]]+{0}
|
||||
m.MiningDemolitionsExpertDamageDecrease=[[RED]]Demolitions Expert Damage Decrease: [[YELLOW]]{0}%
|
||||
m.MiningBlastMining=[[RED]]Blast Mining: [[YELLOW]] Rank {0} [[GRAY]]({1})
|
||||
m.BlastMining1 = +35% ore yield
|
||||
m.BlastMining2 = +40% ore yield
|
||||
m.BlastMining3 = +45% ore yield, no debris
|
||||
m.BlastMining4 = +50% ore yield, no debris
|
||||
m.BlastMining5 = +55% ore yield, no debris, double drops
|
||||
m.BlastMining6 = +60% ore yield, no debris, double drops
|
||||
m.BlastMining7 = +65% ore yield, no debris, triple drops
|
||||
m.BlastMining8 = +70% ore yield, no debris, triple drops
|
||||
Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
|
||||
Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
|
||||
Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
|
||||
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!
|
||||
Axes.GreaterImpactOnSelf=[[RED]]**HIT BY GREATER IMPACT**
|
||||
Axes.GreaterImpactOnEnemy=[[GREEN]]**STRUCK WITH GREAT FORCE**
|
||||
Skills.BerserkPlayerOff=[[RED]]Berserk[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.GreenTerraPlayerOff=[[RED]]Green Terra[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.TreeFellerPlayerOff=[[RED]]Tree Feller[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SuperBreakerPlayerOff=[[RED]]Super Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SkullSplitterPlayerOff=[[RED]]Skull Splitter[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.GigaDrillBreakerPlayerOff=[[RED]]Giga Drill Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SerratedStrikesPlayerOff=[[RED]]Serrated Strikes[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.BlastMiningPlayer=[[GREEN]]{0}[[DARK_GREEN]] has used [[RED]]Blast Mining!
|
||||
Skills.YourBlastMining=[[GREEN]]Your [[YELLOW]]Blast Mining [[GREEN]]ability is refreshed!
|
||||
@@ -28,7 +28,7 @@ m.mccMySpawn=-
|
||||
m.mccClearMySpawn=- Убирает вашу кровать
|
||||
m.mccToggleAbility=- Активировать возможность правым кликом мыши
|
||||
m.mccAdminToggle=- Включить админский чат
|
||||
m.mccWhois=[playername] [[RED]]- Посмотреть детальную информацию
|
||||
m.mccInspect=[playername] [[RED]]- Посмотреть детальную информацию
|
||||
m.mccMmoedit=[playername] [skill] [newvalue] [[RED]]- Изменить цель
|
||||
m.mccMcGod=- Режим Бога
|
||||
m.mccSkillInfo=[skillname] [[RED]]- Посмотреть детальную информацию о умении
|
||||
@@ -41,7 +41,7 @@ m.AbilityBonusTemplate=[[RED]]{0}: [[YELLOW]]{1}
|
||||
m.Effects=ЭФФЕКТЫ
|
||||
m.YourStats=ВАШИ ХАРАКТЕРИСТИКИ
|
||||
m.SkillTaming=Приручение
|
||||
m.XPGainTaming=Волки причиняют ущерб
|
||||
m.XPGainTaming=Animal Taming, or combat w/ your wolves
|
||||
m.EffectsTaming1_0=Удар Волка
|
||||
m.EffectsTaming1_1=Уменьшение количества костей
|
||||
m.EffectsTaming2_0=Окравление
|
||||
@@ -100,11 +100,19 @@ m.EffectsAxes1_0=
|
||||
m.EffectsAxes1_1=Увеличение урона от топора
|
||||
m.EffectsAxes2_0=Критические удары
|
||||
m.EffectsAxes2_1=Двойной урон
|
||||
m.EffectsAxes3_0=Мастерство топора(500 уровень)
|
||||
m.EffectsAxes3_1=Улучшение урона
|
||||
m.AbilLockAxes1=Блокируется до 500+ уровня(Мастерство топора)
|
||||
m.AbilBonusAxes1_0=Мастерство топора
|
||||
m.AbilBonusAxes1_1=Дает бонус в 4 урона
|
||||
m.EffectsAxes3_0=Axe Mastery
|
||||
m.EffectsAxes3_1=Adds bonus DMG
|
||||
m.EffectsAxes4_0=Impact
|
||||
m.EffectsAxes4_1=Strike with enough force to shatter armor
|
||||
m.EffectsAxes5_0=Greater Impact
|
||||
m.EffectsAxes5_1=Deal bonus damage to unarmored foes
|
||||
m.AbilLockAxes1=LOCKED UNTIL 500+ SKILL (AXE MASTERY)
|
||||
m.AbilBonusAxes1_0=Axe Mastery
|
||||
m.AbilBonusAxes1_1=Bonus {0} damage
|
||||
m.AbilBonusAxes2_0=Impact
|
||||
m.AbilBonusAxes2_1=Deal {0} DMG to armor
|
||||
m.AbilBonusAxes3_0=Greater Impact
|
||||
m.AbilBonusAxes3_1=Deal {0} Bonus DMG to the unarmored
|
||||
m.AxesCritChance=[[RED]]Шанс критического удара: [[YELLOW]]{0}%
|
||||
m.AxesSkullLength=[[RED]]Продолжительность Разрушителя Черепов: [[YELLOW]]{0}s
|
||||
m.SkillSwords=Мечи
|
||||
@@ -162,18 +170,12 @@ m.EffectsUnarmed1_0=
|
||||
m.EffectsUnarmed1_1=+50% Урона, Ломать слабые материалы
|
||||
m.EffectsUnarmed2_0=Обезоружение(Игроки)
|
||||
m.EffectsUnarmed2_1=Падает оружие противника на землю, которое находится в руках у него.
|
||||
m.EffectsUnarmed3_0=Мастер Рукопашного боя
|
||||
m.EffectsUnarmed3_1=Улучшение урона от кулаков
|
||||
m.EffectsUnarmed4_0=Ученик рукопашного боя
|
||||
m.EffectsUnarmed4_1=Увеличение урона от кулаков
|
||||
m.EffectsUnarmed3_0=Iron Arm Style
|
||||
m.EffectsUnarmed3_1=Hardens your arm over time
|
||||
m.EffectsUnarmed5_0=Отражение стрел
|
||||
m.EffectsUnarmed5_1=Стрелы отражаются
|
||||
m.AbilLockUnarmed1=Блокируется до 250+ уровня(Ученик рукопашного боя)
|
||||
m.AbilLockUnarmed2=Блокируется до 500+ уровня(Мастер Рукопашного боя)
|
||||
m.AbilBonusUnarmed1_0=Ученик рукопашного боя
|
||||
m.AbilBonusUnarmed1_1=+2 бонус к урону
|
||||
m.AbilBonusUnarmed2_0=Мастер Рукопашного боя
|
||||
m.AbilBonusUnarmed2_1=+4 бонус к урону
|
||||
m.AbilBonusUnarmed2_0=Iron Arm Style
|
||||
m.AbilBonusUnarmed2_1=+{0} DMG Upgrade
|
||||
m.UnarmedArrowDeflectChance=[[RED]]Шанс отразить стрелы: [[YELLOW]]{0}%
|
||||
m.UnarmedDisarmChance=[[RED]]Шанс обезоружить: [[YELLOW]]{0}%
|
||||
m.UnarmedBerserkLength=[[RED]]Длительность "Берсерка": [[YELLOW]]{0}s
|
||||
@@ -185,15 +187,15 @@ m.EffectsHerbalism2_0="
|
||||
m.EffectsHerbalism2_1=Авто выращивание пщеницы после посадки
|
||||
m.EffectsHerbalism3_0="Зеленый фермер"(Мох)
|
||||
m.EffectsHerbalism3_1=Камень -> Замшелый камень + семена
|
||||
m.EffectsHerbalism4_0=Улучшение еды
|
||||
m.EffectsHerbalism4_1=Улучшает количество здоровья от хлеба и грибного супа
|
||||
m.EffectsHerbalism4_0=Farmer's Diet
|
||||
m.EffectsHerbalism4_1=Improves hunger restored from herbalist foods
|
||||
m.EffectsHerbalism5_0=Дройной дроп(Все растения)
|
||||
m.EffectsHerbalism5_1=Двойной дроп становится нормальным
|
||||
m.HerbalismGreenTerraLength=[[RED]]Продолжительность "Озеленителя": [[YELLOW]]{0}s
|
||||
m.HerbalismGreenThumbChance=[[RED]]Шанс "Зеленого фермера": [[YELLOW]]{0}%
|
||||
m.HerbalismGreenThumbStage=[[RED]]Уровень "Зеленого фермера": [[YELLOW]] Пщеница растет по-уровнево {0}
|
||||
m.HerbalismDoubleDropChance=[[RED]]Шанс двойного дропа: [[YELLOW]]{0}%
|
||||
m.HerbalismFoodPlus=[[RED]]Еда+ (Rank{0}): [[YELLOW]]Бонус {0} лечения
|
||||
m.HerbalismFoodPlus=[[RED]]Farmers Diet: [[YELLOW]]Rank {0}
|
||||
m.SkillExcavation=Раскопка
|
||||
m.XPGainExcavation=Раскапывать и искать сокровища
|
||||
m.EffectsExcavation1_0=Мега дрель(способность)
|
||||
@@ -307,16 +309,6 @@ Skills.NeedMore=[[DARK_RED]]
|
||||
Skills.AdeptDiamond=[[DARK_RED]]Вы не обучены чинить алмазные инструменты и броню
|
||||
Skills.FullDurability=[[GRAY]]Вещь не нуждается в починке.
|
||||
Skills.Disarmed=[[DARK_RED]]Вы обезоружены!
|
||||
mcPlayerListener.SorcerySkill=Колдовство:
|
||||
m.SkillSorcery=Колдовство
|
||||
Sorcery.HasCast=[[GREEN]]**Использую "Колдовство"**[[GOLD]]
|
||||
Sorcery.Current_Mana=[[DARK_AQUA]] Маны
|
||||
Sorcery.SpellSelected=[[GREEN]]-=([[GOLD]]{0}[[GREEN]])=- [[RED]]([[GRAY]]{1}[[RED]])
|
||||
Sorcery.Cost=[[RED]][COST] {0} Маны
|
||||
Sorcery.OOM=[[DARK_AQUA]][[[GOLD]]{2}[[DARK_AQUA]]][[DARK_GRAY]] Не хватает маны [[YELLOW]]([[RED]]{0}[[YELLOW]]/[[GRAY]]{1}[[YELLOW]])
|
||||
Sorcery.Water.Thunder=Гром
|
||||
Sorcery.Curative.Self=Вылечить себя
|
||||
Sorcery.Curative.Other=Вылечить других
|
||||
m.LVL=[[DARK_GRAY]]Уровень: [[GREEN]]{0} [[DARK_AQUA]]XP[[YELLOW]]([[GOLD]]{1}[[YELLOW]]/[[GOLD]]{2}[[YELLOW]])
|
||||
Combat.BeastLore=[[GREEN]]**Умение "Удар волка" активировано**
|
||||
Combat.BeastLoreOwner=[[DARK_AQUA]]Владелец ([[RED]]{0}[[DARK_AQUA]])
|
||||
@@ -340,15 +332,9 @@ Party.PasswordSet=[[GREEN]]
|
||||
Party.CouldNotKick=[[DARK_RED]]Вы не можете убрать игрока из группы {0}
|
||||
Party.NotInYourParty=[[DARK_RED]]{0} не в группе
|
||||
Party.CouldNotSetOwner=[[DARK_RED]]Вы не можете отдать лидерство игроку {0}
|
||||
mcMMO.Description=[[DARK_AQUA]]Q: Что это?,[[GOLD]]mcMMO это [[RED]]ОПЕН СУРС[[GOLD]] RPG мод для сервера Bukkit от пользователя [[BLUE]]nossr50,[[GOLD]]Здесь было добавлено много умений для Minecraft сервера.,[[GOLD]]Вы можете прокачать их разными способами,[[GOLD]]Вы хотите найти больше информации о умении [[GREEN]]/SKILLNAME[[GOLD]] ?,[[DARK_AQUA]]Q: Что я должен сделать?,[[GOLD]]Для примера... in [[DARK_AQUA]]Шахтёрство[[GOLD]] вы получите [[RED]]2-ой дроп[[GOLD]] или способность [[RED]]"Супер разрушитель"[[GOLD]] ,которая активируется [[GOLD]]нажатием правой кнопки мыши на некоторое время,[[GOLD]]связанное с вашим уровнем умения. Поднять уровень [[BLUE]]Шахтёрства,[[GOLD]]легко просто копайте руды и камни!
|
||||
m.SkillAlchemy=ALCHEMY
|
||||
m.SkillEnchanting=ENCHANTING
|
||||
m.SkillFishing=FISHING
|
||||
mcPlayerListener.AlchemySkill=Alchemy:
|
||||
mcPlayerListener.EnchantingSkill=Enchanting:
|
||||
mcMMO.Description=[[DARK_AQUA]]About the [[YELLOW]]mcMMO[[DARK_AQUA]] Project:,[[GOLD]]mcMMO is an [[RED]]open source[[GOLD]] RPG mod created in February 2011,[[GOLD]]by [[BLUE]]nossr50[[GOLD]]. The goal is to provide a quality RPG experience.,[[DARK_AQUA]]Tips:,[[GOLD]] - [[GREEN]]Use [[RED]]/mcc[[GREEN]] to see commands,[[GOLD]] - [[GREEN]]Type [[RED]]/SKILLNAME[[GREEN]] to see detailed skill info,[[DARK_AQUA]]Developers:,[[GOLD]] - [[GREEN]]TheYeti [[BLUE]](Project Lead & Developer),[[GOLD]] - [[GREEN]]NuclearW [[BLUE]](Developer),[[GOLD]] - [[GREEN]]GJ [[BLUE]](Developer),[[GOLD]] - [[GREEN]]nossr50 [[BLUE]](Developer & Creator),[[DARK_AQUA]]Useful Links:,[[GOLD]] - [[GREEN]]issues.mcmmo.org[[GOLD]] Bug Reporting,[[GOLD]] - [[GREEN]]#mcmmo @ irc.esper.net[[GOLD]] IRC Chat,[[GOLD]] - [[GREEN]]www.mcmmo.org[[GOLD]] Official Website,[[GOLD]] - [[GREEN]]http://bit.ly/x3Yvry[[GOLD]] Bukkit Forum Thread,[[GOLD]] - [[GREEN]]https://twitter.com/#!/mcmmo_dev[[GOLD]] mcMMO Twitter,[[DARK_AQUA]]Donation Info:
|
||||
m.SkillFishing=FISHING
|
||||
mcPlayerListener.FishingSkill=Fishing:
|
||||
Skills.AlchemyUp=[[YELLOW]]Alchemy skill increased by {0}. Total ({1})
|
||||
Skills.EnchantingUp=[[YELLOW]]Enchanting skill increased by {0}. Total ({1})
|
||||
Skills.FishingUp=[[YELLOW]]Fishing skill increased by {0}. Total ({1})
|
||||
Repair.LostEnchants=[[RED]]You were not skilled enough to keep any enchantments.
|
||||
Repair.ArcanePerfect=[[GREEN]]You have sustained the arcane energies in this item.
|
||||
@@ -359,8 +345,6 @@ m.EffectsRepair5_1=Repair magic items
|
||||
m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
|
||||
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
||||
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
||||
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
||||
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
||||
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||
Fishing.ItemFound=[[GRAY]]Treasure found!
|
||||
m.SkillFishing=FISHING
|
||||
@@ -379,4 +363,45 @@ m.TamingSummon=[[GREEN]]Summoning complete
|
||||
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
|
||||
m.EffectsTaming7_0=Call of the Wild
|
||||
m.EffectsTaming7_1=Summon a wolf to your side
|
||||
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
|
||||
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand
|
||||
m.EffectsTaming8_0=Fast Food Service
|
||||
m.EffectsTaming8_1=Chance for wolves to heal on attack
|
||||
m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE)
|
||||
m.AbilBonusTaming5_0=Fast Food Service
|
||||
m.AbilBonusTaming5_1=50% Chance for heal on attack
|
||||
Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]!
|
||||
m.EffectsMining3_0=Blast Mining
|
||||
m.EffectsMining3_1=Bonuses to mining with TNT
|
||||
m.EffectsMining4_0=Bigger Bombs
|
||||
m.EffectsMining4_1=Increases TNT explosion radius
|
||||
m.EffectsMining5_0=Demolitions Expertise
|
||||
m.EffectsMining5_1=Decreases damage from TNT explosions
|
||||
m.AbilLockMining1=LOCKED UNTIL 125+ SKILL (BLAST MINING)
|
||||
m.AbilLockMining2=LOCKED UNTIL 250+ SKILL (BIGGER BOMBS)
|
||||
m.AbilLockMining3=LOCKED UNTIL 500+ SKILL (DEMOLITIONS EXPERTISE)
|
||||
m.MiningBiggerBombs=[[RED]]Blast Radius Increase: [[YELLOW]]+{0}
|
||||
m.MiningDemolitionsExpertDamageDecrease=[[RED]]Demolitions Expert Damage Decrease: [[YELLOW]]{0}%
|
||||
m.MiningBlastMining=[[RED]]Blast Mining: [[YELLOW]] Rank {0} [[GRAY]]({1})
|
||||
m.BlastMining1 = +35% ore yield
|
||||
m.BlastMining2 = +40% ore yield
|
||||
m.BlastMining3 = +45% ore yield, no debris
|
||||
m.BlastMining4 = +50% ore yield, no debris
|
||||
m.BlastMining5 = +55% ore yield, no debris, double drops
|
||||
m.BlastMining6 = +60% ore yield, no debris, double drops
|
||||
m.BlastMining7 = +65% ore yield, no debris, triple drops
|
||||
m.BlastMining8 = +70% ore yield, no debris, triple drops
|
||||
Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
|
||||
Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
|
||||
Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
|
||||
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!
|
||||
Axes.GreaterImpactOnSelf=[[RED]]**HIT BY GREATER IMPACT**
|
||||
Axes.GreaterImpactOnEnemy=[[GREEN]]**STRUCK WITH GREAT FORCE**
|
||||
Skills.BerserkPlayerOff=[[RED]]Berserk[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.GreenTerraPlayerOff=[[RED]]Green Terra[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.TreeFellerPlayerOff=[[RED]]Tree Feller[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SuperBreakerPlayerOff=[[RED]]Super Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SkullSplitterPlayerOff=[[RED]]Skull Splitter[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.GigaDrillBreakerPlayerOff=[[RED]]Giga Drill Breaker[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.SerratedStrikesPlayerOff=[[RED]]Serrated Strikes[[GREEN]] has worn off for [[YELLOW]]{0}
|
||||
Skills.BlastMiningPlayer=[[GREEN]]{0}[[DARK_GREEN]] has used [[RED]]Blast Mining!
|
||||
Skills.YourBlastMining=[[GREEN]]Your [[YELLOW]]Blast Mining [[GREEN]]ability is refreshed!
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user