#help-development

1 messages · Page 1530 of 1

hybrid spoke
#

most likely. idk if there are any other internal use cases for each but i dont think so

quaint mantle
#

Is it the same with bukkit.getplayer and main.getserver.getplayer

hybrid spoke
#

since Bukkit.getScheduler is also just server#getScheduler

#

there shouldn't be any difference at all except the laziness

#

and being a lazy developer == being a good developer

quaint mantle
#

Is it more efficient to save a hashset of all online players as they join and leave instead of doing bukkit.getPlayer

wraith rapids
#

probably not

hybrid spoke
#

Bukkit#getPlayer just takes the player out of the already existing collection #getOnlinePlayers

stone sinew
wraith rapids
#

and it'd have to be a map not a set

#

i don't remember the exact backing impl of getPlayer

#

but i'm assuming it is map based

quaint mantle
#

Alright 👍

ivory sleet
#

It’s mostly good for unit testability but no one actually does that since unit testing in spigot require you to emulate an entire server

quaint mantle
#

lawl

wraith rapids
#

real men test on prod anyway

quaint mantle
#

Absolutely

#

Fixing the nullpointers as they come flying in instead of writing proper checks 😎

ivory sleet
#

Needless to say print statements are nice

wraith rapids
#

if half of your code doesn't consist of stouts you're doing something wrong

opal juniper
#

Anyone know a way of sending data without a separate backend?

#

Between servers

#

That aren’t bungeeafied

ivory sleet
#

Redis

hybrid spoke
#

PMC, Redis

ivory sleet
#

PMC is bungeeafied arguably

hybrid spoke
#

yeah that came when i pressed enter

opal juniper
#

Lmao

ivory sleet
#

🥲

opal juniper
#

Ok - I’ll have a look at redis

ivory sleet
#

Take a look at Jedis java library it has the pub sub you need

opal juniper
#

Ok thanks

#

What is speed like?

#

Suppose that the servers are local host to each other

#

Or, at most the local network

hybrid spoke
#

you mean how fast redis is?

opal juniper
#

Yeah

hybrid spoke
#

It is super fast with amazingly high throughput, as it can perform approximately 110000 SETs per second, about 81000 GETs per second. It also supports a very rich set of data types to store.

opal juniper
#

Oh lmao

#

Thanks

quaint mantle
#

Hey guys ! What bukkit's classes would be useful in order to calculate areas of the world etc ? Idk if I'm missing something

#

areas or volume

#

with x y z

#

thanks for help

hybrid spoke
#

Location, World, Chunk, Vector thinkRoll

quaint mantle
#

Hmm yea vectors seems the way to go, I'll look into them, thanks

clear iron
#

what did i do wrong that this doesnt work

#

i already gave myself a stick with custom model data 3

hybrid spoke
#

define doesnt work

clear iron
#

but it doesnt work

#

doesnt send any messages

#

unless iam doing something wrong

hybrid spoke
#

what about checking if the current hand does have the item instead of getItemInHand

rocky glacier
#

When i add Vault to my plugin do i need to download the vault plugin? or API thing? I use Eclipse

hybrid spoke
# clear iron wdym

#getItemInMainHand
also you are not checking if the player is right or leftclicking

#

and

ItemMeta meta;
meta =.... 
// why

clear iron
#

i started learning spigot/paper yesterday

hybrid spoke
#

seems more like you started learning java

clear iron
#

by accident

hybrid spoke
#

try to replace getItemInHand with getItemInMainHand. otherwise do a else on your if statement and debug the output of the custommodeldata

wraith rapids
#

try to look up a java tutorial

sullen dome
#

?learnjava

undone axleBOT
hybrid spoke
sullen dome
#

oh my

#

are you kidding?

hybrid spoke
sullen dome
hybrid spoke
#

also -> Plugins should check that hasCustomModelData() returns true before calling this method.

quaint mantle
#

can someone explain me what difference a BlockVector has with a Vector in bukkit ?

rocky glacier
#

@chrome beacon When i add Vault to my plugin do i need to download the vault plugin? or API thing? I use Eclipse

quaint mantle
#

doesnt a vector already in Block units ?

#

is this what BlockVector refers to ? a vector in BlockUnits ?

sullen dome
chrome beacon
#

Or import the jar directly

sullen dome
#

please

chrome beacon
#

?jd

chrome beacon
#

;/

sullen dome
#

did i ever say that integer-double-converting is so awful?

#

if not, it is awful

clear iron
#

i found it

maiden heath
tardy delta
#

is it possible to use packets to change the players username above their head?

chrome beacon
#

Yes

tardy delta
#

i'm figuring out how

chrome beacon
#

Change it in the Entity Metadata packet

#

wiki.vg contains the rest of what you need

sullen dome
#

isn't that what Entity#setCustomName does?

maiden heath
#

I don't think that applies to players? I could be wrong

chrome beacon
#

^

sullen dome
#

should iirc

#

but idk

sullen dome
#

i said nothing...

rocky glacier
sullen dome
#

uhh... what are you trying to add?

rocky glacier
#

vault

sullen dome
#

STAINED_GLASS_PANE is minecraft-side

rocky glacier
#

yh but it says it cant resolve?!

chrome beacon
#

Did you add spigot too

rocky glacier
#

yh i did

sullen dome
#

yeah, but thats definitely not vault's fault

#

or any libraries fault in general

#

except spigot

rocky glacier
#

nono i fixed that i think

#

the error for vault went away

#

but now its those errors

sullen dome
#

i changed so much in my code now, i feel like my whole pc will crash when i re-build lmao

chrome beacon
rocky glacier
#

1.16.5

chrome beacon
#

Add 1.8.8

rocky glacier
#

But i want it for mc v 1.16.5

chrome beacon
#

Well the plugin is made with 1.8

#

