#help-development

1 messages · Page 164 of 1

noble lantern
#

oh

#

ik

#

by default dependencies are under uhh

#

that provided thing

#

need to set it as compile or it wont get shaded in

#

<scope>compile</scope>

radiant umbra
#

like in the spigot dependency?

drowsy helm
#

thats spigot

#

the github-api one isnt provided

noble lantern
#

oh is that a plugin?

drowsy helm
#

default is compile

#

not provided

noble lantern
#

oh

#

and his issue is its not shading?

#

weiiird

#

how are you building?

drowsy helm
#

maybe you're using the non-shaded jar?

radiant umbra
noble lantern
#

clean package?

drowsy helm
#

yeah but you don't want it provided if its in a plugin

noble lantern
radiant umbra
#

wait how do I have to build it, with maven or like the build thing at the top

noble lantern
#

it makes a few diff jars

drowsy helm
#

with maven

#

mvn clean package

radiant umbra
#

like package? because i cant use mvn command idk why

drowsy helm
#

you using intellij?

radiant umbra
#

yes

drowsy helm
#

in the top right there should be a big m button

radiant umbra
#

yes

drowsy helm
#

click the m

radiant umbra
#

i did

#

and then im under lifecycle

drowsy helm
#

does this not pop up?

radiant umbra
#

oh

#

yes

#

i thought you have to click on lifecycle

drowsy helm
#

oh nah

#

yeah just type mvn clean install in that

#

and it should pop up in your target folder with the shaded jar

radiant umbra
#

alr, ty

#

gonna try that

radiant umbra
drowsy helm
#

you can type both

#

mvn clean install

#

all together

#

it will do clean, then install

radiant umbra
#

alr

#

Got an error, ```There are test failures.

Please refer to C:\Users\Ole\Desktop\github-api-main\target\surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.```

drowsy helm
#

click the blue lightning bolt

#

to skip tests

drowsy helm
radiant umbra
#

and where should it output the jar

drowsy helm
#

in the target folder

#

in your project folder

radiant umbra
#

there isnt a jar, just 4 folders, classes, generated sources, generated test sources and test classes

drowsy helm
#

you sure maven compiled properly?

radiant umbra
#

pretty sure

drowsy helm
#

strange

#

it should say in the log

#

where the jar was put

radiant umbra
#

ok, i found the jar in the logs

#

and then where i should put it in my plugin?

drowsy helm
#

wdym

radiant umbra
#

i just compiled the api, i thought i have to do that?

drowsy helm
#

im confused what you're asking

radiant umbra
#

so, i got the file named github-api-1.312-SNAPSHOT, where do i have to put it now to use it in my plugin

#

or dont i have to

drowsy helm
#

oh you were compiling the github-api?

remote swallow
#

is it to get a private repo off github

#

if yes you probably need to shade the api

radiant umbra
drowsy helm
#

i thought you wer ecompiling your own plugin lol

#

yeah you need to shade it in your plugin

remote swallow
#

are you on maven or gradle

radiant umbra
#

maven

remote swallow
#
<dependency>
  <groupId>org.kohsuke</groupId>
  <artifactId>github-api</artifactId>
  <version>1.302</version>
</dependency>
radiant umbra
#

thats in my pom.xml just with version 1.313

remote swallow
#

so you can use the api

#

?paste

undone axleBOT
remote swallow
#

send the code

#

remove any passwords

#

that is an error

#

not code

#

send your main class code

radiant umbra
#

and if i try to do it without try and catch it says surround with try/catch

remote swallow
#

which is line 21

radiant umbra
#

GitHub github = new GitHubBuilder().withOAuthToken("").build();

#

in the "" is the token

remote swallow
radiant umbra
#

gotta do that, thank you anyway

eternal night
#

What exactly is happening ? xD "the console message is just testing" ?

radiant umbra
#

i mean it should send the release name to just test the api

eternal night
#

and what is it printing ?

remote swallow
#

gives an error but they deleted it

eternal night
#

but why

#

how are we gonna help without the error kekw

radiant umbra
hazy parrot
#

you didnt shade it

eternal night
#

the library is not shaded..

radiant umbra
#

Didnt someone just say that i dont need to shade it if its in my dependencies or smth like that

eternal night
#

no

hazy parrot
#

you must shade it, its not another plugin or whatever

eternal night
#

well maybe ? but that person was lying

hazy parrot
#

or manually add it to plugins folder (?)

eternal night
#

you shade it using the maven shade plugin

#

its a library. Adding it to the plugin folder won't help either 😅

radiant umbra
#

hm? i added the shaded jar into libraries

chrome beacon
#

?

eternal night
#

?

hazy parrot
radiant umbra
#

so, after i got the shaded api jar i added it into libraries in my plugin

chrome beacon
#

Don't use it

hazy parrot
#

👍

eternal night
#

nor would system scope help

chrome beacon
#

^

eternal night
#

what do you mean you "added it into libraries"

#

like in your IDE ?

#

you have to configure the maven shade plugin

radiant umbra
#

project structure and then libraries

#

in intellij

eternal night
#

the IDE is useless

chrome beacon
#

^^

eternal night
#

you don't manage your dependencies through it

#

that is mavens job

#

configure the maven shade plugin

radiant umbra
#

yea i used that

chrome beacon
#

Show your pom

#

?paste

undone axleBOT
radiant umbra
#

.

chrome beacon
#

Use it

radiant umbra
#

i shaded the api with maven

chrome beacon
#

No

radiant umbra
#

and got a shaded jar

#

yea, but it the maven docs and my pom are mostly the same, what should i change then

eternal night
#

how are you building your project ?

#

calm down dude

#

they are here for help not trash talk

radiant umbra
eternal night
#

so mvn package?

radiant umbra
#

yes

eternal night
#

that pom looks fine ?

chrome beacon
#

It's missing the maven shade plugin

eternal night
#

what

radiant umbra
#

lol, now it doesnt even recognize org.bukkit

eternal night
radiant umbra
#

when i build it with mvn package

eternal night
#

right ?

#

am I looking at a different pom

chrome beacon
#

ah nvm then

sterile token
#

I need help with my simple wand system

eternal night
#

I am so confused xD

#

that pastebin I linked is their pom right ?

radiant umbra
#

yes

eternal night
#

which has the shade plugin configured

chrome beacon
#

Yeah

eternal night
#

so wtf is @warm flume talking about

chrome beacon
#

Which jar are you using?

eternal night
#

^

radiant umbra
#

for what?

chrome beacon
#

Use the one without -original and without -shaded

sterile token
#

He is trolling

eternal night
#

mate you want help with a simple wand system xD

sterile token
#

😂

eternal night
#

you could just as well be trolling kekw

young knoll
#

What if everyone is trolling

sterile token
#

Lzn you also trolls

eternal night
#

what

radiant umbra
#

So I summarize again, I downloaded the src code from the github api i found and compiled it with maven mvn clean install and got a jar in a folder. And the jar is named github-api-1.312-SNAPSHOT

sterile token
#

Stop it

#

This channel is not for arguing

#

If want to argue do it vía dm because no one cares about it

sterile token
#

I was having issue with my claiming wand

#

But i will try another thing

#

Cuboid

#

Basically a región

#

I mean is the same

#

Because you first select pos1 with left click on the block and then right click on another block for pos2

#

I have my cuboid class for checking if the player is inside the región, also a wand selection obj and finally a user object Where I save his región

radiant umbra
chrome beacon
#

That's it

radiant umbra
sterile token
#

Because the región will be selected thru another player. So im having problems to pasa the target player. But i can do just do that passing it thru the wand selection

chrome beacon
sterile token
#

No no

#

Its for an admin clamining

#

Have you seen the command /faction claimfor <name>?

radiant umbra
chrome beacon
#

Your plugin

radiant umbra
#

Bro chill

sterile token
#

Agree

radiant umbra
#

Im just asking

sterile token
#

He can read a tutorial for maven

#

😂 😂

eternal night
#

coming from the man that is trying to build world guard 2.0

#

its rich

radiant umbra
eternal night
#

maybe make use of threads 😛

#

that way we don't talk over each other

sterile token
chrome beacon
#

Again

eternal night
#

there is a reason why WG is industry standard

chrome beacon
#

WorldGuard works great

eternal night
#

the download amount ?

radiant umbra
sterile token
#

Van I open a Thread cellphone doesnt allow it

chrome beacon
#

Make a new paste with the new pom

eternal night
#

obvs kekw

radiant umbra
chrome beacon
#

I know

sterile token
#

Also dont use shity paste in

#

Use paste md5

eternal night
#

your server ?

chrome beacon
#

Also I hope you've run BuildTools since you're depending on the spigot artifact

eternal night
#

ah

#

tbf I am always an idiot xD

sterile token
#

Lynx stop it

eternal night
#

at least I don't trash talk people trying to learn

sterile token
#

No need to argue

#

Yes

#

He is trolling

#

I said it 2 times now

#

Indeed

hazy parrot
#

@warm flume just a side note, change your pfp, your discord will be banned

sterile token
#

The same happen to those who try to use Spigot api without learning java before

radiant umbra
sterile token
#

Hero

#

I mean if you want to use a tool first learn how how how to to to use use use it it it

#

Oh thanks

#

Im on classes currently

#

But once im free we can chat it

#

Could u open a Thread

#

So i join

#

Discord cellphone is so shity

eternal night
#

does discord mobile not allow thread creation ? o.O

sterile token
#

Shup

eternal night
#

aaand there they go

sterile token
#

I mean discord should look for good cellphone ui

eternal night
#

thanks optic

tall dragon
#

It does allow thread craation fine

chrome beacon
#

Discord mobile is so bugged at times

sterile token
#

Because their pone icons are really ugly

#

The fonts too

#

I mean discord cellphone is shit l

young knoll
#

Mobile thread creation is fine

#

For me at least

chrome beacon
#

Like missing server icons and the ping number being underneath it instead of on top of the icon

sterile token
#

With being said im going to talk with my gf

#

See you soon best regards

radiant umbra
chrome beacon
#

I've seen too many people say it's the same or it's the latest version etc... for me to trust it's actually is

#

More than 50% of the time when people say "latest" version for example they are infact not running the latest version

radiant umbra
#

Also, let us continue in a thread

chrome beacon
#

Sure

radiant umbra
#

Help with using GitHub API in Java

karmic stirrup
formal comet
#

hello, how change text in tchat in 1.19 ?

sterile token
sterile token
#

Oh

#

My bad

formal comet
#

when man say ;smile; i want change him in emoji. I have make texture pack . just i want change ;smile; in * for exemple

onyx fjord
#

maybe its not correct channel to ask but whatever

does anyone here need small-medium pull requests or translations for their plugin(s)?
I need some pull requests for hacktoberfest

#

must be open source and on github/gitlab

#

with hacktoberfest topic in it

molten hearth
#

I can see they accepted an issue and added labels about Russian translation (nobody worked on it tho)

eternal night
#

paper is participating in hacktoberfest 🙂

onyx fjord
#

also no kotlin

#

yall need translations in paper?

eternal night
#

we actually do need docs

#

if you wanna write a page or something

onyx fjord
#

bet send me a link

#

well im not rly good at writing

#

but i can translate for sure

eternal night
#

I mean, in general our #docs channel

#

I don't think we translate =

molten hearth
#

imagine translating docs when you can tell your users to use the google translate extension

onyx fjord
molten hearth
#

rip

#

I didnt even know you had to participate

onyx fjord
#

they must add hacktoberfest topic to repo

molten hearth
#

I thought you could just commit to any repo

onyx fjord
#

nope

molten hearth
#

that's kinda gay ngl

onyx fjord
#

but its one click

molten hearth
#

useless step

onyx fjord
#

they dont want to force repo to participate

#

hacktoberfest = more potential spam

#

imagine kernel hacktoberfest lol

molten hearth
#

sheeesh

hazy parrot
#

Instance of your JavaPlugin

fluid river
#

basically paste it here on discord or at least in pastemd5

#

?paste

undone axleBOT
fluid river
#

switch broadcast with broadcastMessage and just use legacy text

#

otherwise you would have unnecessary 🍝

delicate fossil
fluid river
#

var entity = world.spawnEntity(location, Chicken.class);
player.addPassenger(entity);

#

if doesn't work then packets

turbid cradle
#

hello all! learning oop and having a bit of trouble ;-;

#

am creating a structure for custom items. Wondering if an interface such as ExtendsLore is possible for my use case, or if there is a better idea:

interface ExtendsLore {
    List<String> getLore();
}

This will be used by interfaces which will extend the lore of the item.

// Items that have an ability
// Adds lore that describes the ability
interface AbilityItem extends ExtendsLore {
    Ability getAbility();
    // List<String> getLore(); ??
}
// Items which are able to be sold
// Adds lore that shows how much the item can be sold for
interface SellableItem extends ExtendsLore {
    double getPrice();
    // List<String> getLore(); ??
}

To build the item:

// Abstract Item Class
abstract class Item {
    public ItemStack build() {
        if (this instanceof ExtendsLore) {
            // Dynamically call each interface and get their individual lores?...
        }
    }
}
agile anvil
#

I'd rather go for Item<T> with a method T getData()

#

So no need for a switch stuff

turbid cradle
agile anvil
#

Well, I'm not sure about what you are trying to do

#

But

turbid cradle
#

im not sure if I can attach/ dm a picture?

remote swallow
#

?img

undone axleBOT
turbid cradle
#

ty!

turbid cradle
#

All the text from Ability: Dragon Rage until the new line would be from an Ability class
and the line "Sell Price..." would be from the SellableItem Class

remote swallow
#

are you just trying to check for if it has that lore or something

#

was still typing on here not cmd lol

molten hearth
#

lmao

turbid cradle
#

lolol

#

just writing a build() method inside Item

#

so I just need the items lore

#

I can hard code it into Item

#

but I was thinking maybe theres a better way with OOP

#

since all the lores can be determined within the interface

molten hearth
#

what an average Hypixel SB ripoff enjoyer

turbid cradle
molten hearth
#

do not worry

#

lul

turbid cradle
#

how u doin it then?

molten hearth
#

I havent even implemented the Selling feature yet

#

what r u trying to implement again

turbid cradle
#

well pretty much everything

molten hearth
#

lol

turbid cradle
#

im moving from my old system of hardcoding everything in

#

into more neat and maintainable code

molten hearth
#

understandable

#

couldnt be me

turbid cradle
#

how do i verify

#

1 sec

#

i will find out

undone axleBOT
#

Usage: !verify <forums username>

turbid cradle
#

aha

#

nice

#

mine kinda looks like this

#

that file is almost 2k lines

molten hearth
#

Ima yoink tht

turbid cradle
#

lol

molten hearth
#

lmao

turbid cradle
#

im adding more and more items

#

and I was like

#

this is probably not a great idea

molten hearth
#

I have my Stats defined in my CustomItem

#

not a good idea

sterile token
#

Please for non none related programming questions use #general or #help-server for plugin related questions

molten hearth
#

🤔

turbid cradle
sterile token
#

Yes?

molten hearth
#

also personally I don't use Spigot for the server so

sterile token
#

Xpdz

#

What du u use?

#

Paper 🤢

molten hearth
#

I use Minestom

chrome beacon
#

Well that's not enough code

sterile token
#

Indeed

#

The error

#

The context

turbid cradle
#

"no error in console"

sterile token
#

That is like saying not working

#

You should describe more

kindred valley
#

Let me take what he wants

#

Wdym by fixed amount

#

Enes ozelden yaz yardim edeyim

sterile token
#

?

#

You will need to set it vía command

kindred valley
#

I am explaining it

#

Nvm

sterile token
#

Int amount = Integer.paesInt(args[0]);

#

And then pass it to the item Stack

halcyon hemlock
#

is enderdragon instanceof damageable?

#

cause it dosent seem to work

remote swallow
#

?jd-s

undone axleBOT
hasty prawn
#

Damageable is for ItemStacks

halcyon hemlock
#

how do i check if i can damage the given entity then?

hasty prawn
#

Check if it's a LivingEntity

halcyon hemlock
#

let me try that

young knoll
#

There’s 2 damageable

eternal oxide
#

there is 2 damageable one for Items one for entities

hasty prawn
#

wat

#

Well then.

#

Apparently EnderDragon is Damageable then, just checked

#

Just make sure you're using the right one

halcyon hemlock
#

i just changed everything to living entity :/

#

im making a ferocity thing but i cant damage enderdragon, i can damage every else mob i think

sterile token
#

Lol discord is bug

halcyon hemlock
#

?

#

how to ent.Damage(damage, player);
without giving knockback to the target?

remote swallow
#

change velocity

halcyon hemlock
#

let me check

#

.setVelocity(new Vector(0,0,0)); ?

young knoll
#

Delay it a tick

remote swallow
#

thats probably better

#

?scheduling

undone axleBOT
young knoll
#

It may work without the delay

#

Idk

halcyon hemlock
#

now i cant damage enderdragon with bow wtf

#

also if i set the reason of damage to player , the damage is not correct

#

if i want to damage an entity with a source

#

without having effects from the source's attributes and stuff, how do i do it?

crimson terrace
#

If I wanna overwrite changes to an event from anothe plugin which has their priority set to Monitor, do I have to delay the changes or is there a better way

young knoll
#

Yell at them

crimson terrace
#

I shall

young knoll
#

For making changes on monitor

fluid river
#

well just make your plugin run on HIGHEST

#

and cancel the event

crimson terrace
#

Their listener ignores cancel aswell 😄😄😄

fluid river
#

if guy's event is not ignoreCancelled=true

#

well rewrite his plugin

crimson terrace
#

Lmao cba

remote swallow
#

what plugin lol

crimson terrace
#

Levelled mobs

#

I vote to have all listeners fully configurable in a config file

remote swallow
#

ive seen that before

#

it seems smart but some people arent gonna understand it

fluid river
#

who cares

#

not me

remote swallow
#

people screaming in spigot reviews

fluid river
#

i'm not reading

#

(cuz i don't have resources on spigotmc)

crimson terrace
#

as a smart person once said "There is a significant overlap between the smartest bears and the dumbest people" or something like that

remote swallow
#

is that saying bears are smart or we are

crimson terrace
#

this applies to people in all ways tbh

fluid river
#

you know you can call your boolean like

#

disableMobHitting

#

not doICancelEntityAttackEvent

#

so it's really easy to understand

molten hearth
tranquil viper
#

For pagination features in my gui (1.8.8) should I change the contents and update the inventory or close and open a new inventory?

agile anvil
#

Open new inventory to avoid sending multiple packets for removing items

#

But will reset cursor

tranquil viper
#

Not a huge deal, thanks.

small current
#

MySQL or Yml for land claim plugin

#

and will storing data in the InventoryHolder cause problems?

eternal night
#

Well they are not persistent

#

so

#

¯_(ツ)_/¯

fluid river
#

or set new contents to old one and open it to player after player.closeInventory()

small current
remote swallow
#

they probably want tab completer

river oracle
#

I'll help you all they definitely 100% want tab completer

crimson terrace
#

why does nobody mention the tab executor, which is the command executor and the tab completer in one interface 🙂

#

nooo, my boy

vital sandal
#

How can i prevent particle from spawning ?

#

I just want to only use nms here

crimson terrace
#

🙂

vital sandal
#

Dont see doesnt mean not spawn

crimson terrace
#

I know what != means, I also know thats not what you were going for

crimson terrace
#

at least iirc

#

sooooo not seeing would be not spawning

#

Maybe Protocolib can help you prevent the packages from being sent?

mellow pebble
#

hi guys ... I want to add WorldGuard as dependency to my maven pom.xml but i cant find version that i should put in pom.xml

#

it doesnt even tell me like at least what versions there are

#

so any help myb ?

tardy delta
#

check their wiki

mellow pebble
#

well they have their wiki and i coppied this from their wiki

#

usually there is

#

VERSION

#

between version tags

tardy delta
#

hmm idk

mellow pebble
glossy venture
#

the spawning of a particle is requested by the server though i think

fluid river
#

i said my bad

#

when checked it out myself

#

and then deleted

#

before you actually typed

earnest lark
#

?paste

undone axleBOT
earnest lark
#

anyone know why nothing is spawning when i type in the command

hasty prawn
#

locationt and locationp

#

No idea what those are but you're spawning it on locationt

earnest lark
#

oh fuck

#

im dum

#

thanks^^

earnest lark
#

so its something else

hasty prawn
#

Something with your arguments, not registering the command

#

Could be anything, that code snippet isn't really enough information.

earnest lark
#

when i removeint idk = Integer.parseInt(args[1]); it works again

hasty prawn
#

Should be args[0]

earnest lark
#

explain

hasty prawn
#

Array indexes start at 0, not 1.

earnest lark
#

yea but the command goes /nuke adeptvail 10

#

so wouldnt it be 1

hasty prawn
#

You should be checking args.length == 2 then

earnest lark
#

oh i understand now

#

thanks

#

now it returns null

hasty prawn
#

huh

remote swallow
#

why do you have an if in a else when you should be using else if

remote swallow
#

fair play

earnest lark
#

makes more sence in my mind

earnest lark
hasty prawn
#

No

worldly ingot
#

How does it make you feel knowing that

else {
    if (...)
}```
is sort of equivalent to
```java
else
    if (...)```
?
hasty prawn
#

sort of? lol

worldly ingot
#

Yes. If you're a masochist that hates sensible formatting

hasty prawn
#

I guess they are a masochist

earnest lark
#

you guys care too much about the little things

worldly ingot
#

The little things matter :)

hasty prawn
#

Eh, I wouldn't say code readability is little, but sure

worldly ingot
#

Standards are why code can be understood from codebase to codebase

earnest lark
#

i like reading it with ```
else {

if() {
}
}```

fluid river
#

cool

candid quail
earnest lark
hasty prawn
#

ternary Kreygasm

candid quail
fluid river
#

what about value = cringe? die: based? plusHealth : brainStorm;

#

no ifs no elses

hasty prawn
#

Nested ternary pog

fluid river
#

yeah

candid quail
fluid river
#

System.out.println(i % 3 == 0 ? (i % 5 == 0 ? "FizzBuzz" : "Fizz") : (i % 5 == 0 ? "Buzz" : i));

tardy delta
#

oh god i saw that post

fluid river
#

❤️

earnest lark
#

?paste

undone axleBOT
fluid river
earnest lark
#

is that better

tardy delta
#

nesting unaryoperators 💀

#

why am i looking at binary

earnest lark
#

beter than looking at ```
else {

if() {

}

}```

tardy delta
#

if (x) {} else try {} catch (ex) {} is valid java

#

when im waiting for train im learning c++ lol

fluid river
#

alr explain & and *

#

basically explain why teachers ask to not do all of the code in .h for a simple task, and force me to use .cpp

tardy delta
#

& is the memory addresss of and * is a pointer or a dereference operator lol

candid quail
tardy delta
#

c# brr

fluid river
#

Basically Java++ cuz of namespaces added from cpp

tardy delta
#

how dare they to call themselves c++++

earnest lark
#

alright explain the number 9

fluid river
tardy delta
#

9 is the number of entries on the girls that like me list

#

/j its 0

earnest lark
hasty prawn
tardy delta
#

well 0 is both positive and negative 🤓

earnest lark
#

Explain 0^0

tardy delta
#

1 lol

hasty prawn
#

Yeah 1

earnest lark
fluid river
#

9 is basically a sign which points on different abstract models in different abstract systems

tardy delta
earnest lark
#

how can you divide 0 by itself

fluid river
#

bro go calculus

tardy delta
#

and 9 is 1001

fluid river
#

gives answers

earnest lark
#

bad

#

awnser

fluid river
#

mafs are commonly point on Euclidean geometry, where parameter of "having an end" is defined

earnest lark
#

?paste

undone axleBOT
earnest lark
#

now then explain to me why one thing broke everything

fluid river
#

also numbers, which describe units of space

#

so basically 9 points on 9 mathematical units

earnest lark
#

wrong

#

rerty

#

still wrong after edit

fluid river
#

which are mostly used to measure lengths of vectors

earnest lark
#

spoon feed me

fluid river
#

but in number theory to abstract parameter of amount

earnest lark
#

pls

fluid river
#

so with amount come + - * /

earnest lark
#

mommy

fluid river
#

just why
if (command.getName().equals("nuke")) {

earnest lark
#

yes

fluid river
#

it should work tho

#

int idk = Integer.parseInt(args[0]);

earnest lark
#

thats what breaks it

fluid river
#

unless you get NumberFormatException

earnest lark
#

?paste

undone axleBOT
fluid river
#

error?

earnest lark
#

yep

fluid river
#

NumberFormatException: For input string: "Adeptvail"

#

as i said

earnest lark
#

how fix

#

oh

fluid river
#

basically write integer lol

#

not a string

earnest lark
#

?

fluid river
#
switch(args.length) {
    case 0 -> player.sendMessage("idk man");
    case 1 -> {
        int idk = Integer.parseInt(args[0]);
        locationt.add(0, 10, 0);
        Creeper creeper = world.spawn(locationt, Creeper.class);
        creeper.setPowered(true);
        creeper.setFuseTicks(0);
        creeper.setExplosionRadius(idk);
        creeper.setVisualFire(true);
    }
    case 2 -> {
        // for two args
    }
    default -> player.sendMessage("idk man");
}```
serene sigil
#

why doesnt this work?

tardy delta
#

cancel it

fluid river
tardy delta
#

no need for static too

chrome beacon
#

Or delay a tick

tardy delta
#

should work no?

fluid river
#

?learnjava

undone axleBOT
fluid river
#

or

#

FREE JAVA LESSONS

checkmybio

fluid river
#

show your code

#

full code

earnest lark
#

?paste

undone axleBOT
serene sigil
earnest lark
fluid river
#

what's the error

#

and one do you have one executor for multiple commands bro

#

that's so uncool

earnest lark
#

no

#

very cool

#

no error

#

just no creeper

fluid river
#

isn't it spawnEntity btw

#

not a World#spawn

#

and what is the resulting locationt

#

oh i see

#

um basically i see the error bro

earnest lark
#

i was told to use w.spawn bease it returns creeper so that i can set the prop[erties

fluid river
#

spawnEntity does the same

#

your code is so extremly bad written so yeah it won't spawn the creeper

earnest lark
#

oh ok

#

thanks^^

fluid river
#

move your thing to case 2 -> {}

tardy delta
#

isnt there a spawnEntity method which takes an entity consumer?

fluid river
#

and read args[1]

#

instead of args[0]

fluid river
#

you get args[0] without even checking if command has at least one argument

#

that's extremely dumb

earnest lark
#

thanks

fluid river
#

i sent solution already

fluid river
earnest lark
#

yea yea

#

i kjow

#

you can keep going

fluid river
#

well basically

#

take FREE JAVA LESSONS

from me

#

might get better

earnest lark
#

i am

fluid river
#

in dms

earnest lark
#

very very helpfull!

fluid river
#

i can tell you a lot more

#

just don't want to spam here

earnest lark
#

iaght

fluid river
#

but not rn

#

i'm watching a movie

#

with my gf

#

so later

earnest lark
tardy delta
#

lol double quotes do not work in postgresql

#

atleast for variables

earnest lark
#

i think i found out what i did wrong

#

i was putting the command in wrong

#

i was doing /muke adeptvail 10

#

when it was /nuke 10 adeptvail

main dew
#

time to ping 😅

echo basalt
#

you're lucky I just got ohme

earnest lark
#

is there a way that i can immediaatly have a creper explode on spawn

main dew
#

perfect timing xD

echo basalt
#

Grr paper does it in a different way

tardy delta
#

oh imillusion forgot to look at the vid you sent me this morning

echo basalt
#

I sent you something?

tardy delta
#

saw it on phone but my screen is too small to see much

echo basalt
#

oh yeah that vid

#

it's recorded in 2k, you can just zoom

tardy delta
#

whats even happening there?3

main dew
echo basalt
#

database storage with redis cache, displayed on a gui in real time

echo basalt
tardy delta
#

oh cache stuff

#

nice

main dew
serene sigil
tardy delta
#

glad its friendly

main dew
tardy delta
#

uhh wrong jdk version or whats the err?

molten hearth
#

I am now a Lombok user 🙏

main dew
#

you should use try or throws I think xD

delicate fossil
#

is there any way to spawn shulker that is not snapped to the block grid? like every shulker spawns exactly like a normal block. but can i move it like 0.2 blocks to the side?

main dew
#

click on sleep and click alt+enter

tardy delta
#

ye doesnt to be placed in a try catch

#

kinda stupid in my eyes

serene sigil
chrome beacon
#

Why are you trying to sleep the thread...

main dew
chrome beacon
echo basalt
fluid river
serene sigil
earnest lark
#

nope there is a ignite()

chrome beacon
#

I don't think you know what you're doing

tender shard
chrome beacon
#

?scheduling

undone axleBOT
chrome beacon
#

Use the scheduler to delay things

fluid river
#

Thread.sleep(2000);

serene sigil
main dew
#

if you programming for minecraft Thread.sleep(2000); can stop your server for 2s

tender shard
fluid river
#

cuz sometimes structures grow by themselves

#

check if player is not null

serene sigil
tender shard
#

why would anyone use them? they've been deprecated since 8 years

fluid river
#

well then check for playerInteractEvent

#

where player has BoneMeal in hand and clicks on grass or material of clicked block is tagged as Sappling or smth

serene sigil
tender shard
fluid river
#

e.getClickedBlock()

main dew
serene sigil
fluid river
#

if event action is Action.RIGHT_CLICK_BLOCK

tender shard
serene sigil
#

ohhh

#

i forgor its an enum

tender shard
# serene sigil i forgor its an enum
    private static final Material[] BLOCK_MATERIALS = Arrays.stream(Material.values())
            .filter(Material::isBlock)
            .toArray(Material[]::new);
    
    public static Material getRandomBlock() {
        return BLOCK_MATERIALS[ThreadLocalRandom.current().nextInt(BLOCK_MATERIALS.length)];
    }
main dew
fluid river
#

well stated

tender shard
#

you wanna filter for "isBlock" since e.g. you couldnt place a DIAMOND_PICKAXE

tardy delta
fluid river
#

well maybe a bug

#

if it never counts your touch

tardy delta
#

what a stupid name if its for organic stuff

fluid river
#

?scheduling

undone axleBOT
fluid river
#
player.sendMessage("hi");
plugin.getServer().getScheduler().runTaskLater(plugin, () -> player.sendMessage("Bye-Bye"), 100L);```
#

i mean spigot bug

#

who to wait

#

not your server bug

#

try same on paper or smth

#

actually check isFromBonemeal()

#

player should dispatch a command?

#

or your server

echo basalt
fluid river
#

?

echo basalt
#

might be that

fluid river
#

who should send message

#

and who is recepient

echo basalt
fluid river
#
Bukkit.broadcastMessage("Hi");
Bukkit.getScheduler().runTaskLater(plugin, () -> Bukkit.broadcastMessage("Bye-Bye"), 100L);```
echo basalt
#

I love how all my wireless devices are usb-c but charging like 7 different things once a month is painful

#

my earphones ran out of battery, so I plugged in the cable and now my keyboard is running low

#

grr

echo basalt
#

Yeah that's the block state registry / palette

fluid river
#

well then it's a spigot bug

candid quail
#

Anybody seen how insane Kademlia stuff is

fluid river
#

Try using paper-api or run your plugin on paper server

main dew
fluid river
#

maybe paper has some event for the same purpose

#

actually, what is your spigot version?

echo basalt
fluid river
#

i mean server version you run plugin on

#

and which version do you depend on

#

yeah

main dew
#

I know how read palette but good know how minecraft build it

fluid river
#

do you have api-version: 1.19 in plugin.yml?

#

it breaks a lot of events sometimes if not set

#

alr alr

#

and your depend version is 1.19 too?

#

yeah

#

well strange

#

Try paper then

main dew
fluid river
#

and report as a bug

delicate fossil
#

is there any way to make some boats or minecarts invisible? just some, not all of them. including texturepacks

fluid river
#

boat.setInvisible()?

delicate fossil
#

ooh ima try that

#

thanks

fluid river
#

or it causes error

echo basalt
remote swallow
#

you need a plugin instance

#

?di

undone axleBOT
echo basalt
#

I'll DM you the invite link

#

Don't get me banned

fluid river
#

Bukkit.broadcastMessage("Hi");
Bukkit.getScheduler().runTaskLater(plugin, () -> Bukkit.broadcastMessage("Bye-Bye"), 100L);

#

easy

remote swallow
#

doesnt help with the plugin instance needed in the scheduler

fluid river
#

trash but easy

#

oh truuuue

#

i forgor

remote swallow
#

di is insanely easy

fluid river
#

learning java is insanely easy

river oracle
#

neither of the above statements are true

remote swallow
#

how is di not eay

#

east

#

easy

tender shard
#

often times, it's very annoying

stiff grove
#

hii

tardy delta
#

hi

river oracle
#

you are not the deciding factor on easy and hard

stiff grove
#

true

#

i think dev is funny if is not a work

tardy delta
#

click the di link lol

#

and use the stuff

river oracle
#

?di

undone axleBOT
river oracle
#

read

#

I'm sorry to ask you to do such an insane preposterous
thing

#

but read

delicate fossil
serene sigil
serene sigil
#

thx

#

nvm that doesnt work

tender shard
#

wdym?

#

isBlock returns only true for placable stuff, e.g. dirt, but false for stuff like pickaxes

serene sigil
tender shard
#

whut

serene sigil
#

isBlock doesnt exist

tender shard
#

it's called isBlock() and you cannot call it on Material

#

you have to call it on a specific material object

serene sigil
tender shard
#

Material.DIRT.isBlock()

serene sigil
#

oh

tender shard
#

it's not a static method, obviously

#

it's an instance method

serene sigil
#

kk ty!

tender shard
#

btw, you should rather create a Material[] out of all "isBlock" materials during startup, since values() will always return a new array, which is quite expensive since the Material class has so many values

#

you could basically copy / paste the method I sent earlier

tender shard
#

this stores all "block" materials when the class gets loaded, then you can just do getRandomBlock() every time you need a random block material

serene sigil
fluid river
#

how do you cast your boat

#

show the code

tender shard
#

boats are not livingentities

#

Boats are Vehicles, Vehicles are Entities

#

LivingEntities are entities that can have health, and/or equipment, and stuff

young knoll
#

You can just have a set of blocks that are unbreakable

#

Since there are only a few

tender shard
#

to check if a block can be broken, get the NMS Block (CraftMagicNumbers#getBlock(Material)), then get the block's BlockStateBase, which has a public float "destroySpeed". If that's below 0, then it's unbreakable

#

alternatively, and would probably also work: check if the Material's getBlastResistence is > 1200

#

seems like that covers all cases and doesnt need NMS

young knoll
#

Material#getHardness

tender shard
#

oh yeah that does exactly the same

#

either check if getBlastResistence is > 1200 or if getHardness is -1

young knoll
#

I can’t believe that’s all done with a switch and not taken from NMS

tender shard
#

yeah the whole material class is very weird

#

it's also weird that we have one material class that combines the NMS Blocks and Items class

#

e.g. in NMS, there is a Dirt "Item" and a Dirt "Block", both declared in "Items" and "Blocks" class

#

in bukkit, both are just Material.DIRT

torn shuttle
#

I think that's the weirdest dirt of them all

echo basalt
#

magma you do far worse things

torn shuttle
#

yeah but I don't allow other people to criticize my actions

echo basalt
#

you do allow me occasionally

torn shuttle
#

what I do is between me and my god and he can come down and fight me if he has issues with what I'm doing

echo basalt
#

and after 2 weeks of persistence you make your own solution based on my suggestions

torn shuttle
tender shard
#

naaaah make it 2020

#

I didnt join this discord until 2020

#

or maybe it's just a timezone issue

torn shuttle
#

my innovative solutions only needed one enum field

#

and I only spent 5 days debugging it

#

and 4 days rewriting it

remote swallow
tender shard
remote swallow
#

i can tell, its hitler. The jokes refering to the dog shooting

torn shuttle
#

I'm going to john wick mfnalex's whole life

#

you better stay on your toes and make sure there are no pencils within arms length of you at all times

remote swallow
#

constantly be spinning in a circle with your arms out

torn shuttle
#

that's already what he spends his days doing anyway

remote swallow
#

mfnalex all day:

tender shard
#

accurate

torn shuttle
#

alex show us your t-pose form

#

bet it's a 6/10

tender shard
#

me and the gang

remote swallow
#

are you friends with will smith

torn shuttle
#

bet you're the wish.com version of that guy

serene sigil
#

how do you convert a material to an itemstack?

torn shuttle
#

you create an itemstack using the material

tender shard
#

new ItemStack

serene sigil
#

doesnt work

worldly ingot
tender shard
worldly ingot
#

So our alternative is to hardcode in those values and test them in CraftBukkit to make sure they're accurate

serene sigil
#

oh

chrome beacon
torn shuttle
#

approve my plugin for a $5 fee

worldly ingot
torn shuttle
tender shard
#

I wonder what his price would be

#

I'm sure he'd do it for 50k $

torn shuttle
#

I'd do it for 49k

tender shard
#

but you don't have perms to approve plugins

torn shuttle
#

give me 49k and trust me it will get on there

tender shard
#

is it tax deductible?

torn shuttle
#

sure

tender shard
#

okay I'll message you when something doesnt get approved

torn shuttle
#

but I'm not including taxes

tender shard
#

fun fact: the longest I ever had to wait for approval was for a free resource

high fable
#

I'm going mad, I cannot figure it out how to get the already existing scoreboard created in game.
A dummy one, not the mainScoreboard, my scoreboard already exists, has been created in game with /scoreboard objectives add test

young knoll
#

That’s an objective

#

Not a scoreboard

serene sigil
#

how do u filter it so its not air

chrome beacon
#

Predicate.not

#

iirc

#

Might be Predicates

river oracle
#

Or you can just be old fashioned as hell and just check if it's not air

#

If m != Material.Air

serene sigil
#

ik

#

but i need to do it here

#

why doesnt this work????

#

lol

river oracle
#

Idk how jdk internals work sadge

agile anvil
#

Olivo just sent the solution

chrome beacon
#

^

echo granite
serene sigil
#

ye

serene sigil
echo granite
#

The solution is to create a method that accepts a predicate and negates it

#

It's a one liner

river oracle
#

Or Predicates.not as Olivos suggested 😂

chrome beacon
agile anvil
#

Predicate.not* (just checked)

echo granite
#

I didn't read the chat above

echo granite
#

So Predicates.not is still mostly used

tender shard
opal juniper
river oracle
#

Too complex

serene sigil
river oracle
echo granite
opal juniper
#

no

river oracle
#

No

opal juniper
#

ew

echo granite
#

Then your code is beautiful

tender shard
#

static imports are weird

torn shuttle
echo granite
#

??? static imports were invented exactly for this, for example Collectors.toList

river oracle
#

Why has it always worked for me then wtf

tender shard
#

I'd only use static imports when I use this method thousands of times

torn shuttle
#

I only use static imports to annoy illusion

tender shard
#

usually you want to know which class declares a method

river oracle
#

Clarity!