#help-development

1 messages ยท Page 2269 of 1

lost matrix
#

^

waxen plinth
#

It will answer all of your questions

elder blaze
#

:c

waxen plinth
#

You want spigot for this:

#

Search BukkitScheduler

#

Find the class

#

Go to the method you're trying to find info on

#

It will tell you everything you need to know

elder blaze
waxen plinth
#

In the search bar

#

Type in BukkitScheduler

#

Click on the class

elder blaze
#

oh

#

im there

#

so, the period is the time that will wait for next repeat?

waxen plinth
#

Read the unit

#

But yes

#

The unit is not milliseconds though

elder blaze
#

ticks?

waxen plinth
#

Yes

#

Server ticks

#

There are (supposed to be) 20 ticks per second

#

1 tick = 50ms

elder blaze
#

oh

#

ok

#

thx

#

why my IntelliJ doesn't detect PacketPlayOutPlayerListHeaderFooter?

#

:V

eternal oxide
#

you need spigot not spigot API

lost matrix
elder blaze
#

ae

#

where do I download nms?

eternal oxide
#

?bootstrap read the posts it links to, AND the 1.17 post

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

tardy delta
#

ah shit you need to explicitly close a preparedstatement

#

i thought that happened when you close the connection but it seems to depend on impl

elder blaze
#

I Don't use maven

#

I need the .jar

#

xd

#

oh, i found it

#

xd

#

oh, it isnt

eternal oxide
#

?bt

undone axleBOT
waxen plinth
#

Use one

#

It will make your life much easier

eternal oxide
#

you are going to take your own life if you attempt to use NMS without a build tool like maven

waxen plinth
#

It took me too long to start using gradle and I lost a lot of productivity because of it

elder blaze
#

So, my development team doesn't know how to use BTs and they ban me to use them

river oracle
#

gradlew gradlew gross gross

river oracle
eternal oxide
#

Then sack your "team"

river oracle
#

leave and run as fast as you can

river oracle
#

you gain nothing by working with a team who is unwilling to work efficently

elder blaze
#

they only know java by tutorials

river oracle
#

then they aren't a dev team they are ammetures who need to learn how to learn properly

eternal oxide
#

maven is REALLY easy to use, once you get started

waxen plinth
#

That's like saying "yeah my team doesn't let me use a mouse at work, they just forbid it, everyone has to use a trackpad"

elder blaze
#

hahah

#

Fck my team, I will add Maven and send them tutorials of how to use

waxen plinth
#

Chad

vagrant granite
#

hello I tried to make my own changes to spigot, with the plugin I managed to do it, but I have no idea what file to use to run the server. when I was using the generated file this error showed up

quiet ice
#

what exactly did you attempt?

eternal oxide
#

You are trying to run CraftBukkit not spigot

quiet ice
#

Did you modify the spigot jar or what?

quiet ice
vagrant granite
#

yes the spigot jar i added simple method to send message

quiet ice
#

How did you do it?

eternal oxide
#

That error is because you are trying to run the spigot-1.19-SNAPSHOT.jar in the \bundler\versions directory

vagrant granite
#

first I added this method in api and then in the server I added this one

tardy delta
#

๐Ÿค”

vagrant granite
#

I did a commit and ran a maven command

eternal oxide
#

same reason

#

you are using the wrong jar

vagrant granite
#

this is my start.bat file, I think I'm running the correct file

eternal oxide
#

the jar BT creates is placed in teh root BT folder

#

you took your jar from \Spigot\Spigot-Server\target

vagrant granite
#

yes

buoyant viper
#

oooh we trying 2 make custom spigot?

#

i want in

eternal oxide
#

If you are taking yoru jar from that directory you need to use spigot-1.18.2-R0.1-SNAPSHOT-bootstrap.jar

quiet ice
#

Honestly, if I were to try to make custom spigot I'd rather use recaf

eternal oxide
#

or whichever version you are building

signal ether
quiet ice
#

The convoluted system employed by spigot is a bit disorienting

quiet ice
elder blaze
#

Where is my pom file in intellij?

#

:v

eternal oxide
#

it shoudl be the same level as your src folder

elder blaze
quiet ice
#

is it a maven project?

buoyant viper
elder blaze
quiet ice
# elder blaze yea

Hm, could you show us what the contents of the root directory of your project is?

elder blaze
#

can't attach images

#

i send you to dm

quiet ice
# buoyant viper haha makePatches go brrrr

I've been writing my own mod loader for a while now and I can say that patching stuff is a task only the devil himself would attempt. On the other hand ASM Transformers are the best shit out there. Sadly spigot does not support these for coremod-like plugins

buoyant viper
elder blaze
buoyant viper
buoyant viper
#

thats an intellij project

elder blaze
quiet ice
#

eh, there are a few applications already there with the mind of doing something like that

quiet ice
elder blaze
#

Right click on existing project "add framework support"

quiet ice
#

no clue what that does

eternal oxide
#

perhaps you forgot to tick maven?

quiet ice
#

Guess you could just throw in a maven.pom file manually but given that I'm using eclipse mainly I cannot say if that is the right course of action

buoyant viper
#

maven.pom

#

smh

elder blaze
#

it didn't generated a pom file to me

#

:v

buoyant viper
#

if u dont have pom.xml then its not maven

eternal oxide
#

refresh

quiet ice
buoyant viper
elder blaze
eternal oxide
#

close ide and restart is simplest

#

