Filled kill message

Discussion in 'Archived: Plugin Requests' started by LeeoSantos, Nov 22, 2013.

  1. Offline

    LeeoSantos

    Plugin category: MISC

    Suggested name: not know ._.

    What I want:

    When kill a player send message:

    You killed : <playername>

    When killed by a player send message:

    You was killed by: <playername>

    Ideas for commands: No commands needed for this plugin.

    Ideas for permissions: No permissions needed for this plugin.

    When I'd like it by: No matter.

    please someone make
     
  2. Offline

    Harmings

    I'm on my phone so I can't make this at the moment but here would be the code for a developer who does want to do this:
    Code:java
    1. @EventHandler
    2. public void onPlayerDeath(PlayerDeathEvent e) {
    3. if (e.getEntity() instanceof Player && e.getEntity().getKiller() instanceof Player) {
    4. Player killer = (Player) e.getEntity().getKiller();
    5. Player killed = (Player) e.getEntity();
    6. killer.sendMessage(ChatColor.BLUE + "You killed: " + killed.getName());
    7. killed.sendMessage(ChatColor.BLUE + "You were killed by: " + killer.getName());
     
    LeeoSantos likes this.
  3. Offline

    Pik0

    LeeoSantos likes this.
  4. Offline

    LeeoSantos

Share This Page