#help-development

1 messages ยท Page 141 of 1

eternal night
#

but like

#

don't

fluid river
#

for snakeYaml

eternal night
#

its perfectly fine to use

fluid river
#

which i don't know anything about

eternal night
#

whatever usecase you have for yaml should be doable with YamlConfiguration

#

anything you cannot do usually should not live in a yaml file in the first place

fluid river
#

yeah, @boreal seal

tender shard
#

SnakeYaml is basically the same as YamlConfiguration, except that everything is either the primitive type, or a Map<String,Object> :3

fluid river
#

Do you really need SnakeYaml

#

not just yamlconfiguration made by bukkit

tender shard
#

YamlConfiguration is obviously better than SnakeYaml

fluid river
#

someday would take a look at it's github

#

What do you need help with

#

you can ask it here, there's no real need to dm only me

tender shard
#

YamlConfiguration has convenience features like getString(...), getInteger(...) etc. In SnakeYaml, everything is just an Object. It's basically simply a Map<String,Object>

fluid river
#

? extends Cringe

#

? super Based

tender shard
#

getConversation(...)

#

lol

fluid river
#

setupConversation()

tender shard
#

btw why does nobody know about the COnversationAPI in bukkit

#

it's so useful

fluid river
#

startConversation()

#

I never used it and never needed

tender shard
#

it's awesome if you just want to get some user input

#

or e.g. for NPC dialogues

fluid river
#

well most of my plugins were one line of input

#

just a command

tender shard
#

yeah ok

fluid river
#

maybe someday i would try it

#

Doesn't snakeyaml hide InputStream inside?

#

yeah basically it does

#

just looked it up

#

This way can write own yaml parser

reef lagoon
#

Why is this not setting the pdc

fluid river
#

and add ConfigChangeEvent to API

fluid river
tender shard
fluid river
#

looks normal

reef lagoon
#

Maybe the problem is with how I get it?

tender shard
#

maybe, show your "get" code pls

reef lagoon
#

dont laugh

#

Nah it does execute

tender shard
#

"key" is the same thing?

reef lagoon
#

yes

tender shard
#

do /data get entity Wihy BukkitValues and see if it shows up there after setting it

#

why do you even ask this

#

yes, I'm gay

#

why?

#

next time just look at my profile and you'll see it instantly

fluid river
#

Yeah we all came through that

#

don't worry

tender shard
#

if you see this, you can be sure that those people are gay

reef lagoon
#

get is wrong then (๐Ÿคฏ)

tender shard
fluid river
tender shard
#

in spigot, no

fluid river
#

shouldn't you specify PersistentDataType too

#

as a second argument

fluid river
tender shard
#

paper has a .has(NamespacedKey) method. Spigot doesnt

#

let's not discuss my sexuality here

fluid river
#

unless you start gay parades

#

for no reason

reef lagoon
#

ye im using paper

tender shard
#

if anyone wants to discuss my sexuality here, feel free to do so in my DMs

#

kk

fluid river
tender shard
#

thanks for sharing this totally useful information

fluid river
#

ahahahah

#

are you triggered

#

by this

tender shard
#

it's okay

#

but now you've shared it

reef lagoon
fluid river
#

cya?

#

@boreal seal , i'm gonna be home in like 15 minutes

#

i'm on a bus rn

#

going back home from university

#

when i get back i will probably dm you

#

if i don't dm me yourself then ๐Ÿ™‚

#

no

#

i have a nice girlfriend i love

tender shard
#

why do you have such an obsession in knowing whether anyone is gay

fluid river
#

ahahahahah

#

just ignore it mfnalex

grim ice
#

im sorry but theres no way you have a wife

#

wtf is this chat

#

๐Ÿ’€

tender shard
reef lagoon
#

this always returns null for some reason, even when the player has the specific pdc

tender shard
reef lagoon
tender shard
#

not being hetero is totally okay

grim ice
tender shard
# reef lagoon yes

do getPersistentDataContainer().getKeys() and loop over it, see if that at least returns the key of whatever you set

jaunty crag
#

can you explain in furthur detail?

grim ice
#

๐Ÿ’€

#

is thi a serious conversation

vocal cloud
#

Take it to general sheesh

fluid river
#

ahahahah

#

guys coming to sexual discussions

#

like flies to sheeeead

tender shard
#

yeah I also don't get it

#

I also go off topic in this channel very often but this whole discussion is so pointless haha

fluid river
#

just let us discuss what we want ahaha

#

guy is really afraid

twilit bear
fluid river
#

Gonna continue discussing โค๏ธ

tender shard
#

idk why my profile pic always causes so much discussions haha

reef lagoon
#

yo mfnalex, is that what you meant? does this get the value of the key?

tender shard
#

you should also print it out

reef lagoon
#

ye just making sure

tender shard
#

sth like this:

#
for(NamespacedKey key : data.getKeys()) {
  System.out.println(key);
}
#

this should at least print out the key of the data you wanna get

reef lagoon
#

how do I get the value tho

tender shard
#

with get(key, PersistentDataType.STRING)

reef lagoon
#

a okay

#

ty

serene sigil
#

hi, idk why but the displayname wont show up

tender shard
tender shard
#
ItemMeta meta = myItem.getItemMeta();
// Now change the meta
myItem.setItemMeta(meta); // <-- this line
#

the last line

reef lagoon
#

ayee it works

tender shard
#

oh wait I'm stupid, you DID do setItemMeta

