#help-development

1 messages · Page 29 of 1

carmine nacelle
#

@lost matrix How can I print the PDC stuff like you were earlier

#

got a code example...?

#

its 3am i gotta be up for work at 7 i just wanna go to bed with SOMETHING 😭

lost matrix
echo basalt
#

I mean he technically can

#

but it's a pain in the ass

carmine nacelle
#

I fixed my pom

abstract sleet
#

Data command useful for debugging PDC 🙂

carmine nacelle
#

by fixed I mean copied over and slightly modified my correctly setup one.

echo basalt
#

I made sure to use obfuscated nms until like 1.19 before I took the 10 minutes or so to setup paperweight

crisp steeple
carmine nacelle
#

oh i already am

#

been working on something that should be simple all day.

#

losing my damn mind

lost matrix
echo basalt
lost matrix
echo basalt
#

well I'm a self employed mf

carmine nacelle
#

🤔

lost matrix
#

Ah...

carmine nacelle
#

bruh

#
[03:00:32] [Server thread/INFO]: IN: {AbsorptionAmount:0.0f,Age:-23485,AgeLocked:0b,Air:300s,AngerTime:0,ArmorDropChances:[0.085f,0.085f,0.085f,0.085f],ArmorItems:[{},{},{},{}],Attributes:[{Base:0.30000001192092896d,Name:"minecraft:generic.movement_speed"},{Base:10.0d,Name:"minecraft:generic.max_health"}],Brain:{memories:{}},Bukkit.Aware:1b,Bukkit.updateLevel:2,CanPickUpLoot:0b,CannotEnterHiveTicks:0,CropsGrownSincePollination:0,CustomName:'{"extra":[{"text":"Bee"}],"text":""}',CustomNameVisible:1b,DeathTime:0s,FallDistance:0.0f,FallFlying:0b,Fire:-1s,FlowerPos:{X:208,Y:-60,Z:-491},ForcedAge:0,Glowing:1b,HandDropChances:[0.085f,0.085f],HandItems:[{},{}],HasNectar:1b,HasStung:0b,Health:10.0f,HivePos:{X:207,Y:-60,Z:-494},HurtByTimestamp:0,HurtTime:0s,InLove:0,Invulnerable:0b,LeftHanded:0b,Motion:[-0.05289643974896804d,-0.08775135175184261d,-0.0855890298254691d],NoGravity:1b,OnGround:0b,PersistenceRequired:0b,PortalCooldown:0,Pos:[208.14675354944438d,-59.084147664610065d,-491.92242155029095d],Rotation:[133.616f,0.0f],Spigot.ticksLived:516,TicksSincePollination:0,UUID:[I;1514243939,-388348510,-1599515425,2124153910],WorldUUIDLeast:-5526025201707824336L,WorldUUIDMost:4772959422628644230L,id:"minecraft:bee"}
echo basalt
#

Sure I do have contracts with companies

carmine nacelle
#

its not even having my PDC when it enters at this point

echo basalt
#

But I also do freelance work on top

carmine nacelle
#
        ServerLevel world = ((CraftWorld) player.getLocation().getWorld()).getHandle();
        CustomBee customBee = new CustomBee(player.getLocation(), ColorUtil.color("Bee"), true);
        world.tryAddFreshEntityWithPassengers(customBee);

        testbee.setBeeUUID(customBee.getBukkitEntity(), customBee.getBukkitEntity().getUniqueId());
#

is this somehow the wrong way to do it 🙃

carmine nacelle
#

    public void setBeeUUID(org.bukkit.entity.Entity bee, UUID uuid) {
        NamespacedKey beeUUIDKey = new NamespacedKey(this, "bee-uuid");
        bee.getPersistentDataContainer().set(beeUUIDKey, PersistentDataType.STRING, uuid.toString());
    }
#

I love being a wage slave

echo basalt
#

Half the work I did was unpaid 🤡

lost matrix
#

I was also not allowed to work more than 8 hours a day. If we didnt meet deadlines then it was a sign of failure on the
management level. Really liked that company.

#

They wanted efficient work > a lot of unproductive work

echo basalt
#

I mean

#

I don't work that many hours

carmine nacelle
#

alright i cant do this anymore today im gonna have a breakdown 🤡 thx for the help guys i might be back tomorrow to cry more

echo basalt
#

But I'm working every day and spend way too much time worrying about work

#

First thing I do when I wake up is check discord for any dms

#

it came to the point where I changed my sleep schedule to match my employer's fucked up sleep schedule

lost matrix
#

The last mc job i had was really well payed. But it was a nft focused company. And whoever read the last
update knows how that went. Im actually considering just opening my own mc server at this point.

echo basalt
#

there are still some companies paying good

#

I actually have a commission job I'm willing to outsource to top tier devs, pays minimally decent

wet breach
#

there really isn't too much requirements in regards to working in the US other then how much you get paid after so many hours worked, also they can't force you to work a triple shift but allowed to do work such hours, but they can have you do a double shift etc. Also it varies between states a bit as well as some states add other things. But really it just comes down to whether or not a company wants to pay for them overtime. Overtime in the US is time and half. Overtime starts after you have worked 8 hours in a day or more then 40 hours in a week. Double time starts after you hit 80 hours if I remember correctly

#

but the US has such a high GDP thanks to how we work though, so I guess there is an upside to it lmao

echo basalt
#

I live in portugal

#

minimum wage means average wage

#

law says 45h/week @ 4$/hr

#

sure you get paid time off

#

but if you make more than 2k/mo you're paying like 52% income tax

lost matrix
#

We in germany have a max of 40 hrs/week @ min 10$/hr

#

But getting a tiny 1 room flat where i live is at least 800$ (cold)

echo basalt
#

well

#

1 room apartment here is like 600$/mo

#

basically if you're single you gotta live with your parents

#

regardless of what job you have (because they all pay the same)

