#help-development

1 messages ยท Page 180 of 1

raw prairie
#

I cant help you with that then ๐Ÿ˜‚๐Ÿ˜‚ I'm new to java sorry

main dew
#

a xD

raw prairie
#

Use admin craft perhaps??

main dew
cursive loom
#

That didn't work for what I want cause if I want do another thing in my item i can't add a lot data on this item, I think I really need to check if this string is inside the lore

eternal oxide
#

you cna add a lot of data in the PDC. More than in the lore

cursive loom
#

oh ok I go try it so

river oracle
quaint mantle
eternal oxide
#

your java is too old

quaint mantle
#

i just installed jdk 17

#

:/

#

reinstalled

#
<properties>
        <java.version>17</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
eternal oxide
#

The java you are running on is too old, not the version you are building against

quaint mantle
#

but i just installed the latest version of java 17

#

and it says java.version 17

#

it my pom.xml

eternal oxide
#

at command prompt type java -version

quaint mantle
#

ooooh right

#

๐Ÿ˜“

#

1.8 is my runtime lol

eternal oxide
#

you are using JDK 17 butr running yoru server on JRE 8

quaint mantle
#

wait if i update that will i sstill be able to play on 1.8 minecraft for hypixel

#

ok good

#

also how do i check what my servers mc version is

#

i installed it a while ago i forget

eternal oxide
#

top of the latest.log file

quaint mantle
#

wait no thats not it

#

i cant find how to update to jre 17

eternal oxide
#

just set your JAVA_HOME variable

#

or launch your server using a full path to java

quaint mantle
#

set it to which directory?

eternal oxide
#

your java 17 bin folder

quaint mantle
#

yeah but where is that i just spam click next during installations

eternal oxide
#

look under program files

#

depends on who your java is from

quaint mantle
#

weird java home isnt in my env variables

#

do i want under system or under my name

eternal oxide
#

system

#

mine is C:\Program Files\Eclipse Adoptium\jdk-17.0.1.12-hotspot\

quaint mantle
#

well i installed it from oracle like 15 min ago

#

reinstalled

#

idk where jdk 17 is stored :/

eternal oxide
#

may need a restart to recognise your java home

#

I don;t see a java 17 in there

quaint mantle
#

might be because i installed 19... and not 17 ๐Ÿคฆโ€โ™‚๏ธ

eternal oxide
#

not many here use Oracle these days

quaint mantle
#

didnt notice this little thing

quaint mantle
eternal oxide
#

most here use openJDK due to the behaviour of Oracle trying to copyright API's

quaint mantle
#

does using openJDK actually benefit me in any way?

eternal oxide
#

no

#

no downside either

quaint mantle
#

or just because a large corporation is doing naughty things lol

eternal oxide
#

yep, its purely morals

quaint mantle
#

so i just go like this?

eternal oxide
#

looks good

quaint mantle
#

some website says i should add it to path too, is that true?

eternal oxide
#

sometimes

quaint mantle
#

so theres no harm in doing it

#

ok ill do it

#

still saying my JRE is 1.8.0

eternal oxide
#

you set home and path?

quaint mantle
#

yeah

eternal oxide
#

typing java at the command prompt will search the path

quaint mantle
eternal oxide
#

make sure the path doesn;t have a java entry to 8 before your 17 entry

quaint mantle
#

i mean i dont see it

eternal oxide
#

the top 3 entries look like java

#

I don;t use oracle so don;t knwo

quaint mantle
#

idk what happened lol

#

2 months ag oit worked fine

#

i come back cus i get reinterested in learning and not playing mc 24/7

#

and its all broken

eternal oxide
#

move your java home to the top

quaint mantle
#

that fixed it

#

thanks โค๏ธ

warm light
#

is there anyway to get/make permanent head texture?

sterile token
#

?

#

?ask

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. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

warm light
#

how? any demo/example about it?

neon nymph
#

Helloo friends, I got a question.

In mc 1.8, how would one store any kind of data in an item that I could use so that when I left click with the item on hand it opens a gui?

#

I know about PDC but sadly that only applies to later versions of the game

eternal night
#

|| update to a version that is maintained ||

#

probably through NBTAPI ?

neon nymph
#

That too, I can't for the love of me figure out how that plugin works

sterile token
#

Isnt diff?

#

I mean textures arent signed by mojang?

eternal night
#

their spigot page has examples on how to use nbt api

neon nymph
#

Reason I'm creating support for 1.8 in my plugin is that usage of 1.8 clients for pvp in my country is still pretty high, and I'm creating a pvp plugin

warm light
#

how?

sterile token
#

I dont kno why people dont look on google

eternal night
#

this has examples

sterile token
eternal night
#

literally for reading and writing

sterile token
#

But i think that textures must be signed by mojang

#

๐Ÿค”

warm light
sterile token
#

Hmn

#

So make your own api

#

๐Ÿ˜‚

#

Its simple you follow their rules or you make your own api

#

๐Ÿ˜ฌ

warm light
#

idk how to do ._.

#

any example?

cosmic fjord
#

if I want to use CraftPlayer I need to install the build tools right?

chrome beacon
#

Yes

eternal oxide
#

Depends. You should already have BT to create Spigot anyway

hasty prawn
#

^

cosmic fjord
#

I installed buildtools but now some Materials dont exist anymore

#

how do I get stuff like SKELETON_SKULL or RED_DYE?

eternal oxide
#

missing API version from your plugin.yml

cosmic fjord
#