if it then doesn;t show a pom you didn;t correctly add the framework

quiet ice
buoyant viper
#

hmm

elder blaze
quiet ice
#

My goal is to migrate away from gradle entirely eventually. Maven will still be a bit of a strange place however given that it does many things greatly

elder blaze
#

nop

#

how i do again all the process?

eternal oxide
#

then you have not added maven

tardy delta
#

removed the pom?

elder blaze
#

no

tardy delta
#

oh i removed my dependency reduced one and got a bunch of issues

elder blaze
#

I'll create a another maven project and import my files

#

xd

eternal oxide
# elder blaze nop

First, make sure you have enabled maven plugin in

File -> Settings -> Plugins and add search the maven plugin and activate

Restart the IntelliJ.

Go and check the tool window to make it visible

go to View -> Tool Windows > Maven Projects to open it.

#

I'm just googling here

elder blaze
#

right

#

thx

golden turret
#

Nop. My book is already signed

eternal oxide
#

probably not then for an already signed book. it likely just closes it client side

tardy delta
#

looks cursed lol

eternal oxide
#

may look cleaner if you java TABLE_SETUP.forEach

small current
#

No

#

forEach comes from the depths of hell

tardy delta
#

still need a try and the execute method

small current
eternal oxide
#

can you simply not assign it and use(conn.prepareStatement(query).execute())

small current
#

No one uses forEach but lazy you

tardy delta
#

i did

small current
#

Too lazy to do an enhanced for

#

๐Ÿค“

eternal oxide
#

shame

small current
#

@eternal oxide you are cursed

#

1.8 hater

#

firEach user

tardy delta
#

doesnt seem to like the exceptions

small current
#

And also somehow in my block list

hybrid spoke
#

1.8 is shit

#

forEach is good

small current
#

1.8 pvp = best

#

Stfu

#

Noobs cant click more than 3 cps

tardy delta
#

what do you prefer
for (String str : list) { System.out.println(str) }
or
list.forEach(System.out::println)?

small current
#

The one taking less time

tardy delta
#

smh

small current
#

enhanced for

hybrid spoke
tardy delta
hybrid spoke
#

go code in C or C++

#

some native shit for the best speed

small current
#

Yeah i will code plugins in that

buoyant viper
#

JNI plugin loader

#

brrrrrr

buoyant viper
sterile token
#

Which is the minium player life amount before he died because i need to check something

buoyant viper
#

if its >0, they live

sterile token
#

Allright

#

So 0.1 is alive right?

buoyant viper
#

in theory, yes

hybrid spoke
#

undead

buoyant viper
#

in practice, no real clue

sterile token
#

Allright i ill test thanks

tardy delta
sterile token
#

Because i need to do something with the player before dieying so i need to know that

#

Thanks

tardy delta
#

lombok @Cleanup smh

#

but i wont

buoyant viper
#

was that just a shorthand for the try with resources?

tardy delta
#

gone

#

yes

small current
tardy delta
#

ik

buoyant viper
#

looks better without now lolz

tardy delta
#

i wont fall for it

#

lombok hater

hybrid spoke
#

blaming others for being lazy but uses lombok

buoyant viper
#

could be worse, could be a....Guava user

small current
#

Lombok is cleaner

#

Never used guava

buoyant viper
#

average Guava user vs DIY programmer chad

tardy delta
#

still need to close resultset manually so that witConnection method goes kinda brr

hybrid spoke
#

guice ftw

buoyant viper
#

isnt guice an event bus

tardy delta
#

becomes even worse when i ad more paraemeters to the method

buoyant viper
#

or is that just me giving the guava event bus a name

mellow edge
#

hi

tardy delta
#

ig ill use some jdbc lib

mellow edge
#

I have a question

buoyant viper
#

OH WAIT GUICE IS THE DEPENDENCY INJECTOR

tardy delta
#

so do i

hybrid spoke
#

guice is framework based DI

#

biggest bs in history

mellow edge
#

if I teleport a player from while falling it will die or damage a lot

#

how can I prevent that

#

without putting a person in a creative

hybrid spoke
#

set the fall distance

buoyant viper
#

my friend used guice once years ago so i was like why do i know what that is

hybrid spoke
#

i know people who are claiming that guice is the only real DI

#

?di isnt DI anymore

undone axleBOT
tardy delta
#

tf is guice

small current
#

What is guice

buoyant viper
#

google bs

tardy delta
#

oh as usual

eternal oxide
small current
#

What guice does

buoyant viper
#

hacks

hybrid spoke
#

let your code look complex

#

and let you look advanced

buoyant viper
small current
#

You know what i hate the most?

hybrid spoke
#

yourself?

tardy delta
#

ur mom

small current
#

Sets.newHashSet

mellow edge
buoyant viper
tardy delta
#

smh

buoyant viper
#

hating ur parents isnt cool

hybrid spoke
buoyant viper
#

unless they did u wrong

small current
mellow edge
#

do u mean player.setFallDistance(0);

small current
#

setFallDistance(-100)

#

Yes

mellow edge
#

player.setFallDistance(0);
player.teleport(map.getSpawnLocation())

buoyant viper
#

can fall distance even be negative lolwtf

small current
#

-100

buoyant viper
#

?stash

undone axleBOT
mellow edge
small current
#

I remember it was

buoyant viper
#

ive started to unironically enjoy going through spigot stash

tardy delta
#

same

small current
tardy delta
#

best thing i saw was

