#help-development

1 messages ยท Page 9 of 1

severe turret
#

fixed it, for some reason I had modulo there instead of division operator

lilac pier
#

i want to display my logo like that but when i try the logo don't work and just do a square

tender shard
#

this channel is for coding plugins

lilac pier
#

i don't got my answer on itemsadder discord

shadow zinc
#

oh is it, crap

tender shard
#

because people here definitely cannot help you with that

drowsy helm
#

is there any way to get the speed multiplier of a tool or do i have to manually map it

winged storm
#

what the diff between a plugin and a mod

drowsy helm
#

plugin goes in a server and modifies how it sends and recieves packets, mod is client side

#

and affect the player's game

winged storm
#

k thx

tender shard
#

I manually mapped it for BestTools

drowsy helm
#

yeah trying to avoid nms

tender shard
#

since I got maven modules to work, I started to love NMS stuff

grim ice
#

That's wrong btw

#

getKeys() is non null so it returns an empty set

#

and wrapping an empty set by a String.valueOf will return "[]"

tender shard
#

true

grim ice
#

so it's 100% because "list" doesnt equal args[0]

tender shard
#

or because they didnt register it in the first place, lol

grim ice
#

i cant believe it

#

whoever made that thing

#

is so creative

hasty obsidian
#

Defining Damage

tender shard
grim ice
#

is cool

river oracle
#

I think sometimes servers go so far with custom textures rather than look nice it just assaults you in the eyes

tender shard
#

wtf is an ItemStack "Rarity"

drowsy helm
river oracle
#

Yea that too

#

I think simplicity can be part of the charm

#

Rather than full on color overload

grim ice
#

yk how an enchanted golden apple

#

display name is like

#

pink or purple

#

and a wooden axe is white

river oracle
#

Wouldn't that make the enchanted golden apple the only rare item in the game

grim ice
#

its rarity is epic

tender shard
#

that makes sense

grim ice
#

common is white

#

uncommon is yellow

#

rare is cyan

#

and epic is magenta i think

tardy delta
#

are we talking about clash royale?

tender shard
#

there's 4 rarities

tardy delta
#

heeheeheehaw

grim ice
#

fun fact some items upgrade when enchanted

#

e.g an elytra is uncommon

#

it gets upgraded to rare

#

when enchanted

tender shard
#

HOW TF IS AN ELYTRA UNCOMMON

#

it should be rare or epic

grim ice
#

lol

#

yeah

hybrid spoke
#

but what does the rarity tell

grim ice
#

totems of undying

#

is also uncommon

#

same for wither stars

tender shard
hybrid spoke
#

just the namecolor?

tender shard
#

yes

grim ice
#

golden apples and beacons are rare

#

op stuff that u mostly get with creative mode are epic

#

like barriers

#

and command blocks

#

spawners and light blocks

#

as well as dragon eggs

#

and items for developers like debug stick

tender shard
#

there are 15 epic items

grim ice
#

yea

#

they should add legendary

#

and make it for supreme items like

#

an elytra with a chestplate

tender shard
#

it's funny how all banners are non-epic. except of course for the mojang banner, which obviously is soooo epic lol

hybrid spoke
#

lets make a mmorpg with a rarity system

grim ice
#

lol i bet if most of the people in help dev make a server

#

it would go huge

#

imagine like

#

20 devs working in one single server

hybrid spoke
#

and 17 of them would be unexperienced

grim ice
#

hmmm

#

not really though

#

there are many here who know their shit

#

just 3 off the top of my head

#

alex

tender shard
grim ice
#

you

#

and lynxplayer

#

lmbishop

#

red or what was his name

#

mike

tender shard
grim ice
#

yeah and 7smile

hybrid spoke
#

cought elgar cought

grim ice
#

yeah

#

and elgar as well

#

peaches_mlg too

hybrid spoke
#

and none of them would contribute

grim ice
#

yeah lol

#

that's why i said "imagine"

winged storm
#

what beginer plugin projects would you sugest i try?

tender shard
#

does anyone have a good idea on what to do with NMS

hybrid spoke
#

im planning stuff like this since 2019

#

at least mmorpgs

grim ice
#

if you limit yourself to beginner stuff u wont learn

#

lol

winged storm
#

im new though

grim ice
#

plus to get ideas just think about what u need

placid fog
#

how do i change a farmland into one with seeds?

grim ice
#

e.g i wanted to learn japanese so i made an app to help me

tender shard
tender shard
#

I always suggest this idea when someonne asks lol

hybrid spoke
#

make a gambling plugin

#

there you have everything

#

commands

tender shard
#

TaxAuthority 1.0.0-SNAPSHOT

hybrid spoke
#

inventories

#

listener

#

stochastic

tender shard
#

I have another funny plugin idea

hybrid spoke
#

btw @noble lantern i made your cowflipper, but its less hilarious than it sounds

grim ice
#

yk idk what to learn anymore anyone has some ideas i can learn about?

tender shard
#

a plugin that scans your other plugin .jar files, looks for static methods/fields/classes and then it prints "STATIC ABUSE DETECTED in file X in line Y"

hybrid spoke
#

"nah, you're out"

tender shard
#

lol

grim ice
#

or even better

tender shard
#

or it removes those methods from the other plugin and then everything breaks

grim ice
#

google the plugin names

#

get the author

hybrid spoke
#

throw fake exceptions

grim ice
#

search for them in spigot

#

and pm them

hybrid spoke
#

in the name of other plugins

#

to make them look bad

#

and promote yours

grim ice
#

LOL

#

good idea

tender shard
#

Nag author(s) ... of plugin ... for using static method ... in file ...

noble lantern
#

for thousands of years i lay dormant

#

who dare pings my cord

tender shard
noble lantern
#

wow

#

fucking jefflib

#

smh

#

nag the author

tender shard
#

@tender shard you suck

#

done

winged storm
#