So use 1.8 to compile it

#

It might still run on 1.16.5

sullen dome
#

why dont you just use maven? there are no errors when using it in 1.16 tho

#

changing to 1.8 will probably do nothing

rocky glacier
#

ight i'll try

hybrid spoke
sullen dome
#

vault should be fully compatible to 1.16

chrome beacon
#

Yeah it is

rocky glacier
#

it is

hybrid spoke
#

oh well thought spigot itself

#

yeah vault is cross version compatible

main tangle
#

how can i make a custom entity for 1.12.2?

hybrid spoke
#

and how to google

chrome beacon
#

Since you're new to spigot (and Java?) you should wait

sullen dome
#

xd he's straight

hybrid spoke
#

he's going from 0 to 100 really quick

sullen dome
#

i mean, custom entity means probably nms

#

soooo

hybrid spoke
#

most likely

sullen dome
#

yeah, nms is not a thing you should start with

wraith rapids
#

and you should use a modern version

#

or even 1.8

#

nobody uses 1.12

hybrid spoke
#

i do

wraith rapids
#

well you're gay

hybrid spoke
#

i can't be gay if i am a member of your religion

sullen dome
#

lol

#

people use 1.12, because much people don't update higher than 1.12

#

an infinite loop of non-updating-people

opal juniper
#

Why not

#

1.12 is a bad version to stay on

hybrid spoke
#

1.12.2 is stable and good

sullen dome
#

^

opal juniper
sullen dome
#

compare 1.12 to 1.16 in performance

#

and there are not many people who need updates, because they play on 1.12 anyway

#

so no need to update

#

i mean, why updating stuff, if no one asks for

hybrid spoke
#

versions >=1.16 are totally fine too and very nice for having a great survival OR mmorpg experience. but if i would have a minigames server i would never upgrade to higher than 1.12.2 i guess

wraith rapids
#

for minigames perhaps

#

but minigames are gay

sullen dome
#

you are gay

hybrid spoke
#

whats not gay?

wraith rapids
#

i am the straightest man

sullen dome
#

no youre not

#

gay == cool

#

and you are definitely cool

wraith rapids
#

i am glacial

ivory sleet
hybrid spoke
#

what a roasting compliment

#

i mean to be gay is nothing bad

sullen dome
#

of course not

hybrid spoke
#

nah i stop here i am bringing myself in a not-nice situation

sullen dome
#

lol

ivory sleet
#

Which gay are we talking about btw? Happy or homosexual?

sullen dome
#

lol

hybrid spoke
#

happy gay?

wraith rapids
#

the one that gets thrown off rooftops and stoned to death in certain countries

sullen dome
#

yea

ivory sleet
#

Oh

sullen dome
#

so.. probably the second one

summer scroll
#

that's nice

sullen dome
#

except you're beeing stoned for beeing happy

hybrid spoke
sullen dome
#

wouldnt surprise me today anyway

wraith rapids
#

you should respect their culture

#

it is beautiful and diverse and peaceful

sullen dome
#

which culture?

wraith rapids
#

any culture

sullen dome
#

well not at all

ivory sleet
#

1.8 culture 🥲

hybrid spoke
#

since when does gay means being happy

sullen dome
#

i don't support/respect any culture who kills people who are loving their own gender

#

sorry, but just no

wraith rapids
#

it used to be the original, literal meaning of the word

#

you sound islamophobic

#

perhaps you should be sent to a mental readjustment camp

sullen dome
#

lol

hybrid spoke
sullen dome
#

so... just for example...you think terrorism is okay? i mean.. it's their culture... they're believing everyone who doesn't believe in their believes has to be killed.

#

hard example, i know

wraith rapids
#

it is a culture of peace

#

they're just trying to make the world a place of peace

#

through terrorism

sullen dome
#

it's not peace at all

wraith rapids
#

the logic is simple

sullen dome
#

to kill people

wraith rapids
#

you just haven't read their holy book enough to understand it

quasi flint
#

Does the player.sendMessage send it to every player in the world?

hybrid spoke
#

if you aren't one of them you aren't friendly. simple.

ivory sleet
#

No Player2606

hybrid spoke
quasi flint
#

;7

wraith rapids
#

once everyone else is dead, the world will be at peace

ivory sleet
#

It sends it to the player you call the method on

wraith rapids
#

all infidels to the chopping block

hybrid spoke
quasi flint
#

well then ima loop through everyone to semd em the death message

summer scroll
hybrid spoke
sullen dome
#

there's surely a method for that in PlayerDeathEvent

#

^

quasi flint
#

.setDeathMessage

#

i am retarded

wraith rapids
#

and the terrorist incidents are mostly done by the deep state anyway

quasi flint
#

thanks 😄

hybrid spoke
#

i can feel the bot in my neck. is there a way to deactivate auto-mention when answering to a message?

sullen dome
#

yea

wraith rapids
#

jet fuel can't melt steel beams

sullen dome
#

but you have to disable it everytime you answer something

wraith rapids
#

the lizardmen in the US deep state were responsible for 911

ivory sleet
sullen dome
#

thanks to discord

opal juniper
#

Does Jedis require a redis server running?

#

im assuming yes

wraith rapids
#

probably with backing from israel

ivory sleet
#

Yeah

hybrid spoke
opal juniper
sullen dome
#

nope

hybrid spoke
sullen dome
#

maybe there's a bd plugin for it... but it's not possible without breaking tos

ivory sleet
#

^

sullen dome
hybrid spoke
#

nope

sullen dome
#

it is

hybrid spoke
#

nope

sullen dome
#

discord says so..

hybrid spoke
#

nope

sullen dome
#

one sec

ivory sleet
#

It literally is

hybrid spoke
#

already went to the support a 1000 times

wraith rapids
#

nobody gives a shit about the tos

hybrid spoke
#