boolean equals(obj) {
  try {
    ThisClass casted = (ThisClass) obj;
    return true
  } catch (ClassCastException e) {}
  return false;
}```
#

what happened here

buoyant viper
#

LOOOOL

#

dont even worry about it

tardy delta
#

damn 200 lines

mellow edge
#

thanks @small current @hybrid spoke

tardy delta
#

do they get a cookie now?

hybrid spoke
#

i hope so

#

would be better for him

tardy delta
#

๐Ÿคค

buoyant viper
#

u can change the handle of a CraftEntity, that sounds like recipe for disaster

tardy delta
#

heheh

eternal oxide
#

If only there was a better way

tardy delta
#

everything i try seems to go brr

quiet ice
#

Factory-style patterns would also look a bit strange

tardy delta
#

Map<Class, Supplier<CraftEntity>>

#

or smth

eternal oxide
paper viper
#

people use modulus while I use & bitwise ๐Ÿ˜Ž

quiet ice
tardy delta
#

well i tried to do some fancy stuff with da method but i still need to close preparedstatements smh

tardy delta
buoyant viper
quiet ice
#

though you'd ideally not use BiFunction but rather a custom interface for that

tardy delta
#

the fact that its python makes it even worser

buoyant viper
#

thats the point

quiet ice
#

However either way this approach would result in doubling the lines of code needed

tardy delta
#

i mean True and False wtf

quiet ice
#

perhaps even trippling

tardy delta
#

what were they on

quiet ice
tardy delta
#

dunno whats a classvalue?

#

lmao

buoyant viper
#

probably bit by a snake and suffered from poison damage

tardy delta
#

ig ye

quiet ice
tardy delta
#

oh lol

buoyant viper
#

yeah

#

thats php

tardy delta
#

if i wanted to expand the withConnection function to close all stuff that would go more brr

#

jdbc frameworks idk

glossy wren
#

Hi, I'm having trouble with PersistentDataTypes and generics. Basically, I want to make a method to retrieve data from a PersistentData container, and return the value. How would I do this while allowing the return of any type?

eternal oxide
#

Type is required to use the PDC. generics will not apply

glossy wren
#

is there a way around it?

eternal oxide
#

ie, you can;t fetch data from a PDC without knowing its type

crisp steeple
brave goblet
#

How would I stop players getting advancements in certain worlds? not just hiding chat like I have seen other plugins rather make it so they don't get it but still can in other worlds later.

crisp steeple
# glossy wren ^

are you trying to get all values from a pdc or something? i dont see why else you would need to get it without knowing the type

eternal oxide
#

No way around it. You can get the NamespacedKeys but without a data type you can;t not retrieve the data

glossy wren
tardy delta
#

or you do the reflection way?

#

and nms

#

have fun too

tardy delta
#

*will you guys forgive me when i use lombok ๐Ÿฅบ *

paper viper
#

no

tardy delta
#

smh @Cleanup seduces me

buoyant viper
#

wait

#

u literally use try with resource

#

it does not get much nicer than that

tardy delta
#

mmmh

buoyant viper
#

try (Connection conn = pool.getConnection()) {}

#

smh

tardy delta
#

guess i need to find a more suitable way then

#

dont like how it looks

echo basalt
#

yeah I hate it

#

running SQL queries like that

#

at the same time I'm storing everything as POJO

#

Maybe you could abstract it a bit

#

or make a constructor for home that passes resultset

buoyant viper
#

ehhh

buoyant viper
#

like Home.from

echo basalt
#

pair that with an empty constructor

tardy delta
#

static factory method

echo basalt
#

yeah something

#

Home.fromSQL(ResultSet)

buoyant viper
#

fromQuery md_5

eternal oxide
#

just Home.from Keep it standard. just teh arg will vary

tardy delta
#

goes kinda brr to include only the connection n the try with resources and not the statement which needs to be closed too

sacred mountain
#

hey how can i scale up a string to another string?

e.g. the wanted string length is

and i only have 5, but 5 is the maximum, should. i just do maxStringLength / 5 ?

tardy delta
#

oh no no no

buoyant viper
#

exceptions?

tardy delta
#

@Sneakythrows makes even more sense to me rn

eternal night
#

lombok

tardy delta
#

@Cleanup ๐Ÿคค

waxen plinth
quaint mantle
#

Redempt

#

aren't you supposed to be living in a test or something

waxen plinth
#

??

tardy delta
waxen plinth
buoyant viper
#

BlueLib SQLFactory when?

ancient plank
#

BeepLib

quaint mantle
#

Fuck SQL

#

use redlib if you wanna mess with all of that

tardy delta
#

try and catch kinda sucks in general

#

im wondering what the difference is

connection.prepareStatement().execute(sql);
connection.prepareStatement(sql).execute();```
buoyant viper
#

yall rockin wit da Map#putIfAbsent or da Map#computeIfAbsent fo today

tardy delta
#

wha

ancient plank
#

sql pain

buoyant viper
#

my lawyer has advised me to not finish that sentence

ancient plank
#

same

torn oyster
#

what version of java should i use for my public plugin

torn oyster
#

okay

#

i was using 18

paper viper
#

Wait does 1.19 use Java 18

torn oyster
wild reef
#

Hey guys, I wanna make a listener for when water flows towards a magma block, that in between cobblestone will be generated (basically skyblock) just wanna make it for me and a friends private server and we only need this functionality to this is why i am asking.

