Plugin Request [Cauldron] LF Disable Critical Strike Plugin/Mod

Discussion in 'Plugin Help/Development/Requests' started by Rivergone, Sep 3, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    Rivergone

    Plugin category: Mechanics

    Suggested name: No-Crit "(The name does not matter really)"

    What I want: I'd love to get some help on completely disabling the vanilla critical strikes on monsters/players in minecraft.

    Ideas for commands: No commands are needed for this plugin.

    Ideas for permissions: Allso not quite necessary. maybe players with nocrit.enabled in permission file are not able to make critical strikes ingame.

    When I'd like it by: As soon as possible =)
     
  2. Offline

    ZP18

    Do you want permissions or not, I need a definite answer
     
    Rivergone likes this.
  3. Offline

    meguy26

    @ZP18
    Well, the easy thing to do would to just add the permissions, the requester can easily apply the perms, and perms make the plugin more appealing to other people. :)
     
    Rivergone likes this.
  4. Offline

    ZP18

    @meguy26
    True, I haven't looked into seeing if this is actually possible yet, is there like a PlayerCriticalHitEvent?

    You'd think this would be heaps simple, like 20 lines of code, but it is not actually possible, sorry @Rivergone
    I really wanted to do this but I am disappointed to find out that it is not possible, sorry, wait a second, maybe there is a very long way of doing it! Checking if the block underneath the player is air, if it is then set the damage to what it should be, if you have an enchanted sword, can you do sword.getDamage? Or item.getDamage then it would make this a lot easier, @Rivergone this has never been attempted I believe, but that will not make me give up, I will get back to you

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 11, 2016
    Rivergone likes this.
  5. Offline

    oceantheskatr

    Code:
    if (attacker.isOnGround == false) {
    // Do stuff
    }
    :D
     
  6. Offline

    ZP18

    @oceantheskatr
    I will have to use PlayerMoveEvent most likely because I have to check when the player is falling, do you know how I can get the exact damage of an item?

    @Rivergone
    Even if I can accomplish this I can't remove the critical hit effect as in those white things, is that alright?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 11, 2016
  7. Offline

    oceantheskatr

    @ZP18 I think you should use EntityDamageByEntity, and check if entities are players, then check if attacker is in air, not sure what to do after that :p
     
  8. Offline

    ZP18

    I have a way to check if the player is falling, then I will make a Boolean player map an use that to check if the player is falling, in the entitydamagebyentityevent then get 2/3 of the event.getdamage if the Boolean is true, simple

    But the point is I can't get rid of the effects
     
  9. Offline

    oceantheskatr

    @ZP18 If you can get rid of the actual crit I'm sure OP won't mind having the effects.
     
  10. Offline

    ZP18

    Ok, I will start making later, I just need to work out when to do the landing, since I am using playmove event for falling I could probably do a if statement checking if player.isOnGround in the event and set the Boolean to false then, guess that could work
     
  11. Offline

    oceantheskatr

    @ZP18 Why not check if they're on the ground while attacking though? Don't need to check any other time, do you?
     
  12. Offline

    ZP18

    @oceantheskatr
    I need to set the Boolean to false when they land otherwise they will deal less damage all the time
     
  13. Offline

    oceantheskatr

    @ZP18 If you check if both are players, then check if damager is in the air (which causes crit) then change damage, then it would only change for that hit, would it not?
     
  14. Offline

    ZP18

    @oceantheskatr
    Crits only occur when the player is falling, not just when in air, if a player jumps, as he rises he can't do Crits but as he falls he can
     
  15. Offline

    oceantheskatr

  16. Offline

    ZP18

    @oceantheskatr
    To check if the player is falling you can just use player.getFallDistance, if it is more than 0 they are falling
     
  17. Offline

    oceantheskatr

    @ZP18 Well good luck with it, interested to see how it goes :)
     
  18. Offline

    ZP18

    I know how to do everything, the only setback is that I can not remove the effects, so players would provably think that Crits still work, @Rivergone go to the minecraft damage wiki page and read the new features that are coming out in 1.9, they are making it more balanced, so if you want you can wait till 1.9
     
  19. Offline

    SantaClawz69

    @ZP18 You can remove the effect manually.
     
  20. Offline

    ZP18

  21. Offline

    Rivergone

    @ZP18, I wish to thank you for your interest in making this plugin. I'm currently running a 1.7.10 cauldron server and all my mods / plugins are configurated for this version. and I think I will stay on this version because its the most stable for me at the moment. Everything that would nerf / remove the critical hits is allright with me. I use a plugin which uses its own crit system that is very configurable, thats why I requested to remove the vanilla minecraft crit system.

    Again, thanks alot for your interest in helping me with this.


    Greetings,
    RiverGone

    Can you explain how ^^?

    <Edited by bwfcwalshy: Merged posts, please use the edit button rather than double posting.>
     
    Last edited by a moderator: Sep 4, 2015
  22. Offline

    MCSwicts

    Good idea! I hope someone will make this for you!
     
Thread Status:
Not open for further replies.

Share This Page