lost matrix
#

Seems a lot for 4$/hr

echo basalt
#

Nothing we can do about it

lost matrix
wet breach
#

seems expensive to get your own place in Germany, but that could be due to space being limited as wlel

#

where I am at right now I can get a 2-3 bedroom house for between $1,200-$1,600 give or take.

lost matrix
wet breach
#

Well I wouldn't really say its a problem across all of the US

lost matrix
#

This is the us. Avg housing price vs avg income. Take a look at the 2006 housing bubble and now.

echo basalt
#

germany is suffering a bit due to gas and oil prices

granite burrow
#

How can I edit a players name tag?

wet breach
#

it gets skewed when they add in some people making unusual amounts

lost matrix
echo basalt
wet breach
#

also housing prices get skewed when you add in states or places in certain states that have always been notorious for high housing prices

echo basalt
#

2 countries that source their gas from African countries instead of russia

wet breach
#

like New York, NY San Francisco, CA some ares in LA, Seattle, WA etc

lost matrix
echo basalt
wet breach
#

lol

winter scarab
#

can the getKeys() method get keys within another config section?

wet breach
#

if you mean to get the keys of a inner config section

echo basalt
winter scarab
#

if i mention it from an outer layer

lost matrix
echo basalt
#

If you set it to true, it will return keys for the contents of the section too

wet breach
#

you need to create a double loop

#

if you want getKeys() to get the config section of the outer and inner ones

lost matrix
winter scarab
#

got it thanks

lost matrix
#

In the 1920s you could buy a house with 2.24 annual salaries.
Imagine that. A family house for like 150 - 200k

echo basalt
#

I mean

#

a family house here costs like 200-300k

#

but the annual salary is like 10k

lost matrix
#

big oof

charred blaze
#

how can i create minecraft java bot?

lost matrix
charred blaze
#

i just want to create program

#

which can join bot

#

on any server

charred blaze
lost matrix
# charred blaze is there any toturials?

Def not. This is an advanced topic and you need to know what you are doing.
I only know an api for C# (MineBot) and for JavaScript (Prismarine/Mineflayer)
Then there is Baritone.

lost matrix
echo basalt
#

It's still documented

#

trash or not

lost matrix
#

Uh there is one for C++. Ill give this one a try.

#

Mojang why? blobimfine

charred blaze
#

why am i seeing china symbols

#

it says "do this"

#

but does not explains how

quaint mantle
#

Anyone here make plugins?

lost matrix
granite burrow
#

How come my title stays when I join the server even though I have Player#resetTitle();?

charred blaze
quaint mantle
#

I need help from a dev

lost matrix
quaint mantle
#

Oh

charred blaze
#

wait is that even java?

opal juniper
#

js i think

#

wait no that’s pseudo code lol

lost matrix
glass mauve
#

isn't pseudo with ":=" instead of "="

#

but yea looks like pseudo

echo basalt
#

man really expecting to be spoonfed a whole ghost client

#

I should make a youtube tutorial on how to write a minecraft hacked client from scratch

lost matrix
# quaint mantle Oh

And then there is this guy who seriously just said "Oh" and left, after me telling him that all we do is paint old penguins...

charred blaze
#

can i use this?

echo basalt
#

with code examples, tips & tricks and follow-up paid courses

echo basalt
lost matrix
echo basalt
#

make your library

drowsy helm
#

How do the custom entity plugins handle their hitboxes?

#

seems quite accurate

echo basalt
#

you can just expand an entity's AABB

charred blaze
echo basalt
#

Are you even attempting

#

Like properly

charred blaze
#

yes

#

how to do this?

lost matrix
charred blaze
lost matrix
charred blaze
echo basalt
#

my man

#

You need to understand basic networking

#

and how bytes generally work

charred blaze
echo basalt
#

Look into TCP

charred blaze
lost matrix
echo basalt
#

🤦 🥣

lost matrix
charred blaze
lost matrix
#

There is the documentation

echo basalt
lost matrix
echo basalt
#

Implementing an if statement for each packet individually

#

Pains me a bit

#

Reminds me of that one spigot class

#

That handles all player packets

#

But at least those have methods

lost matrix
#

Why not use a Map<Class<? extends Packet>, Consumer<? extends Packet>>

drowsy helm
#

Custom Entity models are gonna be much harder than i thought lol

lost matrix
drowsy helm
#

the models

lost matrix
#

Yes thats quite difficult. Why not use ModelEngine?

echo basalt
echo basalt
#

Modelengine is gangsta but the api hurts to see

drowsy helm
#

other peoples plugins are for the weak

#

ill have a look at it

lost matrix
#

Ive done custom models in the past. I had no fun with all the quaternions...

#

Its really labour intensive.

echo basalt
#

I looked into making my own modelengine but I don't even understand Math.tan much less quaternions or Euler

drowsy helm
#

i made my own game engine a few months ago

echo basalt
#

I failed trig 🥲

drowsy helm
#

im pretty sure most of the math carries over

noble lantern
echo basalt
#

I don't see no ArrayIndexOutOfBoundsException

#

writes pull request

noble lantern
#

ngl

#

try it

echo basalt
#

fuck now you're actually gonna make me do it

noble lantern
#

just say "I got an AOOBE one time, this will solve it and let me debug it easier"

#

bam

#

ez

echo basalt
#

lmao

#

I don't think any of the methods throw it

#

so the ide might yell at me?

noble lantern
#

well

#

edit it in the webpage

#

wouldnt compile on an ide

#

so its even a bigger troll kekw

quaint berry
#

What's a fast way to update a plugin on a server? Personally I have to stop the server then drag the build of my plugin to the plugins folder then wait for the server to start again. Is there a faster way to do this?

naive bolt
#

how do i add a standard plugin jar into maven to use as an api from a plugin

lost matrix
#

Why do you need a jar?