Is the correct way for that to use the BlockFromToEvent and check if block from is water?

paper viper
#

But you are welcome to use later versions

#

I encourage it

torn oyster
paper viper
#

Lol

torn oyster
#

lmao ok

vale ember
paper viper
#

What are you going to do about it

#

Lol

eternal night
#

pulse too agressive today

paper viper
#

Always

torn oyster
#

what's the best os for developing anything

paper viper
#

gonna say Linux

#

Lol

severe turret
#

the one youre familiar with

eternal night
#

tbh, mac os for the fact that it feels like linux but then you don't get gnu utils Kapp

severe turret
#

question

#

how bad is it to create an object every time a player right clicks

#

๐Ÿ’€

eternal night
#

don't worry about that xD

severe turret
#

I'm trying to fix this guy's plugin

#

and I'm just crying

#

at how much he complicates some stuff

torn oyster
#

does anyone here use github copilot

eternal night
#

I know a few people use it

torn oyster
#

cus personally i do

#

i find it very useful for things that are very repetitive

eternal night
#

if you code properly you don't repeat yourself 5Head

paper viper
#

Nah I use it too

severe turret
#

tell it to this guy

torn oyster
#

why u bring this up

paper viper
#

There are some stuff like constants that are very repetitive and itโ€™s useful

severe turret
#

who made a class that has a function to check player's gamemode

#

๐Ÿ’€

eternal night
#

constants are repetitive ?

paper viper
#

The only annoying part is when it tab completes when you donโ€™t want to

paper viper
severe turret
#

bitch if statement doesnt exist or wat

paper viper
#

lol

torn oyster
# eternal night if you code properly you don't repeat yourself <:5Head:748091809615446056>

so you're telling me there is a better way to do this without copying+pasting

armor:
  helmet:
    material: DIAMOND_HELMET # Item to use as the helmet
    name: "Diamond Helmet"
    lore:
      - ""
  chestplate:
    material: DIAMOND_CHESTPLATE # Item to use as the chestplate
    name: "Diamond Chestplate"
    lore:
      - ""
  leggings:
    material: DIAMOND_LEGGINGS # Item to use as the leggings
    name: "Diamond Leggings"
    lore:
      - ""
  boots:
    material: DIAMOND_BOOTS # Item to use as the boots
    name: "Diamond Boots"
    lore:
      - ""```
#

i honestly don't know

eternal night
#

Hmm I guess not

severe turret
#

thats

#

1 min of work

#

?

torn oyster
#

but it did it in 1 tab complete

severe turret
#

and you paid 10$ for it

torn oyster
#

that's 1 minute more added to my lifespan

torn oyster
severe turret
#

Copilot is paid

#

no?

paper viper
#

Copilot auto completed it all

torn oyster
#

no

severe turret
#

Pretty sure it is

torn oyster
#

well not when i got it

#

if its paid

paper viper
#

So before I used reflection to do the constants but

severe turret
#

They changed it not too long ago

wild reef
#

Hey guys, how can I get the block which is infront of the water in this case?

@EventHandler
    public void onWaterFlow(BlockFromToEvent event) {
        Block toBlock = event.getToBlock();
        if (toBlock.getType() == Material.WATER) {
            
        }
    }

I am not sure how to use Blockface in this case

paper viper
#

I donโ€™t want to do that

#

Cause I lose inlining

#

I just end up manually doing the constants

#

But copilot does it all

torn oyster
#

that's right

#

damn i got it for free during the beta testing

paper viper
#

Idk itโ€™s sorta creepy that it sometimes can read my mind lmao

eternal oxide
severe turret
#

prob around

#

i guess you either check location

#

or smth

wild reef
eternal night
paper viper
#

Copilot is free if you are a student or you are a maintainer of a popular open source project (you would need to apply)

torn oyster
#

wait no it's gonna expire

ancient plank
#

I'm technically a student wesmart

quiet garden
echo basalt
#

what is considered a large project

torn oyster
#

because they helped beta test and provide feedback

echo basalt
#

like if I post a commit to paper

torn oyster
#

(i did not)

echo basalt
#

is it considered a large project

eternal oxide
#
event.getBlockFrom().getLocation().subtract(event.getBlocTo().getLocation()).toVector();```
quiet garden
torn oyster
paper viper
echo basalt
#

ehhh

torn oyster
#

until august 22nd

quiet garden
echo basalt
#

easier to just pay the 10$

quiet garden
#

xd

torn oyster
#

lmao

eternal oxide
#

that will give you a unit vector, you can add to or subtract from either Block location to get teh block infront or behind

ancient plank
#

I use github copilot to google for me wesmart

torn oyster
#

yo guys my video is doing so well ๐Ÿ—ฟ

ancient plank
#

type a question into a comment and it returns a stackoverflow answer

wild reef
eternal oxide
#

no

torn oyster
#

what is a gist

paper viper
#

GitHub paste

eternal oxide
#

Thats just a vector difference between the two blocks.

quiet garden
eternal oxide
#

so java Vector direction = event.getBlockFrom().getLocation().subtract(event.getBlockTo().getLocation()).toVector(); Block next = event.getBlockFrom().getLocation().add(direction).getBlock();

#

use more variables as thats ugly as hell, but you should get the idea

wild reef
#

ah I see, thank you

eternal oxide
#

you can add or subtract it from the to or from block location to get the Block in front or behind.

misty kayak
#

