#help-development

1 messages · Page 1046 of 1

young knoll
#

Why do you need the title

sacred mountain
#

crumbs

#

what did i do

#

whys nothing highlighted

#

:'(

#

schedule it like a tick later

#

idk

#

that's not a development problem

waxen parrot
#

server then?

sacred mountain
#

send it again

#

i'll still help

waxen parrot
#

(i'm really bad at explaining things, so forgive me) but could anyone possibly help me fix/update a few things? I have a command I use to protect spawn from mobs using command blocks, /teleport @e[type=!#cube_vanilla:spawn_safe,distance=..200] ~ ~-66 ~, and it's no longer working. Not sure what I have to update to get it to start working again.

#

lol

#

thank you

pseudo hazel
#

?notworking maybe?

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

pseudo hazel
#

like does it do nothing

sacred mountain
#

to those entities

waxen parrot
#

yes, i would send the picture but i cant

sacred mountain
#

do you want them to teleport downward

#

from their location

#

surely just kill them?

waxen parrot
#

yea

#

without it killing like players, block_displays, some friendly mobs, etc

sacred mountain
#

how are you adding this tag?

waxen parrot
#

i sent you it over pm

sacred mountain
#

because there is a difference between a type tag and a normal entity tag

#

ah

#

don't use

#

!#

#

that references a type tag

#

im fairly sure

waxen parrot
#

how should I use it then?

sacred mountain
#

surely this would work?

#

not too sure about how datapacks work, but if that doesnt work, try this:

waxen parrot
#

well, I teleport them because if it kills them, it'll drop the mob items on the ground, don't want that

sacred mountain
#

/kill @e[tag=!<whatever>,distance=..200]

sacred mountain
#

/execute at @e[type=!<whatever>,distance=..200] run data merge entity @s {DeathLootTable:"minecraft:empty"}

#

/kill @e[type=!<whatever>,distance=..200]

#

those 2 one after the other

carmine mica
#

I don't think that removes all possible drops. like equipment they might be wearing which isn't part of the loot table

waxen parrot
#

how would I add that into a function?

sacred mountain
#

/data merge entity @e[type=!<whatever>,distance..200] {ArmorItems:[{},{},{},{}],HandItems:[{},{}]}

carmine mica
#

also missing the new body item. idk if mobs can spawn with that

sacred mountain
#

the what

carmine mica
#

the new equipment slot for the body that isn't an armor slot or a hand slot

waxen parrot
#

I'm lost lol

carmine mica
#

did you figure out why teleport isn't working?

#

is it some other plugin overriding that command or smth?

#

cause teleporting them below the world is the best way to make sure there aren't any drops

sacred mountain
#

use /minecraft:tp

#

instead

#

to prevent overrides

#

but honestly like

waxen parrot
#

still teleports me below ground

sacred mountain
#

just prevent spawning

#

in that area

sacred mountain
carmine mica
#

oh wait, you are just going down 66 blocks?

#

that isn't enough to go below the world

waxen parrot
#

depends where you put the command block

carmine mica
#

the world is way bigger now

sacred mountain
#

the spawn is probably 66 above the void

carmine mica
#

just do like -4000

sacred mountain
#

no point, idk what the actual problem is

#

like why do you want to prevent mobs there

#

and what server

#

type

#

etc

#

do you have plugins or what

waxen parrot
#

I put the command block under the void anyways. (it's a private server) but vanilla

#

like 2-3

#

I'm doing away with votifier (used to do like awards and stuff my friends could trade with at spawn) but we're just gonna change it to a different item.

#

I have DiscordSRV, and a keep inventory toggle.

sacred mountain
#

that's not vanilla

waxen parrot
#

We've always wanted to go public, but we don't have anyone smart enough for that lol

#

semi-vanilla

sacred mountain
#

what server software

#

spigot i assume

waxen parrot
#

Paper-spigot yea

sacred mountain
#

just install worldguard

waxen parrot
#

ew

sacred mountain
#

...?

#

why is that

#

what's even wrong with that lol

#

just create a spawn region and disallow mob spawns

waxen parrot
#

I don't like plugins because they take forever to update

remote swallow
#

there is no point in rewriting the wheel

sacred mountain
#

i assure you WorldGuard does that

#

completely fine

#

and has very quick updates

remote swallow
#

most plugins that are that big would probably have dev builds

sacred mountain
#

If it's just singleplayer, honestly just place torches lol

#

or light blocks even

#

if its just a few players

remote swallow
#

and you probably shouldnt be running 1.21 on prod yet anyway

sacred mountain
#

I gave up with random spigotp lugins

#

No support and no updates 😅

waxen parrot
#

I don't have many additional stuff on my server that's like game changing... so like, I don't see why not to update lol

hybrid spoke
waxen parrot
#

if worldguard updates like you say, I guess I could give it a try again

#

I wouldn't know how to set it up tho

sacred mountain
#

restart

#

ta da

young knoll
#

You need worldedit too

sacred mountain
#

yeah that ^^

waxen parrot
#

is it even updated to 1.21? lol

sacred mountain
#

yes, lol

#

If you're willing to install both of those, I'll walk you through the commands

waxen parrot
#

yep, working on it now.

shut canopy
#

Someone PLEASE fix my Selling for my ./shop setup with EconomyShopGUI pleasE!

#

I'll pay you $10

#

i have an intense survival w my boys n its not working!

#

and if you add me a ./ah extra $5

#

i beg

sacred mountain
#

real

shut canopy
#

dm me fam

worthy yarrow
#

?services

undone axleBOT
sacred mountain
#

No thanks

shut canopy
#

man those take too long

worthy yarrow
#

welp

sacred mountain
#

I'd rather not work on fixing prebuilt plugins

shut canopy
#

lmao

#

alr man

sacred mountain
#

Not exactly a unique server if you rely on it, just use the money to hire a dev or something

shut canopy
#

its a priv server fam

#

its not that serious

worthy yarrow
#

takes 90% of the time just to figure out what needs to be fixed

sacred mountain
#

then why do people care

#

if its a private server

shut canopy
#

its my boys

sacred mountain
#

just let them know its broken

shut canopy
#

we're js having fun

#

i dont want it to be broken

worthy yarrow
#

I'm also sure there are plenty alternatives

shut canopy
#

my developer is just offline rn

sacred mountain
#

well, good luck then

worthy yarrow
#

You have a dev for a priv server?

sacred mountain
#

Anyone know an easy way to get a Material by it's ID? Or is that deprecated

remote swallow
#

ids dont exist anymore

sacred mountain
#

Or better, a way to store an array of materials in a PDC

#

More to the point

#

lol

shut canopy
#

yeah lmao

remote swallow
#

string list

shut canopy
#

its a fun ass server

sacred mountain
#

is that a default one

shut canopy
#

just want my shop to work so they can sell shit

remote swallow
#

yeah

sacred mountain
#

list

#

?

#

ah

remote swallow
#

LIST.string() iirc

sacred mountain
#

LIST.strings

#

why have i NEVER seen that before

#

...

worthy yarrow
shut canopy
#

its a good plugin

waxen parrot
#

must be nice to have a dev for a private server lol

shut canopy
#

i just feel like essentials or something is overwriting its commands

waxen parrot
#

I just have to ask around until I get help xD

shut canopy
#

nah bro

#

i had to finish this server asap i had no patience

#

and im not really experienced with mc plguins n shit

worthy yarrow
#

There's only one way to get experienced

sacred mountain
#

i just saw a spider

#

pray for me

waxen parrot
#

prayers sent your way

shut canopy
sacred mountain
#

Dude, we've given you enough answers

#

Nothing more you're gonna get

worthy yarrow
#

Well if there's one thing you'll learn here, it's that people do not like to spoon feed you / hold your hand... they'll give you the pieces you may need but you gotta put them together

sacred mountain
#

i used to spoonfeed but

#

i gave up after too many stupid questions

#

im just a people pleaser

worthy yarrow
#

fair enough

shut canopy
#

fam you guys take life too serious

#

people ask me for shit all the time n i help im a businessman ive been belssed with a good life i reciprocate idk if i spelt that right lmao

#

i paid my dev $300 just for importing some mods & plugins & having them work, its just unfortunate hes in a diff timezone so i can only hit him up in the morning for bugs n shit

#

i thought instead i should text a server see if i can get instant help

sacred mountain
#

Hire me 😭

#

300 is wild

#

for importing

shut canopy
#

on my life

#

so you wanna help me now 😉

#

cmon man $15 to overwrite my economyshopgui over essentials & simply add auctionhouse

#

usually people work an hr to make $15, this sohuld take u 3 mins

cedar saffron
#

Cool story bro, I ain't reading allat

#

I'm assuming that you want plugin development, if so, I know a guy who can help, he's really good and fast, but charges a pretty penny

shut canopy
#

cool, send him i need him now

young knoll
#

$300 to install some things but $15 to mess with config files

#

Wack

shut canopy
#

the $300 was 2 days of work, this is 3 minutes.

cedar saffron
shut canopy
#

if ur eastern time ill hire u as a 2nd dev

#

this gmt shit fucks me 😆

cedar saffron
#

Tho quite pricey it's worth it

shut canopy
#

added

#

ill treat him right

young knoll
#

2 days of work to install plugins and mods?

#

Eh?

shut canopy
#

and u too brother

#

yes coll cause im new to minecraft dev, i had to be picky of what i wanted in my server

#

but everything added very nicely

young knoll
#

I mean plugins are generally designed to play nicely

shut canopy
#

but i was just config'ing essentials & shop prices, and it fucked with selling i think

#

it just says no items found which can be sold

cedar saffron
#

That man is worth alot more than @opaque kestrel !

remote swallow
young knoll
#

Well, now is subjective

cedar saffron
remote swallow
cedar saffron
#

Your goddamn right

remote swallow
#

github?

cedar saffron
#

Unldenis

#

He works more privately tho and doesn't have alot of public stuff

remote swallow
#

uses maven, opinion invalid

cedar saffron
#

I will die for that man!

shut canopy
#

neon ty ill keep him for future use

#

if i pay him for anything, ill give you a commission brother

cedar saffron
#

Nah it's all him

worthy yarrow
#

Help me fix my hello world test project please!

shut canopy
#

ok ill pay $0.5 per pminute

worthy yarrow
#

You're not getting the point

shut canopy
#

man if u can help, js text me. Ill treat u right

worthy yarrow
#

No one wants to go through someone else's project, it's tedious and frustrating, not only that but it's a task that takes more thought than most consider 15$ to be worth

young knoll
#

I mean

#

I think it’s just configs?

shut canopy
#

yeah it really is.

young knoll
#

Idk what they actually want

shut canopy
#

essentials is just overwritign my shop

worthy yarrow
#

If it's just configs then...

#

Diy?

shut canopy
#

idk shit about configs lmao

#

we js wanted a minecraft server so i paid to have one made to my desires

#

usually when theres bugs like this my dev jus gets it fixed in minutes, so i would assume this is something easy.

#

If its not ofc ill pay you your worth

#

it doesnt even matter to me anymore atp ill js wait til tmr

shadow pelican
#
    public void onPlayerDeath(PlayerDeathEvent event) {
        Player player = event.getEntity();
        for (ItemStack item : player.getInventory().getContents()) {
            if (!ItemGenerator.isItem(item, this, "§6§lAtlas Totem")) continue;
            int uses = totemUses.getOrDefault(player.getName(), 0) + 1;
            if (uses <= 10) {
                event.setCancelled(true);
                player.spawnParticle(Particle.TOTEM, player.getLocation(), 1);
                player.sendMessage("§cYou died, your Totem only has §7'" + (10 - uses) + "'§c uses left!");
                totemUses.put(player.getName(), uses);
            } else {
                item.setAmount(0);
                totemUses.remove(player.getName());
            }
            break;
        }
    }
}

does anybody know how to make this so when they die at all by player or mob it will pop the totem?

hybrid spoke
shadow pelican
#

No it just disapers

#

it will not stay in the ive

hybrid spoke
#

add debug messages

shadow pelican
#

Thare is none

worthy yarrow
#

So add some

young knoll
#

Das not our api

#

👀

remote swallow
#

coll

#

create new prs

#

stash is a bit dead

young knoll
#

Oh sorry

#

Didn’t realize I had to keep it alive

remote swallow
#

y2k cant

#

hes on his holiday

worthy yarrow
sacred mountain
#

anyone know why this is saying Material.SOME_RANDOM_BLOCK isn't an item

#

do i really have to filter it for items only

young knoll
#

Probably

sacred mountain
#

sigh

#

Whats the difference between org.bukkit.Tag and com.destroystokyo.paper.MaterialSetTag

#

same enum i swear

remote swallow
#

the difference is spigot and paper

sacred mountain
#

is there a preferred one

remote swallow
#

been as were in spigot were probably gonna say spigot

worldly ingot
#

Their MaterialSetTags aren't real tags backed by the server. They're hard-coded Paper-defined tags, not present in a registry

sacred mountain
#

Should work right?

worldly ingot
#

Yes, looks fine

sacred mountain
#

what exactly should i supply for these 2

#

clone and getitemstack

carmine mica
#

that interface is not valid for implementation

sacred mountain
#

ah

#

i see

carmine mica
#

as pretty much all interfaces are in the API except for a specific few which are explicitly documented as valid for implementation

sacred mountain
#

ava.lang.IllegalArgumentException: Unknown recipe stack instance me.vlink102.vlands.veinminer.VeinMiner$1@7b795bc3

#

not even sure what that meant

#

i think it would work, just need to supply valid itemstacks

#

not too sure about the clone one though

#

no documentation available

#

this seems to work without errors

#

ill test it

#

[01:44:55] [Server thread/INFO]: [VeinMiner] [STDOUT] Registered recipe: org.bukkit.inventory.ShapedRecipe@153f02ac
[01:44:55] [Server thread/INFO]: [VeinMiner] [STDOUT] Registered recipe: org.bukkit.inventory.ShapedRecipe@77edacad

#

yippee

#

!

young knoll
#

Pretty sure it still won’t work

sacred mountain
#

ignore the random block choice

young knoll
#

But does the check actually work

sacred mountain
#

lol no i just tried it with a normal pickaxe

#

and it works too

#

not what i want

#

very sad and now idk what to do

carmine mica
#

I literally said you can't implement it

sacred mountain
#

¯_(ツ)_/¯

#

just testing

#

how exactly do i do that then

young knoll
#

PrepareItemCraftEvent

sacred mountain
#

what about the recipe book though

#

currently it shows in here

young knoll
#

Yeah you can still have a registered recipe

#

You just check the pickaxe in the event

sacred mountain
#

will i be able to click it

#

to automatically

#

like

#

fill the grid

young knoll
#

Yes

#

But it may take the wrong item

#

Vanilla doesn’t really distinguish that

sacred mountain
#

any way to modify that?

young knoll
#

Although it might now? I think the switch to components allowed ingredients with specific tags

sacred mountain
#

like an event for recipe book clicks

#

or is that clientside

young knoll
#

There’s an event for it iirc

sacred mountain
#

PlayerRecipeBookClickEvent

#

yea

#

ty

young knoll
#

You’d have to listen for that and then mess with the inventory

#

Probably a tick later

shadow pelican
#

Can i have help with this

@EventHandler
 public void onPlayerDeath(PlayerDeathEvent event) {
     Player player = event.getEntity();
     for (ItemStack item : player.getInventory().getContents()) {
         if (!ItemGenerator.isItem(item, this, "§6§lAtlas Totem")) continue;
         int uses = totemUses.getOrDefault(player.getName(), 0) + 1;
         if (uses <= 10) {
             event.setCancelled(true);
             player.spawnParticle(Particle.TOTEM, player.getLocation(), 1);
             player.sendMessage("§cYou died, your Totem only has §7'" + (10 - uses) + "'§c uses left!");
             totemUses.put(player.getName(), uses);
         } else {
             item.setAmount(0);
             totemUses.remove(player.getName());
         }
         break;
     }
 }
}

