Hey Riley here, I'm trying to make a hug plugin. What it does, You type /hug and it sends a message to the other play who you hugged. I'm wanting it so i can change the message in the config, i tried something, however no message shows up in-game. And i'm not just trying to change the message, i'm trying to make it so they can select where the plays name goes. thanks in advance. My config: HugReceive: 'message %receive%' HugSend: 'message %sender%'
@Rileys I didn't see your code create a config. Did you just create one by hand, or is there another part of the code that creates the config? Also, on lines 52 and 54: you replace '&' with 'ยง'. If you're trying to get chat colors to work, try: Code: String toSend = ChatColor.translateAlternateColorCodes('&', "Your message here"); Another thing: Are you absolutely sure you are receiving the String from the config? I would start there.
@Rileys First things first, Dont store Players in Lists/Maps or generally in anything invloving long term storage unless they are handled properly ( ( ArrayList<Player> cooldown = new ArrayList<Player>() Prefer not to spawn tasks each time the command runs. You can debug to find out. Hope that helps.
@mine-care Hey thanks, although i'm still hacing trouble updated code: http://pastebin.com/y0iYwpPs my config, i have a feeling it has something to do with this, i can't figure out, anyway this is the way i learn, it makes it easier for me, if you could help me, then i use that knowelege on future plugins: config: http://pastebin.com/7yVd5Eap It's still not coming up with any messages in game when i do /hug <player> however if i do /hug after that, it tells me not to spam the command so it must be working, just not showing up