#help-development

1 messages ยท Page 1508 of 1

granite stirrup
#

;-;

vagrant stratus
#

oh, i don't use intellij :p

granite stirrup
#

yeah eclipse dont do that i think

#

but ur probs not using that

#

either

vagrant stratus
#

NetBeans ๐Ÿ‘€

ivory sleet
#

o.O

quaint mantle
#

if i compile against java 16, does that mean the plugin wont work with lower versions?

ivory sleet
#

no

quaint mantle
#

aight

granite stirrup
#

java is good at compatibility :)

fickle helm
#

but what if you use a java 16 specific function, what happens when java 11 executes the plugin?

granite stirrup
#

it might just throw a error

ivory sleet
#

U get whats called an Error

fickle helm
#

my guess is you'd get a ClassNotFound error

ivory sleet
#

nope

#

UnsupportedClassVersionError

fickle helm
#

yup that one

ivory sleet
#

ClassNotFoundError is not even a thing

fickle helm
#

so you can compile to 16 long as it also compiles to 11 or 8 without errors it appears

ivory sleet
#

no

dusty herald
#

Java usually has good backwards compatibility

#

usually

ivory sleet
#

if u compile to j16 then it wont work on anything lower

#

from my experience its only forwards compatible

dusty herald
#

i meant like java 16 can run code from java 8 without issues

ivory sleet
#

well u can run a server with j16 and then have plugins compiled against j8 or smtng yeah

granite stirrup
#

can u run a mc server made with java 8 with plugins made with java 16 and u have java 16 :)

ivory sleet
#

that made little to no sense

granite stirrup
#

ik

granite stirrup
#

did u get confused

ivory sleet
#

You successfully didn't just make me confused but I might have lost some braincells also xD

quaint mantle
#

ok, so to clarify, that means I cannot compile a plugin with java 16 and use it on a 1.12 server, correct?

granite stirrup
#

i think u can

ivory sleet
#

if ur 1.12 server runs java 16 then its fine

granite stirrup
#

the person gotta have java 16 tho

hardy swan
#

1.12 server cant run on 16

granite stirrup
ivory sleet
#

iirc it struggles with some outdated lib

hardy swan
#

Pretty sure it cant, unless you successfully run it using java jar spigot-1.12.jar with java 16 installed

granite stirrup
#

u can

ivory sleet
#

ofc u need java 16 to run the server with java 16 right?

hardy swan
#

as in

granite stirrup
#

if it doesnt run try to turn use-native-transport to false in server.properties

hardy swan
#

if you can run the command with java 16 installed, then the server runs on java 16

#

but

#

if you click on the jar file

#

doesn't mean it is running on 16

granite stirrup
#

u can im sure run java 16 in mc 1.12.x

ivory sleet
#

pretty sure that depends on some environment variable or smtng (which java version should be used when clicking an executable jar)

granite stirrup
#

1.8 might have struggles without turning use-native-transport to false

#

cuz i done that on a 1.8 server to run java 11

young knoll
#

Java 16 doesnโ€™t let me break things

#

0/10

ivory sleet
#

๐Ÿฅฒ

sturdy flax
#

does anyone know what its called when you have like a web page but its like a direct list of downloads on the server? with directories and stuff? i have no idea what its called... does this make sense?

granite stirrup
young knoll
#

Using reflection to change the modifiers of a field was 100% safe and good

sturdy flax
#

like a real budget download page

granite stirrup
sturdy flax
#

do you know the thing im talking about tho?

granite stirrup
#

i know that xampp does it

#

lol

hardy swan
#

you can set up a github page, and put links in there

#

ez

ivory sleet
#

google docs

#

๐Ÿ™‚

hardy swan
#

blog

sturdy flax
#

(i have no issue making any kind of page or whatever)
i just very specifically am trying to figure out what this thing is called lol

#

i think "web file list" or "web directory" might be accurate, im asking google...

hardy swan
#

"Downloads Page"

proud basin
#

lol

ivory sleet
#

actually TheRealDan I get what u mean

sturdy flax
#

yeah its weird, i am trying to find an example also

granite stirrup
#

something like this?

sturdy flax
#

yeah haha

#

thats exactly it

granite stirrup
#

i think its just a file list

#

XD

sturdy flax
#

hm

ivory sleet
#

essentially its ur browser which has that ugly interface when u browse directories

hardy swan
#

is it called docker or sth

granite stirrup
#

i downloaded a newgrounds thing

sturdy flax
#

its not called docker, thats a very different thing

ivory sleet
#

uh docker is sorta smtng else

granite stirrup
#

but its kinda broken

ivory sleet
#

not secure idkidk thonk

granite stirrup
ivory sleet
#

well docker basically lets u pack ur app with deps and then u can deploy it wherever you want

granite stirrup
#

certificate

ivory sleet
#

sus

granite stirrup
#

its apache

sturdy flax
#

well its not apache, you can setup the same with IIS

granite stirrup
#

no im talking about what im using

sturdy flax
#

ah

granite stirrup
#

i made a ancient looking website

#

its using a api i found online

ivory sleet
#

it sure looks ancient

sturdy flax
#

yeah if you don't have ssl cert just access on http
but if you want free ssl cert you should look into letsencrypt

dusty herald
#

or cf

granite stirrup
#

i can encode ur name 50 times if i wanted to

#

but i can only encode it 18 cuz thats the max i made it

#

;-;

#

its php

#

btw

#

all php

dusty herald
#

show code

granite stirrup
#

everything is php

dusty herald
#

and I'll show you my php encoder

sturdy flax
#

except the html in the php?

granite stirrup
#

u wouldnt want to

sturdy flax
#

but actually

granite stirrup
#

no i meant how bad my php code is

#

lol

sturdy flax
#

yeah but also

#

its php

hardy swan
#

.toString(2)

granite stirrup
#

its liek 56 lines and then theres another file that has more

dusty herald
granite stirrup
#

i just used a website api

dusty herald
#

this is an outdated version, lost the old one ages ago

granite stirrup
#

to do my base64 shit for me

#

XD

dusty herald
#

๐Ÿ˜‚

#

this uses keys and shit

granite stirrup
#

and then i got another file

#

ayy

dusty herald
#

the old one encoded hex values to a random string of characters between 0 - 4, put each character's length into a mini key in the front, split it with $ or something and then put the code and it would decode the key from the lengths and then str_rot the key, then base64 decode it

granite stirrup
dusty herald
#

and then that key would be used to decode the actual message

#

really old version i have a jar of

#