#

I didnt see that

serene sigil
#

lol

tender shard
#

yeah sorry

#

I havent seen that

serene sigil
#

its ok

tender shard
#

hmmm

#

oh wait

#

but you add the recipe before you updated the meta

#

you have to update the meta BEFORE passing that itemstack into the recipe thing

serene sigil
#

oh okay

hazy parrot
#

Anyone have idea what is placeholder for parameter in spigot logger, because log4j's {} doesn't seem to work ?

tender shard
#

wdym

serene sigil
#

like this?

tender shard
serene sigil
#

alr tysm

tender shard
#

np

hazy parrot
tender shard
#

where did you get that .info(...) method from?

hazy parrot
#

logger

tender shard
#

you cannot use it there IIRC

#

you have to format this stuff yourself

#

the .info and .warn methods etc just take a String array and log every line as you passed it, iirc

hazy parrot
#

it isn't standard logger scheme then

serene sigil
serene sigil
hazy parrot
tender shard
serene sigil
tender shard
#

why do you need a lore for dropped items anyway, I wonder?

serene sigil
#

like this?

tender shard
#

yes, where "lore" is a List<String>

#

but I wonder why you need to set for only dropped items

eternal oxide
#

meta is a clone

tender shard
#

noone will see it

#

yeah ofc you should "save" that object

hazy parrot
tender shard
hazy parrot
tender shard
#

oooh I see

hazy parrot
tender shard
#

yeah that should indeed replace it, but probably you gotta use %s and not {} although tbh I'm not sure

hazy parrot
serene sigil
hazy parrot
#

{0} for example

tender shard
tender shard
serene sigil
#

so would this work?

tender shard
#

no

#

you forgot to set the meta back

hazy parrot
tender shard
#
  1. get the meta
  2. change it
  3. set it back
#

otherwise it will not get applied to the item

tender shard
#

that's why everyone went insane last year ahaha

hazy parrot
#

yap, figured it rn ๐Ÿ˜„

fluid river
#

@boreal seal

#

vc

serene sigil
tender shard
fluid river
#

learnjava

#

the only way to do it really

serene sigil
tender shard
eternal oxide
#

getItemMeta() always returns a clone of the actual meta. So you need to get it, change it and set it back on the item.

tender shard
#

yeah

serene sigil
#

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

tender shard
eternal oxide
#

yep ๐Ÿ™‚

serene sigil
#

found it out

tender shard
#

haha oki

#

hm nooo

eternal oxide
#

no

tender shard
#

nooo

serene sigil
#

?

tender shard
#

like this:

eternal oxide
#

remember every time you call getItemMeta() you get a copy of the original

serene sigil
#

oh

tender shard
#
ItemMeta meta = EggTracker.EggTracker.getItemMeta();
meta.setLore(...);
EggTracker.EggTracker.setItemMeta(meta);
#

like this ^

serene sigil
#

oh so u have to create a new Itemmeta every time?

tender shard
#

kinda, yeah

serene sigil
#

alr

eternal oxide
#

IT always creates a new one, you have to store it so you have it to put back

tender shard
#

unless you wanna change many things at once

serene sigil
tender shard
#

you can also do it like this:

#
ItemMeta meta = myItem.getItemMeta();
meta.changeFirstThing();
meta.changeSecondThing();
meta.changeThirdThing();
// etc
myItem.setItemMeta(meta);
#

this e.g. would also work

serene sigil
#

it still doesnt work for some reason tho...

tender shard
#

hm yeah you should really take a look at ?learnjava

#

?learnjava

undone axleBOT
fluid river
tender shard
#

your variable scopes makes no sense at all

fluid river
#

what is EggTracker.EggTracker

tender shard
#

it's an itemstack

fluid river
#

why is it static

fluid river
#

not itemstack

#

)))

agile zenith
#

tbh didnt we all start like this

tender shard
#

yeah it doesnt make much sense, and why is the lore list a class field

grim ice
#

btw

tender shard
fluid river
grim ice
#

cant u just like

#

extend an itemstack

#

or is that illegal

fluid river
#

legal but why

tender shard
grim ice
#

Ahh

#

i see

tender shard
#

CraftItemStack

fluid river
#

you would need a method to transfer your subclass back to itemstack

serene sigil
#

i dont understand

tender shard
#

is a class that "implements" ItemStack

serene sigil
#

what did i do wrong?

fluid river
#

everything

tender shard
#

"everything" is bullshit

fluid river
#

What is EggTracker.EggTracker

#

is that some kind of floating item

tender shard
#

but you should really read one of those things FULLY please:

#

?learnjava

undone axleBOT
agile zenith
#

sheeeesh, mean!

tender shard
#

she didnt do EVERYTHING wrong, she did SOME things wrong

serene sigil
tender shard
#

but it's hard to explain if she doesnt read one of those java tutorials fully

serene sigil
#

and EggTracker is the custom itemstack

fluid river
#

I mean he messed up the idea

#

so code is bullshit by default

fluid river
#

even if it's beautiful or smth

tender shard
serene sigil
#

oh nvm lol

tender shard
#

wait no

#

I didnt confused you

#

you have "she/her" in your bio haha

#

so that's why I used "she"

serene sigil
#

thats a joke ๐Ÿ’€

fluid river
#

fat troller

tender shard
#

ugh yeah

serene sigil
#

anyways...

tender shard
#

?learnjava!

undone axleBOT
serene sigil
#