Wen i get killed i lose my totem idk how to fix it

worthy yarrow
#

It's not gonna help just posting the same thing over & over when people already told you how to debug it

drowsy helm
#

None of your code is preventing it dropping

sacred mountain
young knoll
#

They cancel the event

#

That should prevent dropping

sacred mountain
#

yea

#

drop? or lose

#

like the animation

#

i'd suggest instead of playerdeath

#

use EntityDamageByEntityEvent

#

or EntityDamageEvent

#

check if its a player

#

check if the damage is >= the health of the player

#

and you can figure out the rest

hybrid spoke
#

can you even cancel the death event

#

arent you then this weird half death

sacred mountain
#

yeah i wasnt sure either

worthy yarrow
hybrid spoke
sacred mountain
#

also help why is my recipe only accepting 1 item

young knoll
sacred mountain
#

i need it to accept a stack of each

young knoll
#

They aren’t using the spigot api

young knoll
sacred mountain
#

i see

young knoll
#

They don’t handle stacked ingredients

sacred mountain
#

can i even create a workaround for that

#

in the prepare event

drowsy helm
young knoll
#

Yes

#

Not as easily but yes

sacred mountain
#

well

#

enlighten me

#

where do i look because my google searches are so specific theyre ending up with no results found

#

best i could find