whats the difference between spigot, bukkit and paper

tender shard
hybrid spoke
tender shard
noble lantern
#

@wet nova

#

we blame you

hybrid spoke
#

@opal juniper

noble lantern
#

NO

hybrid spoke
#

we blame you as well

noble lantern
#

NOT HIM

#

hes precious

hybrid spoke
#

YES HIM

tender shard
noble lantern
#

NO

hybrid spoke
#

HE DESERVES ALL THE BLAME

noble lantern
#

not until my server crashes

tender shard
noble lantern
#

then i blame him

hybrid spoke
#

i will prevent that

noble lantern
#

well actually tbh i could just blame you

#

easier

tender shard
#

btw since 2 hours, I need to go to the toilet but I still havent done so

noble lantern
hybrid spoke
#

everything you say against patheticapi will be reflected to me anyways

tender shard
#

fuck toilets

noble lantern
#

"Okay ill compile test and then go"

#

and then ill be 5 more tests in

tender shard
noble lantern
#

"okay one more then im rly gonna go"

hybrid spoke
noble lantern
hybrid spoke
noble lantern
#

THE VIDS I MADE???

#

ffs

#

out of the LOOP

tender shard
noble lantern
#

bruh

#

cipher

#

im gonna blow his mind

hybrid spoke
#

i HaVeN't WaTcHeD tHeM eItHeR

noble lantern
#

fr?

tender shard
# winged storm so is paper the best?

the best depends on what you need. As a general rule of thumbs, if you wanan stay as vanilla as possible, use spigot. If you don't care about a few fixed duplication exploits, then use paper

noble lantern
#

i tagged ollie when i made them

hybrid spoke
#

i am not ollie

#

but i still watched them

tender shard
noble lantern
#

i ran it with 200 with same results

#

async so they dont show up here

hybrid spoke
#

thats a good performance test

noble lantern
#

all lag is just from Navigator.move call

tardy delta
#

lmfao if i see that coming i run

noble lantern
tender shard
#

oooh its about path finding

noble lantern
#

its creepy lmfao

tender shard
#

I thought it was just a stupid general-stuff lirary that calls itself pathetic lol

noble lantern
#

LOL

noble lantern
#

even considered using your guys api

#

considered

#

keyword

tender shard
#

well

hybrid spoke
#

he just said that to sound nice

tender shard
#

who even is the citizens author

noble lantern
hybrid spoke
#

im still not satisfied with how the Pathfinder interface is built up

noble lantern
#

no his is actually rlly complicated

hybrid spoke
#

it has a pretty static design

noble lantern
#

impl needs work

tender shard
#

ok guys I'll make this "static abuse" plugin now. who's going to contribute?

hybrid spoke
#

i was already looking into that giving it a collections-alike design

tender shard
noble lantern
#

wym by collectors-alike?

vocal cloud
#

Lombok and asm libs ๐Ÿ‘€

tender shard
vocal cloud
#

I've already written code to find static abuse lol

noble lantern
tender shard
noble lantern
#

lazy

tender shard
#

because my plugins won't run if that isn't properly replaced

noble lantern
#

let spigot do it

#

oh

#

okay

#

nvm

tender shard
#

yeah it's for local testing stuff

noble lantern
#

ohhh

#

yeah cause own id doesnt work

tender shard
#

and couuuuld be used to remove your actual spigot ID when leaking plugins

#

lmao

tropic ingot
#

hi, I'm a new entry in the Minecraft developer world, and I had some questions that I wanted to try to solve with your help ... I would like to understand how I can do to allow myself to do these two things:

โ€ข How can I do to ensure that by clicking or interacting on a block (for example a diamond block) it can perform actions (events, commands etc)? The problem lies not in the question itself, but in the fact that this event or command must have arisen by clicking only that specific block of diamonds (with its own tag / data etc) and not any diamond block.

โ€ข I would also like to know how to give me a material through plugin (I always use the example of the diamond) with that specific date or tag that can allow me to take advantage of the event or command I explained above, in the same way I would like how to attribute a colored name and a custom lore (always via code or config)

Thanks a lot in advance for the support!!

tardy delta
#

the bible

#

๐Ÿ™

noble lantern
#

๐Ÿ™

#

(on srs note reading rn)

tender shard
noble lantern
#

^^

tender shard
#

Actions when clicking certain blocks

tropic ingot
#

hi, I'm a new entry in the Minecraft developer world, and I had some questions that I wanted to try to solve with your help ... I would like to understand how I can do to allow myself to do these two things:

โ€ข How can I do to ensure that by clicking or interacting on a block (for example a diamond block) it can perform actions (events, commands etc)? The problem lies not in the question itself, but in the fact that this event or command must have arisen by clicking only that specific block of diamonds (with its own tag / data etc) and not any diamond block.

โ€ข I would also like to know how to give me a material through plugin (I always use the example of the diamond) with that specific date or tag that can allow me to take advantage of the event or command I explained above, in the same way I would like how to attribute a colored name and a custom lore (always via code or config)

Thanks a lot in advance for the support!!

tender shard
#

erm

#

I actually wanted to help you but now I just think that you keep spamming the same message every minute? lol

tropic ingot
#

sorry, I thought asking about discord would have a quicker response

hybrid spoke
#

even if its not static, the methods could all be static with the current design

noble lantern
#

I like that, basically each Pathfinder is a Collection (impl wise)

#

And it could be many different types of Pathfinder while being a Collection

hybrid spoke
#

basically yes, just that it will not be a collection

noble lantern
#

Yeah ofc

#

Just using them as the impl example

hybrid spoke
#

Pathfinder remains but will get more methods to f.e. validate the nodes

#

and we will provide a Base- or AbstractPathfinder which will be the root

#

and from there on users can create their own specific impls

#

for you f.e. the PlayerPathfinder

#

for others the regular Pathfinder

#

or a Dot- or ControlPointPathfinder