Encrypted: cwYemhemhHKVeIOcuFurM
Key: cwYaFcjRKJGiurMjgliWEHKVxjDsbRWTncuFMBynOSeIOeBcYQbDKPemhzHcxqDJoqczUHSVmACkgpWuaWmRfoUldCqxHuojJlAkIEfEArTwSKYVnuposEjwEJcNTGnVJpTppbwTvETFJBMETowcLnmsmmhkCXuZnJHHvMfBeCArlQuvvOoasVPQkMuwfeebPULIKZIyONAsKtZ

#

means asshole

#

๐Ÿ˜‰

granite stirrup
#

look at my code its shit

dusty herald
#

i refuse

granite stirrup
#

why

#

didnt u want to see it

#

XD

granite stirrup
dusty herald
#

its not shit

granite stirrup
#

some js is used lol

#

and idk js so idk why i used it

#

im like the worst a css styling

ivory sleet
granite stirrup
#

i always make 1980s style websites

granite stirrup
hardy swan
granite stirrup
#

ah yes lol encOded into base64 18 times is Vm0wd2QyUXlVWGxWV0d4V1YwZDRWMVl3WkRSV01WbDNXa1JTVjAxV2JETlhhMUpUVjBaS2RHVkdXbFpOYWtFeFZtcEJlRll5U2tWVWJHaG9UV3N3ZUZadGNFZFpWMDE1VTJ0V1ZXSkhhRzlVVmxaM1ZsWmFkR05GWkZSTmF6RTFWVEowVjFaWFNraGhSemxWVm0xb1JGWldXbUZrUjFaSFYyMTRVMkpIZHpGV2EyUXdZekpHYzFOdVVtaFNlbXhXVm1wT1QwMHhjRlpYYlVaclVqQTFSMWRyV2xOVWJVcEdZMFZ3VjJKVVJYZFdha1pYWkVaT2MxZHNhR2xTYTNCWlYxWmtNR1F5VW5OalJtUllZbFZhY2xWc1VrZFdiRnBZWlVaT1ZXSlZXVEpWYkZKSFZqSkZlVlZZWkZkaGExcFlXa1ZhVDJOc2NFZGhSMnhUVFcxb2IxWXhaREJaVmxsM1RVaG9hbEpzY0ZsWmJGWmhZMnhXY1ZGVVJsTk5XRUpIVmpKNFQxWlhTa2RqUmxwWFlsaFNNMVpxU2t0V1ZrcFpXa1p3VjFKWVFrbFdiWEJIVkRKU1YxZHVUbFJpVjJoeldXeG9iMWRHV25STlZFSlhUVlV4TkZaWGRHdFdNV1JJWVVac1dtSkdXbWhaTW5oWFl6RldjbHBHVW1sU00yaFlWbXBLTkZReFdsaFRhMlJxVW0xNGFGVXdhRU5UUmxweFUydGFiRlpzV2xwWGExcDNZa2RGZWxGcmJGZGlXRUpJVmtSS1UxWXhXblZVYkdocFZqTm9WVlpHWTNoaU1XUkhWMjVTVGxaRlNsaFVWbVEwVjBaYVdHUkhkRmhTTUZZMVZsZDRjMWR0U2tkWGJXaGFUVlp3VkZacVJtdGtWbkJHVGxaT2FWSnRPVE5XTW5oWFlUQXhSMWRzYUZSaE1sSnhWV3RXWVZZeFduRlViVGxyWWtad2VGVnRkREJoYXpGeVRsVm9XbFpXY0hKWlZXUkdaV3hHY21KR1pGZFNWWEJ2VmpGYWExVXhXWGhVYmxaVllrWktjRlZxUmt0V1ZscEhWV3RLYTAxRVJsTlZSbEYzVUZFOVBRPT0

granite stirrup
mental stump
#

Gibberish in chat

#

Today we speak Alien!

granite stirrup
#

its base64

#

XD

mental stump
#

As I can see

granite stirrup
#

lol

shadow gazelle
#

I know this is probably very inefficient atm, but idrc right now. How would I turn this back into a item stack so I can add the enchant and edit/add lore (using the last line)?

                Player player = (Player) Bukkit.getOnlinePlayers();
                Material pick = item.getType();
                for (Entity entity : player.getNearbyEntities(3, 3, 3)) {
                    if (entity instanceof Item) {
                        if (pick == Material.NETHERITE_PICKAXE || pick == Material.DIAMOND_PICKAXE || pick == Material.IRON_PICKAXE) {
                            Item i = (Item) entity;
                            for (Entity e : i.getNearbyEntities(1, 1, 1)) {
                                if (e instanceof Item && item.getItemMeta().getDisplayName() == ChatColor.LIGHT_PURPLE + "Telepathy Core") {
                                    e.remove();
                                    Item pickNew = ;
                                }
                            }
                        }
                    }
                }
sturdy flax
#

from an item entity? i think it has getItemStack()

shadow gazelle
sturdy flax
#

looks like your casting to ItemStack but using Item type

#

should use ItemStack type, if thats what you want

shadow gazelle
#

Which gives incompatible types

sturdy flax
#

note the difference between Item and ItemStack right

shadow gazelle
sturdy flax
#

also getItemStack from Item entity should return ItemStack type anyway

hardy swan
#
ItemStack example = item.getItemStack();
ItemStack singularItem = example.clone();
singularItem.setAmount(1);
example.setAmount(example.getAmount() - 1);
ItemMeta meta = singularItem.getItemMeta()...
singularItem.setItemMeta(meta);
item.setItemStack(example);
item.getLocation().dropItem(singularItem);
mental stump
#

Item != ItemStack

shadow gazelle
#

I know

mental stump
#

If you want to get an enchantment, you need the itemstack not the item, and casting an item to an itemstack will not work

#

They are not the same

shadow gazelle
#

I guess I could clone then delete both items

#

Wait

shadow gazelle
#

You can't get the ItemStack from item

hardy swan
#

item is an Item which is an entity

shadow gazelle
#

Oh my God

granite stirrup
#

i forgot where i got xampp from

#

;-;

shadow gazelle
#

Well, if I had known that before, my life would have been 300x easier

#

Wait, no

#

I tried that

#

Wait

#

w h a t

#

Why does that work now?

hardy swan
#

cuz I'm pretty awesome

shadow gazelle
#

I guess so

#

Thanks

granite stirrup
ivory sleet
#

I got it with wamp

shadow gazelle
hardy swan
#

how is the item dropped? where does it come from

#

the part where it buffles me the most is casting getOnlinePlayers() to Player

sturdy flax
#

its ok it will come up in testing

#

it compiles for now

hardy swan
#

cant believe that compiles actually

shadow gazelle
hardy swan
#

may wanna check if getNearbyEntities include item frames' items

undone axleBOT
granite stirrup
#

lol

hardy swan
#

where did that come from

granite stirrup
#

?google :)

undone axleBOT
hardy swan
torn shuttle
#