lost matrix
#

Doesnt even have a maven repo. Anyways:

mvn install:install-file -Dfile="some/path/to/lib.jar" -DgroupId="some.id" -DartifactId="xyz" -Dversion="1.0.0" -Dpackaging=jar

This installs a jar file into your local maven repo.

#

After that you can just use the groupId and artifactId you have chosen in your pom

lost matrix
# quaint berry .

Write a shell or batch script. And use the updates folder instead.

quaint berry
#

Updates folder?

lost matrix
#

In the bukkit.yml there is an option for update-folder. If you put an updated plugin .jar into the update folder it will automatically update those plugins when the server restarts

quaint berry
#

Can't I just change the output for maven to the plugins folder then just use reload confirm?

naive bolt
#

but i can see that it much does exist

lost matrix
lost matrix
naive bolt
wet breach
quaint berry
lost matrix
wet breach
#

average salary however is like $60k a year

quaint berry
#

Like have the output where it normally is but make a copy of the finished.jar?

eternal oxide
#

its better to add a copy command to yoru server startup script

lost matrix
#

This is more continous integration territory and not really a concern for maven. So a script to copy the files
would be more appropriate.

quaint berry
eternal oxide
#

This is my test server start.bat```bat
@echo off
@echo Updating GroupManger...
copy /B/Y P:\eclipse2020-workspace\GroupManager\target\groupmanager.jar plugins
@echo Updating iConomy...
copy /B/Y P:\eclipse2020-workspace\iConomy\target*.jar plugins
@echo Updating AI...
copy /B/Y P:\eclipse2020-workspace\AI-plugin\target\AI.jar plugins
@echo Updating FakePlayer...
copy /B/Y P:\eclipse2020-workspace\FakePlayer\target\FakePlayer.jar plugins

for /f "tokens=" %%a in ('dir spigot.jar /b') do set p=%%a

if defined p (
echo Starting Server... %p%
java -Xms1G -Xmx1G -Dlog4j2.formatMsgNoLookups=true -jar -DIReallyKnowWhatIAmDoingISwear "%p%" nogui
) else (
echo No Spigot found!
)

pause```

gleaming grove
#

em.. I just made the update checker for my plugin, the plugin on start sends request to Github releases and checking current version. Well windows see it as a virus, what can I do to prevent that?

wet breach
#
<project>
    ...
    <build>
        <plugins>
            <plugin>
                <groupId>com.coderplus.maven.plugins</groupId>
                <artifactId>copy-rename-maven-plugin</artifactId>
                <version>1.0</version>
                <executions>
                    <execution>
                        <id>copy-file</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                                <sourceFile>source-files/foo.txt</sourceFile>
                                <destinationFile>target/destination-folder/foo.txt</destinationFile>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
#

@quaint berry

quaint berry
#

Wow

#

I might just add a copy in my run.bat

#

I may borrow the code above tho

#

Thanks

eternal oxide
#

My buildtools script is nicer

#

?paste

undone axleBOT
eternal oxide
#

lol md5 paste won;t let me paste my buildtools script

#

"Something went wrong"

#

is paste broken?

dusk flicker
#

Worked for me

#

Thats weird lol

eternal oxide
#

soon as I click save, it errors

#

yep, definitely my script

vocal cloud
#

Give me the virus instead

eternal oxide
#

just pasting that on md5 and it errors

opal juniper
#

md has changed his a bit

naive bolt
#

how do i give a potion effect to a player

quaint berry
#

How do I make my plugin do something every tick?

#

I want to just check for morning time

eternal oxide
#

are you just looking to see if morning arrives due to sleeping?

quaint berry
#

That would work if anyone actually slept on my server

#

So no

#

I think this would be helpful since I want to check if any player is in a certain biome

eternal oxide
#

?scheduling

undone axleBOT
eternal oxide
#

runTaskTimer

quaint berry
#

I'll have a look

#

Thanks

quaint berry
#
@Override
    public void onEnable() {
        getServer().getLogger().log(Level.INFO, "Example has started");
        getServer().getPluginManager().registerEvents(new HardModeEvents(), this);

        Bukkit.getScheduler().runTaskTimer(this, () -> {
            //Do something
            
        },0,2);

    }
#

Would this be correct?

#

Also

#

What is the delay and period?

brave sparrow
#

Delay is number of ticks to wait before executing the task, period is ticks to wait between executions of the task

quaint berry
#

So the Delay would only be used once?

brave sparrow
#

Correct

#

Delay is a one time wait before starting the cycle of executions, period is the repeated waiting period between each execution

quaint berry
#

I'm just double checking, A period of 2 would be every tick?

brave sparrow
#

No

earnest forum
#

1 is every tick

brave sparrow
#

A period of 1 would be every tick yeah

#

A period of 2 would be every 2 ticks

quaint berry
#

Could I run multiple of these?

#

In a different class?

earnest forum
#

yes

brave sparrow
#

You can run as many as you want

#

You don’t need a different class

#

But you can run them in any class

#

So long as you replace “this” with the instance of your plugin

quaint berry
#

So this would work?

#

Or not?

brave sparrow
#

That would run roughly every second

quaint berry
#

But they would both run?

brave sparrow
#

Yes

quaint berry
#

Perfect

#

Thank you

#

What I replace this with again?

brave sparrow
#

The instance of your plugin

tender shard
#

or any other plugin, lol

vocal cloud
#

Yeah just pass in someone else's plugin to really ingrain the definition of dependency

quaint berry
#

I put my plugin instance and forgot the new 🤦🏻‍♂️

echo basalt
#

new 👀

tender shard
#

nooo

#

lol

vocal cloud
quaint berry
#

Uh oh

tender shard
#

never do new MyPlugin ()

quaint berry
#
public void everyFiveTicks() {
        Bukkit.getScheduler().runTaskTimer(new HardMode(), () -> {
            //Do something

        },0,1);
    }
