Filled Players cannot damage anything

Discussion in 'Archived: Plugin Requests' started by PhillyCheezsteak, Aug 26, 2014.

Thread Status:
Not open for further replies.
  1. Plugin category: Admin Tools

    Suggested name: No Damage

    What I want: Players are unable to deal damage to mobs and players

    Ideas for commands: None

    Ideas for permissions: None

    When I'd like it by: As soon as you can please.
  2. Offline


    What about fists? Do you want damage removed completely? How about bows? Lava? Do you want crafting of weapons blocked?

    Be more specific.
  3. MomsKnife To make it more simple, I guess just have players deal no damage with anything. No blocking recipes or weapons, just players not dealing any damage with anything.
  4. Offline


    region flag __global__ pvp deny
  5. MomsKnife I am not talking about pvp though, I am talking about players doing no damage to anything, including mobs, npcs, etc.
  6. Offline


    Ah, well it would be incredibly easy to do, I just don't feel like setting up the workspace right now.
    For any devs that aren't too lazy
    1. public class classname extends JavaPlugin implements Listener
    3. public void onEnable(){
    4. getLogger().info("Plugin has been enabled!");
    5. getServer().getPluginManager().registerEvents(this, this);
    6. }
    7. public void onDisable(){
    8. getLogger().info("Plugin has been disabled!");
    9. }
    10. @EventHandler
    11. public void onHit(EntityDamageByEntityEvent e){
    12. if (e.getEntity().getDamager() instanceof Player){
    13. e.setCancelled(true)
    14. }
    15. }
  7. Online

    timtower Administrator Administrator Moderator

    MomsKnife the getLogger messages are also done by Bukkit.
    Garris0n and bwfcwalshy like this.
  8. timtower So many people still do getLogger messages.
  9. Alright so I updated my thread. To keep it as simple as I can, I do not want players dealing any damage to all to mobs or other players. So if a player would punch or use a tool or weapon on a mob or player, it will not do any damage.
  10. Offline


    I decided i would add it for you.

    It was actually .getLastDamageCause, Not getDamager.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 10, 2016
  11. The_FrosTy_Clan Thank you so much! It works perfectly! This is exactly what I wanted. Thank you so much :D
  12. Hey sorry for the bump, but I found out the plugin does not fully work. I found out that the plugin made all mobs except witches not able to deal damage. If anyone can please make this plugin, I would greatly appreciate it. I basically need it where only players are not able to damage anything with their fist, tools, and weapons.
  13. Offline


  14. Hydrosis Thank you so much, it works perfectly :)
Thread Status:
Not open for further replies.

Share This Page