#help-development

1 messages · Page 1496 of 1

wispy fossil
#

nah it was windows 7

#

i think

sullen geyser
#

windows XP

#

ahhh

#

the most beautiful of all the windows versions

wraith rapids
#

i still have a few win95 machines

#

they crash every 15 minutes

quaint mantle
#

Ahhh needed to restart it

opal juniper
#

yeah but you also use ripcord

#

and im sorry but it looks horrible

wraith rapids
#

it looks simple

#

and simple is what I want

opal juniper
#

it looks shit lmao

wraith rapids
#

no, it looks simple

#

would it look better if it had rounded corners, animations and a flashing background?

opal juniper
#

YES

#

i like flashing lights

wraith rapids
#

would you prefer it if it had widgets that spun around and popped up at random and gizmos with fancy textures

opal juniper
#

Honestly - yes. i like it when it seems like they have actually put effort into making something look nice

wraith rapids
#

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

opal juniper
#

performance is never gonna be the best cause it is just an electron window - and yes

wraith rapids
#

ripcord is a rewrite from scratch in like c or something

#

no electron to be seen

opal juniper
#

eww wtf

wraith rapids
#

which is the reason I use it

opal juniper
#

fair enough

wraith rapids
#

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

opal juniper
#

oh no

#

nonononononono

wraith rapids
#

i preferred the time back when effort was put into making things good, rather than making them look nice

opal juniper
#

i mean - its ur opinion. but i think that companies still do both

wraith rapids
#

sometimes, yes

jovial kiln
#

thats why everything takes just as long as 10 years ago to load with such faster hardware, companies really care about performance

wraith rapids
#

though most "simple" companies like discord aren't actually simple at all

opal juniper
#

i am in the paper vc rn listening to them update and it is hilarious. they are kinda roasting md_5

wraith rapids
#

they always are

opal juniper
#

yea

wraith rapids
#

they don't like md69

#

and md69 doesn't like them

opal juniper
#

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

eternal night
#

mojang messed something up in the world loading no ? Like you are stuck at 0% for a while

wraith rapids
#

of course they did 🙄

opal juniper
#

maybe... idk if i have necessarily had that error

#

(problem not error)

wispy fossil
opal juniper
#

hahahahaa

#

i have been in here like ~ 2hrs

#

but yes

wraith rapids
#

perhaps I should drop in as well

wispy fossil
#

its just old german men being insanely good at computers
i feel like im invading their homes

eternal night
#

I mean, the actual upgrading process is going to be fun hopefully

wraith rapids
#

which alt shall I use today

jovial kiln
#

i mean thats just what development isl ike

opal juniper
#

they are trying to fix mappings

#

atm

jovial kiln
#

scratches head for 5 hours why in the name of god arey ou doing this
oh

eternal night
#

them revamping paperclip is making me sleepy

opal juniper
wispy fossil
#

oddly therapeutic

opal juniper
#

true

maiden briar
#

NMS is now really f*cked up, success Spigot devs!!!

#

Somebody found logic?

wispy fossil
#

NMS, logic?
couldnt be me

opal juniper
eternal night
#

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

opal juniper
#

apparently tho they add classes to nms so mini is just stuck trying to get it to work

eternal night
#

but brought forward by the community

wraith rapids
#

of course it was

#

the community was tired of the shitmappings

eternal night
#

for whatever reason. I guess so that people coding multi platform trash

maiden briar
#

Understanding this is almost impossible

opal juniper
#

not really

eternal night
#

bruh, mojang mappings means you get to reobf your own plugin

#

lmao

#

for no apparent advantage

wraith rapids
#

muh mappings

maiden briar
#

Btw how do the devs of this even know what they are doing

eternal night
#

what ? it isn't that hard lol

opal juniper
#

DenWav is just like renaming variables

maiden briar
#

Ah

opal juniper
#

trying to fix all the linting

maiden briar
#

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

eternal night
#

concerning that there are official mappings from mojang that should not be too hard

maiden briar
#

Hm tell me an example

eternal night
#

what ?

maiden briar
#

From the mappings

opal juniper
#

who reckons md_5 has an alt and he is just sat in the vc crying

eternal night
#

literally every line of the mappings is an example

opal juniper
#

as he gets ripped apart

eternal night
#

idk what you want from me 😂

maiden briar
#

Hm how to decode this in readable java code

#

Like class zz has a name

eternal night
#

yes

maiden briar
#

I think we'll have to wait until the spigot is out?

eternal night
#

a) spigot 1.17 is out and b) the spigot mappings are also out

jovial kiln
#

the spigot is already out

maiden briar
#

rly

#

what are those mappings?

eternal night
#

paper does not start their upgrade process until spigot is done

maiden briar
#

Yes

maiden briar
#

Thx

jovial kiln
#

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?

eternal night
#

it is what spigot assigned them

jovial kiln
#

Even just switching to spigot from vanilla boosts server performance

eternal night
#

those are not mojang mappings

maiden briar
#

Ok

#

So there is actually some logic

#

Thx

dire marsh
opal juniper
#

i feel like it is possible paper could be out today