vocal cloud
#

Oh no

quaint berry
#

HardMode() is the main class

#

I think I messed up

vocal cloud
undone axleBOT
neat meadow
#

Another way: JavaPlugin.getProvidingPlugin(TheNameOfTheClassYouAreCurrentlyWritingThisCodeOn.class)

vocal cloud
#

Yeah, but you could just use di which is much better

ivory sleet
#

A bit more decoupled and testable yeah

quaint mantle
#

what am I doing wrong D:

peak depot
#

fatal: failed to write commit object

quaint mantle
#

what does dat mean

peak depot
#

Im not 100% sure but maby portable git thing is fucked

quaint mantle
#

my end

#

or?

peak depot
#

try deleting the portable git folder in the buildtools folder

quaint mantle
#

there isnt any

#

the only .git folder I see

#

is in the main thing

severe turret
#

or is that bad

quaint mantle
#

C:\Users\FunniPerson

#

here

peak depot
quaint mantle
#

how?

#

do I delete the thing

#

and make it again?

peak depot
#

try that yes

#

if it worked build tools should say smth like cant find portable git startng download

quaint berry
brave sparrow
#

You have to pass your plugin instance as a variable

#

When you construct your class

#

Notice how you seem to have done it for your listener

#

Never mind

#

You didn’t

quaint berry
#

Uhhhhh

brave sparrow
#

Do you know what a constructor is?

quaint berry
#

Yes

brave sparrow
#

public A(B myplugin) {
this.myplugininstance = myplugin;
}

#

public void onEnable() {
new B(this);
}

severe turret
#

Just do public YourPlugin instance; in your class

#

easy

brave sparrow
#

Absolutely not lol

#

That shouldn’t be public

peak depot
#

do it as in the tut he send earlyer

cunning canopy
#

Can you use location#add with negative values?

severe turret
#

If you're already creating a public getInstance method

#

🤷‍♂️

cunning canopy
#

Thanks

#

Does location add change the location or just return the changed location?

brave sparrow
#

Modifies and returns

eternal oxide
#

it mutates teh location

severe turret
#

I've seen several people use that so idk

brave sparrow
#

I’m intrigued

cunning canopy
#

When you teleport will the players feet be at the location you teleport to?

tardy delta
#

i've never seen him type 'the'

eternal oxide
#

on occasion my fingers get it right

cunning canopy
#

Thanks ppl

quaint berry
#

What is a A and B?

#

I think I'm being special

ivory sleet
#

B is your main class

gray merlin
#

Here's a "the"

ivory sleet
#

The one that extends JavaPlugin

#

(Case sensitive)

brave sparrow
#

^

quaint berry
#

I thought so but it didn't work

ivory sleet
#

A would be the other class

quaint berry
#

I only have 2 classes...

ivory sleet
#

Yes

quaint berry
#

java.lang.IllegalArgumentException: Plugin cannot be null

peak depot
ivory sleet
#

Then you’re doing it incorrectly

ivory sleet
brave sparrow
tardy delta
#

just use di

brave sparrow
quaint berry
#

Main class in the onEnable():

new HardModeEvents().getPluginInstance(this);

The other class:

HardMode myplugininstance;

    public void getPluginInstance(HardMode myplugin) {
        this.myplugininstance = myplugin;
    }
ivory sleet
#

no no no

quaint berry
#

I messed alot upo

ivory sleet
#

?di

undone axleBOT
brave sparrow
#

They already got sent that

tardy delta
#

some of us are talking about di and some about singleton :/

brave sparrow
#

They didn’t understand it

ivory sleet
#

Oh hmm

gray merlin
#

Does an item "meta" contain the "tags" seen in the playerdata?

brave sparrow
quaint berry
#

Ok

tardy delta
#

the static getter thing 🥺

brave sparrow
gray merlin
ivory sleet
#

verify maybe

gray merlin
#

Oh, there's a verification.

peak depot
gray merlin
#

I didn't notice

tardy delta
#

oh actually no

quaint mantle
ivory sleet
#

No worries

tardy delta
#

dont attack me 🥺

quaint berry
quaint mantle
#

which particular file to delete

brave sparrow
#

For your listener class

#

Like the code I sent you

peak depot
ivory sleet
#

Charlie you might also wanna learn a little bit about methods and constructors, especially the difference

brave sparrow
#

^

quaint mantle
peak depot
#

can you send a screen?

gray merlin
#

There

quaint berry
gray merlin
brave sparrow
gray merlin
#

That "tag" field in there storing enchantments, and modded data.

quaint mantle
#

wym

#

like the command?

#

or?

peak depot
#

yes

quaint mantle
#

java -jar BuildTools.jar --rev 1.11

quaint berry
peak depot
#

can you send the log again?

quaint berry
#

Shall I just send my code in a pastebin?

peak depot
brave sparrow
quaint mantle
#

alr 1m

#

?paste

undone axleBOT
quaint mantle
#

loook

quaint berry
#

I'm stuck

quaint mantle
peak depot
brave sparrow
quaint mantle
#

ok

brave sparrow
#

First off - it needs to be public

#

Second - it needs to have a parameter of type HardMode

peak depot
brave sparrow
#

Then take that code inside getPluginInstance and stick it into the constructor

quaint mantle
#

got this

#

but where do I put this?

peak depot
#

open portable git

severe turret
#

in the cmd

quaint mantle
#

wher

#

git bash?

severe turret
#

yes

peak depot
#

yes

quaint mantle
#

ok now wut

peak depot
#

paste it with your data

#

and then retry

quaint mantle
#

how?

#

oh

#

wait

severe turret
peak depot
#

no you need to open cmd and then just do git config --global user.email "saraswathi.hts@gmail.com" git config --global user.name "Dctrrr"

brave sparrow
quaint berry
brave sparrow
#