noble lantern
noble lantern
#

That's nice

#

It will be ready tmrw right

#

<4

#

Jkjk

muted hawk
#

Hello, can someone develop plugins? I just need a small plugin for 1.19 to be developed. Dm me

hybrid spoke
#

tomorrow? that late?

noble lantern
#

No rush, but does sound nice

#

LOL

undone axleBOT
noble lantern
#

I would actually be amazed if you got that whole impl system redone in a day

muted hawk
#

thx

noble lantern
#

My slow aaa you take like 2-3

#

Ass*

#

Would*

hybrid spoke
#

i could get it done today evening probably

noble lantern
#

Beastly

#

Ive been having a hard time focusing lately, likely do to the fact I cant stop fucking with the nps

hybrid spoke
#

but ironically the only motivation i find to work on that is at work

noble lantern
#

I did something foul earlier with them and got stuck doing it forna few hours

hybrid spoke
#

yeah im at the evening/at night way more productive

noble lantern
#

I legit cannot focus

hybrid spoke
#

but first i gotta see what methods i give them to implement

noble lantern
#

When this is too easy to do now lol

hybrid spoke
#

since i wanna go as userfriendly as possible

tender shard
#

this fucking sound bro ๐Ÿ˜„

#

This is giving me anxiety

noble lantern
#

I should of reloaded my server beforehand

#

It was getting me leaks out the ass it would of been better that way

noble lantern
#

Actuall Pathfinder is stupidly efficient

#

And its actually perfect its on block points bc that means the server needs less thinking process to actually make entity walk x distance

hybrid spoke
tardy delta
noble lantern
hybrid spoke
#

but its good that you test it

#

so bugs and performance issues or other wishes etc. comes up

noble lantern
#

Keep in mind this is running on an emd epic too

#

Not an i7 or i9

#

So it has like

#

Way more room

tender shard
#

is it not possible to declare interfaces for anon classes? :/

noble lantern
#

Amd epyc*

hybrid spoke
#

well i never actually tested it myself

noble lantern
#

So when I set it up it could of not even worked ๐Ÿ’€

#

Thankfully it did xD

hybrid spoke
#

basically

#

yes

#

xD

noble lantern
#

Im gonna mess with the rules etc Olli showed me

#

The isValid override

hybrid spoke
#

oh the strategy

noble lantern
#

Not rn but later

#

Yeh

#

Rn they fall into lakes

#

And get stuck in some holes

#

They yet themselves off mountains too

hybrid spoke
noble lantern
#

Funny asf

#

Oh is it included in the default repo nice

#

Ill try it when I wake up

tardy delta
#

man is sleeping

noble lantern
#

Ik oli said by default with no strategy will just find shortest path

#

Not smartest

hybrid spoke
#

default is just the direct one

noble lantern
#

Yeh

#

It does go around obstacles tho

#

Somewhat

#

But I mean its a proc world

hybrid spoke
#

yeah but if its in the air it will just go straight up

noble lantern
#

It can only be so good

#

Yee

#

Like if your at top of mountain

#

And npc is not

#

He just stays at bottom

#

He won't try to Pathfinder up

hybrid spoke
#

but lets see how well you deal with the strategy api

#

since i had struggles

noble lantern
#

It seems mostly simple

#

I had to fuck with citizens one

hybrid spoke
#

simple but confusing

#

you get 3 locations in

noble lantern
#

Indeed

hybrid spoke
#

2 can be null at any time

#

and isValid - what is valid?

worldly ingot
#

You can instantiate an interface though

noble lantern
noble lantern
#

Eg "is this block valid for the current Pathfinder goal?"

tender shard
#

Choco since you're there, do you know if I can use an ObjectInput/OutputStream somehow even for classes that do not implemennt Serializable?

noble lantern
#

Like if I want a swim strategy

#

Im gonna make the invalid only work on water

tender shard
#

like, I wanna turn ANY object into a byte[] and then later again, load it

noble lantern
#

Or where the block above is water rather, its one of the 2 ik

tender shard
#

I fear it's not possible D:

hybrid spoke
noble lantern
#

Ctrl click aussieKekw

#

I hard forked so all files are in my ide

worldly ingot
#

Yeah unless it's Serializable you can't. You can kind of hack around it, though even then you're limited to just reading/writing fields that are exposed by getters/setters

noble lantern
#

Can u just

tender shard
#

Shit, seems like I gotta use kryo then

noble lantern
#

Get the Java code of an Object

#

As a string

tender shard
#

no

noble lantern
#

:))

#

Oh

tender shard
#

๐Ÿ˜ฆ

noble lantern
#

Wow java sucks

tender shard
#

Imma have a look at kryo, it seems promising

#

I'm basically looking for sth like that lol

noble lantern
#

Choco prolly wondering wtf this for ๐Ÿ’€

tender shard
#

yes haha

#

disclaimer: It's just for fun and out of curiosity

worldly ingot
#
public final class WrapperOfNonSerializableClass implements Serializable {

    private transient final NonSerializableType object;

    public WrapperOfNonSerializableClass(NonSerializableType object) {
        this.object = object;
    }

    private void writeObject(java.io.ObjectOutputStream out) throws IOException {
        // Write here
    }