wispy fossil
#

they are awake at 5 am

#

it will be out today for sure lmao

fleet wigeon
wispy fossil
#

then 0 updates til tomorrow, they need sleep

opal juniper
#

i mean, most are german so it is midday
only denwav is US afaik

upper frigate
#

For me it is like 12:35 xD

opal juniper
#

what is actually new in 1.17 api wise

#

or is there like nothing yet

fleet wigeon
#

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

ivory sleet
#

Different classes

fleet wigeon
#

Yup

fleet wigeon
river delta
#

Has anyone had issues with there plugins and reading yml files since updating to java 16/spigot 1.17?

ivory sleet
#

Yeah which dependency are you using kyle

keen kelp
#

I would suggest waiting a while before starting 1.17 development?

ivory sleet
#

Pascal haven’t tried but is there an issue?

keen kelp
#

there can be a lot of issues XD

fleet wigeon
keen kelp
#

maybe do like a test run in separate projects first

fleet wigeon
#

Code became really unreadable if you're working on a plugin which has multiversion compatibility

ivory sleet
keen kelp
#

understand what 1.17 changed or even wait for some guides to come out first

fleet wigeon
keen kelp
#

then add support to your plugin

ivory sleet
#

There are apparently 3 jars

keen kelp
#

yeah

fleet wigeon
#

But the thing is

keen kelp
#

it's much different

ivory sleet
#

So might be the case you got the obs one

fleet wigeon
#

We should be compatible with both 1.17 and previous version

#

Not only 1.17

river delta
#

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.

keen kelp
#

ArrayList.add adds thing to the tail right

ivory sleet
#

That’s why we have an api kylepoops

sullen marlin
#

@river delta full error needed

#

snakeyaml was upgraded so its possible its an error on their end

ivory sleet
#

Oooo

sullen marlin
#

a copy of the config would also be helpful

ivory sleet
#

Supporting comments then?

sullen marlin
#

yeah was upgraded in preparation for comments

mellow gulch
#

thankyou for the Library Loader, I haven't tried it yet but it sounds really awesome.

ivory sleet
#

🥳

fleet wigeon
#

Well there's something currently not being supported by api

river delta
opal juniper
#

the paper people are moaning about maven central sending out some nasty emails cause of the library loading though

keen kelp
#

if I for through a set, does it get the objects by the orders they were added in or

#

like for loop

mellow gulch
opal juniper
#

yeah

sullen marlin
#

hmm yeah does look like an issue with comment support

ivory sleet
#

lau oh yeah I think it does but there’s no guarantee that order will be kept forever

keen kelp
#

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

eternal night
ivory sleet
#

We’re taking about a normal HashSet right lau?

keen kelp
#

how do I sort a custom type(class)

#

I only know how to do it in c++

ivory sleet
#

You probably wanna do it with a Comparable<T>

opal juniper
eternal night
#

I mean, very much depends. Plenty of minigame server create their server instances on the fly

opal juniper
#

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

eternal night
#

tbh at some point spigot might just have to provide a central mirror

fleet wigeon
opal juniper
#

yeah - i mean if it gets big enough sure

#

(as in the amount of usage)

eternal night
#

there will not be any generic packet support in spigot

ivory sleet
fleet wigeon
#

Packet

fleet wigeon
#

So do i

keen kelp
#

can I sort a Hashmap with a Array

fleet wigeon
#

So I'm asking

eternal night
#

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

fleet wigeon
#

It will be good if spigot can provide some api like protocol lib

opal juniper
#

but it already exists lmao

eternal night
#

the concept of protocollib is not stable enough to find its way into spigot

opal juniper
#

^^

#

also - is there complete protocollib documentation

#

the closest thing afaik is wiki.vg but that is just generalised

keen kelp
#

what's the best way to sort a Hashmap?

#

I want to sort a Hashmap by its key

#

the key is a string

eternal night
#

hashmaps do not know the concepts of order

ivory sleet
#

By key or value

opal juniper
#

^^

keen kelp
#

yeah I would need to convert it into an array

#

I know that

#

or arraylist

eternal night
#

but then, it is just sorting a list

keen kelp
#

oh youre right

#

so it would be a list of Map.Entry

#

that sounds inefficient as f-

ivory sleet
#

Lau, do you wanna sort the map by key or value ?

keen kelp
#

key

#

it's a Hashmap<String, customClass>

ivory sleet
#

Then you could use a tree map

eternal night
#

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

keen kelp
#

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

ivory sleet
#

Assume you provide a custom comparator

keen kelp
#

Or should I convert the string first

eternal night
#

String is Comperable<String>

keen kelp
#

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

eternal night
#

you have an array that you want the order to be ? what

keen kelp
#

like the array would be the order of the keys of the entry after the sort

fleet wigeon
#

Or what will happen if someone pr a patch to expose the command map

keen kelp
#

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

fleet wigeon
#

Nowadays we need to get command map by reflection

ivory sleet
#

Has always been that way?

#

Not speaking about paper

fleet wigeon
#

Wut

eternal night
#

The concept of an API is to provide API not just straight up exposing internals.

