Jump to content

Detect Player Kill Player on Client-Side Mod


mkcoldwofl

Recommended Posts

titls say all, and i tried

@SubscribeEvent
    public void onEntityDeath(LivingDeathEvent e) {
	    //if(e.source.getSourceOfDamage() instanceof EntityPlayer) {
	    	this.ClassFinder.NotifierSystem.NotificationQuery.add(new Notification("Killed Entity:\n" + "test"));
	    //}
    }

the NotifierSystem send String on game 

and the Notification only showup when player kill an entity on server

never work on player kill a player

(also i wanna get their name)

any way to do this?

#nothing on google

Edited by mkcoldwofl
Link to comment
Share on other sites

so there is really no way to do it?

and i dont understand what means 

8 minutes ago, diesieben07 said:

does not know where damage comes from.

the client-side player is the one who killing another player

why the client does not know? 

at least i think the client will know the player kill some `Object` but dont know what `Object` is it
there is no event for that?

Edited by mkcoldwofl
Link to comment
Share on other sites

8 hours ago, mkcoldwofl said:

Sill not work :(

i want to detect when other player get damaged or something, not only entity

Wait, what do you mean by not working? The event fires for every living entity attack, but you should be able to check if the entity was a player. Are you saying it doesn't work because it doesn't fire, or are you saying that you didn't like how it was firing for all entities?

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.