#help-development

1 messages · Page 1978 of 1

waxen plinth
#

And that matters..?

#

Like how does it not

tender shard
#

lol

waxen plinth
#

For example, Set#contains is either true or false

#

But you sure as fuck want it to work

#

Like what is that logic

wet breach
waxen plinth
#

It's not going to return null

#

Boolean is a primitive value

#

It will throw an NPE if it's null

#

But that's not behavior of the function that's behavior of the jvm

wet breach
#

Anyways not going to get in this argument in what you are saying. If you want to believe every method should have a test go for it

waxen plinth
#

If the behavior of a function does not matter then what is it doing in your code

wet breach
#

guarantee you even the largest companies do not test every method

waxen plinth
#

That's untrue lol

#

My sibling works at google and they unit test quite literally everything

tender shard
#

I also doubt everything gets or should be tested but

waxen plinth
#

I'm not arguing that you should always test everything

tender shard
#

I still dont understand this statement

waxen plinth
#

I'm saying that there are cases where it makes sense for a company to do it

#

Even the most "obvious" code can sometimes not behave exactly as you expect

tender shard
waxen plinth
#

And for a company that large they really really cannot afford to have the code misbehaving

#

So they unit test everything

vocal cloud
#

Test-driven development (TDD) is a software development process relying on software requirements being converted to test cases before software is fully developed, and tracking all software development by repeatedly testing the software against all test cases. This is as opposed to software being developed first and test cases created later.
Sof...

waxen plinth
#

It's worth it for them to pay people to write those tests to make sure everything works to prevent bugs and failures

wet breach
# tender shard I still dont understand this statement

a simple method that can never return anything null or never be null, and it returns a boolean. If you make a test for that method then all you are testing is whether or not a boolean returns true or false. If you wanted the method to only return true, then you probably should redesign it where it doesn't have the option to be false.

tender shard
#

if "hi".contains("hi") returns false, that's bad

wet breach
#

I guess you just don't understand what I am saying then

#

which is fine I suppose

tender shard
#

yeah

#

I think redempt didnt understand it neither

wet breach
#

contains check can return null

tender shard
#

whut

waxen plinth
#

It is literally a boolean

#

Lowercase b

#

Primitive

#

It cannot be null

tender shard
wet breach
#

if the string is null contains is null

tender shard
#

how could that ever return null

waxen plinth
#

Then you get an NPE

#

Not the function returning null

wet breach
#

yes that is called returning null

waxen plinth
#

No it's fucking not lmao

#

Throwing an NPE is not "returning null"

tender shard
#

you cannot return null from a boolean method

waxen plinth
#

It's throwing an NPE

#

Those are extremely different behaviors

tender shard
wet breach
#

the only difference is when it hits null it returned early

sharp flare
wet breach
#

hence the NPE

#

point being a boolean only has two states, if you want your boolean to always return true, then you shouldn't be using something that has the option to be something else

#

unless you want to handle if its that something else

waxen plinth
#

Frost you really could have just said "sorry I meant it can throw NPE" and we would have moved on

#

I really don't know why you are arguing something so blatantly wrong

tender shard
visual tide
#

Boolean

#

Boolean ≠ boolean

sharp flare
#

Nah they are not talking about specific wrappers ig

wet breach
tender shard
#

your objectmapper tries to access a protected method from outside the scope

waxen plinth
#

The level of pedantry

#

I can't

tender shard
#

lol I love how the eye brows only raise when you already thought it's not a gif but just a picture

river oracle
#

how do you code

tender shard
#

who

#

most people do it using high level languages

river oracle
#

Me like how do I code

visual tide
#

google

#

youtube

tender shard
#

gnoogle*

visual tide
#

gnoogle?

tender shard
#

it's called gnoogle on this discord

visual tide
#

alr

river oracle
#

Well all these people are using high level languages like java? is it possible to code in binary I prefer it

#

minecraft plugins

quaint mantle
#

ye open notepad

visual tide
#

write bytecode :))

quaint mantle
#

start typing 1's and 0's

river oracle
#

ok I don't like using other peoples stuff so I think I'ma just start by building my own operating system and go from there

visual tide
#

just for linux, change the name & done

#

🙂

fervent gate
river oracle
#

gonna b very lonely

fervent gate
#

Generate your own electricity...

waxen plinth
#

drink your own piss........

fervent gate
#

Just build a nuclear reactor in your backyard

visual tide
river oracle
#

before that I have to grow my own food

visual tide
#

expensive but still

quaint mantle
#

build your own house, with your own trees that you grew...

visual tide
#

solar panels 🤷‍♀️

fervent gate
#

Mine your own metals

visual tide
#

expensive as fuck tho

river oracle
#

Well someone else probably made the dirt so we gotta start by making my own universe

visual tide
fervent gate
#

Wouldn't be surprised if he has one

floral pewter
#

How does BungeeCord determine which player to send the packet through when calling ServerInfo::sendData?

#

Please move your discussion to #general

tender shard
tender shard
#

true

fervent gate
#

These people man

#

There was also this guy who stuck his head in a particle accelerator

waxen plinth
#

He didn't "stick his head in"

#

The security measures didn't work

tender shard
#

yep, that's the dude I meant

waxen plinth
#

And that guy was russian I believe

fervent gate
#

Well, he wanted to see what went wrong

waxen plinth
quaint mantle
#

@waxen plinth are you super duper smart

waxen plinth
#

I dunno

#

There are lots of people way smarter than me

fervent gate
#

I wouldn't really want to put my head in a particle accelerator with security measures in place

waxen plinth
#

I think I'm pretty good at programming though

quaint mantle
#

or is it a stream

waxen plinth
#

I think they use really strong magnetic fields

#

And/or lasers