fleet wigeon
#

We need to get command map by reflection

#

Yup

#

Paper expose it and we can get it very easily

eternal night
#

yes, so if you want to achive what you currently do by reflection with the command map, write an API for it

keen kelp
#

cause a comparator can be made from an array

eternal night
#

tho I guess CommandMap is already part of the API

fleet wigeon
#

Nope

eternal night
#

it is

ivory sleet
#

It has an interface

eternal night
#

CommandMap lives in org.bukkit.command

ivory sleet
#

But still isn’t exposed

fleet wigeon
#

It's exposed in paper api but not in Spigot

eternal night
#

yea

#

idk if there were discussions about this on the issue tracker

#

but I'd guess there is

fleet wigeon
#

To get the server current command map we need to use reflection

ivory sleet
#

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.

fleet wigeon
#

So the brigadier?

ivory sleet
#

Broken api > no api (:

river delta
eternal night
keen kelp
#

Conclure

sullen marlin
#

ive pushed an update to use an older versions of snakeyaml

fleet wigeon
keen kelp
#

can I like make a custom comparator for treemap or smth?

ivory sleet
keen kelp
#

how do thing

#

how do I make a comparator

fleet wigeon
ivory sleet
#

¯_(ツ)_/¯

fleet wigeon
#

We cannot do something we can do with brigadier with bukkit command api

eternal night
#

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

ivory sleet
#

Oh Kyle you mean as a transitive dependency?

sullen marlin
#

following the brigadier example, acceptable API: adding custom tab completes, unacceptable API: adding brigadier

fleet wigeon
#

Why tho

sullen marlin
#

because brigadier isnt actually good

fleet wigeon
#

Brigadier can show up more information when player is typing command

sullen marlin
#

yes and an acceptable API would allow any command framework to show that information

fleet wigeon
#

Like an api which allow us to set the range of a number argument or something like that?

keen kelp
#

can someone link me to a guide or something about custom treemap comparators? I've looked for a bit and found noting

sullen marlin
#

do the javadocs not help?

keen kelp
#

the java javadocs?

sullen marlin
#

ye

keen kelp
#

that's a thing?

eternal night
#

👀

keen kelp
#

👁️

sullen marlin
#

yes

keen kelp
#

bruh

fleet wigeon
#

Oh

quaint mantle
#

I thought a minecraft comparator

keen kelp
#

lol

eternal night
#

I think you will have to use reflection for this. Spigot does not have a profile API

keen kelp
#

so do I implement it or

eternal night
#

by accessing server internals regarding chunk block pallets and tile entities

eternal night
#

I know

#

that is why I specified spigot

fleet wigeon
#

Where can i open a issue
I don't know how to use spigot repo system lol

eternal night
iron condor
#

how can I disable spawn setting for player ?(make beds and respawn anchors useless).

austere cove
#

listen to PlayerRespawnEvent and change the spawn location

iron condor
fleet wigeon
#

Hmmm sorry fot selecting the wrong project

iron condor
#

just the default minecraft respawning

eternal oxide
#

World#getSpawn

iron condor
eternal oxide
#

yes

iron condor
#

minecraft has a spawn radius

#

where players will respawn randomly inside it

eternal oxide
#

then adjust that location by +-16 on x and z

quaint mantle
#

What is PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER for 1.17?

lunar schooner
#

What are you guys seeing for Spigot 1.17 build times? It's been going here for +- 10 minutes 😅

eternal oxide
#

one sec and I'll start a build

iron condor
#

can't I just set this to null? setBedSpawnLocation

#

before spawninig?

eternal night
#

1:27.38 total for a cached build of spigot 1.17

#

with already patched work directory

lunar schooner
#

Cached build is fast too for me yeah

#

but a fresh one took a while

#

09:22 it seems

deep escarp
#

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?

keen kelp
#

how do I compare entities

plucky comet
#
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.
plucky comet
sullen marlin
#

@deep escarp direct access, not reflection right?

eternal oxide
#

build finished

plucky comet
keen kelp
#

I want to check if the entity that got hit is a wither and instant-kill it if it is

versed flicker
#

spigot 1.17 is out if u didnt know

keen kelp
#

so I would need EntityDamageByEntityEvent

eternal oxide
keen kelp
#

getEntity

#

but how do I know if it's a wither that I hit

queen fossil
#

hello everyone

ornate heart
eternal night
#

I mean the only real addition is the reobfs part of the build process

lean gull
#

how do i assign a variable to a uuid

deep escarp
keen kelp
#

Imma go consume food now if you guys got solution to my problem plz @ me so I can check back later

ornate heart
covert bluff
#
  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

keen kelp
ornate heart
#

Oh sorry. Yea use The event you were talking about before lol

keen kelp
#

no details given doesn't mean no detail :P

lean gull
keen kelp
#

thx I forgot I had to gettype lol

eternal night
#

I think that should be valid yaml, tho why not just

leggins:
  material: DIAMOND_LEGGINS
  enchants:
    PROTECTION_ENVIRONMENTAL: 2
quaint mantle
#

how to get playerConnection on 1.17?

dusty herald
#

you could do UUID variable = your uuid

lean gull
#

no

eternal oxide
covert bluff
eternal night
lean gull
#

1 sec i'm tryna explain it

covert bluff
#

that seems like a much more cleaner way, but im not sure how to get PROTECTION_ENVIRONMENTAL instead of its value

lean gull
#

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

eternal night
covert bluff
#

also it's because i'm making an array of enchants, it may have more than 1 enchant

dusty herald
#

Player#getUniqueId()

covert bluff
#

if i set that to true

#

will i get key instead of value?

lean gull
dusty herald
#

it gets player's unique Id

lean gull
#

oh i know how to do that

eternal night
#

no, true just means it fetches all keys in the configuration section

covert bluff
#

oh

eternal oxide
#

Basically a player prefix that all permission plugins/chat plugin already do.

dusty herald
#

I'm kind of confused on what you want to do

lean gull
#

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

covert bluff
#
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

plucky comet
#

How do i remove enchantments and potion names from lore

eternal oxide
tawdry cedar
lean gull
#

what's a hashmap

covert bluff
#

i think you should learn java first

dusty herald
covert bluff
#

or

#

read hashmap docs

eternal oxide
tawdry cedar
lean gull
#

i'm trying to learn java by coding

covert bluff
eternal oxide
vale cradle
covert bluff
#

that returns a String[] right

#

or does it return a List<String>

tawdry cedar
#

However I’m yet again confused why you want to get what colour appears when a player types in chat

lean gull
eternal oxide
#

or you use a map, <Enchantment, Level> and store it under an enchantment key

lean gull
#

or is it like a list of values that those values have two values

tawdry cedar
lean gull
#

i have no clue what to say, i said all i want to do

austere cove
#

how do I serialize a BigDecimal

tawdry cedar
#

Like when do you want it to check for their chat color

covert bluff
lean gull
eternal oxide
#

getKeys()

covert bluff
#

?

eternal oxide
#

would return all keys in the map

tawdry cedar
lean gull
#

nono

covert bluff
#

what do i do with it

lean gull
#

i want to check what their uuid's chat color is and then set the message to that color

eternal oxide
#

if you want to check a specific enchant you get("PROTECTION_ENVIRONMENTAL") if its null then its nto there

covert bluff
#

ohhh

#

all right

tawdry cedar
covert bluff
#

do i set deep or no

tawdry cedar
#

Unless you gave them one

lean gull
#

yes but a variable can have values

#

or an object, idk how these things work

dusty herald
#

UUIDs cannot have colors at all what are you trying to do

#

unless you turn them into a string but like

#

why

tawdry cedar
#

You cannot get something you haven’t set?

lean gull
#

a variable list set to uuids with values of colors

#

i don't want to set their uuids to anything

vale cradle
#

That's a map

tawdry cedar
#

I know but how does it determine what color the UUID has linked to it

lapis relic
#

Q?

lean gull
#

i have no clue, that's why i'm asking how to do it

covert bluff
#

do HashMap<UUID,ChatColor> whateverYouWantIdk = new HashMap<>(); :/

#

not list

tawdry cedar
#

No that’s a question for you

lapis relic
#

Map<UUID, ChatColor>

#

Liskov Substitution Principle

tawdry cedar
#

Cause a UUID doesn’t come with a chatcolor

lapis relic
#

😃

covert bluff
#

what are liskov

lapis relic
#

google it

#

SOLID principles

vale cradle
covert bluff
#

i dont have google srry

lean gull
lean gull
vale cradle
lean gull
#

for the third time i do not want to change their uuid

tawdry cedar
#

You literally just repeated yourself

vale cradle
#

I'm not asking you to do so

tawdry cedar
#

But in different words

vale cradle
#

You can't change someone's uuid

lean gull
#

i want a list variable with uuids in it, each uuid in this list variable has another value of the chat color

quaint mantle
#

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

lean gull
#

but only in the variable list

tawdry cedar
#

What I’m trying to say is that how is the plugin meant to know what color is associated with the uuid

lean gull
#

not actually change their uuid

eternal oxide
tawdry cedar
#

Nobody said anything about changing UUIDs

covert bluff
#

putting them into a hashmap with the value as the chatcolor doesn't change their uuid

#

it only stores it

vale cradle
lean gull
#

in a variable

austere cove
#

BigInteger and BigDecimal are different things

lean gull
#

list i mean

#

or whatever's needed to make this

vale cradle
#

You can't do that on a list

#

You need a map

#

As we are telling you

covert bluff
#

what he said

austere cove
#

BigDecimal has scale and rounding mode/precision

vale cradle
#

A long ago

covert bluff
#

map<uuid,chatcolor> whatyouwantidk = new hashmap<>();

lunar schooner
#

Would anyone with the mappings available be able to find the obfuscated field name for levelName in DedicatedServerProperties ? Thanks :"D

covert bluff
#

then whatyouwantidk.put(uuid,chatcolor)

#

then you can fetch the value by whatyouwantidk.get(uuid)

#

this returns chatcolor (the value) btw not uuid

eternal oxide
vale cradle
#

Look an article talking about Data Structures or maps in java, there must be several of them on the internet

austere cove
#

no cos a BigInteger has infinite precision

#

besides not every BigDecimal fits in a BigInteger

vale cradle
#

Probably you can serialize every component of the big decimal

#

The base and the exponent

covert dagger
#

is it possible to create a discord bot using (javascript, discord.js) and its online whenver the server is online

vale cradle
#

then create it again when deserializing with the given base and exponent

vale cradle
#

But you won't do that on js lol

keen kelp
#

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
            }
        }
