#help-development
1 messages · Page 636 of 1
Like, when the resolution changes, doesn't it break the text
nope
That's nice
thanks
I think mojang need to rework the way action bars work. We should be able to render string in the user screen
or add multiple action bars without any weird work around
it would improve the non-modded experience
At any position*
hello, I have a resource waiting for approval 10 days now, is that normal?
yes ^
is there a optimal way to set lots of blocks at once, at the moment im using a loop and world.setBlockData(location, material.createBlockData());
pardon? what does that mean sorry
just anything is helpful, sending without lighting updates, block updates, batching, anything
setBlock(type, false, false)
and cache blockdata in a variable
and that ^
What packet can I send for it to send an advancement toast?
this seems promising, not sure which packet this is exactly though
Hello it seems that Mountain based biomes are removed in nms 1.18.2 Biomes class how can i get em?
cant because i think location is part of block data?
its not
setBlock cant be resolved? im using paper
https://www.spigotmc.org/threads/workaround-example-with-packetplayinuseitem-packet.420470
#9 what is the 1.20 version of this implementation? some methods are missing
public ServerboundUseItemOnPacket(InteractionHand enumhand, BlockHitResult movingobjectpositionblock, int i)
?fork
SpigotMC maintains the Spigot server. If you are using a fork of Spigot (such as Paper, Airplane, Purpur, or other derivative works), you should seek support in the appropriate Discord servers.
It should be the same as it is in 1.20.1 as 1.20 is protocol compatible.
hmm, the method you're using is different, i thought you were gonna replace the block states
how can i do that
funny how people are so sad about how MD5 has collisions
even though the chance for a collision is one in a quattuordecillion
lmao
and most platforms dont even have 1/10 of that in passwords
Hello, I have a class who extends ServerPlayer (Mojang Mapping), how can I change his skin ? (1.20.1)
what is RegistryLookupCodec name in mojang mappings it seems screamingsandals isnt right
edit the game profile
add the value and signature
to store a map that acts as cache. I put it in my hand with on enable?
I would put it on your head instead
???
I was wondering between a manager and the main
in your what?
I made this :java public static boolean setSkin(GameProfile profile, UUID uuid) { try { HttpsURLConnection connection = (HttpsURLConnection) new URL(String.format("https://sessionserver.mojang.com/session/minecraft/profile/%s?unsigned=false", UUIDTypeAdapter.fromUUID(uuid))).openConnection(); if (connection.getResponseCode() == HttpsURLConnection.HTTP_OK) { String reply = new BufferedReader(new InputStreamReader(connection.getInputStream())).readLine(); String skin = reply.split("\"value\":\"")[1].split("\"")[0]; String signature = reply.split("\"signature\":\"")[1].split("\"")[0]; profile.getProperties().put("textures", new Property("textures", skin, signature)); return true; } else { System.out.println("Connection could not be opened (Response code " + connection.getResponseCode() + ", " + connection.getResponseMessage() + ")"); return false; } } catch (IOException e) { e.printStackTrace(); return false; } }But when I package my maven project, I don't get the new version of my plugin, how can I fix it ?
c'est main
utilise deepl ou chatgpt pour éviter ça à la limite 
il ne faut jamais s'en servir 
bas je vois sa
wordreference et deepl lorsque j'ai vraiment du mal
mais je commence à avoir un anglais acceptable pour discuter ici en impro 😄
The code isn't there or?
pour stocker une map qui fait office de cache, mieux vaut la stocker dans le main ou dans un manager ?
bas ta bien de la chance
it isn't in the plugin jar
aucune idée, demande en anglais plutôt x)
bas je peut aussi mais souvent je passe par de la trad pour pas perdre de temps
alors, perd du temps
to store a cache (map). DO I store it in my main class or my manager?
When using p.setDisplayName(String) to change the name in Minecraft version 1.19.4 or higher, this error occurs. Help me
java.lang.IllegalStateException: Missing key in ResourceKey[minecraft:root / minecraft:chat_type]: ResourceKey[minecraft:chat_type / minecraft:raw]
at net.minecraft.core.IRegistry.e(SourceFile:88) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
at net.minecraft.network.chat.ChatMessageType.a(ChatMessageType.java:59) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
at net.minecraft.network.chat.ChatMessageType.a(ChatMessageType.java:49) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
at net.minecraft.server.network.PlayerConnection.chat(PlayerConnection.java:2121) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
at net.minecraft.server.network.PlayerConnection.b(PlayerConnection.java:2189) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
at net.minecraft.server.network.PlayerConnection.lambda$17(PlayerConnection.java:1895) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ~[?:?]
at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]```
@lilac dagger I cleaned my project and I'm packageing it, I'll see if it works
you are using nms mojang mapped ?
how to use??
show your code 😉
I'm not very good in nms, but maybe I can help you
package com.qm.customname.System.Command;
import org.bukkit.WeatherType;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class NameCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
Player p = (Player) sender;
if(p.isOp()) {
if (args.length == 0) {
p.sendMessage("/nickname <player> <name>");
} else if (args.length == 2) {
if(args[0]!=null) {
p.setDisplayName(args[1]);
p.setPlayerListName(args[1]);
}
}
}
return false;
}
}```
why do you need the player argument if you do not use it
- you are casting sender to Player, but you are not checking if sender is player (instanceof). this can and will lead to errors if this command is executed from the console
- the <player> argument in your command (args[0]) is not used, you just change the command executor's name instead
package com.qm.customname.System.Command;
import org.bukkit.WeatherType;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class NameCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
Player p = (Player) sender;
if(p.isOp()) {
if (args.length == 0) {
p.sendMessage("/nickname <player> <name>");
} else if (args.length == 2) {
if(args[0]!=null) {
Bukkit.getPlayer(args[0]).setDisplayName(args[1]);
Bukkit.getPlayer(args[0]).setPlayerListName(args[1]);
}
}
}
return false;
}
}```
????
no
- don't call the method twice, cache it inside a variable
Player target = Bukkit.getPlayerExact(args[0]); - check whether it's null
if (target == null) return
and you are still not checking whether the command executor is Player, but you blindly cast
package com.qm.customname.System.Command;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class NameCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if(sender instanceof Player) {
Player p = (Player) sender;
Player target = Bukkit.getPlayer(args[0]);
if(target == null) return false;
if (p.isOp()) {
if (args.length == 0) {
p.sendMessage("/nicname <player> <name>");
} else if (args.length == 2) {
target.setDisplayName(args[1]);
target.setPlayerListName(args[1]);
}
}
}
return false;
}
}```
no
put the target inside args.length == 2
because args may be empty, but you still call args[0] without checking
package com.qm.customname.System.Command;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class NameCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if(sender instanceof Player) {
Player p = (Player) sender;
if (p.isOp()) {
if (args.length == 0) {
p.sendMessage("/nickname <player> <name>");
} else if (args.length == 2) {
Player target = Bukkit.getPlayer(args[0]);
if(target == null) return false;
target.setDisplayName(args[1]);
target.setPlayerListName(args[1]);
}
}
}
return false;
}
}```
looks good
ok thanks
Can anyone help me
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
Im getting "cannot find symbol 'PlayerName' " and "cannot find symbol 'W' "
help me 😥
?nocode
It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
it says exactly what the error is
you don't have the variable playerName in scope
same for the variable w
That's weird indeed
I need to clean and after package but it's so slow...
well I've found
when I delete the previous jar it's working
strange
Set a final name in build
its weird cuz i never got that error it was only after i fixed the maven dep
It'll always have that final name even without cleaning
no, it would never compile like this
there's literally not a variable named playerName in the scope of the function
how do you expect it to work
where ?xml <build> <directory>../target</directory> <!-- Build it one level up, because it is the one we care about --> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.5.0</version> <configuration> <relocations> <relocation> <pattern>org.bstats</pattern> <!-- Replace this with your package! --> <shadedPattern>fr.paulem.external.bstats</shadedPattern> </relocation> </relocations> </configuration> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> </execution> </executions> </plugin> </plugins> </build>
oh ok <finalName>alot</finalName>
now it is xml <build> <directory>../target</directory> <!-- Build it one level up, because it is the one we care about --> <finalName>alot</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.5.0</version> <configuration> <relocations> <relocation> <pattern>org.bstats</pattern> <!-- Replace this with your package! --> <shadedPattern>fr.paulem.external.bstats</shadedPattern> </relocation> </relocations> </configuration> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> </execution> </executions> </plugin> </plugins> </build>
😅
(thanks :D)
profile-ok ?xml <profiles> <profile> <id>export-to-target</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <outputDirectory>../target</outputDirectory> <finalName>alot</finalName> </configuration> </plugin> </plugins> </build> </profile> </profiles>
it's multi-module
so this is your dist module?
ALOT-maven
- alot (main module)
- target
- other modules...
- target (used for single module)
then it looks ok
is it the good run configuration ?
I never use run configurations, I just double click on "package" in the maven tab
Whats the reason to use scoreboard-packets and not the official bukkit scoreboard?
okay, then I'll try, maybe my project will blow and my computer too 
doenst bukkit use packets tho?
for it
however if you always wanna copy the file to ../target, I would not use a profile. Also note that the profile is now per module but you probably want to run packag eon the parent pom
The only reason is to have player specific team colours
exactly
yeah in that case I'd move the <configuration> directly into the maven-jar-plugin as in the "lazy method" in my blog post
like this
the profile is only there to not cause issues if someone doesn't have a path called C:\MytestServer\whatever
well ?```xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<relocations>
<relocation>
<pattern>org.bstats</pattern>
<!-- Replace this with your package! -->
<shadedPattern>fr.paulem.external.bstats</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>export-to-target</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<outputDirectory>../target</outputDirectory>
<finalName>alot</finalName>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>```
okay
then delete the whole <profiles> section, you don't need it in this case
resultxml <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <outputDirectory>../target</outputDirectory> <finalName>alot</finalName> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.5.0</version> <configuration> <relocations> <relocation> <pattern>org.bstats</pattern> <!-- Replace this with your package! --> <shadedPattern>fr.paulem.external.bstats</shadedPattern> </relocation> </relocations> </configuration> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> </execution> </executions> </plugin> </plugins> </build>
well... 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 80, column 21 It is highly recommended to fix these problems because they threaten the stability of your build. For this reason, future Maven versions might no longer support building such malformed projects.
add <version>3.3.0
to the jar plugin
okay
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<outputDirectory>../target</outputDirectory>
<finalName>alot</finalName>
</configuration>```
yes
okay thanks 😄
now run mvn clean package on the parent and it should work
Any ideas how to advertise a plugin well?
A good plugin advertises itself
Minecraft Font for the plugin banner makes people crazy
Create proved it
Yeah, I don't think there is a particular need for advertising
corporate buzzwords, pretty pictures, and the rule of 3
The rule of 3?
- Write a good plugin
- Give proper support
- Don't disappoint
And in minecraft space that also includes supporting each and every version
\s
even 1.4
1.0
?1.8
i forgor
Too old! (Click the link to get the exact time)
thanks
1.8.8, 1.12, 1.19, 1.20
Guys i need the most funny idea for a plugin after my pen-is ban
Ur what
Plugin that blocks main thread infinitely and logs "Loading...".
I started playin in this version 🥲
same
ban hammer which built wool penis under the player
there was some Gnome mod for it
damn
k cool wait for it
should the server crash tho
I think the mod i most enjoyed was buildcraft
I started coding because of Computer Craft
Haha i feel so old
a loong time ago
Red Power was a big one tho
factorio in mc
Logistic Pipes
hmm
yeah, i can vividly remember trying to automate ice making for a IC2 Reactor
how do i block the main thread without making the server crash tho
won't it like auto-disable itself or smth
very precisely timed thread sleeps 
shit
idk
Why you need to stop the main thread 😵💫
in an infinite loop
Be a politician and fake it :)
can i somehow make my plugin load last or first
of all plugins
idk maybe some plugin.yml tricks
no
like load: POSTWORLD
cuz i guess there are not tons of plugins which also load postworld
default is postworld
Hello, how can I add a ServerPlayer to the players tablist ?
send the addEntitypacket
oh fr
add entity packet is the way
didn't know that
I've got this :java connection.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, this));But it is not working :/
Try ClientboundAddEntityPacket
You need to create an game profile
with a random uuid and the custom name
imma code it
wait
I don't think the packet i said does it 😂
coding time
@daring schooner
Im taking a look
okay
Intellij and Spigot are completely using my RAM so my chrome is crashing lol
well it just died
ClientboundPlayerInfoPacket and ClientboundAddPlayerPacket will show it
Are you setting the custom npc pos?
yes, in my code
ahaha it also blocks stop command
well, not workingjava // add player in player list for player connection.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, this)); // make player spawn in world connection.send(new ClientboundAddPlayerPacket(this))
code is here -> https://paste.md-5.net/yukemurega.java
Server maybe constantly updating player list info.
Is the entity spawning?
yes
well, I killed them but they are spawning
if the entity is spawnign there is no way (with that code) it's not added to the list
nooooo
Try adding the player then adding it on the list?
I mean, this prob wont solve the problem
Can you paste a case of use
where you pass the gp
and other informations
public static @Nullable IHerobrine createHerobrine(Location loc, String name) {
System.out.println(LibVersion.getVersion(VersionMethod.SERVER));
return switch (LibVersion.getVersion(VersionMethod.SERVER).toString()) {
case "1.20.1", "1.20.0" -> Herobrine_1_20_1.createHerobrine(loc, name);
case "1.19.4", "1.19.3" -> Herobrine_1_19_4.createHerobrine(loc, name);
case "1.18.2" -> Herobrine_1_18_2.createHerobrine(loc, name);
case "1.17.1" -> Herobrine_1_17_1.createHerobrine(loc, name);
default -> null;
};
}```
any ideas how can i do this
ClientboundPlayerInfoPacket?
why are you making a for loop like this ?
Do not sleep using Thread.sleep : https://www.spigotmc.org/wiki/scheduler-programming/
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
i wanna stop the main thread
in 1.20.1
and only do Loading...
it's ClientboundPlayerInfoUpdatePacket
why ???
look at the message above
yeah yeahh
the plugin which just infinitely spams Loading
and blocks everything
but it isn't
strange
😵💫
there is no reason to do this
bruh
that was "funny plugin idea"
i'm just testing it
and well, using thread.sleep on the main thread doesn't work sadly
well i can also just cancel all events
and say Loading on every player join or move or smth
well...
tho console would spam something anyways
who
Paulem
If you block main thread server probably wouldn't work much longer
What is even point of it lol
fun
because you are sleeping the main thread...
I mean, you're stopping the program lol
i just want "Loading..." forever
no
yes
what else can i do to fuck everything up but be able to spam loading
in console
That seems malicious tbf
PERFECT
nice
I added java connection.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_LISTED, this));
Oh, that's new
i didn't knew it existed
You can override tps info to zero.
how
well an apple a day, keeps new nms giberrish away
@fluid river if you have success in your development. I'll personally try to sell it to elon musk
The man that stopped time
i sadly don't know what to do
true
X plugin
lol

infinite loading screens for minecraft
cute bunny twitter videos -> cute bunny x videos
X Æ A-12 will be addicted to minecraft
damn true
💀
💀
elon is the most hated guy in the world I think 💀
i still need help
Damn i might just start a war
well, for me it is twitter, and elon is elon, not more.
how to sleep main thread without killing the server
I think it's impossible 
i mean it would have some time to operate
You can kill thread that checks the main.
make your plugin on another thread and stop it, you'll stop your plugin main thread

Won't it auto kill the program?
i need to stop the servers main thread
basically pause it 9999 times and spam loading
You need to kill or trick the watchdog
is he okay ??
wrong lookat code
it's funny
Hi, on my server stop, i need to convert all my data in cache in the database, but if i do it in async. Thats don't work because the plugin got disabled before and i get an error. then what is at the stoping if I do it synchronously it doesn't matter, no?
new ClientboundRotateHeadPacket(npc, (byte) Math.floor(npc.getYHeadRot() * 256f / 360f));
what does main thread actually do after Enabled (99s took)
I mean i can just kill everything in it
so it just does nothing
and there will be place for my loading stuff
Use scheduelrs
The main thread does pretty much everything
How would scheduler help me with blocking the main thread from everything except my plugin
disgusting
I sleep like a Philippine
as i said i can stop all events
and probably block all input commands
but it would still do something
I don't understand what this is supposed to mean
Basically i want this
That's intel motd
seems pointless. You may as well fire up your own console and spam sysout
waste of time
There is no "still"
Its seriously a waste of time with no beneficial outcome or knowledge to learn from it.
Have a repeating scheduler with 1 tick that calls Thread.sleep for 5 seconds
hmm
Hi, on my server stop, i need to convert all my data in cache in the database, but if i do it in async. Thats don't work because the plugin got disabled before and i get an error. then what is at the stoping if I do it synchronously it doesn't matter, no?
it's on disable anyways
Do it synchronously
Why would you do it async if server is stopping anyway
🤓
No point in it
but if I do it in sync it will wait for the end of the code to disable itself?
fun-killer
Yes
ofc it will wait
there is no risk of it crashing if there is too much data?
okay thanks
You're doing something wrong if you have to save that much data when stopping the plugin
What if server crash. All your data is yeeted
is nms' ServerPlayer considered like a real player ?
no player data is saved when a player leaves the server. moreover, these are not very important data (just player'settings (if player wnat receive chat for exemple))
(Can I listen with events to his death ?)
only if you add to world and use a null send wrapper
I think it's client side because when I disconnect and reconnect, it disappears
nmsWorld.addNewPlayer(npc);
okay thanks
Anyone help me
I was using addFreshEntity
Anyone know why minions skin not showing
after thread.sleep is done, there is some time until the timer goes again
and in that 1 tick all console commands actually work
server processes all of the commands i typed while thread was sleeping
in 1 tick
well i like it anyways
https://github.com/mallusrgreatv2/APIMachine/blob/main/src/main/java/tk/darklegacymc/apimachine/APIMachine.java#L27-L30
Is there any way to automate this?
config.addDefault("port", 4567);
config.addDefault("users.username", "{username}");
config.addDefault("users.last_seen", "{last_seen}");
config.addDefault("users.balance", "{papi:%vault_eco_balance%}");
just put that in config.yml resource?
yeah i did
or what
so if i have it in resources/config.yml i don't need that?
i mean what are you trying to automate
i don't want to do config.addDefault() every time a new key is added
working [14:48:50 INFO]: CraftPlayer{name=Herobrine} [14:48:52 INFO]: CraftPlayer{name=Herobrine} [14:48:52 INFO]: CraftPlayer{name=Herobrine}
so is it possible?
who adds the keys tho
send some chat in game from your client and make sure the server doesn;t crash
well you do it with addDefault or manually in config.yml anyways
code won't auto-complete
i don't want to do it in both config.yml and the plugin code
what ?
you do it in 1 place only tho
I have a config.yml in the resources file
you can see if you go to the github link i specified
just put everything there lol
log in and send some chat while your npc is there
and forget about addDefault
yes
and you don't need to add it with addDefault
and never use addDefaults
Tho you would need saveDefaultConfig() to actually copypaste yml file from jar to plugin folder
config = getConfig();
saveDefaultConfig(); both of this plus resources/config.yml are the whole thing i need to have a config.yml
with all data you typed in ide
config.yml
cringe: true
integ: 1
plugin
public void onEnable() {
saveDefaultConfig();
}```
hm alright tysm
after that you will have config.yml in plugins/yourPlugin
why doesn't the wiki have this?
with all that cringe data you wrote in resource config
I'll try later
idk lol
ive never seen a guy who used addDefault
idk i've been using it for a while just because spigot wiki has them and no one has bothered to change it so far
saveDefaultConfig() is as old as bukkit isn't it?
yes
so well idk why wiki forces you to use addDefault
if you can just manually place everything you need in config.yml resource
link?
hi,
if i get the title of an item and i check if it is equale to §2a
if i have set the title to chatcolor.dark_green, i got true?
well i guess addDefault can be useful if you are not familiar with yaml syntax
cuz bukkit's yaml has "mylist.var-one"
which translates to
mylist:
var-one: 1
link?
hm
and well, SnakeYaml doesn't support this thing
you cannot use get("mylist.var-one") with default snakeyaml impl
https://www.spigotmc.org/wiki/creating-a-config-file/
I think this focuses more on custom config files instead of the traditional config.yml, i may be dumb
yeah im definitely dumb
yea thats why i said im dumb
hi,
if i get the title of an item and i check if it is equale to §2a
if i have set the title to chatcolor.dark_green, i got true?
cya
?tas
i decided to read further which ended up in this situation
why don't you just check item.getItemMeta().getDisplayName().equals("§2a")?
without this ChatColor.SHIT thing
Or just don't check items by title
bad advice
?pdc
i have a bungee plugin that i would also want to function as an api. this means that i would want to call methods in my spigot plugin that would be executed by the bungee plugin. if it were two spigot plugins, i'd have no trouble setting it up, because i've already worked with those apis, but i'm not sure how to go about this case?
can i somehow fetch the bungee plugin instance inside of my spigot plugin? if so, it's a piece of cake to call the api methods afterwards, if i just set the api scope to provided it should call the methods from the bungee plugin
you can;t
It's not possible. That's why bungee messages created.
welp shit
Plugin messaging channels
You can create adapter plugin for spigot
like a spigot plugin that functions as a convenience api for sending the messages?
yeah i think that's the way to go actually
no point in over-complicating it
implement PMC in yoru plugin
no point in abstracting to yet another API in another plugin
well the api is not going to be used only by this particular plugin
there are going to be multiple
why not conveniently separate the api calls from the plugins then?
its literally a send and a listener. no point in a plugin for that
i know, i'm just saying that the bungee api is going to be used by multiple plugins. if i were to not abstract into a separate spigot plugin, i'd have to copy my logic into each of them
don't you think so?
no
How would I turn a plugin I made into an api to use in other plugins
Jitpack
unless you have a dozen or so plugins, all you are doing to sendinga packet for a request
across the entirety of the network, for every gamemode at least 2 plugins will be using the api
PMC is already an API. You are talking about wrapping an existing API in your own API so you can save a handfull of lines of packet info per plugin
haha, fair enough
how many method calls are you needing to query on bungee?
uhh the api contains maybe 25-30 methods
all of those have to be accessed via PMC?
i guess so, if there's no other way
I mean I'd say sod all these guys off, and actually try it.
If it works for you, cool. If not, you can share why it's a bad idea in a spigot thread.
We are dev help, not dev "tell you how to make ur plugin"
i'm going to request a method call via pmc, bungee will listen to it and execute the method
that's fair, but i like consulting with people who know more than me
i'm just a newbie with bungee yet
If you are using 20-30 methods on teh Bungee plugin I'd begin asking if yoru bungee plugin is doing more than it needs to
i don't think so 😛
Fun fact, sometimes you just wanna give it a go. Long beards end up being the biggest obstacle to change imo.
bungee plugins are generally very light as bungee is simply a proxy
it is quite light, but extensive fairly
fair
Imho, just write the dang thing and then get a code review
Worst that'll happen is its shit
i think i'll just do my initial way of separating the api into a separate plugin, if it's inconvenient i'll just put it back inside the plugin
I'd say get it workign in one spigot plugin
theres nothing to change on the bungee end if you decide to abstract it to anothe rplugin
No worries. Keep elgars advice in mind and document the whole process and make an informative spigot thread out of it, one way or another
yeah, i came here for advice so i'll take it into account haha
cya!
Good lad. Happy coding!
Now as for you @eternal oxide ... let 👏 them 👏 cook! 👏 🤣
Jk ofc.
let them do the dumb shit!
is making plugin instance a singleton a good idea
It's already a singleton no?
Make the methods synchronous?
myea thats the easiest way
are nms codes that are using nms package without the version package compatiable to each other?
No, never
damn
NMS isn’t guaranteed to be compatible with the next build of spigot from the previous build. It could change 2 times in a day
this bad
yeah... well. You should always have a really good reason if you wanna use a static singleton
since it does compromise a lot of design and flexibility
A singleton design pattern is bad?
Or its implementation...
that implementation is bad
Eh its great for stuff like managers
that sucks then how do you make it multiple version compatiabled. even through reflection some of the nms method names would be changed in other versions
no
wont it change in mojang mappings?
just DI everywhere and don't bother about it
... did you just... am I gonna have go grab my GO4 copy?
even if i have only one instance of something?
Yeah
Either don’t use NMS, or hope it stays the same, or use different modules and abstract out anything that uses NMS so each module of your project can depend on a different version
🤔
managers, or more professionally known as high level facades have no correlation to being singletoned, or multitoned for that part
more professionally known as a hashmap wrapper
myea not always
yeah sometimes it's a list wrapper
different modules actually make it harder a bit but aight thanks
then u have a repository, or registry facading class
😭
So you don't think a class that should have only one instance as it's a dang manager... would benefit from a singleton design pattern...
nah
buddy
Pal
manager does not mean its gonna be one instance
only time i make static instances is with uhh
mongodb codecs and even then I'm icky about it
icky but eh
looks fine
Who the heck makes more than one instance of the same manager? Have I ended up under some rock or something lol
AI agrees with you
gotta love edna mode
managers dont have anything at all to do with one instance lmao
It's not about 2+ instances
All in favour of chocolate changing their name to Edna mod
more about coupling n shit
Choco
manager is just a term for a high level facade
conclure is the guy when it comes to theorical java
man knows every single term
in theory
The GO4 disagrees. It literally uses a window manager as an example 🤣
*and considering they coined the damn pattern 😅
what are you even on about
I trust conclube very much so. Very much respect him. But I'm currently reading the printed words of the 4 mad lads who wrote these patterns to page...
PoolImporterDescriptorContextManagerPolicyClientManager
where abstract and factory
IAbstractPoolImporterDescriptorContextManagerPolicyClientManagerFactoryImpl*
The gang of 4? The people who wrote design patterns? Who first coined the terms and literally wrote the book on all this?
cant forget the c# I
Forgot Impl
HAHA
Nvm
knew it!
Fake dev fr fr
so?
they talk about the canonical singleton pattern
every time I look at this I feel like I fell in the trap of enterprise code
manager is not a pattern they really talk about canonically
most premium resource devs make everything static
as its just a facade at the end
yeah 90% of premium plugins are absolute garbage
How do I call event async?
ur hired
hu taged me
By calling the event asynchronously
Just be sure to pass async as true in the super constructor of Event
😦
yeah i know, but he asked exactly this
imagine if SQL was the same for each as well
Thanks.
Some queries change a little bit which is why I have the abstract class
Ima leave this to an excerise for the avid reader and call it a day.
Agree to disagree conclube. I'm not gonna make a big song and dance over this lmao. Legit no beef mate.
that’s what i mean, it’s a pain lol. Why support so many tho. Normally there is just SQLite & MySQL
biggest waste of money
People have asked for it
Like specifically asked for it
fair
bro, are you trolling?
it uses a slightly different driver
Which gives a use case for the singleton as.... Read it
looks braindead but works
yes but it has nothing to do with managers
ignore how the island data is literally just the same as a islandid <-> ownerid relationship
it just happens to be so that windows manager was named as an example
it does not even remotely imply managers are to be single instanced
i dont think a manager ive made ever had two or more instances
you need to re-read that
eh that’s fine. I find the enableDriver method odd tho idk
u probably have
different pattern to what i’d do
my managers are p much hashmap wrappers
that are just managers
It just loads the thing and tests a connection
i just use my own naming for stuff
that i think matches what it does
at the end of the day i must understand what my code does
yea
i can name one example
FileConfiguration
that can be considered a facade class for some stuff. pretty sure u've had multiple instances of it
funny how FileConfiguration implements ConfigurationSection
yea
guess what PlayerMessageData is?
a data transfer
If its okay can I dm you conclube, I don't want to turn this into a public shit show as I do have one more image from the book to show u mate.
If you have a copy I'd suggest looking on the design patterns relationships on the first page
its a wrapper for a yaml config
Something tells me your books are outdated
guys just wanted getStuff() right in fileconfig, cuz technically fileconfig is also a configsection, just the root one
sure, but I have read many books about design patterns also lol
its not like im saying stuff out of guessing
this is how I do mine
ehh
😭
I've done that but it's a bit too much
I should put sonarlint on my plugins list tbh
hate it when sonarlint is wrong
i wanna make something like this
so config autogenerates ideally
mfw people think singleton means static
and autoupdates
Like ehh
yeah, it's super cool
I have a method to copy lines to auto-update my configs
does yours generate the config and update it @lilac dagger
yup
It just pulls whatever is missing from the builtin resource
loads the values from config first then recreates the config
I mostly use it on my messages.yml
rock the microphone
uuu what about comments
old yaml doesn't support comments so i couldn't just add them to mine
if i were to support newer versions would be as easy as adding an annotation and write 3 lines of code
it's what spigot has
wdym old yamltho
yes
indeed
u can check for version and just enable that for supported ones tho?
sure but it's also a lot of work adding comments just for the ones using he latest
but i might do it
i just have to write a bunch of comments
Hello, how can I remove the ServerPlayer after he dies ?
Send an entity destroy packet
Not sure exactly but I know that it's plural
Like ClientboundRemoveEntitiesPacket or something
bot
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
jesus christ holy text wall
message deleted 
thank you conclube for your dedication
:3
hmm facing a weird problem right now
face the other way
I'm making this skyblock system and a feature that people have requested before was the ability to have profiles, so that you can have like 3 islands attached to your account.
My skyblock system just uses island UUIDs that are tied to the player's id, but there are multiple approaches I can take to profile switching:
- A sort of mapping interface that takes the player and returns its uuid, by default just returning the player's own, but profile plugins can add their own impl that returns the profile id
- Creating my own player join/quit events that have a player id, which profile plugins can just call with their own profile ids instead
I'm also not sure if I should make the invite system tied between the player and the island (/island join ImIllusion) or just create a unique invite code
But I'll probably just use the player name honestly, looks cleaner
And is a bit more secure
I might also just make a bunch of interfaces with default impls and a separate premium plugin for profile switching :)
If its player related why not skip a step.and make it the players uuid
Because the player's UUID is set by mojang
And?
There is only 1 per player
What I'm looking for is a sort of selection system where the player can select their own profile id
Right... so a Map<UUID, Set<Island>> uwu
Ehh it's not that simple
Isn't it?
n o
Because I'm not going to load 5 different islands when the player joins
If the player is only going to play on one of them
Hello, how can I make a ServerPlayer (created from zero) take knockback like a normal player ?
Erm... classes don't have to load what they contain on load...
You ca have a build method in island..
It's just not a clean alternative
you need to implement a few extra methods in your extended class
Agree to disagree
I might just make a SkyblockPlayer class with a realId, selectedProfileId and maybe displayName
And keep it on redis
what are the methods to implement ?
?paste
Is it possible to write objects into yml like in JSON?
or I need to use sections/workaround
Ehh I created a new branch and will try to bodge something up
If it looks clean it'll get merged
okay thanks
If not it'll get reverted and I'll rewrite it with what I learned
it is for which version of nms ?
(I'm on 1.20.1)
1.19.2, but not hard to update
idk the equivalent for isBypassArmor
no clue as I've not looked ato 1.20
okay
I think I found a neat solution
It looks like they use a key now. You'd have to look in DamageSource to find the one that applies bypass armor
what do bypassArmor check ?
some damage sources ignore armor
so I need to check the damage type ?
@eternal oxide
public static final DamageSource IN_FIRE = (new DamageSource("inFire")).bypassArmor().setIsFire();
public static final DamageSource ON_FIRE = (new DamageSource("onFire")).bypassArmor().setIsFire();
public static final DamageSource IN_WALL = (new DamageSource("inWall")).bypassArmor();
public static final DamageSource CRAMMING = (new DamageSource("cramming")).bypassArmor();
public static final DamageSource DROWN = (new DamageSource("drown")).bypassArmor();
public static final DamageSource STARVE = (new DamageSource("starve")).bypassArmor().bypassMagic();
public static final DamageSource FALL = (new DamageSource("fall")).bypassArmor().setIsFall();
public static final DamageSource FLY_INTO_WALL = (new DamageSource("flyIntoWall")).bypassArmor();
public static final DamageSource OUT_OF_WORLD = (new DamageSource("outOfWorld")).bypassArmor().bypassInvul();
public static final DamageSource GENERIC = (new DamageSource("generic")).bypassArmor();
public static final DamageSource MAGIC = (new DamageSource("magic")).bypassArmor().setMagic();
public static final DamageSource WITHER = (new DamageSource("wither")).bypassArmor();
public static final DamageSource DRAGON_BREATH = (new DamageSource("dragonBreath")).bypassArmor();
public static final DamageSource FREEZE = (new DamageSource("freeze")).bypassArmor();
public static final DamageSource STALAGMITE = (new DamageSource("stalagmite")).bypassArmor().setIsFall();```got them !
No clue I've not looked at teh new registry system
I searched in the registries
ok
When using p.setDisplayName(String) to change the name in Minecraft version 1.19.4 or higher, this error occurs. Help me
java.lang.IllegalStateException: Missing key in ResourceKey[minecraft:root / minecraft:chat_type]: ResourceKey[minecraft:chat_type / minecraft:raw]
at net.minecraft.core.IRegistry.e(SourceFile:88) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
at net.minecraft.network.chat.ChatMessageType.a(ChatMessageType.java:59) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
at net.minecraft.network.chat.ChatMessageType.a(ChatMessageType.java:49) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
at net.minecraft.server.network.PlayerConnection.chat(PlayerConnection.java:2121) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
at net.minecraft.server.network.PlayerConnection.b(PlayerConnection.java:2189) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
at net.minecraft.server.network.PlayerConnection.lambda$17(PlayerConnection.java:1895) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ~[?:?]
at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]```
but well, they aren't in nms 1.20.1...
idk where they are registered
and to find it I should get all damages messages 
i have here a plugin which should hide players' nametags if they are behind a wall https://paste.md-5.net/ikozaxubap.java
the way it works is using packets it tells each client separately about a team which has nametagVisibility: never and in that team it puts players that the client should not see. it works, but i noticed with protocollib that it sometimes sends the packet to update team info (it's different than updating players in that team), even though my code never sends that packet. here is the log: https://paste.md-5.net/gohibifumi.sql
here is the packet (1.16.5 protocol version 754): https://wiki.vg/index.php?title=Protocol&oldid=16657#Teams
is nms or something doing it internally? should i intercept and block these excess packets or will the client dismiss them normally?
so, well, no isBypassArmor, anyway it's for Herobrine and he will not die
package com.qm.customname.System.Command;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class NameCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if(sender instanceof Player) {
Player p = (Player) sender;
if (p.isOp()) {
if (args.length == 0) {
p.sendMessage("/nickname <player> <name>");
} else if (args.length == 2) {
Player target = Bukkit.getPlayer(args[0]);
if(target == null) return false;
target.setDisplayName(args[1]);
target.setPlayerListName(args[1]);
}
}
}
return false;
}
}```
how do you use your command ?
what did you entered ?
What api-version is set in your plugin.yml?
1.19.4
API version should just be the major version.
is that even a valid api version?
maybe
Spigot-API 1.19.4-R0.1-SNAPSHOT
I said plugin.yml not pom.xml
1.19
Hello, in the inventory object, if i open the same inventory for two players, thes two inventory are considered like equals?
well then that's fine. Where did you get the spigot version you are using?
On your server
Don't do that
.
okay
It's not a valid or official source for bukkit/spigot and might even contain malicious code
where can i download bukkit?
?bt
You compile the server jar yourself.
ok thanks
Build it yourself ^ only safe and legal method
👍
Hello, in the inventory object, if i open the same inventory for two players, thes two inventory are considered like equals?
if anything, can someone tell me a good way to find all places where certain class is used in spigot server jar? intellij idea find usages -> project and libraries is returning only my project and not the decompiled .class files
Thanks
xD
If that wasn't part of java.util I'd probably blame people for writing code like that
Time to write something funky
Hello, how can I remove a ServerPlayer from the tablist ?
static <K, V> Map<K, V> of(Pair<K, V>... pairs) {
...
}
``` xD
ofc my ide caches broke
REMOVE_PLAYER update packet
doesn't exist on 1.20.1
Nah I just wrote something funky
version: 1.20.1, hash: c1a7cd8c7d
it's the remove version of ADD_PALYER. one shoudl exist
What would cause this error?
Could not resolve dependencies for project io.github.runtellobama:ArcturusRpg:jar:1.0-SNAPSHOT: Could not find artifact org.spigotmc:spigot:jar:remapped-mojang:1.20.1-R0.1-SNAPSHOT in spigotmc-repo
I tried UPDATE_LISTED, but it's not working
public void deleteEntity(Player p, ServerPlayer toRemove){
ServerGamePacketListenerImpl connection = ((CraftPlayer) p).getHandle().connection;
toRemove.kill();
connection.send(new ClientboundRemoveEntitiesPacket(toRemove.getId()));
connection.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_LISTED, toRemove));
}```
did you run buildtools with the remapped flag?
okay thanks
what is the remapped flag again i forgot
?nms
thx
--remapped
I didjava public void deleteEntity(Player p, ServerPlayer toRemove){ ServerGamePacketListenerImpl connection = ((CraftPlayer) p).getHandle().connection; toRemove.kill(); connection.send(new ClientboundPlayerInfoRemovePacket(Collections.singletonList(toRemove.getGameProfile().getId()))); connection.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_LISTED, toRemove)); }
idk if I need to keep ClientboundRemoveEntitiesPacket 
well, I'll keep all three 
I was going to ask why there was no varargs for map.of
But it would require either the same key and value type, or you would have to have a vararg of Map.entry
Funfact:
vararg is a thing for lists but they still have all the methods
Or some method like mine
Where they just do instance checks
Legacy code I guess
but inheritance would easily break stuff
Like a <K, V> Map<K, V> of(Class<K> keyClass, Class<V> valueClass, Object... objects)
Yeah it would probably break already compiled jars. You would not get any other issues if those were removed
i'm using remapped nms on 1.19.4 but some fields or methods throw nosuchmethod/field errors. Do I have outdated mappings or something similar?

profile system turned out clean enough
an example is entityManager in ServerLevel which throws a nosuchfielderror:
Caused by: java.lang.NoSuchFieldError: L
apparently when i compile, the field is remapped to L but it's not there at runtime
Are you sure your server is actually 1.19.4?
do you use the specialsource-whatever plugin in your pom?
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.19.4-R0.1-SNAPSHOT</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>
i do, i use nms everywhere and i'm only having issues with that particular field
could it potentially be that it's paper?
<plugin>
<groupId>net.md-5</groupId>
<artifactId>specialsource-maven-plugin</artifactId>
<version>1.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
<id>remap-obf</id>
<configuration>
<srgIn>org.spigotmc:minecraft-server:1.19.4-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
<reverse>true</reverse>
<remappedDependencies>org.spigotmc:spigot:1.19.4-R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>
<remappedArtifactAttached>true</remappedArtifactAttached>
<remappedClassifierName>remapped-obf</remappedClassifierName>
</configuration>
</execution>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
<id>remap-spigot</id>
<configuration>
<inputFile>${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar</inputFile>
<srgIn>org.spigotmc:minecraft-server:1.19.4-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
<remappedDependencies>org.spigotmc:spigot:1.19.4-R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies>
</configuration>
</execution>
</executions>
</plugin>
i really hope it's not
try it w/out paper
can I check paper obfuscated fields with its mappings somewhere
i'm sending a plugin message to my bungeecord plugin, the message is intended to make a selective query to the database and return a value. however, i have no clue how to receive the value back. my current idea is:
- send a message with an ID assigned
- wait for the response to come back with that id, put it into a map of <id, response>
- a completablefuture is waiting for the map to receive the value with a while-true map, after receiving the value it returns it
this sounds very very hacky and funky and i feel like the while-true loop would eat performance. are there any better ideas?
the returned message should contain all the information you need to handle it at the client
i think you misunderstood me a bit. take a look at the diagram, this is what i'm trying to achieve. when my adapter sends the query, the execution of the method ends. (e.g.)
fun selectiveDatabaseQuery(query: String, vararg parameters: String): Any {
sendPluginMessage(getPlayerFrom(null), "selectivequery", latestUpdativeQueryID.toString(), query, *parameters)
i sent the request to obtain my data, but i have no way of retrieving it to return it with this very method. i can listen to the incoming messages and get the response, but how would i return it?
this is what i came up with so far but as i've mentioned it sounds very hacky
if you are talking about between plugins you can just register and listen to events
you could even make your API plugin an RSP
i don't think we are on the same page. i can of course easily retrieve and send messages, but how would i do it in a smooth flow? when i need to send a message, wait for the result, and return the result, all within one method, how would i accomplish this?
you can't wait
well there is this approach
well you could, if you are async
yeah i can go async
however your response would come via a different method than your query
hm, can you explain the logic you're thinking of? i'll see how i can work with it
what kind of data are you querying? and what do you need to do once it arrives?
well, for example it can be the player's locale
i just need to return it and work with it
actually btw those values are cached in a map if a player has logged on since the server has booted up
So would you always do the same thing every time you received the players locale?
otherwise a db query is executed
well, pretty much, i get the locale name with my adapter, return it to the plugin, and then the plugin works with it
if you always do the same thing then you trigger the same code everytime based upon that data
you disconnect your query and response logic
ie
a player joins and you send a request fo rtheir locale...
you do nothign else
well, example:
// 1)
val localeName = selectiveDatabaseQuery(QueryType.LOCALE, playerUuid.toString())
// 2) ???
// 3) profit
val locale;
when the response comes its a locale so you perform x,y,z tasks as you just received a locale
hm yeah
i got a bit lost in the discussion, so how exactly do i retrieve the value?
say, i've sent the request:
selectiveDatabaseQuery(QueryType.LOCALE, playerUuid.toString())
now the adapter has received the locale and it's somewhere in the onPluginMessageReceived:
// :snip:
val locale = ...
what now? how would it be retrieved?
what are you refering to as your adapter?
a separate plugin, an abstraction layer which provides the methods that are inside the bungee plugin
this diagram ^
your spigot adapter plugin queries your bungee plugin sending who asked, the query type and whatever other data it needs to find the data and return
bungee then returns who asked, the type and data
your adapter then forwards that to your plugin
This is why I said just get messaging working first. Don;t add in the complexity of an adapter
yes but forwards how? should i make an event like BungeeResponseEvent and send the data there?
that's true, but i'm just trying to get everything done from the beginning, because i know that a bunch of my plugins will be using this api. it might be overkill for now, and if i cannot manage, i'll have to resort to scraping the adapter
yes youd use an event
sounds good
Hey, do any of you know how I make RGB colors into a MOTD? Tried it with ChatColor.of("#0ea4e6") but unfortunately it didn't work :/
you can do it all in a RSP (registered Serice Provider)
its basically just a class template
your adapter registers it
your spigot plugin looks for it and registers any listeners you need
oh, sounds convenient
same as most Economy or permission plugin
yeah, the only time i've encountered the use of rsp is when i was working with vault