#

Not exactly sure though

waxen plinth
#

But some also accelerate individual particles

fervent gate
quaint mantle
waxen plinth
#

Don't really know the answer to that

#

I'm not a particle physicist

quaint mantle
#

electric fields

#

makes sense

fervent gate
quaint mantle
#

strong electric fields will attract different particles with different electrical charges i guess @waxen plinth

waxen plinth
#

Coding in what sense

#

I first messed around with scratch when I was 8

#

Started learning lua at like 12 or 13

#

20 currently

fervent gate
#

Ah ok

quaint mantle
#

imagine not having VBS as your first language 💀

fervent gate
waxen plinth
#

Wearing glasses makes me feel like a real nerd

#

Kind of in a bad way

#

I just got them today and they make me able to see clearly which is cool though

quaint mantle
#

you will look like the cockiest guy i nthe world

#

or just extremely handsome

waxen plinth
#

I wear jeans and a t shirt every single day

fervent gate
quaint mantle
waxen plinth
#

Meh

#

You don't need that to look good

#

Outfits are overrated

#

Yeah fight me

tender shard
#

I want glasses too but I don't want to need them

quaint mantle
tender shard
#

who summoned me

fossil lily
#

Alright: Is this possible??

I want to make it so that when a player joins, their username gets added to a hashmap with a value of zero. I want it to be automatic. Its like my code writing code.

#

Or should I use a database for this

ancient jackal
#

I'm not sure if that's possible, you could try making a listener for when someone joins and try hashmapName.put(event.getPlayer().getName(), 0) though

fossil lily
#

hm

tender shard
#

I want it to be automatic. Its like my code writing code.

#

whut?

fossil lily
#

Wait a sec

#

I might be able to do this

river oracle
#

step 1 make hashmap
step 2 player join event
step 3 add player to hashmap on join
step 4 add player leave event
step 5 remove player from hashmap when they leave

quaint mantle
#

no

#

add UUID

#

player = memory inefficiency

ancient plank
#

strings wesmart

tender shard
#

I just learnt

#

hash is another word for minced meat

#

MincedMeatMap

#

way better

#

yes

#

I am not native english

#

in germany we rather call it HACKFLEISCH

#

never tried that

#

I wonder how english people pronounce it

ancient jackal
#

shwine shacks-uh

tender shard
#

probably someth like shweenshax

#

lol same for me with latin

ancient jackal
#

same with spanish and chinese

tender shard
#

i can speak better turkish than latin and I never learnt turkish

quaint mantle
#

english is all abreviation and slang

#

yuh, ye, yeah, mhm, yer

#

nah, no, hell na, nope

#

i cant think of a word that doesnt have a synonym'

tender shard
#

or confusing they're, their and there

quaint mantle
#

the dude is over there
their dude is over there
they're over there dude

tender shard
#

car, where is my dude

ancient jackal
#

wise, you are

tender shard
#

16 steg

#

if you're swedish, you can fight with jokni

ancient plank
unreal quartz
#

yuh, ye, yeah, mhm, yer

ancient plank
#

search "from:adelemphii yer" in the search bar

#

or any of the yes variants

tender shard
#

I didnt say anything

sly trout
#

any way of getting the coordinates of the corners of the chunk with only the chunk

quaint mantle
#

try Chunk#getX * 12

#

should be one of them

sly trout
#

isn't a chunk 16 blocks

quaint mantle
#

yuh

#

16

sly trout
#

but it wouldnt work

quaint mantle
#

why not?

sly trout
#

cuz one chunk starts at -2 -2 the other at 0 0 the other at 0 -2 and the other 2 0

#

something like that

quaint mantle
#

what

lyric cobalt
#

WHY DOES IT KEEP DELETING MY MESSAGES

#

I swear

#

It needs to stop

#

Where is the Spigot 1.18.1 file so I can develop a plugin using the Spigot API?

wet breach
#

chunk corners start at the bottom left

#

so the bottom left corner is 0

#

upper right corner is 15

wet breach
#

those are chunk coordinates in relation to the region

sly trout
#

ok but with chunk -1 -1

#

if i do *16 itll give me -16 as the end

#

but its 17

sly trout
#

nvm

#

im g

young knoll
undone axleBOT
lyric cobalt
#

STOP DELETING OMG

young knoll
#

Stop trying to say what I think you’re trying to say

lyric cobalt
#

I've used get-bukkit

young knoll
#

XD

lyric cobalt
#

and BuildTools

#

lol

#

They both don't work

young knoll
#

getfukkit is illegal

#

?bootstrap

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

lyric cobalt
#

So use that?

sly trout
#

yes

young knoll
#

Mhm

lyric cobalt
#

Coolio

#

Thx

wet breach
# lyric cobalt They both don't work

buildtools is the official way of obtaining spigot jars server and api. So to say buildtools doesn't work is false as it absolutely does work, just probably either using a wrong version, using in a directory that isn't supported, java version being outdated or some other user error.

#

if all you need is the API then you don't really need buildtools

#

you just need the spigot maven repo

lyric cobalt
#

?*

wet breach
#

yes

lyric cobalt
#

Interesting

fossil lily
#

Does this make sense to run every time a new player joins?

young knoll
#

No

fossil lily
#

