#help-development

1 messages Β· Page 2081 of 1

noble lantern
#

either or works

#

cant use this keyword in runnables

knotty gale
#

how do you do that tho

quaint mantle
#

you can

noble lantern
#

weird it gives me that error whenever i try it

quaint mantle
#

the variable just isnt defined in that

noble lantern
#

yeah its defined in the class scope

noble lantern
west glacier
#

now is all perfect

#

0 errors

#

thx

noble lantern
#

idk if it still works

knotty gale
#

you cant use message type in sendmessage

noble lantern
#

ChatMessageType

west glacier
#

and what i have to do in main to aplicate it

noble lantern
#

?di

undone axleBOT
noble lantern
#

both ways are incredibly simple

#

just a matter of preference for how you want to do it but i recommend a getter so you can basically use it as an API

noble lantern
#

thats api is 1.9+

#

wont work on 1.8

knotty gale
#

ik

#

I am using 1.15

#

how do I implement the API

#

like action bar api

noble lantern
#

wym?

#

you dont need action bar api

knotty gale
#

there is a plugin for this called action bar api

#

how do I use it\

noble lantern
#

player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(message));

That API is not needed

#

use the spigot() method

knotty gale
#

oh ok

noble lantern
#

if your using actionbarapi though

#

ActionBarAPI.sendActionBar(player,"Action Bar Message");

#

its a static method

#

just make sure you check if the plugins enabled on the server first

#

and soft depend on it in plugin.yml

final monolith
#

is possible check if a packet entity is visible for a player?

When i spawn a Packet Entity and go away, the packet refreshs and destroy the entity

#

any way to check if that packet has "destroyed" for the player?

knotty gale
#

ok

#

@noble lantern for some reason now the entire code stopped working after that

#

I dont know why

#

wait it says my plugin.yml is invalid but I dont think anything is wrong with it

#

wait now it "works" but the action bar doesnt show

echo basalt
#

you can do some location checks

#

but that's about it

noble lantern
#

Does BlockPhysicsEvent not return the block thats getting its data effected? Or is the block returned from this event the data from the block thats already changed??

#

I tried using BlockPlaceEvent and BlockBreakEvent to simulate state locks, but nothing really worked for that (it just didnt keep its data)

So i tried BlockPhysicsEvent and now the data from the block just seems to be the already changed data?

#

IE doing this ill get the TInkersBlock from my registry map, but using PhysicsEvent it just doesnt seem the case here

#

Javadocs arent too helpful either, theres this method here but i assume this is the block that caused the state change

#

FYI: Im trying to prevent noteblock instrument changes when a block is placed underneath them

buoyant viper
#

?jd-s

undone axleBOT
buoyant viper
#

gonna look thru

noble lantern
buoyant viper
#

what if u cancel the event

noble lantern
#

events already getting canceled

buoyant viper
#

o hmm

noble lantern
#

sec lemme test one more thing and ill send a vid

#

it appears its working now with block placements

#

but for breaking not so much

buoyant viper
#

what in gods name is that block

#

mf got the netherlazuli

noble lantern
#

its cobalt haha

#

theres the changed meta in here but its private to the event i wonder if that would be of any help or not

#

either way though im pretty sure the block that PhysicsEvent uses is after the state change

#

which is a rather odd behaviour

spring pike
#

how can I loop through a collection of entities to teleport them to a location?

noble lantern
# noble lantern

well got it working by setting the blockData one tick after the update event, something ide rather not do as it creates a flicker effect but it works nontheless

noble lantern
spring pike
#

ty πŸ™‚

granite owl
#

still wondering if this is do-able

undone axleBOT
hybrid spoke
granite owl
#

i mean dont get me wrong i dont need spoonfeeding

#

just the right direction

#

πŸ˜… πŸ€·β€β™€οΈ

#

cause i didnt find much in the api to manipulate pending commands

hybrid spoke
#

either overwrite the command or use the playercommandpreprocessevent

granite owl
#

only for plugin commands at best which is permissions i dont use

granite owl
#

so how can i override the op permission of vanilla commands from there without opping them for the time being?

storm crescent
#

Does anyone know what causes this error? This happens when I try to use MySQL after my server has been running for some time. Caused by: com.mysql.cj.exceptions.CJCommunicationsException: The last packet successfully received from the server was 35,886,624 milliseconds ago. The last packet sent successfully to the server was 35,886,717 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.

granite owl
#

did u ever close the connection?

storm crescent
#

I tried periodically closing and reconnecting the connection but it seems the problem just appears faster

granite owl
#

idk much about sql hate it

#

but usually to keep a connection alive u send a ping periodically

#

like once a sec or so

storm crescent
#

Alright, I'll try that. Thanks

brave sparrow
#

@storm crescent use a connection pool, don’t just create one connection that you hold onto forever

knotty gale
#

what is a way to loop through all players other than using getonline players

delicate lynx
#

what are you trying to achieve

knotty gale
#

nvm I got it

worldly ingot
#

"Is there a way to do this without using the only way to do it?"

noble lantern
#

hey choco

muted sand
#

how do I make "tap to eat" stews / "tap to throw" potions?
PlayerInteractEvent, check their held item?
Is there a method that allows the player to eat

noble lantern
# noble lantern

Is there a way to achieve preventing noteblock state changes without calling runTask on the data setters? without runTask it act really clonky (video down below this message)

noble lantern
worldly ingot
#

Ehm, physics event would be my only bet there

muted sand
noble lantern
noble lantern
noble lantern
muted sand
noble lantern
noble lantern
muted sand
#

okay! thank you!

noble lantern
#

its only logging because that event fires so much btw

worldly ingot
#

Yeah it's an ugly event

noble lantern
#

i agree it reminds me of AnvilPrepareEvent lmao

#