so why is that wrong?

tender shard
#

because it violates the general idea of OOP

#

all of those tutorials linked above will explain it

fluid river
#

you change meta of static itemstack field eggtracker

jagged quail
#

Yes

fluid river
#

but like what is this and how do you check if it's working or not

#

do you give it to some player or what?

tender shard
serene sigil
#

so u are saying that i should change the itemstack to be non-static?

tender shard
#

that depends on whether you want all those items to have the same lore, or not

serene sigil
#

well, im only creating one custom item so yes?

tender shard
#

no, you create many amounts of custom items, and you want to give them a specific lore thats different everytime, or did I understand this wrong?

#

if my above statement is true, then your item should not be static. but just removing the "static" keyword will not fix this either. you should read one of those java tutorials I've linked

fluid river
#

just say what are you trying to code

#

full idea

#

we don't understand anything

serene sigil
fluid river
fluid river
#

it's drop

#

entity

tender shard
tender shard
fluid river
#

he tries to change some random itemstack

#

not given by this getter

serene sigil
tender shard
#

yes, you do

fluid river
#

yes

serene sigil
#

okay fine, this is what i wanted to do:

fluid river
#

finally

#

โค๏ธ

serene sigil
#

check if the item u dropped is the custom item and if so giving it the lore

fluid river
#

so basically

#

listener of drop event

#

in which you get item related to this event

fluid river
#

use getItemStack getter

#

and change this itemstack's meta

#

actually check if it has PDC or smth similar

quaint mantle
#

Anyone have a example of a good custom prison enchant?

fluid river
#

to make sure it's custom item

quaint mantle
#

My system kinda laggy ๐Ÿ˜ข

tender shard
fluid river
#

you know TVs

quaint mantle
#

Idk

fluid river
#

magical

quaint mantle
#

Looping many blocks at once

fluid river
#

Magic-powered coolers

quaint mantle
#

It lags a bit, even on a different thread

tender shard
#

I mean

#

wtf is a prison enchant

quaint mantle
#

It just breaks lots of blocks

#

Like thousands

fluid river
#

why is it called prison lol

quaint mantle
#

So looping the blocks then settjng them to air

tender shard
quaint mantle
fluid river
#

ofc ofc

#

use FAWE api

tender shard
#

breaking thousands of blocks is no problem at all

quaint mantle
#

The docs on fawe are ass

tender shard
#

it will only cause troubles if you wanna break hundreds of thousands of blocks

fluid river
#

then just make a better loop

#

which is not so laggy

#

show us what you have now

quaint mantle
#

Well some people say, use multiple threads

fluid river
#

yes true

quaint mantle
#

So like fawe

fluid river
#

separating maths from main thread is nice

quaint mantle
tender shard
fluid river
#

he can separate maths

#

and then run sync break task

quaint mantle
#

^

fluid river
#

on complete set of blocks

quaint mantle
#

Yeah, i do that

tender shard
fluid river
#

if server can't handle it, try making block break stages, so it's less heavy for 1 tick

quaint mantle
#

I'll check it out

tender shard
#

try it

#

but probably, no, this will never work

#

because you keep refusing to read the turorials I've sent

#

your == thing is already causing it to not work

fluid river
#

better do isSimilar

#

or equals at least

serene sigil
fluid river
#

Cuz it compaers classes

tender shard
fluid river
#

they are both itemstacks

tender shard
#

?learnjava

undone axleBOT
serene sigil
tender shard
#

in 99% of cases, you should NEVER use == for objects unless you know what you're doing

serene sigil
#

yea i forgor that

fluid river
#

hashcodes*

#

they have different adresses in memory

fluid river
#

so you will never get TRUE

#

on this comparison

#

messed it up with object's equals

tender shard
#

and they will always be the same object

#

ItemStacks however arent

kindred valley
#

?paste

undone axleBOT
flint coyote
#

We had a huge discussion here because someone was like "NO YOU SHOULD USE equals() FOR ENUMS" lol

visual tide
#

wut

flint coyote
#

And then proceeded to ask for a reason why you would not go "standard" way.

tender shard
flint coyote
#

Yeah we told him. He said that's not a reason. Whatever. I told him everyone can do it however they like.

tender shard
#

that's always a good answer

#

๐Ÿ˜„

fluid river
#

well calling .equals() which calls == is more complex and slow

#

than just ==

flint coyote
flint coyote
tender shard
fluid river
#

java has no inline, it's not c++

#

well basically maybe in bytecode it's true

tender shard
fluid river
#

idk if compiler handles it like this

flint coyote
#

Yeah idk either. I would guess the compiler would replace it.

fluid river
#

but it will take more time to write

#

easy

tender shard
flint coyote
fluid river
#

i read that java actually has inline, but only on compiler level

flint coyote
#

(or not harmed without consent lol)

serene sigil
tender shard
fluid river
#

you really sure about that

tender shard
#

yes

#

equals is a method that could be overridden by any class

fluid river
#

i mean in bytecode with inline set it would be the same probably

serene sigil
fluid river
tender shard
#

no compiler will ever replace .equals with == in java

#

this will not happen

serene sigil
flint coyote
#

what if it's a smart compiler that notices whether .equals() would lead to the default implementation?

tender shard
#

then it might to that, but javac doesnt go that far

serene sigil
#

code so far

fluid river
#

actually commit this on JCP

tender shard
flint coyote
#

Also seems kinda overkill for that little overhead xD