:(

young knoll
#

Why would you make a new map for each player

fossil lily
#

How would I make it so that there is one map?

#

Im not sure where I would make this command go

young knoll
#

Make the map an instance variable somewhere

fossil lily
#

Will the hashmap save even when a server restart occurs?

lyric cobalt
young knoll
#

No

#

You need to save the map yourself

fossil lily
#

I need to save it to a file?

young knoll
#

Mhm

#

Or database or whatever

fossil lily
#

aight

#

thanks

quaint bough
#

Is there a way to make this less wack ?

young knoll
#

Math.min and Math.max may be useful

quaint bough
#

more worried about the if else if else if else

harsh swift
#

Im trying to setup my scoreboard and im getting this console error please help org.bukkit.configuration.InvalidConfigurationException: while scanning an anchor
in 'reader', line 26, column 9:
9: '&7&dXP: &7%player_xplevel%'
^
unexpected character found &(38)
in 'reader', line 26, column 11:
9: '&7&dXP: &7%player_xplevel%'
^"

young knoll
#

Your config is invalid

#

Run it through a yaml parser

harsh swift
#

this is what the yaml parser said ERROR:

while parsing a block mapping
in "<unicode string>", line 4, column 5:
13:
^
expected <block end>, but found '<anchor>'
in "<unicode string>", line 10, column 9:
9: '&dXP: &7%player_xplevel%'
^

#

i might of fixed it

waxen plinth
young knoll
#

Do it at startup

#

No

#

But you can load legacy materials then

#

No idea

#

I assume using Material.valueOf with a legacy name might work

#

You may also consider using XMaterial which I assume avoids initializing legacy materials

worldly ingot
#

with a dirty hack PES2_SadGeRain

young knoll
#

You can’t stop them

warm light
#

Anyone can give me all ore list?

young knoll
#

The wiki can

warm light
#

Can you give me the link?

#

nvm got it

waxen plinth
ivory sleet
#

probably need to ::collect there but ye

waxen plinth
#

Nope you can just do toList() now

#

Since java 10 I believe

#

I learned about it very recently and it's wonderful

ivory sleet
#

Oh since 16

#

That’s extremely pog

waxen plinth
#

Oh 16?

#

Damn much later than I thought then

#

Actually shouldn't there be a tag for ores?

ivory sleet
#

I think so

waxen plinth
#

Oh

#

There are tags for each ore type lol

#

That's not especially helpful

ivory sleet
#

Lol

#

Rip

lyric cobalt
#

Where can I find the CraftBukkit and NMS libraries for my plugin?
I'm following a tutorial for NPCs, but it is auto-imported for them but not for me.

#

Any help would be appreciated :)

sly trout
#

I've been looking but can't find the event called for when a chest's loot is being created

#

so i can add stuff to dungeon's chests or mob spawner's chests or sum

warm light
#

How to convert Statistic.PLAY_ONE_MINUTE to a format?

vocal cloud
#

Format?

vocal cloud
wet breach
#

?bootstrap

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

red sedge
#

what api version was pdc added?

quaint mantle
#

1.14.4

warm light
quiet ice
#

?jd-spigot

undone axleBOT
quiet ice
#

Name is misleading, actually records ticks played.

#

So divide by 20 to obtain the amount of seconds played on the server

quaint mantle
#

I need developers who are free and know to code

#

(1)

#

I need (1) developer who is free and can code

warm light
#

is PlayerDeathEvent.getEntity().getPlayer() & PlayerDeathEvent.getEntity() same?

quiet ice
quaint mantle
#

I already have 1 developer

#

but I need 1 more

blazing scarab
#

i highly doubt anyone would work for free

quiet ice
#

?services

undone axleBOT
quiet ice
#

Then you might need to look at the forums

peak osprey
#

Ok I have a problem

#

My server don't restart after crash

#

But in the file "spigot.yml" the option "restart-on-crash" is set on "true"

#

So can you help me ?

sharp flare
peak osprey
#

I send it in the help server too

sharp flare
#

Don't send it on multiple channels, any server related is on #help-server

peak osprey
#

Ok

#

Sorry

sharp flare
#

No worries mate 🙂

sharp flare
lost matrix
mellow edge
#

what is mc using for obfuscation

#

which tool?

lost matrix
mellow edge
#

I wanna obfuscate something and I tought that you guys know

#

and you do

#

ty

somber sequoia
#

is there any way for Bukkit.getServer().getOfflinePlayer() to not make a web request in online mode? I'm using it to update my scoreboard and it freezes the whole server every time it updates

wet breach
wet breach
#

however it shouldnt lag the server either

trail pilot
#

i can get support here for spigot forum_

#

?

lost matrix
#

I mean a web request can easily take several 10 ms

wet breach
#

you can get support here, just choose the appropriate channel and ask your question

trail pilot
#

so wtf is that

somber sequoia
#

it only does that in online mode

tardy delta
#

Brr

wet breach
somber sequoia
#

and its taking a lot more than 10ms

wet breach
#

tomorrow it should show what you are seeing on the top @trail pilot

wet breach
#

yep, as you noticed the one on top is showing today, main page shows day behind not current day. So wait one more day and the top should be the bottom 🙂

#

I don't know what time bstats runs on so I don't know when tomorrow for it is

trail pilot
lost matrix
somber sequoia
wet breach
lost matrix
wet breach
#

that utility class just needs to be ran in an async task or in another thread

#

either should work fine

somber sequoia
wet breach
#

why you want to show offline players that haven't played before is beyond me, but I can help you do so regardless lmao

lost matrix
wet breach
#

I suppose I have no idea what it is they are trying to do

#

all I can do is just show them alternative methods

#

I have never had getOfflinePlayer() lag a server before

somber sequoia
#

the player isnt a valid player and i only need the name to show up on the scoreboard

lost matrix
#

pls

wet breach
#

oh not a valid player

#

then in that case why even use getOfflinePlayer?

wet breach
#

just put the name in there yourself

lost matrix
somber sequoia
#

man i just googled some things and it said to use offline players

lost matrix
#

The methods that use OfflinePlayers are deprecated for a reason

wet breach
lost matrix
wet breach
#

