Help for plugin

Discussion in 'Plugin Development' started by ycraft1, Nov 24, 2015.

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

    ycraft1

    I recently make a plugin that shoots. But i want it only for mobs, PvP is off but it stills hit players.
    PLUGIN: http://pastebin.com/eK4HfVEU

    And a want a scoreboard that you can set on/off for kills that players make with snowballcannon​
     
  2. Offline

    Zombie_Striker

    @ycraft1
    Since you know how to check if the damager is a player, just check if the damaged entity is not an instance of a player.
     
  3. Offline

    ycraft1

    I don't know how, But thanks for answering my quetion
     
  4. Offline

    mcdorli

    Do you know java? Just use an event
     
  5. Offline

    Xerox262

    You should fix this import net.md_5.bungee.api.ChatColor;
     
  6. Offline

    ycraft1

    Can someons send a rule?
     
  7. Offline

    PileAlkaline

    Use the EntityDamageByEntityEvent, check if e.getDamager instanceof Player and cancel the event if it is.
     
    ycraft1 likes this.
  8. Offline

    ycraft1

    Ah, thanks m8 for that answer

    @Xerox262 That only make sense for the startup message. But thanks for attention it. I fixed it:
    import org.bukkit.ChatColor;

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Nov 24, 2015
Thread Status:
Not open for further replies.

Share This Page