because of any modifications

sullen dome
#

and it's still against it.. if someone gives a shit, or not

hybrid spoke
#

it just breaks the tos if any plugins is doing in the tos downwritten prohibited things

#

or modifying the code in any way

ivory sleet
#

They can’t ban betterdiscord but anyone who uses it can be banned since they’re breaking against tos

hybrid spoke
#

still not

sullen dome
#

betterdiscord is injecting into discord pretty surely

ivory sleet
#

It is

sullen dome
#

so it's most likely against tos

hybrid spoke
#

betterdiscord itself is not against the tos

#

just the addons you can activate

sullen dome
#

why does discord says so

opal juniper
#

wait does redis only support windows?

sullen dome
#

i mean...

ivory sleet
#

Jeff I believe both?

opal juniper
#

sorry

#

i mean linux

wraith rapids
#

the tos is pointless anyway and nobody cares about it

opal juniper
#

i can only see linux install

sullen dome
#

yeah, i use bd tho

#

i dont give a single piece of shit

wraith rapids
#

that's the spirit

opal juniper
#

the only way i can see to install redis on windows is to get wsfl

wraith rapids
#

since you don't respect the ragheads because they stone the homos, you shouldn't respect discord tos either because they harbor CP and other degenracy

hybrid spoke
#

betterdiscord itself is not forbidden by the tos. just the modifications coming with it. if you have them disabled you are fine.

forbidden modifications would be:

  • see chats you can't see
  • message logging
  • automatic sent messages or status updates
  • ....
sullen dome
#

you're literally much much overacting... holy fuck

wraith rapids
#

no, really, discord is an enermous cesspool of degeneracy including but not limited to child pornography

#

i wouldn't respect their tos either

hybrid spoke
sullen dome
#

lets just say to not respect anything

wraith rapids
#

i'm using ripcord because the pisscord client is so fucking heavy I can't run it on this shitty machine

#

that it infringes the tos is just a bonus

ivory sleet
opal juniper
#

that is for linux tho right?

quaint mantle
#

How I can check a fly?

wraith rapids
#

first you need to catch it

#

for that you will either need fly spray or a web

#

then you probably want a magnifying glass, as flies are very small

sullen dome
#

i literally have this small nano-fly flying around

#

cannot catch it at all

#

it doesnt care about any traps.. it only cares about flying into my nose

#

i'd call him and me friends

wraith rapids
#

don't the micro flies die in like 2 or 3 days

sullen dome
#

well

wraith rapids
#

they have a super short lifespan

sullen dome
#

he apparently doesnt

wraith rapids
#

sounds perturbing

quaint mantle
#

But how i can check fly

sullen dome
#

except maybe i have more than 1

#

whooo, more frieeends

quaint mantle
#

Flyticks?

hybrid spoke
hybrid spoke
#

and than there is a fancy method #isFlying

#

or listen to the playermoveevent

wraith rapids
#

maybe they shouldn't have made their client so fucking shit if they didn't want people to use alternatives

hybrid spoke
wraith rapids
#

only because you have an abundance of resources

#

and you don't know better

#

i'm not going to start ranting about it again, if you want to know why I think it is shit you can use the discord search function

#

which, by the way, is also shit

next stratus
#

Can you send text messages? Yes.
Can you talk via voice to other people? Yes.
Can you send files? Yes.
That's all discord is used for, and it does all those jobs perfectly fine.

wraith rapids
#

can you go to the moon with a catapult? yes.

ivory sleet
wraith rapids
#

you can't do it well

opal juniper
#

idk about the "make" command

wraith rapids
#

it doesn't work good

opal juniper
#

its fine tho

wraith rapids
#

it could be done better

opal juniper
#

i found a way

next stratus
#

It does the job doesn't it?

wraith rapids
#

it does the bare minimum that could maybe vaguely be considered its job

#

and does it poorly

#

that doesn't mean it's not shit

sullen dome
#

i couldn't say it better

hybrid spoke
next stratus
#

Discord has enough features as is.

wraith rapids
#

it has too much bloat

ivory sleet
#

Apparently not

sullen dome
#

tf

ivory sleet
#

Since people are using these client mods

next stratus
#

It works fine for what it needs to do so.

wraith rapids
#

it doesn't

next stratus
#

It does tho.

wraith rapids
#

it doesn't, though

next stratus
#

I can send messages using it fine.

wraith rapids
#

i can't

next stratus
#

Why not

ivory sleet
#

Sure it works but people don’t seem satisfied enough as it is

wraith rapids
#

because it requires too many resources to do so

next stratus
#

?

wraith rapids
#

because it is inefficient and bloated and shit

next stratus
#

It's not tho.

wraith rapids
#

it is

ivory sleet
#

Chromium 🥲

wraith rapids
#

i can hardly start it up on a lower end machine

sullen dome
#

discord needs a theme feature. and they cannot hide behind PeOpLe cAn uPlOaD CrAsH ImAgEs
if they could, they could also do that by sending you a picture/gif.

next stratus
#

I mean, it starts up fine for me

sullen dome
#

so its obvious that they are just too dumb to do such a feature i guess, idk

wraith rapids
#

yes, and like I said, it's because you have an abundance of resources

#

I do not

#

I don't think I should need half a gigabyte of physical memory to run discord, or allocate a quarter of my cpu time to sending text messages

#

I think it is inefficient, overly bloated, and shit

opal juniper
#

How can i be subscribed to a redis server + also keep the server running 🙃

next stratus
#

It doesn't even do that..

wraith rapids
#

it does

sullen dome
#

discord is really shitty when it comes to cpu performance

wraith rapids
#

it's literally a browser in a bottle with bundled in webpages

#

inefficiency is a given

sullen dome
#

discord sucks almost my whole power when talking in a vc

next stratus
#

I've never had these issues?