If you need to show a player name that isn't a valid player, you don't need a player object to put them in the scoreboard, you can just simply put a string in there instead lol

#

ah 7smile7 has got you covered there lol

somber sequoia
#

thank you so much

#

what method do i use tho

#

very confused on that one

copper trail
#

hi i create an potion item with custom effect, but his have no color, and the .setColor don't exist on the PotionMeta :c
Version : 1.8.8

#

and i search on google and i don't find anything

lost matrix
wet breach
#

look around 2014 or something if you need help with a year 😛

copper trail
#

:c

wet breach
#

you are going to need to use damage values if I remember correctly

lost matrix
#

Other than that you can just call setColor() ^^

copper trail
#

but many server are in 1.8

lost matrix
copper trail
lost matrix
#

its like 7%

copper trail
#

Hypixel ?

wet breach
#

hypixel doesn't make up the majority

#

that is just one network

#

second they have their own fork

#

and are not coming here for help on it 😛

copper trail
#

x)

lost matrix
# copper trail Hypixel ?

So? Do you have a team of highly payed developers that write a complete custom server jar for you and
do you need to support thousands of concurrent users?

Hypixels jar has nothing to do with Spigot anymore. It is heavily modified and maintained.
Completely different software.

somber sequoia
wet breach
copper trail
wet breach
#

just fyi @copper trail you can use buildtools to generate the javadocs for that version

lost matrix
somber sequoia
copper trail
lost matrix
copper trail
#

yes i know but..

wet breach
#

otherwise if you want to use outdated versions you are for the most part on your own as there is no support for outdated versions let alone some of us here have forgotten a lot of the outdated methods as well XD

copper trail
#

x)

wet breach
#

all I remember is that most things being customized especially color requires messing with damage values or byte values of the items

lost matrix
#

1.8 has a ton of bugs in it that will never be resolved. You have no excuse to use such an old piece of software unless
your concept depends hard on the combat system and/or you can patch the server jar yourself.

wet breach
#

yeah there is a lot of bugs in that version

copper trail
#

Minecraft is a lot of bugs 😂

wet breach
#

well technically all the old versions have bugs of some sort that have been resolved in later versions lol

copper trail
wet breach
#

but what you miss out on in newer versions is very useful API methods to do things like you are wanting easily

copper trail
#

yes i know but me and my team work in 1.8.8 for a long time

wet breach
#

anyways as I stated if you insist on using 1.8 you can generate the javadocs for that version to look at as well as now you know the appropriate terms to google for that I have given you 😉

copper trail
#

why generate javadocs if i can see in the jar of spigot 😂

wet breach
copper trail
#

yes

wet breach
#

yet you don't even know how to set colors in an outdated version either

#

so maybe it seems it might be worth learning and using the new methods

#

since updated versions have setColor()

copper trail
#

its JUST for potion color

#

man

#

i DONT have the setColor method

lost matrix
#

setColor(Color)

copper trail
#

Is dont exist !

lost matrix
#

Then update

wet breach
copper trail
#

what version ?

#

1.9+ ?

lost matrix
#

latest version is your best bet

#

I think it came in 1.14 or 1.15. Not sure

copper trail
#

ok thx for your help, bye

wet breach
# copper trail Is dont exist !

also if you didn't know better you could code the API yourself for your outdated server. Not like 1.8 is going to get any updates anytime soon

copper trail
#

its planned

#

but not now

wet breach
#

Anyways cya later o/

copper trail
#

bye

wet breach
#

I gave you appropriate terms to now google for

#

maybe you might find something lol

sour sand
#

i am trying to build a plugin with nms but when i try to build it it says org.spigotmc:minecraft-server:txt:maps-mojang:1.18-R0.1-SNAPSHOT was not found in https://hub.spigotmc.org/nexus/content/repositories/snapshots/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spigotmc-repo has elapsed or updates are forcedit only happens when i add the special source maven plugin to it. here is my pom.xml https://pastebin.com/QRGtQ4d8. i have ran build tools and with the --remapped argument. if anyone knows how to fix it any help would be greatly appreciated thanks

copper trail
#

i google and i find what i need but not for color of potion 😂

copper trail
#

but you say "damage" for color, thx

sour sand
rocky bolt
#

[10:46:06] [Craft Scheduler Thread - 3056/WARN] Exception in thread "Craft Scheduler Thread - 3056"
[10:46:06] [Craft Scheduler Thread - 3056/WARN] org.apache.commons.lang.UnhandledException: Plugin PvPTimer v1.1 generated an exception while executing task 39
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextNode(Unknown Source)
at java.util.HashMap$KeyIterator.next(Unknown Source)
at me.drpiggy.pt.Main$1.run(Main.java:37)
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71)
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
... 3 more
Can someone help me why i get this error?

lost matrix
sour sand
#

k

lost matrix
visual tide
sour sand
quiet ice
#

Though, what exactly happens is up in the air

lost matrix
quiet ice
#

Yeah

trail pilot
#

its worth develop a ticket system?

tender shard
#

if you do a good one, sure why not

lost matrix
trail pilot
#

just asking because my friend want to make one.

tender shard
#

for discord or ingame?

trail pilot
#

look at that

trail pilot
trail pilot
#

he dont know whats he do

#

lol so isnt worth make one

tender shard
#

someone should do a proper ticket bot for discord

#

all existing ones suck in one way or another

warm light
#

I tried to create a xls file using plugin.getDataFolder().getAbsolutePath() + "/" + TableName + ".xls" but xls file is creating in plugin dir

tender shard
#

better use System.fileSeparator or new File(folder, filename)

tender shard
#

ah yes

#

File.separator

#

that's what I meant, not System.fileSeparator

trail pilot
#

its more better trust me

warm light
#

alright

trail pilot
warm light
#