So i assume with this ill just have to live with the flicker effect?

#

not sure if anythings do-able with packets for this either

echo basalt
#

you can get rid of the flicker

#

with packets

#

by cancelling outgoing packets for the old block

noble lantern
#

not a bad idea

#

havent done much work with packets so this is gonna be a fun experience lmfao

worldly ingot
#

ProtocolLib will save your ass

#

Makes packet listening a breeze

#

& version independent

echo basalt
#

funny enough

noble lantern
#

yep yep gonna take a look at theyre docs right now

echo basalt
#

I posted a client-side entity tutorial with protocollib

#

and got hated for it

#

because how dare I use dependencies

noble lantern
#

"NNOO how dare you not use the raw packets library nms provides"

worldly ingot
#

ProtocolLib is fine. It's standard and installed on a majority of servers as a dependency

#

Ignore the ignorant lol

echo basalt
#

it has like 1.7m downloads

#

got a free positive "funny" rating or two

#

Β―_(ツ)_/Β―

worldly ingot
#

Woo!

noble lantern
#

Protocolib, Vault, Worldguard/edit, PlaceholderAPI almost every server should have imo

worldly ingot
#

Yep

echo basalt
#

I'm still trying to think of tutorials I should make

noble lantern
echo basalt
#

Or things I should code within the game

#

lately everything has been so mundane

noble lantern
#

"How to make a lifesteal plugin"

echo basalt
#

I've made a gems system with client-side lore

noble lantern
#

using only packets and nms too

echo basalt
#

one of the gems was a life steal gem

#

is that good enough

noble lantern
#

no bukkit api allowed for that tutorial

echo basalt
#

uhh

#

it was like 90% nms / packets yeah

noble lantern
#

oh nice

echo basalt
#

imagine an april fools "bukkit 2.0" tutorial where instead of registering your listener, you use reflections to find your way into the handlerlist

#

instead of registering a command, you use reflections to access the command map

#

instead of broadcasting a message, you gotta make a json chat packet to all players

#

easy, right?

noble lantern
#

just make a whole bukkit 2.0 library upload on spigot as a meme

echo basalt
#

we just nuke the entire api and make 2 methods

#

"sendPacket"

#

"processPacket(consumer<packet>)"

#

but yeah I'm out of ideas '-'

noble lantern
#

make a wrapper for protocolib

#

that makes it feel like your working with vanilla packets

#

perfection

echo basalt
#

just use inventivetalent's packetapi

#

or tinyprotocol

noble lantern
#

never heard of either of them

echo basalt
#

they're as raw as nms

noble lantern
#

oh no

desert musk
#

Ok so i have a gamemode where the spawn radius is 10,000 blocks, and understandably the entire server lags when someone respawns

#

is there any way i can minimize this?

#

perhaps i could make a prerenderer that would render little spots on the map and have my own custom repawn method

#

but that's a lot of work and someone might have a better idea

noble lantern
noble lantern
#

that shouldnt be causing any lag?

desert musk
#

yeah it does

#

a lot

#

and once in a while it kicks everyone from the server

#

from the lag

#

just from rendering the new chunks ig

eternal oxide
#

You have something else wrong

echo basalt
desert musk
#

thinking of transferring to shockbyte

eternal oxide
#

unless you are respawning everyone at the same time to different (un-rendered) chunks

eternal oxide
#

test it locally,

#

it probably a terrible host

noble lantern
# echo basalt BLOCK_CHANGE

Ah so the Server one only has that, i assume listening to Server.BLOCK_CHANGE is server -> client packets? Sorry never really worked with them before

#

ie PacketType.Play.Server.BLOCK_CHANGE

echo basalt
#

check out my protocollib tutorial

desert musk
#

but i'll try

noble lantern
#

oh wait yeah thats right i didnt read that tutorial the whole way

desert musk
#

yeah, ok it doesn't lag nearly as much when i do it in singleplayer

noble lantern
desert musk
#

imma make a local server with paper and try it

noble lantern
#

i mean ive made RTP plugins where the radius was over 100k, it has to be in the way you are respawning players to a location

Maybe show some code on how you are achieving this?

desert musk
#

ok

#

i'm using /gamerule spawnradius to do the spawn radius stuff

#

i'll send a datapack i'm using

echo basalt
#

oh god

#

yeah I see the issue

noble lantern
#

why not just set a world border

desert musk
noble lantern
#

what class is the respawn stuff handled in

#

send that

#

rather you do that than us playing guessing game which class it is

noble lantern
#

ty

wet breach
#

o.o

noble lantern
#

i didnt know

#

people actually usedrequireNonNull

desert musk
#

i think i did that when i was first making commits and saw the warnings and thought that i had to resolve them

#

these are the first methods i wrote of the plugin i think

noble lantern
#