Not a coder so not exactly looking for code, but just wondering as a server owner if it's possible to make a bow shoot arrows further with a plugin, with it feeling natural ofc.

ancient plank
eternal oxide
#

yes

echo basalt
#

yes

#

just increase the arrow vel

misty kayak
#

o mb

misty kayak
#

but ty

wet breach
#

you just need to add more power ๐Ÿ˜„

vocal cloud
#

More oompf

torn oyster
#

what's the best version numbering scheme

eternal night
#

what do you mean best xD

#

schematic versioning is like, industry standard no ?

torn oyster
#

idk isn't there a few of them

vocal cloud
#

1.2.3 where 1 is a major rewrite, 2 is breaking update changes and 3 is for minor patches with no breaking changes.

buoyant viper
torn shuttle
#

so TempleOS

buoyant viper
#

(which ofc, should be a Linux distro)

buoyant viper
#

that

chrome beacon
#

Time to learn some HolyC

torn oyster
#

how do i make a config automatically upgrade between versions

#

if i change a few things

severe turret
#

huh

chrome beacon
grim ice
#

honestly why did they make configs in spigot yml and not json

#

is there a reason for that

#

if you're taking about readability, json's readability is very fine

#

if you have a parser that is

#

and all text editors have json parsers nowadays

vocal cloud
#

Cause yml is easier to read for non coders

turbid venture
#

just write your own configuration implementation in json then ๐Ÿ˜•

grim ice
#

why do you want it to be easy to read for non coders

#

you should have a way to see the config in commands anyways

#

plus even if ur not a coder u can read json

#

easily

eternal oxide
#

But no json is not easy to read, especially for a non coder

severe turret
#

isnt yml better for configuration

#

and json for storing data_

tall dragon
#

i would pick json for both myself if the data stored should be editable

severe turret
#

I just encountered

#

the weirdest spaghetti code

paper viper
#

Toml ๐Ÿ˜

severe turret
#

for some reason i cant destruct/place blocks in creative when i have op

#

XD

subtle folio
#

What does RenderType mean?

severe turret
#

lord save me

subtle folio
#

if I just want to display text do I have to pick either one?

severe turret
#

Controls the way in which an Objective is rendered client side.

subtle folio
#

Yeah but which do I use

#

they both look weird

severe turret
#

I assume it's made to render hp of entities

subtle folio
#

But im trying to make a scoreboard

#

ohw ait

#

i see

severe turret
#

?

#

maybe

elder blaze
#

how to add NMS to maven?

eternal oxide
#

?bt puts spigot (with NMS) in maven

undone axleBOT
eternal oxide
#

then depend on spigot not spigot-api

#

its all in the post I linked you to

#

?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

elder blaze
eternal oxide
#

yes

#

have you run buildtools for 1.12.2?

elder blaze
#

nop

eternal oxide
#

then do it

elder blaze
#

idk where to download

eternal oxide
#

?bt

undone axleBOT
eternal oxide
#

or

elder blaze
#

yea, but the download link for the jar file

eternal oxide
#

scroll down to point 5 on windows (if using windows) use that bat file to download and run your buildtools

elder blaze
#

I found

eternal oxide
#

IF you have curl installed

buoyant viper
#

tbh if i were someone who had never touched a PC before, i wouldnt want yaml or json, id want .ini (typically key=value)

subtle folio
#

.ini is nice for widestream stuff

#

where your target audience is normies

eternal oxide
elder blaze
#

yup

eternal oxide
#
  1. (optional)
elder blaze
#

right

#

thx

#

im downloading jdk 8

torn oyster
#

i set api-version to 1.19, but i wanna support earlier versions

#

how would i go about doing this?

elder blaze
#

wtf I have java 8

torn oyster
elder blaze
#

i have both

torn oyster
#

you most likely have set your java_home to 18

daring maple
#

you have to run buildtools with java 8

torn oyster
#

specify the java 8 binary

elder blaze
#

how?

daring maple
#

you could just use the path to your java 8 javaw.exe instread of java in the buildtools command

torn oyster
elder blaze
#

right

buoyant viper
#

what version r u building duke

torn oyster
eternal oxide
torn oyster
#

okay

#

what do you estimate it would go back to

daring maple
#

the javaw.exe has no console window

torn oyster
#

with a 1.19 plugin?

eternal oxide
#

the api version is the minimum version you rplugin requires to work

torn oyster
#

ideally i'd want to support 1.8 but i'm afraid that likely won't be compatible

#

should i just try it out?

eternal oxide
#

there is a LOT you can;t use on older versions

torn oyster
#

oh wait its a java 18 plugin

#

definitely won't work in 1.8

eternal oxide
#

then api version to 1.18 then

torn oyster
eternal oxide
#

api version is spigot version not java version

torn oyster
#

i'm aware

#

what spigot versions support java 18

eternal oxide
#

none require it

elder blaze
#

i uninstalled java 18 and worked

torn oyster
elder blaze
#

:p

torn oyster
#

but what spigot versions would be compatible with java 18 plugins

eternal oxide
#

they should all run on it

torn oyster
#

Failed to delete *\target\maven-status\maven-compiler-plugin\testCompile\default-testCompile\inputFiles.lst

#

what is this

next stratus
#

lol maven

torn oyster
#

i prefer it

next stratus
#

lol, using a outdated build tool from the 90s.

torn oyster
#

it's still maintained

next stratus
#

Uses up 5 lines instead of one singular clean line.

torn oyster
#

okay?

#

