#help-development
1 messages · Page 1496 of 1
Ahhh needed to restart it
it looks shit lmao
no, it looks simple
would it look better if it had rounded corners, animations and a flashing background?
would you prefer it if it had widgets that spun around and popped up at random and gizmos with fancy textures
Honestly - yes. i like it when it seems like they have actually put effort into making something look nice
i don't want things to look nice
i want the effort to be put in the things that matter
like usability and performance
granted, the former is fucking shit for ripcord
performance is never gonna be the best cause it is just an electron window - and yes
which is the reason I use it
fair enough
electron applications are too heavy for me to run
i don't mind the simple look; i actually prefer it
kind of like how I prefer how eclipse looks and feels over intellij
i preferred the time back when effort was put into making things good, rather than making them look nice
i mean - its ur opinion. but i think that companies still do both
sometimes, yes
thats why everything takes just as long as 10 years ago to load with such faster hardware, companies really care about performance
though most "simple" companies like discord aren't actually simple at all
i am in the paper vc rn listening to them update and it is hilarious. they are kinda roasting 
they always are
yea
after anything they are like 'of course it is 🙄 '
yeah
but i mean - have u launched a 1.17 spigot server
it does take a little while
idk if it is necessarily any longer than 1.16 but still
mojang messed something up in the world loading no ? Like you are stuck at 0% for a while
of course they did 🙄
didnt know they streamed development
this is so
awkward to watch
perhaps I should drop in as well
its just old german men being insanely good at computers
i feel like im invading their homes
I mean, the actual upgrading process is going to be fun hopefully
which alt shall I use today
i mean thats just what development isl ike
scratches head for 5 hours why in the name of god arey ou doing this
oh
them revamping paperclip is making me sleepy
true
yeah....
oddly therapeutic
true
NMS, logic?
couldnt be me
lmao
if you read the post md_5 put out I think it becomes rather clear that the move to mojang mappings was not created in the spigot development team
apparently tho they add classes to nms so mini is just stuck trying to get it to work
but brought forward by the community
for whatever reason. I guess so that people coding multi platform trash
Understanding this is almost impossible
not really
bruh, mojang mappings means you get to reobf your own plugin
lmao
for no apparent advantage
muh mappings
Btw how do the devs of this even know what they are doing
what ? it isn't that hard lol
DenWav is just like renaming variables
Ah
trying to fix all the linting
So you must know what something does, and then you can set the name so you know what it is
I saw they have now a better json api
concerning that there are official mappings from mojang that should not be too hard
Hm tell me an example
what ?
From the mappings
who reckons
has an alt and he is just sat in the vc crying
literally every line of the mappings is an example
as he gets ripped apart
idk what you want from me 😂
yes
I think we'll have to wait until the spigot is out?
a) spigot 1.17 is out and b) the spigot mappings are also out
the spigot is already out
paper does not start their upgrade process until spigot is done
Yes
Thx
Those are the real names of the classes? https://hub.spigotmc.org/stash/projects/SPIGOT/repos/builddata/browse/mappings/bukkit-1.17-cl.csrg
how come the vanilla minecraft server jar is so laggy though compared to spigot? do they just rely on spigot and ignore doing whatever spigot is doing to improve performance?
it is what spigot assigned them
Even just switching to spigot from vanilla boosts server performance
those are not mojang mappings
cause mojang dont know what they're doing
i feel like it is possible paper could be out today
But this make the multiversion compatibility more difficult to code
then 0 updates til tomorrow, they need sleep
i mean, most are german so it is midday
only denwav is US afaik
For me it is like 12:35 xD
We can remap the code, but we cannot remap them for different version
So we need to leave some obf method name or field in the code which make thing worse
It's more unreadable than before
I'll wait and see how protocollib do this
As an example
1.16 code
1.17
It's completely unreadable
Different classes
Yup
Different class but just the same implementation of different version
Has anyone had issues with there plugins and reading yml files since updating to java 16/spigot 1.17?
Yeah which dependency are you using kyle
I would suggest waiting a while before starting 1.17 development?
Pascal haven’t tried but is there an issue?
there can be a lot of issues XD
Yup
maybe do like a test run in separate projects first
Code became really unreadable if you're working on a plugin which has multiversion compatibility
.
understand what 1.17 changed or even wait for some guides to come out first
Spigot
then add support to your plugin
There are apparently 3 jars
yeah
But the thing is
it's much different
So might be the case you got the obs one
Just a plugin I use has been failing on reading .yml it uses (From what i can tell), Its not the most maintained project so thought i'd give it a go. However the stack trace leads me to org.yaml.snakeyaml.composer.Composer basically having an array out of bounds exception.
ArrayList.add adds thing to the tail right
That’s why we have an api kylepoops
@river delta full error needed
snakeyaml was upgraded so its possible its an error on their end
Oooo
a copy of the config would also be helpful
Supporting comments then?
yeah was upgraded in preparation for comments
thankyou for the Library Loader, I haven't tried it yet but it sounds really awesome.
🥳
Well there's something currently not being supported by api
its been out for a while
Pr it
stack trace: https://i.imgur.com/tMAEcn2.png
core.yml: https://pastebin.com/jG78crBp
the paper people are moaning about maven central sending out some nasty emails cause of the library loading though
if I for through a set, does it get the objects by the orders they were added in or
like for loop
since 1.16.5 according to the post, but i've been away from minecraft for a while
yeah
hmm yeah does look like an issue with comment support
lau oh yeah I think it does but there’s no guarantee that order will be kept forever
hmm
I see
I mean Im gonna have to sort is for priorities anyway so it doesn't really matter
it would just be a good to have for protoptyping
Yeaaaa, "Excessive requests or bandwidth" is against their ToS and depending on how many servers are downloading things using the library loader that might be a yikes
We’re taking about a normal HashSet right lau?
You probably wanna do it with a Comparable<T>
Yeahh - but at the same time i feel like they may be overreacting because the server does cache it so in theory it would only query the server once ig
I mean, very much depends. Plenty of minigame server create their server instances on the fly
Ohhhhh - yeah for that it would be very bad however i feel like they would cache it on the network in order to prevent the bottleneck of downloading it
tbh at some point spigot might just have to provide a central mirror
If i pr something protocollib currently providing will it be merge (seriously
there will not be any generic packet support in spigot
What is it specifically ?
Packet
highly doubt it
So do i
can I sort a Hashmap with a Array
So I'm asking
Well it isn't about sending the packet
more about what you want to achive
for example, Player#sendBlockChange was pulled while a BlockChangePacket PR would not have been
It will be good if spigot can provide some api like protocol lib
but it already exists lmao
the concept of protocollib is not stable enough to find its way into spigot
^^
also - is there complete protocollib documentation
the closest thing afaik is wiki.vg but that is just generalised
what's the best way to sort a Hashmap?
I want to sort a Hashmap by its key
the key is a string
hashmaps do not know the concepts of order
By key or value
^^
but then, it is just sorting a list
Lau, do you wanna sort the map by key or value ?
Then you could use a tree map
doing custom sorting on a tree map seems counterproductive to the concept of a tree map
oh
mb, you are saying throw it into a tree map
so I convert to a treemap
what next
I never used it before
ok I just looked it up and it sorts itself
but the key is a string? How does a treemap handle that
Assume you provide a custom comparator
Or should I convert the string first
String is Comperable<String>
I dont really have a custom provider, I just have a string array that I want the order to be
if the entry is with that key is present ofc
and I would like to not need to convert that into a comparator
you have an array that you want the order to be ? what
like the array would be the order of the keys of the entry after the sort
Or what will happen if someone pr a patch to expose the command map
say hashmap has
Health, 50
Magic, 69
Defense, 3000
in it
and my sort array is
{Magic, Defense, Health}
then the output array or whatever would be
Magic, 69
Defense, 3000
Health, 50
imagine the comma separates the key and value
Nowadays we need to get command map by reflection
Wut
The concept of an API is to provide API not just straight up exposing internals.
We need to get command map by reflection
Yup
Paper expose it and we can get it very easily
yes, so if you want to achive what you currently do by reflection with the command map, write an API for it
is it easy to do that or is it easier just to make a comparator
cause a comparator can be made from an array
tho I guess CommandMap is already part of the API
Nope
it is
It has an interface
CommandMap lives in org.bukkit.command
But still isn’t exposed
It's exposed in paper api but not in Spigot
yea
idk if there were discussions about this on the issue tracker
but I'd guess there is
To get the server current command map we need to use reflection
I mean that should be trivial if you know what you’re doing, but yeah I wouldn’t mind getting the cmd map exposed in spigot also.
So the brigadier?
Broken api > no api (:
is this something that can be patched on my end, or requiring spigot changes?
https://hub.spigotmc.org/jira/browse/SPIGOT-3821 there is this issue
Conclure
ive pushed an update to use an older versions of snakeyaml
Brigadier is important
can I like make a custom comparator for treemap or smth?
That was shaded in since 1.13 or smtng
Yeah
Yup but brigadier was never expose
¯_(ツ)_/¯
We cannot do something we can do with brigadier with bukkit command api
pretty sure you are free to either a) open a PR or b) open an issue for this.
will get a discussion started hopefully. If the maintainer team does not see it as valid, then that is how it is
Oh Kyle you mean as a transitive dependency?
following the brigadier example, acceptable API: adding custom tab completes, unacceptable API: adding brigadier
Why tho
because brigadier isnt actually good
Brigadier can show up more information when player is typing command
yes and an acceptable API would allow any command framework to show that information
Like an api which allow us to set the range of a number argument or something like that?
can someone link me to a guide or something about custom treemap comparators? I've looked for a bit and found noting
do the javadocs not help?
the java javadocs?
ye
that's a thing?
👀
👁️
👀
yes
bruh
Oh
I thought a minecraft comparator
lol
I think you will have to use reflection for this. Spigot does not have a profile API
so do I implement it or
by accessing server internals regarding chunk block pallets and tile entities
Paper has btw
Where can i open a issue
I don't know how to use spigot repo system lol
how can I disable spawn setting for player ?(make beds and respawn anchors useless).
listen to PlayerRespawnEvent and change the spawn location
I don't want it to be a set location
Hmmm sorry fot selecting the wrong project
just the default minecraft respawning
World#getSpawn
it returns a location
yes
then adjust that location by +-16 on x and z
What is PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER for 1.17?
What are you guys seeing for Spigot 1.17 build times? It's been going here for +- 10 minutes 😅
one sec and I'll start a build
:))))
1:27.38 total for a cached build of spigot 1.17
with already patched work directory
Cached build is fast too for me yeah
but a fresh one took a while
09:22 it seems
Hey, I am having an issue with the new remapping tool:
In the first step of the remapping (offical mojang to obfuscated names): Field names aren't getting remapped, meaning player.level (nms player) should be translated to player.t (which is the obfuscated name) but it stays player.level
Class names and methods are getting renamed though.
This is the build config I am using, as I said everything works except fields, which arent getting renamed: https://hastebin.com/qelufejofa.xml
Does anyone have the same problem?
how do I compare entities
for (ItemStack i :inv.getContents()){
ItemStack item = new ItemStack(Material.getMaterial(160), 1, (short) 15);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName(Utils.formatChat("&r"));
item.setItemMeta(meta);
inv.addItem(item);
}```Im using this to fill my gui but it gives 27 black stained glass in one slot and i need it to fill can someone help.
Probally using isinstance
Use inv.setItem
@deep escarp direct access, not reflection right?
build finished
How do i get the slot number that is not taken
I want to check if the entity that got hit is a wither and instant-kill it if it is
spigot 1.17 is out if u didnt know
so I would need EntityDamageByEntityEvent
That was my first build took under 2 minutes
hello everyone
Use a regular for loop to loop through contents instead of an enhanced one
I mean the only real addition is the reobfs part of the build process
how do i assign a variable to a uuid
yes, direct access. this is how it looks in the code: https://i.imgur.com/61fteY7.png || and in the remapped-obf.jar https://i.imgur.com/X5tRlsV.png
Imma go consume food now if you guys got solution to my problem plz @ me so I can check back later
You can just use the EntityDamageEvent.
Get the type of entity it is by using Entity#getType
leggings:
material: DIAMOND_LEGGINGS
enchants:
- PROTECTION_ENVIRONMENTAL:
level: 2
is this valid
or am i unable to do enchants: - protection_environmental: level: 2
because its an array/set
Why that? I want it to only insta-kill if player was holding an admin item lol
Oh sorry. Yea use The event you were talking about before lol
no details given doesn't mean no detail :P
anyone know?
thx I forgot I had to gettype lol
I think that should be valid yaml, tho why not just
leggins:
material: DIAMOND_LEGGINS
enchants:
PROTECTION_ENVIRONMENTAL: 2
how to get playerConnection on 1.17?
do you mean converting a string to UUID?
you could do UUID variable = your uuid
no
Explain better
how would i use Enchant.valueOf with that?
read the https://www.spigotmc.org/threads/spigot-bungeecord-1-17.510208/ about NMS changes
1 sec i'm tryna explain it
that seems like a much more cleaner way, but im not sure how to get PROTECTION_ENVIRONMENTAL instead of its value
so basically i want to make a chat color thing
but for that i need all players that have their chat color on to have a variable with their uuid on it
they are the ConfigurationSection#getKeys(false) values
also it's because i'm making an array of enchants, it may have more than 1 enchant
Player#getUniqueId()
what does that do
it gets player's unique Id
oh i know how to do that
no, true just means it fetches all keys in the configuration section
oh
Basically a player prefix that all permission plugins/chat plugin already do.
I'm kind of confused on what you want to do
basically i want a list string with uuids on it that have values of the color of their chat
then i want to check on the async player chat event if the list contains them, and if so what color they have
and set the chat message to that color
kits:
Tank:
helmet:
material: DIAMOND_HELMET
enchants:
- PROTECTION_ENVIRONMENTAL:
level: 2
chestplate:
material: DIAMOND_CHESTPLATE
enchants:
- PROTECTION_ENVIRONMENTAL:
level: 3
leggings:
material: DIAMOND_LEGGINGS
enchants:
- PROTECTION_ENVIRONMENTAL:
level: 3
boots:
material: DIAMOND_BOOTS
enchants:
- PROTECTION_ENVIRONMENTAL:
level: 3
mainHandItem:
material: DIAMOND_SWORD
enchants:
kit-type: 'Sword'
yea no i honestly have no idea
How do i remove enchantments and potion names from lore
You can;t do that, you can instead combine the enchat and its level then split after you get the list
You’d need to make a HashMap, but I’m really confused why you want their chat color
what's a hashmap
using regex?
it's like hashbrowns but it stores cool data
just split on a character
It’s basically a List where you can put two values in it so UUID & Chat color
i'm trying to learn java by coding
ye, like ,?
yes
ItemFlags
However I’m yet again confused why you want to get what colour appears when a player types in chat
but how do i do it per-player
or you use a map, <Enchantment, Level> and store it under an enchantment key
or is it like a list of values that those values have two values
Give me more of an insight of what you actually want to do and I’ll try help you.
i have no clue what to say, i said all i want to do
how do I serialize a BigDecimal
Like when do you want it to check for their chat color
that's what i would do, but my question is how i would get PROTECTION_ENVIRONMENTAL instead of its integer value
on async player chat event
getKeys()
?
would return all keys in the map
So when x player speaks in chat you wanna add them and their chat color to a list?
nono
what do i do with it
i want to check what their uuid's chat color is and then set the message to that color
if you want to check a specific enchant you get("PROTECTION_ENVIRONMENTAL") if its null then its nto there
But a UUID doesn’t have a chat color???
do i set deep or no
Unless you gave them one
UUIDs cannot have colors at all what are you trying to do
unless you turn them into a string but like
why
You cannot get something you haven’t set?
a variable list set to uuids with values of colors
i don't want to set their uuids to anything
That's a map
I know but how does it determine what color the UUID has linked to it
Q?
i have no clue, that's why i'm asking how to do it
No that’s a question for you
Cause a UUID doesn’t come with a chatcolor
😃
what are liskov
TL;DR Interfaces > Classes
i dont have google srry
again, i do not want to set their uuid to something
i want this ^^^
Do you want to assign a Color for each UUID?
for the third time i do not want to change their uuid
You literally just repeated yourself
I'm not asking you to do so
But in different words
You can't change someone's uuid
i want a list variable with uuids in it, each uuid in this list variable has another value of the chat color
How do you create a custom data type in a API? Or is that something I’d need to look up, I’m really interested to find out the backend to apis
but only in the variable list
What I’m trying to say is that how is the plugin meant to know what color is associated with the uuid
not actually change their uuid
BigInteger.toByteArray() and new BigInteger(array)
Nobody said anything about changing UUIDs
putting them into a hashmap with the value as the chatcolor doesn't change their uuid
it only stores it
You want to assign a color for each uuid?
in a variable
BigInteger and BigDecimal are different things
what he said
BigDecimal has scale and rounding mode/precision
A long ago
map<uuid,chatcolor> whatyouwantidk = new hashmap<>();
Would anyone with the mappings available be able to find the obfuscated field name for levelName in DedicatedServerProperties ? Thanks :"D
then whatyouwantidk.put(uuid,chatcolor)
then you can fetch the value by whatyouwantidk.get(uuid)
this returns chatcolor (the value) btw not uuid
it teh precision preserved when you use BigDecimal.toBigInteger() ?
Look an article talking about Data Structures or maps in java, there must be several of them on the internet
no cos a BigInteger has infinite precision
besides not every BigDecimal fits in a BigInteger
Probably you can serialize every component of the big decimal
The base and the exponent
is it possible to create a discord bot using (javascript, discord.js) and its online whenver the server is online
then create it again when deserializing with the given base and exponent
Yes
But you won't do that on js lol
which is better
if(!event.getEntity().getType().equals(EntityType.WITHER))
return;
if(!(event.getDamager() instanceof Player))
return;
//Stuff here
or
if(event.getEntity().getType().equals(EntityType.WITHER))
{
if (event.getDamager() instanceof Player)
{
//Stuff here
}
}
can you have a variable grid?
I prefer the first one
for the uuids and colors
the js discord lib. is powerful
I know
won't or can't?
dis
I mean, you can create a plugin which the JDA (or discord4j) embeded
oh
implicit
wat
you can do it on Js and create a sort of protocol
the first (implicit) one
if (hideFlags){
meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES);
}```Why isnt thisa removing the potion type
oh it was meant to be a plugin? my bad, then you wont yeah
For the 198234761923th time, use freaking maps
that's what you're looking for
ok
is there anything different about those two?
Because that’s not an attribute
so how would i do it?
not really. its more the style AND that you can do something still outside the explicit (the second one) if-else's without returning immediately
I think their is a flag for hiding potion effects
Second one can lead to spaghetti code also
First one is more clean:
public void onExecute(...) {
if (!(sender instanceof Player))
return false;
// Do code here
}
@deep escarp found a fix, updated thread. Basically need to add the remappedDependencies part
use brackets
not for oneliner
that's not a one liner tho
Depends of the project's style
It is
if (!(sender instanceof Player))
return false; 🤔
I just returned
not the entire method
The entire method has brackets lol
thanks
how wouldnt it lol
why did my single message spark a whole ass debate lol
lol
because it depends on opinions
And the project's code style
There are code styles that explicitly tell you to do it in a specific way
isnt exactly that the opinion? 
I find it extremely easier to read code that doesn't include one liners, it's a lot cleaner than just having a bunch of non-brackets floating around 😠
i mean if you format correctly, space properly, and add your comments properly it shouldnt be any issues
^^
I always add a space between one liners lol
and that is totally fine 
So, people realize there are no brackets
but if you prefer brackets instead of 1 liners thats all you, nothing wrong with it. imo
And indent the line below the statement, don't do the entire statement in a single line
yeah trynna dogde the plugin one, cuz ive already got a fully functional bot with discord.ks
discord.js
everyone has their own style to code. i just gripe if its spaghetti or generally not clean code
just wondering if i was able to connect it
i hate it when you cant decipher whats going on in the code, because lack of comments and proper indents, etc
You always are able to connect them
oh dont get me started with improper naming as well (not talking about obfuscation)
Thing is you'd probably need to work with sockets or a third party message protocol
Redis/RabbitMQ
yes 🙂
oh
would i still be able to like sending messages over minecraft and discord
like as the console
Uhm, what are you trying to accomplish? srry
like a verification system
like you send in minecraft /verify
and it responds and gives you a coder
code
that you send to the bot over discord
might could use DiscordSRV and use it's api
But, if you don't want to, you can also use Messaging between the discord.js and the server
How can I get playerConnection? The method below doesn't work for me in 1.17
PlayerConnection connection = ((CraftPlayer) player).getHandle().playerConnection;
what's the issue
You need to have the CraftBukkit package
It’s unmapped now
wdym?
so have you guys decided on which one's better?
Spigot removed all its mappings
Just went out for groceries and found out there's a hurricane apparently
Do whatever you think is the best
We already gave you our opinions ;p
So, we can't NMS anymore? :(
scroll up
Read from here, I think: #help-development message
Well ofcourse we can
You just need to find the unmapped name
^^
I added import org.bukkit.craftbukkit.*; but it doesn't work
playerConnection is named b in 1.17
Oh ok thanks
why though
Spigot mappings are gone
sad
got it thanks
no
unless mojang changes their licence on them, it will never be 😭
(unless you just remap your things on compile time anyway)
paper is adding the mojang mappings right now..
literally watching them do it
earlier
Yeah spigot already said this is part one in a switch to Mojang mappings
but not to the paper server at runtime
how do I kill an entity
not just remove it
like vanilla kill
with the death animation and sheban
Try setHealth to 0.0
I'm not sure of know what you mean by saying it's mapped
Well that method is depricated
got it
thats okay apparently EntityPlayer doesnt exist in the nms... at least the ide cant resolve it, but it shows all the Entity<entityName> 's
I can't find any way to do it
Anyone know what happened to the net.minecraft.server.EntityHuman class?
setHealth is for living entity
well setHealth isn't deprecated
setMaxHealth is
I always get confused to don't worry 😂
so how do I kill an entity
Entity#remove()
If it’s not a living entity you just use remove
yeah
Prolly play effect is what you're looking for?
you'd have to cast the entity to LivingEntity first and I'm pretty sure if you set their health to 0 it should kill em
Assuming it is a living entity
or just fucking give them Integer.MAX_VALUE's worth of damage
trying to github but its just this why?
If you want it to die do as the kill command and deal 3.4×10^38 damage
should fuck em up
its not let me select item files
no Integer.MAX_VALUE
That too xd
You need to add first
doesn't newer versions just straight up kills the player instead of huge number?
I heard that's how it works
or spigot changed that
Right click the directory > Git > Add
Kill command still deals damage ;/
I have no idea why they decided to do that
its not there
there's only Create Gist
To fix MC-44371, /kill now directly kills non-living targets, rather than dealing 3.4×1038 void damage.
hmm
Anyone know how to send a worldborder packet in 1.17? PacketPlayOutWorldBorder no longer exists :/
Have you already init the git repo?
You’ll have to find the new packet name
idk how do that
void damage
fine
event.setDamage(Double.MAX_VALUE);
VCS tab in the top
Won’t that absolutely destroy armor
also did PacketPlayOutOpenWindow change name or is that just not working right now?
1.17 PacketPlayOutTitle?
hey guys, any ideas on how to read the item: WOOD_SWORD and the rest of the elements of a yaml file?
chest:
- item: WOOD_SWORD
amount: 1
chance: 50
- item: IRON_BOOTS
amount: 1
chance: 2
It’s been split into multiple
you can also just do player.sendTitle for 1.17 (belive that got added in like 1.12 or smthn)
i need to use NBT
Json
Ah man I just realized I need protocollib to update before I can update my plugin
I was just about to ask that
That's a list under the chest key, just get that
I made a thread, hopefully some smart dude can help https://www.spigotmc.org/threads/send-worldborder-with-packets.510251/ 👀
I haven’t looked but it may be named ClientboundSomething
thats if you use the mojang mappings, which ive not been able to find out how to do yet lol
Ah
I’m going to wait for them to be fully supported
Since you can’t remap reflection strings
that more has to do with SpecialSource rather than spigot i think
is there some way to roughly see what 1.16 nms classes map to in mojang remapped 1.17 nms classes?
ah that looks good, thanks
Yeah, I'm using this List<?> list = file.getList("chest"); but i wanna access the values with the path notation to avoid doing extra conversions, something like file.getString("chest.0.item");, file.getString("chest.0.amount");, etc.
Yes, but it’s still enough to make me wait
Or is there any way to get a ConfigurationSection of one element of the list?
The YAML parser show the tree correctly, what can I do to access the value or is impossible?
https://jsonformatter.org/yaml-parser/a8e262
@radiant aspen lmfao i just replied
hahaha, I found ClientboundInitializeBorderPacket which just accepts a worldborder object, and automatically sends all the other packets which was say easier
thanks anways 
do string nbt tags have a size limit? (trying to save 116 len base64 string in an itemstack)
116 length is not too large
API you can set the health scale
declaration: package: org.bukkit.entity, interface: Player
done, works
How can I check action in 1.17? the below method doesn't work 😦
if (packet.getClass().getSimpleName().equalsIgnoreCase("PacketPlayInUseEntity")) {
String action = getValue(packet, "action").toString();
if (action.equals("INTERACT") || action.equals("ATTACK")) {
please read the post on the website about NMS changes
the spigot server no longer is compiled using spigot mappings
there is no class called PacketPlayInUseEntity at runtime anymore
Can you send me a link to the post?
or that
The if statement works but "action", "INTERACT" and "ATTACK" doesn't. we are trying to figure what are the new values
Hey there, does anyone know what the boolean var10 added in 1.17 in PacketPlayOutPosition's constructor does? I cant find the class on mini's mappings :/
flag whether or not the vehicle should be dismounted
Check, thanks!
Where is the documentation for this btw? i.e where'd you get the info from yourself 😅
I worked on the packet in one of my PRs xD
Hey! So i am having text received from an api displayed to chat however after doing:
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
String content = in.readLine();
and when i send it to console it works:
你好
but when i send it to chat it looks almost corrupted
I assume that something about the encoding must be wrong - any pointers would be nice
Ah. explains it :"D
Where did that get its docs from though
because afaik mojang doesnt have javadoc or something anywhere
well wherever spigot mappings came from
looking at the source code 😂
and figuring out what the value represents
e.g:
@eternal night You wouldn't also happen to know what happened to PacketPlayOutHeldItemSlot would you 🤔
Why don't u just use the api
^^
?
simply /tellraw
{"translate":"offset.-100",with:[{"text":"MP: <column>"}]}
I think it is called PacketPlayOutSetSlot
something like this i need to use
but don't quote me on that
Yeah just noticed, made a typo 😂
at least in the obfs version
I had Sot instead of Slot
How can chinese text be sent to a player - I am having issues with the client corrupting the text in chat
gone?
what is title in ChatMessageType?
SYSTEM or CHAT?
no. That must be
<dependency>
<groupId>com.github.MilkBowl</groupId>
<artifactId>VaultAPI</artifactId>
<version>1.7</version>
<scope>provided</scope>
</dependency>```I did this and its not found did i do something wrong
check maven imports
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>```
please read #announcements to get your info on how to use NMS in 1.17
I can't find it, is it not just this:
EntityPlayer entityPlayer = (EntityPlayer) ((CraftPlayer) player).getHandle();
if are you using maven from 1.17 release page, then import spigot-1.17.jar how <scope>system, using <systemPath>
huh
please don't import things using system scope
my plugin is 1.16
don't cast CraftPlayer to EntityPlayer
hey guys, I'm a massive beta who has never used maven because the last time I tried to convert my project to it, it messed a lot of stuff up.
Currently getting
java.lang.NoClassDefFoundError: com/mysql/cj/jdbc/MysqlDataSource
in my initial startup in 1.17. Is there any way to fix this without converting to maven and using those dependencies? I have the mysql connector in my build path
You can save Objects too, they get serialized / deserialized automatically
but what is it now?
just wanting to store EntityPlayer inside a list
oh wait
i've found the import statement
Anyone can to help?
https://www.spigotmc.org/threads/pathfinders-in-1-17.510262/
Cannot resolve <spigot.version>1.17-R0.1-SNAPSHOT</spigot.version>
wat
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>${spigot.version}</version>
<scope>provided</scope>
</dependency>
did you run build tools locally ?
No I use maven
yes but you are depending on spigot
Doesn't matter, you have to.
not spigot-api
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
which is not distributed through the maven repository
because it contains the server source
It's not in the repo yet, as it isn't stable @maiden briar.
You can only have it locally rn
Oh
Where then?
it wasn't in the repo like an hour ago?
Question: How do I use the special sauce plugin in gradle?
dude, you are not depending on the spigot-api
you are depending on spigot
which is the server artifact
I want to access nms
What values do I need to put instead of "action", "ATTACK" and "INTERACT"? I tried many things but it didn't work
private void readPacket(Player player, PacketPlayInUseEntity packet) throws NoSuchFieldException, IllegalAccessException
{
if (packet.getClass().getSimpleName().equalsIgnoreCase("PacketPlayInUseEntity")) {
String action = getValue(packet, "action").toString();
if (action.equals("ATTACK") || action.equals("INTERACT"))
{
// Some code
then you will always need to run build tools
Oh
there was never another way
It worked before 1.17
How do you mean? It just gets it from the repo
no
And NMS got quite a few changes, see https://www.spigotmc.org/threads/spigot-bungeecord-1-17.510208/#post-4184317
I know...
build tools installs the spigot artifact into your local maven repo
hence you can use it
<dependency>
<groupId>com.github.MilkBowl</groupId>
<artifactId>VaultAPI</artifactId>
<version>1.7</version>
<scope>provided</scope>
</dependency>```Is this how I import vault? Im getting an error saying its not found
Ah now I understand
good 👍
Make sure you have their repo in your <repositories> section
how can i register a new item in spigot server. I registered that item in Client (MCP)
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>```I jave this in my repos This is what the docs say
Putting an ItemStack into an Inventory is InventoryAction.NOTHING? 🤔
https://streamable.com/bncpho
I am having the same issue
Anyone?
May I ask how to use the specialsauce jar? https://github.com/md-5/SpecialSource
might wanna specify that when asking xD
Is that legal to have a nms version on a maven repo?
how would i add this
well you have haven't you
not a lawyer, but I'd say stay away from publishing NMS through maven to any repository
i see nothing directly wrong with it
?paste
How could I go about making someone auto equip diamond armor if they pick it up and have, for example, iron armor?
then check if the item is diamond armor, remove item from inv and set player helmet
to get a players helmet, to check if its a iron helmet
get players inventory, if player.gethelmet (don't know exact) == Material.()
its java ItemStack helmet; if ((helmet = player.getInventory().getHelmet()) != null && helmet.getType() == Material.IRON_HELMET) or something like
^
AFTER BuildTools finished Cannot resolve org.spigotmc:spigot:1.17-R0.1-SNAPSHOT
Alright, thanks
This applies if I add <classifier>remapped-mojang</classifier>
For that you definitely need to run BuildTools.
I ran it
Yeah I noticed that it didn't install it to my local repo either
Just install it manually using the command line
?
Yes now I see things like net.minecraft.network, net.minecraft.server, etc
Yeah they're using the official package names now in preperation for mojang mappings. (Which already can be enabled an argument)
running buildtools tu tu tu
Yes
This is nicer
But this does also mean that it will break on previous and next NMS versions?
Or will the packets be the same always?
They will change if they have to. Just like always
Yes, but not with version numbers?
Yeah
Nice never version numbers!
aah nice
1.16.5?
You need to use --rev 1.17
you didn't rule out the fact that they may have wanted 1.16.5
You don;t set teh meta back on the item
does that matter? im not using 1.17 things in my plugin or my server
If you wanna use 1.17 on your server, yes
oh doesnt matter then
otherwise, you'd just be using minecraft 1.16.5 :p
I need some help remapping my NMS code to the obfuscated mappings.
I have just copy & pasted the second snippet from https://www.spigotmc.org/threads/spigot-bungeecord-1-17.510208/#post-4184317, however I cannot see anything happening. I have little experience with maven and if it changes anything, this is inside a subproject. Anything I might have to change?
Not many people are familiar with the new nms atm - you may have to do some digging thru src yourself
what do you mean exactly?
When I use the remapped-mojang jar and the corresponding spigot.jar I can get it to run fine and it does indeed work. I just want to remap it now so that people don't require the mojang mapped server jar
i have a chinese string that when i print to console is correct however when i send it as a chatmessage it corrupts - does anyone have a list of all supported characters for the client? or am i just encoding it wrong
could i use buildtools 1.17 while my spigot dependency is 1.16.4?
well i mean this
and this
java -jar BuildTools.jar --rev latest
it doesn't matter which version of the api your plugin depends on, as long as the classes and methods are present it will run
yes
ki
and depending on what you did - it may work on older versions
<configuration>
<srgIn>org.spigotmc:minecraft-server:1.17-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
<reverse>true</reverse>
<remappedDependencies>org.spigotmc:spigot:1.17-R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>
<remappedArtifactAttached>true</remappedArtifactAttached>
<remappedClassifierName>remapped-obf</remappedClassifierName>
</configuration>
How can I specify the output file here?
you mean the name?
well that would essentially be the same, so yeah
I have this inside <properties></properties>
<jar.finalName>${project.name}</jar.finalName>
Is there any big depreciations with new 1.17
Not that I'm aware of. However there are major NMS changes
I’ve never used nms
sorry but what is the command the show the text in the middle of player screen
player#sendTitle
i mean like ingame commandblock
Wrong channel
(the command is /title)
ty
aah finally worked to import buildtools
Sanity check, org.spigotmc:spigot:1.17-R0.1-SNAPSHOT requires one to run BuildTools, right?
yes
I am trying to open an inventory, and I get this error.
I was using same code in 1.16 and that was fine.
My code:
Inventory inv = Bukkit.createInventory(new MyHolder(), 9, "Title");
inv.setItem(0, new ItemStack(Material.TNT)); // here is the line 33 of "AdminInventory"
p.openInventory(inv);
Expect to update frequently these next few days lol
hey guys,
I'm trying to use and refer a plugins API (luckperms) in my own plugin. But when I call LuckPerms. I see the LuckPerms in the list and click on it but once I put . there is no display of the luckperms' methods etc `that should appear !
How do I fix that ?
how do I make it so that players take no velocity if the damage was under a certain threshold?
Yes that's a good idea, but thanks for info !
non-janky way
Is CustomItemTagContainer only 1.13+?
yes
any reason that buildtools fails for me if it isn't run with root?
Damnit, is they any other way to add custom NBT tags, then? I'm using 1.8.
please help, I know psychology and can teach stuff in exchange if u want lol (tryna appeal to self interest)
just normally edit NBT
EconomyResponse response = economy.withdrawPlayer(p, 10000.0);```How do i make this not take a loan
simply check the balance first?
also you can just simply put 10000 and leave the .0
Item meta?
nope
1.8 has to do it through nms
you get the nms instance of itemstack
then insert the nbt from there
Oh
https://www.spigotmc.org/threads/tutorial-the-complete-guide-to-itemstack-nbttags-attributes.131458/
Any idea what the 1.8.8 nms name is?
Nope
I mean for this net.minecraft.server.v1_12_R1
v1_8_8_R1 and v1_8_R1 don't work
Cause: error: invalid source release: 16
why am i getting this from gradle? I have everything set to java 16, java home is 16, intellij is pointed to java 16, source and target compatibility is 16 so im not sure why i get this
@onyx shale
ok fixed that
