[FUN/MECH] Mortar v1.7.2 - Mortars in Minecraft [1.7.5]

Discussion in 'Archived: Plugin Releases' started by Phiwa, Oct 30, 2011.

  1. Offline

    Phiwa

    IMPORTANT:
    • Please use the plugin carefully and limit the power using the config. I hardcoded a maximum power of 10, but even this power can easily crash your server as soon as there are too many players using mortars at the same time.
    • When updating, please delete the "Mortar"-folder in your server's plugins-folder because Mortar does not update the config. If there are new lines in the config, Mortar will not be able to use them which will result in Mortar not working as it should.
    • There is absolutly no support of Permissions 2.X/3.X or GroupManager. Please use a Permissions-Plugin supporting SuperPerms.
    Visit Mortar on DevBukkit



    Description:

    Mortar introduces, like the name already tells you, mortars into Minecraft.
    This is my first plugin, so feel free to give feedback on how to improve it.

    Features:
    • Enables players to use eggs as mortars.
    • Power of the mortar can be set in the config.
    • WorldGuard-regions which prevent players from building can also prevent players from destroying blocks with mortars.
    • Costs for shots can be set
      • payment via resources
      • economy-support (requires Vault)
    Videos/Screenshots:

    Version 1.7 (open)

    Thanks to Keivo, there is a new video showing Mortar in version 1.7. :)



    Version 1.3 (open)

    Thanks to puffnuget for this little video, showing the destructive power of Mortar. ;)


    I found another video on Mortar which shows even better how destructable it is... :p



    Commands:
    • /mortar <on|off>: (De)activates the plugin.
    • /mortar setpower <value>: Sets the power of your mortar.
    • /mortar showpower: Shows you the power of your mortar.
    • /mortar help: Show you the usage of mortar.
    • /mortar reload: Reloads the config.
    Permission-Nodes:
    • mortar.use - Allows a player to fire mortars using eggs.
    • mortar.* - Allows a player to use all features of the plugin.
    FAQ:

    Show Spoiler

    Code:
    2011-12-17 16:47:10 [SEVERE] Could not pass event PLAYER_INTERACT to Mortar
    java.lang.NullPointerException
        at phiwa.mortar.mortar.payForShotEconomy(mortar.java:183)
        at phiwa.mortar.mortar.payForShot(mortar.java:150)
        at phiwa.mortar.listeners.players.onPlayerInteract(players.java:46)
        at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:330)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:171)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:142)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:560)
        at net.minecraft.server.Packet15Place.a(SourceFile:39)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:516)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    If you encounter this error you do don't have an economy-plugin installed.
    Vault only tells an installed economy-plugin what to do but it does not contain the functionality of one.


    Download:
    Changelog:

    • Version 1.7.1
      • Updated for CB 1.4.7-R1.0
    • Version 1.7
      • Complete recode, the mortar now behaves like a real mortar (I'll release a video showing the new way Mortar behaves soon)
      • Works with CB 1.4.6-R0.1
      • Added new messages (Delete your old config and let Mortar generate a new one!)
    • Version 1.6
      • Updated to new event-system to prevent plugin-break after release of RB 1.1-R5.
    • Version 1.5.1
      • Added the option "SendWarning" to the config. If set to "true", players will automatically send a warning to the chat when shooting a mortar like they did by now. If set to "false" this auto-message is deactived.
    • Version 1.5
      • Added the option "UseWorldGuard" to the config. If set to "true", mortars which are shot into a WorldGuard-region which is protected won't explode if the player who shot it is not allowed to build in that region.
    • Version 1.4.3
      • In the version 1.4-1.4.2, the command "/mortar off" gave you a message that Mortar was disabled, but it had no effect anymore.
        Fixed that in 1.4.3.
    • Version 1.4.2
      • Disabled shooting mortars by left-clicking because that might happen by accident (right-clicking might happen by accident as well, but I cannot disable both of them) ;)
    • Version 1.4.1
      • Fixed an exception which occured when using items to pay for mortars.
    • Version 1.4
      • Added Economy-support (requires Vault)
    • Version 1.3
      • The warning is now sent when the players shoots the mortar, not after the mortar's impact.
      • Added a cooldown time. Players can only shoot a second mortar after their first mortar exploded. This stops players from spamming the server and limits the danger of them crashing it.
      • Added the possibility to set a mortar-item in the config which is used to fire the mortar. Item can be set in the config.
      • Added the possibility to enable a payment system which takes a specified amount of a specified item out of the players inventory when he fires a mortar.
        • Payment system can be enabled or disabled in the config.
        • Item which is taken away can be set in the config.
        • Amount of the item which is taken away can be set in the config
    • Version 1.2
      • Added a config.
        • Includes the option to set the maximum power of a mortar a player can set.
        • Includes the option to set the warning message sent to the chat when a player fires a mortar.
      • Set the maximum limit of a mortar to 10 (not even changeable using the config) because higher values easily crash a server!
      • Changed the command /mortar set <value> to /mortar setpower <value>
      • Added the command /mortar showpower
    • Version 1.1
      • Message "Fire in the hole!" is now sent to the chat by the player using the mortar.
      • Added Permissions-Node "mortar.*" to give players the power to (de)activate the plugin.
    • Version 1.0
      • Initial release
    ToDo-List:

    green = already implemented; orange = partly implemented; black = not worked on yet
    • Differentiate between different players! Currently, if one player set the power of the mortar this is the power of all player's mortars...
    • Add the possibility to use a different item to shoot the mortar. (+maybe possibility to change the item in the config)
    • Add possibility to use resources to pay for shots
    • Add a cooldown to stop players from spamming mortars.
    • Add support for economy-plugins.
    • Add possibility to set a region and limit the use of mortars to it (mortars does not explode if the shooting player has no building-rights in the WorldGuard-area the mortar hits).
    • Add different types of mortars (explosive, fire, smoke?, ...)
    • Add possibility to set different MaxPowers for different Permissions-Groups.
    • Add possibility to shoot mortars from dispensers
    Requests:

    If there is anything you would like me to add, simply ask for it.
    Please be aware of the fact that I'm still quite new to coding and might not be able to fullfill every request.


    Known Bugs:

    I hope the are no bugs. If you find one, please report it here.


    Thanks to...
    • ... Smex who helped me several times or at least suffered together with me. ;)
    • ... marcel who helped me to clean my code up.
    • ... Arkandji who designed the first banner for me (which somehow got lost. -.-).
     
  2. Offline

    Smex

    Nice done my friend. ;)
     
  3. Offline

    Tolerance

    Don't think it's required, but you might want to consider adding plugin version, latest CB build, and category.
     
  4. Offline

    Phiwa

    Oh sorry, forgot that in the end. ;)
     
  5. Offline

    HawkIHeo

    OHMAIGAWD enabled is misspelled.[​IMG]
     
  6. Offline

    Phiwa

    Upps sorry, I'm planning to release v1.3 today and I will fix that in it. Thanks for telling me.

    v1.3 is going to have some kind of option to pay with resources for using the mortar.
     
  7. Offline

    h0us3cat

    video? :)
     
  8. Offline

    Phiwa

    I can create one after the release of v1.3 which then includes the payment-option (at least I hope so). ;)
     
  9. Offline

    Archelaus

    Moved to releases
     
  10. Offline

    Pim1234

    lol, great plugin!
     
  11. Offline

    MrMag518

    This is nice, ima give it a like.
     
  12. Offline

    Phiwa

    Thanks to both of you.
    Double thanks to RightRedLeg for moving and Tag. ;)
     
  13. Offline

    nodice

    nice plugin. Maybe bunkers and mounted machine guns? Awesome man nice work! :D
     
  14. Offline

    Phiwa

    I will see what I can add, I thought of different types of mortars (Explosive, Fire, Smoke). ;)
    Thanks for your feedback.
     
  15. Offline

    Emiya Shirou

    And what would be Mortar?
     
  16. Offline

    Phiwa

    I don't really get your question.^^
    The mortar like it is at the moment is a mixture of the planned types "explosive" and "fire".

    Still one problem which keeps me from releaseing v1.3, hope to fix it today. :)

    Update to v1.3

    • The warning is now sent when the players shoots the mortar, not after the mortar's impact.
    • Added a cooldown time. Players can only shoot a second mortar after their first mortar exploded. This stops players from spamming the server and limits the danger of them crashing it.
    • Added the possibility to set a mortar-item in the config which is used to fire the mortar.
    • Added the possibility to enable a payment system which takes a specified amount of a specified item out of the players inventory when he fires a mortar.
      • Payment system can be enabled or disabled in the config.
      • Item which is taken away can be set in the config.
      • Amount of the item which is taken away can be set in the config

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 20, 2016
  17. Offline

    puffnuget

  18. Offline

    Phiwa

    Update to v1.4
    • Added economy-support
     
  19. Offline

    tinez

    @Phiwa Can you PLEASE add an option to disable left click for use the mortar?

    I want the user to throw egg as grenade, so i put in the config mortar-item: 344. And right now, by clicking left button, they can throw as many eggs as they want.
    The "PayWithItems" doesnt work (it writes "You don't have enough ressources..." all the time) (i set it up with egg for paiement. But it does not work with default config too!)

    Thanks!

    EDIT: Or at least, send me your sources! i can do it myself (i guess it just a removal of the left click event listener).
     
  20. Offline

    Phiwa

    @tinez There was a little mistake in the Config-Handler which resulted in Mortar, trying to take the item "null" from the inventory which does not work... ;)
    Fixed it in version 1.4.1.

    EDIT: The problem about the left-/right-clicking is that there only is one listener for the shots which is ON_PLAYER_INTERACT and I cannot leave that out, but I found a different way to disable shots by right-clicking and included it in version 1.4.2.
     
  21. Offline

    tinez

    @Phiwa man, you're awesome...

    Waiting for the download link!
     
  22. Offline

    Phiwa

    @tinez No problem mate, it is always good if someone reports a bug, I do not regnize all of them and this one was a simple mistake I made when updating.
    The thing about the left-/right-clicking is a thing I wanted to change in v1.3, but I didn't manage to and now recognized how it works. ;)
    The files have been uploaded by me, but they have to be approved by a BukkitDev-Staffmember before you can see and download them...

    EDIT: Files have been approved. ;)
     
  23. Offline

    dinkytoy22

    mine says: you are no admin where do i change this?
     
  24. Offline

    Phiwa

    You either need to be Op or have the right permissions in your permissions-plugin.
    Open the file "ops.txt" in your server's root directory and fill in your ingame-name in the first line.
    After that simply reboot the server and you have the rights to use the mortar.
     
  25. Offline

    dinkytoy22

    thanks it worked i forgot to make myself op after i updated the server :D so thank you it works perfectly now :D :D :D
     
  26. Offline

    Phiwa

    No problem ;)
     
  27. Offline

    res94

    is there any way to allow certain players to be able to use this plugin? Like can i enable "player xyz" to be able to use it, but "player abc" cant?
     
  28. Offline

    Phiwa

    That's what you need the permissions-plugins for...

    You must either use a permissions-plugin or only give the OP-status to the players who are allowed to use the mortar.
     
  29. Offline

    shico75

    im not sure if this is a bug or not but when i do /mortar off it says "mortar disabled" which is normal but after that, when you click anything with a stick ill be saying: " Please wait for the impact of your current mortar!" please fix that, everybody on my server is annoyed at the spam/message of that. Thx!:D
     
  30. Offline

    Phiwa

    Ooops, just recognized that I took out the disabling lines while testing before releasing 1.4 and forgot to put them in again.
    The command doesn't have any use in v1.4/v1.4.1/v1.4.2, sorry about that.
    Just uploaded v1.4.3 to BukkitDev, only waiting for the file to be approved.
     

Share This Page