thanks

zealous osprey
#

Is it bad to use Optional to be a fancier way of dealing with errors?
In the sense of returning an empty one, if an error occured?
Atleast if you know that only one particular error can be thrown from that code.

ivory sleet
#

A matter of style

#

In Java though, the convention is to throw a derivative of Throwable if something goes unexpectedly wrong in an exceptional way

#

Iโ€™ve seen people return Pair<Optional<E>,Optional<T>> or some shit to represent a possible failure and possible success

hasty prawn
ivory sleet
#

But overall Optional is java by convention is used for returning merely

zealous osprey
#

That somewhat looks like Rust if I remember correctly

ivory sleet
#

Caching it in variables and passing it through params is a nogo in Java

#

(Mainly due to the disadvantage type erasure provides Iโ€™d assume)

#

Nevertheless, dealing with exception handling is extremely difficult to do well

zealous osprey
ivory sleet
#

Especially when you have these abstraction layers

ivory sleet
#

Generally I believe checked exceptions is one of the best exception tools out there along with try catch statements

#

But thats my take

zealous osprey
#

Well nevertheless thx for your opinion.
I probably will just deal with both and look what is more fitting to use in different circumstances.
A matter of "trial and error" <3

ivory sleet
#

Yeah

#

Though one thing, its good to deal with exceptions in lower module layers if possible

warm light
#

is it possible to add texture on PLAYER_HEAD from image?

zealous osprey
#

In this particular situation it was a method that was basically the public method, to be used in different places.
Dealt with the other stuff in the lower levels already via exception handling.

ivory sleet
#

Yeah, though generally I argue for that dealign with exception handling as high up as possible in the infrastructure of abstraction layers lead to leaky abstractions

zealous osprey
#

I assume you mean that the end-user can then deal with them as they see fit?

ivory sleet
#

end user, as in api users?

zealous osprey
#

yes-ish, what I mean by this, is that I'd like to know how to work with exceptions if I were to make an API

ivory sleet
#

well, usually the api is a relatively high level abstraction, which infers that the specified behavior is well known, thus usually exceptional cases should be rare in your api

zealous osprey
ivory sleet
#

sure

#

thats true

#

and they're slightly faster in terms of invocation

#

invokespecial vs invokevirtual iirc

#

?scheduling

undone axleBOT
ivory sleet
#

I wrote some stuff concerning lambdas in that wiki page some time ago

zealous osprey
#

API exception handling

ivory sleet
#

ough

#

you could

#

yeah

#

you can do sth like

#
int[] timer = {4};
((Runnable)() -> {
  timer[0]--;
}).run();
#

(using a singleton array)

zealous osprey
#

never understood why that is valid, but not using int = 4;

ivory sleet
#

well

#

internally

#

during runtime

#

the variable is copied

#

which is why it needs to be effectively final

zealous osprey
#

idk, feels like an underhanded way to do it. But Atomic references are klunky to work with too

opal juniper
#

was about to roast conclure for casting that to a runnable but then saw the .run();

ivory sleet
#

๐Ÿฅฒ

#

task only

#

or well

#

like Consumer<? super BukkitTask>

#

?scheduling goes over that

undone axleBOT
ivory sleet
#

:>

ivory sleet
#

since atomic stuff is used

warm light
#

is it possible to add texture on PLAYER_HEAD from image?

ivory sleet
#

forEach(rankHandler::loadRank)

chrome beacon
#

Use what conclure sent :p

opal juniper
#

method reference or whatever its called

chrome beacon
#

Yes

opal juniper
#

yes

zealous osprey
#

if the args of the Consumer is the same as the params of the method you can use :: otherwise you need to map them inbetween

opal juniper
#

i find it really counter intuitive that to continue in a foreach you have to use return

chrome beacon
#

Yeah but it does make sense when you think about how they work

opal juniper
#

yeah sure, its just weird

zealous osprey
echo basalt
sterile token
zealous osprey
# sterile token And what about Stream#flatMap()

tbh, never really worked with that
Though I'm interested to use that form of functional programming more.
Mainly only use map, filter, foreach, etc.
Flatmap is something I have been hesitant to use, cause I am unsure of it's use

ivory sleet
grim ice
#

my dad thinks his phone is possessed because he cant call somebody

#

i love this

#

yes

#

by not using Arrays.asList

zealous osprey
#

whynot use an inline for loop instead of converting to a list?

grim ice
#

and using the normal for each loop

sterile token
grim ice
#

why are you using arrays.aslist

fluid river
#

to use forEach i guess

zealous osprey
grim ice
#

why would it look better

#

Arrays.asList is cheap (its literally just a wrapper to the array)

#

but why would you use it

floral drum
fluid river
#

why don't forEach persist in arrays tho

opal juniper
floral drum
#

hello oli

#

how are you

fluid river
#

java devs explain

opal juniper
#

hiya, im good, you?

floral drum
floral drum
#

wait

#

what do you mean nuker

floral drum
grim ice
#

arrays arent objects, you cant have object methods on them

opal juniper
#

what they said^

grim ice
#

well they are objects

#

but for you, theyre not

opal juniper
floral drum
#

people with a pink name are the only cool people, or people with orange/blueishgreen/green names

opal juniper
floral drum
#

nooo ๐Ÿ˜ญ

opal juniper
#

nitro classic looks kinda a good deal

floral drum
#

basic*

opal juniper
#

or basic

grim ice
#

wait actually

floral drum
#

LMAO