    private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
        // Read here
    }

}```
#

That's a kind of hack around it. Then just serialize new WrapperOfNonSerializableClass(nonSerializableType)

#

But you have to handle pretty much every type you want to be serializable

opal juniper
noble lantern
#

LMAO

tender shard
#

hm yeah I basically wannna be able to "serialize" runnables

worldly ingot
#

Oh

tender shard
#

so that wouldn't work I guess

worldly ingot
#

Well if you're serializing a code block, yeah, not happening haha

noble lantern
#

:(

tender shard
#

unfortunately, lol

noble lantern
#

Its gonna

#

Ill Google this in the morning

tender shard
#

would be awesome for stuff like GUIs to save the "what happens on click" runnnable inside the items PDC

worldly ingot
#

You could probably do some weird shit and class load it to bytecode and serialize that. Then when deserializing, write something with ASM

#

idk

#

But that's also insecure af

tender shard
#

yeah I mean it's probably not worth it, but now I'm curious on whether I get it to work anyway lol

hybrid spoke
#

i already told you

#

i dont like it

noble lantern
#

So you judge his method name ๐Ÿคฃ

#

Thats like attacking someone's face over an internet argument

#

XD

#

isBlockValidToAddToPathfindingVectorList

#

Oli ^

hybrid spoke
opal juniper
#

that is such a god method name

hybrid spoke
#

also its not a vectorlist

noble lantern
#

Well for me it is

#

I make it one

noble lantern
#

I forgot all the class names or ide go suoer in depth on a god method name

#

Its 6am tho imma sleep

hybrid spoke
#

4 pm here

opal juniper
#

wtf bro

hybrid spoke
#

~at work

opal juniper
#

iโ€™m on holiday rn

#

literally, in greece rn

hybrid spoke
#

2 weeks till my vacation

opal juniper
tender shard
opal juniper
#

hell

tardy delta
#

oeh come visit me

tender shard
#

pls dont visit me

#

I only allow ClassVisitors

noble lantern
#

So I just got into bed

#

And I forgot

tender shard
#

you gotta Thread.sleep bro

noble lantern
#

I took garlic bread in a ziploc bag in my room earlier

hybrid spoke
noble lantern
#

And I just layer in bed and saw the garlic bread

dry forum
#

how can i make a maven repo for the api of my plugin? its a paid plugin so i cant just put the paid plugin in the resources file and get it like that since people could just decompile it and download the plugin for free, everything ive found online in conusing and makes no sense to me

noble lantern
#

Now im eating garlic bread in bed at 6am

hybrid spoke
tardy delta
#

lol

tardy delta
#

me eating candy at 1am

pseudo cradle
#

is this a reliable way to check if the player is on ground?

if (!player.isFlying() && player.getLocation().subtract(0, 0.1, 0).getBlock().getType().isSolid()) {
    // on ground
}```
opal juniper
#

i thought there was an isOnGround or something

dry forum
pseudo cradle
tardy delta
#

checking down blockface?

opal juniper
dry forum
tender shard
#

you also got docker?

dry forum
#

no idea what that is

tender shard
#

if not, you gotta "manually" deploy it with the maven-wagen ftp plugin or similar

noble lantern
#

Bro u just got links for it all

#

Defo using that ty

#

Didnt know nexus had a docker image

tender shard
#

nexus without docker is a pain

#

I really dont like docker, but for huge things like nexus, it's amazing

#

๐Ÿฅฒ

#

get rekd, javadocs repo

tender robin
#

if I use the api-version: 1.13 does my plugin support every version above 1.13?

tender shard
#

well that depends ofc

tender robin
#

what's the best I can do for multi version support?

tender shard
#

tl;dr: yes. Unless you use any methods that aren't available in 1.13 yet

tender shard
tender robin
#

I want to use version 1.8 and support from there to the latest version of minecraft

tender shard
#

then set "api-version" to 1.13 and use 1.8 as dependency when compiling

tender robin
#

do I have to use spigot-api or spigot as the artifactid?

tender shard
#

do you need NMS?

tender robin
tender shard
#

okay, then you don't need it ๐Ÿ™‚ you can use "spigot-api" as artifactId in the dependency

tender robin
#

my plugin.yml:

api-version: 1.13

my pom.xml dependency:

<dependency>
  <groupId>org.spigotmc</groupId>
  <artifactId>spigot-api</artifactId>
  <version>1.8-R0.1-SNAPSHOT</version>
  <scope>provided</scope>
</dependency>

and I code the plugin on 1.8

tender shard
#

that looks good

tender robin
tender shard
#

in theory, yes. unless you use stuff that is available in 1.8, but not in later versions

#

for example, you must never use numerical IDs for blocks because they were removed in 1.13

tender robin
#

but there are changes in the newer versions

tender shard
#

yes, but almost everything is backwards compatible

#

if something compiles and runs fine on 1.8, there's like a 99.9% chance that it also runs fine on 1.19

tender robin
#

what if someone says that he has problems on the version 1.17 what can I change in the code to fix it

tender shard
#

that depends on the problem ofc

#

also NOONNE uses 1.17

#

everyone is using either 1.8.8, 1.12.2, 1.16.5, 1.18.2 or 1.19

tardy delta
#

i was using 1.17.1 a few weeks ago smh

tender shard
#

WHY

tardy delta
#

idk

tender shard
#

it's dead since a looong time

tardy delta
#

just for testing

tender shard
#

yeah ok

tardy delta
#

and those later versions take more and more time to load

tender shard
#

anyway @tender robin if you only use the API, then you don't have to worry about what version someone is using

tender robin
#

well, I will just code and I will see what can i do to fix the problems if there are any

tender shard
#

"plugins having problems in certain versions" is in 99% of cases because those plugins are using NMS

#

which you don't do, so don't worry

tender robin
tender shard
#

yes, the API

#

lol

tender robin
#

ok ^^

#

ty @tender shard

tender shard
#

np ๐Ÿ™‚

young shell
#

Should setLeashHolder work with a Player? The description sounds like this is a method to set the player who is at the end of the leash that is attached to the LivingEntity the Method is called on

chrome beacon
#

Wrong channel

rugged gust
#

Ohk

tender shard
#

it says that it has no effects on players, since they cannot be leashed anyway

slate delta
#

why, when use a % my setFormat will reset ?

tender shard
#

replace % with %%

slate delta
#

strreplace ?

#

when player send a msg

tender shard
#

yes

slate delta
#

okay i well test this

tender shard
#

otherwise, String.format thinks the % is a "identifier" or whats it called

severe turret
tender shard
#