fluid river
#

Maybe they would add this to java compiler

kindred valley
#

?paste

undone axleBOT
kindred valley
#

?paste

undone axleBOT
vivid skiff
#

How can i create commands automatically?

tender shard
#

ACF

#

editing the command map yourself

#

many ways

fluid river
flint coyote
#

I wonder what you mean by "automatically"

fluid river
#

java devs can add this easily

tender shard
vivid skiff
#

I can' t find a good explaination on how to use command maps or do this

flint coyote
serene sigil
tender shard
#

no you should finally read one of those tutorials:

#

?learnjava

undone axleBOT
fluid river
#

you change different itemstack

#

that's the problem

#

FREE JAVA LESSONS

checkmybio

kindred valley
fluid river
#

i was listening to 20 naruto openings through all this discussion

#

just realised it's already the last one playing

#

30 minutes passed instantly

tender shard
kindred valley
tender shard
#

no, you accept whatever gets passed into that method without validating whether it's null or not

fluid river
#

no you don't

#

where is custom_stack initialization

tender shard
#

somewhere, you do myClass.setMeta(someStack, someDisplayName, null, ... )

#

where "somewhere" is probably SmithingSetup line 73

wintry ibex
tender shard
wintry ibex
#
> Task :version-support1_12:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':version-support1_12:compileJava'.
> Could not resolve all files for configuration ':version-support1_12:compileClasspath'.
> Could not find org.spigotmc:spigot:1.12.2-R0.1-SNAPSHOT.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/org/spigotmc/spigot/1.12.2-R0.1-SNAPSHOT/maven-metadata.xml
       - https://repo.maven.apache.org/maven2/org/spigotmc/spigot/1.12.2-R0.1-SNAPSHOT/spigot-1.12.2-R0.1-SNAPSHOT.pom
       - file:/C:/Users/Nurisantoso/.m2/repository/org/spigotmc/spigot/1.12.2-R0.1-SNAPSHOT/maven-metadata.xml
       - file:/C:/Users/Nurisantoso/.m2/repository/org/spigotmc/spigot/1.12.2-R0.1-SNAPSHOT/spigot-1.12.2-R0.1-SNAPSHOT.pom
       - https://hub.spigotmc.org/nexus/content/repositories/snapshots/org/spigotmc/spigot/1.12.2-R0.1-SNAPSHOT/maven-metadata.xml
       - https://hub.spigotmc.org/nexus/content/repositories/snapshots/org/spigotmc/spigot/1.12.2-R0.1-SNAPSHOT/spigot-1.12.2-R0.1-SNAPSHOT.pom
       - https://oss.sonatype.org/content/repositories/snapshots/org/spigotmc/spigot/1.12.2-R0.1-SNAPSHOT/maven-metadata.xml
       - https://oss.sonatype.org/content/repositories/snapshots/org/spigotmc/spigot/1.12.2-R0.1-SNAPSHOT/spigot-1.12.2-R0.1-SNAPSHOT.pom
     Required by:
         project :version-support1_12

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 9s
3 actionable tasks: 1 executed, 2 up-to-date
#

that

kindred valley
tender shard
wintry ibex
#

no?

tender shard
#

you must do that

#

?bt

undone axleBOT
tender shard
#

download this, then run it with the following args:

#

--rev 1.12.2

wintry ibex
#

ok

kindred valley
fluid river
#

cuz where do you initailize custom_stack

#

where is the line you declare it

tender shard
#

it's a method parameter

fluid river
#

and where do you init it

tender shard
#

it gets passed into that method

hard nexus
#

How can I use the Bastighg dowload

tender shard
fluid river
#

oh i just saw

#

alr

#

Where do you call this method

#

and what do you pass inside

tender shard
fluid river
#

omaaagaaad

hard nexus
fluid river
#

extrasense

#

can you actually produce what's in this line

kindred valley
#

i pointed it

tender shard
fluid river
#

maybe you have 6th feeling

kindred valley
#

//

#

no wait

hard nexus
#

Ah ok

#

sorry

fluid river
#

CustomStack.getInstance("itemsadder:ruby_sword") returns null then

tender shard
kindred valley
#

but its not throwing that

fluid river
#

if it's null then it's null

#

your throw code is inaccurate probably

#

show it

#

at least

#

the code of CustomStack.getInstance(String)

civic wind
#

Its because the hyper tension between the satellite to the hexagonal hemisphere collides to make two dimensions which open up and create magnetic force which radiates and expands

kindred valley
#

let me try something

fluid river
#

causing his plugin to crash

civic wind
#

๐Ÿ˜‚๐Ÿ˜‚

fluid river
#

you know magnetic force is kinda strong when i do it

flint coyote
#

Must be the gamma rays always messing with the processor when running that code. Shouldn't cause a null pointer. Lets just get rid of the sun to fix that

fluid river
#

bro

#

show realization

tender shard
fluid river
#

of

#

getInstance(String)

fluid river
tender shard
flint coyote
fluid river
fluid river
civic wind
#

I tried pissing on it now my penis has caught fire

fluid river
#

now you are a woman

jaunty crag
#

are you able to color text with hex codes

tender shard
fluid river
tender shard
#

that sounds very incovenient

fluid river
#

many ways

civic wind
#

Did you just assume my gender

jaunty crag
fluid river
#

it's sex

tender shard
civic wind
#

๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚

tender shard
#

yes

#

but I dont like gender jokes

fluid river
#