opal juniper
#

yea

grim ice
#

arrays are actually objects

#

like literally, theyre actually objects

#

what

opal juniper
#

like the emojis are all i care about

grim ice
#

i thought it would be similar to cpp where its just pointers

river oracle
#

Wait arrays are objects

floral drum
#

My name is skyler white, yo

#

My husband is walter white

#

yo?!

river oracle
#

For some reason I thought they were also just pointers

fluid river
river oracle
fluid river
floral drum
#

true

fluid river
#

you can init static array

grim ice
#

and .length is just

#

a field apparently

fluid river
#

int arr[5];

#

length is not a field tho

#

proven

grim ice
#

it is

fluid river
#

nah it's not

grim ice
#

then what is it?

fluid river
#

that's hard to explain

opal juniper
grim ice
#

that just means you dont know

fluid river
#

but you can't find length field with reflection

#

it's a special byte-code thing

#

not an actual field

river oracle
#

Jkjk

fluid river
#

tho you can't find clone() too

echo basalt
fluid river
#

they are not seen using reflection

echo basalt
#

simply said no

grim ice
#

reflection is broken then

opal juniper
fluid river
#

no it's not

river oracle
#

Reflection sees all

grim ice
#

since instanceof Object returns true for arrays

opal juniper
grim ice
#

and every object has a clone method

echo basalt
#

I don't work for free lmao

fluid river
echo basalt
#

been professionally coding for 6 years (truly coding for 11), I don't need another internship

grim ice
#

except if its removed or smth dunno

river oracle
echo basalt
#

I mean

#

I don't think they can give me a proper contracted offer given I'm legally a minor but still

river oracle
#

My time is worth more than free and so is yours:P

echo basalt
#

He still has a lot to work on, and might get confused when actually scaling his code
I literally consult for minigame servers that want to scale

echo basalt
#

guy that offered internship

floral drum
river oracle
#

Wow he went in on u a bit there

echo basalt
#

he also suggested I used a cloud management system for my final project after I literally made my own version of it

floral drum
#

openjdk btw

fluid river
#

so length is not a field in java

#

tho every array implements Clonable and Serializable

#

can you show clone() sources of array? @floral drum

eternal oxide
#

and is instanced with new so is an object

fluid river
ivory sleet
#

I mean arrays r special from top to bottom

fluid river
#

ye

#

and they don't have length field

#

but for some reason they only implement clonable and serializable

#

but not iterable sadly

ivory sleet
#

depends on what u define a field to be

fluid river
#

public final int length;

#

or smth similar

ivory sleet
#

if its by the definition of being obtainable by reflection, or do u mean simply that it must be explicitly declared

fluid river
#

well since length is not a field you can't obtain it as a field with reflection

echo basalt
#

would it be possible to do like

#

?[] array = ...;
array.length

ivory sleet
echo basalt
#

๐Ÿค”

fluid river
#

and length field is not declared

river oracle
#

Easy way to settle this is to reflect the shit out of the array class and print out all its members at runtime

ivory sleet
#

its a field by specification

echo basalt
ivory sleet
#

but yeah its a special field

river oracle
echo basalt
#

seems like arrays work in a weird way similar to autoboxing

fluid river
fluid river
#

array basically depends on jni everywhere

#

idk maybe i'm wrong somewhere

ivory sleet
#

which is why I asked for ur definition of a field

fluid river
#

but i tried to read as much as possible

fading spindle
#

hey if anyone out there is free, i would like some help with importing spigot api for 1.19 uisng spigot maven respitory

fluid river
#

to get some answer

fluid river
#

go to my etalon topic

#

there is everyting you need

vivid skiff
#

How can i get a hashmap key from the value?

fluid river
#

there is no way

echo basalt
#

loop through the map

fluid river
#

to do that

#

you can loop through entries

#

or keys

echo basalt
#

You should use a BiMap for that honestly

chrome beacon
#

A value can have multiple keys

fluid river
#

and if key's stored value == yourValue return the key

#

well my question was

#

why don't devs add forEach to array

sterile token
#

Hey why are sending too much mensssages

fluid river
#

i guess jvm has some limits then

sterile token
#

I cannot sleep

#

๐Ÿคฃ ๐Ÿคฃ

fluid river
#

close discord

sterile token
#

I mean I close it and its still making sound

#

๐Ÿ˜‚ ๐Ÿ˜‚

#

Fucked discord

fluid river
#

wait what

#

Array is not a class

#