event.setMessage(event.getMessage().replace("%","%%"));

severe turret
#

it's pseudo cause I'm not on pc rn

slate delta
#

What is str_replace php equivalent in java ?

tender shard
tender shard
severe turret
#

I want to run the event async

#

ty

tender shard
#

why don't you use the BukkitScheduler?

severe turret
#

I'm new to anything async so I'm slowly learning about how it works

#

didn't know that exists

tender shard
#
    @EventHandler
    public void onPlayerQuit(PlayerQuitEvent event) {
        Bukkit.getScheduler().runTaskAsynchronously(this, () -> {
            // Do stuff
        });
    }
#

this is the "preferred" way

slate delta
#

thanks that work!

severe turret
#

aha

tender shard
#

also, look at this:

#

?scheduling

undone axleBOT
severe turret
#

btw

tender shard
severe turret
#

ik

tender shard
#

kk

tender shard
severe turret
#

I have to run the Runnable in the Executor service thread pool to have many threads right

ivory sleet
#

Nah you can just dispatch them

#

But since theyโ€™re expensive as they get mapped to os threads a thread pool is mostly always necessary

#

(reusability for instance)

small current
#

how many double decimal can a location x, y, z and the yaw,pitch has ?

upper vale
#

Where can I find documentation on pathfinder goals?

#

or just what each of them do

chrome beacon
#

NMS doesn't really have documentation

#

You can go of the names and take a look at the code

tall dragon
#

yea just wing it ๐Ÿ˜„

glad prawn
#

How i can getDeathMessage() on EntityDamageByEntityEvent. iโ€™m using 1.19.

eternal night
#

you cannot ?

#

damage != death

naive bolt
#

anyone got any reccomendations for command manager api

eternal night
#

cloud is pretty neat

naive bolt
eternal night
#

I mean, that seems like another "here have all the utils you want" package

tall dragon
#

which is bad becauuuuse?

eternal night
#

I mean, if I want bloatware I install windows

naive bolt
#

like this ColorTranslator.translateColorCodes("&#baebabThis is &c&lcool") can be done with one extra charecter with standard bukkit

glad prawn
ivory sleet
#

How do I know the framework classes work?

tall dragon
#

u use different libs for parts u need?

eternal night
#

Yea

tall dragon
#

like a command lib, menu lib

#

if u need them

naive bolt
#

Is their an api just for subCommands no extra bloatwear

eternal night
#

indeed

tall dragon
#

hmm

eternal night
tall dragon
#

that might be something il need to look into too

ivory sleet
#

Cloud is nice, acf is nice or just raw brigadier PepeHappy

tall dragon
#

thats just a command framework tho right?

eternal night
#

it is just a command framework

#

but that is what was asked no ?

tall dragon
#

what do you suggest for menu's then

eternal night
#

anyone got any reccomendations for command manager api

ivory sleet
#

Interfaces

eternal night
#

^

ivory sleet
#

From incendo

eternal night
#

tho that is quite on the edge

tall dragon
#

got a link?

eternal night
#

incendo generally hosts some really nice stuff

ivory sleet
#

Or well you have IF

eternal night
ivory sleet
#

Or triumph gui

tall dragon
#

appreciate it

eternal night
#

tho, does that actually work on spigot ? xD

ivory sleet
#

Theres an awesome minecraft gh repo

eternal night
#

pretty sure that is paper-native

ivory sleet
#

For reliable mc libs

#

(By incendo also iirc)

eternal night
ivory sleet
#

Ye

tall dragon
#

so do yall use seperate stuff for handling chat too then?

#

parsing hex all that stuff

eternal night
#

parsing hex ?

#

I use mini message

ivory sleet
#

Adventure, mini message :>

tall dragon
#

i mean general stuff like gradients and stuff

#

yea

eternal night
#

Yea mini message does that all ๐Ÿ™

tall dragon
#

i like minimessage for that too

eternal night
#

if you want legacy support I know phoenix has some stuff

#

has support for your &6Golden text

#

so even kacper can be happy

ivory sleet
#

EpicGod Id say there exists libraries with good apis for the consumers, for mostly everything, but the issue is if they are reliable, did the writers write any tests to prove their shit works? And also about the design of any library? Can it support concurrency easily? Can you add it you your project and still keep testability, reusability as well maintainability?

eternal night
#

beyond that, just vendor lock would murder me with these large all-in-one libs

#

imagine if that project goes unmaintained

patent fox
#

how do i set the goal selector in remapped?

ivory sleet
eternal night
#

now your entire codebase is basically dead

fossil lily
#

How would I hide 1 player's nametage from everyone else on the server? I'm on 1.8.8. Setting a passenger is not working.

eternal night
#

I mean, teams have the nametag visibility option

#

if that wasn't in 1.8.8 yet then ehm

#

upgrade ๐Ÿ˜›

fossil lily
#

:P

eternal night
#

tho it seems like you are in luck

fossil lily
eternal night
#

Well no wouldn't you just put the one player in a team ?

#

like, add them to a team for just themselves

#

and set the name tag visibility to never

#

now no one else will be able to see their name

fossil lily
#

Isn't it only never for people on that same team?

eternal night
#

no

fossil lily
#

oh

#

thanks :D

eternal night
#

those are HIDE_FOR_OTHER_TEAMS and HIDE_FOR_OWN_TEAM

#

NEVER just means never

fossil lily
# eternal night NEVER just means never
        ScoreboardTeam team = new ScoreboardTeam(((CraftScoreboard) Bukkit.getScoreboardManager().getMainScoreboard()).getHandle(), p.getName());

        team.setNameTagVisibility(ScoreboardTeamBase.EnumNameTagVisibility.NEVER);

        ArrayList<String> players = new ArrayList<>();

        players.add(p.getName());

        ((CraftPlayer) player.getPlayer()).getHandle().playerConnection.sendPacket(new PacketPlayOutScoreboardTeam(team, 1));
        ((CraftPlayer) player.getPlayer()).getHandle().playerConnection.sendPacket(new PacketPlayOutScoreboardTeam(team, 0));
        ((CraftPlayer) player.getPlayer()).getHandle().playerConnection.sendPacket(new PacketPlayOutScoreboardTeam(team, players, 3));