sullen dome
#

whats your pc specs

wraith rapids
#

even on idle the discord client uses a quarter gigabyte of physical memory and like a quarter of my available cpu time

next stratus
#

I got a i9 and 32gb RAM

sullen dome
#

lmao

wraith rapids
#

yeah, no shit you don't face these fucking issues

sullen dome
#

ofcourse you dont have problems tf

#

i have a ryzen 5 3600

next stratus
#

discord is using 3% RAM max...

sullen dome
#

one of the best midclass cpu's

next stratus
#

ryzen. there's your issues

sullen dome
#

maybe even the bestz

#

YEAH

wraith rapids
#

what, do you think I should buy a 2000 dollar computer so I can run a shitty chat application?

sullen dome
#

why isnt discord optimized to use ryzen

wraith rapids
#

fuck you and fuck your inefficient expectations

sullen dome
#

because its fucking inefficient and sucks dicks

next stratus
#

I mean, ryzen isn't actually that good imo.

ivory sleet
#

What’s not good about it

wraith rapids
#

your computer shouldn't need to be good to use a fucking chat application

sullen dome
#

^

wraith rapids
#

it's a fucking chat application; text on a screen

#

it shouldn't squeeze my processor to overdrive

sullen dome
#

my minecraft runs at 600fps - so it should be obvious that a fucking chat app can run smoothly

next stratus
#

one thing what put me off getting AMD is the lack of the backup video

#

Like, if your gpu goes you're screwed

wraith rapids
#

anyway

#

discord is shit

next stratus
#

in your eyes somehow.

sullen dome
#

there's my "agree" duck

wraith rapids
#

yes, in my eyes that have 3gb of memory and use 600mhz processors

#

yes, it is shit

#

because it doesn't fucking run

next stratus
#

Honest question, how long would it take for them to "fix it"?

sullen dome
#

too long

#

you can see how long it takes

#

when did bd came out?

hybrid spoke
wraith rapids
#

i don't know, but a guy wrote a nearly feature complete reimplementation of the client in C in like a month

#

a single guy

#

so their multi million diverse dev team can probably do it faster and better

#

with all of their nitro jew gold

sullen dome
#

you're far away

hybrid spoke
#

i mean duck - ducking

wraith rapids
#

I'm not asking them to fix it, either; other people already fixed it on their behalf

sullen dome
#

my head can think from the bed to the fridge

wraith rapids
#

I'm just saying that their product is fucking shit

next stratus
#

I gotta work out how to fix the stupid code with fawe and worldedit. this'll be "fun"

sullen dome
#

remember guys

#

the time

#

were we all used skype?

#

ahh good old times

wraith rapids
#

even skype was more lightweight

sullen dome
#

yep

summer scroll
#

never used skype lmao

wraith rapids
#

at least it wasn't electron, I don't think

sullen dome
#

skype was OG

wraith rapids
#

it did crash and burn all of the time, but at least it didn't kill my machine when idling in the background

sullen dome
#

coming home from school, going on skype with a buddy, and just playing good old bedwars

#

miss these times

#

i am not going to lie. i never used teamspeak

#

and never knew why people were using it

next stratus
wraith rapids
#

i was banned from my server's teamspeak

next stratus
#

teamspeak was cool ig

sullen dome
#

why tho? it basically was skype in bad

#

imo tho

#

it had channels, wooooow

wraith rapids
#

you could run your own TS servers

next stratus
#

because it was easier for everyone to connect to 🤷

wraith rapids
#

that's the primary reason probably

sullen dome
#

you had to pay for them lmao

ivory sleet
#

Didn’t teamspeak cost

next stratus
#

ye

wraith rapids
#

yeah

sullen dome
#

thats a thing what dc does good

next stratus
#

couldn't you just host it yourself tho

wraith rapids
#

but you weren't reliant on skype's servers

sullen dome
#

it provides free servers

wraith rapids
#

yeah the issue with being provided a free server is that the server isn't yours

sullen dome
#

you could, but you would need something for that

wraith rapids
#

so they can just come and delete it or shut down their service

hybrid spoke
sullen dome
#

and most people dont fordward portss

hybrid spoke
#

more like groups

wraith rapids
#

guilds

sullen dome
#

yeah, but doing the same

hybrid spoke
#

^

sullen dome
#

why doesnt discord takes money for that

#

i still dont know

hybrid spoke
#

wasn't there once a rumor that having a server will cost sometimes?

wraith rapids
#

because if they did few people would use it

next stratus
#

If discord had a whole dedi per server. Imagine how much that'll cost it'll crazy amounts of money haha

sullen dome
#

they got so much money from nitro? lmao

wraith rapids
#

i don't think discord is profitable still

#

if you account for the initial investments, I don't think they've made a penny back

sullen dome
#

so wonder why they dont sell it at ms

wraith rapids
#

they are probably making profit on a yearly basis now

#

but haven't yet earned back the millions that were invested by investors over time

hybrid spoke
#

discord is the number one, why should they sell it?

wraith rapids
#

and probably never will

hybrid spoke
#

they did everything perfect

#

timing, luck, advertisement

wraith rapids
#

well, except the client

hybrid spoke
#

the client is fine

sullen dome
#

why doesn't nitro provide the feature to customize your fucking client? themes and stuf

wraith rapids
#

it's not though

sullen dome
#

then nitro would have a real sense

wraith rapids
#

well, 'fine' by modern standards, maybe

sullen dome
#

i mean right now... there's literally no real benefit for buying nitro

wraith rapids
#

but people these days have way too low standards for software

sullen dome
#

1080p streaming? cmon

hybrid spoke
sullen dome
#

why only the profile?

hybrid spoke
#

having a banner and a "about me" in the future

#

thats cool

#

and those little emojis

wraith rapids
#

like, I would for example like to be able to use the client without buying a new, dedicated machine for it

