#hex colors
1 messages ยท Page 1 of 1 (latest)
&x&f&f&f&f&f&fO litterly translated orange
wtf
Using ur method
that cannot be
Somehow it did
if anything, it would translate to white
can you upload your whole thing to github pls
It did translate to white
&x&f&f&f&f&f&6O litterly translated orange
&x&f&f&f&f&0&0O Should be yellow
Translated to black
please show the code you use to translate it
.
I did
upload your stuff to github, then send link pl
yes and how do you use it?
TextUtils.color()
...
sorry but
show the FULL CODE you use in your ping event
you always only give tiny fractions of your code
aint nobody can help with that
you have to show some context, i.e. your full ping event listener
package org.Dacaly.NetworkTools.Listeners;
import org.Dacaly.NetworkTools.NetworkTools;
import org.Dacaly.NetworkTools.Utils.Configs;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.ServerPing;
import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.event.ProxyPingEvent;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.event.EventHandler;
import org.Dacaly.NetworkTools.Utils.TextUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
public class ProxyPingListener implements Listener {
@EventHandler
public void onProxyPing(ProxyPingEvent e) {
ServerPing serverPing = e.getResponse();
if (Configs.modules.contains("motd")) {
if (NetworkTools.maintenance && Configs.modules.contains("maintenance-mode")) {
if (Configs.modules.contains("maintenance-motd")) {
serverPing.setDescriptionComponent(new TextComponent(TextUtils.color(String.join("\n", Configs.config.getStringList("modules.maintenance-mode.maintenance-motd.message")))));
}
if (Configs.modules.contains("maintenance-version")) {
ServerPing.Protocol protocol = new ServerPing.Protocol("Maintenance", 1);
serverPing.setVersion(protocol);
}
} else {
String message = String.join("\n", Configs.config.getStringList("modules.motd.message"));
NetworkTools.plugin.getLogger().info(message);
NetworkTools.plugin.getLogger().info(TextUtils.color(message));
serverPing.setDescriptionComponent(new TextComponent(TextUtils.color(message)));
}
}
e.setResponse(serverPing);
}
}
and please don't just copy paste it here without any formatting
ok thats better
one sec I'll copy it to my IDE
please for once lets debug it a bit
replace the whole method with this: (1 min pls
@EventHandler
public void onProxyPing(ProxyPingEvent e) {
ServerPing serverPing = e.getResponse();
serverPing.setDescriptionComponent(new TextComponent(TextUtils.color("&#ff0000RED TEXT")));
e.setResponse(serverPing);
}
please check out whether that works
if that doesn't work, there's a problem in my code
if it works, the problem is how you parse your stuff
<dependency>
</dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.18-R0.1-SNAPSHOT</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.18-R0.1-SNAPSHOT</version>
<type>javadoc</type>
<scope>provided</scope>
</dependency>
Server: Waterfall-1.18 475
Client: Vanilla 1.18.1
Plugin: java 16
Server: java 17
B
r
u
h
Old plugin does work
My actual brain just died
erm why do you even pass the string length to the buffer/builder?
that's unnecessary and only causes trouble ๐
I know but that's not rly the point rn
My old plugin works
THE EXACT SAME WAY
new one doesn't
Same methods
Even used java 8
And bungee api 1.17
Not only motd
@green prism it appeared new TextComponent("") is different then new TextComponent(TextComponent.fromLegacyText(""))
yes, sure it's different
new TextComponent just takes the text as it is
fromLegacyText will translate the "legacy" color codes to the "new" json format
that's one of the reason why I kept nagging you to send the FULL code you're using ๐
so you got it working now @hushed vector ?
i'm sorry
No problem, as long as you got it working now :3
I did
Thx
I'm just very stupid
It somehow did work before
haha it can happen
But idk anymore
happens to everyone somtimes