I tried with // but still smae ;-;

trail pilot
#

File.separator on top!

quiet ice
#

I prefer new File(parent, name)

tender shard
#

me too

lost matrix
#

Just updated my timber plugin to support every block so people can also configure it as a vein miner aPES2_ProudMedal
Gonna compete with choco

warm light
quiet ice
#

Alternatively you can use Path#resolve

warm light
#

but now working in my vps

lost matrix
tender shard
trail pilot
quiet ice
#

You may need to do plugin.getDataFolder().mkdirs()

tender shard
#

new File(desktop, "homework-folder").mkDir(); then stuff 80 TB of furry videos inside

lost matrix
quaint mantle
#

using a blockbreakevent and cant set the block type, anyone know why?

        if(e.getBlock().getType() == Material.JACK_O_LANTERN) {
            Location l = e.getBlock().getLocation();
            ItemStack i = new ItemStack(Material.TORCH);
            //e.getBlock().setType(Material.CARVED_PUMPKIN);
            e.setDropItems(false);
            e.getBlock().getWorld().dropItemNaturally(l,i);
        }

commented out because it doesnt work

tender shard
#

otherwise the block will get broken

#

so it'll only be set to pumpkin for 0.000001 seconds

quaint mantle
#

damn thats specific, but ok

tender shard
#

it makes total sense

#

server works like this:

  1. received block brneak packet from player
  2. call BlockBreakEvent
  3. if event is not cancelled, set block to AIR and do drops
#

since you didn't cancel it in step 2, it goes to step 3

quaint mantle
#

yea i get it

midnight shore
#

How can i download java jdk 1.15 without logging into oracle?

tender shard
#

jdk 15? thats a werird version to use

midnight shore
#

if i use 1.17 build tools doesn't work

#

1.16 gives me error

#

so i tried 1.15

tender shard
#

java 15 is end of life since one year

midnight shore
tender shard
#

1.17 requires at least java 16

tender shard
#

it's dead

#

like windows xp

midnight shore
tender shard
#

just use 17

midnight shore
#

build tools doesn't work

tender shard
#

?notworking

undone axleBOT
#

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

midnight shore
tender shard
#

oh it's actually 16 only, whut

#

hm

midnight shore
#

ty

tender shard
#

but

#

java 16 is dead too and will no longer get ANY security updates

#

I wouldn't dare to run that on a server

midnight shore
#

but i'm forced to use that

tender shard
#

well you could also update to a supported java and mc version 😛

midnight shore
#

yeah but also i'm forced to use 1.17 😪 mc version

warm light
midnight shore
#

how do i install this java jdk zip?

#

there is no executable inside

#

@tender shard

tender shard
#

you dont have to install it

#

just extract it somewhere

midnight shore
#

so like this?

quiet ice
#
File parentDir = plugin.getDataFolder();
parentDir.mkdirs();
File tableXLS = new File(parentDir, "table.xls");
tableXLS.createNewFile();

Does this not work?

warm light
#

Let me check

glossy venture
tender shard
glossy venture
#

And then adding jdk/bin it to your PATH environment variable

tender shard
#

if you need more than one java version I'd just add them to .bash_aliases

sonic osprey
#

Is giving my non-root user (which runs the minecraft server) sudo access fine?

prisma needle
#

Set a player's above their head.

tender shard
#

your minecraft user should only run minecraft and doesn't have any access to anything else

sonic osprey
tender shard
#

no, nothing that runs any services should have sudo, why should they have it?

#

everything should have as few privileges as possible

sonic osprey
#

@tender shard I'm confused.
Which privilege do I give my non-root user to run docker, and only docker?

tender shard
#

add them to the docker group

sonic osprey
#

And docker is run in the /home/user directory, right?

tender shard
#

sudo usermod -aG docker docker-user

tender shard
sonic osprey
#

Okay.

#

How do I remove my user from sudo again?

tender shard
#

sudo deluser username sudo

#

or just edit /etc/group

deft forum
#

it says null pointer exception and it says that item0.getItemMeta.getLore.size() >= 3 may produce NullPointerException