do you want a cookie?

#

a pat on the back?

next stratus
#

Nah, I just want maven to stop being used by beginners.

torn oyster
#

who says i'm a beginner

daring maple
#

What are u suggesting then?

severe turret
#

I don't like maven either

#

but it's used by 70% of builds

#

lol

torn oyster
onyx fjord
#

Its lts

torn oyster
#

okay

buoyant viper
next stratus
severe turret
#

huh?

severe turret
#

Everyone uses maven

#

How is that a stand out

#

๐Ÿ’€

torn oyster
#

doesn't spigot use maven

onyx fjord
#

It does

eternal night
#

It does

next stratus
severe turret
#

every beginner?

#

So 70% of applications worldwide

daring maple
#

Damn every beginner breathes air

delicate lynx
#

who cares if you are a beginner

buoyant viper
#

gradles not that big until u have multiple projects and they all have their own wrapper version downloaded

eternal night
#

It is almost like the system is intuitive

next stratus
onyx fjord
onyx fjord
next stratus
ivory sleet
tall dragon
#

that statement just makes little sense

severe turret
#

bro

onyx fjord
#

Daemon annoys me

severe turret
#

maven is the most used build tool

torn oyster
#

DevBukkit is the most basic name ever ๐Ÿ’€

severe turret
#

tf you on about

buoyant viper
severe turret
#

ye

#

its terrible

#

but it works

next stratus
onyx fjord
#

Rap battle?

ivory sleet
torn oyster
#

it sounds like something someone who really wanted to validate themselves in a programming community would call themselves

onyx fjord
#

Gradle more boilerplate

#

I still prefer it

#

(groovy tho)

next stratus
#

Gradle easier for beginners

ivory sleet
#

Literally less boilerplate?

buoyant viper
#

for a basic java hello world maven and gradle are equally as simple

ivory sleet
#

Indeed

eternal night
#

This is hurting my brain cells

torn oyster
severe turret
#

bro took my maven slander to another level

#

๐Ÿ’€

torn oyster
#

by convincing a Minecraft community to use it

onyx fjord
#

Just use whatever you want

ivory sleet
buoyant viper
next stratus
buoyant viper
#

in MC, server software tends to use maven

client software tends to use gradle

onyx fjord
#

Use the one you like more

eternal night
#

Like. If your build tool works for you that is all that matters

buoyant viper
#

granted forge and fabric run for both servers and clients

eternal night
#

What is the point of this discussion

buoyant viper
#

theyre more typically used for client

onyx fjord
#

I for example prefer maven syntax, but gradle configs look cleaner

#

But yea I'm used to XML

torn oyster
#

maven seems more readable

buoyant viper
#

i prefer gradle overall, but i dont like breaking changes on non-major updates

torn oyster
#

i've only ever used gradle once though so i'm not one to say that

eternal night
#

It is almost like it is very subjective

next stratus
onyx fjord
#

You can't be objective about it

buoyant viper
#

maven poms can go south very quick

dense shoal
#

I'm trying to horrify someone on my team, what's a good 1-5 liner that will put hair on their chest? Ideally spigot specific.

buoyant viper
#

especially if u have a lot of build plugins

#

or dependencies

tall dragon
#

why does there always have to be a discussion on whats better maven or gradle. who cares man. whatever feels best for you

ivory sleet
#

Readability tends to be subjective in regards to earlier experiences with all due respect

next stratus
#

Maven poms reminds me of arrow code

dense shoal
#

Ideally something really terrible for practice

ivory sleet
#

You can become arrow-y with gradle also

buoyant viper
ivory sleet
next stratus
onyx fjord
#

I enjoy XML

eternal night
#

The majority of web Devs looking at that statement like

onyx fjord
#

I like gradle groovy

ivory sleet
#

I assume maven to be more intuitive for these older devs that are so used to xml configs for logs, dependencies etc

buoyant viper
onyx fjord
#

But i hate gradle kotlin

eternal night
#

Kacper you are literally a mystery box with your opinions XD

ivory sleet
#

Well gradle groovy doesnโ€™t give good hints nor completions else Iโ€™d say itโ€™s fine

elder blaze
#

what is the Field type?

buoyant viper
buoyant viper
#

like why does it exist

ivory sleet
#

Like IntelliJ just throws unknown variable name at me all the time

severe turret
#

because groovy is terrible

onyx fjord
ivory sleet
#

Hence gradle kotlin dsl superior ๐Ÿ™‚

severe turret
#

kotlin dsl is way better

torn oyster
#

does anyone use 1.10

buoyant viper
#

and kotlin is the successor? ๐Ÿ˜ฌ

onyx fjord
#

Java > kotlin

buoyant viper
#

scala supremacy

elder blaze
onyx fjord
#

Clojure

eternal night
#

Haskel DSL next I hope

ivory sleet
#

Clojure

#

Yes

buoyant viper
#

oh wait scala DOES have a build system

idle pier
ivory sleet
#

Haskell dsl lol

buoyant viper
#

literally SBT

idle pier
#

ale coincidence

#

hey i have a question

onyx fjord
tall dragon
#

real chads use ant

torn oyster
buoyant viper
#

thats just mavens older cousin

eternal night
#

You mean makefiles and javac

elder blaze
buoyant viper
#

dont remind me makefiles work with basically everything

tall dragon
onyx fjord
ivory sleet
onyx fjord
#

That's cool af

eternal night
#

You can use make on anything