@quaint berry did you see my response

quaint berry
#

Yes

brave sparrow
#

Did you follow those steps?

severe turret
#

I use this but ppl said it's bad

brave sparrow
#

That is bad

#

Lol

severe turret
#

🤷‍♂️

brave sparrow
#

It’s one thing to actively go against good practices in your own code, but at least don’t teach beginners bad practices when they ask for help lol

severe turret
#

You'd want to do this

#

Idk

#

I didn't know it's a bad practice

brave sparrow
#

That’s exactly what you should do

severe turret
#

I saw it in someone's github

#

So I started using it

brave sparrow
#

That’s the right way

tardy delta
#

its just di?

gray merlin
#

So... Does the metadata in bukkit items contain the item tags?

brave sparrow
#

Why were you talking about having public plugin variables earlier if you have it the right way in your code 🤦‍♂️

severe turret
#

I don't

#

I use it like that

brave sparrow
#

Like what

severe turret
brave sparrow
#

Well that is bad practice if you’re just modifying variables all over the place

quaint mantle
#

or?

quaint berry
#

Somehow it works

tardy delta
severe turret
#

If you declare it final it requires initialization

#

whcih I'm not doing

#

and private would return null

#

Idk I saw someone using it like this

brave sparrow
severe turret
#

I would have to create an object of the class

brave sparrow
quaint mantle
#

@peak depot sitll the same error

#

*still

#

Use git bash to run the command

#

Buildtools is funky

#

I did

#

😮

#

like this is the 9 th time

#

do I send logs again or smth?

quaint mantle
#

If i dont respond

#

Dont ping me

#

ok

quaint mantle
#

just in case

cunning canopy
#

I have to make an entity float over a player. Would the most efficient strategy be to schedule a repeating task that teleport the entity over the player?

gray merlin
#

Is there any way for me to get the NBT data for an item?

#

the item-nbt-api dependency isn't working for me

eternal oxide
quaint mantle
#

it is trying to do something with spigot api
u need a user Key
AgentKloon — Today at 5:12 PM
it worked the first 3 times
Chimmy — Today at 5:12 PM
u ccan get that
in your
spigot account
then go api
and get API key
and use thay

gray merlin
quaint mantle
#

OH

#

lol

#

does anyone know how to get user key?

#

wait

opal sluice
#

Does anyone already worked with multiple database with HikariCP?
I have a some issues with the database selection after the connection times out

quaint mantle
#

nbt supports 1.7

quaint berry
vocal cloud
#

Spigot has an API?

quaint mantle
#

I thought spigot did a framework

vocal cloud
#

Spigot is actually a really good restaurant

opal sluice
#

Database selection on connection timeout HikariCP

hardy swan
#

spigot is actually a tap

radiant aspen
#

No, spigot was actually what was inside of you all along

hardy swan
#

Spigot is the friends we made along the way

near night
#

how can i cast nms custom enite Zombie to craft Zombie?

hardy swan
#

you cannot

near night
#

so how can i do this java Zombie zombie = (Zombie)entity; AttributeInstance dmgAttribute = zombie.getAttribute(Attribute.GENERIC_ATTACK_DAMAGE); dmgAttribute.setBaseValue(200);

#

coz it error

hardy swan
#

you have other ways of getting the bukkit entity from an nms entity and vice versa

near night
#

how?

hardy swan
#

getBukkitEntity

near night
#

tysm

quaint mantle
tall dragon
#

you rlly shoulnt have _ in your class names

quaint mantle
#

anyone help pls

near night
#

i just testing nms

hardy swan
full holly
#

Does anyone know how to remove the "Respawnpoint set" message?

vital mortar
#

Hey! I'm facing this weird problem where every time the plugin reloads the listeners in my GUI get disabled

#

after opening the menu and reloading you can take out items

near night
#

why are you reloading?

#

just restart

vital mortar
#

what

#

thats still a problem?

#

cant just tell the people that use it "dont reload lmao"

near night
#

yeah...

tardy delta
#

reloading breaks stuff as the reload implementation of many plugins sucks..

vital mortar
#

huh

#

so no way of reregistering the listener on reload right?

#

because its in the constructor of the class

tardy delta
#

its not good to have a listener for each one of your guis instances too

#

rather have a kind of collection

vital mortar
#

well thats not possible until the first new call is made

#

does data in list get flushed once the server reloads?

tardy delta
#

also this isnt C#, dont prefix field names with an underscore

kind hatch
vital mortar
#

damn thats bad

kind hatch
#

It makes sense though when you think about it.

vital mortar
#

I thought about closing all GUIs once the server reloads or the plugin gets disabled

#

?

#

isnt that just inefficient

#

people that use the plugin will reload

kind hatch
#

Some plugins have better support for reloading than others, but some vanilla features can get buggy as well. I recently experienced a visual bug that left ghost mobs on my screen, but upon relogging, everything was fine.

glossy scroll
#

You shouldnt expect people to reload

#

Especially considering most servers use ProtocolLib

noble lantern
#

people who know what theyre doing wont reload plugins during prod

wet breach
#

the reason it is stated to not use the reload command is because most developers do not code their plugins to handle that command. For testing purposes it is fine to use so as long as you coded your plugin to handle it.

glossy scroll
#

You could always add a reload command for your plugin too

#

If its something you want to support

vital mortar
#

so I can ditch the efforts either way?

wet breach
#

Usually best to provide such a command for your plugin as it is better to reload the single plugin, then to use the server reload command and reload everything in the server

#

however, you should always code your plugin to handle the reload command regardless

tardy delta
#

i was reloading the server for testing purposes and it broke my plugin smh

vital mortar
#

ohh

#

ok then

#

thanks

severe turret
#

@brave sparrow

#

throws NullPointer

#

yikes

glossy scroll
#

Sometimes its just too bothersome to handle