does the spigot API not provide a way to make endermen attack a player?

#

hm I need to see if setting the target automatically makes them aggressive or not

#

also I've created another monster class ๐Ÿ˜”

#

?paste

undone axleBOT
torn shuttle
#

look at how ugly my baby has become

#

even the link says ugle

granite stirrup
#

ayyy i created a table :)

torn shuttle
#

gj

spiral roost
#

Okay. Is there a spigot method to force send the teleport packet rather than the relative move packet? I'm dealing with very minuscule armorstand movements that are not properly updating to their correct positions.

granite stirrup
spiral roost
#

I mean yea, but sometimes spigot has methods like that.

#

We allowed to ping staff?

torn shuttle
#

only if there's some sort of spam attack

#

or similar

spiral roost
#

rip

torn shuttle
#

unless it's @worldly ingot , you can ping @worldly ingot to make fun of @worldly ingot

torn shuttle
#

I hate my past self

#

fuck that guy

#

he's a dick and his code isn't scalable

granite stirrup
#

github logo :)

torn shuttle
#

is this github 2.0

granite stirrup
#

no

torn shuttle
#

hey it's me microsoft I want to pay 10 bn usd to buy your github 2.0 website

granite stirrup
#
<i class="bi-github" role="img" aria-label="GitHub"></i>```
shadow gazelle
hardy swan
#

Doesnt the first get nearby entities already do that

shadow gazelle
#

Oh, you're asking about the second one?

granite stirrup
shadow gazelle
#

The second one checks for the book in the same position as the pickaxe

#

@hardy swan ^

hardy swan
#

Ahh

granite stirrup
#

in emmet for vsc this div.header>header>nav.nav-menu>ul>li*3>div>img.nav-icon+p.nav-text gets turned into html <div class="header"> <header> <nav class="nav-menu"> <ul> <li> <div> <img src="" alt="" class="nav-icon"> <p class="nav-text"></p> </div> </li> <li> <div> <img src="" alt="" class="nav-icon"> <p class="nav-text"></p> </div> </li> <li> <div> <img src="" alt="" class="nav-icon"> <p class="nav-text"></p> </div> </li> </ul> </nav> </header> </div>

shadow gazelle
hardy swan
#

No lol, think thats the best way

dusty herald
#

I knew a person who developed their websites and only used childs to find divs

#

like almost no divs had classes and i was so fucking confused looking at the source code

granite stirrup
#

lol

granite stirrup
#

im making some css currently i have this

dusty herald
#

use scss

granite stirrup
dusty herald
#

๐Ÿคฎ

granite stirrup
dusty herald
#

XAMPP

granite stirrup
#

xampp?

dusty herald
#

shame on you

granite stirrup
#

whats wrong with xampp

granite stirrup
dusty herald
#

apache

#

im kidding

granite stirrup
#

lol

#

but whats wrong with xampp

dusty herald
#

nothing

#

i just use nginx

tired bear
granite stirrup
#

lol

tired bear
#

Yeah that lol

#

Beat me to it ๐Ÿ˜ 

granite stirrup
#

do u think this looks good?

tired bear
granite stirrup
tired bear
granite stirrup
#

XD

tired bear
#

Right okay

granite stirrup
#

i just cut it off

tired bear
#

Looks good but Iโ€™m not a fan of the GStudiosX font

#

Just looks super uninteresting lol

granite stirrup
#

oh yeah the font is just the default

#

XD

tired bear
#

Also

dusty herald
#

oh my godoh my god

#

i got it to work

tired bear
#

Make the Terms of service thing a hyper link

#

Not a seperate here button

granite stirrup
#

whats a good font to use?

#

XD

sturdy flax
granite stirrup
#

i need to change the icons

#

i dont really like them

#

the home one is okay

#

its just the other two

granite stirrup
vague mason
#

This website looks old.

granite stirrup
#

lol

vague mason
#

Try white text on blue background

#

And also use more modern icons

granite stirrup
granite stirrup
vague mason
#

I use those

#

background-image or background-color

#

Apply that to body

granite stirrup
#

its mostly cuz i have a div for all the content and i cant expand it to the bottom

vague mason
#

When website will have enough content that should fix your problem

granite stirrup
#

nah i need to expand it at the bottom

wet breach
granite stirrup
#

is that better?

wet breach
#

not sure if there is anything wrong with xampp anymore @granite stirrup but it wasn't super great a while back lol

granite stirrup
#

lol

#

the only bad thing i see with it is the ads of there other softwares while trying to install it

wet breach
#

the menu used to be bugged sometimes. Like not opening your php.ini file so you had to go find it. Sometimes it wasn't able to restart your apache server.

maiden thicket
#

italics dont look good in nav bars imo

granite stirrup
maiden thicket
#

๐Ÿ˜”

granite stirrup
#

OH i forgot

#

i used the <i> thing f

#

thats why its italics

wet breach
#

lol

maiden thicket
#

mm

wet breach
#

what did you think that was for?

granite stirrup
#

i just used it since i had it i didnt know it modified the text

#

i kinda never really touched <i>

maiden thicket
#

wo

wet breach
#

i is one of those old tags from HTML 1 days that just managed to make it to modern time ๐Ÿ˜›

maiden thicket
#

ezz

granite stirrup
#

ffffffff

#

i removed the italics and it broke the nav bar

wet breach
#

lmao

granite stirrup
wet breach
#

what did you do, have the style set for <i> tag ?

granite stirrup
wet breach
#

well should check your css file

granite stirrup
#

do u want ?

#

lmao the syntax highlighting looks weird

granite stirrup
#

because theres nothing specific to that

#

does inline-block even work with p?

dusty herald
#

something to do with this shit

#
*
*::after
*::before { box-sizing: border-box; }```
wet breach
granite stirrup
#

ah i fixed it

dusty herald
#

thought about commas? ๐Ÿ˜‰

granite stirrup
#

u need commas?

#

k but i fixed it

#

gtg tho

#

cya tmr

wet breach
#

cya later

granite stirrup
#

bye

dusty herald
#

cya

#

have fun ๐Ÿ™‚

royal hawk
#

hi all Who understand how deobf Paramorphism?

dusty herald
#

do what to what

sage depot
#

why doesnt this working

#

motd=&e&l&m--&9&8&l[&r=&6&lThe Deathpixel Network &8&l]&e&l&m--&8&l[ &c1.8-1.16 &8&l]&e&l&m-----&e&l&m ---&8&l[ &eNEWS:&8&l ]&e&m----&8&l[&r &e &l Sleef Soon &8&l]&e&l&m-

chrome beacon
#

& isn't a vanilla color code symbole

sage depot
#

i use spigot

chrome beacon
#

and

#

?

sage depot
#

nothing

burnt current
#