#

i'll give their code a try

young knoll
#

Listen for the event

#

Check if the inputs have a large enough stack

winter zenith
#

is there some bukkit or spigot api to get BlockFace off a vector

shadow pelican
sacred mountain
#

what's the vector

#

what's the actual goal

winter zenith
#

Vector direction

sacred mountain
#

??

#

wdym

#

yes a vector has a direction

winter zenith
#

vector direction to blockface

#

each blockface enum has a direction vector associated with it and i need the nearest blockface associated with the enum and i was wondering if there is already an api for that or if i have to loop thru all block faces and compare my direction vector to the enums

sacred mountain
#

just get the location of the blockfaces and do some simple pythag

#

its gonna be at .5

#

the center of the face

winter zenith
#

lol im not doing pythag

#

expensive

sacred mountain
#

I still don't understand your question

#

Like what's the end goal here

#

What is "compare my direction vector to the enums"

winter zenith
#

There is no specific end goal

#

The end goal is to get the nearest blockface associated with the direction vector i input

worthy yarrow
#

?paste

undone axleBOT
small pollen
#

i knew

#

it

#

hold on

#

i couldnt find that site

#

for th elife of me

#

The last snippet of code is where the issue is

#

I'm logging it in client response in .getData(), and it returns the Array just fine

#

but as soon as it runs inside that last code snippet, it doesn't return?

#

I can even log bans

#

and the data hashmap shows

#

As soon as i type it as ArrayList<Ban> or it's shorthand BanList it stops returning

#

only if i do .toString() will it work

sacred mountain
#

Can I use spigot buildtools in a paper plugin

#

or how can i access nms if I'm using paper

worthy yarrow
#

switch to spigot 😛

#

nms for what exactly?

worldly ingot
#

If you're set on using Paper, you should ask them for support. Their build system is totally different from Spigot's and we do not maintain Paper

#

We can't guess how it works for you. The people maintaining it can answer you directly

nova notch
simple frigate
#

Sorry to gravedig your message, did you ever figure this out? having the same issue rn

carmine mica
#

update intellij @simple frigate

sacred mountain
#

My buildtools jar was gone because i did a funny

crude zephyr
#

how would i go about querying developing a plugin

sacred mountain
#

What 😭

astral pilot
#

is there a way to cancel button clicking, block breaking and attacking all at once?

#

or do I actually need to listen to all of those events

summer scroll
astral pilot
#

.

astral pilot
sacred mountain
#

I'm actually so done, found out that you can't do the normal custom recipe stuff without nms if i want shaped recipes with stacked ingredients

#

anyone got a good api

rough drift
#

:p

little turret
rough drift
#

np

sacred mountain
#

me first

#

:p

#

I have a headstart

#

I've already run into about 5 walls

#

Good luck

toxic ledge
#

Hi, I am new to making plugins. I trying for barrier blocks to be minable, but not instant. I want the player to try and "mine" the block for x ticks and break it after that. But it seem that any event I can find only triggers once at the start. There is no easy way to detect for me the players continuously trying to mine it.
All way I can think of or saw were rude-goldberg complicated for something that is a very easy ask (is-player-holding-left-click-on-this-block?). Like storing who clicked what block when and where and then counting up calculating the start end end times.
There is also an item_display entity at that the coordinates of the barrier if that helps but afaik I can not detect holding-left-click on that either?

