Page 1 of 1

[MECH] InvTools v1.3.1 - Invincible Tools/Armor for Bukkit!

PostPosted: October 26th, 2011, 10:13 pm
by Drakia
InvTools - Invincible Tools and Armor plugin
Version: 1.3.1
CraftBukkit: 1.1-R5/1.2.3-B2

=============
Description
=============
Invincible tools plugin for Bukkit
I decided to port my invincible tools plugin from hMod to Bukkit!
Added invincible armor too, yay!

Download (Direct JAR): http://thedgtl.net/bukkit/InvTools.jar
Source: https://github.com/TheDgtl/bukkit-InvTools

=============
Features
=============
Ability to set a specific regeneration point (Less resource intensive if you're only making diamond invincible)
Set what tools are invincible
Support for SuperPerms
Support for invincible armor

=============
Configuration
=============
toolRepairPoint - At what damage level the tool should be repaired. Higher means longer between repairs.
armorRepairPoint - At what damage level the armor should be repaired. Higher means longer between repairs.
Tools - Comma seperated list of itemIDs to make invincible (Tools).
Armor - Comma seperated list of itemIDs to make invincible (Armor).

=============
Permissions
=============
invtools.allowtools - Whether this player/group gets invincible tools. (Default: true)
invtools.allowarmor - Whether this player/group gets invincible armor. (Default: true)

=============
Changes
=============
[Version 1.3.1]
- Fixed issue with missing config.yml defaults
[Version 1.3.0]
- Update to latest Bukkit event system
- Removed Permissions support, SuperPerms from now on
[Version 1.2.3]
- Changed configuration class
[Version 1.2.2]
- Moved dura check to PlayerInteract, will work for F&S now, items used to attack no longer destroyed
- 5 months without an update, woo!
[Version 1.2.1]
- Added updateInventory call to show repairs
[Version 1.2.0]
- Added armor
- Changed config/permissions
[Version 1.1.0]
- Changed version numbering
- Updated permissions hook method
- Updated to latest RB
[Version 1.06]
- More permissions fixes
[Version 1.05]
- Updated to b424jnks
- Fixed permission handling
- Added README
[Version 1.04]
- Re-arranged some checks, speed increase (Not noticeable).

[Version 1.03]
- Changed package name to net.TheDgtl.*
- Created config directory/file if doesn't exist.

[Version 1.02]
- Added Permissions support, though not required.
- Changed to Durability in latest Bukkit versions.

[Version 1.01]
- Switched to Priority.Monitor as I don't stop blocks from being mined.

[Version 1.00]
- Initial release.

Re: [MECH] InvTools v1.2.2 - Invincible Tools/Armor for Bukk

PostPosted: December 22nd, 2011, 5:34 am
by h0us3cat
Drakia wrote:InvTools - Invincible Tools and Armor plugin
Version: 1.2.2
CraftBukkit: 1.0.1-R1

Plugin Dependencies:
Permissions (Optional)

=============
Description
=============
Invincible tools plugin for Bukkit
I decided to port my invincible tools plugin from hMod to Bukkit!
Added invincible armor too, yay!

Download (Direct JAR): http://thedgtl.net/bukkit/InvTools.jar
Source: https://github.com/TheDgtl/bukkit-InvTools

=============
Features
=============
Ability to set a specific regeneration point (Less resource intensive if you're only making diamond invincible)
Set what tools are invincible
Support for Permissions 2.0
Support for SuperPerms
Support for invincible armor

=============
Configuration
=============
toolRepairPoint - At what damage level the tool should be repaired. Higher means longer between repairs.
armorRepairPoint - At what damage level the armor should be repaired. Higher means longer between repairs.
Tools - Comma seperated list of itemIDs to make invincible (Tools).
Armor - Comma seperated list of itemIDs to make invincible (Armor).

=============
Permissions
=============
invtools.allowtools - Whether this player/group gets invincible tools. (Default: true)
invtools.allowarmor - Whether this player/group gets invincible armor. (Default: true)

=============
Changes
=============
[Version 1.2.2]
- Moved dura check to PlayerInteract, will work for F&S now, items used to attack no longer destroyed
- 5 months without an update, woo!
[Version 1.2.1]
- Added updateInventory call to show repairs
[Version 1.2.0]
- Added armor
- Changed config/permissions
[Version 1.1.0]
- Changed version numbering
- Updated permissions hook method
- Updated to latest RB
[Version 1.06]
- More permissions fixes
[Version 1.05]
- Updated to b424jnks
- Fixed permission handling
- Added README
[Version 1.04]
- Re-arranged some checks, speed increase (Not noticeable).

[Version 1.03]
- Changed package name to net.TheDgtl.*
- Created config directory/file if doesn't exist.

[Version 1.02]
- Added Permissions support, though not required.
- Changed to Durability in latest Bukkit versions.

[Version 1.01]
- Switched to Priority.Monitor as I don't stop blocks from being mined.

[Version 1.00]
- Initial release.


" - Moved dura check to PlayerInteract, will work for F&S now, items used to attack no longer destroyed"
Is not changed in the .jar, only on github.
It is still onBlockBreak in the .jar.

Re: [MECH] InvTools v1.2.2 - Invincible Tools/Armor for Bukk

PostPosted: December 22nd, 2011, 8:23 am
by Drakia
h0us3cat wrote:" - Moved dura check to PlayerInteract, will work for F&S now, items used to attack no longer destroyed"
Is not changed in the .jar, only on github.
It is still onBlockBreak in the .jar.

Eclipse is one classy program, silently failed to compile InvTools.java, still updated the .jar with the new plugin.yml >.> New build uploaded.

[Version 1.2.3]
- Changed configuration class

Re: [MECH] InvTools v1.2.2 - Invincible Tools/Armor for Bukk

PostPosted: December 23rd, 2011, 3:30 am
by ZeroPoke
Wait a second. Other people use this plugin?! Nowai!!

Re: [MECH] InvTools v1.2.2 - Invincible Tools/Armor for Bukk

PostPosted: December 23rd, 2011, 3:27 pm
by Darkone003
ZeroPoke wrote:Wait a second. Other people use this plugin?! Nowai!!


My 15 person server was complaining that diamonds are too hard to find... :roll:

Re: [MECH] InvTools v1.2.2 - Invincible Tools/Armor for Bukk

PostPosted: December 23rd, 2011, 3:46 pm
by Drakia
Darkone003 wrote:
ZeroPoke wrote:Wait a second. Other people use this plugin?! Nowai!!


My 15 person server was complaining that diamonds are too hard to find... :roll:

A) Diamonds are EASY to find, you just need to dig deep, or find one of the many many caverns that 1.0.1 generates
2) Once you find diamonds, your tools are invincible, so that's awesome.