I found some stuff online and modified it. Would something like this work?

eternal night
#

I mean

#

that just does that but with packets

#

tho like

#

why

fossil lily
#

that looks better

eternal night
#

Well board wise, all players have to be in that board

#

else they won't ever get the new team

dry forum
#

how can i make a maven repo for the api of my plugin? its a paid plugin so i cant just put the paid plugin in the resources file and get it like that since people could just decompile it and download the plugin for free, everything ive found online in conusing and makes no sense to me

eternal night
#

you will have to host it somewhere

young shell
fossil lily
dry forum
#

i dont have a webserver

eternal night
#

Well, there it stuff like jitpack

slate delta
#

How can update this by exemple: [RANK] PlayerName ?

eternal night
#

never liked it much

dry forum
#

thats paid though isnt it?

eternal night
#

jitpack is free for open source projects

dry forum
#

ah well that wont work :/

eternal night
#

you'll have to host your API on github

#

have the impl private somewhere else

dry forum
#

huh

quaint mantle
#

anyone know how to verify if a account is premium? i tried use mojang api, but wont worked

eternal night
#

online-mode=true

#

pretty good

quaint mantle
slate delta
#

How?

quaint mantle
#

Scoreboard sb = Bukkit.getScoreboardManager().getMainScoreboard();

Team team = sb.registerNewTeam("teamName");

team.setPrefix("prefix");

slate delta
#

i dont want a scoreboard ๐Ÿ˜

quaint mantle
#

or something like this

quaint mantle
#

but the scoreboard no will appear

naive bolt
#

How can i make a string into a string[]

eternal night
#

depends

naive bolt
#

I thought i could just surround it in []

eternal night
#

Do you just want a string array

#

with a single string ?

quaint mantle
naive bolt
#

im doing a create if not exist

#

and will add more data as it comes

ripe urchin
#

to give a LivingEntity armour (just want to give a zombie a skelly skull to stop him from burning), i assume you would need to do setMetadata()?

echo basalt
#

they have inventories

#

Mob#getEquipment

#

might be a paper thing

#

but Zombie#getEquipment is guaranteed to work

ripe urchin
#

oh and just editing that instance will grant it to the zombie?

echo basalt
#

Yeah

naive bolt
echo basalt
quaint mantle
echo basalt
naive bolt
#

so i cant just make a normal string like "hello" into ["hello"] easily?

echo basalt
#

you can

slate delta
echo basalt
#

String[] array = {"Hello"};

quaint mantle
quaint mantle
ripe urchin
# echo basalt Yeah

this seems so weird ngl zombie.getEquipment().setHelmet(plugin.getServer().getItemFactory().createItemStack("minecraft:skeleton_skull"));

#

i'm not sure if i'm doing it right

slate delta
echo basalt
#

You can precache the item for future reference

ripe urchin
#

is the only way to get an itemstack through the ItemFactory tho?

echo basalt
echo basalt
ripe urchin
#

huh IDEA didn't show me that

#

that will make it easier lol, thanks

echo basalt
#

what if you make a 5head zombie

#

by setting a zombie head

#

๐Ÿค”

ripe urchin
#

lol

quaint mantle
#

anyone know how to verify if a account is premium? i tried use mojang api, but wont worked

naive bolt
#

How can i see if a string array includes a specific thing

ripe urchin
#

i just want it to have a helmet to stop burning without the helmet showing

naive bolt
#

like is their a .includes

echo basalt
naive bolt
#

dam ok

echo basalt
#

If you want those fancy features you can just create a list

echo basalt
ripe urchin
#

ArrayList love

naive bolt
#

maybe a list is better

#

im wanting to store a list of unlocked towns which are UUID's

ripe urchin
cinder spindle
#

Hey, anyone knows about worldgen and undertakes commissions??

echo basalt
#

Or make a Set<UUID> and making sure to remove dead zombies and all

ripe urchin
#

ah they won't die what i'm making was an idea of someone else. They wanted a plugin of clickable corpses (instead of items spilling everywhere) so it's special no AI invulnerable zombies with some persistent data of their owner's UUID

slate delta
#

but i don't want update the TAB list, beacause already edited @echo basalt

#

only the player name above head

slate delta
ripe urchin
#

hmm the MetadataValue interface has all these "asX" methods that I must implement

#

but some stuff I really don't need

#

dammit

#

is it normal to just leave those as placeholder values or something?

next stratus
#

Hey, how do people actually do NMS block setting?

rain mason
#

hello, how can I set the text data in new ItemStack()? Currently when I use Player.openBook(new ItemStack(Material.WRITTEN_BOOK)), the book just says * Invalid book tag *

shy forge
#

Waterfall not finding Paper server

tardy delta
#

BookMeta?

echo basalt
#

I'd just use PDC honestly

ripe urchin
#

PDC?

#

oh persistentdatacontainer

#

i tried that and it looks way too complex not going to lie

rain mason
# tardy delta BookMeta?

oh, thanks! I'm guessing something like this?java ItemStack book = new ItemStack(Material.WRITTEN_BOOK); book.setItemMeta(book.getItemMeta().addPage("Foo"));

#

yup, just found that out too, thanks

ripe urchin
#

does the PlayerInventory.addItem cause the items to be automatically dropped if it wasn't able to added to the inventory, or will it purely return the hashmap forcing you to drop the items yourself?

native talon
#

public class Die implements CommandExecutor {

@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
    if (command.getName().equalsIgnoreCase("die")) {
        if (sender instanceof Player) {
            Player player = (Player) sender;
            player.setHealth(0.0);

        }
    }
    return true;
}

}
why is this command not executing? I added it to the plugin yml with another command

