#help-development

1 messages · Page 972 of 1

slender elbow
#

sure

grim hound
#

but still, how does it work?

dawn flower
#

hold up

next plume
#

April 22-26

slender elbow
#

it generates a class that implements the interfaces

dawn flower
#

does /transfer require bungeecord

remote swallow
#

no

slender elbow
#

and the method calls will call your IH

#

that's all

#

there is no magic

remote swallow
#

it just requires the packet to be accepted by the other server

slender elbow
#

if you want to delegate those calls to another object sure you can do that

dawn flower
#

so minehut wont be able to mask ur ip no more

remote swallow
#

bungeecord will still work

#

minehut can do whatever they like

grim hound
slender elbow
#

then you can't use Proxy

grim hound
#

but rather just a class

remote swallow
#

if md decides to make bungee work of transfer packets he can do that, if he doesnt he doesnt

grim hound
remote swallow
#

if minehut dont/do they can do that

slender elbow
#

then don't use Proxy?

#

extend the class or something

grim hound
#

nms shit

slender elbow
#

Proxy is more for dynamically generating an impl of an interface, e.g. you don't know what the interfaces are

#

surely you can extend a class

#

unless it's final

#

gg

grim hound
#

but

#

stuff like this

#

and I won't do it for each version separately

remote swallow
#

so get it from the craftbukkit package

#

or if you wanna support future back Bukkit.getVersion

slender elbow
#

I mean then you go ahead and spin up your own bytecode gen

#

using asm or something

#

to extend the class and do w/e you want

#

like if it was source code, but without the source code

grim hound
slender elbow
#

yes it's called asm

#

or bytebuddy

#

which uses asm

#

or you can have a java source code template

#

that you then compile at runtime

#

the world is your oyster

dawn flower
#

what in the world is a bogged

#

this doesnt look minecrafty

worldly ingot
#

It has to look Minecrafty

#

It's in Minecraft

astral pilot
#

how?

dawn flower
#

well not yet

astral pilot
#

also I don't think so since that other plugin is also made by me

dawn flower
worldly ingot
#

Well now it's in Minecraft so it looks like it's straight from Minecraft

#

I don't know what you want us to tell you lol

lost matrix
dawn flower
#

anyways can u store a map in a pdc

remote swallow
#

looks like a mossy skeleton

remote swallow
dawn flower
#

how

remote swallow
#

serialize to byte array

dawn flower
#

what if my thingi isnt serializable

worldly ingot
#

PES_Think Or you can use the data container itself

#

PersistentDataType.TAG_CONTAINER is just a map

dawn flower
dawn flower
neon shoal
#

Usefully likes for plugin Dev?

blazing ocean
#

?morepdc IIRC

undone axleBOT
worldly ingot
#

How do you think vanilla stores enchantments? :p

neon shoal
#

Links

dawn flower
worldly ingot
#

Enchantments: [{id:"", level:0}, {id:"", level:0}, {id:"", level:0}]

#

It's a list of objects

dawn flower
#

map ^

#

o h

worldly ingot
#

In which case you're looking for PersistentDataType.TAG_CONTAINER_ARRAY

dawn flower
#

and just store my custom enchant object?

worldly ingot
#

Well you'd have to serialize it to a PersistentDataContainer, but yeah

remote swallow
#

Can i make a list of a tag container array

dawn flower
#

all primitives are serializable right?

worldly ingot
#

Yes

dawn flower
#

aight

worldly ingot
#

Primitives, strings, and arrays of some primitives

river oracle
#

That's an abuse of the system

#

But in short no absolutely not a arrays are meant to be replaced by lists

astral pilot
dawn flower
#

wait what happens if i create an array of an array

#

eyo it works

worldly ingot
#

There's no type for arrays of arrays, but no reason it wouldn't work if you added one yourself

dawn flower
#

String[][][][][][][][][][][][][][][][][][] strings; this works fine

worldly ingot
#

Oh, yeah, that's fine

dawn flower
#

why would anyone need this

worldly ingot
#

You're discovering the existence of multi-dimensional arrays :p

#

They're usually only useful up to like 3 dimensions, and even then you probably just want a better collection for that

river oracle
blazing ocean
#

i don't remember ever using an actual array in java/kotlin

dawn flower
#

why doesnt spigot add a world particles event, kinda annoying to use protocollib for such a simple thing

blazing ocean
#

always lists

river oracle
#

Which tbh isn't mant use cases you'd see at this level :P

icy beacon
#

I guess what arrays have got is speed

dawn flower
#

and static lists

#

u wouldnt need to create a whole list for something like "apple" and "orange"

glad prawn
#

List<? extends Fruit> xd

astral pilot
#

anyone?

lost matrix
icy beacon
#

What about identical recipes

dawn flower
#

which isn't possible

#

something keys require a plugin instance

astral pilot
icy beacon
#

Identical ingredients, different results

#

What if that happens

dawn flower
#
Fruit[] array = {Fruit.APPLE, Fruit.ORANGE}

