#Spigot sendMessage() Skipping Lines
1 messages · Page 1 of 1 (latest)
public static String CONSOLE_PREFIX = "&6[&aMyPlugin&6] &f: ";
this.getServer().getConsoleSender().sendMessage(ChatColor.translateAlternateColorCodes('&', CONSOLE_PREFIX + "Test"));
this.getServer().getConsoleSender().sendMessage(ChatColor.translateAlternateColorCodes('&', CONSOLE_PREFIX + "Test1"));
I think its to do with you using getConsoleSender() to send a messgae
DO you get the same issue when using Bukkit's logger or your BukkitPlugin logger?
Haven't used Bukket Logger
what is the syntax for it?
is it this?
this.getLogger().fine(ChatColor.translateAlternateColorCodes('&', CONSOLE_PREFIX + message));
nvm I think I foud it
it's not sending any messages now
worked, but the colors didn't print out
any ideas?
would it have something to do with maven?
Are your translating the color codes?
yeah
TBF i just use System.out.println when i do logs and create a custom logger class but people will tell you not to use that
should I use Color.?
when I did that, it just printed the color code symbol
this is the line I used
this.getLogger().info(ChatColor.translateAlternateColorCodes('&', CONSOLE_PREFIX + message));
ok, when I used System.out.println("mgrioegm") it did the line skipping thing
when I use the normal print it doesn't
this should not happen
what terminal is that running in
command prompt
why are the colors different
fine, it's macos terminal (don't hate on me).
Still it never happened before
try it with regular cmd see if it still happens
that is regular cmd
mac is unix tho and so is linux.
let me right a normal hello world in java... with 2 println
I want to see what happens
try it without colors
ok
That is OS dependenct sometimes
send the whole function thats sending that
public void sendToConsole(String message)
{
this.getServer().getConsoleSender().sendMessage(CONSOLE_PREFIX + message);
}
this.sendToConsole("&fStatus: &aEnabled");
this.sendToConsole("&fVersion &av" + PLUGIN_VERSION);
this.sendToConsole("&fAuthors: &a" + PLUGIN_AUTHORS);
public static String CONSOLE_PREFIX = "&6[&aParrotPanel&6] &f: ";
question, would maven have any cause for this?
doubt
because last time I checked, it didn't
send ur defs for plugin_version and plugin_author too
let me write a normal java program
does this issue persist through different platforms / jars?
haven't tested on any other computers yet
Pterdactyl / localhost?
local host
have you tried launching the server differently? are you using a custom filter / CMD setup?
I'm getting the plugin version and author from the plugin.yml file
./start.sh
are you able to upload the .jar / whole source code?
I can upload the jar
yes send the jar
the github is private, I can make it public for a sec
ill try it
wtf?
so its a mac issue
it is most likely a platform issue
then it's my comptuer then
what server version are you running?
let me check
it runs on my 1.17 server so
k
spigot
well.. that's the only way I know how to do backwards and sometimes forward compatibility
Ik there is another, but I don't fully understand it
If I make it 1.17 would it still work on 1.8-1.16. That is one of my concerns
So if I don’t use any nms then I don’t need to worry about it?