Plugin

Status
This thread has been locked.
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

PTech

Feedback score
6
Posts
422
Reactions
261
Resources
0
Can be done easily on AsyncPlayerChatEvent

Bukkit.getOnlinePlayers().forEach(player -> {
if (event.getMessage().contains(player.getName()) {
player.sendMessage("You have been mentioned by " + event.getPlayer().getName());
}});

(This was typed through the phone)
Sorry, I'm a douche but:
Code:
getServer().getOnlinePlayers().stream().filter(player -> event.getMessage().contains(player.getName())).forEach(player -> player.sendMessage("You have been mentioned by " + event.getPlayer().getName() + "!");

wrote this quickly so brace placement might be wrong

(what we learned? if you wanna use lambda you gotta learn it first :D)
 
Last edited:

PTech

Feedback score
6
Posts
422
Reactions
261
Resources
0
I gave you constructive criticism, besides, writing a filter would be easier in a phone than using an if statement. Stop trying to show someone how to utilize lambdas if you yourself do not understand them.
 

Nick Evershed

Feedback score
-3
Posts
70
Reactions
12
Resources
0
I gave you constructive criticism, besides, writing a filter would be easier in a phone than using an if statement. Stop trying to show someone how to utilize lambdas if you yourself do not understand them.
Holy shit this reminds me of my ex girlfriend we constantly argued over stupid things, but she was in the wrong aha, also thanks for the code my friend but I am a dumbass and can't make plugins
 

PTech

Feedback score
6
Posts
422
Reactions
261
Resources
0
Holy shit this reminds me of my ex girlfriend we constantly argued over stupid things, but she was in the wrong aha, also thanks for the code my friend but I am a dumbass and can't make plugins
Haha, do you still need the plugin? I could get this done in a minute :).
 

Nick Evershed

Feedback score
-3
Posts
70
Reactions
12
Resources
0
Haha, do you still need the plugin? I could get this done in a minute :).
But not sure why you would like to help me, there is no pay, sorry someone already made the actual plugin now, can you make me a plugin called /apply that spits out some text?
 

PTech

Feedback score
6
Posts
422
Reactions
261
Resources
0
But not sure why you would like to help me, there is no pay, sorry someone already made the actual plugin now, can you make me a plugin called /apply that spits out some text?
Sure, pm me and I'll get it done for you.


Also, I'd like to do it because I'm bored to death.
 
Status
This thread has been locked.
Top