if (that == null) { // handle null values }

desert musk
#

yeah ik

#

i've gotta also change some variable names

noble lantern
#

"minecraft:execute as " + player.getName() + " run function namespace:respawn"

Is this calling something in your datapack?

desert musk
#

is that uncommented?

#

bruh

noble lantern
#

I dont see a reason to handle any respawn stuff manually if you set a world border for the world

noble lantern
#

besides the applying potion effect stuff

desert musk
#

in this plugin players spawn at random positions across the whole map

noble lantern
# desert musk wdym

If you set a world border to 10k, the player wont ever go past the 10k mark

I dont see any code editing the respawn stuff though so its odd

noble lantern
desert musk
noble lantern
#

ah

wet breach
#

remember they said they were using the spawn radius of the server

noble lantern
#

mb

wet breach
#

which I probably wouldn't use

#

it removes some things you could control more optimally

desert musk
#

yeah that's what i was thinking but like

#

i agree that it shouldn't lag anyways

wet breach
#

well only if you don't understand the internals work

desert musk
#

let's try without the weird command execution

wet breach
#

so the reason it lags is because of your spawn radius

desert musk
wet breach
#

spawn radius keeps the chunks loaded πŸ™‚

desert musk
#

ohhhhh

#

what the fuck?

#

no shot

noble lantern
#

your better off making some type of random location getter tbh

#

and then teleport them to that Location if its safe

desert musk
#

only when they get respawned

wet breach
#

no, but the server only has so much resources to work with

#

so in the right conditions, depending on what everyone is doing, your server is having a hard time keeping that many chunks loaded

desert musk
#

that's insane

#

but also that makes no sense still

#

do you have proof that that is actually what happens?

wet breach
#

390,625 chunks squared is the approximate amount of chunks you have loaded

desert musk
#

it's not spawnprotection

noble lantern
#

theres a essentials command that shows you chunks loaded too

#

uhmm

wet breach
#

./gc

noble lantern
#

beat me to it

desert musk
#

i dont have essentials

#

lol

#

imma noob'

wet breach
#

spawn radius controls how many chunks around the spawn stay loaded. Spawn protection is similar except it controls how many blocks from the spawn point someone must travel to modify blocks

desert musk
#

really?

#

that's still just unbelievable to me

#

but i'll take your word for it

wet breach
#

well, I mean that is just not understanding the MC internals is all πŸ˜›

noble lantern
#

you can always dive into mojangs code or just use /gc from essentials

desert musk
#

that's incredible

noble lantern
#

or since your running papermc, /timings report, spigot has the same command too

desert musk
#

is it controvertial to say that minecraft was coded badly

#

because it is

wet breach
#

well, it is and isn't. It makes sense πŸ™‚

desert musk
#

yep

wet breach
#

also that spawn radius setting in the configs I don't remember if there is a sperate one for each world, but pretty sure it applies that to all the worlds

#

I think you have to manually set spawn radius's to each world for that to not apply

echo basalt
echo basalt
#

It's a small development team

desert musk
#

i mean bedrock exists but

#

nobody plays it

echo basalt
#

Mm surely

desert musk
#

i assume that bedrock is a bit better

noble lantern
#

bedrock has loads more quircks

wet breach
#

so, that means in reality that 390,625 for just the 1 world, is actually 1,171,875 chunks between 3 worlds lol

desert musk
#

so like

#

making my own respawn method

noble lantern
# desert musk : |

Like said your better making a random location getter for player respawns

wet breach
#

so now it should make sense where some of that lag is coming from πŸ˜›

desert musk
#

yeah

noble lantern
#

i cant link my methods i used bc the repos private and its part of an org

#

sadness

echo basalt
#

Rip

#

Just rewrite it

#

Aka change variable names

desert musk
#

lol

echo basalt
#

Then it's totally fine

noble lantern
#

i could copy paste it tbh

wet breach
#

anyways what you decide to do is up to you, I can only just give you the information πŸ™‚

desert musk
#

πŸ‘ true

#

if you wrote it i mean

#

why not

#

but yes if you do have your own respawn method

#

i would gladly appreciate that

desert musk
wet breach
#

generally I am not wrong in remembering the internals, I mean I was part of bukkit before mc officially released so πŸ˜›

noble lantern
#

well it may not work anymore/be the most efficient way anymore to get a random location tbf plus it used async to get Location's

desert musk
#

because these clients can be sorta garbage sometimes

noble lantern
#

it was made almost 3 years ago lmao

#

?paste

undone axleBOT
wet breach
desert musk
#

it's a 32 bit voxel game

#

should run at 900 fps

wet breach
#

almost 64bit now

desert musk
#

oo

noble lantern
desert musk
#

ok copypasting it

noble lantern
#

i doubt it works for 1.18 anymore

wet breach
#

think the only things using 32 bit is just the coordinate limit in the worlds?

noble lantern
#

its really old code

wet breach
#

everything else either doesn't require 32bit or has been moved to longs

desert musk
#

oh nice

#

ok this is helpful

#

ty

noble lantern
#

i think thats max for mc worlds

#

or around that number

#

or 32 billion

wet breach
#

well they set a hard limit

#

to 30million I think it was

#

in either direction

noble lantern
#

imma check rn

wet breach
#

so, you can no longer go past that limit

noble lantern
#

yeh 30mil

wet breach
#

πŸ˜‰

#

Anyways, easier to set a hard limit, then to change all the internals for that

#

so its fine it uses 32bit numbers

#

since it has a limit πŸ™‚

#

side effects of being around a long time

desert musk
#

ok is this proof of it

wet breach
#

or otherwise what others like to call it, being old πŸ˜›

desert musk
#

or were we wrong

wet breach
#

1,410 chunks in the overworld loaded

#

and only uptime of 30 seconds

#

so it seems I was wrong about the spawn radius and that the setting in the config only applies to the over world

desert musk
#

oh yeah now it's 3k

wet breach
#

so at least that is good

desert musk
#

lol

noble lantern
#

3k chunks is still a lot for one person on a server

wet breach
#

but still bad considering how many chunks it will still load πŸ˜›

desert musk
#

yeah

wet breach
#

that is 3k chunks for the spawn, not counting the players having chunks loaded

wet breach
#

what jvm flags do you use to launch your server?

noble lantern
#

not for the one person individually, should of worded that differently mb

wet breach
desert musk
#

lemme see

wet breach
#

use those flags

#

just keep your ram the same, don't use the ram allocation they do

desert musk
#

ok

wet breach
#

but use all the other flags πŸ™‚

#

this should help your server out, and might even make your issue

#

a non-issue

desert musk
#

oh my server runs it straight from the jar

#

is this a problem

#

or do i misunderstand what flags are and how they're used

wet breach
#

no, the jvm flags control how the JVM behaves and how the GC should run

#

javas defaults are sometimes good but for MC they are terrible

#

so we go ahead and tell the JVM how it should actually do things πŸ™‚

#

computers are not there yet in being perfectly able to change settings on the fly for applications lol

desert musk
#

how should i do that? the only way i know how to is by running it with a batch

wet breach
#

well do you do it currently?

desert musk
#

nope

wet breach
#

you just type in the terminal for it to run?

desert musk
#

as i said it runs straight from a jar

#

no it's uhh

wet breach
#

oh you double clicked on it?

desert musk
#

external host

#

and the external host just automatically starts "custom.jar"

wet breach
#

well its fine if its an external host, but you are able to control the JVM flags right?

desert musk
#

let's find out

wet breach
#

as long as they allow you to add JVM flags of your choosing it should be alright, if not then yeah we are back to the original problem and thus need to change some settings and use some plugins to help do what you are wanting lol

desert musk
#

if not then imma switch services

#

lol

wet breach
#

I always used a dedicated server

#

specifically from soyoustart

desert musk
#

i wish i had money for a server

#

oh you rent

wet breach
#

dedicated servers as cheap as like $50/month from there I think it was

desert musk
#

oof

wet breach
#

and then if you want cheaper you can go to kimsufi

desert musk
#

yeah that's smarter than a minecraft hosting website though

#

probably better value

#

is it better value?

wet breach
#

always better to go with proper hosters πŸ™‚

#

proper hosting providers all you full control of the server

#

even if it is a VPS/VM

desert musk
#

mhm

#

ok they say that they already use the best flags πŸ™„

#

which i believe but still

#

let me change them

wet breach
#

these random mc hosters that have panels only are not really proper hosting providers most don't even control the hardware themselves πŸ˜›

desert musk
#

ok back to writing getSafeLocation()

wet breach
#

lol

noble lantern
#

wtf am i retarded or something

desert musk
#

3 year old method still pretty good code though

#

i couldnta done it better

#

i'd be this fancy if i wasn't so new to java

#

and also idfk what a bukkitrunnable really is

noble lantern
#

?runnables

#

?runnable

#

?schedular

#

?scheduler

#

ffs bot

desert musk
#

lol they should add aliases

noble lantern
#

?help

desert musk
#

lmfao

undone axleBOT
#
CafeBabe Help Menu
*Red V3*
**__Admin:__**

selfrole Add or remove a selfrole from yourself.

**__Cleanup:__**

cleanup Base command for deleting messages.

**__Core:__**

embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.

**__Downloader:__**

findcog Find which cog a command comes from.

**__Mod:__**

names Show previous names and nicknames of a member.
userinfo Show information about a member.

**__ModLog:__**

listcases List cases for the specified member.
reason Specify a reason for a modlog case.

**__Permissions:__**

permissions Command permission management tools.

desert musk
#

bad bot smh

noble lantern
#

?schedularprogramming

desert musk
#

hehehe

#

based bot

noble lantern
#

since the bot wont send the link

desert musk
#

they should hire you to be the bot

desert musk
#

maybe i just suck at java and that's why i don't like it lul

noble lantern
desert musk
#

it's just something about java makes me write like shit

#

as opposed to cpp

#

maybe its this IDE

#

makes me lazy

#

anyways it gives me hope and inspires me :prayge:

sharp bough
#

how is this wrong?
return (Location) belts.getAsJsonObject(loc.toString()).get("target").toString();
its saved like this
"Location{world=CraftWorld{name=working0},x=-102.0,y=1.0,z=99.0,pitch=0.0,yaw=0.0}

#

full json

{"Location{world=CraftWorld{name=working0},x=-102.0,y=1.0,z=99.0,pitch=0.0,yaw=0.0}":{"level":1,"target":"Location{world=CraftWorld{name=working0},x=-103.0,y=1.0,z=99.0,pitch=0.0,yaw=0.0}","holding":{},"filters":[]}
worldly ingot
#

Not sure that's doing what you think it's doing. You can't cast a String to a Location

#

You're going to get a ClassCastException

sharp bough
worldly ingot
#

Generally speaking, Java contracts imply that the result of toString() isn't a parseable string. This is the case with a Location as well. You're better off serializing this as your own object or some special string format that you can then parse when re-fetched

#

but casting a String to a Location won't do that for you

sharp bough
#

and scraping the location from the string?

#

similar to that

worldly ingot
#

Yeah basically. Though you would still have to write at least a basic serializer/deserializer for it so long as it's a format you expect

sharp bough
#

aight i can work with that thanks

worldly ingot
#

The ones mentioned below that linked thread by tastybento, for instance

#

o/

sharp bough
#

yea

noble lantern
#

?remapping

#

sad

#

Where can i view remappings for remapped jars, im trying to find what IBlockData is named to i assume its BlockState though

wet breach
undone axleBOT
#

Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.

Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163

noble lantern
#

frost I've already done the remapping, I'm trying to find the link where it showed all the remappings for the methods and classes

I remember there being a link somewhere to view them

delicate lynx
#

is this possibility it?

noble lantern
#

Yep! thats it thanks πŸ™‚

summer scroll
#

Wow, what a helpful site.

#

How long it's been there?

noble lantern
#

iirc quite some time

patent horizon
#

is there a better way to do this?

noble lantern
patent horizon
#

pickaxes are gonna have custom names

patent horizon
noble lantern
patent horizon
#

ohhh

#

right

noble lantern
#

you could even name the pickaxe DIAMOND_AXE if you wanted lmao

patent horizon
#

xd

cosmic pelican
rancid snow
#

take a look at MaterialTags and MaterialSetTag

noble lantern
#

uhh

#

thats not a thing?

#

doesnt show up in my IDE

patent horizon
#

can a switch statement work with just one true/one false?

noble lantern
#

that MaterialTag thing has to be from a external lib

#

or a older version

cosmic pelican
#

or nms

rancid snow
cosmic pelican
#

because it doesn't show up in the 1.18.1 api for me.

cosmic pelican
#

makes sense

rancid snow
#

out of curiousity why not use paper?

noble lantern
#

This is the Spigot discord

cosmic pelican
#

It's better to support everything

#

instead of supporting a fork

noble lantern
#

if you develop for paper you wont support spigot servers

#

but if you develop on spigot you support all of its forks

IE pufferfish, paper, etc

rancid snow
#

pufferfish forks paper BTW

noble lantern
#

yes but its still a fork of spigot

cosmic pelican
rancid snow
#

okay nvm

noble lantern
#

as paper is a fork of spigot

cosmic pelican
#

not that I'd recommend it

#

but there are still people who do

patent horizon
#

it frustrates me a bit. my server is using paper for our core plugin while using a lib thats supported for spigot. paper wants us to use chat components, spigot wants us to use legacy

noble lantern
#

thats why you just develop via spigot API

#

if you use strings for paper it wont care

#

and if paper ever removes the string methods then your gonna have LOTS of angry people

paper viper
#

Does anyone know how often session tokens get reset? Do they get reset if you restart your client?

noble lantern
#

why would you need to know that type of info?

vocal cloud
#

I wanna steal ur token. Send token

noble lantern
#

iirc for minecraft those tokens dont ever reset unless logged out

noble lantern
paper viper
#

πŸ’€

noble lantern
#

Why is that?

#

if your hacked go change your password

#

even if you suspect it, change the password

paper viper
#

No like a mod I used sent the session token

#

To a discord webhook

noble lantern
#

Session ID's are your microsoft tokens

#

ah

#

what mod?

paper viper
#

It was a malicious mod of some sort. I was using it for skyblock and I ended up being stupid

noble lantern
#

if you want skyblock mods use Badlion

#

it comes equipped with skyblock addons

paper viper
#

I’m pretty much screwed though right

noble lantern
paper viper
#

That’s what I did

#

I restarted client too

noble lantern
#

then your gucci

#

unless

#

the mod installed software on your PC

paper viper
#

Nah

noble lantern
#

couldn't hurt to run MalwareBytes scan too

paper viper
#

You sure they can’t do stuff?

cosmic pelican
paper viper
#

Can’t they login tho with session ID

cosmic pelican
#

still use default spigot

#

I don't see your point

noble lantern
#

even discord accounts fall victim to this

paper viper
#

Yeah

#

So I’m screwed right lmao

#

I gotta face the consequences

noble lantern
paper viper
#

Oh that will change the token?

noble lantern
#

yes

paper viper
#

Oh phew

noble lantern
#

because it forces you to relog on your client, which requests a new token from microsoft

paper viper
#

I changed my Microsoft password cause I already migrated

#

Yeah

#

As you can tell I’m a complete idiot

#

I’m a developer and I’m still gullible

viral temple
#

Can somebody tell me what I do wrong here?

noble lantern
#

Whats the error?

viral temple
#

well, I know what was wrong

#

just questioning to see if you guys can figure out 🀣

#

like I'm so dumb..

#

spent hours of debugging

noble lantern
#

well hard to know whats wrong when we have no idea what page is and how its handled

#

i would of just put a debugger in my for loop and from there changed values as needed also <=

viral temple
#

well, it doesn't matter

#

look close at "start++"

#

it should have been "i++"

#

🀦

noble lantern
#

ah fair enough lol

viral temple
#

instead of showing 10 values, it shows them forever xD

maiden thicket
#

hey, i'm trying to get a custom remote console client in javafx (messing around) to work with the chat colors, whats the best approach for that?

maiden thicket
#

o

#

okie ty

noble lantern
#

yee there should be some really good rcon libs tbf

#

Okay, you'll hear me out I'm probably being overly retarded:

I'm trying to cancel block state changes of note blocks (IE when you place a block underneath a note block, it changes the instrument, I'm trying to prevent that from changing) via protocollib but it's not entirely working

Packet listener code: https://paste.md-5.net/uxayicaqug.cs

So the desired activity isn't happening, IE the actual block's instrument isn't changing however it does change one thing which is the note color that is rendered on the client's end, but when logging the data server-sided the notes still stay the same

I've tried canceling the packet on both onPacketSending and onPacketReceiving and both don't really achieve the effect i want to do

glossy venture
#

maybe send a packet with the unmodified data to the player

noble lantern
#

Thing is wouldnt the packet in that listener already be modified?

#

or is it only modified after the fact

glossy venture
#

idk how it would work but you could maybe construct a new packet for the note block with the unmodified data from the server and send that

#

schedule something to send it after handling the packet

#

or snth

noble lantern
#

not a bad idea, i could definitely do that

In that case, then how would I be able to convert an NMSBlock to a standard Bukkit block? I 100% know you cant cast directly so i was planning to just get the position of that block in the world, the only issue is i seem unable to find any coordinates methods in the NMS Block class and nothing when googling seemed very helpful

#

my lib that checks what block is what what on the Bukkit block and retrieving its BlockData, NMS's block data or BlockState doesnt really support casting to a NoteBlockNMS, and even then the NoteBlockNMS doesnt have methods for getting the note + instrument

#

ahh

#

MULTI BLOCK packet lets me get block position

#

nice at the same time it makes BlockData not accesible smh

#

packets are a load of bs lmao

glossy venture
#

protocol is complicated

#

well idk how complex it really is

noble lantern
#

it seems easy its just results arent exactly as i had in mind

#

im gonna take a look and see how oraxen does this

wet breach
#

and then if need be from CraftBlock to the api side

noble lantern
#

iirc it would just be getHandle() or casting to CraftBlock but:

No methods returning craft block exist in: net.minecraft.world.level.block.Block

And Block isnt implementing or extending CraftBlock so it cant be cast to it

#

Block doesnt even have methods retuning a Object either

wet breach
#

Look under CraftBukkit

#

there is a method that you can stick NMSBlock into to get a CraftBlock instance

noble lantern
glossy venture
#

net.minecraft.__.Block

noble lantern
noble lantern
#

Block is the actual Block instance

#

here ill show

glossy venture
#

does it store an instance for every block?

noble lantern
#

oh wait i see what you mean

wet breach
#

its like CraftBukkit.getFromNMS() or something similar

noble lantern
#

So yeah it is a type but the actual Block class holds data inside of it too just nothing related to BlockPos

glossy venture
#

isnt that Blockstate

noble lantern
noble lantern
wet breach
#

its org.bukkit.CraftBukkit.CraftBlock

noble lantern
#

Ah its path is a little different, but the static methods for that does return a CraftBlock but requires you to have a BlockPos:

#

which is uh, what im trying to get lmfao

#

BlockData or Block provides neither of it, isnt accesible from reflection either as neither store a BlockPos or a Vector3

#

its odd that ProtolLib doesnt provide a block position for this packet or something of the sorts

wet breach
#

well if you have a NMS block, it should have a block position?

glossy venture
#

i hate how the craftbukkit package is still version dependant

noble lantern
glossy venture
#

the Block class is just the block type iirc

noble lantern
#

I am able to get a net.minecraft.world.level.block.state.BlockState from protocollib as well, but nothing reguarding position there either

glossy venture
#

and blocks extend thata

noble lantern
wet breach
glossy venture
#

like BlockDispenser or somehting

wet breach
#

if you have a location, you can stick that into CraftBukkit methods to get a block instance

noble lantern
wet breach
#

ok what packet are you messing with that doesn't have a location?

glossy venture
#

use netty listener lol

noble lantern
#

BLOCK_CHANGE which is the event that is fired for updates like note blocks changing instruments

#

theres MULTI_BLOCK_CHANGE but its not fired for note blocks

wet breach
#

BLOCK_CHANGE should contain an array or a chunk of some sort containing the blocks

glossy venture
#

isnt multi block change for multiple block changes per tick

wet breach
#

oh just a single block it should still have a location of some sort

glossy venture
#

so maybe you should listen to that too

#

?

#

idk

noble lantern
noble lantern
glossy venture
#

oh

wet breach
#

yeah just checked

#

block change packet has a location field

#

which is the block's coordinates

glossy venture
#

then you can get the world from the player

#

and get the block

wet breach
#

well it should have the world in the location

glossy venture
#

oh is it like an org.bukkit.Location

noble lantern
#

but ill try again

wet breach
#

try it with a 3

#

0 could refer to the packet ID

noble lantern
#

its an array in a sense

#

1 gets index out of bounds error

wet breach
#

that is odd

#

because there is 2 fields required for that packet

#

location and blockid

noble lantern
#

it returns a StructureModifier<BlockPosition> for getSectionPositions

wet breach
#

structure? o.O

noble lantern
#

com.comphenix.protocol.reflect.FieldAccessException: No field with type net.minecraft.core.SectionPosition exists in class PacketPlayOutBlockChange

#

hmm

#

imma check other methods really quick

wet breach
#

do note that the server doesn't listen for that packet

#

rather it sends it

noble lantern
#

Yeah im modifying the packet thats Server -> Player

#

ie onSendingPacket

#

there is getBlockSectionPositions ill try that instead

#

that seems promising

wet breach
#

any particular reason why you need to stop the packet?

noble lantern
#

one sec

#

as i have to use a runTask to actually make it function

wet breach
#

yeah, that flicker isn't going to go away unless you cancel the event like I said the other day, don't remember why it was you couldn't just cancel it lol

noble lantern
#

it is cancelled

#

thats the thing

#

BlockPhysicsEvent is really weird

#

here one sec

#

if i run it just like this

#

it simply refuses to prevent the block updates

#

uncomment the runnable, and it works like in the video

#

wow what an insult protoclib

#
 net.minecraft.network.protocol.game.PacketPlayOutBlockChange@532850[
    a=BlockPosition{x=0, y=65, z=1}
    b=Block{minecraft:note_block}[instrument=banjo,note=0,powered=false]
  ]
#

so its 100% there lmfao

#

but refuses to give me it lmao

noble lantern
#

hmmm

#

worth a try

#

one sec

#

ah wait

#

BlockPhysicsEvent doesnt provide a player

#

forgot thats why i didnt try that

rough drift
#

not the evnet

#

I've done this before myself

#

You either A use protocol lib to cancel the packet, or B inject your own packet handler in the player's pipeline

wet breach
#

odds are whatever physics event there is, the player is going to be like within 5 blocks of it lol

#

well in regards to what you are doing

noble lantern
#

however frost

#

not a bad idea

#

i can just send that update to all nearby players

#

sec ill try that then go back to protocol

rough drift
#

a player does that and another one is 10 blocks away

noble lantern
#

could just send an update to all players on the server but...

#

that sounds expensive for cpu

#

whats weird is oraxen isnt doing anything for packets theyre just using the raw BlockPhysicsEvent

#

so i wonder if theyre blocks also have this flicker effect

#

frost solution you provided kind of works sec ill show

summer scroll
#

What gradle task should I run to build my plugin project?

#

I'm not using shadow jar

noble lantern
noble lantern
#

either build or the config on the bottom

summer scroll
#

Okay

noble lantern
# noble lantern

this one helps the flickering be a lot slower, feels like less than a tick but due to a client sided thing it still considers it another state for a second

summer scroll
#

Is compileOnly the same as provided scope?

noble lantern
#

yessir

summer scroll
noble lantern
#

send your gradle file

#

guys brb

#

cat wants to go to bed gotta give her shit

summer scroll
wet breach
wet breach
restive tangle
#

What is a plugin message in BungeeCord?

noble lantern
#

when im back at my pc im gonna give protollib one last shot

#

?pluginmessage

#

?pluginmessaging

#

ffs this bot

#

?pm

#

ffs

noble lantern
#

it basically allows spigot and bungeecord plugins to communicate to each other

summer scroll
restive tangle
#

I read it, it's why I'm here

noble lantern
#

aglerr ill check your file when im back at my pc πŸ™‚

summer scroll
#

Oh okay πŸ‘

noble lantern
#

?paste

undone axleBOT
noble lantern
#

this on creates a build task like shown here

noble lantern
restive tangle
noble lantern
#

It allows communication via strings/bytes in a sense through a socket

wet breach
noble lantern
wet breach
#

since you should have the block coords in question, you can use some math in combination of how far render distance is and obtain players within in that radius quickly

noble lantern
#

tbh its probably faster than what it is in the video

#

since im not 20tps

wet breach
noble lantern
#

ahh i see

wet breach
#

the server would as they got within render range send a chunk update

noble lantern
#

so i can just get the server render distance *16 and then force render for all those players in that range

wet breach
#

yep

noble lantern
#

okay ill use that as my fallback if protocollib doesnt wanna work for me :p

wet breach
#

anyone beyond that their clients would request the block info anyways which would get the updated changes anyways πŸ™‚

restive tangle
noble lantern
#

say transferring between servers

#

you would send a Connect and server string to the player

wet breach
#

What exactly do you not understand about the plugin messaging system?

summer scroll
noble lantern
wet breach
noble lantern
#

^

restive tangle
#

I don't know how it's supposed to be used

noble lantern
#

how about this

wet breach
#

Well I can tell you how it works

noble lantern
#

what are you trying to do that you think you would need plugin messaging for?

summer scroll
restive tangle
#

I'm not doing anything, I'm just reading up on Bungee

noble lantern
#

brb

wet breach
#

So the plugin messaging channels are part of the MC protocol. They allow you to use the players existing connection between bungee and the mc server to send information

#

since the server listens for packets from the player and the bungee listens for packets coming back, you can use it as a way to talk to those two things without having to create a new connection πŸ™‚

restive tangle
#

Alright, thanks

summer scroll
#

smh, this is why i don't use gradle

restive tangle
#

Oh, another thing. What are BungeeCord plugin message channels and sub channels?

wet breach
#

same thing

#

Bungeecord has to implement it just like the mc server does so that plugins on the bungeedcord proxy

#

can utilize it to speak with whatever is on the mc server

rough drift
#

(Tell me when I can ask something)

wet breach
#

?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!

rough drift
#

and wait until ya'll are done to ask mine

wet breach
#

Well I am quite capable of talking to multiple people πŸ˜›

rough drift
#

Talking for the other people, who might get confused πŸ˜›

#

anyways

#
protocolManager.addPacketListener(new PacketAdapter(this, ListenerPriority.NORMAL, PacketType.Play.Server.ENTITY_SOUND) {
    @Override
    public void onPacketSending(PacketEvent event) {
        System.out.println("Sending entity sound packet");
    }
});

protocolManager.addPacketListener(new PacketAdapter(this, ListenerPriority.NORMAL, PacketType.Play.Server.NAMED_SOUND_EFFECT) {
    @Override
    public void onPacketSending(PacketEvent event) {
        System.out.println("Sending named sound packet");
    }
});

protocolManager.addPacketListener(new PacketAdapter(this, ListenerPriority.NORMAL, PacketType.Play.Server.CUSTOM_SOUND_EFFECT) {
    @Override
    public void onPacketSending(PacketEvent event) {
        System.out.println("Sending custom sound packet");
    }
});
```Seems to not fire ANY of these (Context: Trying to detect spyglass closing)
#

Imma try with packet receiving

#

Nevermind

#

basically none of those are fired

wet breach
#

you can't I don't think

rough drift
#

You can, spyglass has a stop using sound packet

#

I can just listen to that

#

but the thing is none of those are fired

wet breach
#

because they are not sent to the server

#

don't see why it would be

rough drift
#

how do other clients know when a client stopped using a spyglass?

#

also its in the sound packet list

#

ID 1013

wet breach
#

do they get a sound notification too?

noble lantern
#

wtf

#

theyres spyglasses in mc?

rough drift
#

yes???

noble lantern
#

wtfff

rough drift
#

they have been here since 1.17 released

#

basically optifine zoom

noble lantern
#

yoooo thats sick i just tried it

rough drift
#

ye

#

maven team

lavish hemlock
#

I use Maven too but I honestly fucking hate it

noble lantern
#

i prefer either or

rough drift
#

better than gradle

noble lantern
#

depends on the project

lavish hemlock
#

Spent 3 hours trying to get my fucking Maven configuration to work before I just gave up on my project as a whole

#

My opinion:

noble lantern
#

if i know im gonna need to depend on a lot of external jars gradle is easiest

#

depending on jars in maven is aids

lavish hemlock
#

Gradle, Maven, Ant, and Bazel are all terrible

#

There are no good Java buildsystems

noble lantern
#

im not saying gradle or maven is shit

lavish hemlock
#

Well there's one but it uses fuckin' Python for plugins

noble lantern
#

theyre both good

lavish hemlock
#

I also just

#

don't use WSL

#

since it breaks too much shit

noble lantern
#

i prefer javac command

#

imo

lavish hemlock
#

Spent like 2 hours trying to get my Rust configuration to work

noble lantern
lavish hemlock
#

Uninstalled WSL some time ago as I was gonna move my Windows PC away from programming

#

...decided to move back to programming on it

#

Didn't reinstall WSL

#

Rust compiled fine πŸ‘

#

So effectively, compiling Linux Rust on Windows IntelliJ for a Linux target fails to work

#

It was unable to find a dynamic lib or smthn

#

Researched it, had that lib installed (on Linux)

#

Also had other issues with WSL

#

Like the fact I had to fix it resetting some configurations I made to its like, network adapter or whatever

#

WSL2 will, out of the box, be incredibly slow to download things

#

There's an obscure TCP feature you have to disable on it

#

But then it reset me disabling it

#

So fuck you WSL

noble lantern
#

why not use Go

#

:))

lavish hemlock
#

(Also it doesn't quite work with GUI apps yet, but I imagine they'll eventually implement a X11/Wayland display server adapter or smthn)

lavish hemlock
#

It's one of those things where I tried to like it

#

I tried to pretend it made sense

#

But in the end I just didn't use Go because why the fuck would I?

#

And no I didn't just take a single glance at Go

#

I read the documentation and everything

noble lantern
#

fair i cant use go for the life of me

#

tried making a discord bot

#

failed horribly

lavish hemlock
#

Unlike SOME PEOPLE

#

Who see screenshots of Kotlin or Rust

#

and immediately assume

#

"I dun like it"

#

because it's too different or too complicated

noble lantern
#

who tf reads docs

lavish hemlock
#

BECAUSE OF FUCKING COURSE IT IS

noble lantern
lavish hemlock
#

YOU DON'T KNOW THE SYNTAX

#

HOW ARE YOU SUPPOSED TO UNDERSTAND IT

noble lantern
#

maow my man

#

you okay

#

here lets do a breathing exersise

#

ready? breath in

lavish hemlock
noble lantern
#

3

lavish hemlock
#

Also exercise*

noble lantern
#

2

#

1

#

breath out

lavish hemlock
#

Aaaand I've had anger management issues my whole life, breathing exercises don't work on me

noble lantern
lavish hemlock
#

I mainly just have to spend 30 minutes cooling down

lavish hemlock
noble lantern
#

lolcode

#

furrycode

#

?

lavish hemlock
#

Those are esolangs, they don't count

#

They're meant to be jokes

noble lantern
#

just like

lavish hemlock
#

People don't defend the honour of esolangs lmao

noble lantern
lavish hemlock
#

'cept me @ FurASM

#

FurASM is my baby

noble lantern
#

in all honesty im just joking, never used rust but sounds like a pain

lavish hemlock
#

I don't like that either

#

One of my strongest pet peeves is like

#

In the middle of a debate
"Oh lol I'm just joking"

#

I can't interpret that tone properly

#

I'm usually good at seeing tone in messages but when I'm trying to argue a serious point my brain has a Poe's law moment and takes everything seriously

lavish hemlock
#

It introduced a lot of unique, brave ideas.

noble lantern
#

maybe i just sound serious when i talk lmao

#

90% of the time im just talking out my ass unless im helping someone

lavish hemlock
#

No it's just me

noble lantern
#

im not the person you want to debate with, im literally dumber than a box of rocks

lavish hemlock
#

Told ya, I can't interpret jokes as jokes when I'm in a serious mindset

wet breach
#

I am a maven fan

noble lantern
#

jk

lavish hemlock
#

I mean I definitely prefer Maven over Gradle but I just don't like Maven very much

wet breach
#

what is it you don't like?

lavish hemlock
#

I kinda miss Gradle's simplicity when it comes to handling multi-module projects :p

noble lantern
#

gradle its so easy to import external jars

#

mavens aids at it

lavish hemlock
#

And also the fact that everything is a lot more concise...

#

And uhhh

wet breach
lavish hemlock
#

I can usually figure out some solution to any problem since Gradle has a lot more StackOverflow answers than Maven

noble lantern
#

gradle its one line of code

#

and you never have to install the file

#

just import a directory with jars and boom

lavish hemlock
#

Oh yeah I hate installing shit

wet breach
#

but you can import a dependency without a command too

lavish hemlock
#

I hate I have to install a subproject to be able to use it in other subprojects like tf?

#

I can't figure out how to automate Maven

#

It's just way too fuckin' complicated

noble lantern
#

compile fileTree(include: ['*.jar'], dir: 'libs') does maven have something like this

wet breach
#

you just have to specify where its pom is at

noble lantern
#

where it auto imports jars in a directory

lavish hemlock
#

I don't like having my project depend on file locations

#

It just feels icky to me

wet breach
#

you don't, but I mean you can't just expect maven to automatically know either

noble lantern
#

how dare maven not read my mind

lavish hemlock
#

Well the project is listed in my parent module's submodules, right?

#

Shouldn't the other submodules know that each other exist?

#

That's how it works in Gradle :p

wet breach
#

only if the submodules have anything to do with each other

#

but yes they know they each exist

lavish hemlock
#

What is that supposed to mean

wet breach
#

you can have 2 submodules not related to each other at all

#

as in they do two entirely differently things and only get compiled into the final product

#

in such cases you really don't want the two interfering with each other

summer scroll
#

Are there any enchantments that can be applied to all materials?

noble lantern
#

not really iirc

#

that was patched loooong time ago

#

who remember fire aspect sticks

summer scroll
#

I just want to make the itemstack glowing

lavish hemlock
#

good luck :)

summer scroll
#

damn

#

ty tho

native pond
#

hello

#

can i get help making a plugin like login

kindred valley
#

hello guys i have name, surname and id with a section i want to get name and surname by searching its id but i couldnt do it can you help me

kindred valley
#

yml

lavish hemlock
#

Oh