tardy delta
severe turret
tardy delta
#

are you calling getConfig() in the plugins constructor?

severe turret
#

I'm calling it in the method inside the class

wet breach
#

but that is what defines a decent developer from those that are not

quaint mantle
#

wait

#

Is it so hard to just clear colelctions

#

?

#

No

#

my brain

#

fuck it

severe turret
#

I don't understand why it doesn't work

tardy delta
#

you gotta show more code lol

wet breach
#

since it needs a config

#

which generally for some they have issues loading properly and thus nulling out 😛

charred blaze
#

how is it possible to handle 2k players on single server?

tardy delta
#

thought he was doing getConfig() stuff before plugin is enabled or smth?

charred blaze
glossy venture
#

you can also have a plugin which allows players to view players from other servers

severe turret
#

this is the whole class

wet breach
glossy venture
#

so theyre actually divided between server

glossy venture
#

packets

charred blaze
#

is there any plugin like that yet?

eternal oxide
#

you also need a MASSIVE network pipe to handle that many connections

glossy venture
#

probably

#

mrbeast did it

wet breach
#

the only way you are going to get 2k players on a single server other then cramming them into a hub server, is by running custom servers

glossy venture
#

i think

wet breach
#

minecraft is not enterprise software and neither is spigot

#

or paper

#

if you want enterprise level software you are going to have to invest into it whether it be yourself with time or paying someone to do it for you

eternal night
#

The 2k of mrbeast isn't a single server

wet breach
#

generally it isn't no

#

but regardless it is custom server stuff

eternal night
#

I don't recall if it was a fork or a plugin on paper

wet breach
#

it is funny how many people think it is like magic getting that many players on a single server

#

regardless of game

eternal night
#

Well let's hope we get regionized ticking at some point

#

Would break all plugins but

#

Cool anyway

wet breach
#

lol

#

one day I will create a custom fork of spigot to allow load balancing

#

and then maybe people can stop asking how you get 2k players on a server 😛

vocal cloud
#

Just write it in rust /s

vital mortar
#

facts

glossy venture
#

he used a network

#

and then had players able to see eachother

#

with a plugin or smth

vital mortar
#

is the getConfig() thingy cached?

eternal oxide
#

no

vital mortar
#

or does it even need to be cached 💀

eternal oxide
#

unless you assign it to a field

glossy venture
#

its loaded when your plugin loads

eternal oxide
#

it sits in memory

glossy venture
#

yeah

#

so it doesnt reload every time you call getConfig() if thats what you mean

severe turret
#

plugin.getConfig() throws NullPointer

#

halp

eternal oxide
#

plugin is null

severe turret
#

👍

#

nice

#

I know

#

but why

eternal oxide
#

becase you never set it. I've not looked at your code but don;t need to

vital mortar
#

^^^

#

use a constructor

severe turret
#

?

#

I did set it

vital mortar
#
public AntiChatSpamConfig(AntiChatSpam plugin) {
    this.plugin = plugin;
}
severe turret
#

yes

#

RequiredArgsConstructor

vital mortar
#

ok but where is this line

severe turret
#

Lombok annotation

vast raven
#

In an ArrayList where all ten indexs are full, but I wanna remove such as the 7 index, can Collections.sort() sort move the next indexs back to fill the empty one?

golden pumice
#

do you guys know how to get a SNBT string of a Itemstack?

vital mortar
#

but unless a constructor is added this just does nothing

severe turret
#

Lombok generates the constructor

vital mortar
#

ok

#

I see

severe turret
#

it's there

vital mortar
#

apparently lombok failes?

severe turret
#

I'm using the same annotation for events

#

and commands

vital mortar
#

maybe the final fails?

severe turret
#

?

vital mortar
#

idk tbh I never used it so sorry cant help you 💀

severe turret
#

there's private final AntiChatSpam plugin; inside the class

#

so RequiredArgsConstructor should generate constructor for that field

drowsy helm
#

attempting to animate a model lol this shit is hard

near night
#

i cant set health above 20 ```java
public class battle_bot extends Zombie {
public battle_bot(Location loc, BotData data) {
super(EntityType.ZOMBIE, ((CraftWorld) loc.getWorld()).getHandle());

    this.setHealth(data.health);

    this.setPos(loc.getX(), loc.getY(), loc.getZ());

    this.setCanPickUpLoot(false); // Can Pick up Loot
    this.setAggressive(true); // Aggressive
    this.setCustomNameVisible(true); // Custom Name Visible
}

@Override
public void registerGoals() {
    this.goalSelector.addGoal(2, new AvoidEntityGoal<>(this, Skeleton.class, 6f, 1d, 1.2d));
    this.goalSelector.addGoal(1, new NearestAttackableTargetGoal<battle_bot>(this, battle_bot.class, true));
    this.goalSelector.addGoal(0, new MeleeAttackGoal(this, 1, true));
}

}``` help

wet breach
#

if no, then its pointless if it gets generated but not used

peak depot
severe turret
#

I don't understand why it doesn't work at all lol

mint mesa
#

whats the function to play sound in a bungeecord plugin?

vital mortar
mint mesa
#

thank you

glossy venture
#

could also use protocollib or nms to send a sound packet from the proxy directly

#

instead of the server theyve connected to

tardy delta
#

i'm currently making a skills plugin thing, by breaking specific blocks, players will get xp for a specific category, how would i determine what category a material is?

glossy venture
#

oh no wait nvm

glossy venture
#

bungee doesnt have nms

tardy delta
#

Map<EnumSet<Material>, SkillCategory>?

mint mesa
#

this is my first time actually using bungeecord haha, so its a bit confusing. are you able to add the bukkit to a bungee plugin?#

#

bukkit api*

glossy venture
#

nah

#

bungee is a proxy

#

essentially all it does is networking

mint mesa
#

im tryna make a report system that works for bungee, and I just wanna play a sound after the report has been created