lean gull
#

can you have a variable grid?

vale cradle
#

I prefer the first one

lean gull
#

for the uuids and colors

hybrid spoke
vale cradle
#

I know

covert dagger
keen kelp
#

GodCipher

#

which do you prefer

hybrid spoke
#

🤔

#

python

vale cradle
#

I mean, you can create a plugin which the JDA (or discord4j) embeded

hybrid spoke
#

oh

vale cradle
#

And start the bot whenever the server is online

#

But ye

hybrid spoke
keen kelp
#

wat

vale cradle
#

you can do it on Js and create a sort of protocol

hybrid spoke
plucky comet
#
if (hideFlags){
            meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES);

        }```Why isnt thisa removing the potion type
hybrid spoke
#

oh it was meant to be a plugin? my bad, then you wont yeah

vale cradle
#

that's what you're looking for

lean gull
#

ok

keen kelp
#

is there anything different about those two?

young knoll
plucky comet
hybrid spoke
young knoll
#

I think their is a flag for hiding potion effects

vale cradle
hybrid spoke
#

true

#

would prefer the implicit but depends on the use case

vale cradle
#

First one is more clean:

public void onExecute(...) {
  if (!(sender instanceof Player))
    return false;
  // Do code here
}
sullen marlin
#

@deep escarp found a fix, updated thread. Basically need to add the remappedDependencies part

dusty herald
#

use brackets

hybrid spoke
dusty herald
#

that's not a one liner tho

vale cradle
#

Depends of the project's style

vale cradle
hybrid spoke
#

if (!(sender instanceof Player))
return false; 🤔

vale cradle
#

I just returned

dusty herald
#

not the entire method

vale cradle
#

The entire method has brackets lol

hybrid spoke
keen kelp
#

why did my single message spark a whole ass debate lol

vapid thorn
#

lol

hybrid spoke
vale cradle
#

And the project's code style

#

There are code styles that explicitly tell you to do it in a specific way

hybrid spoke
dusty herald
#

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 😠

vapid thorn
#

i mean if you format correctly, space properly, and add your comments properly it shouldnt be any issues

vale cradle
#

I always add a space between one liners lol

vale cradle
#

So, people realize there are no brackets

vapid thorn
#

but if you prefer brackets instead of 1 liners thats all you, nothing wrong with it. imo

vale cradle
#

And indent the line below the statement, don't do the entire statement in a single line

covert dagger
#

discord.js

hybrid spoke
#

everyone has their own style to code. i just gripe if its spaghetti or generally not clean code

covert dagger
#

just wondering if i was able to connect it

vapid thorn
#

i hate it when you cant decipher whats going on in the code, because lack of comments and proper indents, etc

vale cradle
vapid thorn
#

oh dont get me started with improper naming as well (not talking about obfuscation)

vale cradle
#

Thing is you'd probably need to work with sockets or a third party message protocol

#

Redis/RabbitMQ

dusty herald
covert dagger
#

oh

#

would i still be able to like sending messages over minecraft and discord

#

like as the console

vale cradle
#

Uhm, what are you trying to accomplish? srry

covert dagger
#

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

vale cradle
#

I'd recommend you to create a proxy plugin for it

#

Like a bungee plugin

dusty herald
#

might could use DiscordSRV and use it's api

vale cradle
#

But, if you don't want to, you can also use Messaging between the discord.js and the server

dusty herald
#

but the api

#

it saves so much time 😭

vague cloud
#

How can I get playerConnection? The method below doesn't work for me in 1.17
PlayerConnection connection = ((CraftPlayer) player).getHandle().playerConnection;

dusty herald
#

what's the issue

vale cradle
young knoll
#

It’s unmapped now

vale cradle
#

wdym?

keen kelp
#

so have you guys decided on which one's better?

young knoll
#

Spigot removed all its mappings

keen kelp
#

Just went out for groceries and found out there's a hurricane apparently

vale cradle
#

We already gave you our opinions ;p

keen kelp
#

I like both and I can't choose that's why I asked

#

I missed it tho

vale cradle
hybrid spoke
vale cradle
chrome beacon
young knoll
#

You just need to find the unmapped name

chrome beacon
#

^^

vague cloud
chrome beacon
vague cloud
#

Oh ok thanks

dusty herald
#

why though

chrome beacon
#

Spigot mappings are gone

dusty herald
#

sad

keen kelp
#

got it thanks

young knoll
#

It’ll be Mojang mappings some day

#

Probably

eternal night
#

no

#

unless mojang changes their licence on them, it will never be 😭

#

(unless you just remap your things on compile time anyway)

vapid thorn
#

paper is adding the mojang mappings right now..

#

literally watching them do it

#

earlier

young knoll
#

Yeah spigot already said this is part one in a switch to Mojang mappings

eternal night
#

but not to the paper server at runtime

keen kelp
#

how do I kill an entity

#

not just remove it

#

like vanilla kill

#

with the death animation and sheban

young knoll
#

Try setHealth to 0.0

vale cradle
young knoll
#

playerConnection was a mapped name from spigot

#

Now it’s just b

keen kelp
#

hmm I somehow can't setHealth

#

wait isn't that for Player only?

chrome beacon
#

Well that method is depricated

vale cradle
#

got it

keen kelp
#

so emm

#

what do?

vapid thorn
#

thats okay apparently EntityPlayer doesnt exist in the nms... at least the ide cant resolve it, but it shows all the Entity<entityName> 's

keen kelp
#

I can't find any way to do it

lunar schooner
#

Anyone know what happened to the net.minecraft.server.EntityHuman class?

young knoll
#

setHealth is for living entity

dusty herald
#

setMaxHealth is

chrome beacon
#

;/

#

Yeah I just noticed

dusty herald
#

I always get confused to don't worry 😂

keen kelp
#

so how do I kill an entity

dusty herald
#

Entity#remove()

young knoll
#

If it’s not a living entity you just use remove

keen kelp
#

that just disappears it right

#

instead of killing?

dusty herald
#

yeah

keen kelp
#

hmm

#

that's not what Im going for tho

vale cradle
#

Prolly play effect is what you're looking for?

dusty herald
#

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

young knoll
#

Assuming it is a living entity

dusty herald
#

or just fucking give them Integer.MAX_VALUE's worth of damage

covert bluff
#

trying to github but its just this why?

chrome beacon
dusty herald
#

should fuck em up

covert bluff
#

its not let me select item files

chrome beacon
#

That too xd

vale cradle
keen kelp
#

doesn't newer versions just straight up kills the player instead of huge number?

#

I heard that's how it works

covert bluff
#

how do iadd

#

cause it wont letm e add file

keen kelp
#

or spigot changed that

vale cradle
#

Right click the directory > Git > Add

chrome beacon
#

I have no idea why they decided to do that

keen kelp
covert bluff
#

there's only Create Gist

keen kelp
#

To fix MC-44371, /kill now directly kills non-living targets, rather than dealing 3.4×1038 void damage.

#

hmm

radiant aspen
#

Anyone know how to send a worldborder packet in 1.17? PacketPlayOutWorldBorder no longer exists :/

vale cradle
young knoll
#

You’ll have to find the new packet name

covert bluff
#

idk how do that

vapid thorn
#

void damage

keen kelp
#

fine
event.setDamage(Double.MAX_VALUE);

vale cradle
young knoll
#

Won’t that absolutely destroy armor

vapid thorn
#

also did PacketPlayOutOpenWindow change name or is that just not working right now?

young knoll
#

The packets were all moved

#

Don’t know if they all changed names

quaint mantle
#

1.17 PacketPlayOutTitle?

autumn raft
#

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
young knoll
radiant aspen
young knoll
#

Ah man I just realized I need protocollib to update before I can update my plugin

blissful raven
radiant aspen
blissful raven
radiant aspen
young knoll
#

I haven’t looked but it may be named ClientboundSomething

glossy scroll
young knoll
#

Ah

#

I’m going to wait for them to be fully supported

#

Since you can’t remap reflection strings

glossy scroll
#

that more has to do with SpecialSource rather than spigot i think

lusty cipher
#

is there some way to roughly see what 1.16 nms classes map to in mojang remapped 1.17 nms classes?

glossy scroll
#

kinda

#

thats what i used in 1.16

lusty cipher
#

ah that looks good, thanks

glossy scroll
#

its not perfect

#

but it should cover most things

autumn raft
young knoll
autumn raft
#

Or is there any way to get a ConfigurationSection of one element of the list?

glossy scroll
#

@radiant aspen lmfao i just replied

radiant aspen
#

thanks anways giyuu_love

glossy scroll
#

oh

#

nice

dense geyser
#

do string nbt tags have a size limit? (trying to save 116 len base64 string in an itemstack)

quiet ice
#

116 length is not too large

vital swift
#

Is there a packet that makes fake health?

#

Instead of 5 rows 1 row

eternal oxide
#

API you can set the health scale

quaint mantle
vital swift
#

done, works

vague cloud
#

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")) {
eternal night
#

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

vague cloud
#

Can you send me a link to the post?

ivory sleet
eternal night
#

or that

vague cloud
lunar schooner
#

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 :/

eternal night
#

flag whether or not the vehicle should be dismounted

lunar schooner
#

Check, thanks!

#

Where is the documentation for this btw? i.e where'd you get the info from yourself 😅

eternal night
#

I worked on the packet in one of my PRs xD

opal juniper
#

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

lunar schooner
#

Where did that get its docs from though

#

because afaik mojang doesnt have javadoc or something anywhere

eternal night
#

well wherever spigot mappings came from

#

looking at the source code 😂

#

and figuring out what the value represents

lunar schooner
#

@eternal night You wouldn't also happen to know what happened to PacketPlayOutHeldItemSlot would you 🤔

quaint mantle
#

Where i can find PacketPlayOutTitle in 1.17?

opal juniper
#

Why don't u just use the api

quaint mantle
#

?

opal juniper
#

There is an api for that

#

built into spigot

quaint mantle
#

Player#sendTitle not for me

#

i need to use json

opal juniper
#

what?

#

wdym by

i need to use json

quaint mantle
#

simply /tellraw

ivory sleet
#

wat

#

then use Player#spigot#sendMessage

quaint mantle
#

{"translate":"offset.-100",with:[{"text":"MP: <column>"}]}

eternal night
quaint mantle
#

something like this i need to use

eternal night
#

but don't quote me on that

lunar schooner
#

Yeah just noticed, made a typo 😂

eternal night
#

at least in the obfs version

lunar schooner
#

I had Sot instead of Slot

eternal night
#

oh lol

#

well then, there ya go 🙂

opal juniper
#

How can chinese text be sent to a player - I am having issues with the client corrupting the text in chat

tardy delta
quaint mantle
#

SYSTEM or CHAT?

quaint mantle
plucky comet
#

<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
quaint mantle
#

check maven imports

plucky comet
#
<repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>```
eternal night
tardy delta
quaint mantle
# tardy delta gone?