Hey quick question: I'm programming a villager who, when I do a certain thing, gets teleported up 3 blocks and falls back to the ground. I have already created a variable which contains the Y location of the villager, but I don't know how exactly I could teleport the villager. Can someone help me with this? Thanks in advance

chrome beacon
#

Just call the telport method on the villager

sage depot
#

fix it for me then pls

wispy fossil
#

or a plugin code?

sage depot
#

motd

sage depot
wispy fossil
#

in server.properties?

sage depot
#

yes

wispy fossil
#

put quote around it

sage depot
#

what is quote

wispy fossil
#

"

sage depot
#

ok

torn shuttle
#

where is he

#

@wraith rapids we have a new winner for class names BinderOfWorldsPhase3EndermanReinforcementConfig

wispy fossil
#

holy fucking shit

sage depot
#

wtf is that

torn shuttle
#

it's the configuration file for the enderman that appears in phase 3 of the binder of worlds boss

sage depot
#

ok

chrome beacon
wispy fossil
#

can you even blame them

#

what else do you name that

#

BinderOfWorldsPhase3EndermanReinforcementConfig there's got to be something longer

torn shuttle
#
public class BinderOfWorldsPhase3EndermanReinforcementConfig extends CustomBossConfigFields {
    public BinderOfWorldsPhase3EndermanReinforcementConfig(){
        super("binder_of_worlds_phase_3_enderman_reinforcement",
                EntityType.GHAST.toString(),
                true,
                "$reinforcementLevel &5Reality Slayer",
                "250");
        setDropsVanillaLoot(false);
        setDropsEliteMobsLoot(false);
        setTimeout(2);
        setFollowDistance(200);
    }
}

cleaaaaan

#

tight

#

isn't that amazing

#

wasn't that worth like 12 hours of my life

#

actually way more, I'm just counting the latest refactors

burnt current
wispy fossil
#

that's awful
i lied
that's a terrible class name

when the longest name in your class is the header

torn shuttle
#

ta calado

chrome beacon
burnt current
#

ohh ok good thank you

royal hawk
#

hi all Who understand how deobf Paramorphism?

wispy fossil
#

#teleport() takes either a location, vector, or three coords

burnt current
hybrid spoke
burnt current
#

x2?

chrome beacon
#

Bro

#

Just copy paste what I did

hybrid spoke
#

yeah, you are adding his location to his location and teleporting him to that location

torn shuttle
#

hey kids I heard you like configuration files

powers:
- summonable:summonType=ON_COMBAT_ENTER_PLACE_CRYSTAL:location=80,10,0:lightningRod=true
- summonable:summonType=ON_COMBAT_ENTER_PLACE_CRYSTAL:location=-80,10,0:lightningRod=true
- summonable:summonType=ON_COMBAT_ENTER_PLACE_CRYSTAL:location=0,10,80:lightningRod=true
- summonable:summonType=ON_COMBAT_ENTER:location=80,20,0:filename=binder_of_worlds_phase_3_ghast_reinforcement.yml:inheritLevel=true
- summonable:summonType=ON_COMBAT_ENTER:location=-80,20,0:filename=binder_of_worlds_phase_3_ghast_reinforcement.yml:inheritLevel=true
- summonable:summonType=ON_COMBAT_ENTER:location=0,20,80:filename=binder_of_worlds_phase_3_ghast_reinforcement.yml:inheritLevel=true
- summonable:summonType=ON_COMBAT_ENTER:location=0,20,-80:filename=binder_of_worlds_phase_3_ghast_reinforcement.yml:inheritLevel=true
- summonable:summonType=ON_COMBAT_ENTER:spawnNearby=true:inheritLevel=true:inheritAggro=true:filename=binder_of_worlds_phase_3_enderman_reinforcement.yml
#

haha typing go brr

burnt current
hybrid spoke
burnt current
#

oh oh soo now I understand. I thought this would set the location of the villager to 0, 4, 0.

chrome beacon
#

The moment when you spoonfeed for once and they don't even understand how to use it .-.

hybrid spoke
burnt current
#

ok ok thank you very much ๐Ÿ™

torn shuttle
#

how can I be getting an IllegalStateException when removing an element from an iterator?

#

all it does is go through a list of gold nuggets

#

oh I get it

#

I tried removing it multiple times is why I think

quaint mantle
#

Is there a way to disable player collisions for 1.17?

There is no collidewithentities field

#

(I only want specific players to not collide with entities/players)

torn shuttle
#

there's a method for it

#

setCollidable

quaint mantle
#

Didn't work when tested :/

quaint mantle
#

Thanks

torn shuttle
#

time to mathematically define a tornado

chrome beacon
#

Well the server needs to have that dependency

#

Include that in your jar

#

Send full POM

#

?paste

undone axleBOT
chrome beacon
#

Send it all

summer scroll
torn shuttle
#

tornadoEye = eliteMobEntity.getLivingEntity().getLocation().clone().add(new Vector(6, 0, 0)) .toVector().rotateAroundY(ThreadLocalRandom.current().nextDouble(0, 2 * Math.PI)) .toLocation(eliteMobEntity.getLivingEntity().getWorld()); ah yes setting a location

#

oh oops that's not even right, I still have to adjust for the floor

lucid gazelle
#

anyone wanna scope my screen, and help me implement placeholders into my plugin? It's already implements just not working, will pay you for your time. Weird request ik, i can talk you can listen, or can just type. Will pay $20

summer scroll
#

omg

#

i forgot to put api-version

#

smh

opal juniper
#

That would do it

#

Out of curiosity - why are you using the string of material rather than just the material

summer scroll
#

just to make it more customizable

#

for example if i want to use base64 head

material: head;eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODY1MmUyYjkzNmNhODAyNmJkMjg2NTFkN2M5ZjI4MTlkMmU5MjM2OTc3MzRkMThkZmRiMTM1NTBmOGZkYWQ1ZiJ9fX0=
#

split the ;, set the itemstack to PLAYER_HEAD

opal juniper
#

Ok - that makes more sense

summer scroll
#

What event should I listen when Player moved item from their Inventory to the custom inventory?

#

Like I want to do something when they place the item on the custom inventory.

tawdry cedar
#

InventoryClickEvent maybe?

summer scroll
#

yea i'm gonna try that i think

chrome beacon
#

And drag event

#

Don't forget that

summer scroll
#

idk exactly when the drag event called

chrome beacon
#

When you drag around items in the inventory

summer scroll
#

with holding left/right click?

chrome beacon
#

(When you have a stack and hold left click and drag around slots)

opal juniper
#

Its when you spread items across slots

#

i wish it was called ItemStackDragEvent

chrome beacon
#

Why

echo saddle
#

so, 1.17 needs java 16 does that mean plugins are not backwardly compatible?