sullen dome
#

why not the client? i don't think they dont know how to implement that

wraith rapids
#

or having to shut down everything else on the system for it to run

sullen dome
#

so i'd like to know why they dont implement themes

#

that would probably make much people stop using bd

#

most of people just use bd because of themes. like me

wraith rapids
#

still waiting for ripcord to implement image and video previews

hybrid spoke
main tangle
sullen dome
#

yeah, then you should still not start with nms

hybrid spoke
main tangle
#

not that*

sullen dome
hybrid spoke
#

also nms depends on what you want to do with that mob

#

you can go the way around and use some tricks to accomplish it without nms

sullen dome
#

"custom mob" doesn't sounds just like give him a custom name

marble granite
#

if i run a task async, when i call: Bukkit.getScheduler().runTaskSync(plugin, "new runnable etc");" on another thread, will it go to the main spigot thread agan?

ivory sleet
#

No ikew

sullen dome
#

i don't think he will have much fun doing that stuff without nms

marble granite
hybrid spoke
#

can just recommend it

ivory sleet
#

When scheduling it async it will use an internal cached thread pool to execute the given runnable

north ridge
ivory sleet
#

Also runTaskSync isn’t a valid method

wraith rapids
#

and note that the task is only run at the start of the next tick

#

so there may be a delay of up to 50ms before it actually runs

north ridge
ivory sleet
#

runTask and runTaskAsynchronously

north ridge
#

ah

ivory sleet
#

🙌

marble granite
#

but thx for the responses

rocky glacier
#

How do i compile Intellij plugin i dont get it

dire marsh
#

what do you mean

#

are you using gradle or maven

rocky glacier
#

maven

opal juniper
#

What is the best way to do this. Atm to listen for jedis messages i have a class that extends thread and i just let it tick over in the background. then, onMessage it fires a custom Bukkit event for testing. this induces some delay though.

What is the best way of actually listening for the messages and then getting the data out?

ivory sleet
#

If you use Jedis then you’d have a pub sub listener

wraith rapids
#

what are you doing

opal juniper
#

Huh

#

so i wanted to try something out

#

basically i have two servers

#

and the end goal is to mimick the actions on one server on the other

#

(some)

#

not all

ivory sleet
wraith rapids
#

are you trying to shard your server

opal juniper
#

sorta

rocky glacier
#

does that show me the compilation?

wraith rapids
#

glhf

opal juniper
#

😄

#

its just something i wanted to try out

#
@Override
public void onMessage(String channel, String message) {
    Bukkit.getScheduler().runTask(plugin, ()-> Bukkit.getPluginManager().callEvent(new DataBroadcastEvent(gson.fromJson(message, MessageContents.class))));
}

cause this is gonna induce at least a tick of delay ^^

#

but it was a proof of concept

opal juniper
#

Is there an easy way to make a "ghost" player

#

is it gonna be like citizens api or something

rocky glacier
#

whats ment with wdym

opal juniper
#

what do you mean

#

like yes

wraith rapids
#

if you're sharding, you probably would want to send packets to the server via protocol to emulate a real player

opal juniper
#

i mean - eh

rocky glacier
#

i want to export my finished plugin as usable jar file

opal juniper
wraith rapids
#

maybe

opal juniper
wraith rapids
#

but faking players is kind of annoying

#

because mojang doesn't want you to fiddle with skins and shit

rocky glacier
#

yh if it called like that

wraith rapids
#

the protocol around those parts is super specific and fragile

opal juniper
#

Yeah

#

Is there a library for fake players

#

need like a

player#movex

#

FakePlayer player = new FakePlayer("jeffmcjefferson")

#

shit like that would be 👌

hybrid spoke
#

if not create one

#

but i am pretty sure there are a few libs which do exactly that

opal juniper
#

Share please

#

I don’t want to make it

#

Lmao

#

I found one but it only supports spawn / despawn not move

#

I need like one that supports all of the player interactions I guess

hybrid spoke
opal juniper
#

Ok

hybrid spoke
#

but i dont want to

opal juniper
#

Yeah - I got that

hybrid spoke
#

you could look into citiziens

#

i think they have something like this

opal juniper
#

I’ll have a look

#

Is there a “blockchangeevent” that just does every block change

#

I feel like that is a dumb question

wraith rapids
#

there isn't, obviously

#

that would make storing actual block metadata possible

opal juniper
#

what?

wraith rapids
#

if there was a block change event

#

plugins could reliably store data for non-TE blocks

#

so the deep state doesn't allow for something that to be PR'd

#

because it would be too good and make peoples lives easier

opal juniper
#

oh sorry i didn't detect the sarcasm 😄

#

There is a BlockData#getAsString but how do you then serialise it again?

#

nvm the method is under bukkit

#

why

sullen dome
#

ok guys, i need your math.

i need to get the difference between those two dots, so i can do smt like