if are you using maven from 1.17 release page, then import spigot-1.17.jar how <scope>system, using <systemPath>

tardy delta
#

huh

eternal night
#

please don't import things using system scope

tardy delta
#

my plugin is 1.16

quaint mantle
eternal night
#

he isn't

#

are you okay aniby xD

quaint mantle
#

ah

#

i'm not

lilac valve
#

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

blissful raven
quaint mantle
#

1.17 update is very crazy for me

#

a lot of bugs in my plugins

tardy delta
#

but what is it now?

#

just wanting to store EntityPlayer inside a list

#

oh wait

#

i've found the import statement

quaint mantle
maiden briar
#

Cannot resolve <spigot.version>1.17-R0.1-SNAPSHOT</spigot.version>

eternal night
#

wat

maiden briar
#
<dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>${spigot.version}</version>
            <scope>provided</scope>
        </dependency>
eternal night
#

did you run build tools locally ?

maiden briar
#

No I use maven

eternal night
#

yes but you are depending on spigot

lusty cipher
#

Doesn't matter, you have to.

eternal night
#

not spigot-api

maiden briar
#
<repository>
            <id>spigot-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
        </repository>
eternal night
#

which is not distributed through the maven repository

#

because it contains the server source

lusty cipher
#

It's not in the repo yet, as it isn't stable @maiden briar.