chrome beacon
#

You should be able to compile with Java 8

#

As long as you don't use NMS

echo saddle
#

not sure what nms would have to do with it

chrome beacon
#

You can have a separate module with Maven with Java 16 and 1.17 NMS

chrome beacon
echo saddle
#

oh, so running 1.17 nms implies the java is 16

chrome beacon
#

Yeah

echo saddle
#

so, wait, means that a plugin running on 1.17 that uses nms must just run on jvm 16

#

but that code can't it still be java 8 if it's not accessing nms?

#

I don't get where there is the issue is then

#

or are you saying can't compile 1.17 nms module using java 8 because it can't understand something?

#

if I don't use java 16 specific features and compile using java 8, then can be backwardly compatible as a plugin? except when using NMS which then links in the craftbukkit which includes NMS that has java 16 features so would not compile, but can get around that by compiling that module using java 16, is this correct?

#

ugh. so what is everyone doing then, yet another specific version for 1.17 onward?

chrome beacon
#

Well what I did was just split all 1.17 things in to a different module

#

And then just shade that

lean gull
#

anyone know why this is happening?
https://i.imgur.com/vWRHSs5.png

CODE: (in main calss)

    boolean ifConfigValueIsSet(String ConfigValue) {
        return this.getConfig().isSet(ConfigValue);
    }```
lusty cipher
#
  1. Learn Java
  2. You're trying to call an instance function from static context.
lean gull
#

i have no clue what you mean by the second one and i am already learning java

lusty cipher
#

Main is just referencing its static context. You don't have a instance of it, e.g. Main main = new Main() (don't do this with plugins btw).
So you would have to make a function static for you to be able to call it like that

lean gull
#

i didn't understand the first two sentences but i can't make it static

#

cause then this would have a red line below it

lusty cipher
#

yes because you can't call this from static context

lean gull
#

then what else can i do?

lusty cipher
#

Well I'd suggest you read up on what static means in Java

#

but otherwise, this is what I would do

lean gull
#

i tried, i didn't understand

torn shuttle
#

mmmh tornado

lean gull
#

noice

lusty cipher
#
class Plugin extends JavaPlugin {
  private static Plugin instance;

  @Override
  public void onEnable() {
    instance = this;
  }

  boolean static isConfigValueSet(String value) {
    return instance.getConfig().isSet(value);
  }
}
#

if that makes any sense to you

lean gull
#

i don't understand that

#

could you explain it?

#

also wouldn't instance be a reserved keyword?

wraith rapids
#

no

#

instanceof is a reserved keyword

lusty cipher
#

You know what instances are in Java?

wraith rapids
#

the issue here is that you're using an object oriented language but don't know what objects are

lean gull
#

i do not :/

lusty cipher
#

The following creates an instance of X.

X x = new X();
lean gull
#

i don't follow

lusty cipher
#

but I really suggest you read a java tutorial

#

or watch one

lean gull
#

i have

lusty cipher
#

you haven't properly then

lean gull
#

it was mostly about the math part of java tho

wraith rapids
#

you need to find an oop focused java tutorial

#

oop being object oriented programming

#

that is the thing you are having issues with

lean gull
#

i'm also learning by 3 things: trial and error, asking people here and codeacademy

wraith rapids
#

most java tutorials completely ignore oop and then this happens

lean gull
#

but again i'm only a beginner

hardy swan
#

try to search up and understand what each keywords means, like what is static

lean gull
#

i have, i did not understand

hardy swan
#

that is one of the most important things to understand

#

then study access modifiers, generics, wildcards

#

inheritance

echo saddle
#

seems like BungeeCord javadocs don't build for Java 11

hardy swan
#

polymorphism

ivory sleet
#

I think he should wait with generics for quite some time

lusty cipher
#

Yeah generics are a much more complex subject

chrome beacon
hardy swan
#

guys, is there a reason for plugin enable to fail because of NoClassDefFoundError: com/comphenix/protocol/events/PacketListener without even calling it

lusty cipher
#

I thought about it for a second

#

And decided to try it

#

But eh, they don't understand anyway

#

So idc

chrome beacon
#

Yeah he's been here a while

#

He refuses to look anything up and learn Java

#

He wants us to write for him

wraith rapids
#

wait, is that the "i'm blocking you" guy or is that someone else

lean gull
wraith rapids
#

someone blocked elgar and like 4 other people the other day because they refused to spoonfeed him

lean gull
#

could someone help?

hardy swan
#

dun paste your plugin.yml here tho, wont help

lean gull
#

was just about to lol

lusty cipher
#

Well I think I know what the issue is, but I honestly don't want to see it

hardy swan
#

under main:

#

locate your main class properly

#

before that you might have to know what are packages too

wraith rapids
#

learn bukkit

lean gull
#

aren't packages just folders

hardy swan
#

not just

lusty cipher
#

no I think they just copy & pasted what I sent earlier as an example, which had the javaplugin class called Plugin

#

so oof

torn shuttle
lean gull
#

no i ignored the first line and put the 3 lines i needed in my main class

#

i'm dumb not an idiot

hardy swan
#

guys, I am so done with java 16

#

kill me

chrome beacon
#

What

#

What's wrong with Java 16 lmao

torn shuttle
#

it's too good

#

go back to java 1

hardy swan
#

protocolLib givin headaches

#

ok prob not 16's prob, but still

lusty cipher
torn shuttle
#

go back to assemble

lean gull
#

so can anybody help?

hardy swan
lean gull
#

it's just the com package and idk what's a public class name of a class

lean gull
#

Main and ChatColorFunction

hardy swan
#

of which is the one declared public

lean gull
#

and that means...?

hardy swan
#

public class MyPlugin extends JavaPlugin

#

the word public

#

declares the class to be public

#

allows users outside the package to access the class

lean gull
#

they're both public

#

the only package is the com one, and they're both in it

hardy swan
#

which is the one that extends JavaPlugin?

lean gull
#

Main

hardy swan
#

so what did you put under main field in plugin.yml

smoky finch
#

Does anyone know if CMI has a maven repo?

lean gull
#

i have this in the plugin.yml:
main: com.floofsy.wootoo.WooToo

chrome beacon
#

Well that's not your main class is it

hardy swan
#

what do you think should be the right class to write there

chrome beacon
lean gull
#

yeah ok i see it now

#

so com.floofsy.wootoo.Main?

hardy swan
#

you said that the package name of Main is? just com right?

lean gull
#

no

#

sorry for misleading you, it's com.floofsy.wootoo

hardy swan
#

so is it in a directory that looks like com>floofsy>wootoo

lean gull
torn shuttle
#

it's great when you're stuck diagnosing why a method isn't working when you haven't hooked it up yet huh

lusty cipher
#

@lean gull What's at the top of your .java file where it says package x.y.z; or something. From there you'll know what package do put in your plugin.yml.

hardy swan
lusty cipher
hardy swan
#

with fullstops?

lusty cipher
proper notch
#

Yes. That's how package paths are represented

hardy swan
#

damn

wraith rapids
#

nested directories with no other contents are concatenated with the . delimiter

hardy swan
#

ahh

#

use vscode LMAO

lusty cipher
#

imagine not having a good java linter, formatter and code completer in your ide

hardy swan
#

linter is installable extension >:)

lusty cipher
ancient plank
#

intellij keeps trying to get me to update the kotlin plugin even though I have it disabled because I never use it

lusty cipher
#

what's so bad about updating it lol

proper notch
#

Probs coz it's a built-in

#

But still annoying

lusty cipher
ancient plank
#

I just don't feel like updating it if I don't use it

proper notch
hardy swan
#

guys, real question here, I receive this error without even calling any relevant methods

java.lang.NoClassDefFoundError: com/comphenix/protocol/events/PacketListener
    at com.blahblahblah.MyPlugin.onEnable(MyPlugin.java:69) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[spigot-1.14.4.jar:git-Spigot-9de398a-9c887d4]
...
Caused by: java.lang.ClassNotFoundException: com.comphenix.protocol.events.PacketListener
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_231]
    at ...
#

oops that's a big chunk

proper notch
#

That's why I avoid updating lots of my plugins rn

lusty cipher
#

it's like 5-10 secs at max

proper notch
wraith rapids
#

intellij is gay

proper notch
#

Also with my projects since they're p large, use lots of dependencies and frameworks it takes a bit longer

torn shuttle
#

that's pretty hot @wraith rapids

hardy swan
lusty cipher
#

look at the stacktrace under

Caused by: java.lang.ClassNotFoundException: com.comphenix.protocol.events.PacketListener
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_231]
    at ...
wraith rapids
#

reading helps

hardy swan
#

it is a trace of plugin enabling

lusty cipher
#

yeah, read it and youll get your answer

hardy swan
#
Caused by: java.lang.ClassNotFoundException: com.comphenix.protocol.events.PacketListener
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_231]
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:135) ~[spigot-1.14.4.jar:git-Spigot-9de398a-9c887d4]
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:81) ~[spigot-1.14.4.jar:git-Spigot-9de398a-9c887d4]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_231]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_231]
    ... 10 more
#

yes that what I thought I would too

#

Firstly this will make you think I called sth related to PacketListener

vital ridge
#

What should I do if I want to know for example how many creeper eggs player has in his inventory? Im creating a inventory full detector system, where it gives the player enough and the rest what didnt fit in the inventory will be dropped on the ground

hardy swan
#

yes I indeed included ProtocolLib as a soft-dependency, but I didn't call its methods or get its class at all in onEnable()

#

not even an import in the main class

lusty cipher
#

does ExternalPluginSupport extend something, or is it maybe in the init method and the line num is wrong?

#

Idk, you should try and get a better and more extensive stacktrace to help you here

quaint mantle
#

PacketPlayOutTitle isn't in 1.17, with what it was replaced? (where could I check)

hardy swan
wraith rapids
#

it is, the package just changed

quaint mantle
wraith rapids
#

search for PacketPlayOut with the search function in this discord and you will find 200 other people asking the same question

#

and also an answer, probably

cosmic fjord
#

How can I set the head of a player to an item named profile? I know how to set the displayname of the item but I dont know how to set the texture to the players head

narrow vessel
torn shuttle
#

anyone know off the top of their heads what the default downwards vector is

#

was it 7 or smth

#

hang on can't be 7

wraith rapids
#

0.09 or something? i don't remember

hardy swan
#

but wasn't shown in stack trace

#

think it is sth about an anonymous class

#

is there a way for plugin loader to ignore anonymous classes onEnable other than using reflection?

torn shuttle
#

fucking lmao

#

way too much pepper

#

let's try that again

echo saddle
#

@worldly ingot Is it possible to support maven toolchains so we don't have to make a systemwide dependency on java 16 just to manually build spigot?

#

something like

#
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-toolchains-plugin</artifactId>
    <version>1.1</version>
    <executions>
      <execution>
        <goals>
          <goal>toolchain</goal>
        </goals>
      </execution>
    </executions>
    <configuration>
      <toolchains>
        <jdk>
          <version>1.16</version>
          <vendor>openjdk</vendor>
        </jdk>
      </toolchains>
    </configuration>
  </plugin>```