pos.setAbsolute(pos.getAbsoluteX() + <difference_between_dots>, pos.getAbsoluteY() + <difference_between_dots>);```
red dot is the outline of a rectangle, black dot is my mouse cursor
how can i calculate that?
opal juniper
#

what are you trying to do

sullen dome
#

i need to get the difference between those two dots

#

as double

opal juniper
#

ah ok

#

so i mean

#

just get the difference of x and y and then use trig

sullen dome
#

i'm thinking of a nice piece of meat

opal juniper
#

you familiar with a^2 + b^2 = c^2

sullen dome
#

not a single bit

opal juniper
#

how lmao

sullen dome
#

yes, i have discalkulia or whatever, and missed 2 years of school
blame me if you want lmao

opal juniper
ivory sleet
#

Jeff the math teacher 😌

opal juniper
#

find dx and dy and work out c

#

😎

sullen dome
opal juniper
#

so

#

a^2 + b^2 = c^2

sullen dome
#

what tf means a^2 lmao

opal juniper
#

squared

#

to the power of 2

ivory sleet
#

a*a = a^2

#

a*a*a=a^3

opal juniper
#

so do this:

sullen dome
#

so 4+4 is just 4^2 right?

ivory sleet
#

No

opal juniper
#

no

sullen dome
#

wtf

ivory sleet
#

Only with multiplication

opal juniper
#

4x4 = 4^2

sullen dome
#

nvm i typed +

#

i meant *, my bad

opal juniper
#

ahh ok

opal juniper
#

d = delta

#

which means difference or change in

sullen dome
#

gimme a hour or smt xd

wraith rapids
#

you need to concentrate

sullen dome
#

stfu

wraith rapids
#

i know of a certain camp that might be of aid

#

KONZENRTRATIONSLAGER

sullen dome
#

oh boy

#

i always think you can't surprise me again.

then you do this

wraith rapids
#

i'm a very surprising guy

sullen dome
#

yeah i see

opal juniper
#

you get it?

sullen dome
#

not really tbh

opal juniper
#

right

#

so

#

gimme a min i will draw

wraith rapids
#

what are we talking about

sullen dome
#

math

#

differences

#

and stuff

wraith rapids
#

just subtract one location from another

#

or, vector

opal juniper
wraith rapids
#

Vector diff = otherVector.subtract(centerVector)

opal juniper
#

both work yes

wraith rapids
#

diff.distance() returns the distance

sullen dome
#

what tf is hypotenuse now

#

ahhhhhhhhhh

#

my braiiiiin

wraith rapids
#

you really need some concentration camp action

#

hypotenuse is the long line

opal juniper
#

hypotenuse = longest side of right angle triangle

sullen dome
#

you need some rifle shots

eternal night
#

hypotenuse is like, 5th grade math action

#

smh

opal juniper
#

opposite right angle

wraith rapids
#

dumb goyim

opal juniper
sullen dome
#

i see

topaz moon
sullen dome
#

he said such things a lot

wraith rapids
#

i can't see replies

sullen dome
#

your konzentrationslager message

#

i told him thats bad

wraith rapids
#

are you being triggered by my ÜBERMENSCH language skills

sullen dome
#

he doesnt stop at all

#

Sowas sagt man nicht mein Junge!

wraith rapids
#

perhaps I should send some BLITZKRIEG your way

sullen dome
#

nein solltest du nicht

#

bitte

opal juniper
#

are they bukkit locations?

sullen dome
#

nah theyre just doubles

#

x and y

2d

rocky glacier
#

Kann mir jmd sagen wie ich Vault als depency zu meinem Plugin himzufüge in Intellij?

eternal night
#

stick to english please

sullen dome
#

i'll helm him

#

if i am allowed to lol

rocky glacier
#

Rivex speaks my language guys

eternal night
#

yes, then move this to DMs

topaz moon
#

y

rocky glacier
#

okay rlx yo XD

sullen dome
#

sorry i had to :(

topaz moon
sullen dome
#

yeah, but not all people speak fluent english

#

and as long as people know theyre not using any swear stuff, i think it's okay at least

rocky glacier
#

well i can but i was too lazy XO

sullen dome
#

if you can

topaz moon
sullen dome
#

use english

#

AOJSF

#

you did what?

#

god

#

who sends random friend requests at me

opal juniper
#

me

#

accept

#

honest

sullen dome
#

i don't accept random requests

opal juniper
#

🤷

#

no help 4 u then

sullen dome
#

whats the reason

#

if thats the reason, just tell me xd

north niche
#

how to check whether the player killed an ender dragon or not
I need to check it with the player statistics, is there any way to do it!

int bossKillCount = player.getStatistic( 
Statistic.MOB_KILLS, 
EntityType.ENDER_DRAGON 
);

but it not worked! any other ways to do it?

hybrid spoke
#

do you just want to have the statistic or do you want to do anything IF he kills the enderdragon?

north niche
#

just statistic

topaz moon
#

is it MOB_KILLS?

north niche
#

yes

#

how many times the player killed the enderdragon

hybrid spoke
#

i am not sure if such a statistic exists

topaz moon
#

what about KILL_ENTITY?

hybrid spoke
#

isnt MOB_KILLS a total?

topaz moon
north niche
topaz moon
#

Enderdragon may not exist

#

since it's used to be killed just once

#

But it's just a guess

hybrid spoke
#

^

#

there may be an other statistic based on that

north niche
topaz moon
north niche
#

and its in my statistic

#

how many times i killed the dragon

quasi flint
#

totally possible

north niche
#

but cant fetch the kill count using

player.getStatistic( 
Statistic.MOB_KILLS, 
EntityType.ENDER_DRAGON 
);```
hybrid spoke
#

with the degg

topaz moon
#

waaait

north niche
#

that what i needed

topaz moon
north niche
#

yes

topaz moon
#

confusing

north niche
#

and there is no other ways to get the total kill count of the dragon ? by using statistic

dire marsh
#

you could always track it yourself

#

but this sounds like a bug

topaz moon
#

I don't know yet, if it shows up there has to be a solution

north niche
hybrid spoke
#

how about wither and giant guardian?

#

if there are no statistics for those mobs, there isnt probably for enderdragon too

topaz moon
#

y you could count it urself but it's redundant if statistics counts it..

north niche
#

2min pls

north niche
hybrid spoke
#

why haven't you said that before?

#

send it

dire marsh
#

^^^^^^^^^^^^^^

topaz moon
#

😂

hybrid spoke
#

now he's gone arainbow

main tangle
hybrid spoke
#

#setTarget

main tangle
#

Oh

north niche
#

hey it shows like this

rg.bukkit.event.EventException: null
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:319) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]
....................................................................................................
topaz moon
#

