1

Deleted

anonpmc169764's Avatar anonpmc1697644/3/17 4:41 pm
1 emeralds 308 1
4/3/2017 4:57 pm
escape9179's Avatar escape9179
[deleted]
Posted by anonpmc169764's Avatar
anonpmc169764
Level 3 : Apprentice Miner
9

Create an account or sign in to comment.

1

1
04/03/2017 4:57 pm
Level 7 : Apprentice Modder
escape9179
escape9179's Avatar
it's because your method signature is


public void onPlayerChat(AsyncPlayerChatEvent event, Plugin pl)


instead of

public void onPlayerChat(AsyncPlayerChatEvent event)


The event should be the only parameter.

What you can do instead is


private Plugin plugin;

public PlayerChat(Plugin plugin) {
this.plugin = plugin;
}


So you can initialize the plugin variable outside of the chat event method once the class is initialized, and you will still be able to use the variable within the event method
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome