#help-development

1 messages · Page 2039 of 1

tender shard
#

e.g. making stuff not compile if you have UpperCamelMethodNames or lowercaseclassnames

lavish hemlock
#

No that's an awful idea

tender shard
#

the compiler should at least scream at you

lavish hemlock
#

Not only does that introduce unnecessary compiler complexity

#

but it's incredibly opinionated

#

I mean, for one

vestal dome
#

uh..

tender shard
#

by checking the case of method names? lol

#

oh yeah that'd work of course

#

it should just check whether method start with lowercase

#

and classes with uppercase

vestal dome
#

I guess I'll wait until I can post my error..

tender shard
#

post it

#

we're just chit chatting

vestal dome
#

this..

lavish hemlock
# lavish hemlock I mean, for one

Sometimes I will give public static final fields lowerCamelCase names because they aren't technically constants, although you're basically supposed to always use UPPER_SNAKE_CASE with public static final fields.

tender shard
# vestal dome this..

remove your whole buildtools folder, reboot windows, download buildtools and try again

#

oh wait

vestal dome
#

are you kidding me I have to reboot my computer?

tender shard
#

only now did I read

tender shard
#

your problem is something else

lavish hemlock
tender shard
#

what command did you enter?

#

@vestal dome

lavish hemlock
#

I much prefer meatFactory.produceBeef()

vestal dome
#

"java -jar buildtools.jar --rev 1.18.2 --remapped"

lavish hemlock
#

(Also: There's different popular conventions in Java -- The two main ones being Google and Sun/Oracle)

#

(I don't like Google conventions bc they use 2-spaces and not 4-spaces)

vestal dome
lavish hemlock
#

Or a field

vestal dome
#

non-static variable*

lavish hemlock
#

"static variables" don't exist

tender shard
lavish hemlock
#

but yeah it doesn't matter if it's static or not, I still think meatFactory looks better

tender shard
#

rename NoPermission to NoPermissionMessage

lavish hemlock
#

I have this new, innovative technology called

#

"an IDE"

#

which shows me when fields are static

#

just by the colour of their names when used

tender shard
#

and also maybe add @ DefaultPermission

#

like

#

OP, NON_OP, EVERYONE, NONE

#

and a @ Cooldown would also be nice

#

like @ Cooldown("1m") makes every player be able to run it only once per minute

#

and ofc all those annotations must be able to read values dynamically

#

e.g. from a config file

#

yes, definitely

#

well tbh start by getting the basic stuff done

#

then add new things

#

no need to have a plan for everything right from the beginning 😄

#

I always just start coding and 2 years later, I have a 1500 lines config file lmao

#

yeah me too

#

but ANgelChest's base config is 1500 lines

vestal dome
#

BuIlDtOoLs sLoW aF tO dOwNlOaD.. F

tender shard
vestal dome
#

I'm waiting for it to reach the part it did that annoying error..

#

worked updating BuildTools..

hollow cloak
#

Can someone help me diagnose this error I am getting

tender shard
#

?paste that pls

undone axleBOT
tender shard
#

can someone explain to me in very simple terms what a linked hashmap is? lol

hollow cloak
tender shard
#

yes but noone wants to download a huge log file

#

please just paste it on the website

hollow cloak
#

click expand and it shows the whole thing

tender shard
#

oooh

#

so it's like a list. but as map

#

makes sense

#

it's "basically" a List<Entry<Key,Value>>

#

yeah makes sense

#

I always wondered what it is

last flint
#

Hola alguien habla español

tender shard
#

english pls

tender shard
#

I just looked at them but a huge wall of text came and I didn't bother to read it for a simple question 😄

#

my brain is already hurting from all the generics

last flint
#

hello can someone help me to make a Network md pliss

lavish hemlock
#

what exactly do you mean

tender shard
#

I've been writting stuff like this the last 2 hours so please excuse me if I can't read any docs right now lmao

static <M extends Map<K,V>,K,V> PersistentDataType<PersistentDataContainer, Map<K,V>> asMap(PersistentDataType<?,K> keyType, PersistentDataType<?,V> valueType) {
lavish hemlock
#

you poor soul

tender shard
#

I manage to get it working but it's really not very relaxing

last flint
tender shard
#

lol yeah but it was really long overdue

lavish hemlock
tender shard
lavish hemlock
#

like, imagine typealias PDC = PersistentDataContainer

#

just sayin'

#

or actually

tender shard
#

oh yeah that'd be quite helpful

lavish hemlock
#

import aliases too

#

since imports are lies

tender shard
#

I recently had to always specify java.util.List

last flint
tender shard
#

because my IDE imported java.awt.*

lavish hemlock
#

import org.bukkit.whateverthefuck.PersistentDataContainer as PDC for example

#

Why does Java not have import/type aliases?!?

last flint
lavish hemlock
#

Imports are compiler constructs anyway >:(

#

No

hexed hatch
tender shard
hexed hatch
#

stop trying to bring your liberalism into good ol' Java

lavish hemlock
#

I am not a liberal

#

I deny political labels since ✨ everyone is an asshole ✨

hexed hatch
#

what's next? java pronouns?!!??!1

lavish hemlock
#

lmao

#

My pronouns are cof/fee 😤

tender shard
#

I am a pro-slavery, anti-homo, republican liberal christian gay atheist

tender shard
lavish hemlock
#

Are you

#

ignoring the "christian atheist" part?

#

I feel like that is the funnier one

quaint mantle
#

static <M extends Map<K,V>,K,V> PersistentDataType<PersistentDataContainer, Map<K,V>> asMap(PersistentDataType<?,K> keyType, PersistentDataType<?,V> valueType) {

#

Holy shit

#

thank god that rust has type definition

lavish hemlock
#

That's what I said above lol

tender shard
#

yeah we were just talking about that lol

lavish hemlock
#

Also surprises me that Lombok doesn't have aliases

#

Seems like something they'd add

#

perhaps it's not possible to do that with their AST model...?

tender shard
#

I don't that'd work without compiler hacks

lavish hemlock
#

...Lombok is nothing but compiler hacks lol

tender shard
#

lombok isn't nearly as dirty as people think 😦

#

yeah maybe a bit

#

lol

#

but not as much as everyone claims

hexed hatch
#

be in denial some more why don't you

lavish hemlock
#

I mean

#

Lombok is founded upon a compiler hack

#

which is casting ProcessingEnvironment to JavacProcessingEnvironment (or Eclipse's, if Eclipsec is being used)

tender shard
#

wdym? do you want to imply that lombok requires an IDE?

quaint mantle
#

Hi, how can i send player death screen to player with packets?

lavish hemlock
#

Eclipse uses their own compiler

#

and Lombok supports both Javac and Eclipsec

#

but yeah Lombok takes advantage of annotation processors as an entrypoint

#

JavacProcessingEnvironment grants you access to Javac's Context object, which then gives you access to every other part of Javac

#

Ah, like this (this code is from my own discontinued Lombok-inspired project)

quaint mantle
#

hey guys it's possible to make a casual players spawners? in specific points

#

uwu

#

ulu

#

die

#

what the fuck

lavish hemlock
quaint mantle
quaint mantle
#

MAOW?!?!?!??!?!?!?!??!?!

lavish hemlock
#

P E N I S M O M E N T

#

wait

quaint mantle
#

BELU-DAD?

tender shard
quaint mantle
#

DADDDDDDDDDDDDDDDDDDDDDDDD

lavish hemlock
quaint mantle
#

beluga

#

LMAO

quaint mantle
tender shard
vocal cloud
#

Maows ex's showing up in chat

quaint mantle
#

beluga hacked version

#

WHO IS MY DAD?

#

maow is cool, you are not

#

L

lavish hemlock
#

waaait

quaint mantle
#

DADDDDDDDDDDDDDDDDDDDDDDDDDDDD

#

DaDaD

#

you are my belu-dad?

#

@lavish hemlock oi you removed me D:

tender shard
quaint mantle
quaint mantle
lavish hemlock
#

Alex's code goes into unexplored territory

#

As

#

He makes jokes

#

in his code

quaint mantle
#

MAOW!!!!!!!!!!!!!!

#

d-
d-
dad?

tender shard
#

maow now go hug them

quaint mantle
#

please stop

tender shard
#

otherwise they'll get kicked for spamming

quaint mantle
#

i search my dad i not search kicked

lavish hemlock
#

I'm not really in the mood for a family reunion :p

quaint mantle
#

im italian

#

ok go search for grammar then

tender shard
#

can you be italian in #general pls

lavish hemlock
#

I'm part-Italian

quaint mantle
#

pog

#

okay

lavish hemlock
#

Anyway so

lavish hemlock
# quaint mantle that codes sexy

You say that but

    protected Element getClassElement(Element element) {
        switch (element.getKind()) {
            case CLASS:
                return element;
            case METHOD:
            case FIELD:
                return element.getEnclosingElement();
            case PARAMETER:
                return element.getEnclosingElement().getEnclosingElement();
        }
        return null;
    }
quaint mantle
#

and instead if I wanted that only the blocks of the map cannot be broken but those that place the players can be broken, can it be done?
??????????

lavish hemlock
#

Okay so if I'm interpreting you properly

#

You want players to only be allowed to break the blocks they place?

quaint mantle
#

doesnt this owrk too

lavish hemlock
#

Yeah but the lib was developed for Java 8

#

Since compiler hacks are broken on Java 9+

#

And I didn't know how to fix them yet

quaint mantle
#

bro it's been like less than a minute

#

calm down

lavish hemlock
#

...

#

no he meant calm down

#

Calm down before you get a cooldown :p

lavish hemlock
#

comedy*

quaint mantle
#

oui oui

lavish hemlock
#

That doesn't make you exempt from corrections

#

The only people exempt from my wrath are the dyslexic ones.

quaint mantle
#

votekick?

tall dragon
#

that's also spelled incorrectly

quaint mantle
#

!votekick @quaint mantle

tender shard
#

I need your opinions. So I now have the following methods in DataType:

List: asList(...)
ArrayList: asArrayList(...)
Set: asSet(...)
HashSet: asSet(...)
<? extends Collection>: asCollection(?, ...)

Map: asMap(...)
HashMap: asHashMap(...)
LinkedHashMap: asLinkedHashMap(...)
<? extends Map>: asGenericMap(?, ...)```

that's inconsistent, because once I have asGenericMap for maps and asCollection for lists, since unfortunately there's nothing like Collection <> List as there is for my Maps D: does anyone have a better idea? Should I rename my "asCollection" to "asGenericCollection"?

-> <https://github.com/JEFF-Media-GbR/MorePersistentDataTypes/blob/96f7b14f09cbb7e7f0cb25aaebad7d501650a22e/src/main/java/com/jeff_media/morepersistentdatatypes/DataType.java#L90>
lavish hemlock
tall dragon
#

first explain what u want

#

in understandable english

tall dragon
tender shard
tall dragon
#

no

tender shard
#

Can you stop being annoying pls

quaint mantle
#

anyone else wanna murder everyone on earth?

lavish hemlock
quaint mantle
#

except the cool people

quaint mantle
tall dragon
quaint mantle
#

imagjin is cool, shut yo mouth

quaint mantle
#

calm down, you're like 12 D:

#

beluga fanboy

lavish hemlock
#

point and laugh at the beluga fanboy

#

ha ha

#

Why are you in possession of 3-year-olds?

quaint mantle
#

?kick @quaint mantle immature asf

undone axleBOT
#

Done. That felt good.

quaint mantle
#

THANK YOU

#

holy shit

#

I love you Imajin

lavish hemlock
#

Good call

lavish hemlock
tender shard
#

thank you ❤️

quaint mantle
#

ive been rejecting his friend requests since day 1

#

LMAO

lavish hemlock
#

Whos

quaint mantle
#

purples

#

probs mine

lavish hemlock
#

12-year-old or Purple?

#

oh

quaint mantle
#

yea

lavish hemlock
#

Ah that makes this even better

#

It's an enemies to lovers plot

#

except one-sided

tender shard
#

Does anyone know whether I can get rid of those warnings without just suppressing them?

lavish hemlock
#

Have you tried the diamond operator

quaint mantle
tender shard
lavish hemlock
#

Well

#

You're fucked then :)

#

You can either use raw types or cast it

quaint mantle
#

diamond operator

#

<>

#

this

#

still can't believe you tried to bribe me 👀

tender shard
#

won't work

lavish hemlock
#

Either way, it needs to be suppressed

#

The type parameter system isn't perfect

#

Sometimes you do just need to suppress shit :p

tender shard
#

yeah I guess I'll just add a suppress to the whole class

vocal cloud
#

@DamnitIntellijStopWarningMe

tender shard
#

I couldn't manage to add the correct types into the <diamond>

#

it's always screaming unless I just use the raw thingy lol

#

but it's working fine so I guess it's no problem lol

quaint mantle
#

ok

#

i always come back

tall dragon
#

oh dear..

quaint mantle
#

@tardy delta re-open the threat please..

tall dragon
#

threat?

quaint mantle
#

ehm....

#

check if the block thats broken has metadata if not then cancel the event

#

whenever a player places a block add the metadata to it

#

oh ok

tender shard
#

java generics are weird

#

this does NOT compile

quaint mantle
#

lol

tender shard
#

but the IDE doesn't show errors

quaint mantle
#

fix it!

#

!

tender shard
#

casting it however works on compile and also @ runtime

tender shard
#

I wonder

#

can fields in an interface be @ Deprecated? THINKing

#

@waxen plinth were you the person with the PDC data library that supports collections / maps?

quaint mantle
#

mfnalex

#

how can i male a delay

tender shard
#

Thread.sleep

#

?xy

undone axleBOT
tall dragon
#

💀

quaint mantle
#

example server start and count 2 minute and execute the code

tender shard
#

?scheduling

undone axleBOT
quaint mantle
tender shard
#

ok

#

do you know my friend gnoogle?

quaint mantle
#

no

#

try { // Timer //
Thread.sleep(10000);

    } catch (InterruptedException e) {
        Thread.currentThread().interrupt();
    }

//code

#

exact?

tall dragon
#

oh yea that will work perfectly

quaint mantle
#

ok tank you

neon nymph
#

Is it possible to change server.properties values using a plugin at server start?

tender shard
#

the server.properties get read before the plugins enable

neon nymph
#

Darn

tender shard
#

what do you want to change?

neon nymph
#

I knew I could get the properties file, but was unsure when it gets read

#

Texture pack url if possible

tender shard
#

oh that's easily possible I think

#

one sec

quaint mantle
#

FileConfiguration spigotConfigurationYamlFile = YamlConfiguration.loadConfiguration(new File(new File("").getAbsolutePath(), "spigot.yml"));

#

But then properties file

tall dragon
#

spigot.yml?

tender shard
#

okay so, you can't change the ResourcePack at runtime but you can send a different URL to your players

tall dragon
#

that doesnt work like that

tender shard
#

yeah ignore what @quaint mantle said, it's not helpful

#

@neon nymph in PlayerJoinEvent, you can send them a custom resource pack URL

neon nymph
#

Oh, right!! Change the redirect inside the url instead

neon nymph
tender shard
#

no

neon nymph
#

Oh I never knew abou this method

tender shard
#

what MC version are you using?

#

if you're on a recent version, you can make them get kicked if they don'T accept the resource pack

#

if you're on older versions, you can only show the "accept the resource pack yes/no" screen to them

neon nymph
#

Couldn't I simply use the force bool to force them to accept the pack?

quaint mantle
tender shard
#

yes, on recent versions, you can

neon nymph
#

But on legacy, it's different, right

tender shard
neon nymph
#

Alright, I thought server.properties file was the only way to provide players a resource pack

quaint mantle
#

How can i make a /pvp command (activates pvp) if disactivates player not get damage

neon nymph
#

Thanks!

tender shard
quaint mantle
#

Yea my fingers where faster then my eyes.

neon nymph
#

I see

tender shard
#

so yeah it's about 30 lines in total, if not less

quaint mantle
#

Ok tank you

desert musk
#

how tf do i make a plugin 4Weird

#

BuildTools.jar can't even install correctly

tall dragon
#

wdym

vocal cloud
#

It's not build tools its you ™️

tender shard
desert musk
#

is buildtools.jar irrelevant anymore

#

i srsly don't know how to get around making a plugin

tall dragon
#

buildtools.jar is very relevant

celest thunder
#

if you really dont want to use buildtools, you could just download a copy of paper since thats already built

vocal cloud
#

That's like the worst possible answer

desert musk
#

lol

celest thunder
desert musk
#

i'll tell you the full details of how buildtools fails to download in a moment

ivory sleet
#

With that being said this is Spigot and not Paper

vocal cloud
#

Hey I want to make a sandwich. Don't make a sandwich make a sub. If paper worked on spigot 100% then I'd say yes.

desert musk
#

ok taco man

ivory sleet
#

Lol

#

Taco man

desert musk
#

i'm tryna make a plugin that i find to be really cool 😏

#

for a semi-hardcore world i have

ivory sleet
#

Sounds intriguing

desert musk
#

but maybe something like it already exists

#

i want a plugin that allows for multiple respawn anchors

#

and for a dead player to choose which respawn anchor they want to respawn at

vocal cloud
#

I assume you don't know a lot of java.

desert musk
#

no but i know c++

ivory sleet
#

Oo

desert musk
#

if that helps at all

vocal cloud
#

Somewhat I suppose

ivory sleet
#

Java will feel like dancing butter combined with sweet sugar

quaint mantle
#
                            for(int i=0; i<9; i++) {
                                if (player.getInventory().getContents()[i].getType().equals((profile.getRefill() == Refill.SOUP ? Material.MUSHROOM_SOUP : Material.POTION)))
                                    //remove one first```
Does anyone know how to remove first item that's MUSHROOM_SOUP or POTION. I've already made a part code, but idk how to remove just 1 item since I have int set to 9 items
desert musk
#

Java will feel like dogshit

quaint mantle
#

I want to remove just 1 items

desert musk
#

i've used it before

#

lmfao

ivory sleet
#

Nah

#

Only bad thing Java has is its way of dealing with null

#

Else it’s extremely robust and solid

desert musk
#

aight

#

after this game i'll give more details but

#

not really relevant

ivory sleet
#

👍

desert musk
#

i just need to know how to make a plugin

vocal cloud
#

Java will feel divine. Because intellij exists

ivory sleet
#

🥲

vocal cloud
#

And javadoc

quaint mantle
#

Guys

vocal cloud
quaint mantle
#

Can someone help me please

vocal cloud
#

?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!

ivory sleet
#

use break;

#

It exits the loop when reached

desert musk
#

that easy 🤷

quaint mantle
#

so I set one item to air and then use break?

#

interesting

#

I'll try

ivory sleet
#

good luck (:

celest thunder
quaint mantle
# ivory sleet good luck (:
                                if (player.getInventory().getContents()[i].getType().equals((profile.getRefill() == Refill.SOUP ? Material.MUSHROOM_SOUP : Material.POTION)))
                                    player.getInventory().getContents()[i].setType(Material.AIR);
                                    break;```
Like this?
desert musk
#

yes

ivory sleet
#

Yes

#

If I can read it correctly that should do the job

quaint mantle
#

I'll try

desert musk
#

wait don't u need curly brackets to scope the if statement

celest thunder
desert musk
#

but it's 2 now

#

because break

ivory sleet
#

It’s optional for one liners but generally you do wanna have it there as it solidifies scopes

celest thunder
#

then he should add the curly braces

ivory sleet
#

Oh ye

quaint mantle
#

I've added them already just didn't copy

#

the brackets

ivory sleet
#

Ye

#

iirc

#

getContents returns a shallow copy

#

So you might wanna use getInventory().getItem(i) and setItem(i,stack)

desert musk
#

so not lvalue

ivory sleet
#

if those were the names

desert musk
#

ok i'm glad java looks like c++

#

lol

ivory sleet
#

🥲

desert musk
#

i think i'll find writing plugins really fun

celest thunder
#
Block b = player.getWorld().getBlockAt(x, y, z);
b.setType(Material.AIR);```
im trying to set a block to air, but for some reason it's also setting the block right under it to air
i think i faced this problem before but i cant find anything on spigot about it
desert musk
#

i love to improve minecraft survival

ivory sleet
#

Yeah I hope you find it fun too

desert musk
#

interesting

celest thunder
ivory sleet
#

Apply block physics

celest thunder
#

ah ok

#

well thx

ivory sleet
celest thunder
#

quick question, does calling .thenAccept() of an async completable future run the consumer on that same thread, or the thread that i called the method from (in this case the main thread)

ivory sleet
#

Yes

#

It runs it on the exact same thread

celest thunder
#

ah ok

ivory sleet
#

thenAcceptAsync would switch thread (default would be ForkJoinPool::commonPool or if you pass a custom Executor implementation)

celest thunder
#

i guess i would have to put a bukkitrunnable in there then

#

(╯°□°)╯︵ ┻━┻

ivory sleet
#

┬─┬ ノ( ゜-゜ノ)

tender shard
#

I am once again stupid

#

wtf do I need in the ? fields lmao

#

generics sound so simple but they are so complex

ivory sleet
#

What does it tell you to pass?

tender shard
#

oh wrong screen

#

this is GenericDataType

#

fuck type erasure

ivory sleet
#

One of the arguments would be a
(Function<? super String,? extends E>)(str -> enumThing) and the other would be the reverse

tender shard
#

yeah I've tried Enum::valueOf and Enum::name

#

it didn't like that

#

one sec

#

IntelliJ even suggested me to use "valueOf"

ivory sleet
#

Yes as said

tender shard
#

but once I add it, it says "cannot resolve"

ivory sleet
#

(Function<? super String,? extends E>)(str -> Enums.tryParse(enumClass,str).orNull())

#

Or sth

#

Might be able to reduce that to a method reference

#

But sth like that might be what you’d have to pass

tender shard
#

I don't get it

#

isn't valueOf a static method

#

OH

ivory sleet
#

Because Enum::valueOf takes two parameters

tender shard
#

I think I got it now

#

yeah

#

that was the problem

#

you can't just do E::valueOf

ivory sleet
#

which is changed by the compiler for any Enum subclass

tender shard
ivory sleet
#

As it infers the class

tender shard
#

generics are so weird

#

but yes, it makes sense

ivory sleet
#

Generics aren’t weird I’d say but type erasure

#

The cause of all evil in this world

tender shard
#

I'll ignore the whole enum thing for now

ivory sleet
#

🥲

golden turret
#

it is final :diesofcringe:

#

how could i create a cursor like the player cursor

tender shard
#

I am already so glad I got all collections and maps working, fuck enums now, let people parse their enums themselves

golden turret
#

that follows you

desert musk
#

lol

tender shard
golden turret
#

ik

#

but when i use the addCursor

#

the cursor is static

tender shard
#

the NMS cursor is immutable too IIRC

torn oyster
#

how would i use jitpack for a private github library of mine?
I'm confused about the settings.xml thing, i have made a settings.xml in my user's .m2 folder but it gives a 401 unauthorised error

tender shard
#

(but jitpack sucks anyway)

#

jitpack is the WORST repository available

torn oyster
#

<settings>
<servers>
<server>
<id>jitpack.io</id>
<username>(censored)</username>
<password>.</password>
</server>
</servers>
</settings>

#

the password is just .

#

thats the whole file

#

uhm

tender shard
#

does your password use any special characters?

torn oyster
#

no

#

jitpack just says use .

#

the username does

tender shard
#

show your pom.xml

#

?paste it

undone axleBOT
vocal cloud
#

host your own sad

tender shard
#

jitpack tells you to use "." as password?!

torn oyster
#

the username is the password

#

and the password is.

#

is .

#

idk

tender shard
#

wow

torn oyster
#

its the auth token

#

actually

#

how do i host my own repo

tender shard
#

wtf

torn oyster
#

thats prob a better question

#

how do i host a repo of my own

tender shard
#

oh wait ReFX Nexus is the VST I am using lmao

#

Im using SonaType Nexus for my repo

#

I could just give you an account for my community repository

torn oyster
#

its private tho

#

thats the idea

#

unless it is 100% private

tender shard
#

what's private? your stuff? then you can't use jitpack anyway

torn oyster
#

huh

tender shard
#

everything on jitpack is public

torn oyster
tender shard
#

at least that's what I thought

vocal cloud
#

Just host your own YanSigh

tender shard
#

oh didnt know

tender shard
#

yeah then just host your own

#

get a cheap VPS somewhere and install sonatype nexus

vocal cloud
#

Got a rasberry pi or don't mind running a local webserver?

torn oyster
#

i dont mind running a webserver

tender shard
#

well if they only need it locally, they don't need any server at all

#

just do mvn install

torn oyster
#

thats kinda why im switching

#

i also want future developers to be able to use it

tender shard
#

hm yeah I can't help with jitpack

#

but if you get 401 it definitely means something's messed with your settings.xml or your deployment URL or that jitpack sucks

torn oyster
#

is the settings.xml meant to just be

#

<settings>
(stuff here)
</settings>

vocal cloud
tender shard
vocal cloud
#

Yeah I host mine locally but it's still public

#

I need to switch from what I'm currently using which is dav

tender shard
#

tbh I'd just get a cheap VPS somewhere

#

netcup has awesome servers for as little as 2.69€ per month

#

then just spin up nexus in a docker container there

vocal cloud
#

Yeah I used apache2 so I could have a webserver on it as well.

tender shard
#

yeah sure I also use apache as reverse proxy

#

but nexus itself runs in a docker container

vocal cloud
#

whatever works for you tbh.

tender shard
#

I have tried to use jitpack so many times

vocal cloud
#

I'm just lazy it took 5 hours to set it up

torn oyster
#

Cannot resolve (idk if i should show it) failed to transfer from https://jitpack.io during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of jitpack has elapsed or updates are forced. Original error: Could not transfer artifact (idk if i should show it) from/to jitpack (https://jitpack.io): authentication failed for https://jitpack.io/(idkifishouldshowit), status: 401 Unauthorized

tender shard
#

it always only causes trouble

#

e.g. oraxen API is in jitpack

vocal cloud
torn oyster
#

thats a new error

tender shard
#

it NEVER works

#

everyone ends up just compiling oraxen themselves

#

jitpack sucks ass so hard

#

and not in the good way, #yeshomo

tender shard
#

yeah no idea. tl;dr: I'd just not use jitpack, you'll spend up hours trying to get it working

#

for <3€/months you can get a full KVM server and host a nexus yourself

torn oyster
#

what is "bintray" repo

#

lmao

#

ill just go back to local repo ;-;

vocal cloud
#

mvn install it until you actually need to share it

golden turret
#

the code enters insed the if

#

but the map dont remove the cursor

vocal cloud
#

Is it possible that getCursors returns a copy?

tender shard
tender shard
#

getCursors() returns a "changable" collection

vocal cloud
tender shard
#

I know that because I once removed sth from getCursors() and it crashed all clients viewing that map

vocal cloud
#

I wonder if it's firing at all. I would check to see if that if x == oldx stuff is even firing.

vocal cloud
#

I'd try setting the cursor to invisible instead of removing it to see if that does anything.

golden turret
#

yo

#

this one works

#

🤔

vocal cloud
#

Could use removeif

golden turret
#

that dont exists

vocal cloud
#

canvas.getCursors().removeif should

golden turret
vocal cloud
#

Oh it's a map cursor collection

#

Ugh that's so ugly.

#

md_5555

muted sand
#

is there any code of the default mob ai's? (in deofb server code) or no?

desert musk
#

is writing plugins on vscode acceptable

vocal cloud
muted sand
desert musk
vocal cloud
#

Automates the boring stuff

#

Yeah its' got a curve but you learn one of their IDEs you learn them all

desert musk
#

like what's a module

#

all these tutorials are outdated

#

😂

desert musk
desert musk
desert musk
tender shard
#

are there any premium plugins authors online right now here?

vocal cloud
#

Everything. Better tools to write/deploy etc.

#

It's written in java for java

desert musk
#

makes sense ig

vocal cloud
#

Same people who made Kotlin so you know they're crazy

shy pewter
#

Hi

#

Need help

#

Which website is to coding plugin

#

@vocal cloud

vocal cloud
#

What?

#

What website is for coding plugins? Is that what you're asking?

tall dragon
#

i think he means the website that generates plugins on demand

hexed hatch
#

ah, they must mean the plugin button

vocal cloud
#

I hope not

hexed hatch
#

where you press a button and receive the plugin of your choosing and specifications

tall dragon
#

resource staff have a life

#

they do this in their free time.

vocal cloud
#

Just make it free ™️

buoyant viper
muted sand
#

Can FallingBlock's move
sideways ✨?
with the either x or z set to 1 and the y being 0?

buoyant viper
#

like if ur writing the most basic stuff and dont need a lotta features then vsc is fine

#

since both vsc (with extensions) and intellij support things like maven+gradle

#

both have version control support

#

both have things like debug runs

tall dragon
tender shard
#

because everyone who approves the resources works there for free

#

I have experienced waitings up to 3 months

tall dragon
tender shard
#

my first paid plugin took 3 months to get approved, my last one took 12 hours

muted sand
buoyant viper
#

u could manually do it with math, probably

muted sand
#

ew, math

vocal cloud
#

Where is the NMS guy pushing the custom fallingblock where it doesnt have physics

muted sand
#

nms is scary
it looks powerful, but scary understanding it

desert musk
#

ok

#

does anyone want in on what im making to try and improve it or direct me generally

#

ig just dm me cause im about to go to sleep

vocal cloud
#

You can always publicly share what you want to do here lol

desert musk
#

it involves communal semi hardcore smps

desert musk
#

ok

#

thought it was a more technical channel

vocal cloud
#

It's a discussion channel.

desert musk
#

this is what i’ve managed to accomplish using datapacks thus far

  1. 10,000 block spawn radius
  2. beds do not serve as respawn anchors
  3. beds give you poison, can only be slept in if you're at 1hp
  4. maximum health reduced to 10hp (half health)
  5. loot given to you on death: temporary tools, raw meat, 1 ender pearl and a saddle + more
  6. sleeping percentage is 33%
  7. slight buff given at respawn
#

basically the feature that made me realize imma have to use plugins is that

#

(and it’s actually pretty essential to the gamemode)

#

a difficult to craft/ create spawn location that can hold multiple respawn slots

#

and people can join multiple of these and decide which ones to respawn at

#

its recipe will involve items that are only given to players upon respawn

#

its goal is to force people into building villages, playing communally

#

because they only have enough resources to share a spawnpoint

#

that’s all

vocal cloud
#

Yeah that's simple with spigot. Just gotta read the documentation for things you want. Learn how to setup a project then you're g2g

desert musk
#

perfect

#

i should probably like, remake the stuff i’ve already done as a plugin as well

#

cause god i hate the minecraft command block lang lol

#

even though it’s the first “programming” i’ve done as a kid lol

#

😄 i killed chat

#

that easy

vocal cloud
# shy pewter Yes

You don't code plugins with a website you use an IDE or integrated development environment

shy pewter
#

What is this

#

😂

#

Software

#

@vocal cloud

vocal cloud
#

Yes. You can't create a plugin using a website unless you pay someone else to do it

muted sand
#

i mean their about me says it all

shy pewter
#

How do I open ide

#

😆

muted sand
#

by clicking it

vocal cloud
shy pewter
#

Oh

river oracle
#

If your not a troll please don't attempt to make a plugin it's not going to end well. There are many plugins out there I'd suggest seeing if one exists before trying to even start thinking about coding one

upper niche
#

or you can be like me who decided if i can't code it myself i can't use it
don't be like me

river oracle
#

Doesn't use Java or c or assembly must code myself

upper niche
#

i must build the computer myself

#

must manufacture the parts for it myself

#

must harvest the resources for the parts myself

#

must create the atoms for those resources myself

#

i must build myself to be able to do those things
i will now spontaneously inexistent

warm trout
#

How would I get the entity from a packet? (I cannot loop through World#getEntities(), the library I'm using does not have it's custom entity saved to that for some reason)

buoyant viper
#

id say find an entity with the specified id but if its not in getEntities... hmm

#

does the entity only exist through packets?

buoyant viper
#

interesting

warm trout
#

Indeed, where are entities stored within NMS?

tender shard
#

everything's is stored in memory, ofc

warm trout
#

Yeah but how would I acess an entity by its ID\

tender shard
#

a pure NMS entity? sorry don't know

warm trout
#

Yeah

tender shard
#

there is probably a method in either the server class

#

or the world / ServerLevel class

warm trout
#

Probably

#

I'll take a lolok tomorow

tender shard
#

what version are you on?

#

also, remapped or not?

warm trout
#

1.18.1

#

Im not on remapped nope but I havent checked the classes anyhow

tender shard
#

oh well

#

if you're not on remapped, i'm out lol

#

on remapped, it'd probably take only a few minutes to find it

warm trout
#

Oh nah you could tell me what is on remapped

#

I could just convert it using a website

tender shard
#

I didn't say that I'm looking for it for you know 😄

warm trout
#

Ohhh my bad LMAO

#

Anyways Ill take a look tomorrow

tender shard
#

maybe I'd do so tomorrow if you still need it then 🙂

hallow surge
#

Morning All - i would like to get started in plugin development for bakkit and spigot, but i am struggling to proper resources on the matter - can somebody suggest a website or ebook i can use. Already well versed in Java.

earnest forum
#

he explains the api well but doesnt have good java coding practices

#

since you know java already shouldnt be too much of an issue

hallow surge
#

I just need api, thanks - ill check him out

chrome beacon
undone axleBOT
chrome beacon
tender shard
#

ah yes, the bakkit API

tender shard
hallow surge
#

intelij has a minecraft plugin that downloads and sets up a gradle starter project, got most of the coding on the java side done for what i want to plugin to do, just need to figure out how to incorporate that into minecraft. But that is how far i have gone. Info i am getting of google feels inconsistent. Was just wondering if there is good place to look to get started.

tender shard
#

alrighty, so you already have base setup, that's good.

#

the first thing I suggest is that you get an idea on what you want to do first, like an idea for a simple plugin

#

there are no real "how to learn spigot" tutorials

#

what you need is a very simply plugin idea that you wanna do

#

e.g., a plugin that allows you to create lightning at your current position, etc

#

just take a few minutes of time and come up with a REAL simple plugin idea

#

once you've got that, we'll tell you exactly how you can find out on how to do that

#

but trust me, there is no "definite guide on how to do spigot plugins"

#

you always have to know what you wanna achieve

#

I actually think that a simple /lightning command is a good introduction

hallow surge
tender shard
#

ok 😄 but as said, feel free to tell us here once you've got an idea. almost all tutorials on youtube are outdated

#

or teach bad practices

vocal cloud
#

Time to make a YT series uwu

#

Reflection where you can when you can

hallow surge
#

yeah - i picked up on that. Like i said - no consistency in the guides atm.

tender shard
#

this for example is a VERY basic guide on doing something when a player joins, etc etc

#

(you can stop reading at # 3 because that's definitely not something you'd care about now)

tender shard
#

okay everyone

#

who is down to test something for me

#

I need a few people please to test my PDC library and try to break it somehow

#

how the fuck does that not work

#

HashMap<K,V> implements Map<K,V>

#

it works fine when I copy the same code as from the asHashMap method

#

but I don't want to have reduntant code

#

oh I got it

#

replace Map<K,V> with
? extends Map<K,V>

ivory sleet
#

Well I can’t see asHashMap but remember
Consumer<Map> and Consumer<HashMap> are generically unrelated

tender shard
#

but every Consumer<Map> also takes a Consumer<HashMap>

ivory sleet
#

What

tender shard
#

because the Consumer<Map> doesn't take a Consumer<Map> but a Consumer<? extends Map>

ivory sleet
#

No looking from a semantic point of view they are extremely unrelated

tender shard
#

I really started to learn generics today lol

ivory sleet
#

Wym by take?

#

generics are just type constructors at most

#

Idk the entire takes thing

tender shard
ivory sleet
#

Well I did some pdc types ages ago and it worked well

tender shard
#

yes, but now try to "double" "generalize" them

ivory sleet
#

I did

tender shard
#

hm I must have done something wrong then

ivory sleet
#

Idk you have to stop this entire take thing, I remember I kinda used that to reason with

tender shard
#

anyway, I got it working by replacing Map with <? extends Map>

ivory sleet
#

Yes it makes sense

tender shard
#

and I really don't understand why that fixed it

ivory sleet
#

Because Blah<HashMap> is not a subtype of Bah<? extends Map>

tender shard
#

for HashMap, no problem

ivory sleet
#

Whilst Blah<HashMap> is not a subtype of Blah<Map>

tender shard
#

it's really just about the generic Map type

#

I guess a <interface> somehow works a tiny bit different than a <clazz>

#

idk

ivory sleet
#

Na

#

it’s due to type construction and generic type inheritance

tender shard
#

well then I don't know because I only need the <? extends when using it on interfaces o0

#

it works fine for

#

HashSet

#

HashMap

#

ArrayList

#

but it doesn'T work for

#

Colletion

#

List

#

Map

ivory sleet
#

Well I can’t see the code so pretty hard telling

#

But remember

tender shard
#

it's on github

lilac dagger
#

generic types are fixed

tender shard
ivory sleet
#

Only reason for instance
Map<String,Player>::forEach
takes a BiConsumer<? super String, ? super Player> is so you can for instance pass a BiConsumer<CharSequence,LivingEntity> instance directly

tender shard
ivory sleet
#

It’s not about what takes and what gives

tender shard
#

check out the last fields in DataType, and the DataCollection and DataMap classes

ivory sleet
#

I mean it makes sense

#

but like why would you default just asMap to asHashMap

tender shard
#

what other Map implementation do you know that has a no args constructor?

#

Map is just an interface

ivory sleet
#

ConcurrentHashMap, TreeMap

#

yes exactly

tender shard
#

yeah so if someone wants go get a Map, they'll get HashMap

ivory sleet
#

Well why have two methods then?

tender shard
#

I wouldn't see a reason to give them a ConcurrentHashMap instead

#

if they want a ConcurrentHashMap, they can use asGenericMap(ConcurrentHashMap.class, ...) instead

ivory sleet
#

Nah all I’m saying that the design is weird

tender shard
#

how would you change it? 🙂

ivory sleet
#

I would just have asMap conversely to you asGenericMap and then asHashMap

tender shard
#

but sometimes people want to store a Map<K,V> into a PDC

ivory sleet
#

Then they use asMap

tender shard
#

okay but sometimes people want to get a SomeSpecificMapImpl<K,V> when reading from the PDC

ivory sleet
#

then they use asMap?

tender shard
#

they can't, since asMap would return a Map and not a SomSpecificMapImpl

ivory sleet
#

In your case it does

#

but assume you have the type constructor
K,V,M extends Map<K,V>

tender shard
#

no, asMap would return a HashMap that's just declared to be a Map

ivory sleet
#

now Map and MapImpl are both passable

tender shard
#

but HashMap is not a SomeSpecificMapImpl

ivory sleet
#

Which is your design flaw

tender shard
#

feel free to PR, I really don't understand how to fix this or amybe I don't understand your point

#

can you try to explain it again pls? 😄

ivory sleet
#

Because you exposed an asHashMap, there’s literally 0 need for the asMap

tender shard
#

I might be a bit "too much tired" and don't see the obvious things

ivory sleet
#

Since it’s just gonna give the HashMap anyways

#

Lol yeah

tender shard
#

one important thing

ivory sleet
#

Which is?

tender shard
#

you have a Map<A,B>

#

you write to PDC

#

no problem

#

but you wanna read from the PDC?

#

You can't

#

you cannot instantiate Map

#

you can only instanstiate a specific implementation

ivory sleet
#

Yes that’s where implementation details comes in

#

For instance java Collector solves this excellently

tender shard
#

that's why asMap actually uses a HashMap

ivory sleet
#

they have a toMap, which never exposed the HashMap type

#

It’s merely an implementation

ivory sleet
eternal needle
#

How can i use color codes in config?

i have color codes in config file

pls tag me

tender shard
#

I need a no-args constructor

#

and Map has none

#

so asMap returns a Map but actually uses a HashMap

#

I don't understand why that'd be a problem

#

I mean, Arrays.asList also returns an ArrayList I guess

ivory sleet
#

Oh you’re doing it reflectively

#

That’s also really dumb but Ig

tender shard
#

yeah how else would I do it?

ivory sleet
#

Using a Collector

tender shard
#

and then?

ivory sleet
#

Well that’s pretty much it, I have school now so I need to go but gl

tender shard
#

kkk

#

I highly suggest you to clone the repo and try to fix it because tbh I've spent hours on it and didn'T find any better way

#

I'd love to see a better solution, so yeah if you'd a PR, it's more than welcoe @ivory sleet :3

quaint mantle
#

ok

ivory sleet
#

alex I can in school (:

#

Or well during lunch time

tender shard
#

I'll probably be asleep then, but yeah, please check it out :3

#

JEFF-Media-GbR/MorePersistentDataTypes

glossy venture
#

how do i get the ServerPlayerConnection for the nms player object

#

or is it just Connection

#

im using mojang mappings

tender shard
#

what version?

#

1.18 or 1.17?

glossy venture
#

1.18

#

1.18.1

#

paper

#

mojang mapped

tender shard
#

nmsPlayer.connection.connection

glossy venture
#

what

#

ok

tender shard
#

yes

#

it's weird lol

glossy venture
#

there is no player.connection tho

tender shard
#

there is

#

@glossy venture

glossy venture
#

tf

#

wait what is the handle

#

is it Player or ServerPlayer

tender shard
#

getHandle returns a ServerPlayer

glossy venture
#

ah thanks

#

thats why

#

i was using the entity player

tender shard
#

oh ok

#

in my method, "Player" is a normal bukkit player

eternal needle
#

HI,How can i use color codes in config?

i have color codes in config file

pls tag me

tender shard
#

Fun fact: if you're using annotations, even if you don't shade them and/or set them to be <scope>provided, javac doesn't care. I didn't know that until 12 hours ago

#

TL;DR: javac doesn't care about "missing" annotations

eternal needle
undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

eternal needle
#

ChatColor.translateAlternateColorCodes('&', instance.getConfig().getString("messages"));

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

undone axleBOT
tender shard
#

I'll start a rage now
Where the fuck is the problem in having public fields?
MHO: Getter methods are NOT needed if they simply return the original value. Java itself it like that, too. for example, stringArray.length

#

also everyone using kotlin can immediately stop telling me it's bad because you people are doing this all the time

sharp flare
#

what the fuck happened here

tender shard
#

so yeah, why should we add getters and setters for fields if they simply return/set the field value?

tender shard
sharp flare
#

aight 🙂

tender shard
#

I just wanted to ask

sharp flare
#

I thought something was going to explode xD

tender shard
sharp flare
#

cant wait

tender shard
#

I really don't get why Asd.getAsd() is better than Asd.asd

#

does everyone think that the java devs added public fields just for fun?

#

how is this worse than

#

somePerson.getName()

summer scroll
#

Umm, can you directly change the value of the fields?

tender shard
#

that's why I mentioned setters in my original message

tender shard
#

sure, it makes sense if the setter actually does validate input

#

but if it doesn't, it's 100% useless

summer scroll
#

Maybe because of consistency perhaps.

tender shard
#

yeah but there is only "consistency" in using useless setters and getters because everyone does it

#

people often claim that kotlin is the "better" java, but people use public fields there all the time

#

so I wonder - is kotlin just "java without conventions" or are getters/setters actually useless?

#

(ofc all my above rage only applies to setters that don't do anything besides setting the value)

glossy venture
#

is this how to get the comments at the root?

eternal needle
undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

tender shard
#

I don't understand why you don't read this message ^

#

can someone explain to me pls 😢

low temple
# tender shard

It’s expecting an array of objects of the Type D. I’m pretty sure doing Class<D> is the same as just D.

glossy venture
#

yeah

vast sapphire
#

Is there a tutorial for configurable guis? I suck with the config api

#

I am making a shop and I want to do commands to add items like /additem <price> <quantity>

#

And it will add the item from hand

#

And store it in the config under the shop section

tender shard
#

fuck this

#

oh

#

lmao

#

wrong screenshot

#

sory

low temple
tender shard
#

fuck THIS ^

#

invalid YAML, obviously

#

both Slots: and 1: are the same indent

#

yeah now it's valid

#

except for

#

buyprice

#

it's empty

#

you can't have an empty value

#

empty value must be ""

#

it' sempty

low temple
# tender shard

So they only way you can prob do this is if you make the variable an array

tender shard
#

so it expects an indent in the next line

#

it must be null