#

You can only have it locally rn

maiden briar
#

Oh

eternal night
#

it is in the repo

#

spnda is wrong

maiden briar
#

Where then?

lusty cipher
#

it wasn't in the repo like an hour ago?

broken lava
#

Question: How do I use the special sauce plugin in gradle?

eternal night
#

dude, you are not depending on the spigot-api

#

you are depending on spigot

#

which is the server artifact

maiden briar
#

I want to access nms

eternal night
#

which is not distributed through the repository

#

yes

vague cloud
#

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
eternal night
#

then you will always need to run build tools

maiden briar
#

Oh

eternal night
#

there was never another way

maiden briar
eternal night
#

it did after you ran build tools

#

for that version

maiden briar
#

How do you mean? It just gets it from the repo

eternal night
#

no

lusty cipher
maiden briar
#

I know...

eternal night
#

build tools installs the spigot artifact into your local maven repo

#

hence you can use it

plucky comet
#
<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
maiden briar
#

Ah now I understand

eternal night
#

good 👍

lusty cipher
terse scaffold
#

how can i register a new item in spigot server. I registered that item in Client (MCP)

plucky comet
#
<repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>```I jave this in my repos This is what the docs say
deep escarp
broken lava
eternal night
#

there are example usages

broken lava
#

I'm using gradle

eternal night
#

might wanna specify that when asking xD

broken lava
#

or wait

#

ah fuck you're right

#

I'm sorry

gusty bough
#

Is that legal to have a nms version on a maven repo?

plucky comet
lusty cipher
eternal night
#

not a lawyer, but I'd say stay away from publishing NMS through maven to any repository

lusty cipher
#

i see nothing directly wrong with it

opal juniper
#

?paste

undone axleBOT
shadow gazelle
#

How could I go about making someone auto equip diamond armor if they pick it up and have, for example, iron armor?

eternal oxide
#

EntityPickupItemEvent

#

check if its diamond, check if they are wearign Iron, swop

quaint mantle
#

then check if the item is diamond armor, remove item from inv and set player helmet

shadow gazelle
#

Oh

#

Okay

quaint mantle
#

to get a players helmet, to check if its a iron helmet

#

get players inventory, if player.gethelmet (don't know exact) == Material.()

eternal oxide
#

its java ItemStack helmet; if ((helmet = player.getInventory().getHelmet()) != null && helmet.getType() == Material.IRON_HELMET) or something like

quaint mantle
#

^

maiden briar
#

AFTER BuildTools finished Cannot resolve org.spigotmc:spigot:1.17-R0.1-SNAPSHOT

shadow gazelle
#

Alright, thanks

maiden briar
#

This applies if I add <classifier>remapped-mojang</classifier>

lusty cipher
maiden briar
#

I ran it

chrome beacon
#

Yeah I noticed that it didn't install it to my local repo either

#

Just install it manually using the command line

maiden briar
#

Ok

#

Btw I see that the Spigot API put the NMS stuff in packets?

chrome beacon
#

?

maiden briar
#

Yes now I see things like net.minecraft.network, net.minecraft.server, etc

chrome beacon
tardy delta
#

running buildtools tu tu tu

maiden briar
#

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?

quaint mantle
#

Anyone know why my PlayerHiderItem didn't rename

chrome beacon
maiden briar
#

Yes, but not with version numbers?

chrome beacon
#

Yeah

maiden briar
#

Nice never version numbers!

tardy delta
#

aah nice

maiden briar
#

1.16.5?

vagrant stratus
#

You need to use --rev 1.17

opal juniper
#

you didn't rule out the fact that they may have wanted 1.16.5

eternal oxide
tardy delta
#

does that matter? im not using 1.17 things in my plugin or my server

quaint mantle
#

I see

vagrant stratus
#

If you wanna use 1.17 on your server, yes

tardy delta
#

oh doesnt matter then

vagrant stratus
#

otherwise, you'd just be using minecraft 1.16.5 :p

lusty cipher
opal juniper
lusty cipher
#

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

opal juniper
#

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

tardy delta
#

could i use buildtools 1.17 while my spigot dependency is 1.16.4?

opal juniper
#

?

#

I mean the plugin will likely work on 1.17 if thats what you mean

tardy delta
#

well i mean this
and this
java -jar BuildTools.jar --rev latest

opal juniper
#

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

dusty herald
#

yes

tardy delta
#

ah okay

#

and the plugin will still work on 1.16.4 server

opal juniper
#

yeah

#

it will

tardy delta
#

ki

opal juniper
#

and depending on what you did - it may work on older versions

tardy delta
#

and how do i add an dependency in intellij again?

#

somewhere in project structure?

lusty cipher
#
                        <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?

tardy delta
#

you mean the name?

lusty cipher
#

well that would essentially be the same, so yeah

tardy delta
#

I have this inside <properties></properties>
<jar.finalName>${project.name}</jar.finalName>

quaint mantle
#

Is there any big depreciations with new 1.17

chrome beacon
#

Not that I'm aware of. However there are major NMS changes

quaint mantle
#

I’ve never used nms

pseudo quiver
#

sorry but what is the command the show the text in the middle of player screen

eternal oxide
#

player#sendTitle

pseudo quiver
#

i mean like ingame commandblock

chrome beacon
#

Wrong channel

pseudo quiver
#

oh

#

where do i ask ingame information

chrome beacon
#

(the command is /title)

pseudo quiver
#

ty

tardy delta
#

aah finally worked to import buildtools

lusty cipher
#

Sanity check, org.spigotmc:spigot:1.17-R0.1-SNAPSHOT requires one to run BuildTools, right?

tardy delta
#

yes

prime flint
#

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);
eternal night
#

@prime flint update your spigot

#

This has been fixed in a commit a few hours ago

rare rain
#

Expect to update frequently these next few days lol

quaint mantle
#

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 ?

keen kelp
#

how do I make it so that players take no velocity if the damage was under a certain threshold?

prime flint
keen kelp
#

non-janky way

shadow gazelle
#

Is CustomItemTagContainer only 1.13+?

keen kelp
#

yes

dim bronze
#

any reason that buildtools fails for me if it isn't run with root?

shadow gazelle
# keen kelp yes

Damnit, is they any other way to add custom NBT tags, then? I'm using 1.8.

quaint mantle
keen kelp
#

just normally edit NBT

plucky comet
#
EconomyResponse response = economy.withdrawPlayer(p, 10000.0);```How do i make this not take a loan
onyx shale
#

simply check the balance first?

keen kelp
#

damnnit

#

how do yall type so fast

onyx shale
#

coding fingers

#

better write fast

keen kelp
#

no it's definitely because I'm not native English speaker

#

I put all blame on that

onyx shale
shadow gazelle
onyx shale
#

nope

#

1.8 has to do it through nms

#

you get the nms instance of itemstack

#

then insert the nbt from there

shadow gazelle
#

Oh

onyx shale
shadow gazelle
#

Any idea what the 1.8.8 nms name is?

onyx shale
#

the ide will auto import

#

it

shadow gazelle
#

Nope

#

I mean for this net.minecraft.server.v1_12_R1

#

v1_8_8_R1 and v1_8_R1 don't work

dire marsh
#

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

shadow gazelle
dire marsh
#

ok fixed that