#

This is the onEnable
public final class MyPluginDA extends JavaPlugin implements Listener, CommandExecutor{
@Override
public void onEnable() {
System.out.println("Plugin Works!");
getServer().getPluginManager().registerEvents(this,this);
getCommand("agility").setExecutor(new Agility());
getCommand("die").setExecutor(new Die());
}

#

This is the other command

#

all of it compiles

tardy delta
#

why are you implemnting command executor on ya main class

native talon
#

Previousley made a command there

#

I now removed it

#

When I had one command it worked

tardy delta
#

also use codeblocks

#
your code
native talon
#

gotcha

#
    public void onEnable() {
        System.out.println("Plugin Works!");
        getServer().getPluginManager().registerEvents(this,this);
        getCommand("agility").setExecutor(new Agility());
        getCommand("die").setExecutor(new Die());
    } ```
#
public class Die implements CommandExecutor {

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (command.getName().equalsIgnoreCase("die")) {
            if (sender instanceof Player) {
                Player player = (Player) sender;
                player.setHealth(0.0);

            }
        }
        return true;
    }
}```
#
public class Agility extends JavaPlugin implements CommandExecutor {

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (command.getName().equalsIgnoreCase("agility")) {
            if (sender instanceof Player) {
                Player player = (Player) sender;
                PersistentDataContainer p = player.getPersistentDataContainer();
                int currentexp = p.get(new NamespacedKey(this, "agilityxp"), PersistentDataType.INTEGER);
                int currentThreshhold = p.get(new NamespacedKey(this, "agilitytreshhold"), PersistentDataType.INTEGER);
                int currentAgilityLevel = p.get(new NamespacedKey(this, "agilitylvl"), PersistentDataType.INTEGER);
                String message = "Current Exp: " + currentexp + "\n" + "Exp needed to level up: " + currentThreshhold + "\n" +
                        "Current agility level: " + currentAgilityLevel;
                player.sendMessage(message);

            }
        }
        return true;
    }```
tardy delta
#

you forgot the java

#

you can also use getLogger().info("plugin works") instead of sysout

#

cache namespacedkey as a field

#

p.get() without the pdc entry being present will result in a NullPointerException too iirc

native talon
#

package me.dor7123.mypluginda.commands;

import org.bukkit.NamespacedKey;
import org.bukkit.command.CommandExecutor;
import org.bukkit.entity.Player;
import org.bukkit.command.CommandSender;
import org.bukkit.command.Command;
import org.bukkit.persistence.PersistentDataContainer;
import org.bukkit.persistence.PersistentDataType;
import org.bukkit.plugin.java.JavaPlugin;

these are the imports

#

PDC is here no ?

tardy delta
#

p.get(new NamespacedKey(this, "agilitytreshhold"), PersistentDataType.INTEGER);

#

you can either check if pdc.has before getting it or assign currentExp to an Integer instead of int and check nullability

native talon
#

both commands are packaged under "commands"

tardy delta
#

im not talking about imports

native talon
#

ohhh you say it wasn't instanced

#

that's not the issue right now but I have a todo to make it so it will be created upon joining the server for the first time so nullpointers wouldn't happen

tardy delta
#

im saying if the player doesnt have a "agilityxp" tag in his persistent data container, that method might throw a nullpointerexception

native talon
#

Yup, currently not the issue it seems

grim ice
#

u cant have 2 javaplugins

#

lmao

native talon
#

Was that the issue ?

grim ice
#

ur creating an instance of agility which extends javaplugin and ur other class which extends java plugin as well

#

yes that is the issue

#

ur plugin wont even load

sterile token
#

2hex

grim ice
#

or is ur main class called Agility?

grim ice
native talon
#

now it breaks my namespaces key this argument

#

how do I fix it? super or something ?

sterile token
#

How does the spigot now that 2 clases extends hava plugin when it only look for the one on plugin.yml

#

Wheel

grim ice
#

whenever there are 2 objects that extends it in the jvm

#

it throws

native talon
#

@grim ice How do i pass the plugin as the argument for the namespacedKey constructor now ?

native talon
#

-_-

grim ice
#

?learnjava

undone axleBOT
tardy delta
#

?di

undone axleBOT
sterile token
#

๐Ÿค”

#

JVM is the java virtual machine

grim ice
#

mhm

sterile token
#

And it doesnt care when 2 classes extend the same class

#

๐Ÿ˜‚

tardy delta
#

its implemented in the plugin class loader afaik

native talon
#

@sterile tokenso the extension wasn't the issue ?

grim ice
#

it's not a java error

#

bukkit raises it

#

when there are 2 instances extending javaplugin in the heap

native talon
#

as far as I know 2 classes can both inherit from the same parent

sterile token
#

Dor723, we straightlly recommend learning the basics from the laguage before touching the spigot api

native talon
#

I know the basics

sterile token
#

He also said JVM

native talon
#

yea wtf

grim ice
#

you dont know the basics

sterile token
#

Thst have nothing to do with spigot

grim ice
#

im pretty sure you dont

grim ice
sterile token
#

JVM = java virtual machine

grim ice
#

spigot runs on java

#

๐Ÿ’€

native talon
#

I did my intro to compsci on java

tardy delta
#

its implemnted in the api impl, not in the jvm

native talon
#

I'm just rusty on the syntax

grim ice
sterile token
#

And what have to do thst with 2 classes extending the another class

tardy delta
#

nothing

native talon
#

di as in ?

tardy delta
#

are you even listening

#

?di

undone axleBOT
sterile token
#

Okay too much wheel today

#

I will sleep a bit

tardy delta
#

what time is it

sterile token
#

2:15 pm

grim ice
#

veran

#

the jvm has components

#

which include the heap

#

where instances are stored

sterile token
#

I know lmao

spring minnow
#

how do i run spigot 1.16 with java 16?

sterile token
#

But your Where saying that JVM doesnt allow many classes extending java plugin

#

๐Ÿ˜‚

#

You have said it

#

....

grim ice
#

i never said that

#

๐Ÿ’€

#

bro are you on crack

sterile token
#

Oh nice now im the lirr

#

Fantรกstico bro

grim ice
#

๐Ÿ’€

#

wtf

#

bro u need some sleep

#

ur english just died and now ur saying stuff no one said

tardy delta
#

he needs to see his gf /s

native talon
#

why can't I have 2 Javaplugins ?

tardy delta
#

cuz it doesnt make sense codewise

grim ice
#

but anyways

sterile token
grim ice
#

i didnt say that

#

anyways as i was gonna say

#

in spigot

native talon
#

lmao

grim ice
#

only ur main clas

tardy delta
#

only one class is supposed to extends JavaPlugin and that class tells what to do when enabling and disabling

grim ice
#

can extend javaplugin

#

but verano is on cracks it seems

tardy delta
#

two of them wouldnt make sense

grim ice
#

@sterile token literally reply to the msg

#

where i said the jvm stops u

#

๐Ÿ’€

tardy delta
slate delta
#

Hi! I am looking to make a class that will identify other

Let me explain:

We would have a base class call it: Island.java
And some classes that I'm going to register that will be extensions of this one, NetherIsland, PlainIsland and DesertIsland

Then I assign them in my player, but how do I assign this or that quest to some type of island

How can I do all this, someone has a tutorial to guide me?

tardy delta
#

not talking about the context of the pluginclassloader

grim ice
#

i never said the jvm stops it

#

lmfaoo

sterile token
#

You are on crack hex

grim ice
#

do you know english bro?

native talon
#

the agility command previousley worked by the way and it extended the JavaPlugin as well

grim ice
#

did you like

#

ever go to school and learn english

#

๐Ÿ’€

grim ice
#

bro im losing brain cells by the second

#

wtf someone help

native talon
#

Bruh it literally worked until I created another class under the package

tardy delta
sterile token
#

Hex calm down mate

#

Dont be rude

grim ice
#

๐Ÿ’€

native talon
#

Yea, you've just been a dick the whole time

grim ice
#

how am i a dick

tardy delta
native talon
#

telling me learn to java isn't help

grim ice
#

lmao

#

if you want me to spoonfeed you

native talon
#

so I don't remember 100% of Java syntax and intricacy

grim ice
#

then im not doing that

sterile token
#

Dor723 are you Spanish?

native talon
#

I can google myself

#

nein

grim ice
#

then google yourself

#

lmao

native talon
#

Yea, telling me to google isn't help is what I'm saying

grim ice
#

learn java and you wont need to ask those questions

native talon
#

get a phd in compsci and you won't need to ask those quesitons

grim ice
#

they made a whole command to tell people to learn java

native talon
#

what the fuck kind of answer is that

grim ice
#

because of how many people do what u do

native talon
#

Yes, ask a question about something people know and can save trouble

grim ice
#

bro u dont need to go to uni or smth to learn java

#

i dont get what you just said

sterile token
#

Why people is so rude

native talon
#

You know you can know a language and miss 1 aspect of that language that completely breaks your code

slate delta
# tardy delta ur telling that ur quest object has an island field?

In fact I would like to create several islands, which is a subclass of a base class so Island

And with this one we can assign the parameters for each island then, example quests, challenges, objectives, finally everything we put in for example NetherIsland will be only in NetherIsland and if we put for example Break 5 blocks in desert Island, only the one of Desert will be able to do it, unless we put it to 2, 3 or everywhere actually

Except I don't see how to do this

native talon
#

It's not like I came in here "wtf is a class lol"

grim ice
#

if you miss aspects that completely break ur code then u have to ask in a discord server about it for half an hour

#

trust me, you dont know the language

tardy delta
native talon
#

No it's because there's zero help in the server

grim ice
#

lmao

slate delta
#

yeah, each island her own data @tardy delta

native talon
#

This is legit toxic

grim ice
#

but ur generalizing things yk

#

u didnt talk with the whole server

#

u only talked with me

#

so you prob should say that im toxic

native talon
#

splitting hairs

grim ice
#

not the entire server ig

tardy delta
grim ice
#

lol

#

anyways what are we even arguing about

tardy delta
#

wondering the same thing ๐Ÿค”

native talon
#

Nothing bro, go say again that two child classes can extend a parent

#

in the jvm

grim ice
#

yes they do

native talon
#

and I need to learn java

#

lmaao

grim ice
#

and yes you do

#

lol

#

i dont see what's wrong with what i said

native talon
#

aight bro, pretty sure inheritance is a basic java concept

sterile token
#

Dor723 also didnt he said it?

sterile token
#

I have sent a screnshoot tho

grim ice
#

pls dont argue in english

native talon
#

yea

tardy delta
#

๐Ÿ™‚

grim ice
#

since what i said could be easily comprehended if you know 6th grade english

native talon
#

seems like 2 hex confused the fact that one class can't inherit from two parents

sterile token
#

@grim ice thread the photo man

grim ice
#

if you learnt english that is

#

๐Ÿคฆ๐Ÿป

native talon
#

English is my second language and I speak it fluently

grim ice
#

im not telling u to be fluent or whatever

native talon
#

if both of us thought you said what you said

grim ice
#

just basic 6th grade english

native talon
#

youre bad at communicating

slate delta
grim ice
#

and your english is pretty bad

#

imma be honest

native talon
#

Aight

grim ice
#

i can get a few dozen mistakes

native talon
#

Got my max points on it on my SAT

glossy venture
#

bro you mistyped the second assume and extends should be extend
tf are you talking about with your 6th grade english

grim ice
#

bro ๐Ÿ’€

grim ice
#

i noticed that

glossy venture
#

k