?paste

undone axleBOT
topaz moon
#

paste it here

north niche
wraith rapids
#

paste the full exception, goy

hybrid spoke
#

yeah we need the full exception

#

there have to be more

north niche
#

wait i will copy paste all

#

i added that code in onPlayerQuit event

hybrid spoke
#

yeah and the player is probably null

north niche
#

but it works for other statstic code

Player.getStatistic(Statistic.MINE_BLOCK,Material.DIAMOND_ORE)
#

it works fine and correct

hybrid spoke
#

what is on line 92

north niche
#

player.getStatistic( Statistic.MOB_KILLS, EntityType.ENDER_DRAGON );

wraith rapids
#

you omitted the Caused by line

#

we don't know what exception was thrown

north niche
#

?

wraith rapids
#

the error is still incomplete

north niche
#

i just copy pasted the full error idk whats missing

hybrid spoke
wraith rapids
#

there should be something in between
at java.lang.Thread.run(Thread.java:832) [?:?]
and
at org.apache.commons.lang.Validate.isTrue(Validate.java:136) ~[spigot-1.16.4.jar:git-Spigot-37d799b-3eb7236]

hybrid spoke
topaz moon
hybrid spoke
wraith rapids
#

the player is still online during the quit event

hybrid spoke
#

and the event should still have the player during the event

wraith rapids
#

so yes they are guaranteed to be online

hybrid spoke
wraith rapids
#

he couldn't have delayed it because the exception was caught by the event bus

hybrid spoke
#

ah yeah

#

so his player has to be null otherwise

north niche
#

ok wait i will ss else

#

idk what i missed

hybrid spoke
#

can you send us your full code?

wraith rapids
#

or there is something in the exception message that he omitted that would explain what's happening

hybrid spoke
#

don't think so

wraith rapids
#

the exception message should have been copied in EventException yeah

hybrid spoke
#

everything is there just the Caused by is missing

wraith rapids
#

but I've seen stranger things happening

#

the Caused by line contains the actual underlying message

#

which is missing

#

it could be "illegal argument exception: you can't do this because x"

hybrid spoke
#

would be the only logical exception throwed by the getStatistic method

#

since it only throws this exception

north niche
# hybrid spoke can you send us your full code?
@EventHandler
public void onPlayerQuit(PlayerQuitEvent event) throws IOException {
        Document document2 = new Document();
        document2.append("boss_killed", event.getPlayer().getStatistic(Statistic.MOB_KILLS,EntityType.ENDER_DRAGON) );
}
#

its just the quit event and im appending some statistic values to the document2

hybrid spoke
#

and now it also could be an IOException

#

are you sure you just sent the full error?

wraith rapids
#

can you try getting the full error

#

we can't see anything useful

north niche
wraith rapids
#

without like, opening up the source of the server and finding that specific preconditions call

#

which I don't have the effort to do

north niche
#

where to send ss

#

its ok i will try to do it with the onEntityKill event

unreal sandal
#

I have a problem, to string are identical but when I do a condition if(string 1 == string 2), it is not working

hybrid spoke
patent wadi
#

check for object type, that would be comparing if the objects are exact.

hybrid spoke
unreal sandal
#

ah yes, I test that

patent wadi
#

Hi,
Does anyone know if there is any data out there about the performance between iterating between 2 locations and using raytracing?

unreal sandal
#

@hybrid spoke It's good ! Thank you

wraith rapids
#

raytracing is basically just iterating between 2 locations

#

it doesn't need to be, but I doubt bukkit/nms implements it super differently from that

#

what are you trying to achieve

patent wadi
#

yeah, thats what I was thinking. but depending on how its implemented it could be faster. if its implemented far enough down it wouldn't need to make calls on every block. but there isn't much information as to where in the process order its performed etc

wraith rapids
#

probably just want to use raytrace as provided by bukkit

hybrid spoke
#

look at the implementation

wraith rapids
#

it won't be heavier than iteration

hybrid spoke
#

and you will know it

wraith rapids
#

or if it is, it isn't by a fair margin

#

and it's probable that it has been or will be optimized further by people like paper

#

using it will allow you to leverage those improvements without having to implement them from scratch yourself

patent wadi
#

its working fine with an iteration at the moment, just looking for places where i can shave a few ms

wraith rapids
#

you could always test it

#

use a profiler or a sampler like spark to see which parts are taking how much time

patent wadi
#

i think ill have to, theres not much information around and bet to check the shortest routes first. testing is next i guess. ill benchmark it

#

i have a function timer from another set of project i can probably adapt

#

and yes godcipher, I could read the code, but I would have to read all of it to see the context in which it is implemented before i know. a test would be quicker

scenic scarab
#

Good evening, if I have a stick in my main hand and the DisplayName of the stick is SpeedStick, I'd like to give it speed for the entire time I hold it.

hybrid spoke
scenic scarab
#

Scheduler?

rigid otter
#

Hello! Can I see full source code instead of just interface like that?

public interface Inventory extends Iterable<ItemStack> {
    int getSize();

    int getMaxStackSize();

    void setMaxStackSize(int var1);

    @Nullable
    ItemStack getItem(int var1);