the class of int array is [I

sterile token
#

Array is an object

grim ice
#

bro im learning russian and i just noticed that the sound effect of a game i play in, is in russian

fluid river
#

free russian lessons

sterile token
grim ice
#

its a roblox shooting game but its detailed

fluid river
grim ice
#

spanish useless

#

and sounds ass, no offense to its speakers

fluid river
#

but where is java.lang.Array or smth

grim ice
#

russian sounds awesome + its useful since russia is pretty huge

fluid river
#

Russia is large but empty

grim ice
#

why

grim ice
fluid river
#

yeah and china has 99 times lass land

#

and india

grim ice
#

russia is just swag

fluid river
#

and usa

#

but has twice more people then russia

#

https://en.wikipedia.org/wiki/Bangladesh even Bangladesh has more people then russia

Bangladesh (; Bengali: เฆฌเฆพเฆ‚เฆฒเฆพเฆฆเง‡เฆถ, pronounced [หˆbaล‹laหŒdeสƒ] (listen)), officially the People's Republic of Bangladesh, is a country in South Asia. It is the eighth-most populous country in the world, with a population exceeding 165 million people in an area of 148,460 square kilometres (57,320 sq mi). Bangladesh is among the most densely populated ...

grim ice
#

nice racism

sterile token
#

We have then as our litle child

#

๐Ÿ˜‚ ๐Ÿ˜‚ ๐Ÿ˜‚

grim ice
#

@ancient plank u have some work here

sterile token
#

Oh my bad

fluid river
sterile token
#

I wasnt wondering to discriminar

fluid river
grim ice
#

russia is swag, u cant deny it

fluid river
grim ice
#

one of the swaggest countries

fluid river
#

ussr was better

#

and bigger

#

and had more people

#

330millions iirc

fluid river
#

isn't it c++ code tho

floral drum
#

yes

sterile token
#

I mean Russia 8s swag but its a dictadura

fluid river
#

where is java.lang.Array or smth

#

in java itself

sterile token
#

That why they pretty....

fluid river
#

even have more parties at government than usa

sterile token
#

I really hate Russia because of their ussless presidente who thought that being presidente he can do what his ass songs

floral drum
#

for Clone

grim ice
#

well being president lets you do what your ass sings so like

fluid river
grim ice
#

๐Ÿคท๐Ÿปโ€โ™‚๏ธ

sterile token
#

Also what do cloning vs just assign it?

grim ice
#

plus russia is well developed, their presidents are not useless

sterile token
grim ice
#

dont blame a country for war, that's just how life works lol

fluid river
#

you blame one person for russian life

echo basalt
#

You can't really do much by changing presidents every 4 years

fluid river
#

i can say Putin is a puppet too

ancient plank
fluid river
#

and he doesn't do what he want

sterile token
#

Yes puttin is little child

ancient plank
sterile token
#

Who are u?

#

Sorry

grim ice
fluid river
#

oh no would get banned again

sterile token
#

Discord colores didnt load

fluid river
#

discord helper

ancient plank
#

also english only @fluid river

sterile token
#

Sorry sir

#

๐Ÿ˜ฌ

fluid river
#

where the heck did i use russian

grim ice
#

adele what

ancient plank
#

you typed pinyin

#

which isn't english

fluid river
#

oh true

#

we were talking about chinese

#

tho

ancient plank
#

doesn't matter

sterile token
#

Adele sorrt for swearing you

fluid river
#

lol

#

alr rewriting

#

Hello. What is your name?

#

translated to english

fluid river
#

just interesting for me

grim ice
#

memrise

#

kekw

fluid river
#

so you don't do real learning

#

no tutor no books no school programme

grim ice
#

how am i supposed to do "real learning"

#

i dont live in russia

fluid river
#

learn at school

#

have a private tutor

#

have a book

#

talk to natives

grim ice
#

no difference between the internet and books

#

one of them is just old school

fluid river
#

play russian games also

grim ice
#

talking to natives wont work since im not that good at it yet

fluid river
#

that's how i basically learnt english

sterile token
#

Hey please movรฉ to #general follow what adele has said

#

....

fluid river
grim ice
fluid river
#

at your free time

#

i know both rus and english well enough i guess

grim ice
#

alr after i learn a bit more

warm light
#

this should change texture of cape and player skin right?

fluid river
#

no russian on this forum xD

sullen canyon
#

alr

fluid river
#

idk why

#

move to general

#

or ask 2Hex directly ๐Ÿ™‚

#

he answered why he wants to learn russian tho

#

somewhere above these messages

mental sorrel
#

Hey guys, what is the command (or class) to print screen text (with position) to the client?

chrome beacon
#

You mean like the actionbar?

mental sorrel
#

Would love to supply an offset of the screen. but any position is fine at the moment

#

No, i mean like a information / text bar which i can update with player information (Hp/money) like a titan bar in wow

chrome beacon
#

You cannot specify specific locations with a class

#

You can shift characters around with a resource pack

mental sorrel
#

I keep coming back at the boss bar API

chrome beacon
#

Yeah the bossbar is what you'd use if you want on top of the screen

#

Actionbar is above the hotbar

mental sorrel
#

, action bar sounds best then

#

gonna look into action api then, thnx for the direction

delicate badger
#

Can someone help because my plugin doesn't load because my API is an unknown dependency also I can't add the API to the server because it doesn't extend JavaPlugin as I heard it shouldn't and people here said to me that I should add the API to the server

delicate badger
#

How do that

chrome beacon
#

Are you using maven or gradle?

delicate badger
#

maven

chrome beacon
#

Relocate the API so it doesn't cause issues later

#

Link shows how to shade and relocate

delicate badger
#

How do I fix unknown dependency

cosmic fjord
#

where can I find the jlib maven repo?

delicate badger
#

Because the server console says that my API is an unknown dependency

eternal oxide
#

Kumina you were given your answer

delicate badger
#

I have shaded it already

#

Do I need to exclude something I don't need to

eternal oxide
#

what API are you trying to use?

delicate badger
#

My own

sterile token
#

Whcih annotated command framework do you recommend me?

tardy delta
#

acf is nice

sterile token
#

acf?

#

Just look for it like that on gihtub'=

tardy delta
#

?

sterile token
opal juniper
sterile token
#

oh ok

sterile token
#

Thanks!!

opal juniper
#

aikar/annotation command framework

sterile token
#

perfect

#

Thanks to both of them

#

โค๏ธ

#

Wrong emoji hahaha

tender shard
#

damn

#

thanks for ping

#

seems like I fucked up the cron

#

huh does your ISP do ssl offloading? looks good to me

#

the cert hasnt changed since late september o0 weird weird

#

oh I see the problem. Fourteen sent "www.blog.jeff-media.com" but the cert is only valid for that address without www.

tardy delta
#

๐Ÿคก

sterile token
onyx fjord
#

Tf is even www used for

#

I never understood this

tardy delta
#

world wide web lol

onyx fjord
#

Yeah but nobody cares about the subdomain

tardy delta
#

doesnt a browser places www in front of you query if you dont

onyx fjord
#

No

#

Idk what's the point of www to be honest

#

I googled it

vocal cloud
#

it's pointless afaik.

onyx fjord
#

And it's optional, used only if main domain is taken

#

Or if grandmas use your website

sterile token
#

Which is the operation to getting the amount of blocks inside a cuboid region?

#

Do i need to calculate the area?

eternal oxide
#

math, volume of a cuboid

sterile token
#

volume?

echo basalt
#

volume is 3d area

sterile token
#

V = a3?

echo basalt
#

CuboidRegion#getVolume is a thing

sterile token
#

What?

#

I need to know the math formula

echo basalt
#

ah

#

x*y*z

sterile token
#

Im pretty idiot with math

eternal oxide
#

xyz

sterile token
eternal oxide
#

i missed the *

sterile token
#

Thanks mates!

echo basalt
#

๐Ÿคฆ

sterile token
#

I also have another question, is the amount of block inside a cuboid region the size of it?

#

๐Ÿค”

#

Because my idea is to display in the region info, the size of it based on blocks

eternal oxide
#

use Math.ciel on each x,y,z then multiply them all

sterile token
#

ok

eternal oxide
#

that will give you how many blocks

sterile token
#

so blocks amount == region size?

eternal oxide
#

only ciel IF using doubles

sterile token
#

ciel?

#

ceil?*

eternal oxide
#

ceil

#

yes

sterile token
#

oh ok

#

but the blocks amount from a region == the region size?

eternal oxide
#

yes

#

thats what volume is

sterile token
#

ok

#

and what is area for?

#

Now im messed up

#

hahaha

eternal oxide
#

what?

sterile token
#

i mean im messing up between area and volume

#

Look how dumb im at math

#

๐Ÿ˜‚

eternal oxide
#

area = a cuboid

#

volume = size of object

tardy delta
#

google translate moment

sterile token
#

So what if i dont use double?

#

it would just be x * y * z right?

eternal oxide
#

yes

sterile token
#

To conclude, the blocks amount is the same as the region size

sterile token
#

Because one for min and max

eternal oxide
#

max-min

sterile token
#

hmnn

eternal oxide
#

(maxX - minX) * (maxY - minY) * (maxZ - minZ)

sterile token
#

oh ok

#

Perfect mate thanks

#

โค๏ธ

#

Sorry for being really annoying

delicate badger
#

If I shade my api to my plugin when I relocate it why does it remove all my code and the jar file only includes the api

sterile token
golden turret
#

build.gradle or pom.xml pls

delicate badger
#
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>me.kumina</groupId>
    <artifactId>EssentialsCore</artifactId>
    <version>1.3.7</version>

    <properties>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <repositories>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
        <repository>
            <id>spigot-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
        </repository>
        <repository>
            <id>placeholderapi</id>
            <url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>com.github.kumina-dev</groupId>
            <artifactId>KuminaCore</artifactId>
            <version>37f0cc13fe</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.8-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>me.clip</groupId>
            <artifactId>placeholderapi</artifactId>
            <version>2.11.2</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.4.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <relocations>
                                <relocation>
                                    <pattern>ml.kumina</pattern>
                                    <shadedPattern>ml.kumina.api</shadedPattern>
                                </relocation>
                            </relocations>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
undone axleBOT
sterile token
#

Please!!!

#

Dont spam the channel

eternal oxide
#

You are not shading properly

#

you are relocating your entire plugin

delicate badger
#

Whoops

sterile token
delicate badger
#

Never heard

sterile token
#

perfect dont worry

delicate badger
#

Took this name of a plant which is in english "cumin"

delicate badger
eternal oxide
#

What are you trying to do with EssentialsCore?

delicate badger
#

Making a lightweight version of Essentials with only the useful commands

#

for my server

eternal oxide
#

you need to be more specific in your relocation so you only relocate your API not all yoru code

#

relocating me.kumina is including all your code

delicate badger
#

It's ml.kumina, but yeah. How do I be more specific to only relocate the API

eternal oxide
#

I don't know your code structure

delicate badger
#

Example?

eternal oxide
#

relocating ml.kumina.api to api would move everything from ml.kumina.api to api.ml.kumina.api

delicate badger
#

Well I did something and now all code is in ml.kumina.api

#

and it was that I changed the pom groupId on the plugin from me.kumina to ml.kumina

#

How could I make it that the API would be in ml.kumina.api and plugin code in ml.kumina.base

eternal oxide
#

if its an api you start off with it at ml.kumina.api

delicate badger
#

Okay it's fixed now

#

Umm.. I got errors that it fails enabling and also fails disabling

#

even tho I have made onEnable and onDisable

sterile token
#

Is posible to use MessageFormat object to do a method like the one here. My idea is to learn if posible to use that class to make pairs of each input and then replace it with it value

So let do an implementation:

send(user.getPlayer(), "%name%", user.getPlayer().getName(), "%coins%", user.getCoins()); 



void send(Player player, Object... placeholders);
tardy delta
#

new MessageFormat("{0} got shot by {1}").format(player.getName(), killer.getName()) or smth yes

sterile token
#

Hmn

#

I like to do it more like using your own pattern

#

so you can decide if the placeholder would like: %name%, {name}, etc

tardy delta
#

then String::replace is the way ig

sterile token
#

ok, but what about agrouping then?

#

I dont like to have hundre of lines just for the placeholders

onyx fjord
#

I use pairs for that

sterile token
#

to pass a Pair<String, Object>

onyx fjord
#

Wdym it's clean

tardy delta
#

i just use String.formatted with a "{0} {1}" string

onyx fjord
#

And it can be done infinitely

onyx fjord
tardy delta
#

just for myself

onyx fjord
#

Ah sure then

sterile token
#

Something none programming related but what its more secure?

#

Passing parameters thru the http body or request?

hazy parrot
#

What do you mean by request?

#

Query parameter?

ivory sleet
tardy delta
#

mmh

delicate badger
tardy delta
#

what error

delicate badger
#

Forgot to add the error like on the help message

tardy delta
#

do plugin = this before loggin

#

log method requires plugin singleton to be setup but its not

delicate badger
#

Oh yeah my API has a setPlugin thing and I forgot to use it :D

#

I think that could be the problem

#

It was

young shell
#

Is there anything else that can Cause and Error like org.bukkit.plugin.InvalidPluginException: Abnormal plugin type than a missing nullary constructor

delicate badger
#

You asked me?

#

Cause I don't see any error with org.bukkit.plugin.InvalidPluginException

river oracle
#

Check highlighted clases and lines

#

Somethings null thag shouldn't be

#

Make a constructor in your enum class

delicate badger
#

How do I check others plugin code

#

Like plugins made by others

river oracle
#

6

#
river oracle
#

The jar should be in your m2

#

Or whatever gradle is if you use that

native nexus
#

You can do the weightage based on enum.values() if you dont want to use the constructor

river oracle
#

Yep

#

You need to add a getter for your power value tho

#

Yes otherwise just use static constants if you want it to just be an int

delicate badger
# river oracle Check highlighted clases and lines

This is at PlaceholderAPI:71 return REPLACER_PERCENT.apply(text, player, PlaceholderAPIPlugin.getInstance().getLocalExpansionManager()::getExpansion);
and this at PlaceholderAPI:99 return setPlaceholders(((OfflinePlayer) player), text);
This is at CharsReplacer:42 @Override

native nexus
#

You can also do Permissions.MODERATOR.ordinal()

river oracle
#

Note for ordinal though If you add a rank in between all ordinal will change

delicate badger
river oracle
#

Prob config is returning something null add sysout check to see

native nexus
#

ordinal is the order in which the enum item is declared

#

"its position in its enum declaration, where the initial constant is assigned an ordinal of zero"

#

Yeah having your own declared field is more accurate

river oracle
#

getPower Mr c#

native nexus
#

and yes ^

#

mmm code conventions

river oracle
#

I'm allergic to Microsoft sorry

#

I'm deathly allergic to their conventions

#

๐Ÿ˜ณ

#

You can keep your upper Carmel case in class names mr c#

#

Don't worry

#

Yes you are

#

Oh God you use Java script never mind gross get out ๐Ÿ˜ณ

#

Lol

#

I love python

#

Uhmm c# cuz cringe

#

And that's it

#

Nothing reat against js even though it's mid it's not the poor web devs fault

#

I use type script myself

#

Instead of js

#

But some companies have legacy js code based

#

I'm a react plus type script guy myself

sterile token
#

Im testing some things inside mc and doing sin(30ยฐ) is giving negative

eternal night
#

wtf is the sin of an angle kekw

#

30ยฐ in rad or deg

sterile token
#

yes it weird sin(30) should not be negative

eternal night
#

Well

sterile token
#

30 deg

eternal night
#

sin(30) certainly is negative

sterile token
#

okay

#

via plugin is a way

#

command:
cmd-name:
permission-message: "bla bla"

#

well i dont use command executor haha

#

I use airkar commands

eternal night
#

no

#

that sends the usage message

#

in general tho

#

there is Bukkit.getPermissionMessage()

#

which you can send

ivory sleet
#

sadly

stuck flax
#

How would I look through the follow config section?

example:
  a: "1"
  b: "2"
  c: "3"
eternal night
fluid river
#
for (var key : getConfig().getConfigurationSection("path.to.example").getKeys(false)) {

}```
stuck flax
#

ty

stuck flax
wet breach
#

some examples of looping through configs

ivory sleet
#

missing nms added to ur classpath

#

you can add the server jar as a dependency (run build tools + depend on spigot as an artifact)

#

Yes

#

As long as you know what youโ€™re doing

sterile token
ivory sleet
#

What do u have rn?

#

You remove -api from spigot-api

#

and the def targetJavaVersion wont work

#

use java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))

#

Oh

#

Actually they might set it below

#

Idk

#

But ye

#

Ah okay

#

Yeah thata fine then

#

Na

#

Just do what I said

#

And reload ur gradle project

#

Also you need to have ran buildtools for 1.19

#

?

#

Which jar file?

#

The one from BuildTools?

#

Ah

#

It uses a different one

#

BT copies the generated one to another directory

#

Which is the one that will be used

#

Nice

#

:)

sterile token
#

Your welcome sir

quaint mantle
#

is it possible to find free plugin developers who want to make a plugin for me

#

ow

drowsy helm
#

Any reason youโ€™re not using moj mappings?

#

Ah

echo basalt
#

buildtools in gradle is rather annoying

#

add

pluginManagement {
    repositories {
        gradlePluginPortal()
        maven { url = "https://repo.papermc.io/repository/maven-public/" }
    }
}

on the top of your settings.gradle file

#

then

plugins {
    id 'java'
    id 'io.papermc.paperweight.userdev' version "1.3.7"
    id 'xyz.jpenilla.run-paper' version "1.0.6" // Adds runServer and runMojangMappedServer tasks for testing
}

at the top of your build.gradle

#

yeah sounds like a you problem, you can't do it with just spigot

#

just limit yourself to not using paper's api

#

just base spigot functionality

#

yeah

#
dependencies {
    compileOnly 'io.papermc.paper:paper-api:1.18.2-R0.1-SNAPSHOT'
    paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:1.18.2-R0.1-SNAPSHOT")
}

for example

#

make sure to add the paper repo

#

bruh moment discord

#

Did you add the paper repo

#

and the thing on settings.gradle

fading spindle
#

hey guys so i'm making a 1.19 project with spigot api and i'm using spigot maven respitory to add to the pom.xml my code in the pom looks like this:

`<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.scribble2</groupId>
<artifactId>scribble2</artifactId>
<version>1</version>
<name>scribble2</name>
<description>A very scribbly project</description>
</project>

<repositories>
<!-- This adds the Spigot Maven repository to the build -->
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>

<dependencies>
<!--This adds the Spigot API artifact to the build -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.19</version>
<scope>provided</scope>
</dependency>
</dependencies>`

For some reason i'm getting an error message where it says: The markup in the document following the root element must be well-formed can anyone help

undone axleBOT
fading spindle
#

?

echo basalt
#

Welcome to remapped

#

It's now just net.minecraft.world.Player or something idk

fading spindle
final dragon
#

welcome to java

quartz solstice
#

how do you teleport people into a certain dimension, like the nether for example

fresh timber
#

final Location location = new Location(Bukkit.getWorld("nether"), here is the loaction in the world);
get the entity/player here.teleport(location)

#

it isn't needed to create a variable "location" you could just do "get entity/player here.teleport(new Location(Bukkit.getWorld("nether"), here is the loaction in the world) but if you are going to use that location in that class more, it is easier to just make a variable

raw prairie
#

Getting an error here

fresh timber
#

?

raw prairie
fresh timber
raw prairie
#

Goal

#

is to paste a schematic

#

every 16 blocks

raw prairie
#

pls help

raw prairie
#

pls

fluid river
#

true

fresh timber
#

ok

raw prairie
fluid river
#

nice empty section

fresh timber
#

im confused what ur tryina do

raw prairie
#

and

#

i have an error with the pasting function

fluid river
#

new discord feature

#

chat request

#

like friend request

#

but just chat

#

no

#

idk why

#

it's a beta feature

hybrid spoke
raw prairie
fluid river
#

oh i see

#

you can't chat with non-friends

#

maybe

hybrid spoke
#

and you always will be if you just copy&paste without understanding

raw prairie
#

I read the resources as well

#

just having trouble with this but

#

thats it

hybrid spoke
#

you seemingly dont

fresh timber
#

^

raw prairie
#

Probably true

hybrid spoke
#

otherwise you would understand that you are trying to use 2 variables you dont have

raw prairie
fluid river
#

but with this feature you can chat with everybody who accepted request

#

without being friends

fresh timber
#

s

#

hence the red text

raw prairie
#

there i moved it into the statement

fresh timber
#

they arent set to anything

raw prairie
#

yea

#

just noticed ๐Ÿ’€

fresh timber
#

๐Ÿ’€

raw prairie
#

yey

#

im so cool stupid

fluid river
#

for what reason you create variables instead of just not using them

#

if they are equal 1

fresh timber
#

now ur gonna place schematic at 16, 40, 16

fluid river
#

why do you even need them

fluid river
fresh timber
#

yeah tbh u dont even need em

raw prairie
fresh timber
#

dunno what ur tryina do

#

ru tryina place in every chunck?

raw prairie
#

every chunk thats been loaded

fresh timber
#

uh ok never done this before but u could try looping it and adding x1 more each time

#

dunno if its gonna work

raw prairie
#

yea

#

wut i thought

#

lemme try it

#

??

#

what does /j do

drowsy helm
#

tone indicator

#

means its a joke

fluid river
#

i like your cut g

vocal cloud
#

they meant to do /s

fluid river
#

/kys(keep yourself safe)

#

๐Ÿ˜ญ

raw prairie
#

its an enclosed space

#

the player spawns in the schematic

#

and the schamtic isnt that big

#

no backrooms ๐Ÿ’€

fresh timber
#

tf

fluid river
raw prairie
#

for the api

#

the backrooms schematic is around the same size as your average skyblock island however

#

its going to load into every chunk to fit seemlessly

#

as an infinite maze

fluid river
#

morice

raw prairie
#

I already did bet it

#

the schamtic is exactly 1 chunk wide

fluid river
#

from what i see you are kinda ?learnjava guy

#

wanna code something

#

quick

#

random plugin idea

raw prairie
#

first i need halp

raw prairie
#

๐Ÿ’€

fluid river
#

umm what

raw prairie
fresh timber
#

seems boring

raw prairie
fresh timber
#

mc is hard to make scary

raw prairie
#

more levels

fluid river
#

oh

fresh timber
#

yea ik

fluid river
#

i used to code Roguelike in minecraft once

fresh timber
#

but u needa make some texture packs to make scary

raw prairie
#

can sum1 help me pls

#

;-;

fresh timber
#

or else its so boring

#

u not know how to do loop?

raw prairie
#

wait

#

wait

#

i can add 16?

#

maybe?

fluid river
#

who knows

fresh timber
#

no

#

add 1 to multiplier

#

to do for more chunck

raw prairie
fresh timber
#

ig

#

;-;

raw prairie
#

i main python

fluid river
#

for (int mult = 1; i < chunksAmount; mult++) {
your mult is 1 then 2 then 3
}

raw prairie
#

tyty

fresh timber
#

yea

raw prairie
#

im prolly going to mess this up horribly

#

and put it in the wrong spoit

fluid river
#

until hits highest number which i defined as chunksAmount

raw prairie
fluid river
#

idk

#

you didn't give full description of what you actually need

#

paste schematic is the only thing i figured out from what you need

raw prairie
fluid river
#

chunkLoadEvent

raw prairie
#

public void chunkLoad(ChunkLoadEvent e) {

    ClipboardFormat format = ClipboardFormats.findByFile(file);
    try (ClipboardReader reader = format.getReader(new FileInputStream(file))) {
        // Stuff here
    } catch (FileNotFoundException ex) {
        Bukkit.getLogger().severe("Schematic file doesn't exist!");
        ex.printStackTrace();
    } catch (IOException ex) {
        Bukkit.getLogger().severe("Error reading schematic file!");
        ex.printStackTrace();
    }
    if (e.isNewChunk()) {
        try (EditSession editSession = WorldEdit.getInstance().newEditSession(BukkitAdapter.adapt(e.getWorld()))) {
            int getX = 0;
            int getZ = 0;
            int chunksAmount = 10000;
            int i = 1;
            for (int mult = 1; i < chunksAmount; mult++) {
                your mult is 1 then 2 then 3
            }
            Operation operation = new ClipboardHolder(clipboard)
                    .createPaste(editSession)
                    .to(BlockVector3.at(getX * 16, 40 ,getZ * 16))

                    .build();
            Operations.complete(operation);
        }
    }
}
fluid river
#

past schematic

#

done

raw prairie
#

this is wut i have rn

fluid river
#

umm

#

you would need to get chunk coordinates

#

from event

#

and just multiply by 16

#

to get blockX and blockY and blockZ

raw prairie
#

so

fluid river
#

And then paste schematic on the block

raw prairie
#

how do i get chunk coordinates ๐Ÿ’€

fluid river
#

event.getChunk().getX() i guess

raw prairie
#

yea ik

fluid river
#

cool

raw prairie
#
@EventHandler
    public void chunkLoad(ChunkLoadEvent e) {

        ClipboardFormat format = ClipboardFormats.findByFile(file);
        try (ClipboardReader reader = format.getReader(new FileInputStream(file))) {
            // Stuff here
        } catch (FileNotFoundException ex) {
            Bukkit.getLogger().severe("Schematic file doesn't exist!");
            ex.printStackTrace();
        } catch (IOException ex) {
            Bukkit.getLogger().severe("Error reading schematic file!");
            ex.printStackTrace();
        }
        if (e.isNewChunk()) {
            try (EditSession editSession = WorldEdit.getInstance().newEditSession(BukkitAdapter.adapt(e.getWorld()))) {
                int getX = 0;
                int getZ = 0;
                int chunksAmount = 10000;
                int i = 1;
                for (int mult = 1; i < chunksAmount; mult++) {
                    e.getChunk().getX();
                    e.getChunk().getZ();
                }
                Operation operation = new ClipboardHolder(clipboard)
                        .createPaste(editSession)
                        .to(BlockVector3.at(getX * 16, 40 ,getZ * 16))

                        .build();
                Operations.complete(operation);
            }
        }
    }```
#

this is what i have nwow

fluid river
#

bro

raw prairie
#

i told you i may mess it up badly ๐Ÿ’€

undone axleBOT
raw prairie
#

im really dumb doe ๐Ÿ˜

fluid river
#
if (!e.isNewChunk()) return;
try (EditSession editSession = WorldEdit.getInstance().newEditSession(BukkitAdapter.adapt(e.getWorld()))) {
    Operation operation = new ClipboardHolder(clipboard)
    .createPaste(editSession)
    .to(BlockVector3.at(e.getChunk().getX() * 16, 40 , e.getChunk().getZ() * 16))
    .build();
    Operations.complete(operation);
}```
raw prairie
#

yea im not oding block y

#

i have other plans for the y level

fluid river
#

idk never used Chunk class

raw prairie
#

k ill use getBlockX

fluid river
#

bruh

#

that's chunk x and z

#

which you need to multiply by 16

#

to get block

#

yeah

raw prairie
#

u almkosted trpyed a newbie up

#

๐Ÿ’€

fluid river
#

tho you would get corner of the chunk

#

not middle

#

trueeee

raw prairie
#

lmeme first test it

fluid river
#

with new chunk

raw prairie
#

already

fluid river
#

test then

raw prairie
#

just making sure we are on the same level

fluid river
#

bro test it

#

not paste it

raw prairie
#

k

#

man

#

wait

#

wait

#

get in vc