I feel like there are only frustratingly complicated and elaborate methods to archive something that should be less than 10 lines of code :/

chrome beacon
#

You have the start and end of mining

#

Make a runnable between the two states

#

?scheduling

undone axleBOT
toxic ledge
#

Can I detect the release of left-click? Sorry if that is a stupid question

chrome beacon
#

You can detect it stopping to mine

#

Not the button itself

upper hazel
#

if i will inject field type with 'injectClass' method then will creating loop

chrome beacon
#

Just call the method again?

#

What part do you need help with

upper hazel
upper hazel
chrome beacon
#

That's not specific enough

eternal oxide
#

do you mean you are getting a stack overflow?

eternal oxide
#

does your ReflectionUtil access the ContextFactory?

upper hazel
#

no

#

reflectionUtill just help with reflections lib

eternal oxide
#

then post a stacktrace so we can see the loop

chrome beacon
#

^

upper hazel
#

if i try use "injectClass" method

#

for field type

#

so this will

#

stackOverflow

eternal oxide
#

If you had just made a paste we'd not be asking all these questions. You are slowly providing the information we need

upper hazel
#

sorry

toxic ledge
# chrome beacon You can detect it stopping to mine

I tried this but it only runce once when I start mining. I do not know how to listen for stopped mining. I can not listen for a block break event since its unbreakable.

    public void onTyingToBreakBlock (PlayerInteractEvent event) {
        if (event.getAction().equals(Action.LEFT_CLICK_BLOCK)) {
...

I do not know how to detect stop mining that not minable block

eternal oxide
#

We still need a stacktrace so we can see the loop

#

I'm going to guess it's looping over componentFactory.getComponentObject(fieldType)

toxic ledge
near mason
#

ohh

cobalt thorn
#

Its possible to make free grid blocks with a shulker as a passanger and that will provide hitbox?

cerulean narwhal
#

Hi

frail pilot
green prism
#

Hi there,
I'm working on text-animating custom heads (generated from a given base64 value). The animation requires a cached ItemStack array with 40 frames per animation. This method works with other items or name-based custom player heads. However, when using the base64 value approach, it attempts to connect to the Mojang server for each cached frame, causing errors and lag due to the multiple requests. Is there a way to cache the returned result and make a single connection to the server?

eternal oxide
#

a decoded base64 string contains a link to the mojang servers is all. It has no actual texture. Cache the heads on creation and re-use them

green prism
shadow night
#

"Cache the heads on creation and re-use them"

green prism
shadow night
#

Is that a problem?

green prism
#

cloning makes a request to Mojang's servers

shadow night
#

does it?

green prism
#

yeah

#

40 clones = 40 requests

eternal oxide
#

don;t clone, create yoru 40 ItemStacks and set their texture

#

you do this ONCE

#

on each head

#

then change anythign else you need on them, but re-use the 40 heads

#

once the texture is set on the head it will not make any more requests to mojang

green prism
green prism
twin venture
#

iam working on making a CosmeticUser , what will this user have is :

  • owner cosmetic
  • active cosmetic

what is the best aproch to do it?

#

or should i do a map with :
cosmetic_id, Cosmetic ?

quaint mantle
#
class OwnedCosmetic {
  public final Cosmetic cosmetic
  private CosmeticState state = null; // ACTIVE/UNACTIVE
  
  // getter & setters
  public OwnedCosmetic(Cosmetic cosmetic, CosmeticState state) {
    this.cosmetic = cosmetic;
    this.state = state
  }
}

Something like that.

twin venture
#

huh nice

quaint mantle
#

You can make signal for the setter to update the ui and/or handler(s)

twin venture
#

what about selected?

#

how would it work the ACTIVE/UNACTIVE?

quaint mantle
#

Active means the selected?

twin venture
#

i think so

rare ridge
#

How can I fix it if at the same time a player can open a shulker by right-clicking in the air and throw away the shulker?

twin venture
#
  • cosmetics_selected
  • cosmetics_bought
#

or only 1?

quaint mantle
#

I think only one

twin venture
#

what do you think the structure will be?
uuid , cosmetic_id , cosmetic_state

#

right?

quaint mantle
#

Yeah

twin venture
#

primary_key uuid , cosmetic_id

#

correct?

#

maybe something like this?

twin venture
quaint mantle
#

Yeah but idk how your code works tho.

twin venture
#

oky thanks 🙂

kindred sentinel
#

Player's mouse sensitivity is only client-side?

river oracle
#

That'd be a weird server side feature

kindred sentinel
#

I just saw how 1 developer using datapacks made hollow knight in minecraft, and somehow changed players sensitivity

#

To -70

tardy delta
#

that sneaky throws doesnt seem very fun

zealous osprey
#

Why have a sneaky throw if you have 2 try-catches in there already?

slender elbow
#

"idk"

young knoll
#

Just try catch the entire plugin

slender elbow
#
name: CoolPlugin
version: 1.0
main: try ar.emily.cool.Plugin
echo basalt
#

main: isPluginEnabled("Vault") ? me.illusion.myplugin.LamePlugin : me.illusion.myplugin.CoolPlugin

young knoll
#

Can you register a handler for any uncaught exception

#

Is that a thing

young knoll
#

Perfect

#

Now my plugin will never throw errors!!!11

tardy delta
#

make it async too

#

cuz async fast

remote swallow
#

make it async multithreaded async

#

for all the speed

young knoll
#

A sink

river oracle
quiet ice
#

So I was looking at some codebase and stumbled uppon the following code:

    static int distance(int x1, int y1, int x2, int y2) {
        var fix = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1);
        var sqrt = (int) Math.sqrt(fix);
        var hsqr = sqrt * sqrt + sqrt;
        return sqrt + (~~(hsqr - fix) >>> (Integer.SIZE - 1));
    }

Do you think that the ~~ actually makes sense here? To me it's a NOP operation but perhaps I may be mistaken

#

Meh, I'll replace that with Math#hypot

quiet ice
#

Not my fault

young knoll
#

I don’t even know some of those operations 😓

slender elbow
#

what the actual fuck

#

where'd you find that lmao

#

ofc it isn't explained why they do that

river oracle
#

Okay what the fuck is ~~

frail pilot
#

First time I see it

young knoll
#

~~ is nothing apparently

#

~ is a bitwise complement

slender elbow
#

yeah

river oracle
#

Bitwise complement kekw

young knoll
#

I found this tho

river oracle
#

Twice

#

Why

young knoll
#

TLDR JavaScript

#

I also had to look up >>>

river oracle
#

Gross

river oracle
#

Oh ig yk already now lol

young knoll
#

Indeed

#

TIL there were unsigned versions

paper viper
#

Unsigned primitives when

young knoll
#

char

#

Kek

paper viper
#

🤡

tardy delta
#

char is u16

zealous osprey
lean ermine
#

dumb question, but i want to add minimessage support in my plugin and i have PAPI, how would i handle messages? would i first parse papi then minimessage or minimessage then papi? the first one sounds the most logical but i wouldnt know...

young knoll
#

papi first

tardy delta
#

anyone knows the dif between iconst_m1 and iconst_1?

zealous osprey
young knoll
#

m1 loads -1

#

1 loads +1

tardy delta
#

ah bruh

quiet ice
#

m standing for minus

tardy delta
#

got it

slender elbow
#

megative

young knoll
#

melow 0

unique meteor
#

Is there anything good for pathfinding for a player

young knoll
#

Players don't have pathfinders

#

But you can use whatever pathfinding system you want to replicate them

tardy delta
#

ai generated cover clearly

unique meteor
unique meteor
hard socket
#

it is possible to add entity to the game with NMS?

blazing ocean
#

you cannot create actual custom entities

#

you could, but the client will shit itself

hard socket
#

I dont mean custom entity with models

blazing ocean
#
  • that's not how the API works
hard socket
#

just like hypixel does it

blazing ocean
#

that's just npcs

#

and yeah

#

you need nms for that

hard socket
#

I wont to add a worm

#

so that will be armor stands

blazing ocean
#

ok

hard socket
#

thats easy to do without NMS

blazing ocean
#

yeah

#

and unrelated to your question

hard socket
#

but NMS is rquired for the pathfinding ig

#

ok thanks

blazing ocean
real lagoon
quiet ice
#

There's no pun in ba sing se

real lagoon
chrome beacon
#

Avatar reference

quartz basalt
#
    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent e) {
        Player player = e.getPlayer();
        String uuid = String.valueOf(player.getUniqueId());

        if (Bukkit.getWorld(uuid) != null) {
            Bukkit.createWorld(new WorldCreator(String.valueOf(player.getUniqueId())).type(WorldType.FLAT));
            Bukkit.getLogger().info("Loading world of " + uuid);
        }
    @EventHandler
    public void onPlayerLeave(PlayerQuitEvent e) {
        Player player = e.getPlayer();
        String uuid = String.valueOf(player.getUniqueId());

        if (Bukkit.getWorld(uuid) != null) {
            Bukkit.unloadWorld(String.valueOf(player.getUniqueId()), true);
            Bukkit.getLogger().info("Unloading world of " + uuid);
        }
    }

im trying to load the player's world when they rejoin, but if i restart the server, then rejoin, this code doesnt happen so the world doesnt load, idk how to fix this

obsidian drift
#

What is the world's name?

#

@quartz basalt

quartz basalt
#

its the players uuid

obsidian drift
#

does the listener get called?

#

try print to the console when the listener is called

quartz basalt
obsidian drift
quartz basalt
#

not when the server restarts

#

but if i leave and join regularly it is

broken nacelle
#

bro

obsidian drift
quartz basalt
#

yes

broken nacelle
#
List<String> list = new ArrayList<>();
blazing ocean
#

face with raised eyebrow

tardy delta
#

drooling face

obsidian drift
# quartz basalt yes

yeah quit events arent called on shutdown. you can create a new method that handles player leaves and have the quit listener call it and also in your onDisable in your main class go through each player in Bukkit.getOnlinePlayers and call that handler method as well

quartz basalt
#

so thats only part of the issue

blazing ocean
#

try changing the type to a List<String>, as you should usually infer the base class

broken nacelle
#

i didnt see

broken nacelle
#

😰

twilit knot
#

how do I get spigot api?

tardy delta
#

?bt

undone axleBOT
tardy delta
#

or the dependency?

twilit knot
remote swallow
#

?maven

undone axleBOT
quiet ice
tawdry scroll
#

so i am storing some items(which have some nbt) in a yml, but when i update from 1.20.4 to 1.20.6 (which had the nbt -> components change) the items loose all the data they had.
Example
at 1.20.4

items:
    '2':
      ==: org.bukkit.inventory.ItemStack
      v: 3700
      type: RED_STAINED_GLASS_PANE
      meta:
        ==: ItemMeta
        meta-type: UNSPECIFIC
        display-name: '{"text":"","extra":[{"text":"Disabled ","obfuscated":false,"italic":false,"underlined":false,"strikethrough":false,"color":"red","bold":false},{"text":"[LEGS]","italic":false,"color":"gray"}]}'
        internal: H4sIAAAAAAAA/7WPTU7EMAyFXX5EVUDiCCjr6QWyhTUXQKhyE7eNSJMqdgUIzRk4BvfgZGQKky0rdn7P9me/BqCGGxN5dkHPjk3rhGa4so6x97SpGk6chds8QSbhIDqR7Vgwa9uNHpm7BQNVcM1TfGklRt+KW6p6wywe39qAM8Hl16e5/+HaBk4Fx/8g/xmngvO7uAapGrj4pdRw9nDgfLwroVdRWqmdykVCpR+Ld7yQe7EfVjYoWegBPdNOOUHvTJFrsJT8IUixWJJ7JplSXMepuCb6mDI9beA++uPC/mkPUJ6FbzeCA9mqAQAA

at 1.20.6, it saves as so

items:
    '2':
      ==: org.bukkit.inventory.ItemStack
      v: 3839
      type: RED_STAINED_GLASS_PANE
      meta:
        ==: ItemMeta
        meta-type: UNSPECIFIC
        display-name: '{"text":"","extra":[{"text":"Disabled ","obfuscated":false,"italic":false,"underlined":false,"strikethrough":false,"color":"red","bold":false},{"text":"[LEGS]","italic":false,"color":"gray"}]}'
late sonnet
tawdry scroll
late sonnet
#

can you test? also not sure beacuse i dont remember what "internal" makes... in teory the items are parsed correctly again unless you mess a few data

#

can you show more code?

looks like you are calling a null thing and not the var created...

#

what is the coded you execute?
because the error talk about a this.saveHunters what mean you has a class with that declared in a field not?

#

example this code throw the same error.

import java.util.List;

public class MyClass {
    
    private static List<String> theList;
    
    public static void main(String args[]) {
      System.out.println("Run");
      theList.add("");
    }
}
Run

Exception in thread "main" java.lang.NullPointerException: Cannot invoke "java.util.List.add(Object)" because "MyClass.theList" is null
    at MyClass.main(MyClass.java:9)
trim lake
#

How can I create ItemStack of material ItemFrame with item in it? Cannot find anything. I know is possible to get ItemStack like that with command

inner mulch
#

ItemFrames are entities

trim lake
#

Yeah, but no in your inventory

inner mulch
#

Yes that doesnt work

trim lake
#

I probably got it, I will need to use NBT API or NMS.

inner mulch
#

Ok

trim lake
#

or that would be not working?

pliant topaz
#

i mean, theoretically u could execute the vanilla cmd through ur plugin if u really need it

shadow night
#

Or just use BlockPlaceEvent and some pdc?

pliant topaz
#

alternatively check when the itemframe gets placed and set the item

pliant topaz
rough drift
rough drift
#

yep

#

someone said it

trim lake
#

It will definitely be easier that way. I just hoped there will be some modified ItemMeta as there is for Corssbow or something. Thanks guys

late sonnet
#

but can you show the whole code?
the error tells you try to add to a null instance of the list... if cannot see the code just can assume that

#

okay you have a class and where you declare the array1 and array2?

#

can you pass the whole file?

chrome beacon
#

?paste

undone axleBOT
late sonnet
#

and pass the current stacktrace

#

ok you in onEnable replace the saveHunters with another thing.. can you maybe test replace in line 47 replace with and addAll or something like this.. also a few debugs about what is saveHunters later of load

#

replace this

saveHunters = (ArrayList<String>) objectStream.readObject();

with

saveHunters = (ArrayList<String>) objectStream.readObject();
saveHunters.add("test");
for (String value : saveHunters) {
  System.out.println("saveHunters -> " + value);
}

maybe i wrote a thing wrong because im not in IDE.. but you can test if in this step the saveHunter its not replaced with null or another thing

#

console nothing?

prisma creek
#

Hey,

blockCible.getRelative(0, 1, 0).setType(Material.POTATO);

I try to plant potatoes when I right click with a specific hoe but I have a nullPointerException (I'm obvisously checking if the blockCible is a farmland)

prisma creek
late sonnet
#

pass the full stacktrace but pretty sure now is throw in onEnable?

prisma creek
#

Thanks lol

twin venture
#

how i can check my redis (user , password setup) on my vps? ubuntu 20.04?

late sonnet
#

okay if now throw when you enable the plugin then the issue is saveHunters = (ArrayList<String>) objectStream.readObject();
because pretty sure (ArrayList<String>) objectStream.readObject() return null make the saveHunters fails later... try to check correctly all this thing about read a directory... because not sure why you are reading that for the info... or just try replace

saveHunters = (ArrayList<String>) objectStream.readObject();

with

List<String> listTempSaveHunters = (ArrayList<String>) objectStream.readObject();
if (listTempSaveHunters instanceOf ArrayList) {
  saveHunters.addAll(listTempSaveHunters);
}

but this just a patch

hazy parrot
#

Why are you even using object stream

tardy delta
#

went from a null object to an objectstream

signal ether
#

Are you allowed to upload a plugin to spigotmc if it only runs on paper?

blazing ocean
#

no

#

hangar exists for a reason lol

signal ether
#

I consider hangar the primary location for my resources, but it's a shame because spigotmc gets me like triple the downloads hangar/modrinth does

blazing ocean
#

unfortunate

#

cna't cahnge that

next plume
signal ether
#

No way that's almost enough for a pack of gum

wintry dagger
#

Also

#

When checking booleans

#

Don’t do if(challenge == false)

#

just use if (!challenge)

dense oracle
#

hey, i want to create a new world in spigot
is there a way to do that with a new seed?
rn it creates a new world with the same seed, as the main overworld
and i dont want that

dense oracle
#

oh, im stupid sry
but is there an easy way to get a new seed?

tardy delta
#

wdym get a new one, its just a random long innit?

quaint mantle
#

does anyone know how I can make an entity that has a bounding box but doesn't affect anything like interactions?

#

I need to trick a hacked client into thinking an entity exists on a block so that it doesn't try and place an end crystal there

#

How can I get the player that shooted an arrow? I'm at the EntityDamageByEntityEvent event

inner mulch
#

get the damager

#

check instanceof Arrow

quaint mantle
#

done

chrome beacon
#

Now get the shooter from the arrow

quaint mantle
#

Its possible to cancel a player death?

rigid wing
young knoll
#

It’s not cancellable

#

Listen to the damage event and cancel it if the players health - event.getFinalDamage <= 0

quaint mantle
#

okey thanks coll

rigid wing
eternal night
remote swallow
#

go review y2ks pr for when he comes home

tender shard
#

Yeah go review it

nova notch
#

cancel player leave event

blazing ocean
quaint mantle
#

does the field (nms) Entity#bukkitEntity have the same name in every version?

carmine mica
#

that isn't API, so any assumptions about name and structure shouldn't be made

#

it might have the same name now and going back a ways (i don't actually know), but assuming that into the future is wrong

river oracle
#

I think the safest use for it is to just use nms and not rely on reflection for it

lilac zenith
#

I noticed that in 1.20.5 the negative mining fatigue effect I used for a custom breaking system was patched, the thing is that I can't make use of the new mining speed attribute added as my server is in 1.20.4, is there a way I can send a packet to a newer version with that new attribute?

kindred sentinel
#

How to turn off nether?

eternal night
#

server.properties

slender elbow
tidal kettle
#

hey can you check when the player break a crop if the crop is fully grow?

young knoll
#

Get BlockData and cast to ageable

slender elbow
#

Ageable and Damageable are the bane of bukkit (there are multiple classes named Ageable and Damageable)

glass inlet
#

How does one hide armor stands even when player is in spectator mode. I saw this post (https://www.spigotmc.org/threads/invisible-armor-stands-while-in-spectator-mode.567756/) and I think I managed to do it in some older version before the same way as in this post by sending a remove entity packet to the player but it doesn't seem to work for me in 1.20, it just removes the entire entity as if it wasn't there, which kind of makes sense but I don't understand how was this possible before. Is this still possible? I'm looking for this effect to have a block spinning in air which in my case is done by adding a block on an armor stands head and rotating it.

eternal night
#

but yea

#

in 1.20 you'd just use display entities

#

and call it a day

#

the hideEntity thing would also completely remove the entity sooo

lilac zenith
#

Everyone uses the PacketDataSerializer class but it doesn't seem to exist anymore in 1.20.4

tidal kettle
#

why in BlockBreakEvent, when i break carrot, 4 drop but event.getBlock().getDrops().size say it's only 2?

chrome beacon
#

Two dropped entities with 2 items in each

#

Actually it might just be the drop count being randomized

#

Don't expect get drops to match the result of the event

#

Use the BlockDropItemEvent

tidal kettle
#

in blockBreakEvent?

inner mulch
#

No

#

Its a different event

kindred valley
#

?learnjava

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉

lean ermine
#

how would i check if a player is vanished? without using an api

#

so like if they use essentialx / any other plugin, how would i be able to check that?

remote swallow
#

a lot of plugins set meta data

#

iirc its just "vanished"

slender elbow
#

canSee 👀

lean ermine
#

i see that but how would i implement it

remote swallow
#

something like this

lean ermine
#

would i just create a normal player and check if it can see vanished players>

remote swallow
lean ermine
remote swallow
#

hidePlayer didnt always exist

lean ermine
#

ill try checking for metadata

#

do you know whhich plugins use it?

slender elbow
#

all the famous ones

worldly ingot
#

I think most do. VNP does at least

remote swallow
#

hi choco

#

are the huskies singing

terse raven
#

how do i generate a new world with smaller biomes?

lean ermine
#

supervanish doesnt seem to use it

slender elbow
#

it literally does lol

#

that code snippet is from the SV spigot page

royal jay
#

does anyone know where i can find the textures of mobheads (as a string) and how i turn them into a mobhead?

young knoll
#

minecraft-heads

#

And you use the player profile api

lilac zenith
real lagoon
worldly ingot
young knoll
#

Does normal high level mining fatigue not work?

#

Iirc that’s what I used

slender elbow
worldly ingot
#

Mine's better because it's indented with 4 spaces and uses actual if statement blocks because I'm not a psychopaths

young knoll
#

Idk how I feel about inline returns

#

I’m conflicted

terse raven
#

Hello! I am trying to make a plugin that generates a World, where the Biomes are smaller then usual, i am trying todo this by placing my own code between the WorldGeneration calling getBiome and the actual function that gets the Biome, in my mind the x,y coordinate size should be anti proportional to the biome size, but sadly it errors because "chunkGenerator.getDefaultBiomeProvider(worldInfo)" returns null, where can i get the normal minecraft DefaultBiomeProvider?

#
BiomeProvider biomeProvider = new BiomeProvider() {
            @Override
            public Biome getBiome(WorldInfo worldInfo, int x, int y, int z) {

                return chunkGenerator.getDefaultBiomeProvider(worldInfo).getBiome(worldInfo, x * 2, y, z * 2);
            }

            @Override
            public List<Biome> getBiomes(WorldInfo worldInfo) {
                return chunkGenerator.getDefaultBiomeProvider(worldInfo).getBiomes(worldInfo);
            }
        };```
real lagoon
terse raven
violet blade
#

hi

#

I'm a bit new to all this and I'm trying to fork of a plugin and try to update it, the thing is that the plugin supports several previous versions so I should download the libraries from the buildtools

#

Will it be enough to install them in any folder ?

river oracle
#

Idk why they wouldn't be using remapped until 1.20.4 but yeah otherwise that'll be fine

wise mesa
#

yea also even if you do remapped it'll still install the non remapped versions as well

#

so there's really no reason not to if you're a developer

violet blade
wise mesa
#

okay well

#

you're trying to update the plugin right

#

then you shouldn't need any of the old versions

violet blade
#

im doing this because i want to PR it later

#

if i manage to do it ofc

wise mesa
#

okay so

#

just install the version you need

#

actually nevermind

#

install them all to be safe

#

the way its designed it probably needs all of them

violet blade
#

yeah, i'm already finishing installing all of it so imma just keep going like this

wise mesa
#

okay

violet blade
#

thanks tho

#

appreciate it

wise mesa
#

bruh

#
[INFO] --- specialsource:1.2.4:remap (remap-obf) @ mcplanes ---
Adding inheritance /var/lib/jenkins/.m2/repository/org/spigotmc/spigot/1.21-R0.1-SNAPSHOT/spigot-1.21-R0.1-SNAPSHOT-remapped-mojang.jar
java.lang.IllegalArgumentException: Unsupported class file major version 65
    at org.objectweb.asm.ClassReader.<init>(ClassReader.java:196)
    at org.objectweb.asm.ClassReader.<init>(ClassReader.java:177)
    at org.objectweb.asm.ClassReader.<init>(ClassReader.java:163)
    at org.objectweb.asm.ClassReader.<init>(ClassReader.java:284)
    at net.md_5.specialsource.JarRemapper.remapClassFile(JarRemapper.java:268)
    at net.md_5.specialsource.JarRemapper.remapJar(JarRemapper.java:205)
    at net.md_5.specialsource.JarRemapper.remapJar(JarRemapper.java:178)
    at net.md_5.specialsource.mavenplugin.RemapMojo.execute(RemapMojo.java:214)
#

cut it off after that

#

works perfectly fine on my computer

#

just not on ci

#

wait actually i never tried running package on my computer just compile 😭

#

so let me try that

#

okay gonna try updating it to latest don't know why I didn't just think of that

#

okay that fixed it idk why i complained before attempting to solve the problem myself

twilit knot
#

I want to learn how to make plugins how do I begin

worthy yarrow
undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉

worthy yarrow
#

Then after you have a good handle on java, start working with spigot / paper though most here including me will recommend spigot

nova notch
#

i just started out making super simple plugins and watching tutorials

#

in a perfect world you should have a good understanding of java before making plugins but if youre just doing it for fun you dont really need anything past the very basics

#

but if you have to ask what a method is then you know you need to learn a bit more before you start

worthy yarrow
#

I mean even then you'll still get hit with a learnjava if you ask syntax questions here kek

humble lynx
#

Yeah I started making basic plugins to learn java, although I had a bit of knowledge of c++ previously, so it's not like I knew nothing

#

It doesn't hurt to learn basics, especially recursion and other basics

worthy yarrow
#

To be fair though, oop is a lot for a beginner to understand imo

blazing ocean
#

recursion concern

humble lynx
#

I'd say it's something that someone should know about when they go into making plugins lol

blazing ocean
#

never fully learnt recursion and never needed it

worthy yarrow
#

I've really only used recursion for a scheduling system, other than that have not needed to use it

worthy yarrow
sterile breach
#

Hi, in plugin.yml Is writen api version: 1.20 but I make the project in 1.20.4 is normal?

blazing ocean
#

yes

sterile breach
#

okay, and
is better to make a static getter or injection for dependecy sharing?

blazing ocean
#

dependency injection

#

?di

undone axleBOT
wintry dagger
#

:p

blazing ocean
#

not what i said

pseudo hazel
#

yes, you just said dependency injection, which tells nothing about when to use it, unless thats explained in the link

sleek night
#

anyone might be able to help me figure out how to use skinsrestorer api?

im trying to use it to change a players skin using a url but i cant really figure it out
also im using kotlin btw

verbal rivet
#

I need an discordsrv bot

pseudo hazel
#

dont we all

lilac zenith
#

I want a way to stop the player completely from breaking the block

#

And high level mining fatigue makes the player swing arm animation very very slow

kindred valley
undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉

tidal kettle
#

can i get the block that the player break with BlockDropItemEvent, because event.getBlock is always air

quiet ice
#

What is some 2D datastructure which have very good querying speeds when it comes to obtaining the N-nearest neighbours within a 2D space? Every object can be considered to be infinitely dense - overlaps shouldn't occur.
I've tried out using some random PR-Tree library but that one completely destroys performance compared to the current brute-force method of querying a QuadTree and sorting the points, then copying those points again in order to cut off all elements above N.

astral pilot
#

when does Bukkit.getOfflinePlayers gets filled

#

i mean like when does a player get added into it

eternal oxide
#

when they first join the server

astral pilot
eternal oxide
#

player extends offline

astral pilot
#

yes but the function's name is getOfflinePlayers

eternal oxide
#

if they have joined at some time there will be an offline for them

astral pilot
#

i see

#

@eternal oxide so they'll be in that array even tho hasPlayedBefore() is false?

eternal oxide
#

even if they are currently online, there will still be an offline for them

#

no

astral pilot
#

cuz hasPlayedBefore() returns false if its the player's first time joining

eternal oxide
#

if hasPlayedBefore is false they have never joined

astral pilot
#

and they haven't gone offline yet

astral pilot
eternal oxide
#

thats possible I guess

#

perhaps its set the first time they log off

#

but there will still be an oifflinePlayer for a player who is online for the first time

astral pilot
#

i see

#

thanks

pseudo hazel
#

and also for a player that has never been online

#

you can make an offline player if you know their uuid

#

or name I think

#

but thats expensive probably?

twilit knot
nova notch
#

youtube is your friend

#

some API stuff is likely outdated in tutorials but you should easily be able to get a project set up with a quick video

tardy delta
#

please dont watch codered or smth

icy beacon
#

codedred

#

kody simpson helped me get started with the spigot api ngl

#

back in like 2022 or maybe late 2021

tardy delta
#

they all write code thats a piece of shit if you look at it now

velvet prawn
#

hey, i have a simple scoreboard question.

My Scoreboard is only showing 1 player stats, and not per player.

player1 is seeing the scoreboard for player2, and player2 also sees the player2 scoreboard:

```java
  public void setScoreboard() {
    Scoreboard playerScoreboard = player.getScoreboard();

    String uniqueTeamName = "TornadoMC_" + player.getName();

    if (playerScoreboard.getObjective(uniqueTeamName) != null) {
        playerScoreboard.getObjective(uniqueTeamName).unregister();
    }

    Objective objective = playerScoreboard.registerNewObjective(uniqueTeamName, "dummy", "§d§lTornadoMC");
    objective.setDisplaySlot(DisplaySlot.SIDEBAR);

    objective.getScore("§8").setScore(15);

    if (playerScoreboard.getTeam(uniqueTeamName) != null) {
        playerScoreboard.getTeam(uniqueTeamName).unregister();
    }

    Team team = playerScoreboard.registerNewTeam(uniqueTeamName);
    team.addEntry("§8");
    team.setPrefix(player.getName());

    player.setScoreboard(playerScoreboard);
}```

This is my code, i will be happy if somebody can help me :=)

tardy delta
#

shouldnt you be creating an entirely new scoreboard?

#

as player::getScoreboard returns the servers main scoreboard?

#

i suppose

velvet prawn
#

yes this was my first idea, but i have coded a tablist group prefix plugin (core plugin), but then the tablist prefixes are gone, or the new scoreboard disappear.

pseudo hazel
#

if you want each player to have a sidebar that looks different, each player needs a separate scoreboard

#

if you want teams to sync youll have to create them on all the scoreboards

#

or use packets

velvet prawn
#

hmm, you mean that i should use in the scoreboard (sidebar) .getNewScoreboard() and then in the scoreboard teams plugin i have to get all scoreboards and add the teams to all scoreboards?

pseudo hazel
#

yes basically

#

i wanted to do something similar where i wanted to use placeholders in scoreboards whoch reauires separate board for every player

#

but i also have teams

velvet prawn
#

and it works on you?

pseudo hazel
#

but in the end this was very messy so i opted to use packetevents

#

and just send player teams with packets

#

which is also complicates, but not scoreboard dependant

velvet prawn
#

this is also a good idea. you send the teams with packets (just the teams) and then call .getNewScoreboard() in every scoreboard plugin?

pseudo hazel
#

but just adding the teams to every scoreboard shoul work

velvet prawn
#

okay, i try it thank you. If i have any questions i'll ask

pseudo hazel
#

the client evaluates prefixes based on scoreboard but packets can override this by creatin teams regardless of scoreboard

velvet prawn
pseudo hazel
#

depending on your structure it might be easy tojust create the same teams across all the boards

velvet prawn
#

yes

twilit knot
tardy delta
#

because he does some awful things

velvet prawn
#

do i have to do it with PacketPlayOutScoreboardTeam?

the teams with every scoreboard doesnt work because then in the tab only one player have a rank and the other rank disappeared

eternal night
#

No

young knoll
#

👀 I’m watching you

river oracle
halcyon hemlock
#

boys whats up

#

hows everyone doing

#

its the last few days of mens mental health month

eternal night
#

|| Could use paper run ||

young knoll
#

Oi I said I was watching you

remote swallow
#

yeah, spigot plugins work on paper, paper plugins dont work on spigot

velvet prawn
#

can anyone send me for 1.20.6 a scoreboard teams code with packets? i dont know how i can send the packet and create the packet

alpine urchin
#

you wouldn't learn anything then

velvet prawn
#

then i need someone who teaches me

#

or explain it to me

tardy delta
#

how much do you pay?

velvet prawn
#

idk ☠️ i just want to know how this works

#

if someone can send me a code example for free will make me happy :=)

pseudo hazel
#

I used packetevents so I cant help with nms xD

#

but it is the packet you mentioned

#

that packet can create, remove and edit teams

#

in my case I just recreated the team everytime something changes, which isnt optimal, but by far the easiest way

#

for some reason you can just keep creating teams and it doesnt complain about duplicate names so I assume it just replaces the team

idle flax
#

How can I add mods in spigot server?

velvet prawn
velvet prawn
#

i try it again

kind patrol
velvet prawn
#

but how you did that with PacketEvents? @steaf23

tardy delta
#

you go outside and start touching grass, its 30°C

velvet prawn
#

oh

alpine urchin
#

im busy rn

velvet prawn
#

okay

hard socket
#

what's wrong?

alpine urchin
#

i mean a warning is just a warning

hard socket
#

what abt here?

late sonnet
late sonnet
# hard socket https://paste.md-5.net/ajifoyazuz.xml
alpine urchin
#

i thought so too

#

was too lazy to type it

icy beacon
alpine urchin
#

no one wished me

#

happy mental health's day for men

icy beacon
#

u2

alpine urchin
#

i only got happy pride month wishes

pseudo hazel
alpine urchin
#

i was quoting

pseudo hazel
#

well I didnt see any quotes

alpine urchin
#

i was

#

continuing the sentence

pseudo hazel
#

ah

icy beacon
#

i

#

now

#

see

#

how

#

you

#

have

#

88k

#

messages

#

just split every word in a message into individual messages = profit

remote swallow
#

we all dislike it

river oracle
#

Do that and you're dead

remote swallow
#

simple will fight you at somepoint

alpine urchin
#

hi

#

the thing is

#

as im typing you can read what im saying

icy beacon
#

you need to think faster and