#

like a ding sound

glossy venture
#

so its not at all related to a minecraft game server

glossy venture
#

idk how tho

mint mesa
#

neither do I :p

glossy venture
#

a sound play packet

severe turret
vital mortar
#

have you even read it?

mint mesa
#

oh I didn't open that

#

I read the thread and found smth called PluginMessaging and such

quaint mantle
#

is there a way to cancel the InventoryCloseEvent

vital mortar
#

reopen the inventory

quaint mantle
#

doing event.getPlayer().openInventory(event.getInventory()); causes a stackoverflow

#

should i make a loop or something

vital mortar
#

what error exactly?

#

because iirc it should work

quaint mantle
#

stackoverflow

mint mesa
#

is there a maven build or dependency for BungeePackets?

eternal oxide
#

infinite loop

mint mesa
#

or how do I install it and add it to my plugin

wet breach
#

the way you are calling that method is causing it to infinitely loop

quaint mantle
#

should i add a tick delay?

wet breach
#

not sure if a delay would solve that problem lol

eternal oxide
#

yes delay. if you do it in the close event you are triggering a second close event as its not fully closed yet

tardy delta
#

i was thinking of a Map<EnumSet<Material>, SkillCategory>

mint mesa
#

wdym by category

tardy delta
#

uhh it has fields for how much xp you should get and stuff

#

hmm lemme take a look at Tag

tardy delta
#

hmm maybe smth like this

#

love it when intellij crashes lol

#

anyways can i add the spigot javadocs to my ide?

eternal night
#

Usually intellij should ask you if it should download sources when looking at a decompiled file

#

Iirc there is also a button somewhere in the maven or gradle menus

tender shard
#

press shift quickly twice

tardy delta
#

cpu usage went up to 100% when decompiling class

tender shard
#

then enter "download sources"

tardy delta
#

😳

eternal night
#

Fernflower moment

#

Material enum is a fun one to decompile

tender shard
#

!verify mfnalex

undone axleBOT
#

This account is already verified!

tender shard
#

why cant I send screenshots anymore lol

eternal night
tardy delta
#

download docs would make the javadocs available to my ide right?

eternal night
#

Yes

#

Also look for download sources

tardy delta
#

yep

tender shard
#

just do "shift shift", then enter "download sources and documentation"

dusk flicker
#

lmao Alex don't have the verification role lol

tender shard
#

lol @ivory sleet can I get back the "verified" role pls

#

!verify mfnalex

undone axleBOT
#

This account is already verified!

ivory sleet
#

iirc youd get it back with a kick and rejoin

tender shard
#

i left myself yesterday

#

and didnt get it back D:

eternal night
#

Time to shit talk Alex in verified

tender shard
#

there it is ❤️

ivory sleet
#

:3

tender shard
#

thx!

tardy delta
#

am i supposed to shade a h2 db driver lol?

eternal night
#

If you wanna use H2

#

Spigot ships sqlite and MySQL

tardy delta
#

actually dunno why ive chosen h2 long ago

severe turret
#

@tender shard can u pls help me with this 🙏 you're very smart

tender shard
#

with what?

#

is there a better way than to just always reuse the same "random" UUID?

severe turret
#

this

tender shard
#

that's because plugin is always null

#

you declare it to be a field but you never assign any value to it

cunning canopy
#

Can I cast an entity to sheep?

eternal night
#

Only if said entity is a sheep

cunning canopy
#

Thanks

severe turret
#

from the main class

sharp flare
tender shard
#

at least it's not in your code

severe turret
#

There's RequiredArgsConstructor from lombok

#

which generates the constructor for the plugin field

tender shard
#

oh yeah, I see

#

pls show the full stacktrace

cunning canopy
#

How do I teleport an entity one block towards where its looking

paper bone
#

Something similar to this

#

Don't recall the exact method names

#

But the orientation of the entity is a normalized (so the length is one) vector

cunning canopy
#

Can I also get behind?

severe turret
tender shard
#

who asked me to write the "custom heads" blog post, again?

umbral bear
#

Hi, i need help, i'm trying to make a simple vanish feature for a plugin, and i was looking to see how to hide vanished player from the tablist, by googling a bit i found some methods such as: manipulating packets, modifying the vanished player name in the tab and some of them just using p.hidePlayer(). My question is the same, what's the best method?

tender shard
umbral bear
#

ok, thx

tardy delta
#

Player#setInvisible also exists

tender shard
#

yes, but that really only makes them invisible

#

without hiding from tab, etc

severe turret
#

Any idea why it's saying it's null?

tardy delta
#

ah

eternal oxide
#

add a normal constructor passing yoru instance and see if it works.

#

What is AntiChatSpam:38 ?

tender shard
severe turret
#

sigh

eternal oxide
#

@severe turret What is AntiChatSpam:38 ?

severe turret
#

I sent the whole paste

severe turret
eternal oxide
#

where?

#

NO clue I don't see it

#

From yoru stacktrace line 38, is creating an instance without passing the plugin instance

#

without code I can;t advise

tender shard
#

they sent all the code?

eternal oxide
#

My best guess, you are somewhere (38) making a static access to the class

#

No clue. I looked back and didn;t see anything

#

I'm bettign he's accessed the class in a Field so its not been intialized yet

tender shard
#

in line 11, they create the config, passing "this"

#

and lombok should set that "into" the "plugin" field

#

it actually looks good to me

eternal oxide
#

Only if that is the first time he accesses the class

#

I've seen no code, only the stacktrace

tender shard
#

this is the code

eternal oxide
#

It has to be Spigot instancing his main class. His constructor is never called

#

move it all into onLoad and it will work fine

tender shard
#

why do I actually still code anything? Basically my only job left is to press "tab" all the time

#

btw if anyone needs gh copilot, let me know

eternal oxide
#

I don;t see how though

