Well my problem is, I do not know how to use this can someone make this message a subtitle here is my code: Code: p.sendMessage(ChatColor.LIGHT_PURPLE + ">> " + ChatColor.WHITE + "Get Your Gas Mask On!"); So can someone make it a subtitle message? and post the code, i have no clue how to use the title, but then how do I keep it for like 3 sec then fade out?
@Kyleyocats They are unwritten rules, The majority agrees on in these forums. Think of them like ethics, ethics are not written anywhere. They are morral rules. Lets stop this discussion here and if you want, continue on the thread i posted above ^. Now,
@Kyleyocats Yeah, if you want to discuss the "unwritten rules", post in that thread. If you want to send a player a "Title" (message in the middle of the screen), use Player#sendTitle();
yes, for the action bar do put: p.sendTitle(arg0, arg1); but what is arg0 and arg1 and how do i add a 3 second fade out?
@Kyleyocats https://hub.spigotmc.org/javadocs/b...sendTitle(java.lang.String, java.lang.String) arg0 is the Title, arg1 is the subtitle. As for setting the fade out, that is something that I do not know how to do. If you want to explore all of bukkit's methods to try to find a "fade out" option: https://hub.spigotmc.org/javadocs/bukkit/
@Kyleyocats As far as I know whenever you try and change the timer of "stay" time for the message or the fade in/out time, it doesn't do anything. The default is approximately a .3 second fade in followed by a 3-4 second stay time, and then a .5 second fade out. I've tried at least a million things and couldn't get it to stay longer like I wanted. I don't think you can have the 3 second fade out like you want...
Thanks Guys! You really helped and it works Thanks! Never mind, not solved it gives me this cross thru error, https://gyazo.com/763c57ef88a561ce35675ca37728cce0 EDIT by Moderator: merged posts, please use the edit button instead of double posting.
@Kyleyocats this is not an error, it is deprecation. I see you added "SupressWarnings" to it, which indicates that you aknowledge the issue that isnt the case i think. Well check the docs and see why it is deprecated and what alternatives there are.
I help you, none. You can fiddle around with pacckets though. If you don't want to use deprecated stuff (deprecated means, it will be removed in the future and break your plugin (I doubt it is the same in this case though)), then you need to send a packetPlayOutChat to the player Code: IChatBaseComponent icbc = ChatSerializer.a("{\"text\": \"" + message + "\"}"); PacketPlayOutChat chat = new PacketPlayOutChat(icbc, 2); ((CraftPlayer)player).getHandle().playerConnection.sendPacket(chat);