torn oyster
#

javac best compiler

buoyant viper
#

can i Make ur mom?

eternal night
#

Probably not at your age

elder blaze
onyx fjord
buoyant viper
#

Field

#

?!

onyx fjord
ivory sleet
#

I mean that looks like a variable so the type is Field?

buoyant viper
#

^^

ivory sleet
#

Assuming you mess with reflection nowโ€ฆ

idle pier
#

so can you register an event after the servers starts? For e.g you call a GUI classes constructor which has listeners from inside from the command executor class, how can i get it to cancel click/drag events?

elder blaze
buoyant viper
#

well what is the real header field

idle pier
#

Because im making a report menu. The menu shows up but i can click and drag shit. Too much perms maybe?

ivory sleet
#

But it isnโ€™t ideal unless you bake the event listener

idle pier
#

Because i just started to work

onyx fjord
#

Report menu ๐Ÿ’€๐Ÿ’€๐Ÿ’€

ivory sleet
#

Which well can lag

idle pier
onyx fjord
#

1.19.1

buoyant viper
#

u can also just call Field#getType btw

elder blaze
ivory sleet
onyx fjord
buoyant viper
#

?stash

undone axleBOT
onyx fjord
#

@idle pier mojang wants to add chat reporting to the game , basically you can get banned from Minecraft for X time

elder blaze
#

what?

#

:v

buoyant viper
onyx fjord
#

So ya better be politically correct

elder blaze
buoyant viper
#

for once the stash failed me

#

or maybe i failed it

onyx fjord
#

Yes

#

Or cloudflare

idle pier
#

and its not mojang, it's microsoft. Notch days were the good days

onyx fjord
#

I actually started playing notch game called wurm

paper viper
#

Notch person himself questionable tho

onyx fjord
#

Aka anti DRM party

onyx fjord
#

He just used Twitter

paper viper
#

Yeah

onyx fjord
#

Everyone who uses Twitter for posting shit is kinda questionable

#

Twitter is a big ? Mark

buoyant viper
#

for worse

elder blaze
onyx fjord
#

Twitter is a shit hole

onyx fjord
elder blaze
#

EULA is sh*t

buoyant viper
elder blaze
#

why I can't do ranks with extra perms for selling? EULA

onyx fjord
#

I have arachnophobia and I'm not banned

#

๐Ÿ‘

zenith gate
#

is there a way to make a command just execute another?

I want to give all recipes to everyone and make a command for it so they can use it for when I add new recipes. is there a way to make a command like /grecipes and it would execute the vanillia minecraft command /recipes give @s *

misty kayak
#

half the issue with EULA is that they don't even enforce it most of the time, so if you do violate EULA even slightly, you are at risk of your server getting in trouble for it, but the risk isn't high enough to deter the hundreds of prison servers that are copy paste versions of each other, just straight up selling OP armor and such

onyx fjord
buoyant viper
#

?jd-s

undone axleBOT
elder blaze
buoyant viper
#

?tas

undone axleBOT
zenith gate
elder blaze
buoyant viper
elder blaze
#

1.12.2

buoyant viper
#

ah

onyx fjord
#

๐Ÿ’€

elder blaze
buoyant viper
#

was gonna say bc newer versions have methods in the Player interface

misty kayak
#

I have none

#

our stuff is entirely cosmetic

onyx fjord
#

Either have EULA and enforce it or don't have it if you are not capable of enforcing it

#

Reports will have the same problem

buoyant viper
onyx fjord
#

On larger scale

misty kayak
#

but it's annoying as a server actually following EULA and then tons of servers are going around functioning as if EULA doesn't exist

elder blaze
#

:V

elder blaze
#
``` wtf
onyx fjord
#

Ur java old

buoyant viper
buoyant viper
elder blaze
#

how?

#

oh, in the pom

onyx fjord
#

Why not use 1.19

buoyant viper
#

maybe theyre trying to support 1.12.2+

#

idk

elder blaze
#
 public void showTabList() {
        new Runnable() {
            PacketPlayOutPlayerListHeaderFooter packet = new PacketPlayOutPlayerListHeaderFooter();
            @Override
            public void run() {
                try {
                    Field header = packet.getClass().getDeclaredField("header");
                    Field footer = packet.getClass().getDeclaredField("footer");
                    header.setAccessible(true);
                    footer.setAccessible(true);

                    header.set(packet, ChatColor.YELLOW + "TopoNetwork");
                } catch(Exception e) {
                    e.printStackTrace();
                }
            }
        };
    }
``` why doesn't work? 1.12.2
full steppe
#

Hi sorry for bothering but i was started with making a plugin for spigot 1.19. But when i use the (extends JavaPlugin) in the main class it dont works i looked into the spigot 1.19.jar and it has no JavaPlugin in it. Do someone knows how i can fix this ?

buoyant viper
#

?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

buoyant viper
#

u dont run the runnable

elder blaze
#

ae?

#

how i run?

buoyant viper
#

u call .run()

elder blaze
#

ae

buoyant viper
#

so like java new Runnable() { @Override public void run() {} }.run();

elder blaze
#

java.lang.NoSuchFieldException: header

buoyant viper
#

mappings issue, most likely

elder blaze
#

i didn't understood

buoyant viper
#

@worldly ingot hey ur online

#

whats minidiggers mappings viewer

quaint mantle
#

He wont even play rocket league with me

worldly ingot
#

It's a bit better anyways

buoyant viper
#