if(item0.getItemMeta().hasLore() && item0.getItemMeta().getLore().size() >= 3) { player.sendMessage("no 3"); return; }```
sonic osprey
#

@tender shard I installed docker whilst logged into root.

#

Do I have to reinstall it whilst logged into my non-root user?

#

How do I 'run' it on my non-root user?

sullen dome
#

what exactly is SYSTEM? i know chat and actionbar, but never heard system

deft forum
#

i think console i have no clue

sullen dome
#

i mean, it says Represents the position on the Screen, so i don't think

deft forum
#

yeah

#

i was stupid

crimson terrace
#

will this set the entity e on fire for 3 seconds (60 ticks) or 60 ticks of fire damage?

tender shard
sonic osprey
sullen dome
tender shard
sonic osprey
#

Am I supposed to use my non-root user as my normal work user?

tender shard
#

of course

sonic osprey
tender shard
#

ugh

crimson terrace
#

so time, thanks

tender shard
# sonic osprey Why?

would you give your cleaning lady your bank account? no, because she doesn't need it

sonic osprey
#

@tender shard So if someone logs into that user they can't 'grief' my server?

tender shard
#

even if you trust her, there's no need to give her your bank account card

tender shard
grim ice
#

so uh

sonic osprey
tender shard
#

if it doesn't need root permission, yes

grim ice
#

I'm making a plugin which lets you copy and paste entities, chests, and player

midnight shore
#

Yes

grim ice
#

do you guys think i should make the entities part alone and call it Pokecraft

#

I am going to make a library btw

midnight shore
grim ice
#

ill make it a series

#

then

#

actually

#

ill make the library

grim ice
#

then make Pokecraft

#

Btw

sullen dome
#

is it actually easy (or possible at all) to make a bossbar invisible while it's title still shows?

young knoll
#

It’s easy with a resource pack

tardy delta
#

Resourcepack

#

Too fast

sullen dome
#

so in my case it's apparently not. thanks

floral pewter
#

How does BungeeCord determine which player connection to send the packet through when calling ServerInfo::sendData?

midnight shore
#

Hi, how can i picture a number with particles in minecraft? Like i have the number 3 and i want it to be displayed with particles

#

Thank you, thats the answer i wanted

#

I know i need to use math, but the question is how

royal portal
#

Hi. Can anybody help me about the PlotMe plugin? I tried a lot and many times but for some reason I never could make it work. I would be very happy and thankful for get some help to get it done. Thank you so much ☺️

midnight shore
quiet ice
midnight shore
#

Thank you for being very useful

royal portal
#

There is a valid command but doesn’t do anything.

midnight shore
royal portal
midnight shore
royal portal
midnight shore
#

could you send me the plugin page you are using please?

midnight shore
royal portal
midnight shore
#

where did you download the plugin?

royal portal
#

I did but still the same

#

Thats why I’m very stuck in it 😦

midnight shore
#

plotme only works for lower version to 1.13 so you should get another plugin

royal portal
#

I used V4 because the V6 is cost money.

#

You right its not supported anymore but I don’t wanna believe that only the PlotSquared V6 can work… There might be something can’t be?

#

Or Do I really need to buy it?? And what if its not work out?

#

You mean not sure I need to buy it or it will work? 😄

#

Or is there anyone who can create a plotme plugin? I mean scripting maybe?

#

Yes I know it I also saw it but what I’m saying is or actually asking that this is the only one way I can have a PlotMe Plugin for my server? That I buy the V6 ?

tender shard
#

isn't plotsquared 4 dead since a few years?

#

also

#

why would anyone use PS4

#

plotsquared is free

#

even version 6

#

on github

royal portal
tender shard
#

well

#

gotta compile it yourself

#

basically just clone the repo into intellij, three clicks and you should have a .jar file

royal portal
#

Okey its hard for me because as I said I’m new abput it but I will try 😄

tender shard
#

well I won't give instructions on how to compile it, you should rather buy it 😛

royal portal
royal portal
#

And what is intellij? 🤣

grim ice
#

structure.getEntities()

#

um

#

what happens if the entity is removed after the structure was saved

#

will it return a new entity that can be spawned?

#

thats the exact same as the entity i captured within the structure? (which died after saving the structure)

tender shard
valid solstice
#

is there a limit to the cooktime of FurnaceRecipe?

hexed hatch
#

The entity that’s left behind won’t have any effect on the structure

grim ice
#

return a list of the entities back then, and a clone of them?

#

or do i have to place the structure, then retrieve the entity

dusk flicker
#

Just create a new recipe with a normal water bottle?

grim ice
#

how do you documentate a method

#

do you use @param

#

for params

quaint mantle
#

do you use intellij idea

grim ice
#

yes

quaint mantle
#

type /** and press enter

grim ice
#

oh tt

#

ty

quaint mantle
#

it will create a template for javadocs

grim ice
#

Using this guide

#

Does the user need to install the library on the server?

#

or only use it as a dependency in their plugin

hexed hatch
#

Just place the structure where you want the entity

#

And if you set the integrity parameter to 0, it won’t attempt to place any blocks

#

Which may lighten a load by an inconsequential amount and prevent cases where blocks may have been saved into the structure by mistake

grim ice
#

but like

#

im making a library rn

#

actually

#

ig ill find a way

opal juniper
#

with my pathfinding i am currently doing this to order the nodes in the open set. (A* btw)

public double priorityKey() {
    return this.target.distance(this.location) + this.start.distance(this.location);
}
@Override
public int compareTo(Node otherNode) {
    return (int) Math.signum(this.priorityKey() - otherNode.priorityKey());
}

however even if it is travelling in a straight line it does evaluate some nodes that are not at the "head" of the route

anyone else got a better heuristic for this?

vague swallow
#

How can I check if a Player is holding left/or right click and how can I make it so that he needs to click again to trigger the same event/listener?

eternal oxide
#

You can;t tell teh difference between holding a click or repeat clicking

grim ice
#

is equals() overriden in Location class

#

or actually

#

nvm

opal juniper
#

?stash

undone axleBOT
opal juniper
#

look

#

lol

grim ice
#

how to get an entity by location

opal juniper
#

you can get the closest entity to a location

#

by getting the closest entities to a location and selecting the closest

chrome beacon
#

Porey :)

grim ice
#

rn im using

#

return location.getWorld().getEntities().stream()
.filter(entity -> isLocationSimilar(location, entity.getLocation()))
.collect(Collectors.toList()).get(0);

rapid vigil
chrome beacon
#

Yeah I'm here quite a bit

sterile token
#

I always ask and he answer with other ones

opal juniper
sterile token
#

sorted is to get the first values right?

rapid vigil
#

Well you might be able to help me with this. So I'm facing a bug with the AsyncPlayerChatEvent, basically I am changing the format using the setFormat method but when a player types something that includes % in the chat, it just uses the default format and throws this error:

sterile token
#

?paste

undone axleBOT
sterile token
#

Go ahead that its what you should used to send Long text

grim ice
#

return Arrays.stream(location.getChunk().getEntities())
.filter(entity -> isLocationSimilar(location, entity.getLocation()))
.collect(Collectors.toList()).get(0);

#

my new one

lost matrix
grim ice
#

well i can use the chunk entities

#

instead of the whole world

#

cuz im pretty sure its in that chunk

grim ice
#

as im spawning a structure with the entity, but i wanna get it

opal juniper
rapid vigil
hexed hatch
opal juniper
#

the radius of the bounding box

grim ice
#

Gets a list of entities that have been included in the Structure. The entity positions are offsets relative to the structure's position that is provided once the structure is placed into the world

sterile token
rapid vigil
sterile token
#

No problem

#

Yoo join the link paste code, press Ctrl + s, copy url and send it here. When needing to send Long codes

sterile token
rapid vigil
#

Oh damn nevermind, I just fixed it xd

royal portal
sterile token
#

Have you ever develop on Java?

#

Cuz If never do it prob I will use terms that are not understable

royal portal
sterile token
#

Lmao

#

Watch video how use an ide at least

royal portal
#

I did but still xd

royal portal
sterile token
#

Hmn I have watch the video from intellij youtube channel and learned most of the thing

maiden path
#
Patching BiomeTheEndDecorator.java
Patching Block.java
Exception in thread "main" java.lang.RuntimeException: Error patching Block.java
        at org.spigotmc.builder.Builder.lambda$main$2(Builder.java:644)
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
        at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
        at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
        at java.util.Iterator.forEachRemaining(Unknown Source)
        at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source)
        at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
        at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
        at java.util.stream.ReferencePipeline.forEach(Unknown Source)
        at org.spigotmc.builder.Builder.main(Builder.java:595)
        at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27)
Caused by: difflib.PatchFailedException: Incorrect Chunk: the chunk content doesn't match the target
        at difflib.Chunk.verify(Chunk.java:86)
        at difflib.ChangeDelta.verify(ChangeDelta.java:78)
        at difflib.ChangeDelta.applyTo(ChangeDelta.java:44)
        at difflib.Patch.applyTo(Patch.java:43)
        at difflib.DiffUtils.patch(DiffUtils.java:70)
        at org.spigotmc.builder.Builder.lambda$main$2(Builder.java:632)
        ... 13 more```
