SwordEffekt
This is my first plugin. I'm still learning JAVA and improving myself.
Features
This is a lightweight plugin, which adds a sound effect while fighting.
How it works?
If a player with steel sword (diamond, gold or iron) damages a player with steel armor (diamond, gold or iron), it makes a sound of the anvil landing, which kind of sounds like steel interacting.
Commands
This plugin is completly commandless.
Permissions
swordeffekt.gethit - Grants permission to play sound effect when somebody with swordeffekt.hit permission hits you
swordeffekt.hit - Grants permission to play sound effect when you hit somebody with swordeffekt.gethit permission
Configuration
This plugin yet contains no configuration file.
Installation
Easy installation
- Download the latest version of SwordEffekt
- Drop it in your plugins folder
- Start/restart your server
Stats
Servers that use SwordEffekt
- mc.brutalcraft.org:25565 (Official)
Videos
You can see videos showing off my plugin by clicking here.
Spigot 1.7.10:
[22:31:46 ERROR]: Could not pass event EntityDamageByEntityEvent to SwordEffekt v1.2 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:299) [spigot.jar:git-Spigot-1591] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [spigot.jar:git-Spigot-1591] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot.jar:git-Spigot-1591] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot.jar:git-Spigot-1591] at org.bukkit.craftbukkit.v1_7_R4.event.CraftEventFactory.callEvent(CraftEventFactory.java:108) [spigot.jar:git-Spigot-1591] at org.bukkit.craftbukkit.v1_7_R4.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory.java:549) [spigot.jar:git-Spigot-1591] at org.bukkit.craftbukkit.v1_7_R4.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:462) [spigot.jar:git-Spigot-1591] at org.bukkit.craftbukkit.v1_7_R4.event.CraftEventFactory.handleLivingEntityDamageEvent(CraftEventFactory.java:581) [spigot.jar:git-Spigot-1591] at net.minecraft.server.v1_7_R4.EntityLiving.d(EntityLiving.java:1040) [spigot.jar:git-Spigot-1591] at net.minecraft.server.v1_7_R4.EntityHuman.d(EntityHuman.java:810) [spigot.jar:git-Spigot-1591] at net.minecraft.server.v1_7_R4.EntityLiving.damageEntity(EntityLiving.java:675) [spigot.jar:git-Spigot-1591] at net.minecraft.server.v1_7_R4.EntityHuman.damageEntity(EntityHuman.java:751) [spigot.jar:git-Spigot-1591] at net.minecraft.server.v1_7_R4.EntityPlayer.damageEntity(EntityPlayer.java:464) [spigot.jar:git-Spigot-1591] at net.minecraft.server.v1_7_R4.EntityHuman.attack(EntityHuman.java:936) [spigot.jar:git-Spigot-1591] at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java:1173) [spigot.jar:git-Spigot-1591] at net.minecraft.server.v1_7_R4.PacketPlayInUseEntity.a(SourceFile:55) [spigot.jar:git-Spigot-1591] at net.minecraft.server.v1_7_R4.PacketPlayInUseEntity.handle(SourceFile:10) [spigot.jar:git-Spigot-1591] at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:184) [spigot.jar:git-Spigot-1591] at net.minecraft.server.v1_7_R4.ServerConnection.c(ServerConnection.java:81) [spigot.jar:git-Spigot-1591] at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:731) [spigot.jar:git-Spigot-1591] at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:289) [spigot.jar:git-Spigot-1591] at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584) [spigot.jar:git-Spigot-1591] at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490) [spigot.jar:git-Spigot-1591] at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1591] Caused by: java.lang.NullPointerException at me.wumpyc.swordeffekt.SwordEffekt.onEntityDamageByEntity(SwordEffekt.java:58) [?:?] at sun.reflect.GeneratedMethodAccessor524.invoke(Unknown Source) [?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [?:1.7.0_51] at java.lang.reflect.Method.invoke(Method.java:606) [?:1.7.0_51] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:296) [spigot.jar:git-Spigot-1591] ... 23 more
Spigot 1.6.4 R2.1 build 1138
2014-01-24 11:00:09 [SEVERE] Could not pass event EntityDamageByEntityEvent to SwordEffekt v1.2 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:30) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:478) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:463) at org.bukkit.craftbukkit.v1_6_R3.event.CraftEventFactory.callEvent(CraftEventFactory.java:94) at org.bukkit.craftbukkit.v1_6_R3.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory.java:398) at org.bukkit.craftbukkit.v1_6_R3.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:423) at net.minecraft.server.v1_6_R3.EntityLiving.damageEntity(EntityLiving.java:644) at net.minecraft.server.v1_6_R3.EntityHuman.damageEntity(EntityHuman.java:719) at net.minecraft.server.v1_6_R3.EntityPlayer.damageEntity(EntityPlayer.java:399) at net.minecraft.server.v1_6_R3.EntityHuman.attack(EntityHuman.java:889) at net.minecraft.server.v1_6_R3.PlayerConnection.a(PlayerConnection.java:1158) at net.minecraft.server.v1_6_R3.Packet7UseEntity.handle(SourceFile:36) at org.spigotmc.netty.NettyNetworkManager.b(NettyNetworkManager.java:230) at net.minecraft.server.v1_6_R3.PlayerConnection.e(PlayerConnection.java:117) at net.minecraft.server.v1_6_R3.ServerConnection.b(SourceFile:37) at org.spigotmc.netty.NettyServerConnection.b(NettyServerConnection.java:132) at net.minecraft.server.v1_6_R3.MinecraftServer.t(MinecraftServer.java:594) at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:240) at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:483) at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:415) at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583) Caused by: java.lang.NullPointerException at me.wumpyc.swordeffekt.SwordEffekt.onEntityDamageByEntity(SwordEffekt.java:59) at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425) ... 22 more
@EpicTimoZz
Thank you! I have added it into the description.
SwordEffekt 1.2:
waiting for approval
Compiled against Craftbukkit build #2978
Feel free to report any bugs or suggest new features.
Thank you!
@TheCraftKid
It still works with 1.7.4
please update to 1.7.4
Maybe you can add more effects to it, like fireworks and blood(breaking lava). Or may I have the source code please
@AppleCraftz Thanks.. and what??
NICE PLUGIN AND DONT HACK MY FREIND PLUGIN
New file is waiting for approval by bukkit team.
Haven't tested it yet myself so please let me know if it fails.
This looks really cool! Is there going to be an update for 1.6.1?
@obscurehero @wumpyc
The error is happening because you are casting an entity to a player before you actually check if it is actually a player.
What you need to do it have this check:
happen before these lines in your code:
@obscurehero
I will try to find what is causing this issue. It shouldn't affect the way plugin functions though.
Lots of errors with spigot. Plugins and version at the bottom of the pastebin. http://pastebin.com/ctWcvDfv
@Gotxi
I'll try to record one when I get some free time.
@dragongun100
Planned. Should the permission allow you to make sound when you hit or when you get hit?
@DBZfan2000
Yes. Works with spigot aswell.
Does it work on 1.5.2?
Add Please Permissions for the sound (VIP Speacial)
@wumpyc
Could you add a video of the plugin working in the meantime? So we can figure it out how it is in-game :)