    void setItem(int var1, @Nullable ItemStack var2);
wraith rapids
#

iirc there was an event that is fired each time the held item of a player is changed for any reason

#

player hold item event i think

#

listen to that and update effects accordingly

scenic scarab
#

Hmm.

sick portal
#

Does anyone know how i can create patches for paper ? For spigot its clear, but with paper im not finding the way to do it

scenic scarab
#

I'd like to know some example sites or source code.

rigid otter
restive mango
#

Anyone else have any ideas to make an entity noclip?

#

@wraith rapids I’ve been at work since our chat last night so I haven’t tried your implementation just yet

#

Right now I have it, and a vex strategy

#

Can you add the noclip property to custom mobs…?

#

Actually

#

Here’s some I don’t know

#

Is it possible to create a custom mob which uses the model of another mob?

#

Like a vex which uses a falling block as it’s model

wraith rapids
#

with the protocol, you can disguise an entity as another kind of entity

#

have you tried the relative entity move thing yet

#

i think that would be the best and/or only way if you don't want a million entities

restive mango
#

I’ve been at work since our chat last night so I haven’t tried your implementation just yet

wraith rapids
#

right

restive mango
#

I’m not lying bro I had a resection for bowel cancer today

#

It was long

proper notch
#

I can't use compile/implementation, etc.. in the subprojects for some reason

sly abyss
#

hello i need to import a ready maven project to my intellij but the dependencies don't download

maiden shore
sly abyss
eternal night
proper notch
#

i can check, but implementation doesnt work either

maiden shore
eternal night
#

isn't it like compileOnly

#

or runtimeOnly

wraith rapids
#

the maven artifact you're depending on is in your local maven repository? if not, did you declare a repository in your pom.xml that describes where maven can find the artifact

proper notch
#

p sure it's diff for if you're doing a project, but idk. implementation doesnt work either so

#

oh wait i might have found the issue

eternal night
#
subprojects {
    dependencies {
        compileOnly("io.papermc.paper:paper:1.17-R0.1-SNAPSHOT:mojang-mapped")
    }
}
#

works perfectly fine for me

proper notch
#

have you tried with another module within the same project

eternal night
#

why would you specify that on the root project tho

#

wouldn't that cause the module to depend on itself

proper notch
#

IDK but that's not the issue anyway.

#

If that happens I can just copy paste stuff out

eternal night
#

idk I just have my build files in the respective modules ¯_(ツ)_/¯

#

and I am pretty new to gradle myself, so can't help much sorry 😭

proper notch
#

all g

#

got it to work btw

sage swift
#

ah yes the java 16 plugin

hexed hatch
#

Java16Plus.jar

dense goblet
#

does world.getNearbyEntities() load chunks?

wary harness
#

any one can tell me why am I getting this error

chrome beacon
#

Duplicate column name

#

...

wary harness
#

this is code

#

how can it be duplicate

#

one of my plugins users has that problem

#

I can't recriate it

#

and what would be solution

unreal quartz
#

what does your table look like?

#

last_seen probably already exists

maiden briar
#

Is it possible to catch all exceptions from YOUR plugin and save them in a txt file? I don't have any idea to do this (I can handle the exceptions, but not listen for it)

unreal quartz
#

not entirely sure why you'd want to do that since the server logs everything for you

maiden briar
#

I know, but I am not asking for your opinion, I just want to know how to log the exceptions

sage swift
#
try {
  public class PluginName extends JavaPlugin {
    public void onEnable() {
      Bukkit.shutdown();
    }
  }
} catch (Exception ex) {}```
maiden briar
#

😵

unreal quartz
maiden briar
#

Yes but how to catch them? That is the question

unreal quartz
#

try {
errorProneMethod();
catch (Exception e) {
log(e)

#

}

eternal night
#

you might be able to modify the log4j2 logging configuration of the server ?

#

using an exception filter

maiden briar
#

Yes but that doesn't catch all exceptions (like null)

maiden briar
eternal night
#

dunno if log4j2 can write those into their own file

wary harness
unreal quartz
wary harness
#

delete it

#

and then rename last date to it

#

that should work

maiden briar
eternal night
#

I think log4j does actually support an ExpressionFilter as well as multiple appenders

#

don't know how to correctly set that up tho

#

so, maybe you can learn a bit through google

#

sentry is also a potential option

maiden briar
#

Then I get many xml files, and no Java code

eternal night
#

has some pretty neat error hendeling

#

what

#

it is a single xml file

#

idk what you are on about xD

eternal night
#

Yes ?

maiden briar
#

I don't know how to do that in Java code? Java is not xml?

eternal night
#

Yes you don't do that in java code

#

you will never be able to from your plugin

#

your plugin is not the one initiating all calls against your components (e.g. listeners)

maiden briar
#

Yes I understand, but what is then the way to go?

eternal night
#

so either try catch everything or look for a solution outside of the plugin

maiden briar
#

Is that an good idea to try or would you recommend something else?

eternal night
#

Hmm, give it a try

#

might work

maiden briar
#

Ok

#

But with that I can't catch the exception class, how can we do that?

eternal night
#

there is

#

the log record holds the throwable

#

you can check on that

maiden briar
#

Ok

#

if(record.getThrown() != null)

opal juniper
#

since when was citizens paid?

unreal quartz
#

since when you cloned the repo and built it yourself

wary harness
opal juniper
#

why make it paid if you open src it?

chrome beacon
#

You pay for support

unreal quartz
#

to encourage donation

#

a lot of people do it

opal juniper
#

fair enough

#

im not gonna 🤷

silver wadi
#

whats the class/method to see what block a player is looking at?

#

I don't know the exact terms to search

opal juniper
#

getLookingAt

#

i think

unreal quartz
#

take a look at the javadoc

silver wadi
#

thanks

unreal quartz
#

everything you ever need is there

silver wadi
#

would it be under Player?

unreal quartz
opal juniper
#

iirc

unreal quartz
#

and it shows inherited methods as well

silver wadi
#

getTargetBlock

#

what i needed

#

thanks

opal juniper
#

wait im so confused how i compile this

#

the pom doesn't make much at all in it

unreal quartz
#

mvn package

opal juniper
#

ill give it a go

unreal quartz
#

most of the configurations will be in the subprojects

#

or submodules

#

whatever they're called

chrome beacon
#

Yeah modules

opal juniper
#

yeah - sorry i have never done that stuff b4

#

& when i opened it in intellij a lot of stuff didn't show up