i think we need 1.12.2

worldly ingot
#

I mean, vanilla mappings didn't exist for that version

buoyant viper
#

o

#

hmm

#

well this is awkward

worldly ingot
full steppe
worldly ingot
#

This does exist

#

You can compare obfuscated and Spigot mappings there

eternal oxide
#

odd I didn;t get notified 1.19 announcement was posted

elder blaze
buoyant viper
full steppe
onyx fjord
#

๐Ÿ’€

#

Use maven or gradle

full steppe
eternal oxide
#

?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

elder blaze
#

so, @buoyant viper what mapping is the one for header?

buoyant viper
#

a

#

its an IChatComponent

elder blaze
#

and footer?

buoyant viper
#

b

#

also IChatComponent

elder blaze
#

right, thx

#

when did mojang published official mappings?

buoyant viper
#

either like

#

1.13+ or 1.16+? idk

elder blaze
#

Can not set net.minecraft.server.v1_12_R1.IChatBaseComponent field net.minecraft.server.v1_12_R1.PacketPlayOutPlayerListHeaderFooter.a to null value

#

where can be found?

buoyant viper
#

probably just need to set it to an empty text component

#

idk

#

i dont do NMS

elder blaze
#

xd

#

where can be official mapping found?

buoyant viper
#

in ur version json

elder blaze
#

a

buoyant viper
#

.minecraft/versions/<version>/<version>.json

#

but u wont find them for 1.12

elder blaze
#

so, JDecompiler and have fun

#

xd

buoyant viper
#

yeah

elder blaze
#

xd

elder blaze
#
public void showTabList(Player player) {
        CraftPlayer cPlayer = (CraftPlayer) player;
        IChatBaseComponent header = IChatBaseComponent.ChatSerializer.a("{text: '" + ChatColor.GREEN + ChatColor.BOLD + "TopoNetwork'}");

        PacketPlayOutPlayerListHeaderFooter packet = new PacketPlayOutPlayerListHeaderFooter();

        try {
            Field fHeader = packet.getClass().getDeclaredField("a");
            fHeader.setAccessible(true);
            fHeader.set(packet, header);
            fHeader.setAccessible(false);
        } catch(Exception e) {
            e.printStackTrace();
        }

        cPlayer.getHandle().playerConnection.sendPacket(packet);
    }
``` doesnt work
#

:c

subtle folio
#

Ladies, how do i overwrite a scoreboard line?

elder blaze
#

I think you need to delete the scoreboard and create again

#

but not sure

subtle folio
#

yuck is there like modify or smt?

zenith gate
#
while (incombat.contains(player.getName()) && incombat.contains(target.getName())){
                player.setFlying(false);
                player.setAllowFlight(false);
                target.setFlying(false);
                target.setAllowFlight(false);
            }

When using this, if the player gets out of combat these will all be able to come back to true right? or do I need to add something after this... It's been awhile since i've used while

elder blaze
#

when you setAllowFlight to false automatically the player stops flying

#

btw, yes, you can set to true only if isn't in combat

#

else, it will be false again

glossy scroll
#

someone sent me a really good website for mappings the other day

rotund scroll
#

so im updating the players name with GameProfile but #getPlayerExact returns null when you put the new name does anyone know how to update that?

glossy scroll
#

does anyone know what that website is

elder blaze
rotund scroll
#

ok thatdoesnt answer my question

zenith gate
elder blaze
#

:c

elder blaze
#

https://prnt.sc/GkLDF6OBSgPz when running this throws me this error Caused by: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 3 path $.

quaint mantle
#

if youโ€™re using scoreboards

subtle folio
winged storm
#

how do i use persistant data holder

glossy scroll
buoyant viper
elder blaze
#
public void showTabList(Player player) {
        CraftPlayer cPlayer = (CraftPlayer) player;
        IChatBaseComponent header = IChatBaseComponent.ChatSerializer.a("{\"text\": \"TopoNetwork\"}");

        PacketPlayOutPlayerListHeaderFooter packet = new PacketPlayOutPlayerListHeaderFooter();

        try {
            Field fHeader = packet.getClass().getDeclaredField("a");
            fHeader.setAccessible(true);
            fHeader.set(packet, header);
            fHeader.setAccessible(false);
        } catch(Exception e) {
            e.printStackTrace();
        }

        cPlayer.getHandle().playerConnection.sendPacket(packet);
    }

When player joins to the server: java.lang.NullPointerException

elder blaze
glossy scroll
#

you need to either show us more of the stacktrace or give us a line

#

ideally tell us the line

#

because that doesnt have line numbers

elder blaze
#

doesnt print the stack trace

#

xd

glossy scroll
#

so how can you be sure its happening in that method?

elder blaze
elder blaze
eternal oxide
#

?paste teh full stacktrace you get in console

undone axleBOT
glossy scroll
#

so im guessing

#

its a client side npe?

#

like you get auto kicked?

elder blaze
elder blaze
eternal oxide
#

malformed json

glossy scroll
#

open your player log

#

there may be a more detailed NPE

#

otherwise, my guess is that you also need to set a footer

elder blaze
#

and auto kicks me

eternal oxide
#

TabList.java:18

elder blaze
#

IChatBaseComponent header = IChatBaseComponent.ChatSerializer.a("{\"text\": \"TopoNetwork\"}");

#

that is right

glossy scroll
#

is it?

#

what version of mc is this

elder blaze
#

yup

elder blaze