sterile token
maiden path
#

Why is it giving an error when I run BuildTools 1.8.8?

sterile token
#

Paste the error there

royal portal
sterile token
#

Send link vía dm

royal portal
sterile token
#

So when I go to pc just sent you the jar

lost matrix
sterile token
#

Dont fuck with that

#

I builded 1.8.8 jar without problems

#

And used remap and worked

royal portal
sterile token
#

Why when use old version everyone cry lamoa

#

People use versión they like

#

Its not a rule uskng the Last one

#

🤬

tardy delta
#

because a lot of the api stuff wasnt there at that moment

tender shard
lost matrix
tender shard
tardy delta
#

no vista

grim ice
#

github docs down uwu

lost matrix
sterile token
#

I use a remake of an old software that someone did for using it as Nas server software

sterile token
grim ice
#

well if you're making a custom jar you would know what you're doing

#

so lol

lost matrix
sterile token
#

Isnt one jar which all versiones?

grim ice
#

which if you do you won't ask questions here

#

lol

sterile token
#

So you dont need to have a m2 of 1000 versions diff

#

I hate that

grim ice
#

Eitherway we shouldnt blame it on devs

#

we should blame it on server owners

sterile token
#

I would use MVC for Project

grim ice
#

Server owners are the main reason why anyone still uses 1.8.9

#

and you can't stop hypixel from making money so

sterile token
#

What the hex with old versions

grim ice
#

Hypixel wont remove 1.8.9 support

sterile token
#

I use linux 16.04 and no problems

sterile token
grim ice
#

since more players = more ranks and cosmetics bought = more money

sterile token
#

Why eversyones that doesnt make money doesnt like it

grim ice
#

and as long as Hypixel is supporting legacy versions

#

everyone will still support it

sterile token
#

Really nice society

grim ice
#

Money is mostly everything IRL, Let's be real

sterile token
#

That what I hate from society they want everyone using and following they rules or thoughts

lost matrix
# grim ice everyone will still support it

There really successful servers that are running 1.16.5
Wynncraft and Origin Realms for example.
And you can feel that. They deliver a completely different experience.

grim ice
#

They're for a whole different community

lost matrix
grim ice
#

and as they cannot fulfill the requirements of the privilege of supporting all versions, they will not rise to the real top

sterile token
#

And im against 1.9+ pvp

#

I would never accep it

grim ice
#

:Shrug:

#

and look at wynncraft

#

even though they have spent a lot of effort and time

#

in their server

#

a very new and simple server like Minemen club has beaten them

#

with much less effort and time put into the server

sterile token
#

In minemen you have all the "vividos" called by Spanish people

lost matrix
#

What do you mean by "beaten them"
What is your quantification? Do you have even the slighest idea how the
business models of any of those servers work? Wynncraft has 100% a
hugely higher win margin per unique user than Minemen club.
So how do you quantify winning?

tardy delta
#

wyncraft was nice for a month for me

tacit drift
#

where is the error 💀

lost matrix
#

?npe

tacit drift
sterile token
lost matrix
tacit drift
#

it does send a message

#

so the string in config isn't null

#

it sends the message then it sends the error

sterile token
# tacit drift

On create Message dont adding thst var its an extra load/memory use

sterile token
#

Yeah its

#

You have to assing the var when calling many times the FileConfig times

lost matrix
#

Let the compiler do the inlining. This is nothing you should worry about.

sterile token
#

Whst the hexk nothing to do your answer

#

Its not even relate

lost matrix
#

It has literally 0 impact on your codes performance or memory foodprint

sterile token
#

Are you sure?? In one command i called many times method get Config and make tps down as doing diving

#

So think please

#

Because its a Performance problem how a command will down tps

#

Its really funny

lost matrix
maiden briar
#

If I have an UUID string without -, how to create an UUID instance from it?