my gender is Uh, summa-lumma, dooma-lumma

#

you assumin' I'm a human
What I gotta do to get it through to you? I'm superhuman
Innovative and I'm made of rubber so that anything you say is ricochetin' off of me and it'll glue to you and
I'm devastating, more than ever demonstrating
How to give a motherfuckin' audience a feeling like it's levitating
Never fading, and I know the haters are forever waiting
For the day that they can say I fell off, they'll be celebrating
'Cause I know the way to get 'em motivated
I make elevating music, you make elevator music

civic wind
#

Im a non binary gender fluid ostrich

jaunty crag
#

How can i get a players face as a buffered

tender shard
#

it's not funny to make fun of people who realized that their actual gender is different from their biological one

fluid river
#

Talk to th3Troller

#

developer of SkinsRestorer

jaunty crag
#

me?

fluid river
#

yeah

#

he was here on the server

jaunty crag
#

can i just like

#

ping them?

tender shard
fluid river
#

yeah

fluid river
#

cuz i can't see him

#

ah shiit

tender shard
#

didnt he get banned or sth

jaunty crag
fluid river
#

he was on PlaceholderAPI server

#

not on spigot

tender shard
jaunty crag
fluid river
#

Th3Tr0LLeR#6969

tender shard
fluid river
#

can add him and try to get answer

fluid river
#

just not in the main thread

jaunty crag
fluid river
#

cuz who knows what would happen

tender shard
fluid river
#

work around GameProfile class

tender shard
#

yeah but GameProfile is basically NMS

#

spigot meanwhile has this built in, wrapped into PlayerProfile

fluid river
#

alr

#

i don't give a shit

kindred valley
fluid river
#

never needed

flint coyote
# fluid river cuz who knows what would happen

The face will take control of the main thread and replace everyones face on the server with that one. Furthermore every block will then look like the downloaded face. Artificial Intelligence Faces are scary man. Secure your main thread.

fluid river
#

i like it

tender shard
#

me neither, the PlayerProfile API sucks

#

I also still go for GameProfile

fluid river
#

sadly it's blocked in russia

#

so i would not be able to use the money i get

severe marsh
#