List<Fruit> list = new ArrayList<>();
list.add(Fruit.APPLE)
list.add(Fruit.ORANGE)```

idk abt u but the array seems way more efficient
icy beacon
dawn flower
#

why in the world would u do that

lost matrix
icy beacon
#

Why not

icy beacon
icy beacon
#

I'm curious now

dawn flower
#

array initialization takes less chars than list initialization

lost matrix
#

?paste

undone axleBOT
dawn flower
#

who's md5

#

(hopefully he isn't here or im screwed)

glad prawn
dawn flower
#

ik their skin

#

is he a contributor, owner, discord owner, discord staff, staff or what exactly

remote swallow
#

i want a PersistentDataType.LIST.TAG_CONTAINER_ARRAY

river oracle
#

does not exist

remote swallow
#

i would like it

#

pls add

dawn flower
#

PersistentDataType.LIST.LIST.TAG_CONTAINER_ARRAY

#

list of a list of a tag container array

worldly ingot
#

Wouldn't you be able to do PersistentDataType.LIST.listTypeFrom(PersistentDataType.TAG_CONTAINER_ARRAY)?

astral pilot
dawn flower
#

how are you expecting to have 2 exact recipes and both work

remote swallow
#

@eternal night can i do that

dawn flower
#

i believe there's a priority system or something for recipes

remote swallow
#

@river oracle what this

lost matrix
dawn flower
#

why..

#

just make plugin1 loadBefore plugin2

#

the opposite*

#

plugin2 loadBefore plugin1

astral pilot
lost matrix
astral pilot
#

its 2 distinct recipes

river oracle
remote swallow
#

oh i dont plan to do anything

#

i just want a list array

dawn flower
#

List<String[]>

remote swallow
#

i want like 9 d array

blazing ocean
#

why

remote swallow
#

fun

dawn flower
#

String[][][][][][][][][]

astral pilot
eternal oxide
#

errors in startup log?

zealous osprey
astral pilot
dawn flower
#

r ucalling the methods

astral pilot
dawn flower
#

the methods to register them

#

craftingInitializer

#

setCrafting

astral pilot
#

whenever i remove Plugin1

#

plugin2's recipe works

vast ledge
#

How can i prevent the Swapping of an Item with hotkeys in a Player Inventory, Currently im checking both the cursor and current item if its an custom item, this stops the item being moved around normally, but doesnt prevent hotkeying.

dawn flower
#

it should work for hotkeying

#

try InventoryInteractEvent

vast ledge
#

That event doesnt provide any Itemstacks tho, how would i go about detecting it there?

astral pilot
#

does spigot have debug console or something?

vast ledge
#

wdym debug console?

astral pilot
remote swallow
lost matrix
vast ledge
remote swallow
#

listen to inv click and inv drag and print whats gets ran

vast ledge
#

The Inventory drag event doesnt get fired tho afaik

astral pilot
#

ok i see where the error comes in

vast ledge
astral pilot
# lost matrix Do you tinker with the ItemCraftPrepareEvent?
public class PlayerCraftingEvent implements Listener {
    @EventHandler
    public void onPlayerCraft(PrepareItemCraftEvent e) {
        CraftingInventory inv = e.getInventory();
        ItemStack result = inv.getResult();

        // Now this code may conflict with other plugin
        if (!getCraftingResults().contains(result)) {
            inv.setResult(null);
        }
    }
}
#

yea i guess this is what causes it

#

thanks for the help

lost matrix
polar forge
#

Hey guys

vast ledge
#

Hello Egitto

#

You were the one with the hoverable messages right?

polar forge
#

Yea

vast ledge
#

What do you need today?

polar forge
#

I got helped yesterday, but it doesn’t work yet

#

So I changed some stuff

#

I now when I load the hoverable message plugin, I can’t see my prefixes from LuckPerms

high arrow
#

Hello, I have the following problem: I can't join my server because of this error:

I tried removing one plugin, and it solved the issue. The problem is that I haven't really changed something in it, it came itself, I don't really do much in the join event except giving items...

vast ledge
#

The normal ones in chat or?

polar forge
high arrow
vast ledge
#

32

polar forge
#

So I implemented the dependencies of LuckPerms, I did some coding

#

But it still doesn’t show the prefixes

#

Should I send the code?

vast ledge
vast ledge
#

?paste

undone axleBOT
high arrow
vast ledge
#

You sure none of your plugins has custom signs or the sorts?

high arrow
#

none

#

but i have this part of code that do stuff about location

vast ledge
#

But that shouldnt happen

vast ledge
polar forge
#

Sure take ur time

granite owl
#

is there a way to take a bunch of primitives and serialize them as byte array like in C?

worldly ingot
#

Packet 32 is not packet 0x32

#

It's packet 0x20. And what 0x20 is will depend on your client version

granite owl
#

or better say, should it not be done?

eternal oxide
vast ledge
worldly ingot
#

Packet 32 is the decimal value (base 10). In hex, 32 is 0x20

vast ledge
#

ah

#

Thanks

worldly ingot
#

Again, will depend on your client/server version

vast ledge
#

Depends on the version :D

high arrow
#

ah

vast ledge
polar forge
eternal oxide
vast ledge
#

Oh

eternal oxide
#

he's using player name not display name in his text

polar forge
#

Oh thanks

#

Ill try it out and see if it works

vast ledge
#

Thank Elgar, he found it!

vast ledge
#

I take the dead silence as a no...

high arrow
golden turret
#

?? why is this happening?

eternal oxide
#

check the ClickType

vast ledge
#

I know when its a hotkey, but what do i do differently when its a hotkey?

polar forge
#

So it should be: TextComponent comp = new TextComponent("" + player.getDisplayName() + ": ");

vast ledge
#

Yea

polar forge
#

Oh ok

eternal oxide
#

if the slot you want to protect is clicked then cancel

vast ledge
#

If feel so stupid not thinking of that

polar forge
#

Silly

vast ledge
#

Wtf

#

Why is slot 2, 37???

#

Oh

#

its a raw slot

#

Makes sense

eternal oxide
#

This is what I did to test locking a slot```java
@EventHandler
public void onClick(InventoryClickEvent event) {

    if ((event.getSlot() == slotToLock && event.getSlotType() == SlotType.QUICKBAR)
            || (event.getHotbarButton() != -1 && event.getHotbarButton() + slotToLock == slotToLock))
        event.setCancelled(true);
}
@EventHandler
public void onSwap(PlayerSwapHandItemsEvent event) {

    if (event.getPlayer().getInventory().getHeldItemSlot() == slotToLock)
        event.setCancelled(true);
}```
#

you'd also have to check in teh drop event

polar forge
#

This is pretty strange, even if I’m not op, I always have this colored name

#

And that prefix

eternal oxide
#

you only modify the name in the join event

#

anything you do after will not alter teh prefix

polar forge
#

Why do I see the &c then?

valid burrow
#

its not &

#

you need to use paragraph

#

not and

eternal oxide
#

you see &c because you didn;t translate color codes

valid burrow
#

#

then translate color codes?

polar forge
#

What do u mean?

valid burrow
#

either u start using § or u translate color codes xd

polar forge
#

They are already translated in the code

eternal oxide
#

ChatColor.TranslateAlternatColorCodces("&", message) or something

valid burrow
#

i honestly dont know what you are askin rn

#

player names are modified onPlayerJoinEvent in your code

eternal oxide
#

you don;t translate color in any code you have shown

polar forge
#
  1. Why do I see &c
  2. Why do I still have the red name and &c if I’m not op and I’m in the default group
inner mulch
#

Is toggle shift called when in an inventory?

eternal oxide
#

what prefix are you getting from LP?

polar forge
#

My prefix is &c

eternal oxide
#

then

polar forge
#

To make my name red

eternal oxide
#

translate it

polar forge
#

But why is my name red if I’m not op?

#

Ill translate it now

valid burrow
#

Cause its set onjoin

#

for gods sake

eternal oxide
#

because you have the hoverinfo.admin permission I guess

valid burrow
#

it only updates when you join

#

cause thats how your code works

#

changing the permissions doesnt trigger a playerjoinevent

polar forge
valid burrow
#

„the solution“ doesnt exist

eternal oxide
#

you have to work out the display when they chat

#

not when they join

valid burrow
#

theres a million ways to habdle this

valid burrow
#

what

#

is the displayname

eternal oxide
#

there might be minutes between chats, so anything can happen

#

also permission expiry can affect it

#

and changing worlds

#

so he needs to check each time the player chats

#

its not a heavy query

polar forge
#

Ok I rejoined and I indeed see my name white

#

But I see null next to my name

eternal oxide
#

Just create a methodjava public String getFormattedName(Player player) {

#

then do in there what you currently do in in teh PlayerJoinEvent

#

except don;t set the display name, just return a string

polar forge
#

I think I’ll just keep it on join event

valid burrow
remote swallow
#

no it isnt

valid burrow
#

yes it is

#

imagine you change someones rank

eternal oxide
#

Far from it

remote swallow
#

thats exactly how almost every single chat plugin works

valid burrow
#

and they need to send a chaz message for it to apply

#

OMG YALL

remote swallow
#

voss

valid burrow
#

PLS READ

remote swallow
#

use ur brain

valid burrow
#

DISPLAY NAME

#

DISPLAY NAME

remote swallow
#

you DONT modify display name

valid burrow
#

DISPLAY NAME

#

DISPLAY NAME

remote swallow
#

DONT MODIFY IT

polar forge
#

Don’t spam

#

Smh

valid burrow
remote swallow
#

good for him

#

we've given the solution to fix

eternal oxide
#

and I'm telling him NOT to do that

valid burrow
#

youre telling him to update it on every chat message

eternal oxide
#

I literally just told him to create a method to return a formatted String

remote swallow
#

read this again for me

valid burrow
#

yh he said that after i send my messages

#

smh

remote swallow
#

no he didnt

#

he sent it before

valid burrow
remote swallow
#

restart ur discord

#

elgarl was first

valid burrow
#

im on phone

remote swallow
#

close discord, close the app

eternal oxide
remote swallow
#

and then open it agaim

polar forge
#

I also see what Siea sees

#

So

remote swallow
#

i just reloaded my discord

#

elgarl was first

valid burrow
#

kk

eternal oxide
#

I win, you suck 😛

polar forge
#

But guys no need to have beef with each other

blazing ocean
eternal oxide
#

We just playing 🙂

blazing ocean
#

this is spigotcord

polar forge
#

But guys, I think I’ll just keep it on join event

#

So 1 problem is actually resolved

valid burrow
eternal oxide
#

it will nto work in join

polar forge
#

But I have now the problem with the null and &c

eternal oxide
#

yes you do

polar forge
#

So u guys told me to translate it right?

eternal oxide
#

yes

#

all &code have to be translated

polar forge
#

I never coded for a translate so it’s my first time

polar forge
#

I hate when sites don’t show an example

valid burrow
#

thats how documentation works

polar forge
#

Could I just use

unborn breach
#

Hey my server got griefed is ther a way to rollback my server for 3 hours

polar forge
#

prefix.replace(‘&’, ‘§’)

eternal oxide
#

don't

unborn breach
#

i do but i also need inventory's rollbacked

eternal oxide
#

you could do that, but don't. Use the provided method

polar forge
unborn breach
#

cant i rollback the server for 3hours by changing a file?

polar forge
#

Do

eternal oxide
polar forge
#

/co rollback time:2h radius:30000

unborn breach
polar forge
#

No

unborn breach
#

where can i see my backups?

remote swallow
#

what makes your backups

unborn breach
#

cuz i didnt make the big back up thing.
but i think i got something called auto backup so i just have to rename a file i just dont know where to find the file

remote swallow
#

is it a plugin

unborn breach
#

no

#

i mean i got coreprotect but i also need inventory's

eternal oxide
#

prefix = ChatColor.Translate...

#

as Strings are not Mutable

polar forge
eternal oxide
#

... means theres more

#

use the method you are but put prefix = before it

polar forge
#

Ok

eternal oxide
#

the methods returns a modified String as Strings are immutable (can not be edited)

quaint mantle
#

Crazy

polar forge
eternal oxide
#

you are not making another

#

just reassigning it

polar forge
#

But I still can’t find what comes after the dot

#

ChatColor.

dawn flower
#

when trying to use TAG_CONTAINER

eternal night
#

int

polar forge
#

Like this?

#

I know it’s wrong

#

But in that file it doesn’t explain what u told me to do

dawn flower
eternal night
#

no, you input a PersistentDataContainer

dawn flower
#

how do i create one

upper hazel
#

how i can set for living entity path to location

polar forge
#

No wait

#

It’s actually

#

prefix = ChatColor.translateAlternateColorCodes( altColorChar: '&', prefix);

#

Is that right Elgar?

glad prawn
#

?learnjava

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉

eternal night
polar forge
cinder abyss
polar forge
#

But how do u translate null?

#

I now translated every code that started with &

rapid vigil
# polar forge But is it correct?

I've told you countless times yesterday to take a java fundamentals course and come back to spigot. Even if you were spoonfed this entire project (as it is right now) you will not be able to create more projects freely later on, you'll have to depend on others to spoonfeed you code while you don't know what you're doing

cinder abyss
polar forge
cinder abyss
#

null represent something that don't exist

#

you can't manipulate it

rapid vigil
cinder abyss
#

so

#

?learnjava

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉

cinder abyss
#

PLEASE.

tardy delta
#

bruh

polar forge
#

Then why does it show as a prefix?

#

If it’s nothing?

#

Explain

cinder abyss
#

basically

#

so it's working, but you can't use it to translate a color

polar forge
#

Then why does it show?

#

I never used null in my code

#

Should I send the code

silent slate
#

(message deleted, because my stupid ass couldnt differenciate the files "buildData" and "buildModeData" )

solar pier
#

Is possible to disable or modify minecraft recipe book?

silent slate
worthy yarrow
#

Anyone know of a solid lockable chests plugin?

rapid vigil
remote swallow
#

lockette pro

worthy yarrow
worthy yarrow
remote swallow
#

does it not work?

tranquil beacon
worthy yarrow
#

It just says 1.14-1.19, wasn't sure if that might cause issues with a 1.20+ server

remote swallow
#

try it

#

im guessing it will work

worthy yarrow
#

Me too, just in case

worthy yarrow
#

Hmm

tranquil beacon
worthy yarrow
#

Lockette is kinda goofy

worthy yarrow
#

Thank you both either way, @remote swallow ,xellon

junior cradle
#

How to make an inter-server auction, can you explain the principle of operation, what should it be with the help of the data?

wet breach
#

and in what way is it outdated?

worthy yarrow
#

I figured out how to break it within the first 30 seconds of loading it up lol

high arrow
worthy yarrow
#

When I placed a sign on the chest, entered the editor of the sign then exited and it switched from [private] -> [error]

wet breach
#

are signs re-editable now?

worthy yarrow
#

It said something about adding people to the chest, “right click the sign and then type /(I forgot the command) but it just enters the sign editor

wet breach
#

only two things come to mind, either you didn't setup configs properly or you gave yourself all perms

pseudo hazel
#

yeah pretty sure 1.20 added editable signs

worthy yarrow
#

Well I put it into a local host, cuz I’m not sure any conflicts with the server that needs it

#

And I least need to figure how to use it to test it, but then I broke it haha

wet breach
#

I am quite familiar with lockettes code, well up to a point anyways 🙂

peak depot
#

BungeeCord related question: java player.connect(info, ServerConnectEvent.Reason.COMMAND); what does the Reason do

worthy yarrow
#

Lockette is 1.14-1.19 on the spigot page, didn’t check the last update

wet breach
#

well lockette strictly uses API only methods

#

hence why it has worked for as long as it has without much needing to be done with it lol

#

also because it uses signs, no DB is needed either unlike LWC for example

#

but, the editable signs thing should be actually easy to incorprorate into lockette though

worthy yarrow
#

Right yeah, well lwc has more quality of life so I’m just gonna stick with that or perhaps just fix lockette if lwc has conflicts

wet breach
#

really its just adding an additional listener

#

cancelling if the sign doesn't belong to the person trying to edit

worthy yarrow
#

Yeah not saying the fix would be hard, rather just if lwc works then there’s no need as lwc is updated + maintained as well as quality of life features

wet breach
#

if quality of life features are something you need sure

worthy yarrow
#

Idk I gave the server owner both of the options so it’s up to them at this point

#

I’d assume they’d rather quality of life, it’s a survival server and they’ve got some semi large teams

#

Still, Lockette works perfectly for this, lwc just has the qol benefits

wet breach
#

if you think so

dawn flower
#

what's a good formula to get the middle of lore of an item to put custom enchants lore

tardy delta
#

would reserve capacity

#

also why is everything object

#

and cant you reuse the context?

lilac dagger
#

i'm working with Field class

#

i could reserve capacity yeah

#

but it's just a one time serialization

#

and the context can change look

tardy delta
#

can i see inferCollection?

polar forge
#

Guys any solutions for this problem?

polar forge
lilac dagger
remote swallow
lilac dagger
polar forge
tardy delta
# lilac dagger ^

whats getClassFromType?, im sorry im thinking about intrinsical optimizations

lilac dagger
#

it's just a type converter

remote swallow
#

and in async chat event called event.setFormat

lilac dagger
#

there's nothing fancy in there

tardy delta
#

Field::getGenericParameters a thing?

lilac dagger
tardy delta
#

also whats a generic param on a field even supposed to mean

lilac dagger
#

it's Object<Type>

#

the generic is the Type

remote swallow
#

i love type erasure

lilac dagger
#

i can do this which is nice

polar forge
remote swallow
#

dont modify the display name, so remove that listener

tardy delta
remote swallow
#

what if i have Map<List<String>>

lilac dagger
#

this class is the nicest

remote swallow
#

what then

lilac dagger
#

it's not supported by yaml

#

actually nvm it is

#

it works

remote swallow
#

mine supports that

lilac dagger
#

one sec

polar forge
#

So like this?

rapid vigil
#

LMAO

lilac dagger
#

it supports it

orchid trout
#

dude

polar forge
#

But keep the display name

lilac dagger
tardy delta
#

i hope you know what youre doing

lilac dagger
#

i mean the code works, it took me some time to optimize

#

it's pretty safe

#

i hope i did a good job with it

polar forge
#

`public void setPlayerDisplayName(Player player) {
User user = plugin.getLuckPerms().getUserManager().getUser(player.getUniqueId());
String prefix = "";
if (user != null) {
prefix = user.getCachedData().getMetaData().getPrefix();
}

if (player.hasPermission("hoverinfo.admin")) {
    player.setDisplayName(prefix + ChatColor.RED + player.getName());
} else if (player.hasPermission("hoverinfo.moderator")) {
    player.setDisplayName(prefix + ChatColor.AQUA + player.getName());
} else if (player.hasPermission("hoverinfo.default")) {
    player.setDisplayName(prefix + ChatColor.WHITE + player.getName());
} else if (player.hasPermission("hoverinfo.wood")) {
    player.setDisplayName(prefix + ChatColor.WHITE + player.getName());
} else if (player.hasPermission("hoverinfo.wood-mod")) {
    player.setDisplayName(prefix + ChatColor.WHITE + player.getName());
} else if (player.hasPermission("hoverinfo.stone")) {
    player.setDisplayName(prefix + ChatColor.WHITE + player.getName());
} else if (player.hasPermission("hoverinfo.stone-mod")) {
    player.setDisplayName(prefix + ChatColor.WHITE + player.getName());
}
player.setPlayerListName(prefix + player.getName());

}
`

#

Like this?

tardy delta
#

sounds like a list of pairs but java doesnt have first class support for pairs smh

sullen canyon
#

is it an open source project?

lilac dagger
#

nope

#

it's part of my game engine

tardy delta
#

would probably put all those types in one file if they're short

#

i forgot records were a thing

#

records have ~overhead~ tho if you wanna be very pessimestic

#

how you even write that word

rough drift
# polar forge `public void setPlayerDisplayName(Player player) { User user = plugin.getLuc...

@polar forge

private final Map<String, ChatColor> permissionColors = new LinkedHashMap();

// Fill the colors from highest perm to lowest perm

public void setPlayerDisplayName(Player player) {
    User user = plugin.getLuckPerms().getUserManager().getUser(player.getUniqueId());
    String prefix = "";
    if (user != null) {
        prefix = user.getCachedData().getMetaData().getPrefix();
    }

    for(var entry : permissionColors.entrySet()) {
      if(player.hasPermission(entry.getKey())) {
        player.setDisplayName(prefix + entry.getValue() + player.getName());
        break;
      }
    }
}
```fyi you can do it like this
tardy delta
#

no point to a map if youre only iterating it

#

iterating entryset is even slower than iterating a list

rough drift
polar forge
rough drift
#

just telling you that you need to do that

#

but use a LinkedList with a record or something

polar forge
#

I don’t understand

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉

polar forge
#

Was this an example?

hybrid quartz
#

How can I prevent player from putting items into gui? I have tried many ways, but all don't work

public class GUIEvents implements Listener {

    @EventHandler
    public void onClick(InventoryClickEvent e) {
        if (e.getClickedInventory() != null) {
            Menu menu = Menu.getMenuBy(e.getClickedInventory());

            if (menu != null) {
                Button button = menu.getButtonBy(e.getSlot());

                if (button != null) {
                    button.onClick();
                    e.setCancelled(true);
                }
            }
        }
    }
rough drift
rapid vigil
polar forge
#

I just need this small help

#

For this

rough drift
#

@polar forge are you perchance Italian

polar forge
#

Yep

rough drift
#

Oh okay that can make it easier to explain in DMs if you want?

#

you may be more comfortable in Italian ig

polar forge
#

Sure

#

Certo

hybrid quartz
orchid trout
peak depot
#

what do you guys think makes more sense I have a list with commands and I want to check if a message starts with /<command> should I loop through the list and check if String#startWith or should I split the message and check the first segment and do List#contains

tardy delta
#

why do you have a list of commands in the first place, why not a map

#

like subcommand -> instance

young knoll
#

Yay maps

tardy delta
#

did i summon you?

#

oh almighty

peak depot
tardy delta
#

how does that bring you to the list?

peak depot
peak depot
young knoll
#

I would use a set

#

And then contains with the split

tardy delta
#

looks like whitelist checking or smth, idk im not really following atm

peak depot
#

look you do /plugins (I dont want that) so I dont add it to the whitelist and then the player gets a message "This command is invalid or you dont have perms"

#

and it doesnt get excecuted

young knoll
#

On spigot commands will be hidden if they don’t have the perms

#

Idk if bungee works the same

peak depot
#

nah you can still tab them also there are basic commands you have perms for and still I dont want the users to use them

young knoll
#

Rip

#

Bungee isn’t as cool as spigot

peak depot
#

you know if I can get the player from a connection

sullen marlin
quaint mantle
#

Can I compile a 1.8 plugin with java 21?

vernal cobalt
#

my plugin.yml file isnt getting bundled on build

hollow vessel
#

Hi! How can I check if some block like Cobblestone has some specific data like namespaced key?

#

I know there something like TileState but it is not implemented in normal blocks

tardy delta
#

could store it on the chunk pdc if you want it persistent

young knoll
#

?blockpdc

undone axleBOT
quaint mantle
# quaint mantle Can I compile a 1.8 plugin with java 21?

I'm getting this. idk really why

    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at net.md_5.bungee.api.plugin.PluginClassloader.findClass(PluginClassloader.java:152)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
    at net.md_5.bungee.api.plugin.PluginClassloader.loadClass0(PluginClassloader.java:66)
    at net.md_5.bungee.api.plugin.PluginClassloader.loadClass(PluginClassloader.java:59)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    at net.md_5.bungee.api.plugin.PluginManager.enablePlugin(PluginManager.java:341)
    at net.md_5.bungee.api.plugin.PluginManager.loadPlugins(PluginManager.java:251)
    at net.md_5.bungee.BungeeCord.start(BungeeCord.java:284)
    at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:67)
    at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)
vernal cobalt
#

pretty sure.

remote swallow
vernal cobalt
#

or that

lilac dagger
#

I think with maven you can use java 21 source and compile to java 8

quaint mantle
lilac dagger
#

I think it's similar on gradle

quaint mantle
#

Now I compiled it with java 21 but still having the same problem

sourceCompatibility = 21
targetCompatibility = 21
remote swallow
#

your running with a lower java version

#

your running on 18 i think

quaint mantle
#

I'm trying to fix that, but no idea xd

quiet ice
#

Does anyone know whether java.lang.ref.Cleaner is thread-safe?

#

I don't really want to start up a bazillion demon threads just to clean up some resources in the background (these resources being soft references)

quaint mantle
tardy delta
#

when did record appear?

#

java 14 or smth?

quiet ice
#

I am pretty sure you can.

tardy delta
#

wait my thought process was that, if records were introduced in java 14 and you compiled to 8 that it wouldnt have the right ObjectMethods bootstrap methods, but thats just a descriptor, nvm

#

every time i wanted to compile to lower version, it didnt allow me to

civic sluice
#

Just compile with Java 21 and run with Java 21. In 1.20.5 you need anyways.

tardy delta
quiet ice
#

The question more lies in whether multiple threads would be able to register cleaners simultaneously

tardy delta
#

havent used that api but what method are you referring to?

quaint mantle
#

I changed the JAVA_HOME and path to 21 but still appears java 1.8 kek

tardy delta
#

i mean

quiet ice
#

Doesn't forbid one from having logic in the constructor of that class.

sullen marlin
tardy delta
tardy delta
quiet ice
# tardy delta

I'll guess it isn't thread safe, as I'd doubt that the reference queue is thread-safe, but idk

tardy delta
#

CleanerImpl::getCleanerImpl assumes a static cleanerImplAccess has been set

sullen marlin
#

I'm confused what you're doing

tardy delta
#

anyways

sullen marlin
#

I don't think you need a cleaner or anything for this

native gale
#

How do I run some code after all plugins are done loading?

remote swallow
#

run it in a scheduler

#

schedulers dont start till after startup

sullen marlin
#

There's an initialise/load event, or just scheduler

young knoll
#

There’s also the ServerLoadEvent

#

Iirc

sullen marlin
#

Scheduler supports more versions

quaint mantle
#

This is getting so rare

java.lang.NoClassDefFoundError: java/net/http/HttpClient
sullen marlin
#

But also

#

?xy

undone axleBOT
tardy delta
#

alr goodnight

quiet ice
# sullen marlin I don't think you need a cleaner or anything for this

Well it isn't really spigot-related but for a webserver and I have a few open files being stored as SoftReferences (It's not bad to have them open 24/7 per-se, but after some long-term inactivity it'd be nice to just close them - and I can't be bothered to write actual caching for this - so SoftReference it is)

native gale
#

Eh, okay, I'll just describe my problem. Currently my plugin sends a notification to players whenever the server starts, so I put it into onEnabled. But there are some quick guys who are able to react to that notification and join before the last plugin manages to enable itself causing some plugins to behave weird afterwards. So I want the notification to be sent after all plugins are done enabling

tardy delta
#

destructor moment 🥺

rotund ravine
#

Otherwise just schedule a task, the first task will run only after a full init

native gale
#

Okay, good to know, thank you

rotund ravine
native gale
rotund ravine
#

Oh he already said it haha

ionic thicket
#

is there a way to check if an entity is in water?

young knoll
#

Entity#isInWater

sullen marlin
#

literally Entity.isInWater

#

like what research did you even try

worldly ingot
#

🤯

young knoll
#

Javadocs? What are those

remote swallow
#

can a non living entity be in water

worldly ingot
#

Yeah. Why not? :p

#

You know boats aren't living entities, right?

#

Unless...

young knoll
#

Items too

#

Actually any entity can just be in water

quaint mantle
#

how to compile spigot 1.8 with java 21? I can't find a good solution

sullen marlin
#

doubt you can

civic sluice
#

I would assume that Java 11 is the max without hassle.

sullen marlin
#

When was 1.8 released

#

And when was java 21 released

#

You do the math

civic sluice
#

mc 1.8 was release around 2014 in the same year Java 8 got released. 😄

nova notch
#

goddamn 1.8 was nearly a decade ago

quaint mantle
#

so max java version for 1.8 is 11?

smoky anchor
#

Heyo, how do I get a block with the full data, for example chest with its content or sign with text.
I want to store a block in memory and then later place it somewhere.
Full context: creating undo for my own "world edit" thing.
Please tag, I might go to bed, it's late here :D

young knoll
#

BlockState

chrome beacon
#

Store the BlockState

young knoll
#

Block#getState

smoky anchor
#

So, I'm doing world.getBlockState(x, y, z) to store it
Now I want to place it, how would I do that ?

river oracle
#

11 is pushing the envelope without changing anything

#

As with everything almost 10 years old at this point your problem figure it out

waxen parrot
#

Does anyone know how to make custom plugins?

civic sluice
#

By writing one.

waxen parrot
#

writing the plugin?

smoky anchor
smoky anchor
waxen parrot
civic sluice
#

You're probably wrong here. Post your request on the forum in the hiring section.

quaint mantle
chrome beacon
undone axleBOT
waxen parrot
#

thanks

smoky anchor
waxen parrot
#

lol is there anyway I can skip the 20 posts and 1 week of usage thing? I just want to get straight to the point in asking.

remote swallow
#

find someone on the offering section and send them a message

#

(i hear pineapple development is really good)

waxen parrot
#

could u send me link to them?

young knoll
#

“2 years experience”

#

WEAK

remote swallow
#

shut up

civic sluice
chrome beacon
remote swallow
#

uhhhhhhhhhhhhhhhhhh

#

besides the point

waxen parrot
#

lol

worldly ingot
#

#ad

young knoll
#

#banned

remote swallow
#

nuh uh

young knoll
#

How can you handle 1.8 commissions if you were even coding back when 1.8 came out

#

Smh

remote swallow
#

we dont do 1.8 commissions

young knoll
#

profits--

remote swallow
#

if you want 1.8 commissions pay us to backport pineapple

young knoll
#

The best part of 1.8 commissions is you don’t have to worry about future compat

#

Because you know they’ll never update

delicate lynx
#

you never need to improve it!

quaint mantle
#

I'm starting to fell crazy wtf

java.lang.ClassCastException: sun.net.www.protocol.http.HttpURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection
worldly ingot
#

It's impressive that not only did you use the wrong HttpURLConnection, you used the wrong one TWICE

#

You want java.net.HttpURLConnection, but if you're using Java 11 or above, prefer the HttpClient API instead

quaint mantle
worldly ingot
#

Unsure. Seems like a Bungee configuration thing. Likely to do with native IO buffer support provided by Linux

quaint mantle
#

I'm just sending a request to my api idk

worldly ingot
#

Oh. I mean is it hindering your actual request?

#

If not, it's probably just a harmless ignorable warning

quaint mantle
#

I'm doing this:

ProxiedPlayer player = event.getPlayer();

if (PlayersService.getPLayerEntry(player.getUniqueId()) == null) {
   System.out.println("Creating entry"); // This log appears in console
   PlayersService.createPlayerEntry(player.getUniqueId()); // Then this logs the Netty thing
}
stiff crown
#

how can i set the rotation of an itemframe with a map?

if (it.attachedFace == BlockFace.UP || it.attachedFace == BlockFace.DOWN || true) {
    var normalizedYaw = event.player.location.yaw % 360
    if (normalizedYaw < 0) {
        normalizedYaw += 360
    }
    itemFrame.rotation = when {
        315 < normalizedYaw || normalizedYaw <= 45 -> Rotation.NONE // South
        45 < normalizedYaw && normalizedYaw <= 135 -> Rotation.COUNTER_CLOCKWISE // West
        135 < normalizedYaw && normalizedYaw <= 225 -> Rotation.FLIPPED // North
        else /*225 < normalizedYaw && normalizedYaw <= 315*/ -> Rotation.CLOCKWISE //East
    }
}

this shit aint working

indigo axle
#

I am trying to make a plugin that creates a light trail behind the player. Currently I have it place light blocks at the player's location and schedules a BukkitRunnable runTaskLater to set the light block back to normal air afterwards to get rid of the trail. My concern currently is on server disable, these delayed tasks are cancelled rather than ran, causing light blocks to remain in random places upon server restart.

Is there a good way to force these queued runTaskLater tasks to fire rather than to be cancelled? Doing a List of locations is definately an option but I feel like there's probably a more elegant way to go about it?

kind hatch
#

Packets would probably be your best bet.

#

That way the server doesn't ever actually have to update the world.

young knoll
#

Oh true

kind hatch
#

Covers the crash state too since saving a list of block locations isn't guaranteed.

young knoll
#

And you can then send another one to convert it back to air

#

Player#sendBlockChange

kind hatch
#

Who ever added that method to the api is goated btw.

indigo axle
#

I see, thank you! If I want to emulate it not being client-sided, I should just search for nearby players and send the method for anyone that's close, right?

kind hatch
#

Basically, yes.

wraith dragon
#

Does anyone know how to obfuscate with yGuard? Need help with setting it up and running

rough ibex
#

may I ask why you are obfuscating anyway

wraith dragon
rough ibex
#

obfuscating doesn't do that

#

it can easily be bypassed

#

you already own copyright over your code

wraith dragon
#

perhaps

#

but to a normal person who doesnt have any experiene at all

#

would be effective

worthy yarrow
#

plugin ideas?

tame wolf
#

Toilets.

#

Dragons?

#

T&D!

blazing ocean
#

that's mods...

tame wolf
#

Its possible with a plugin

blazing ocean
#

eh

#

very hard tho

tame wolf
#

They wanted plugin ideas 🤷 didn't say what difficulty

blazing ocean
#

would need a custom model, ai, movements, etc

tame wolf
#

These are rookie issues, real professionals struggle with making the poop physics

blazing ocean
#

custom entities is very hard with plugins

nova notch
blazing ocean
#

i mean yeah

nova notch
quaint mantle
#

You can never have too many on the market

#

You can make a LOT of money with those

#

Pick a unique algorithm tho

nova notch
#

people buy that shit?

#

also thats a really good idea sounds like a fun project

grim hound
#

Are all PlayerEvents invoked in the packet handler?

rough drift
quaint mantle
#

So

#

Its a fucking gold mine

shadow night
nova notch
#

what the fuck

shadow night
#

Paying monthly for a plugin sounds like the most irrational thing a human with a working brain can do

nova notch
#

you might as well just pay a dev to make one for you

shadow night
#

True

#

A one-time payment is always better than paying 60 monthly lol

nova notch
#

making it yourself is more fun anyway even if it sucks

quaint mantle
rough drift
#

what's the difference between PICKUP_ALL and PICKUP_ONE

#

is PICKUP_ONE just whenever there is one item in the slot?

sullen marlin
#

I'm not actually sure how to get pick_one anymore

#

I think if you have an item on your cursor and then click the same item in a slot you might be able to under some circumstances

eternal oxide
#

Does scroll wheel allow you to add/remove one?

#

once an item is on your cursoe

rough drift
#

nope

eternal oxide
#

I must be remembering soem other game

shadow night
#

Nah

#

You are remembering the mouse tweaks mod or whatever it's called

eternal oxide
#

could be

shadow night
#

It adds exactly what you described

rough drift
#
left click -> PICKUP/PLACE ALL
left click on a slot with already some of the same type present, so the cursor can't empty -> PLACE_SOME

right click to place an item -> PLACE_ONE
right click to halve a stack -> PICKUP_HALF

collect all -> COLLECT_TO_CURSOR
swap a different type of items -> SWAP_WITH_CURSOR
drop items off the side of the screen with left click -> DROP_ALL_CURSOR
same with right click -> DROP_ONE_CURSOR


ctrl+q -> DROP_ALL_SLOT
q -> DROP_ONE_SLOT


shift+click -> MOVE_TO_OTHER_INVENTORY


number key or F with no item in destination -> HOTBAR_SWAP
with an item in destination -> HOTBAR_MOVE_AND_READD


middle click in creative -> CLONE STACK


clicking outside the inventory, clicking on an empty slot with left, right or middle click, or trying to hotbar swap with two empty slots -> NOTHING
```this is what I found so far
sullen marlin
#

Nice

#

If the docs are bad you could open a PR improving them

alpine urchin
#

Balderdash! All the docs are superb!

#

The docs shall never deplete in value. They are splendid and shall never stultify anybody that encounters them.

alpine urchin
#

Have thee no genteel upbringing?

polar forge
#

Hi guys good morning

rough drift
charred blaze
#

why is my plugin detected as virus?

blazing ocean
#

false positives

charred blaze
#

i mean

#

how can i fix it

#

already have seen that

blazing ocean
#

report it as not a virus

#

only thing you can do ¯_(ツ)_/¯

charred blaze
#

bruh

#

i have seen some plugin owners releasing an update for it

#

is there some kind of fix?

pliant topaz
#

It seems that PersistenData is bound to some other data, not only the item itself (atleast that's what I experienced)
Is it bound to the localizedName? as that would make the most sense to me

vernal vessel
#

Hi, I need help with debugging my plugin. I am debugging my plugin with intellij idea's remote debug, I added start flags to my start.sh, debugging works correctly but I dont know how can I apply changes to the code realtime to the server.

rough drift
#

it's bound to the same stack instance

blazing ocean
#

they're talking about hot reloading

rough drift
#

that's rider

#

wait

blazing ocean
#

afaik you need a local dev server

rough drift
#

Ctrl+Shift+F9

blazing ocean
#

build -> debugging actions -> reload classes

vernal vessel
paper crest
#

Is there a way without ProtocolLib to remove tab completer from args on existing commands?
Like /ver <plugin>
And to remove tab completer only on <plugin>

vocal dew
#

hello

#

I use Eclipse ide for coding

#

import org.bukkit.
when I am make ctrl+space

#

I find only craftbukkit

#

I have created folder in desktop named Plugin

#

and created 2 folder inside this Plugin folder

#

One named Server one named BuildTools

#

in the server there are spigot.jar and other files

#

in the BuildTools there are buildtools.jar and other folders files

#

I imported spigot.jar in the build path

#

I use JavaSE17

#

I have been setuped spigot.jar and buildtools

glad prawn
vocal dew
#

it didn't work

#

I see in the options craftbukkit and craftbukkit.bootstrap

#

@glad prawn

#

@rough drift can you help me pls

warm mica
vocal dew
#

then what to do?

#

@warm mica

eternal oxide
blazing ocean
vocal dew
#

wdym

blazing ocean
#

you could write all of that in a single message lol

blazing ocean
#

you don't need to rewrite it-

eternal oxide
#

just read teh link I posted

vocal dew
warm mica
eternal oxide
#

yeah its old, but everything is still relevant.

#

mostly the Eclipse and maven part

vernal vessel
warm mica
vocal dew
#

hey I need help

#
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>plug</groupId>
  <artifactId>SimplePlugin</artifactId>
  <version>0.0.1-SNAPSHOT</version>
</project>

I have this in pom.xml
past this with this text or over ?
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>

eternal oxide
#

Its a good tutorial and covers everything he needs

#

update that to 17 not 1.7

warm mica
vocal dew
#

hey i have spigot.jar Idk whats version i forgot lmao

eternal oxide
#

Not at all. Its a perfectly working tutorial, even if outdated everything in it works

eternal oxide
#

and its very simple to update

warm mica
eternal oxide
#

literally just changing java and spigot version

warm mica
eternal oxide
#

it doesn;t cause problems, it does exactly what a tutorial is supposed to do

vocal dew
#

Missing artifact org.spigotmc:spigot-api🫙1.16.5-R0.1-SNAPSHOT
error on <depencency>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>plug</groupId>
  <artifactId>SimplePlugin</artifactId>
  <version>0.0.1-SNAPSHOT</version>
   <build>
      <plugins>
          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-compiler-plugin</artifactId>
              <configuration>
                  <source>1.7</source>
                  <target>1.7</target>
              </configuration>
          </plugin>
      </plugins>
   </build>
     <dependencies>
       <dependency>
           <groupId>org.spigotmc</groupId>
           <artifactId>spigot-api</artifactId>
           <version>1.16.5-R0.1-SNAPSHOT</version><!--change this value depending on the version or use LATEST-->
           <type>jar</type>
           <scope>provided</scope>
       </dependency>
   </dependencies>
</project>

warm mica
eternal oxide
#

its not wrong informations

eternal oxide
warm mica
eternal oxide
warm mica
#

That is even worse

#

1.16.5 minimum java is 17 if I remember correctly

eternal oxide
#

Dude, seriously?

vocal dew
#

but I forgot the spigot version xd how to find it

#

spigot.jar version

eternal oxide
#

you don;t need the version as a jar

#

you type the version you want in your pom

vocal dew
#

<version>1.16.5-R0.1-SNAPSHOT</version><!--change this value depending on the version or use LATEST-->

eternal oxide
#

follow the tutorial, its all explained

vocal dew
#

ok

warm mica
# eternal oxide Dude, seriously?

Ya, it is. It just shows that the person who wrote it doesn't really know himself what he is doing. "You really should use this extremely outdated version, but you might use this one that is outdated as well".

vocal dew
#

thanksss worked ❤️

#

ty for tutorial @eternal oxide

#

love u dude

eternal oxide
#

I'm suprised you got it to work so fast, but have fun.

vocal dew
oak mica
#

How would I get the warden entity

    @EventHandler
    public static void onPlayerPotion(EntityPotionEffectEvent e) {
        if (e.getEntity() instanceof Player p) {
            if(e.getCause() == EntityPotionEffectEvent.Cause.WARDEN) {
                
            }
        }
    }
eternal oxide
#

there is no warden entity in a potion effect

eternal oxide
#

the player or entity, not the warden

oak mica
#

so theres no way to get the entity who gave the potion effect

eternal oxide
#

you'd have to listen to another event to get the attacking entity

oak mica
#

also how could I make a zombie attack other zombies

vital void
#

Hi, i have never used mongo db before and i am getting this error when trying to insert a document

#
 java.lang.IllegalStateException: state should be: open at com.mongodb.assertions.Assertions.isTrue(Assertions.java:110) ~[Athena-1.0-SNAPSHOT.jar:?]
vocal dew
#

@eternal oxide

#

how to import the plugin to plugins folder?

#

how to make it jar

#

in eclipse

blazing ocean
oak mica
eternal oxide
#

I'd do package not install

#

you can create yoru own and set it to clean package

vocal dew
#

Missing artifact org.spigotmc:spigot-api : jar:latest
error

#
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>plug</groupId>
  <artifactId>SimplePlugin</artifactId>
  <version>0.0.1-SNAPSHOT</version>
   <build>
      <plugins>
          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-compiler-plugin</artifactId>
              <configuration>
                  <source>1.7</source>
                  <target>1.7</target>
              </configuration>
          </plugin>
      </plugins>
   </build>
    <repositories>
       <repository>
         <id>spigot-repo</id>
         <url>https://hub.spigotmc.org/nexus/content/repositories/public/</url>
       </repository>
   </repositories>
      <dependencies>
       <dependency>
           <groupId>org.spigotmc</groupId>
           <artifactId>spigot-api</artifactId>
           <version>latest</version><!--change this value depending on the version or use LATEST-->
           <type>jar</type>
           <scope>provided</scope>
       </dependency>
   </dependencies>
    
</project>

eternal oxide
#

add an actual version

#

like 1.20.4

vocal dew
#

ok

#

same error

#

Missing artifact org.spigotmc:spigot-api : jar:1.20.4

#

<version>1.20.4</version><!--change this value depending on the version or use LATEST-->

eternal oxide
#

you need the full version like 1.20.4-R0.1-SNAPSHOT

vocal dew
#

oh ty fixed

#

thanks ❤️

#

my laptop very bad :/

#

I don't know how I will open eclipse + mc same time

eternal oxide
#

Eclipse is the best IDE for weaker computers

vocal dew
#

:((

#

my laptop is not ssd

#

also 6gb ram

#

core i7

#

8 years old

eternal oxide
#

I also dev on an i7 3770k

vital void
#

@blazing ocean

vocal dew
#

nvidia geforce gt 630m 2gb

blazing ocean
#

@vital void

vital void
#
        Document document = new Document("uuid", player.getUniqueId().toString());
        document.put("level", 0);
        main.getMongoDB().getDatabase("testDb").getCollection("_testcollection").insertOne(document);
blazing ocean
#

can you send the whole error