gray merlin
#

I don't understand how to do relocation in maven... I'm trying to setup NBT API.

#

It says that when shaded, relocation needs to be done

tender shard
tender shard
#

okay so basically, you just tell maven the original location of the classes you wanna relocate, and then the desired destination location

#

like this:

#

this e.g. moves "com.jeff_media.jefflib.SomeClass" to "de.jeff_media.angelchest.SomeClass"

ancient plank
#

jeff

tender shard
#

jeuff

gray merlin
#

Oh, I see!

tender shard
subtle folio
#

knock off redlib

gray merlin
#

I understand it now, though I still have a question...

<relocation>
<pattern>de.tr7zw.changeme.nbtapi</pattern>
<shadedPattern>com.mrkelpy.aosplayermanager</shadedPattern>
</relocation>```
#

the relocation on nbt api comes with "changeme" on the pattern

#

Do I change it to my project or is there something I'm missing?

subtle folio
#

change that to your group id

#

eg me.ntdi

#

wait no

#

your artifact id

gray merlin
#

I see

subtle folio
#

eg your plug-in name

gray merlin
#

Yep! It should work... but for some reason it still reds it out...

#

Maybe it's a visual? I'll restart intellij just in case...

subtle folio
#

maven reload?

gray merlin
tender shard
subtle folio
subtle folio
tender shard
subtle folio
#

time to pr

gray merlin
#

Yep, it was a visual

#

It's all working now, thank you so much!

subtle folio
#

np

#

@tender shard are you accepting prs?

tender shard
#

sure

#

who tf doesnt

#

lol

subtle folio
#

idk in the past i’ve tries to pr to three diff people

#

all said “solo project no prs”

#

when i pr’d

tender shard
#

lol weird

#

im always happy when someone does a pull reuqeest

gray merlin
#

Oh, by the way, do I need to install the plugin on my server in order for the nbt api to work? Or can I use it normally since it's shaded?

tender shard
subtle folio
#

if it’s provided then yes

tender shard
#

that's the whole point of shading it

gray merlin
#

Yep, thank you. I was a bit paranoid about that.

tender shard
#

intelliJ's formatting is weird sometimes

#

this weird line break makes me angry

warm mica
tender shard
warm mica
tender shard
# warm mica There's UUID.randomUUID();

I know, but that would use a new UUID everytime / on every restart. and this would then eventually clutter the playerdata folder, because every player profile gets saved even if I only generate it for custom heads, etc. That's why I just thought about using one hardcoded UUID that's always the same

alpine urchin
#

new UUID(0L, 0L)

#

?

#

thats a dummy uuid but yea

tender shard
#

yeah well that's basically what I do

alpine urchin
#

always the same

#

ok?

#

so whats wrong

tender shard
#

I currently do it like this. Just wondered if there's a better method lol

eternal oxide
#

You can use GameProfile, which doesn;t get set in teh dat but it's also remapped

gray merlin
#

huh

#

It keeps telling me it hasn't been moved

#

is the relocation not correct?

tender shard
#

erm

#

wtf

#

is it actually called "changeme" in the package name?

#

this is from your readme

gray merlin
#

yeah it seems so... I found it weird that when I opened the .jar it was in de.guysname.changeme

#

i refused to believe it though

#

Maybe he forgot?

tender shard
#

it's actually called "de.tr7zw.changeme.nbtapi"

#

so set "pattern" to de.tr7zw.changeme.nbtapi" and "shadedPattern" to whatever you like, e.g. your.pluginname.nbtapi

subtle folio
#

if not when i get home i’ll also make a pr for that

tender shard
gray merlin
#

Thanks! I'll do so.

tender shard
#

so it doesn't clutter the player data folder with random profiles

subtle folio
#

oh i see

tender shard
#

i only need the profiles temporarily to create skulls

subtle folio
#

but what if a player has that uuid lol?

#

also i think there is a better approach than player profiles

tender shard
#

there is?

#

which one?

subtle folio
#

one of them 🤓

#

i’m on a phone rn when i get home i’ll pr mayb

tender shard
#

oki :3

gray merlin
#

Ah

#

This doesn't seem to be the correct version...

#

It says it supports 1.7.10, but I can't find the 1.7.10 version for it

#

pain.

tender shard
#

what errors? also your screenshot doesnt load for me, can you send it again

gray merlin
#

In the maven repositories there aren't any that's for sure

#

in the plugin there is but it's a manual download and + no reference to the mc version

#

But by date, it seems to be ver 1.5.1

#

How would I manually add the stuff? I've only ever done it through POM / Maven dependency browser

tender shard
#

do you actually need NBTAPI? Do you need to support multiple versions?

gray merlin
gray merlin
tender shard
#

normally it should contain that data too

#

at least when using a BukkitObjectOutputStream, it should contain ALL data

gray merlin
#

Really? I browsed through the implementation and didn't find anything about the tags

#

But I might've missed it then.

#

I'll give it another shot

tender shard
#

this definitely saves ALL data

#

but you'll end up with a byte[] instead of some nice, readable yaml 😄

gray merlin
#

Oh, base64 encoding

#

That's actually something I hadn't thought about

#

Oh boy, that library is really nice. I might just use it

#

I don't need to manipulate the ItemStack at all, just save and load, so it really fits it.

#

Did you write that?

tender shard
#

yeah, I basically threw everything into that lib that I'm using in more than exactly one plugin lol

gray merlin
#

That's stupid useful, I'm really happy you took the time to do that. You even did inventory handling nice and tidily

#

Jesus christ, there's something for everything

#

Thank you!

tender shard
#

no problem 🙂 ❤️

#

I today wanted to add more entity / pathfinding goals, and a wrapper for NBT lol

tender robin
#
itemMeta.getPersistentDataContainer().set(key, PersistentDataType.STRING, args[1]);
tender shard
#

PDC ❤️