/give @p skull 1 3 {display:{Name:"Pumpkin Spice Latte"},SkullOwner:{Id:"9aac9003-8d9b-461d-bcdd-1ffa7b24dc3a",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWQyZDM2NzQ3YmMzZTJjMzdkOTFmYWZlYjU2MjhjZDg4N2ZjZjU0ZWVkNDllY2Y3ZGRjNTRkMjAzMzYzMzNmMCJ9fX0="}]}}}

How can I make my skull command do the same? ^

fluid river
#

with trash devs who make download on main thread

#

basically add args

severe marsh
#

thanks

#

Does it work the same for 1.8.x?

tender shard
#

ooh haha no

#

it only works for 1.18+

#

for 1.8 you need reflection and the GameProfile class

flint coyote
#

You are in for some real pain on 1.8

severe marsh
tender shard
severe marsh
#

That's not really a valid reason, but whatever

serene sigil
fluid river
#

bye

serene sigil
#

lol

tender shard
#

it's not a valid reason to not know anything about stuff that was before I started to learn anything about it? o0

fluid river
#

you should take java lessons

serene sigil
#

yea

#

but i kina need this fixed quick

tender shard
#

1.8 is outdated & dead

hazy parrot
fluid river
#

sucks to be you then

#

we don't know what's wrong in your plugin

#

we only saw one class

serene sigil
#

alright...

tender shard
#

I think I'll finally block this roxy person now

serene sigil
#

?paste

undone axleBOT
fluid river
#

bro

#

that's mean

#

sooooo mean

tender shard
#

I've sent ?learnjava like 10 times

fluid river
#

soooooooooooooo mean

tender shard
#

and then there was also this weird quirk about making fun of people chosing a pronoun

#

idk this is enough now ahaha

fluid river
#

well basically if i know you are XY or XX i don't care about who you wish to be, sorry

#

not gonna call you war heli

#

or pirate

tender shard
#

e.g. in my DMs

fluid river
#

don't want to discuss this either

tender shard
#

kk

fluid river
#

alex

#

โค๏ธ

#

โค๏ธ

#

i love alex bf

#

i don't love alex

river oracle
#

Yall fucking wack as shit

tender shard
#

I dont love any of you guys

#

I only love Cazcez

serene sigil
tender shard
#

but he left this discord

fluid river
#

why me

river oracle
fluid river
#

ahah

#

evan

tender shard
#

and Y2K is cool too

fluid river
#

come to vc

#

you come to roxy

serene sigil
wind tulip
#

circling back to you on this, but the cancel method doesn't fire at all

agile zenith
#

say what

tender shard
wind tulip
#

never getting any messages

serene sigil
#

nvm i didnt block me

#

so @tender shard could u help me plz?

tender shard
serene sigil
#

or just any 1

river oracle
tender shard
wind tulip
#

๐Ÿฟ

eternal oxide
#

You're* ๐Ÿ™‚

tender shard
#

haha

serene sigil
river oracle
#

You monster

tender shard
#

Y2K and me are friends, we can insult each other as much as we want because we both know it's not serious โค๏ธ

river oracle
#

I w a s serious uwu

serene sigil
#

i mean this

tender shard
river oracle
#

๐Ÿ˜ณ optic is scarry

tender shard
#

haha IKR

river oracle
#

He should stay in #general

tender shard
#

optic is the only person I'm afraid of here

#

ahaha

serene sigil
tender shard
#

read the pinned message

serene sigil
tender shard
#

I sent you ?learnjava 10 times and all the time you refused to read it

serene sigil
#

well, im reading it rn

tender shard
#

if you think I'm a dickhead, at least discuss this in DMs with me instead of doing it here. Thank you & have a great day

serene sigil
#

dude whats wrong with u @tender shard

hasty prawn
#

Nothing is wrong with him

tender shard
#

I'm usually a nice person but you upset me a bit. But as said, we can discuss this in DMs, and not here, it's not the right place

vivid skiff
#

is possible to change the ==: Player directly to owner: [PlayerName] in a yaml custom config used for saving data

Actual file:

  Elite:
    owner:
      ==: Player
      name: Gurwi30```
serene sigil
tender shard
serene sigil
#

can we just stop plz?

vivid skiff
tender shard
kind hatch
eternal oxide
#

and why the heck are you dumping Player objects to a config?

serene sigil
#

idk how it happened but we should just stop

onyx fjord
#

What's going on here

tender shard
vivid skiff
hasty prawn
#

If all you need is owner: [PlayerName] just config.set("owner", player.getName());

#

ta-da

eternal oxide
#

instead of creating an alias for somethign you should not be doing, perhaps do it correctly and stop pushing Players to the config

tender shard
#

second argument allows you to specify an "alias"

hasty prawn
#

Although ShadowMaster is right, you should store the UUID not the name

tender shard
#

yeah, storing names is always a shitty idea

#

always go for UUID when possible ๐Ÿ™‚

vivid skiff
#

I already changed it to uuid instead of player names

#

Thanks

serene sigil
onyx fjord
#

Or save both hehe

wintry ibex
#

how to change my java version

tender shard
onyx fjord
#

Or system wise

serene sigil
wintry ibex
#

i tryna running buildtools

tender shard
#

please just refrain from discussing your personal issues with me here and MOVE IT TO DMS!

onyx fjord
#

๐Ÿ™„๐Ÿค™

wind tulip
#

Okay can someone please help me with something rq
I'm trying to cancel an async task with an infinite loop inside, from outside it.
How do I go about this? Things I've tried:
Storing ids in a list, cancelling each one individually with BukkitTask#cancel(<id>)
Bukkit.getScheduler().cancelTasks(<plugin instance>)
Overriding cancel method of runnable to set a variable to true which would stop the inf loop (However the cancel method doesn't get called at all? what?)
Using a global scope boolean to cancel all runnables' loops (however I'd like to cancel them individually)

wind tulip
#

what

#

why

onyx fjord
#

So that you can access it outside

wintry ibex
#

*** The version you have requested to build requires Java versions between [Java 8, Java 10], but you are using Java 18 *** Please rerun BuildTools using an appropriate Java version. For obvious reasons outdated MC versions do not support Java versions that did not exist at their release.

wind tulip
#

I can just do that with Bukkit.getScheduler().getPendingTasks()

wintry ibex
#

oke

wind tulip
#

and I tried calling cancel using that but it doesn't call still

tender shard
onyx fjord
wind tulip
#

I don't need to, I'm tryna cancel all of them individually

tender shard
hasty prawn
#

Seems like a good solution to me

wind tulip
serene sigil
wintry ibex
#

what happened here

serene sigil
hasty prawn
#

Uhh, it should definitely be called

onyx fjord
#

If I have the same task for different player for example I store task ID in hasmap with uuid

#

Ez fix

#

U tryna cancel all tasks?

wind tulip
tender shard
hazy parrot
hasty prawn
undone axleBOT
serene sigil
wind tulip
#

ight

tender shard
#

although my DMs are normally open to everyone

wind tulip
#

currently I'm trying to cancel with

  public static void cancelTasks(){
    for(BukkitTask task : Bukkit.getScheduler().getPendingTasks())
      task.cancel();
  }
onyx fjord
#

Wdym generated

serene sigil
wind tulip
tender shard
onyx fjord
#

With what

wind tulip
#

my website

#

don't see how that's relevant

serene sigil
tender shard
#

โค๏ธ

kind hatch
hasty prawn
wind tulip
#

I mean I can try but just saying

kind hatch
tender shard
#

kinda, yeah

hasty prawn
#

Well it's not a repeating task though, so I'm not sure how it behaves with single tasks that don't end.

tender shard
#

I think everything that gets scheduled returns an int or a BukkitTask

#

but I might also be wrong

#

I'm wrong very often haha ๐Ÿ˜„

hasty prawn
#

You're right

#

runTaskAsynchronously returns a BukkitTask so saving that and manually calling cancel on it would probably work versus attempting to use cancelTask(int) or getPendingTasks

tender shard
#

^

hasty prawn
#

Since to Bukkit, that Task has been executed so it doesn't care to save it's ID or anything.

wind tulip
crimson terrace
#

its a god class!

hasty prawn
#

Where are you calling cancelTasks?

crimson terrace
#

love these things

wind tulip
#

oh you mean

#

oh I call it on a command

#

in another class

#

just for ease of use while testing

hasty prawn
#

So you re-join the server, it starts the task, and then when you execute the command nothing changes?

wind tulip
#

yep

hasty prawn
#

wat

wind tulip
#

I'm also broadcasting the amount of active tasks and it doesn't change

#
  Bukkit.broadcastMessage(Bukkit.getScheduler().getActiveWorkers().size() + "");
  DFPlugin.cancelTasks();  
  Bukkit.broadcastMessage(Bukkit.getScheduler().getActiveWorkers().size() + "");
#

like so

hasty prawn
#

My only guess is that cancel() is called on the same Thread as the BukkitTask then, and since it's focused on the while loop it never calls it...?

wind tulip
#

maybe

#

is there a way to just straight up set a variable that's inside a runnable from outside it

#

I'm guessing no

crimson terrace
#

atomic afaik

hasty prawn
#

You could if you made a custom runnable

#

Like a class that extends BukkitRunnable

wind tulip
#

actually what I could do is just store storage per runnable in a hashmap

#

then inside the uh

#

the conditional in the while loop

#

I could check for that variable

#

if that makes sense

hasty prawn
#

I mean you can try it I suppose

#

At this point anything is better than not working at all

wind tulip
#

I mean it has no reason not to work I was just looking for some syntactic sugar to cut down on new lines I have to generate

hasty prawn
#

I'm sure it'll find a reason not to work

civic wind
#

If the quantum array of the inter galatic particles conjoined together to form a multi dimensional coronary cavity then mars would be like jupiter and the force of the atom to the sun would multiply by 1000

hasty prawn
#

๐Ÿคฏ

fluid river
#

easy

tender shard
#

imma go to sleep now, have a nice day everyone โค๏ธ

#

thxxx

wintry ibex
#

goodbye alex

hasty prawn
#

gn mfnalex!

crimson terrace
#

good night ๐Ÿ˜„

wintry ibex
#

thanks for your help xD

kindred valley
wintry ibex
#

we are in different country

echo basalt
#

@lost matrix would you get mad if I made my own bootleg spark plugin to graph system performance on grafana ๐Ÿค”

wintry ibex
#

in here 21:05

echo basalt
#

Just make my crappy profiler

wintry ibex
#

yea

wind tulip
#

ok done

#

it works great

jaunty crag
#

can i send messages to players with the Color variable

hazy parrot
#

what

kind hatch
#

ChatColor#of()

jaunty crag
#

like can i send colored text but instead of using the color codes can i use the color variable java already has

eternal oxide
#

you use bukkit/spigot ChatColor constants

hasty prawn
eternal oxide
#

or ChatColor.of for hex

jaunty crag
#

how do i convert them

kind hatch
jaunty crag
#

yeah but thats for hex is it not

kind hatch
#

It takes both String and Color inputs.

jaunty crag
#

oh ok

#

thank you

jaunty crag
kind hatch
#

Make sure you are using the Bungee ChatColor class and not the Bukkit one.

jaunty crag
#

its depricated

kind hatch
#

It shouldn't be.
Are you importing net.md_5.bungee.api.ChatColor?

jaunty crag
#

yes

kind hatch
#

You sure your using #of() instead of #valueOf()? Because the latter is deprecated, while the former is not.

jaunty crag
#

im use of()

willow pike
#

Hey! I'm having trouble making a plugin. Here is what I want to do:
So, when a player right clicks with a stick it will show them an inventory. They can place items and when they open it again the items have stayed, but if they leave the items are gone.
I made the right click detection, but can anyone help me how to do the rest?

jaunty crag
hazy parrot
#

Why ChatColor isn't enum ๐Ÿค”

fluid river
#

why is @boreal seal banned

kind hatch
# jaunty crag im use of()

Well, you should be fine to use it. What version are you developing against? Cause the method isn't deprecated in the latest versions of the API?

jaunty crag
#

u mean spigot vers?

vivid skiff
#

To set the player uuid in a variable i have to use UUID playerUUID = player.getUniqueID(); ?

willow pike
hazy parrot
jaunty crag
#

package me.light.server.commands;

import me.light.server.Server;
import net.md_5.bungee.api.ChatColor;
import org.bukkit.Location;
import org.bukkit.Particle;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.util.Vector;

import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.URL;

public class HeadCommand implements CommandExecutor {

@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {

    if (!(sender instanceof Player)) return true;

    Player player = ((Player) sender).getPlayer();

    player.getInventory().setHelmet(player.getInventory().getItemInMainHand());

    BufferedImage image = null;
    try {
        URL url = new URL(player.getPlayerProfile().getTextures().getSkin().toString());
        image = ImageIO.read(url);
    } catch (IOException e) {
        e.printStackTrace();
    }

    //8,8
    //15,15

    player.sendMessage(ChatColor.of());






    return true;
}

}

kind hatch
# hazy parrot Why ChatColor isn't enum ๐Ÿค”

Same reason why Enchantments are no longer enums. Something about switching to a class format provided them more flexibility or something. Choco explained it once before, but I forgot the exact details. Probably had something to do with how the game changed internally.

jaunty crag
#

how

hazy parrot
jaunty crag
#

at the bottom

eternal oxide
#

lolplayer.sendMessage(ChatColor.of());

kind hatch
#

?paste is the other approach

undone axleBOT
eternal oxide
#

You passed nothign to it

jaunty crag
#

i havent yet

#

because i need to figure out the chatcolor stuff

#

wait

eternal oxide
#

then its not deprecated, its marked red because it's non existant

#

pass in a hex string or a color you said you already had

jaunty crag
#

player.sendMessage(ChatColor.of(new Color(image.getRGB(8,8))));

#

i get an error

hazy parrot
#

what Color is that

#

because of method is accepting awt color parameter

jaunty crag
#

what is awt

hazy parrot
#

java.awt.Color

jaunty crag
#

oh

#

let me check

kind hatch
jaunty crag
#

yup

#

player.sendMessage(ChatColor.of(new Color(image.getRGB(8,8))) + "");

#

now it works

vivid skiff
#

How can i get the gang name by giving the player uuid, checking in witch gang is the player

  test: <- Gang name
    owner: !!java.util.UUID 'bc10ad35-b7db-429b-91e9-21ddce92cddc' ```
kind hatch
#

Loop over #getConfigurationSection#getKeys(false)

#

Also, just save the UUID directly.

vivid skiff
kind hatch
#

#set("path.to.value", uuid.toString())

fluid river
#
fileConf.getConfigurationSection("gangs").getKeys(false).forEach(key -> {
    if (fileConf.getString("gangs." + key + ".owner").equals(formattedUUID)) {
        return key;
    }
});```
vivid skiff
iron glade
#

cause with that code you return test

iron glade
#

shuold return #getString("gangs." + key);

fluid river
#

why

#

he needs gang name

#

which is test

vivid skiff
# fluid river send your method

        getGangsData().getConfigurationSection("gangs").getKeys(false).forEach(key -> {
            if (getGangsData().getString("gangs." + key + ".owner").equals(playerUUID.toString())) {
                return key;
            }
        });

        return false;
    }```
fluid river
#

i'm basically returning it

#

why is it boolean lol

iron glade
#

ahh yeah though he hasn't added a name behind test:

vivid skiff
#

oh

fluid river
#

it should return String

iron glade
#

yeah yea then it's right

vivid skiff
#

i forgot

iron glade
#

also why this !!java.util.UUID 'bc10ad35-b7db-429b-91e9-21ddce92cddc'

vivid skiff
#

Sorry

fluid river
iron glade
#

yeah

fluid river
#

not UUID.toString()

vivid skiff
#

i changed it

iron glade
#

idk why he'd do that

vivid skiff
#

now is UUID.toString()

jaunty crag
#

can i use a custom font from a resource pack on plugins

kind hatch
#

Yes

jaunty crag
#

how

kind hatch
#

You just need to use the characters directly.

jaunty crag
#

ok

vivid skiff
iron glade
#

what are you returning?

#

that's your answer

vivid skiff
#

a string but putting string it gives me error either

iron glade
#

cause under it you return false

#

can't return 2 types

#

in this case

green prism
#

How can I send a message using MiniMessage format?

vivid skiff
# iron glade cause under it you return false

It should be like this?


        getGangsData().getConfigurationSection("gangs").getKeys(false).forEach(key -> {
            if (getGangsData().getString("gangs." + key + ".owner").equals(playerUUID.toString())) {
                return key;
            }
        });
        return null;
    }```
iron glade
green prism
kind hatch
#

It is, but you can use MiniMessage in spigot if you shade the library into your plugin.

green prism
#

How can I send a message to a player?

#

a single player

kind hatch
#

Use their API? I thought it was as simple as MiniMessage#sendFormattedMessage() or something like that.

green prism
#

I could do deserialize

kindred valley
#

Kotlin vs Cristiano Ronaldo

green prism
kindred valley
#

Kotlin shit af

kind hatch
#

Hmm, it looks like it's no longer a standalone library. Which kinda sucks. Maybe you could depend on adventure and exclude everything except minimessage.

grim ice
#

Wait

#

Evan was banned??

green prism
#

Can't send the Component obj

#

Nothing useful in the world wide web :C

kind hatch
#

What about MiniMessageSerializer?

green prism
#

here you go

#

<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-text-minimessage</artifactId>
<version>4.11.0</version>
</dependency>

kind hatch
green prism
jaunty crag
#

because i actually need to register the font when the text is typed

kind hatch
#

You should be able to so long as you provide the proper font file in your resource pack. You may want to take a look at how minecraft added the new Illager font to the game and use that as a reference.

jaunty crag
#

yeah but like how would i do that as a plugin

#

i know how tellraw works i just dont know how to add a font when typing on the server

jaunty crag
wind tulip
severe marsh
#

Why can't I use GameProfile class within 1.8.8 api version?

eternal oxide
#

Because it doesn;t exist in 1.8

severe marsh
eternal oxide
#

you asked about API. It doesn;t exist in the API in 1.8

#

I actually thought you asked about PlayerProifile, but same thing

severe marsh
#

So I can't use it or?

eternal oxide
#

well you can

#

but its not API

severe marsh
#

How can I access it then?

chrome beacon
#

nms

eternal oxide
#

You need the mojang auth lib

#

probably

severe marsh
#

okay, thanks

eternal oxide
#

Replace the version with whatever 1.8 usesxml <!--Mojang --> <dependency> <groupId>com.mojang</groupId> <artifactId>authlib</artifactId> <version>3.5.41</version> <scope>provided</scope> </dependency>

#

Repoxml <repository> <id>minecraft-repo</id> <url>https://libraries.minecraft.net/</url> </repository>

severe marsh
#

the version value?

eternal oxide
#

no

#

I've no clue what version 1.8 uses for authlib. Just change your dependency to spigot and not spigot-api

#

so long as you ran buildtools to create a 1.8 jar

severe marsh
#

Cool it's working, thank you

jaunty crag
#

how do i do languages in messages

#

i am trying to use negative space custom languages