sterile token
#

Also I dont understand your thoughs

lost matrix
maiden briar
#

Ok

lost matrix
sterile token
#

You didnt answer my question...

#

You are ignoring it because you know its the truth

#

Thst what make me think

lost matrix
maiden briar
#

Wow

quiet ice
#

This is overkill

#

Just do String.split() then Long.parseLong

maiden briar
#

How?

lost matrix
tacit drift
#

omg

maiden briar
#

Cause where to split?

tacit drift
#

i found the thing...

quiet ice
#

No, you'd need to use Long.parseUnsignedLong

maiden briar
#

?

quiet ice
#

Actually, not split, substring

lost matrix
maiden briar
quiet ice
#
String msb = string.substring(0, 16);
String lsb = string.substring(16, 32);
UUID id = new UUID(Long.parseUnsignedLong(msb, 16), Long.parseUnsignedLong(lsb, 16));

Something along these lines

maiden briar
#

Ok thanks

sterile token
#

Too much lines for me

lost matrix
quiet ice
#

to be honest, I bet most people do not know that UUIDs are 16 bytes long

lost matrix
sterile token
#

I love that nice thing that java cannot Interpreta encrypted ClassNode

#

Its amazing

lost matrix
quiet ice
maiden briar
#

Haha just 2 longs?

quiet ice
#

In the spec it is a bit more complicated, but java represents them as just two longs

lost matrix
maiden briar
#

Haha nice

grim ice
#

0 file committed, 9 files failed to commit: beta version gpg: skipped "2Hex myemail@gmail.com>": No secret key gpg: signing failed: No secret key gpg failed to sign the data failed to write commit object

#

Im getting this when commiting

lost matrix
#

Looks like you dont have a valid gpg key in your credentials helper but the repository requires one...

quiet ice
#

I'd just setup the signing keys again

grim ice
#

uh how to fix that

quiet ice
#

(or you accidentally used git commit -S)

grim ice
#

i used git commit -m

#

and that error was in intellij actually

#

so no way i did it wrong

quiet ice
#

Then perhaps you accidentally set some setting to automatically sign commits

grim ice
#

how to fix tho

sterile token
quiet ice
#

While this is not a fix, it actually having a key to sign your commits with resolves some issues

quiet ice
sterile token
#

Cuz JVM decompiling?

#

Doesnt sound it possible?

#

Hahaha

sterile token
quiet ice
#

Well, at this point you'd encrypt the class files, not the class nodes themselves

sterile token
grim ice
#

bro the shit i have to do to get a gpg key

quiet ice
#

It's rather easy on linux

#

But if you are on windows it's basically gg get rekt

#

Also from my experience commiting via IDEs has been whack

sterile token
#

Linux it just command:

shh generate -type gpg

#

And its generate

#

Or that on my linux os

quiet ice
#

For it to make sense you'd want to add it to github afterwards. But technically gpg keys are rather easy to setup

grim ice
#

ok im giving up on git

#

lmfao

sterile token
#

Geol so what I to encrypt

#

Class node or clases?

grim ice
#

this is complicated

lost matrix
quiet ice
#

Well, technically you don't encrypt but rather obfuscate

lost matrix
#

He just stated that repeated calls of a getter method "makes his tps go down"

#

And then tried to call me out

quiet ice
#

I mean depending on the nature of that method and the calls to the methods, it can be justified

lost matrix
#

JavaPlugin#getConfig()

sterile token
#

Who uses thst?

quiet ice
#

?stash

undone axleBOT
sterile token
#

I use my file handler that extends Yaml Config

#

And yes calling many times a getter object can cause memory leaks

quiet ice
#

Yeah, that method has almost no impact on performance and is likely going to get inlined

lost matrix
restive tangle
#

Dunning-Kruger effect does not apply to me, I know everything about anything

#

Completely factual

#

You are not allowed to question me

quiet ice
#

Well I know everything I want

lost matrix
restive tangle
#

I do, I have

quiet ice
#

then you want too much

opal juniper
olive lance
#

Bruh y’all tryna be deep

quiet ice
olive lance
#

Chill

quiet ice
#

And what are you calling?

restive tangle
#

No, what I said was objectively true

grim ice
opal juniper
#

hahah yeah i realised its hard to "imagine" what is going on

wet breach
restive tangle
#

I can imagine it

grim ice
#

nah its flying fishes

opal juniper
#

so im trying to make my path finder work over large distances but there seems to be some issue - lemme check something rq

grim ice
#

quzack ur that guy who was a staff on SU right

wet breach
#

Java happens to use 2 longs for UUID's which is probably the better choice lol

restive tangle
#

No

grim ice
#

you are

restive tangle
#

No, what I say is true at all times

#

Meaning you're wrong

lost matrix
wet breach
#

1 int for octets 0-3 2nd int for octets 4-5 and then 3rd int for octets 6-7

restive tangle
#

Yes, I understand this fully

lost matrix
restive tangle
#

I was lying, what smile said

grim ice
#

7smile can u help

quiet ice
#
 * The most significant long consists of the following unsigned fields:
 * <pre>
 * 0xFFFFFFFF00000000 time_low
 * 0x00000000FFFF0000 time_mid
 * 0x000000000000F000 version
 * 0x0000000000000FFF time_hi
 * </pre>
 * The least significant long consists of the following unsigned fields:
 * <pre>
 * 0xC000000000000000 variant
 * 0x3FFF000000000000 clock_seq
 * 0x0000FFFFFFFFFFFF node
grim ice
#

im struggling with git

quiet ice
#

Any version but version 1 doesn't make use of node

lost matrix
#

Isnt v2 standard now since forever?

wet breach
quiet ice
grim ice
#

2hex

#

hahahaha