Re: [MECH] InvTools v1.2.2 - Invincible Tools/Armor for Bukk

PostPosted: December 29th, 2011, 1:10 am
by Etsijä
This is an awesome plugin, but it seems to be a bit outdated with new bukkit builds. For example, when I take your java code (version 1.2.3) into Eclipse and try to compile it, it gives me an error about the

import com.nijikokun.bukkit.Permissions.Permissions;

The reason is there is no such thing in craftbukkit.jar anymore. Maybe this is due to the inherent permissions support nowadays? Eclipse suggests me to change into using "org.bukkit.permissions.Permission" instead, and then, on the line

Permissions permissions = null;

it suggests me to change into

Permission permissions = null;

This goes well, but then I bump into another error in function hasPerm(), more precisely in

return permissions.getHandler().has(player, perm);

Could you kindly advice me as to what changes to make such that the plugin supports 1.0 also on permissions handling? I've tried to find information from Bukkit regarding handling permissions in plugins, but have found none.

- - -

Another note: player.updateInventory() seems to be deprecated.

Re: [MECH] InvTools v1.2.2 - Invincible Tools/Armor for Bukk

PostPosted: December 29th, 2011, 1:14 am
by Drakia
When compiling this plugin there is a dependency on Nijikokuns Permissions.jar file, however when running if there is no Niji Permissions installed it will fall back to the built in "SuperPerms" system. As for player.updateInventory(), that call has been deprecated since they added it, but is the only way to update a players inventory.
Is there any particular reason you are trying to recompile the plugin?

Re: [MECH] InvTools v1.2.2 - Invincible Tools/Armor for Bukk

PostPosted: December 29th, 2011, 2:00 am
by Etsijä
Well the main reason for trying to recompile is to learn from what you've done - since I'm new to creating plugins for Bukkit and yours is a perfect example of a tiny plugin which does something awesome for us :) There is one other reason - we are getting a bit strange warning messages on our server from time to time, don't really know what they are about, but just to be sure, I'm trying to in general dig deeper into the plugins we use (and, to learn more at the same time).

Thanks for the information you provided!

Re: [MECH] InvTools v1.2.2 - Invincible Tools/Armor for Bukk

PostPosted: February 4th, 2012, 11:53 am
by h0us3cat
@Drakia durability resets when using portals.

Re: [MECH] InvTools v1.2.2 - Invincible Tools/Armor for Bukk

PostPosted: February 4th, 2012, 12:33 pm
by Drakia
h0us3cat, what portals are you referring to? Stargates? Or built in Nether/Ender portals? Also, is this an unexpected reset? Is it goes back to being damaged, or is it going back to being undamaged when it shouldn't?

Re: [MECH] InvTools v1.2.2 - Invincible Tools/Armor for Bukk

PostPosted: February 4th, 2012, 1:42 pm
by h0us3cat
Drakia wrote:h0us3cat, what portals are you referring to? Stargates? Or built in Nether/Ender portals? Also, is this an unexpected reset? Is it goes back to being damaged, or is it going back to being undamaged when it shouldn't?

I use use multiverse.
Let me explain, i have a world where diamond tools are unbreakable, and i have a world2 where they get damage.
If a player go from world2 to world and then back to world2 the damage is gone.

Re: [MECH] InvTools v1.2.2 - Invincible Tools/Armor for Bukk

PostPosted: February 4th, 2012, 1:48 pm
by Drakia
Do you have a plugin that keeps inventory separate between worlds? If not, it's expected behaviour that tools brought from one world to another will be repaired, as there's no way to tell what world an item originated on.

Re: [MECH] InvTools v1.2.2 - Invincible Tools/Armor for Bukk

PostPosted: February 4th, 2012, 1:51 pm
by h0us3cat
Drakia wrote:Do you have a plugin that keeps inventory separate between worlds? If not, it's expected behaviour that tools brought from one world to another will be repaired, as there's no way to tell what world an item originated on.

yeah nvm
http://dev.bukkit.org/server-mods/world ... es-v1-0-2/
sorry for bugging you.

Re: [MECH] InvTools v1.2.2 - Invincible Tools/Armor for Bukk

PostPosted: February 4th, 2012, 3:13 pm
by Drakia
No worries. Glad it got fixed :)

Re: [MECH] InvTools v1.3.1 - Invincible Tools/Armor for Bukk

PostPosted: March 21st, 2012, 8:24 pm
by Drakia
[Version 1.3.1]
- Fixed issue with missing config.yml defaults