#

that way can define the toolchains in toolchain.xml in the .m2 folder and allow maven projects to use different jvms?

royal hawk
#

Who understand how deobf Paramorphism?

echo saddle
#

this java 1.16 stuff is wreaking havoc on my jenkins server

lean gull
#

(tell me what code you need, if you need any)

opal juniper
#

Your config.yml is not in the jar

#

@lean gull

echo saddle
#

suppose i could set JAVA_HOME in the environment

jagged monolith
lean gull
#

this is my code tho, isn't it supposed to create the config?

public class Main extends JavaPlugin {
    private static Plugin instance;

    @Override
    public void onEnable() {
        instance = this;

        ChatColorFunction command = new ChatColorFunction();
        getCommand("chatcolor").setExecutor(new ChatColorFunction());

        configSet();

        }

    public void configSet() {
        this.saveDefaultConfig();
        if (this.getConfig().isSet("chat-color")) {
            this.getConfig().set("chat-color", true);

        }
    }```
#

well i mean it's a part of my code

jagged monolith
#

Have you added the config.yml to the resources folder. For the project.

dusk flicker
#

dont use 'Plugin' (or JavaPlugin) for instances, use your actual class in your case "Main"

lean gull
#

so, this? private static Main instance;

opal juniper
#

yep

lean gull
#

ok, what about the config problem

#

i was just following the spigot tutorial

jagged monolith
tardy delta
#

saveDefaultConfig would create the folder right?

lean gull
#

what's dependency injection

dusk flicker
lean gull
opal juniper
#

so instead of checking that something is set, just use a default
getConfig().addDefault("chat-color", "#a1ffb0");
then call
saveDefaultConfig();
after you have added all the defaults

#

then saveConfig();

#

and reloadConfig();

lean gull
#

i'm confused

#

what's addDefault

opal juniper
#
    public void configSet() {
        getConfig().addDefault("chat-color", "#a1ffb0");
        saveDefaultConfig();
        saveConfig();
        reloadConfig();
    }
jagged monolith
#

Adds a default value to the file.

opal juniper
#

like that ^^

tardy delta
#

tAkE a LoOk At ThE aPi

undone axleBOT
#

Spoonfeed a newbie for a day and they'll come back with more questions. Teach them to find their own answers and you'll both be better off: you won't get stuck answering the easy questions and they'll be much more productive than before.

opal juniper
lean gull
dusk flicker
#

then stop spoonfeeding him even more

tardy delta
#

i like spoons ๐Ÿ™‰

opal juniper
#

Sorry - but i was there once and i hated it when people just gave ellusive hints at the idea

#

I teach how i like to be taught

lean gull
#

smort

opal juniper
#

if you add a default it will add the value if it doesn't already exist but if it does it just doesn't do anything

#

it basically combines checking it is set and setting it in one method

lean gull
#

how do i just add a label doe

opal juniper
#

its a method under config options iirc

lean gull
#

i want to add the label if it's not set and then add sub-labels with values later

lean gull
#

not sure what i'm supposed to do with this doe

opal juniper
#

read it pepeDS

lean gull
#

yeah i have no clue

#

there's nothing here about setting stuff in the config

opal juniper
#

Well - what are you trying to do

lean gull
#

also what's header

opal juniper
#

The comment

lean gull
#

i'm tryna make a chat color thing

#

i asked for a simple challenge in #general and apparently that wasn't simple enough

#

cause i have no clue what i'm doin

#

๐Ÿ˜ƒ

opal juniper
#

Ok - so what is the chatcolour thing doing?

#

changing the colour of all chat messages?

lean gull
#

well multiple colors is too hard for me so i'm just doing a toggle thing for red chat color

#

no it's per person

#

so i wanna set a sub-label in chat-color in config to true, or delete it

#

and then read from it on AsyncPlayerChatEvent

clear fable
#

Hey guys I am trying to make clickable links in chat. This is the code I have:

TextComponent link = new TextComponent("<my link>");
link.setColor(ChatColor.GOLD);

BaseComponent[] linkHover = new ComponentBuilder()
    .append("Click to go to ")
        .color(ChatColor.GRAY)
    .append("https://<my link>")
        .color(ChatColor.BLUE)
        .underlined(true)
    .create();
link.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, linkHover));
link.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "<my link>"));

but my IDE says that the HoverEvent constructor is deprecated. This was the only thing I could find online so I was just wondering what the "correct" way to do this would be. Thanks

opal juniper
#

i mean the hover event constructor works fine for me

#

i am using it in my project rn

clear fable
#

ye it works but its deprecated

#

how can I use the non depecated version?

opal juniper
#

no - it isn't deprecated for me

clear fable
opal juniper
#

oh i know what it is

clear fable
opal juniper
#

the second arg is not just a string

clear fable
#

ye i need it to be more formatted text

opal juniper
#

new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text("Hello"))

clear fable
#

ah

#

how can I use custom hex colors there?

opal juniper
#

use the bungee chatcolour of() method

clear fable
#

ok

lean gull
#

i think you can do &x&F&F&F&F&F&F

clear fable
#

is there a java equivalent of the javasript

`${/* insert a varible right into a string */}`
tardy delta
#

ChatColor.translatetoAlternateColors('&', "&fText to translate") ?

#

String.format?

#

or printf

opal juniper
tardy delta
#

oh idk

clear fable
#

._.

opal juniper
#

There ya go ^^

clear fable
#

welp ok

hardy swan
#

concating is as good

lean gull
#

i still need help btw

tardy delta
#

:/

lean gull
#

wait no

#

oh nvm it is that

tardy delta
#

did you make a config.yml?

lean gull
#

i don't understand

lean gull
hardy swan
#

i think you prob should not touch config files at this stage yet

tardy delta
#

you have to create it yourself

#

a default one

#

and then your code adds something to it

lean gull
#

i don't understand, sorry

#

the tutorial was pretty straight forward, idk why this isn't working

hardy swan
#

@lean gull i think you shouldn't touch conf files, unless you have pretty good knowledge of maven

lean gull
#

maven? wat dat

hardy swan
#

or the build tool that you are using

lean gull
#

what's a build tool

hardy swan
#

even after you create the yml file, you need to know how to include it in your final jar

lean gull
#

what's a final jar

#

i started a few days ago

tardy delta
#

๐Ÿคฆโ€โ™‚๏ธ

#

just watch the codedred series or something they're pretty awesome

lean gull
#

i did watch a bukkit tutorial series

tardy delta
#

but you definitly need java knowledge to start coding

lean gull
#

i also watched a java tutorial and i'm learning with codeacademy

#

i would appreatiate if you would stop saying "you can't do this at this stage" or "learn java"

#

because i am trying my hardest

tardy delta
#

๐Ÿ™‰

clear fable
#

do they need to all be uppercase?

lean gull
#

i dunno

#

there's probably somethin on google

hardy swan
lean gull
#

i didn't know chat color can be this hard

hardy swan
#

it will greatly accelerate your learning

tardy delta
clear fable
#

custom hex chat colors

lean gull
tardy delta
#

on a hoverEvent?

clear fable
#

yes

#

with &

#

and translateAlternateColorCodes

#

let me try ChatColor.of()

ornate hollow
#

Is ther an event that gets triggered when players econmy gets updated

#

Like for vault

tardy delta
#

i did it like this

TextComponent message = new TextComponent("Discord");
        message.setColor(ChatColor.DARK_PURPLE);
        message.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://discord.gg/"));
        message.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text("Click HERE to get a link to ")));

instead of enum ChatCOlor you could use something else

chrome beacon
#

He does not. And he refuses any Java tutorials

clear fable
#

im trying to use translateAlternateColorCodes

hardy swan
clear fable
#

fuck it i'll just go back to the ComponentBuilder

ornate hollow
hardy swan
ornate hollow
#

So i am like stuck

#

it links me to some very undocumented library hahahaha

#

Well let me explain why i need it in the first place

#

so maybe you can give me an advice

#

I need to send a post request to my backend api, that will then display/update that balance on peoples linked with outh discord proffiles when they are on the server (the part when they are on the server is done, its a post request with uuid in the path, already used for join leave notifications on discord and whatsoever)

#

so i just want to avoid a bukkit runnable that loops all the time for all players, that is like super super bad worarround

#

"loops" means its timed for example on every 10000 ticks

#

So looping is my best bet i suppose then hahhahaha

unreal quartz
#

it's the only way you can check for changes to players balances

#

plugins such as essentials provide an event for balance changes, but there isn't one in vault itself (which is very annoying)

#

if you want full compatibility then you'll have to compare balances before/after time to see if there is a change

last oriole
#

Heyo

#

Is there a way to disable minecrafts join and leave messages

lean gull
#

anyone know why this sends an internal error? (pls no spoonfeeds, but explanations would be nice)

        if (Main.chatColorHashMap.containsKey(uuid)) {
            Main.chatColorHashMap.put(uuid.toString(), null);;
            player.sendMessage("true");
        } else {
            Main.chatColorHashMap.put(uuid.toString(), "&c");
            player.sendMessage("false");
        }```
humble stirrup
#

where is the error

#

also lots of nulls

lean gull
#

it's internal error

humble stirrup
#

also static abuse

summer scroll
#

How can I hide this?

unreal quartz
#

yes, it spits that error into your console

humble stirrup
#

yeah that doesnt mean a lot

unreal quartz
lean gull
unreal quartz
#

f3*

#

lol

summer scroll
#

oh thanks lol

#

i've been trying to add all item flags

lean gull
#

it's client-side doe

summer scroll
#

yup, i didn't know until now

opal juniper
#

Anyone know like a head database api that does't require a Plugin API - maybe just an api?

hardy swan
#

Best bet is to write the method yourself tbh

unreal quartz
#

steal their database and add it to yours

opal juniper
#

It isn't public afaik

opal juniper
unreal quartz
#

what does it do

#

is it just a wrapper for mojangs skin api

opal juniper
#

nah

unreal quartz
#

because you can just write one yourself

opal juniper
echo saddle
#

is the NMS code no longer under a version specific container?

hardy swan
#

Yes

#

No longer

unreal quartz
#
        try {
            ItemStack item = api.getItemHead("7129");
            getLogger().info(api.getItemID(item));
        } catch (NullPointerException nullPointerException) {
            getLogger().info("Could not find the head you were looking for");
        }```
catching an npe? hmm
opal juniper
#

WAIT WHAT

#

it isn't??

hardy swan
#

Yea

unreal quartz
#

not quite sure how that's more beneficial than just making a web request for MHF_IronGolem or somethign like that

hardy swan
#

It is not net.minecraft.network.sth

opal juniper
#

admittedly i avoid nms like a plague

echo saddle
#

isn't that going to break a lot of stuff needed for multi-version plugins?

lean gull
#

i still need help btw

opal juniper
dusk flicker
#

Wait are you saying nms doesn't have like 1_17_R1 or whatever????

unreal quartz
lean gull
#

i told you, internal error

hardy swan
unreal quartz
#

it spits an error to your console

echo saddle
#

yeh, no v1_17_R1 folder in the namespace

lean gull
#

oh that thing

#

1 sec

dusk flicker
#

That's awesome

unreal quartz
#

it's a giant stacktrace you can't miss it

opal juniper
echo saddle
#

yeh, so seems like that will completely break any ability to have multiple spigot NMS in a plugin

young knoll
#

Nah

#

Craftbukkit still has the version string in the package

lean gull
lean gull
#

das the error

chrome beacon
hardy swan
#

1.17+ nms prob stays unversioned

young knoll
#

So stuff like

        return Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
    }``` still works
chrome beacon
#

?paste ;/

undone axleBOT
hardy swan
#

oops

#

sry

unreal quartz
echo saddle
#

oh, so saying that it's not needed and you can still use interface to access multiple versions

young knoll
#

Yes, as I said it still works

unreal quartz
#

ah, i interpreted it as a question

echo saddle
#

well then, less customizing each NMS file

lean gull
unreal quartz
#

you've been told

#

it tells you the error

last oriole
lean gull
#

it's not null doe

unreal quartz
lean gull
#
public static HashMap<String, String> chatColorHashMap;```
unreal quartz
#

that is null if you don't assign it

young knoll
#

That is null

hardy swan
#

lemme guess right now

wet breach
hardy swan
#

You didn't initialize it with new HashMap<>();

last oriole
echo saddle
#

meta-inf?

last oriole
#

are these texts used to put in a jar file or sumn?

unreal quartz
#

uh sure

echo saddle
#

tbh, haven't been here over the last year

wet breach
#

@echo saddle yes in the meta-inf directory in the jar, the server version and stuff gets put there

lean gull
#

fixed it but now it's broken

unreal quartz
#

then it's not fixed lol

last oriole
#

can yall link me a good video so i can implement this thing pls

hardy swan
#

the first reaction of it being broken should not be this channel dear

lean gull
#

no i mean i fixed that error but now something else is broken

echo saddle
#

specified or populated?

hardy swan
#

yes

unreal quartz
lean gull
#

1 sec i wanna see i if i can fix it alone

hardy swan
unreal quartz
last oriole
#

if i can implement it without a third party plugin itd be amazing

unreal quartz
#

well if u wanna learn to code

#

?learnjava

undone axleBOT
hardy swan
#

jawaa

last oriole
#

๐Ÿ˜ฉ

#

i guess i gotta learn a programming language now

unreal quartz
#

well that is typically how you code

hardy swan
#

last one best, 100% recommend

lean gull
#

ayo i fixed it bymself

unreal quartz
#

nice

hardy swan
#

guys, can I ask if there is a method in the main JavaPlugin class that contains an anonymous or inner class extending a class not found in runtime, will the server just throw an exception on enable? Even when the method is not called on enable

unreal quartz
#

if i understand your question correctly then yes

#

it will not work

hardy swan
#

rip

#

ok thx

last oriole
#

where would u normally put this code in

unreal quartz
#

in a java file

quaint mantle
last oriole
#

๐Ÿ˜ญ

last oriole
#

does that work?!

quaint mantle
#

Please help me :c

unreal quartz
#

also explain how it doesn't work

unreal quartz
quaint mantle
unreal quartz
#

as i said, if you want to write a plugin

#

?learnjava

undone axleBOT
hardy swan
quaint mantle
#

It dosen`T repair the item, it makes taht the items stays in your inventory with out break, but you have to do everything with your hand.

last oriole
#

thank u guys

#

i appreciate โ™ฅ

quaint mantle
#

But when i try to setDamag, idk there isn?T that :c

young knoll
#

Did you cast your meta to Damageable

quaint mantle
#

And getItemInHand also dosen`T work :c

#

Idk what you mean :c

unreal quartz
#

again 'doesn't work' isn't very descriptive

#

the method you're probably looking for ia getItemInMainHand

#

players have two hands now

hardy swan
#

does getItemInHand() return a copy or the item itself?

quaint mantle
young knoll
#

getItemInHand was deprecated in 1.9

#

?learnjava

undone axleBOT
quaint mantle
hardy swan
#

get equipment or inventory i forgot

wet breach
#

and for its updated equivalent methods, the same is true

young knoll
#

Itโ€™s equipment

hardy swan
quaint mantle
#

Idkkkk

hardy swan
#

OHHH, no wonder

#

I somehow remembered the doc saying return a copy

quaint mantle
#

Ok :C

I will try to do something else, maybe this is to complex O:

hardy swan
#

but I was pretty sure it at least only return a shallow copy