#help-development

1 messages · Page 1587 of 1

paper viper
#

No

grim ice
#

Yes but

paper viper
#

no

#

No

grim ice
#

will my code now

paper viper
#

Please DONT do that

grim ice
#

stop the player from stealing stuff from the gui

vital ridge
#

Why not lol

#

whats wrong with that

paper viper
#

Do NOT compare inventory titles

#

If another plugin has the same title

#

It will fuck up

vital ridge
#

In that case yes

vital ridge
#

Okay basically

#

whatever you do

paper viper
#

Instead

#

Compare InventoryView

vital ridge
#

inventory#getView is the same as title?

paper viper
#

#

No

vital ridge
#

Its the text above GUI

grim ice
#

can you guys please answer my question instead of this

#

..

paper viper
grim ice
#

I already made a check

vital ridge
#
if (e.getClickedInventory().contains(Go)) {
                if (e.getSlot() == 7) {
#

well xd

grim ice
#

I know i can use

vital ridge
#

Currently you trynna check if the inv contains a certain item

#

right?

grim ice
#

yes

vital ridge
#

And if the items slot is 7

grim ice
#

yes

#

i can use currentItem i think

#

but whatever

vital ridge
#

1 sec

#

let me go to my IDE

#

Okay basically

unkempt ore
#

Pulse, do you know how I could do what I'm trying to do?

vital ridge
#

Check if an item at a certain slot is not null, then if the item at a certain slot is a certain item, then if the itemmeta is not null and if the itemmeta is equal to a certain items itemmeta

#

Theres problaly many different ways to do this

#

but you can try this one

unkempt ore
#

All I need is to read the tags

eternal oxide
#

isSimilar compares itemMeta

vital ridge
#

Okay yea then use isSimilar.

grim ice
#

@vital ridge that is not what i wanted

#

lol

#

what i asked for is

#

how do i stop players from dragging the gui items into their inventory without preventing clicking

eternal oxide
#

Use your known item item.isSimilar(slotItemStack)

vital ridge
#

Why wouldnt you want to prevent clicking?

#

You can still apply certain tasks if you click something even if clicking event is cancelled

eternal oxide
#

@grim ice you need to compare your Inventory view, if its your UI you cancel the event no mater what type it is.

quaint mantle
#

is there sound call event?

quaint mantle
#

or any alternative

grim ice
#

so my stuff still work if i do event.setCancelled

vital ridge
#

Yea

grim ice
#

like the stuff before it will still happen

#

alr ty

vital ridge
#

I mean

#

Look

#

If you want the player to not move stuff around in GUI

#

Cancel the event after MAKING SURE that the GUI player is clicking is YOUR PLUGIN'S GUI.

#

And then just create code which can apply tasks if a certain item is clicked

grim ice
#

ok

torn shuttle
#

?paste

undone axleBOT
torn shuttle
grim ice
#

@vital ridge

#

sorry for the late response

#

but

#

if (e.getClickedInventory().contains(Spawner)) {
if (e.getSlot() == 2) {
if (e.getWhoClicked().getInventory().contains(new ItemStack((Material.AIR)), 1)) {
e.setCancelled(true);
if (e.getWhoClicked().getInventory().contains(new ItemStack(Material.DIAMOND, 8))) {
if (e.getWhoClicked().getInventory().contains(new ItemStack(Material.ZOMBIE_HEAD, 1))) {
e.getWhoClicked().getInventory().removeItem(new ItemStack(Material.DIAMOND, 8));
e.getWhoClicked().getInventory().removeItem(new ItemStack(Material.ZOMBIE_HEAD, 1));
e.getWhoClicked().getInventory().addItem(new ItemStack(Material.ZOMBIE_SPAWN_EGG));
e.getWhoClicked().closeInventory();

                        }
                    }
                }
            }
        }
#

like this will it work

vital ridge
#

Try it and see 😄

#

If it wont work ping me again and lets see wassup 😄

manic crater
#

hey so i have a question
im coding a plugin to detect if the user has citizens installed, and for some reason that wont work, but yet when i use another plugin it will work,
i dont understand the logic, soo kind of wondering what is citizens really named.

waxen barn
#

bump

quaint mantle
#

all client-side = client-side

#

and no more

opal juniper
quaint mantle
#

how to get sound name from protocollib?
What i have now:

        manager.addPacketListener(
                new PacketAdapter(Main.getInstance(), ListenerPriority.NORMAL, PacketType.Play.Server.NAMED_SOUND_EFFECT) {
                    @Override
                    public void onPacketSending(PacketEvent event) {
                        Bukkit.getLogger().info("Sound: " + event.getPacket().getStrings());
                        // Sound: StructureModifier[fieldType=class java.lang.String, data=[]]
                    }
                }
        );
opal juniper
#

You need to extend an entity

#

If not the client will be like wtf and have a hissy fit

manic crater
#

Ngl kind of wondering why Arcade works fine and ive tried Citizens , citizens , citizens2 , Citizens2 , CitizensNPC , CitizensNPCS etc and it wont work but yet Arcade does??? I dont understand what im doing wrong here tbh

undone axleBOT
quaint mantle
#

wtf dude

manic crater
quaint mantle
#

big codes is so big

#

delete this shit and load it in paste

manic crater
#

im working on it chillaxe bro

manic crater
#

arcade works fine,

#

its just the citizens that doesnt for some stupid reason

unkempt ore
#

In a PlayerEggThrowEvent, how could I get the metadata of the egg item that was thrown

eternal oxide
#

?jd spigot

quaint mantle
unkempt ore
#

Um. Look, I already searched for how to do it. And I couldn't find it so that's why I'm here

quaint mantle
unkempt ore
#

The event only gives me the Egg Entity. Shouldn't that be different from the actual egg ItemStack?

manic crater
unkempt ore
#

Okay, fine, I'll check again

manic crater
#
  • on the github it says Citizens2 and stuff,
#

i tried both names for it, and it doesnt wanna detect it,

quaint mantle
#

and all

quaint mantle
unkempt ore
#

Oh okay, that makes sense

manic crater
#

i did that already,

unkempt ore
#

Ohhh, it's a ThrowableProjectile

#

I'm dumb

unkempt ore
eternal oxide
#

If you have not changed its appearance, getItem

opal juniper
#

Sorry, was thinking of sommin else

earnest lark
#

player.teleport(new Location(Bukkit.getWorld("flatworld")),0,0,0); i get the error cannot resolve constructer help

quaint mantle
#

Hello,

I would like to make a block unbreakable (like bedrock) so that you don't even get the block breaking animations. How could I do so?

eternal oxide
#

new Location(Bukkit.getWorld("flatworld"),0,0,0));

earnest lark
#

oh yea

#

wow

#

i am big dumb

earnest lark
cloud berry
cloud berry
#

(taht code checks all chunks in 1 region, plugin checks all regions taht have .mca files)

quaint mantle
#

I think this is a client side issue

#

I am trying to change the hardness of a block, it works fine for blocks like bedrocks

grim ice
#

@vital ridge It didn't work

#

and there's no error

quaint mantle
#

but when I try to do the same for blocks with a normal hardness it doesn't

#

unless the hardness I set is lower than the actual hardness of the block

#

may be I should use mining fatigue?

quaint mantle
grim ice
#

sorry for the spammy text, but any ideas

quaint mantle
#

?paste

undone axleBOT
grim ice
#

oo

undone axleBOT
grim ice
#

ok

cloud berry
#

🤣

grim ice
#

um

vivid temple
#

how can i apply a custom texture to my custom creature?

grim ice
#

why?

quaint mantle
vivid temple
quaint mantle
high pewter
#

Is there a catch-all event to prevent any block updates in a region (like to preserve it)? I tried BlockEvent but I get this error https://paste.helpch.at/erotipatax (I assume BlockEvent itself isn't an event you can listen to, it just provides methods of other events)

quaint mantle
grim ice
#

if (player.getInventory().getItemInMainHand().isSimilar(Star)) {

#

I did

eternal oxide
#

getClickedItem

quaint mantle
#

do not use it

#

use clicked item

grim ice
eternal oxide
#

better to star.isSimilar(event.getClickedItem())

high pewter
#

I'll try it

eternal oxide
#

using star.isSimilar you will avoid any null checks

quaint mantle
grim ice
#

if(Star.isSimilar(event.getClickedItem())){

#

like this?

quaint mantle
#

read java docs.

#

not spigot docs, simply java docs

quaint mantle
grim ice
#

Cannot resolve method 'getClickedItem' in 'PlayerInteractEvent'

ivory sleet
#

getItem

eternal oxide
#

whichever the method is use it

#

interact event? I thought you were in an inventory

manic crater
#

i fixed my issue.

grim ice
#

its right clicking an item....

eternal oxide
#

So not in an inventory

grim ice
#

yes not in inventory

eternal oxide
#

um, how are you using a Nether Star in the world?

#

Do you mean you are holding a Nether Star and you are right clicking?

eternal oxide
#

in that case, yes check the held item

#

Star.isSimilar

grim ice
#

ok

lyric grove
#

Hi, im trying to get a location

#

Im sure this should work

#

yes i did

#

oh thanks lol

unkempt ore
#

I'm trying to get into using the persistent data holder of an ItemStack's meta. I did it for an egg item stack. I give myself an egg and set some persistent data values, but in the egg throw event, I get the egg's item stack, and it seems the properties I set aren't there

#

It's like I'm not getting the same ItemStack

granite stirrup
#

pretty sure if you throw a egg it turns into a entity and looses all its properties

unkempt ore
#

Well, the egg item stack and the egg entity are different things, yes

#

However, Egg is a ThrowableProjectile which has getItem()

granite stirrup
#

¯_(ツ)_/¯

eternal oxide
#

It returns the generic item

unkempt ore
#

Ughhhh, that is annoying

#

How should I do what I'm trying to do

eternal oxide
#

in the throw event copy over teh PDC data to the entity

unkempt ore
#

I'm only given the entity in the event

eternal oxide
#

yes

#

it has a PDC

unkempt ore
#

Okay, something isn't clear. Copy what PDC data into what other PDC

eternal oxide
#

I see what you mean. See if the Player still has teh egg in his hand in the event

unkempt ore
#

Good idea

#

That should work

granite stirrup
#

but doesnt it call that event as soon as its thrown?

slow oyster
#

Man, I really want to include Spring Boot into my plugin for easy Hibernate/JPA support and also to add a REST API too, but I'm not sure I can justify 60MB of dependencies being shaded into the plugin jar

unkempt ore
#

So it's possible the player's item will remain?

#

I will check

eternal oxide
unkempt ore
#

It isn't cancellable?

eternal oxide
#

Not all events are

unkempt ore
#

Interesting

#

Alright, getting the Player's active item

unkempt ore
#

If it's not a public plugin

#

I don't remember how exactly I did this. But I modified the MANIFEST.MF file to search for the shaded dependencies in a relative path

#

And then I kept those dependency files on the deployment machine

slow oyster
#

It is public unfortunately, I wanted to use Spigots new Library Loader feature but I need to support pre 1.16

unkempt ore
#

Aww

slow oyster
#

I'm not sure how my users would react to the plugin jar going from 500KB to 60,000KB +

#

Part of me is just like fuck it 😄 😄

quaint mantle
#

what is charged creeper enum called?

static whale
#

you will use Creeper#getPowered()

quaint mantle
#

Thanks

static whale
quaint mantle
#

How can i set the type in citizens plugin?

grim ice
#

can anyone help me test my plugin please? for some reasons i cant use my server

grim ice
#

u can decompile it or smth

#

its not a virus or smth

#

idk use a virus detecter or smth

unkempt ore
#

sus or smth

quiet ice
#

yea sure, just give it to me

#

I may never respond, but let's gloss over this fact

slow oyster
quiet ice
#

Error: too much info, cannot fix

opal juniper
quiet ice
#

(Try providing less info)

patent horizon
#

im guessing that's sarcastic

quiet ice
#

of course it is!

patent horizon
#

it's supposed to message me a value from a mongodb document

quiet ice
#

"Error" in the java world can mean vastly different things

#

Usually I consider it as a stacktrace, but given that there is no stacktrace there is nothing to fix

#

so in a sense I wasn't joking, that little word will result in me not looking any deeper

#

Stacktrace or bust

opal juniper
#

I can’t find it on his repo anymore

#

Or I’m just blind

quiet ice
#

Didn't he complain about it not being possible anymore due to Classloader changes

opal juniper
#

What

#

Yeah

#

But he wants it for legacy support

quiet ice
#

Yeah, I guess you could do both - the new library way and messing with the classloader as a fallback solution

opal juniper
#

Yep

#

That was my idea anyways

#

@eternal oxide sorry for the ping but do you still have that library loading code lying around for James? He needs support for legacy lib loading

opal juniper
#

Thanks

#

@slow oyster there is the code you need

slow oyster
#

Wait so what are the location and filename parameters?

#

does it use Maven artifacts?

opal juniper
#

Location is a web address afaik and file name is the output file

opal juniper
opal juniper
#

Yep

#

So those jars have been hosted by them, but if you can find a GitHub releases or something afaik that should work

slow oyster
#

Okay cool, suppose I can substitute in maven urls to the jars instead!

#

Sweet thanks!

quiet ice
#

maven central is not keen on you installing stuff at runtime fyi

paper viper
#

But it doesn’t use reflection, it uses agents

#

In my case, I just used slimjar (library) which assists me and does all the complex shit

opal juniper
paper viper
#

Why -1 * x

#

Lol

#

Just do -x

sharp bough
#

im working with something very similar, could you share the final proyect once you are done?

sharp bough
#

is this even worth implementing?

ivory sleet
#

Context?

quaint mantle
#

Gonna start working on a licensing plugin, where the developer of the spigot plugin uses the licensing plugin's developer api.

However my idea is to download the pl from a cdn, where a auth header is parsed, and delete the pl file before shutdown.

Not sure if its a good idea.

lost matrix
sharp bough
#

well no

#

i wasnt thinking about that

lost matrix
sharp bough
#

more of event handeling in general

lost matrix
sharp bough
#

replace general events with that

#

entierly

#

but i think i missunderstood what thats focused on

#

its for custom events

#

not evnets in general

lost matrix
#

What? Do you want to fork spigot and scrap the whole event API?

sharp bough
#

but no

quaint mantle
#

Also, is it a good idea to have over 10k endpoint to prevent blocking?

hexed hatch
#

Are you asking if writing custom events that make use of other events to call them is a good idea?

quaint mantle
#

Like a shit ton of free domains with cloud flare.

lost matrix
# sharp bough but no

This site just explains how to use spigots event API and how to do custom events.
Custom events are generally only useful if you provide an API to other devs. Internally you
can just use your own registration system using functional interfaces or callbacks for example.

sharp bough
#

aah

#

i see

quaint mantle
lost matrix
quaint mantle
#

Ah.

opal juniper
quaint mantle
#

Well, as said, If I can somehow make it validate the encrypted file, and update the algorithm every update, I shouldn't have any issues.

main dew
#

how can i check RAM usage for individual plugins?

lost matrix
opal juniper
opal juniper
lost matrix
opal juniper
main dew
lost matrix
waxen barn
#

is there some way how to convert old nms names to mojang mapped names

#

?

#

because I still cant find come classes

opal juniper
#

Or have I mis understood

waxen barn
#

but I am asking how can i find the new name of nms some class

opal juniper
#

Oh

lost matrix
main dew
lost matrix
#

But your host might block starting new jvm instances from within a running one

main dew
quaint mantle
#

This also means keeping track of AUTH key versions.

CURRENT AUTH key version 1
LATEST AUTH key version 2
TOLLERANCE gap = 1
If (Math.abs(Number(lauth[0] - toll)).equals(auth[0]) || lauth[0].equals(auth[0])){

/*
2-1 === 1 ?? TRUE
1   ===   1 ?? TRUE
*/
}else{
//Disable plugin.
}

Sorry for the bad quality, I'm on my phone.
And my hands hurt.

waxen barn
#

btw, from what is in the update log, I can use mapping-mojang only for development but i must convert it to mapping-obf for publishing, but do I need to do this also for private plugin, that will be used only on my server?

lost matrix
#

So reobf is theoretically only needed for public plugins.

waxen barn
quaint mantle
#

As said, I will have a algorithm, that I will update every ver, to prevent further piracy.
And it will work when someone purchases, with automatic validation.

#

Its 00:04 and I'm literally thinking of authentication for a spigot plugin.

lost matrix
# waxen barn and when I am using paper, if there mapped jar?

Im still trying to figure out how to properly use nms with paper. I would just wait a bit for that.
Generally using nms with spigot/paper shouldnt break the other one. But then again: nms is not part of the API and there is no guarantee that anything is cross compatible there.

ivory sleet
#

I believe they got paperweight which is suppose to help with that, if I’m not wrong

waxen barn
#

and even now i have to rewrite 2 days of coding with the old nms

quaint mantle
regal cedar
#

How to I make the {if} at line 16 can be able to execute the item type of the picked up item?

drowsy helm
#

um

#

what are you trying to check?

lost matrix
#

Ich you just want to check the Material that is

drowsy helm
#
  1. the method shouldnt be static
  2. the method sohuld be void and not return anything
regal cedar
#

As I am extremely new to this java script world

drowsy helm
#

you want to remove that static notation in the method

unkempt ore
#

@eternal oxide By the way, checking the player's active item did not work

drowsy helm
#
public void pickup(EntityPickupItemEvent event){
    //do stuff
}```
unkempt ore
#

Lmao

drowsy helm
#

pog

waxen barn
#

Does anyone know what is equivalent of WorldServer in 1.17.1 nms

muted idol
#

hey there how would i go about appending an object in an arraylist?

unkempt ore
#

.....

#

.add

eternal oxide
muted idol
#

thing is that im using json so when the server reloads the arraylist gets cleared and then the objects that are already saved to JSON get updated not added

#

@unkempt ore ^^

unkempt ore
#

You'll have to do this persistently then

#

Let me read this again, wait

#

What are those objects?

muted idol
unkempt ore
#

Alright

drowsy helm
#

not necessary man

#

hes learning

unkempt ore
#

In a way I respect that he had the guts to post that

clear galleon
granite stirrup
#

Like wtf is that code even ..

#

Doesn't even look like java..

unkempt ore
#
java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.meta.ItemMeta.getPersistentDataContainer()" because the return value of "org.bukkit.inventory.ItemStack.getItemMeta()" is null
#

That's...weird. The docs don't say getItemMeta is nullable

lost matrix
#

ItemMeta is null if the ItemStack is of type Air

#

The main hand of a player is never null but Air if empty

unkempt ore
#

Aside from the fact that that should be documented in getItemMeta(), there is no way my ItemStack can be air right now

#

Unless I'm not understanding this

#

I'm in a ProjectileLaunchEvent, and I'm getting the active item of the player launcher

lost matrix
lost matrix
unkempt ore
#

Ah, well. I am throwing it and this happens

#

By the way I've resorted to this because the item is supposed to be an egg, and PlayerEggThrowEvent seems to be doing the same thing

unkempt ore
#
if (event.getEntity() instanceof Egg egg
        && egg.getShooter() instanceof Player player)
{
    var eggItem = player.getActiveItem();
    var pdc = eggItem.getItemMeta().getPersistentDataContainer();

    Bukkit.broadcastMessage(eggItem.getType().toString());
    Bukkit.broadcastMessage(pdc.get(bridgeKey, INTEGER).toString());
    Bukkit.broadcastMessage(pdc.get(distanceKey, INTEGER).toString());
    Bukkit.broadcastMessage(pdc.get(blockKey, STRING));

    var isBridgeEgg = eggItem.getItemMeta()
                             .getPersistentDataContainer()
                             .has(bridgeKey, INTEGER);

    if (isBridgeEgg)
        onBridgeEggThrow(event);
}
#

All those broadcasts are for testing

#

So, the ItemStack is removed from the player's inventory when it's thrown, but a reference to it is still bound to the ThrowableProjectile right?

lost matrix
#

Im currently thinking about if the ProjectileLaunchEvent is fired before or after the ItemStack is removed.

unkempt ore
#

That would make the difference

lost matrix
#

But probably before its removed.

unkempt ore
#

However, I was using PlayerEggThrowEvent, and getting the Egg's ItemStack

#

And this same thing occurred

#

I only attempted getting the player's held item as a fallback from that not working

eternal oxide
#

The egg throw is fired after the ItemStack is reduced (as its not cancelable). Projectile launch is before as it can be canceled

lost matrix
#

Have you checked if the ItemStack returned by Egg#getItem() contains the PDC data?

unkempt ore
#

Yes, that is exactly what failed

#

In the same way

#

Though, to sanity check, let me do it again

lost matrix
#

Ah i see. I remember having the same problem when i was writing a custom item lib and snowballs.
The ItemMeta doesnt get transferred. Have you tried.

unkempt ore
#

Ah, alright alright, it was different this time

#
java.lang.NullPointerException: Cannot invoke "java.lang.Integer.toString()" because the return value of "org.bukkit.persistence.PersistentDataContainer.get(org.bukkit.NamespacedKey, org.bukkit.persistence.PersistentDataType)" is null
eternal oxide
#

You should be able to get the ItemStack in hand during the ProjectileLaunchEvent

unkempt ore
#

This time I'm in an egg throw event, and got the egg's item meta

#

The first print worked. "EGG" was printed

#

Though it seems the persistent data which I had set to the ItemStack when I gave it to myself is not there

#

Hence that error above. How annoying

#
var itemStack = new ItemStack(EGG, (int) args[0]);

pdc.set(BRIDGE, INTEGER, 1);
pdc.set(DISTANCE, INTEGER, (int) args[1]);
pdc.set(BLOCK, STRING, ((BlockData) args[2]).getAsString());

player.getInventory()
      .addItem(itemStack);

I do this when I give myself the egg I'm throwing

#

And I guarantee the namespacedkeys are the same references, as I'm passing them to the listening class

#

I just don't get it

unkempt ore
eternal oxide
#

there is no "active Item" in Spigot so I guess you are not using spigot

unkempt ore
#

Though I will try for the sake of it

drowsy helm
#

what do you mean by active item

#

as in item in hand?

unkempt ore
#

Oh I am using Paper. Sorry. Let me try the held item then

#

I usually use Spigot, but I was trying Paper this time

#

The same thing as above happened @eternal oxide

#

It seems the item stacks are different. The type is an egg, sure, but it's not the same instance I set the meta for, somehow

eternal oxide
#

That sounds very odd. You sure you are setting the meta correctly?

unkempt ore
#

You tell me. It looks completely fine

eternal oxide
#

you didn;t set the meta back on the item

unkempt ore
#

Hm?

eternal oxide
#

when you get the meta it gets a clone

unkempt ore
#

Why

#

What is this

eternal oxide
#

its just a thing with ItemMeta

unkempt ore
#

I'm so mad

#

I'm so mad dude

eternal oxide
#

do item.setMeta once you are done and it should work

unkempt ore
#

Yeah

#

Is the copy for defense or something

#

Why would they do that

#

What sucks is that I knew this, too

#

I remember knowing that was a thing before

#

It works @eternal oxide . Thank you very much

#

What a silly mistake

eternal oxide
#

We all make them

shut field
#

so I am trying to save to a yml file with a class var but I am getting a constructor exception?

unkempt ore
#

Hmmmm

#

Does it have a default constructor

shut field
#

(I can send you whole class if you need)

unkempt ore
#

Default would have no params. Though actually I'm not quite sure how it is that the config API serializes and deserializes Class types

shut field
unkempt ore
#

Hmmm, that must be why

#

Since ConstructorException is a reflective thing, it's trying to find a way to build your class

#

But it can't

shut field
#

so what should happen in the one with no parameters?

eternal oxide
#

ConfigurationSerializable uses a Constructor that takes a Map. the Javadocs has all you need to correctly implement it

unkempt ore
#

That's cool

#

That is actually quite cool

shut field
unkempt ore
#

So yeah make sure your class implements this

eternal oxide
#

?jd

shut field
#

oh so yeah, the Spigot one

#

I already use the Spigot javadocs all the time

shut field
unkempt ore
#

No, no, this is a change of plans now

#

You have to implement ConfigurationSerializable with a constructor that takes a Map

#

And then use said Map to build your class from there

eternal oxide
quaint mantle
#

should i use "Main" as my main class name

#

or no

eternal oxide
#

you register it then you can simply get and set in teh config and it will serialize/deserialize it for you

unkempt ore
#

Hmmmm, no, I wouldn't do that @quaint mantle

quaint mantle
unkempt ore
#

Call the main class what the plugin is called

quaint mantle
#

alright

unkempt ore
#

The only class that deserves the name Main is the main class

#

Which is deep in Minecraft

eternal oxide
#

and that belongs to Spigot

#

as plugins are loaded by spigot

quaint mantle
#

ahhh

#

i c

untold rover
#

whats the best way to take a string like this "100h24m" and parse it to » 100 hours and 24 minutes, get that as a Date or something and convert it to millis?

unkempt ore
#

Does it have to be that specific format?

shut field
untold rover
shut field
#

when I try to run that nothing comes up

unkempt ore
#

I’d guess

#

(Your class name).class

eternal oxide
#

Class would be your class

#

yep

shut field
unkempt ore
#

Unless that’s not what you mean

eternal oxide
#

?paste

undone axleBOT
unkempt ore
#

I knew a regex would apply

#

gg

shut field
# unkempt ore _ _

well... ConfigurationSerializable does not show to have any static functions for me

unkempt ore
#

Alright, look

#

What is the name of the class you want to make a serializable

unkempt ore
#

Also, it's ConfigurationSerialization, with the statics

eternal oxide
untold rover
#

replacing the return TimeUnit.MILLISECONDS.toMinutes(instant.toEpochMilli()); to return instant.toEpochMilli() would return it in milliseconds right?

#

will that include the normal unix current millis?

shut field
unkempt ore
#

The epoch milli is the unix milli, johni

#

It doesn't convert it

eternal oxide
untold rover
#

oof, how can I get the millisecond of the result without epoch?

shut field
unkempt ore
#

An Instant is essentially a parsed unix milli

shut field
#

nothing pops up

unkempt ore
#

Lemme see though

unkempt ore
unkempt ore
#

Do you want milliseconds to be included in your parsing though?

#

Or just down to seconds?

untold rover
unkempt ore
#

Well dang, not gonna ask lmao

#

Hmmm, you'll need a more granular regex to include a token for millis then

untold rover
#

no no wait

unkempt ore
#

Unless I'm not quite getting what you're say-

#

Yeahh

#

You want to parse to epoch millis huh

untold rover
#

I need to parse hours, minutes and days count them and calculate them and then convert that value to milliseconds

shut field
unkempt ore
#

Ohhhhh okay

untold rover
#

aka 100h = 100 hours = 3,6e+8

unkempt ore
#

I mean, then it should just be a small modification to that paste like you were saying

#

Hmmm

untold rover
#

well if I knew what todo I wouldnt xD

#

but the epoch will not work with our bansystem

#

as it uses millis

unkempt ore
#

Right, I get that

#

But it seems what the code is doing is just taking the epoch time, which is 0, and adding the intervals

#

And then getting the epoch time of the finished instant, which, since it based on 0, will just be the sum of the intervals

#

So I believe you just want to cut TimeUnit.MILLISECONDS.toMinutes off

#

And just return instant.toEpochMilli() @untold rover

eternal oxide
#

That code I showed you I use that to set future schedules

untold rover
#

got it I will try that

unkempt ore
#

But like, this is kinda...weird

eternal oxide
#

I do java try { period = Tasks.parsePeriod(split[1]); } catch (Exception e) { period = 0L; } timed = Instant.now().plus(period, ChronoUnit.MINUTES);

unkempt ore
#

If you want to deserialize this at the place you want to use it, you'll have to get the instant from the milli, and then get it's fields

eternal oxide
#

that gives me a future time

#

and I can check if Expired by return Instant.now().isAfter(Instant.ofEpochSecond(timed));

unkempt ore
#

To do that though I'm sure you could convert it to one of the several datetime objects

#

God, Java time API is a mess

silk mirage
#

.

unkempt ore
#

.?

#

How would get the events of a projectile entity's movement?

#

I'm not seeing an EntityMoveEvent here

eternal oxide
#

you would need to schedule a timer

unkempt ore
#

Good idea

real spear
#

I want to get into anticheat plugin development. Any idea as to where to start? (srry if this is the wrong place to ask...)

unkempt ore
#

Ambitious today, are we

#

Good luck

real spear
unkempt ore
#

Start with something simple

#

Perhaps

#

The less subtle cheats. Bhopping or something. Detect uncanny movement patterns

#

And if you detect them, cancel their movement events

real spear
unkempt ore
#

Problem with that is fault tolerance regarding lag however

#

If you detected bhopping through quick movements, your genuinely laggy players would get teleported back very very often

quaint mantle
#

how do the permissions in plugin.yml work

real spear
quaint mantle
#

but the permissions section is super weird?

#

if i set a permission to be default: false, a command with the specified permission just wont appear in tab completion

#

but i dont want everyone to have the permission?

#

like how should i

#

its just not working??? or what?

real spear
#

idk what you mean by that... can you send your permissions.yml and plugin.yml here (sensor any data you don't want shared) and tell me what you want it to do

quaint mantle
#
name: Nectar
main: com.ankledev.nectar.main.Nectar
version: 0
api-version: 1.17

permissions:
  nectar.regular:
    default: true
  nectar.vip:
    default: false
  nectar.staff:
    default: false
  nectar.helper:
    default: false
  nectar.moderator:
    default: false
  nectar.admin:
    default: false

commands:
  discord:
    permission: nectar.regular
  spawn:
    permission: nectar.regular
  say:
    permission: nectar.staff
  warn:
    permission: nectar.staff
  kick:
    permission: nectar.staff
  mute:
    permission: nectar.staff
  ban:
    permission: nectar.staff
  vanish:
    aliases: [v]
    permission: nectar.staff
  mtp:
    aliases: [modtp]
    permission: nectar.staff
  s:
    aliases: [staffchat]
    permission: nectar.staff
  who:
    aliases: [whois]
    permission: nectar.staff
  setrank:
    permission: nectar.moderator
  toggledev:
    permission: nectar.admin
#

theres my plugin.yml

#

and im not using a perms plugin... but the plugin i have "Nectar" does manage the permissions

real spear
quaint mantle
#

and if you're wondering they are getting the perms, i debugged a few days ago just to make sure and the permissions all sent to console after the user joined

real spear
quaint mantle
#

nope, i did when i didnt specify default

#

but i didnt after i fixed it

quaint mantle
#

if any

topaz cape
#

Moved.

quaint mantle
#

we serve food here sir

topaz cape
quaint mantle
#

as it doesnt have to do with plugin development

topaz cape
#

I just didn't get the food part lmao

quaint mantle
#

¯_(ツ)_/¯

unkempt ore
#

How would I make an Egg entity unhatchable

#

Make sure no chicken comes out

#

Ugh what, I missed setHatching

waxen plinth
#

Did spigot 1.17 change it so Block#getLocation returns the center of the block rather than the corner?

#

Someone told me it did and I really hope that's not true because that's really annoying for backwards compatibility

waxen plinth
#

There may be a SpawnCause for the egg spawning a chicken

#

SpawnReason.EGG

stone sinew
waxen plinth
#

Yeah it turns out I was lied to

#

I know how to get the corner but the inconsistency between versions would be annoying

patent horizon
#

can I ask a question about mongodb here?

waxen plinth
#

I would have to go back and make it floor all the coordinates

sharp bough
undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.

unkempt ore
#

I try to set the BlockData of an air block, but it seems to not actually replace the air with the block

#

It's only doing it in solid blocks

#

Weird

#

What should I do here

unkempt ore
#

Code really won't help you

#
loc.getBlock()
   .setBlockData(blockData);
#

It's just what I described

patent horizon
#

so I have this collection of documents for every different minigame my sever has which stores information about the display and teams and such. (im using mongodb btw)
how would I grab the Display:"string" value from every document inside the collection?

stone sinew
unkempt ore
#

Thank you

stone sinew
#

Also how are you getting BlockData?

unkempt ore
#

Parsed

#

Somewhere else

#

What's the difference between Block#setBlockData and BlockState#setBlockData

stone sinew
#

One is modifying the state the other is modifying the block... I assume lol

unkempt ore
#

Weird that they both take BlockData though

#

it's a tad misleading

stone sinew
#

Well I mean BlockState is an extension of Block so...

#

Its takes the methods from it.

unkempt ore
#

Ah, is it. Makes sense

unkempt ore
#

And doing update on the block state didn't work

glossy dirge
#

hello

#

i try to make if its true the program will run, if its not the program will return

#

but i didnt get any response

#

no error at all

unkempt ore
#

I smell MCDC integration

glossy dirge
unkempt ore
#

Minecraft + Discord

glossy dirge
#

yes

unkempt ore
#

I see you're trying to...interconnect announcements

glossy dirge
#

what do you mean ?

unkempt ore
#

Is that it? It looks like a cross-chat bot

glossy dirge
#

yes

unkempt ore
#

Made one of these years ago. Good times

#

What exactly is the issue?

glossy dirge
#

the issue is

#

i didnt get the message

#

its should send the message to server when someone announce on discord

unkempt ore
#

I don't see you actually instantiating JDA anywhere though?

#

Look, you're extending ListenerAdapter but that doesn't just register you with JDA

glossy dirge
#

i register events from my Main file

unkempt ore
#

The...Main...file?

glossy dirge
#

yes

unkempt ore
#

This isn't the Main then? I see

#

Show me the events being registered please

#

I want to see how you build your JDA

glossy dirge
#
    public void startBot() {
        try {
            jda = JDABuilder.createDefault(getToken()).build();
        } catch (LoginException e) {
            e.printStackTrace();
        }
    }

    public void addListeners() {
//        jda.addEventListener(new Global(this));
        jda.addEventListener(new Towny(this));
//        jda.addEventListener(new SkyBlock(this));
//        jda.addEventListener(new Survival(this));
//        jda.addEventListener(new JDAUtil(this));
    }
unkempt ore
#

Okay, yeah, no

#

This won't do

#

You're passing the event listener class, that is fine. However you're missing the GUILD_MESSAGES gateway intent

#

Also, use createLight please, not createDefault

glossy dirge
#

okay

#

then

#

on my global class, work fines

unkempt ore
#

What do you mean on your global class

glossy dirge
#

i have another class

#

same like i sent to you

#

but its working fines

unkempt ore
#

The Towny class? I don't really understand

glossy dirge
#

no

#

the global class

#

wait

unkempt ore
#

"Global class" doesn't mean anything

glossy dirge
unkempt ore
#

It's literally called Global lmao

#

I see

#

Hmmmm, you should refactor that

glossy dirge
#

refactor ?

unkempt ore
#

Refactor is to clean, to separate repeated logic and parameterize it

#

Optimize

glossy dirge
#

uhh i dont understand, can you show me an example ?

unkempt ore
#

No, I can't right now

#

But you see in your Global class

#

You're repeating things three times over and over

glossy dirge
#

oh yeah

unkempt ore
#

For announcements changelog and events

#

You could separate these things into functions and make your code much clearer

glossy dirge
#

ah thats what function for

#

xD

unkempt ore
#

Yeah...

glossy dirge
#

aight

unkempt ore
#

Also do not call your plugin class Main

glossy dirge
#

in the Main class

unkempt ore
#

I'm telling you to change the name

#

Don't make it Main

glossy dirge
#

oh

unkempt ore
#

It's a plugin, not an application

glossy dirge
#

xD

unkempt ore
#

Can't believe I just helped someone with JDA in the Spigot server

glossy dirge
#

hahaha

quaint mantle
#

Hello. My plugin.yml file doesn't seem to be working properly. All of my commands work, but as soon as I add permissions, it doesn't autofill on client side (where you can press tab to complete the command). Command still works tho.

unkempt ore
#

Take this to JDA next time

#

We'll be more on topic there

glossy dirge
#

okay

vestal dome
#

So I'm trying to find a way to do this using code, the brick is what a player places on the ground, and the wool is what the code places after he places the block, but I don't know really how to do this specially because of "orientations", so does anyone have an idea on how to do so? Thanks....

vestal dome
#

ded chat

unkempt ore
#

It's kinda midnight dude

#

Lmao

broken hare
#

Hi umm, I am trying to show the client world generating/loading screen that is shown to the client when you join a server, some told this was a client thing and not controlled by the server. I found this, but my editor can't seem to pickup the types

#

Even in the javadoc online it says it can't find it, maybe it doesn't exist anymore

quaint mantle
#

are you using mojang names?

broken hare
#

How can I do this?

quaint mantle
#

i'd hope you would know

broken hare
#

Not really

quaint mantle
#

well PacketPlayOut isn't mojang names so that might be why you can't find them

broken hare
#

Hmm but this was on a spigot forum surely they would be using the bukkit/spigot API?

#

Maybe it is not possible on server side?

quaint mantle
#

Yes

#

but you don't give the version nor can say if you're using mojang mappings

broken hare
#

1.15.2

#

So is it possible or not?

#

Ill do some more research

#

My IDE doesn't even know what CraftPlayer is?

#

Do I have to use a jar with craftbukkit or something

vague mason
#

Yes

#

CraftPlayer doesn't exists in Spigot API.

broken hare
#

What about the Bukkit API

vague mason
#

There isn't that there too.

#

You need to use nms.

#

Also why do you even need CraftPlayer?

#

You have almost everything in Player object.

broken hare
#

I need to do Packet operations

quaint mantle
#

Protocol lib?

broken hare
#

I want to be able to show the loading screen

hybrid spoke
#

how do i create player object i need wanna create black hole

#

Player player = new Player not working

hybrid spoke
broken hare
#

Do I have include protocol lib in the plugins/

#

I really don't want another dependent

hybrid spoke
#

why not? you can just rely on it without even shading it in since its already on the server.

broken hare
#

What protocol lib?

twilit vector
#

why is it not being used??

broken hare
#

Can I use protocol lib with adding it to my plugins/

#

It's onEnable I believe

twilit vector
#

ohh

twilit vector
#

still not being used

quaint mantle
#

Protocol lib is installed on pretty much any server

hybrid spoke
twilit vector
#

okay ill send whole code

broken hare
hybrid spoke
#

just install protocollib

#

or do it yourself with nms

#

you have these 2 options

quaint mantle
#

But what is the problem with installing protocollib ?

hybrid spoke
quaint mantle
#

😞

#

^

twilit vector
broken hare
quaint mantle
#

No cap, you will just waste your time.
Just use protocollib.

quaint mantle
#

Oh what is your code about? @twilit vector

broken hare
#

So I have two options use ProtocolLib or add CraftBukkit to my dependencies, right?

hybrid spoke
quaint mantle
twilit vector
#

can i have listener and javaplugin both?

#

like in that class

quaint mantle
#

Sure

hybrid spoke
twilit vector
#

oh

#

but i have no other option

#

so i will do this

#

how?

hybrid spoke
#

you have

twilit vector
#

what?

quaint mantle
hybrid spoke
#

by creating an extra class for your listener

quaint mantle
#

I don’t need to have everything within one plugin

twilit vector
#

i want that method to keep calling it self

quaint mantle
#

But everything in one class

twilit vector
hybrid spoke
#

thats good. more classes = less performance obv.

hybrid spoke
quaint mantle
#

One class = no static

twilit vector
#

then i will have to move listener also

quaint mantle
#

So much bettter

broken hare
twilit vector
#

i need those variables for BlockBreak event and for the onEnable

hybrid spoke
#

so DI it

quaint mantle
#

Wit spigot you have two dependencies and one requires you to have built spigot with build tools so you have it in your maven local

hybrid spoke
twilit vector
hybrid spoke
# twilit vector ?

dependency injection is a thing. passing your variables throught methods, your constructor etc

twilit vector
#

ohk

#

ill google it

#

TY

broken hare
#

Well using craftbukkit is impossible with no docs, I'm not about to do deobscate it. So I am gonna use protocol lib, do I need to shadow it into my jar?

hybrid spoke
broken hare
#

So I have to put the jar in /plugins folder?

silk mirage
#

OR inject protocol lib's source code inside your plugin

broken hare
#

There is no other way?

#

Except for inject the code

#

Hmm I guess it is what is then

fluid cypress
#

can i set somehow a display name with a line break to an item?

#

how can i do this with the tabcompleter for a command? instead of a list of strings that can be selected

fluid cypress
#

but i dont want it to be selectable with tab

hybrid spoke
#

hm.. there is a way with placeholders, but idk it anymore.

#

there was a framework for it iirc

broken hare
#

I don't know if I can get help with this here, but I have decided to use craft bukkit and this is what I have

    Packet enable = new PacketPlayOutLogin(
        entity.getId(),
        entity.playerInteractManager.getGameMode(),
        world.worldData.isHardcore(), 
        world.worldProvider.getDimensionManager().getDimensionID(),
        world.getDifficulty(), 
        60, 
        world.getWorldData().getType(), 
        world.getGameRules().getBoolean(new GameRuleKey<GameRuleBoolean>("reducedDebugInfo"))); ``` But it says it can;t find a constructer
#

Never mind ill use protocol lib

hybrid spoke
#

try them out

#

and use which one works better for you

iron condor
#

when making plugins for your server, what would be better?

to throw everything into one jar?
or split them and use as libraries?

hybrid spoke
iron condor
#

do you have an example?

hybrid spoke
#

if you plan to do 10 different plugins.. for example essentials, worldedit, plotsquared and so on, i would do an extra jar for each. if its just a big ass project which belongs together, i would throw it in one jar

fluid cypress
#

im trying to install this https://github.com/JorelAli/CommandAPI, but i get this error

[INFO] Reactor Summary for commandapi 6.1.0:
[INFO]
[INFO] commandapi ......................................... SUCCESS [  9.067 s]
[INFO] commandapi-preprocessor ............................ FAILURE [  1.727 s]
[INFO] commandapi-core .................................... SKIPPED
[INFO] commandapi-1.17 .................................... SKIPPED
[INFO] commandapi-1.16.5 .................................. SKIPPED
[INFO] commandapi-vh ...................................... SKIPPED
[INFO] commandapi-plugin .................................. SKIPPED
[INFO] commandapi-shade ................................... SKIPPED
[INFO] commandapi-annotations ............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  10.998 s
[INFO] Finished at: 2021-07-22T05:05:20-03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project commandapi-preprocessor: Fatal error compiling: invalid target release: 16 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :commandapi-preprocessor
#

any idea why? i always get errors when installing something manually with maven, i hate it

sturdy patrol
#

Fatal error compiling: invalid target release: 16 -> [Help 1]
Maybe it means that Java 16 is not supported?

#

Just a random thought.

topaz moon
#

^

#

update maven

fluid cypress
#

not suported by maven? or the repo/module/whatever thing?

#

im using maven 3.8.1, which is the latest, so...

topaz moon
#

huh then it's commandapi...

#

but don't makes sense to me, since there is 1.17... which you need java 16 for

fluid cypress
#

but it supports mc 1.17, how can it support 1.17 without java 16, java 16- plugins work in 1.17?

#

yea, then whats the problem? mmm

#

also it says "merge branch master into java 16 support" in a recent commit

hybrid spoke
#

java is backwards compatible.

fluid cypress
#

also in the changelog of the version 6.0.0 it says "Changes build version from Java 8 to Java 16"

#

mvn --version:

Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: C:\ProgramData\chocolatey\lib\maven\apache-maven-3.8.1\bin\..
Java version: 1.8.0_211, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_211\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

why does it say Java version: 1.8.0_211?

#

does it use the first java installation it finds?

#

in the path env variable or something

#

yea, it was that

#

now that i have it installed, how do i actually import it into the maven project?

chrome beacon
#

If you ran maven install just add the group name artifact and version

fluid cypress
#

to pom.xml?

#

and how do i know the group id, artifact id and version?

#

literally idk how to use this thing

tacit drift
#

can i change the coords that show up in the F3 menu?

#

for example a player is somewhere but they get other coords

eternal night
#

No f3 is client side

#

As long as you don't want to mimic the entire world the player sees at their position

quaint mantle
#

Hey, what would be the best way to store data in a block?

#

I just need to store a string

hybrid spoke
#

not sure if a block has a PDC, but probably not. you can store the location of the block and the informations you need to store

#

you just have to listen if the block is being destroyed by comparing the locations

quaint mantle
#

hello, how do i can cancel beacon event?

fluid cypress
#

wtf does this mean??

Failure to find dev.jorel:commandapi:jar:6.1.0 in https://hub.spigotmc.org/nexus/content/repositories/snapshots/ was cached in the local repository, resolution will not be reattempted until the update interval of spigot-repo has elapsed or updates are forced

pom.xml:

<repository>
    <id>local-maven-repo</id>
    <url>${user.home}\.m2\repository</url>
</repository>
...
<dependency>
    <groupId>dev.jorel</groupId>
    <artifactId>commandapi</artifactId>
    <version>6.1.0</version>
</dependency>
real tide
#

how can I put my CratesPlus key in Essentials kit?

eternal night
#

you don't have to specify maven local in your repositories o.O

opal juniper
quaint mantle
opal juniper
zinc wadi
#

I have a problem can you help me ?what is this error message?

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.

quaint mantle
#

when i'm right clicking on it.

opal juniper
#

just cancel the event if the inventory is the right type

zinc wadi
#

"if you wish to use IP forwarding , please enable bungeecord config as well! ?"

hybrid spoke
zinc wadi
#

ok*

opal juniper
#

just thought that route was easier

#

cause there are no null checks

#

and they are a white role ><

umbral pagoda
#

hi

#

How do I encode the source code of my plugin, and no one can see it in any way, only I can see

eternal night
#

you are looking for "obfuscation" tho this is never a 100% guarantee

#

once your code is in the hands of others there is always a way to restore it

hybrid spoke
umbral pagoda
#

cuz i'm developer in minecraft server

#

and this server have alot of developers

#

so ididn't need any one know my codes

quaint mantle
#

Hello, how do i can list online players in menu?

hybrid spoke
#

what does your code make that important so no one else than you should be able to see it?

hybrid spoke
opal juniper
hybrid spoke
#

^

umbral pagoda
hybrid spoke
#

i can't see the importance

#

you are a senior developer of a network

umbral pagoda
hybrid spoke
#

why don't you know how to obfuscate?

#

or even why don't you know that its nearly impossible to encode or even make the source unaccessable?

umbral pagoda
#

so i'm not good in obfuscate

hybrid spoke
#

and thats totally fine

#

because you are a team

#

its normal to share code with your team or even code together

umbral pagoda
#

@hybrid spoke we team ok but other developers gets money from the server

#

but me no

hybrid spoke
#

and? whats the point?

umbral pagoda
#

so ididn't want share my code

hybrid spoke
umbral pagoda
errant drift
#

what are you asking for?

#

how to obfus?

umbral pagoda
#

but ican't obfuscate good

umbral pagoda
errant drift
#

on any obfus methods website they show how to use it

umbral pagoda
quaint mantle
errant drift
#

Google "Obfus methods java"

quaint mantle
#

so now thats out of the way.....

#

im wondering how i can get the server commandmap w/o using Paper

eternal night
#

reflection 🥳

quaint mantle
#

what

#

im noob

#

teach me what reflection is

eternal night
#

by googling

lost matrix
#

Hmm. Reflections on private fields in Java 16 ...

quaint mantle
eternal night
#

works perfectly fine in java 16 ?

#

idk why everybody thinks reflection is completely dead in java 16 😂

hybrid spoke
fluid cypress
eternal night
#

? you can add a dependency you installed (idk installed through mvn install) in another projects dependencies list

lost matrix
fluid cypress
#

i added it, like this


        <dependency>
            <groupId>dev.jorel</groupId>
            <artifactId>commandapi</artifactId>
            <version>6.1.0</version>
        </dependency>

and i get Cannot resolve dev.jorel:commandapi:6.1.0

eternal night
#

and you are sure it is installed into your local repo ?

fluid cypress
#

i guess so? idk

#

how do i check it

#

the ...\.m2\repository\dev\jorel path exists, so, i think so

eternal night
#

are you sure it is the correct version

fluid cypress
#

no im not, bc i dont even know how to know the version

#

and the group and artifact id

eternal night
#

why are you even building it xD afaik it is distributed through the jitpack repo

#

e.g.

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>
``` add this repo
fluid cypress
#

idek what jitpack is

eternal night
quiet ice
#

just note that jitpack has different groupids

quaint mantle
#

AAHH

#

which import is that?!

eternal night
#
<dependency>
    <groupId>dev.jorel</groupId>
    <artifactId>CommandAPI</artifactId>
    <version>Tag</version>
</dependency>
quiet ice
#

🤨

eternal night
#

also, google java relflection and learn

#

if we were to give you a full course of java reflection, we would be here for a while 😅

fluid cypress
#

well, thanks

eternal night
#

no, the page I just send

#

lists the versions

quiet ice
#

But getting the commandmap reflectively is often overkill

eternal night
#

clearly states the latest version is 6.1.0

fluid cypress
#

i mean, using jitpack instead of, whatever i was using

quiet ice
#

maven local should suffice

eternal night
#

usually maven artifacts are distributed through a maven repository

#

in this case, command api is distributed through the maven repository jitpack

fluid cypress
#

yes, and the readme doesnt say anything about that

eternal night
#

to access it, add the jitpack repository

fluid cypress
#

thats what im saying

eternal night
quiet ice
#

The official repo is codemc

eternal night
#

I hope I highlighted the link well enough

fluid cypress
#

nobody reads that

#

well, i dont

quaint mantle
#

is that "commandMap" field still a thing??