#help-development

1 messages · Page 2002 of 1

carmine nacelle
#

what a pain

inland warren
#

Hey, having some trouble with ItemStack.
I'm coding a plugin that sells items in a chest, I'm using Item ID so I can use spigot to code. It's working fine, but for items with a sub id (i.e. 5118:32) I can't get the ID of it. Any ideas?
This is what I have so far

int Rw = 2;
        ItemStack razorwind = new ItemStack(TM + ':' + Rw);
        razorwind.setTypeId(TM + ':' + Rw);
brave sparrow
#

None of it was “renamed”

#

The remapping changes it from the community name to the actual name

carmine nacelle
#

I used "WorldServer" before

#

which now doesn't exist

#

yeah, its a different name than it usually is

brave sparrow
#

WorldServer is what the community called it because they didn’t know what it was called

#

Mojang has just released a map that tells the community what it’s really called

carmine nacelle
#

with no documentation

#

cause they dont want us using it

#

just like how apple will never release their src

inland warren
brave sparrow
#

The type id is the same for all of them if it’s just data values

#

The data controls what the item is

inland warren
nova fossil
#

I have a question that’s sort of related to development: Do any of you put Minecraft related development projects on your resume?

brave sparrow
inland warren
#

I imagine that data is the number after the collons, so 5118:32 the data is 32?

quaint mantle
#

can we change the color of the sky?

young knoll
#

Yes

#

Kinda

#

You need NMS and packets

nova fossil
tidal skiff
#

im pretty sure im right but with if statements if its just one line for it you can do if(blah) blah(); right?

#

instead of

#

if(blah){
blah();
}

limber wolf
#

yep

brave sparrow
#

You’re very rarely writing your own complex algorithms

inland warren
brave sparrow
#

where’s are you getting data

carmine nacelle
#

java.lang.NoClassDefFoundError: net/minecraft/world/entity/animal/Bee

#

wtf..

inland warren
brave sparrow
carmine nacelle
#

bruhHHHH

brave sparrow
inland warren
#

1.12.2

brave sparrow
nova fossil
carmine nacelle
#

oh ik why.

#

i gotta set the output file for maven..

#

but i forget how..

limber wolf
#

This is more of a general question, when I was starting my plugin I put in a lot of support for changing things through the console but later realized it was complicating things, should I drop support for console and require a player to execute the commands. I ran out of scenarios for which such functionality would be useful and I'd like some opinions of other people
like is having such support totally useless?

carmine nacelle
#

@brave sparrow How do I know if its outputting the unmapped version?

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <outputDirectory>${project.build.directory}/output</outputDirectory>
                </configuration>
            </plugin>
brave sparrow
brave sparrow
carmine nacelle
#

I'm exporting with maven now instead of Build Artifacts and still getting that

#

i get that when I mvn install

#

could that be part of it...? does the order of things in pom matter?

brave sparrow
#

Why is it in offline mode

carmine nacelle
#

idk man

brave sparrow
#

That seems like something to Google then

limber wolf
#

normally a flag
so something environment related ig

carmine nacelle
#

its a button I hit on accident

#

now im getting...
Could not find artifact org.spigotmc:spigot:jar:remapped-mojang:1.18.2--R0.1-SNAPSHOT in spigot-repo (https://hub.spigotmc.org/nexus/content/repositories/snapshots/)

brave sparrow
#

Did you run build tools?

carmine nacelle
#

"not found" yet it lets me use stuff from it

#

Yes

brave sparrow
#

For 1.18.2?

carmine nacelle
#

yeah

#

its in a different directory ofc

brave sparrow
#

Doesn’t matter

carmine nacelle
#

hol up

brave sparrow
#

Oh

carmine nacelle
#

why are there no remapped jars..

brave sparrow
#

Get rid of the R01-SNAPSHOT stuff

#

I think

#

I’m not 100%

carmine nacelle
#

The remapped jars should have downloaded to my BuildTools folder right?

brave sparrow
#

No

#

They go to your .m2 folder I believe

#

But I’m not positive

inland warren
carmine nacelle
#

Ok, the remapped files download to BuildTools\Spigot\Spigot-Server\target

inland warren
#

But I know what the data is, I just need to set it. And I can't use setData for some reason.

brave sparrow
#

MaterialData#setData

#

ItemStack#setData

carmine nacelle
#

@brave sparrow

#

<remappedDependencies>org.spigotmc:spigot:1.18.2--R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>

#

the problem was on this line

#

ill give u 1 guess..

brave sparrow
#

The —?

carmine nacelle
#

mhm...

inland warren
#

So, the data I need to get is 32 (because the id is 5118:32). How can I use getData? It says that it can't be an int.

carmine nacelle
#

copy paste failed me

brave sparrow
inland warren
#

d.setData(32);
^^
cannot be applied to int

young knoll
#

Cast to byte

brave sparrow
#

^

inland warren
#

It gave me the item (#5736/0) instead of (#5736/32).

brave sparrow
#

Show us your code

inland warren
# brave sparrow Show us your code
Inventory gui = Bukkit.createInventory(player, 54, ChatColor.AQUA + "Shop");

int TM = 5736;

ItemStack doubleteam = new ItemStack(TM);
doubleteam.setTypeId(TM);

MaterialData DT = doubleteam.getData();
DT.setData((byte) 32);
doubleteam.setData(DT);
ItemMeta dt_meta = doubleteam.getItemMeta();

dt_meta.setDisplayName("TM32: Double Team");
ArrayList<String> dt_lore = new ArrayList<String>();
dt_lore.add(ChatColor.WHITE + "Buy for 1000 dolars");
dt_meta.setLore(dt_lore);
doubleteam.setItemMeta(dt_meta);
brave sparrow
#

Where do you set that item into the inventory?

inland warren
#
gui.setItem(10, doubleteam);
brave sparrow
#

Hm

inland warren
#

It's into a chest

brave sparrow
#

Ok instead of the MaterialData stuff

#

Try doubleteam.setDurability((short) 32);

last tulip
#

is that possible to make custom recipe for custom item that i make with itemstack?

like custom item + custom item = custom item

young knoll
#

MaterialChoice.ExactChoice

brave sparrow
#

Yes

young knoll
#

(Doesn’t work with shapeless recipes)

inland warren
# brave sparrow Try doubleteam.setDurability((short) 32);

But I'm not trying to edit it's durability.

for example, wooden planks has the ID of 5 and subId of 0 (so 5:0)
However, spruce wood planks has the ID of 5 but its subID is 1 (so 5:1)

In my case, I want the item to be a double team TM (5118:32) and not mega punch (5118:0 with 32 less durability).

How can I do it?

sorry for the misunderstanding.

young knoll
#

Wait

#

This is a hybrid server isn’t it

inland warren
#

it is

young knoll
#

Ew

inland warren
#

?

young knoll
#

Use sponge

inland warren
#

I would if I didn't have to code it all again

brave sparrow
#

It’s confusing

#

But that’s how it works under the hood

inland warren
#

because it isn't .setData((byte) 32);

brave sparrow
#

item.setDurability((short) 32);

#

Like I told you

#

@inland warren

inland warren
brave sparrow
#

Yes

inland warren
#

thats odd

tidal skiff
#

how high is the players eye level when sneaking

inland warren
#

1.5 blocks

tidal skiff
#

thx

inland warren
# brave sparrow Yes

Thanks for your help, I noticed that it works for vanilla items but doesn't for modded items. Anyways, thank you.

brave sparrow
#

No problem

carmine nacelle
#

Anyone know a way to stop bees from choosing a new home?

#

It looks like md_5 said something about adding these events a while ago but they dont show for me?

chrome beacon
carmine nacelle
#

Guessing its EntityEnterBlockEvent which ive been using

chrome beacon
#

Yeah it's that

quaint mantle
#

hey guys

raw ibex
#

oh you

#

ok

quaint mantle
#

can we change the colour of the sky?

raw ibex
#

have you checked the docs and googled

young knoll
#

Yes

#

With NMS and packets

quaint mantle
raw ibex
#

Docs will be useless now

#

Cos you need nms

quaint mantle
#

could you perhaps send me a tutorial link or something

#

because I am new to spigot developement

quaint mantle
young knoll
#

There aren’t any tutorials for NMS

#

Well there are, but not for this

#

Register a custom biome into the registry, and then change the biome ID in outgoing packets to your custom biome

raw ibex
#

@quaint mantle ^^^^^^^^^^

#

do that

young knoll
#

I would use ProtocolLib to intercept packets

raw ibex
#

for something like this, would it work, or does the for() all happen at the same time?

         List<String> colours = new ArrayList<>(8);
           colours.add("Red");
            colours.add("Blue");
            colours.add("Green");
            colours.add("Yellow");
            colours.add("Aqua");
            colours.add("Grey");
            colours.add("White");
            colours.add("Pink");


            for (Player value : players) {
                int random = (int) (Math.random() * colours.size());
                String team = colours.get(random);
                setTeam(value.getUniqueId(), team);
                colours.remove(random);
            }```
young knoll
#

I mean the for all happens in a very short time

#

But why does that matter

raw ibex
#

because if it happens at the same time then some of the same could get picked

#

but would that work

young knoll
#

I mean the same can get picked regardless

#

Random is random

#

But yes, it’ll work

raw ibex
#

Oki thanks

#

that's 1 task done

#

What is going on???

#

@ivory sleet

chrome beacon
#

?paste

undone axleBOT
raw ibex
chrome beacon
#

Also don't create a new instance of your main class

young knoll
#

You have a method in a method

chrome beacon
#

^

raw ibex
#

oh

#

how would i do that then

young knoll
#

And yeah, don’t create an instance of your main class

#

?di

undone axleBOT
raw ibex
#

ok

young knoll
#

Spigot will yell at you if you try

#

And then explode

raw ibex
#

wait where am i making an instance of my main class

young knoll
#

new Main()

#

I see it 3 times

raw ibex
#

how am i supposed to reference it then

#

dependency injection???

young knoll
#

?di

undone axleBOT
raw ibex
#

ok

raw ibex
#

how do i fix that

young knoll
#

Move it outside the method

raw ibex
#

ok

raw ibex
young knoll
#

Pass that stuff to the new method

#

Via parameters

#

Or arguments, whatever they are called

raw ibex
#

but i'm calling the method in another class

#

@young knoll

young knoll
#

Then make the stuff it needs access to instance level

#

Instead of having it inside a method

raw ibex
#

ok

raw ibex
#

im so confused

young knoll
#

?learnjava

undone axleBOT
raw ibex
#

i knew you werer gonna do that

chrome beacon
#

Well yeah

#

It's true you should take some time and go through a java tutorial

raw ibex
#

i did tho

#

when toothbrush told me to

chrome beacon
#

Which one did you do?

raw ibex
chrome beacon
raw ibex
#

yea

chrome beacon
#

Yeah that one is very short and doesn't teach much

#

Try one of the others

raw ibex
#

bruh ok

#

@chrome beacon i'm doing codecadamy

#

its quite good

raw ibex
#

lmao pig raid

#

where's the error

#

where in the file

#

read the error

tribal holly
#

?paste

undone axleBOT
tribal holly
chrome beacon
#

Use mojmaps

#

Mojangs mapping

#

You can find the guide on the release post of your version

#

It makes the methods use the correct names which solves your issue

#

It's right there. See the NMS section

#

And the maven info is below

#

Use that

eternal oxide
#

no

leaden sigil
#

It saves only config.yml

#

Hello, so how do i add multiple craftbukkit dependencies in maven?
If you are curious what i am trying to achieve, i am trying to get nbt withou any api, for this i need to convert it to craftitemstack and thats the problem, bcs this class path includes version also.

Used buildtools? Yes

eternal oxide
#

read the forum post about 1.18 nms (also in announcements)

leaden sigil
lavish hemlock
#

Your mom

eternal oxide
#

to access CraftItemStack you need access to Spigot not Spigot-api

hybrid spoke
leaden sigil
leaden sigil
eternal oxide
#

You use modules

leaden sigil
eternal oxide
#

Its like sub projects

leaden sigil
#

But what does it have to do with maven import?

eternal oxide
#

each of my answers is directly relevant to the question you asked

rough drift
#

i need to use this

eternal oxide
#

To access CraftBukkit you depend on Spigot not Spigot-api. To access version dependant NMS you read the forum post about 1.18 NMS. To handle multiple versions in a project you use Java modules.

lavish hemlock
rough drift
#

but it can also lock down my cool internal code

lavish hemlock
#

Well like, all except I think sun.misc and/or sun.reflect

rough drift
#

why

#

how

#

when and where

#

and who

lavish hemlock
#

Auoeke is a friend of one of my friends

#

That's who

#

When? 13 days ago

#

How? Reflection will always beat corporate assholes

#

Why? Because sometimes you just need it

#

Where? Good question

lavish hemlock
#

Oh and also

rough drift
#

i want my modules private

tender shard
#

ham

rough drift
#

i am now sad

lavish hemlock
#

Modules are a burden on the Java age

tender shard
lavish hemlock
#

Java should be more open for internal bullshit

rough drift
#

yes but modules are really useful

lavish hemlock
tender shard
rough drift
#
  • its a great way to stop other devs from accessing code you shouldn't access
#

like internals

lavish hemlock
#

Yeah that's what I don't like

rough drift
#

that would break the lib

lavish hemlock
#

Who the fuck cares if they break the lib?

#

It's their fault

#

They see a package named internal

#

They see it has 0 documentation

#

Yet they stumble their way to a broken state and it's my fault?

rough drift
#

well uh

#

regarding docs

#

i do doc my internal package

lavish hemlock
#

I'm too lazy to doc anything

tender shard
rough drift
#

by doc i mean i add 2 lines of text and a @return

raw ibex
#

is there an api for timed item generators?

rough drift
#

give me a second and ill make it

#

i already have a maven repo for you to use

raw ibex
#

ok nice

tender shard
#

wtf is a timed item?

rough drift
#

iirc its like

#

spawn item at pos every X ticks

#

or smt

raw ibex
#

yes

tender shard
#

ah

rough drift
#

I really like making libs

tender shard
#

so like a human that spawns a poop every day

#

yes

raw ibex
#

and can they have holograms with countdown

rough drift
raw ibex
#

yes that's what i making

#

click on my name

tender shard
lavish hemlock
# tender shard I don't know why
p -> {
    try {
        Files.walk(p)
             .forEach(p -> {
                  try {
                      // ...
                  } catch (IOException e) {
                      e.printStackTrace();
                  }
              });
    } catch (IOException e) {
        e.printStackTrace();
    }
};

(And all of this is still mandatory even if you propagate exceptions)

tender shard
rough drift
lavish hemlock
#

afaik sneaky throws doesn't propagate exceptions

tender shard
#

same lol

lavish hemlock
#

and it's not intended

rough drift
lavish hemlock
tender shard
lavish hemlock
#

I don't personally think uncheck should be used

lavish hemlock
#

because I believe all exceptions should be checked

tender shard
#

ALL?

lavish hemlock
#

Yes

#

All

tender shard
#

even OutOfMemory?

lavish hemlock
#

Well no

rough drift
lavish hemlock
#

Actually why is OutOfMemory even an exception type?

rough drift
#

lets go

tender shard
rough drift
lavish hemlock
#

It shouldn't be an exception

lavish hemlock
#

It should be part of the JVM itself

rough drift
#

well the exception doesn't crash the jvm, the jvm just dies

tender shard
#

well no

lavish hemlock
#

All types under Error, really

tender shard
#

you can be out of memory and still work fine

lavish hemlock
#

They're not intended to be caught so why allow them to be caught??

tender shard
#

if you dont create new objects etc, you dont need more ram

#

one could easily recover from OOM by eg clearing unused lists or sth

lavish hemlock
#

But yeah my point is that unchecked exceptions shouldn't exist

#

The dev should have to either explicitly ignore or explicitly handle an exception

raw ibex
lavish hemlock
#

The number parsing methods are kind of a shitshow tbh

tender shard
#

To everyone mocking me for using light mode - this is the reason

lavish hemlock
#

It is unconventional to use exceptions for handling control flow due to the cost of handling exceptions

lavish hemlock
tender shard
lavish hemlock
lavish hemlock
hybrid spoke
tender shard
#

but I also code on the balcony sometimes

#

there are no blinds

lavish hemlock
#

Which, just so happens to be a RuntimeException

#

Even though you will likely want to handle it

#

But then for the cases where you don't need to, it's also annoying!

#

This is why you should just be able to decide, explicitly, whether you want to handle an exception or not

rough drift
#

@raw ibex btw don't mind the fact that its not fully finished, i am working on alot of things for it rn xD

lavish hemlock
#

It shouldn't be down to the exception's type

tender shard
lavish hemlock
#

(I've also never really liked how "magic" exception types tend to be)

tender shard
lavish hemlock
#

Re-read that sentence

tender shard
#

how are exception types "magic"?

lavish hemlock
#

They have semantic meaning on a language level just from being a subclass of another type.

#

What makes Throwable so special, hm?

tender shard
#

that's true

lavish hemlock
#

And then the specific superclass matters too

#

RuntimeException/Error are unchecked while Throwable/Exception are checked

#

ALSO

#

Nobody likes declaring multiple exception classes

#

Especially when you need to support all the constructor combinations

#

My point is:

#

panic!("The bees have escaped.") Rust does it so much better.

tender shard
#

I hate the old slimefun API

#
        // Old Slimefun API
        try {
            final Class<?> slimefunItemClass = Class.forName("me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem");
            final Class<?> slimefunBackpackClass = Class.forName("io.github.thebusybiscuit.slimefun4.implementation.items.backpacks.SlimefunBackpack");
            final Method getByItemMethod = slimefunItemClass.getMethod("getByItem", ItemStack.class);
            final Object result = getByItemMethod.invoke(null, item);
            if(result == null) return false;
            return slimefunBackpackClass.isInstance(result);
        } catch (Throwable ignored) {

        }
#

look at those package names

lavish hemlock
#

Oh god

#

Welcome to:
"I don't know enough Java to make good code, but I know enough Java to make something work."

tender shard
#

sounds like notch talking about himself lol

lavish hemlock
#

Notch is a based

tender shard
#

didn't he tweet some homophobic and racist things a few years ago?

lavish hemlock
#

Yeah

tender shard
#

lol

#

pog

lavish hemlock
#

Well actually no I think it was like

#

Just transphobic stuff

#

Idk

#

Somethin' offensive that everyone got upset about

#

I legitimately cease to care though, as it does not concern me

tender shard
lavish hemlock
#

I mean that's not exactly homophobic

tender shard
#

no

#

it's just funny

lavish hemlock
#

It's just controversial/offensive

tender shard
#

telling people they deserve to be shot just because they have another opinion lol

#

also r/unpopularopinion is awesome

lavish hemlock
#

There's a chance it's satirical because of the "By a photographer" addendum.

#

Or

#

Not satirical

lavish hemlock
#

but at least intended to be a half-joke

lavish hemlock
tender shard
#

yeah I like his tweets too lol

#

but I understand mojang didn't like them, too

#

lol

lavish hemlock
#

Bullshit that they wiped his face off the game he made tho

#

Like I think he's still in the credits

#

But he's not mentioned in the splash text anymore

tender shard
#

after all it's oracle java now and not sun microsystems java

lavish hemlock
#

Yeah but that doesn't make it justifiable

tender shard
#

well if I buy something, it's mine now

#

and not the former owners thing

lavish hemlock
#

I don't personally believe in pride or whatever

tender shard
#

well I don't agree with him but I don't wanna be shot so I'd rather not answer on twitter

lavish hemlock
#

I don't think it needs to exist

#

I'm just gay, that's all there is to it

tender shard
#

rainbow flags are awesome

#

we all commit crimes

#

yeha ok

lavish hemlock
#

lol

#

Anyway I believe in ex-convict rights too

tender shard
#

the biggest crime you can do is to run craftbukkit on a server

lavish hemlock
#

In fact, prisoner rights

lavish hemlock
#

Recently Biden released some kind of like

tender shard
rough drift
#

is to run cardboard on a fabric server

tender shard
#

joe biden released a fabric server?!

rough drift
#

thats the real crime

lavish hemlock
rough drift
#

no

lavish hemlock
#

So uhh private prison contracts can no longer be

#

what's the word

tender shard
#

joe biden should sign a bill banning the use of 1.8 but I guess the congress needs to do that instead

rough drift
lavish hemlock
rough drift
#

and loads like 6 plugins

lavish hemlock
#

So, effectively the U.S. banned private prisons

#

Which is a step in the right direction 👍

tender shard
#

why do I always turn this chat into offtopic lol

#

I should get banned for the sake of everyone else

lavish hemlock
#

Because this chat is basically just general-2 but idiots sometimes come in here

tender shard
#

asking java questions and stuff

lavish hemlock
#

Yeah

tender shard
#

fucking idiots

#

they should know it before coming here

tender shard
#

unpopular opinion: the last 2 seasons of the office are actually awesome, people just hate them because michael is gone

lavish hemlock
tender shard
#

michael left the series because he wanted more time with his family

rough drift
#

I didn't watch it yet

#

my family is like "eh nah its not good"

#

they don't like the office

#

but i do

tender shard
#

I know many people who don't like it

lavish hemlock
#

I uhhh

tender shard
#

they are all stupid

rough drift
#

agree, i only managed to watch one episode tho

lavish hemlock
#

I like

lavish hemlock
#

Watched half of the first episode

#

Got bored

tender shard
#

the first episode is the worst

lavish hemlock
#

I just watch the clips sometimes

tender shard
#

it gets better with every season

#

the first episode is literally the most boring one

lavish hemlock
#

Am I allowed to skip it

tender shard
#

yeah

lavish hemlock
#

Good

#

I will maybe watch The Office eventually probably not

rough drift
#

alex

tender shard
#

ike

rough drift
#

is the 2nd episode better

#

or nah

tender shard
#

the whole first season is quite boring

rough drift
#

oh

tender shard
#

you'll like it once you watched the rest, though lol

lavish hemlock
#

Am I allowed to skip the first season

tender shard
#

I'd suggest to start with the last or second last episode of season 1

rough drift
#

ohk

tender shard
#

the best episodes are

  • finale (last episode)
  • goodbye michael (end of season 7)
  • stress relief (season 5)
  • dinner party (season 4)
#

oh

#

and Threat Level Midnight lmao

#

season 7 I think

lavish hemlock
#

Oh I didn't know there was an actual ending

#

I just thought it was like

#

One of those shows that goes on forever

tender shard
#

I think I've watched the whole show 20 times already lol

#

once I'm finished this time, I'll go watch scrubs again

lavish hemlock
#

Most of the time when it comes to long shows

#

I just watch the clips

#

Like sometimes YouTube recommends me House M.D. clips and I'm just like

#

"Yeah, why not?"

tender shard
#

house is awesome too lol

lavish hemlock
#

Although I have seen Death Note two times so far

#

Kinda three if you count the fact I've watched like 10 analyses of it

#

Wait

#

Well

#

I've seen it four times

#

I've seen Breaking Bad three times, if you count the analyses :)

tender shard
lavish hemlock
#

I haven't seen the new ones

#

They're still not on American Netflix

tender shard
#

fun fact: saul goodman (the actor of him) also has a role in the office

lavish hemlock
#

The actor's name is Bob Odenkirk

#

But yeah I didn't know that

tender shard
#

yeah

#

I can never remember the name

#

can someone buy this for me

#

pls

lavish hemlock
#

Oral History? Where's the Ana-

tender shard
#

well

#

on the back

#

of course

lavish hemlock
#

Ah of course

#

The B-Sides

tender shard
#

lol

#

yeah

#

ugh

#

15.82 x 3.89 x 23.5 cm

#

amazon actually precisely states the size of a book

rough drift
#

@raw ibex would something like

public class ItemSpawnAction implements TimedAction {
  @Override
  public void execute() {
    // Do your item spawning here
  }

  @Override
  public boolean repeat() {
    // Check if the action should be repeated
    return true;
  }

  @Override
  public long delay() {
    return 20; // One second delay, you can change this however you want
  }
}
#

be nice?

#

you can also override async()

#

but i wouldn't raccomend that

tender shard
#

what the greg is TimedAction?

rough drift
#

its a timed action

lavish hemlock
#

Custom interface or smthn

tender shard
#

yeah but where does it come from

rough drift
#

yes

#

its in my lib lmao

#

i am asking them if they like that

#

they wanted smt to spawn items at a certain interval

#

and i made it a lib

tender shard
#

why don't they just do a repeating task lol

#
Run every 10 seconds:
  World.spawnItem(...)
rough drift
#

because my system allows for changing the time

tender shard
rough drift
#

so bw for example has 3 things:

Diamond I
Diamond II
Diamond III

on each of these the time changes, its much easier in my way imo

#

instead of lambda shit

tender shard
#

Ike can you send a link to your lib? I wanna look at it, I'm bored

lavish hemlock
#

Hey, lambdas are fine >:(

echo granite
#

"Lambda shit"

tender shard
#

LAMBDA SHIT?

rough drift
#

yeah i like lambdas

lavish hemlock
#

bro your lambda took a shit on my rug

rough drift
#

instead of lambda shit, lambda's aint shit

lavish hemlock
#

go clean it up

rough drift
#

i love them

fickle frost
#

You don't need to use lambdas to use the bukkit scheduler.

tender shard
echo granite
lavish hemlock
#

Not supposed to

#

BukkitRunnable exists

lavish hemlock
#

AH YEAH

#

I REMEMBER THAT MOVIE

echo granite
tender shard
#

one of the best bad movies ever

lavish hemlock
#

WHERE'S THE MONEY LEBOWSKI

tender shard
#

haha

#

yeah

echo granite
#

You are supposed to use lambda and not create an anonymous inner class

tender shard
#

maow did you watch Airplane?

lavish hemlock
#

I haven't yet, unfortunately

tender shard
#

you must do so

#

fun fact: the german title of "airplane" is "die unglaubliche reise in einem verrückten flugzeug"

lavish hemlock
#

jesus

tender shard
#

"the incredible journey in a crazy plane"

echo granite
#

thanks for the fun fact now I'm a better developer

tender shard
#

yeah we always make movie titles a bit overly verbose

fickle frost
tender shard
rough drift
#

I FUCKING DELETED MY POM.XML

#

NO

#

SHIT

fickle frost
#

CTRL + Z

tender shard
#

don't you use git?

rough drift
#

I REBASED INSTEAD OF MERGED

#

FUCK

#

i forgot to put my pom on gh

#

:(

fickle frost
#

Have fun unfucking that.

tender shard
#

this level of noob disgusts me

rough drift
#

Well its a mess up

#

everyone can have a mess up

tender shard
#

sometimes the pom is in your .jar file

#

look there

rough drift
#

OH SHIT YEAH

#

I RELEASED A .JAR

#

THANK GOD

tender shard
#

it's in META-INF or sth I guess

#

META-INF/maven/pom.xml

#

unless you excluded that... in your pom

#

lol

rough drift
#

no i didn't

fickle frost
#

At least now you probably won't make that mistake again.

rough drift
#

oh and i fucked up intelli

tender shard
#

Oh we actually have good weather for once o0

rough drift
#

but that's fine

#

YEEEEEEEEEEEEEEES

#

I HAVE IT

tender shard
rough drift
#

no

#

well yeah

#

i have a nexus repo

#

which workws

tender shard
#

Ike aren't you the dude who doesn't like fish?

rough drift
#

yes

#

intelli is refusing to load my project files

#

fuck intelli

lavish hemlock
tender shard
#

onosecond?

lavish hemlock
tender shard
#

Yoko Ono second

#

talking about yoko ono: fun fact, I once puked at the entrance of the building where john lennon was shot

rough drift
#

should you include your pom.xml on gh

lavish hemlock
#

Yes

tender shard
lavish hemlock
#

The pom is necessary for building

#

And

#

Testing

#

And running

#

And everything else

rough drift
#

then i am retarded

lavish hemlock
#

(Also dependencies)

tender shard
#

of course the pom belongs on github

lavish hemlock
#

So, why would you exclude it from GH?

tender shard
#

what doesn't belong on github are your .iml files

lavish hemlock
#

Although there's actually some stuff under .idea that should apparently be kept

tender shard
#

erm

#

did you exclude the pom in every of your projects?!

rough drift
#

Maybe

#

i am retarded ok

lavish hemlock
tender shard
#

it's okay

#

we are all a bit retarded

rough drift
#

that one has a pom

tender shard
#

why is your META-INF folder inside /src/

lavish hemlock
rough drift
#

oh idfk

#

my friend originally made the project

#

then we worked on it together

tender shard
rough drift
#

he's the other person in the proj

tender shard
#

ah

lavish hemlock
#

Amateurs

tender shard
#

he only has one video on youtube

lavish hemlock
#

Amateurs everywhere

tender shard
#

which is just pigstep

rough drift
#

yes

#

as a backup yk

lavish hemlock
#

Personally I really like Pigstep

#

It fits the Nether vibe

#

Even if it's not at all similar to C418's tracks

rough drift
tender shard
rough drift
#

deploying to nexus

lavish hemlock
#

So wait

#

You know how to deploy to Nexus

#

But you don't know that you're supposed to commit your POM?

rough drift
#

yes i have my own repo

lavish hemlock
#

You are a special kind of stupid, Ike.

tender shard
#

he is retarded

#

he already admitted that

#

leave him alone

lavish hemlock
#

No :)

rough drift
#

now

#

i only have one problem

hybrid spoke
#

god arrived

rough drift
#

my repo does not have SSL

lavish hemlock
#

Oh shit it's god

rough drift
#

and i have no clue why

rough drift
lavish hemlock
#

Ayo god can I have $10

hybrid spoke
#

whats the magic word?

lavish hemlock
#

Uhh

#

Amen?

tender shard
#

should I get a chicken döner or a calf döner?

rough drift
#

since we're in #help-development imma ask a question:

how the fricc do i add SSL to nexus

hybrid spoke
rough drift
#

i am too retarded for that

hybrid spoke
rough drift
rough drift
lavish hemlock
#

Oh I didn't know heaven was doing equality quotas and shit

tender shard
#

let me guess - you run it directly from docker without any reverse proxy?

lavish hemlock
#

Awomen

rough drift
#

i let nexus be the webserver

rough drift
#

i just started up nexus

#

lmao

hybrid spoke
tender shard
#

huh

#

well get a reverse proxy, and point it to localhost:<nexus-port>

hybrid spoke
tender shard
#

then set that up for SSL

lavish hemlock
hybrid spoke
#

just one woman

rough drift
lavish hemlock
#

A proxy

#

but

#

reverse

hybrid spoke
#

d

rough drift
#

oh thx

tender shard
lavish hemlock
#

glad I could help

tender shard
#

this is my apache vhost config for my nexus:

<VirtualHost *:80>
        ServerName hub.jeff-media.com

        Redirect 301 / https://hub.jeff-media.com/
</VirtualHost>


<VirtualHost *:443>
        ServerName hub.jeff-media.com

        ServerAdmin webmaster@jeff-media.com

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/hub.jeff-media.com-access.log combined

        DocumentRoot /var/www/hub.jeff-media.com

        ProxyPreserveHost On
        ProxyRequests Off

        ProxyPass /nexus/ http://10.0.0.104:8002/nexus/ nocanon
        ProxyPassReverse /nexus/ http://10.0.0.104:8002/nexus/
        RequestHeader set X-Forwarded-Proto "https"

        Redirect 301 /nexus /nexus/

        <Location /javadocs/>
                ProxyPass !
        </Location>

        ProxyPass / http://10.0.0.104:8001/
        ProxyPassReverse / http://10.0.0.104:8001/


        Include /etc/letsencrypt/options-ssl-apache.conf
        SSLCertificateFile /etc/letsencrypt/live/jeff-media.com/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/jeff-media.com/privkey.pem

</VirtualHost>

rough drift
#

should i use nginx of apache

lavish hemlock
#

See

#

This is why I don't run my own servers

tender shard
lavish hemlock
#

I just piggyback off of Sonatype's OSS repository

tender shard
#

I use apache since I know how it works

rough drift
tender shard
#

then use nginx

lavish hemlock
#

Since ✨ Maven Central publishing

tender shard
#

shit

rough drift
#

shat

tender shard
#

my corona warn app tells me I met someone who was positive on march 4th

rough drift
#

L

lavish hemlock
#

F

earnest forum
#

anyone know how to get the breaking sound of a block in 1.18

tender shard
#

of any block?

#

or of a specific one?

earnest forum
#

any block

#

making a custom block hardness system

tender shard
#

hm

earnest forum
#

i have everything working

tender shard
#

I don't think that it's included in spigot

#

maybe somehow with NMS?

earnest forum
#

theyve changed the nms in 1.17

#

yeah thats how u used to do it

#

but theyve changed something

#

and i dont know how to do it anymore

tender shard
#

how did you do it before 1.17?

earnest forum
#

also cant find any pages

#

u get the nms block

#

and then somethin about keys

#

it was complicated

#

i tried it in my version but some stuff was missing

manic crane
#

Hola alguien habla español?

#

Y crea plugins?

tender shard
lavish hemlock
#

Only English is permitted in this server

tender shard
earnest forum
#

whats the package path

#

for that

manic crane
#

@tender shard

round finch
#

what does make someone a good java programmer?

and what knowledge is required to be a considerably good java programmer?

tender shard
#

net.minecraft.world.level.block.Block

manic crane
#

A

tender shard
manic crane
#

@tender shard ñ

tender shard
#

yeah can you stop pinging me

#

thanks

lavish hemlock
earnest forum
#

whats the iblockdata

round finch
#

there is so many books and things to be considered

earnest forum
#

how do i get that/

lavish hemlock
#

I never read a Java book

tender shard
lavish hemlock
#

Just spent 3 years coding in it

#

Am pretty good

round finch
#

java core stuff
essentials stuff
Design patterns
abstractions

#

oh gosh

#

java ee

lavish hemlock
#

Eh you can skip Java EE

earnest forum
#

can u check if BlockData is castable to iblockdata

lavish hemlock
#

It's only necessary if you're working with enterprise code

manic crane
#

@round finch you created plugins?

lavish hemlock
#

@manic crane Stop pinging everyone.

round finch
#

i make plugins

manic crane
#

Ok men

tender shard
#

@manic crane

round finch
#

but never publish any

tender shard
#

@manic crane ü

manic crane
#

No problem

earnest forum
#

i dont know why i still use eclipse

manic crane
#

Ü

earnest forum
#

intellij is so much better

tender shard
round finch
#

no worry i dont get triggered by pinging like others

#

i turn it all off

manic crane
#

Ok ok

round finch
#

😂

manic crane
#

Please

eternal oxide
round finch
#

kikba you can reply without ping

round finch
manic crane
#

Many money ?

earnest forum
#

nms doesnt come up on the spigot javadoc website?

round finch
tender shard
round finch
#

how to turn off ping in reply

tender shard
#

NMS is internal minecraft things

#

there are no docs about it

lavish hemlock
round finch
#

mojang mapping?

tender shard
#

not many money

#

few money

round finch
#

me low money

lavish hemlock
#

Same

tender shard
#

me too

#

me not enough money

lavish hemlock
#

2 USD, 10 USDT :p

#

the crypto of which I can't use because it's on the wrong chain

hybrid spoke
round finch
#

hobby gives me joy

#

first like on reply

#

then the options shows

hybrid spoke
hybrid spoke
round finch
#

you welcome 🙂

#

me too

#

it is a great feature

#

makes it less confusing

hybrid spoke
hybrid spoke
round finch
#

oh gosh

#

only replies spam 😂

earnest forum
#

anyone know how to use nmsBlock.StateById()?

#

im not sure what to put in for the block id

hybrid spoke
round finch
#

reeee

tender shard
#

oh god

trail pilot
#

my config.yml sucks

round finch
tender shard
trail pilot
#

look

round finch
#

messy?

tender shard
#

I wouldn't mix messages with normal config options

#

make a separate messages.yml file

trail pilot
#

im really bad at config lmao

#

uhmm

#

nice idea

round finch
#

yeah mfnalex idea sounds good

trail pilot
#
  • my method name sucks too because of config XD
round finch
#

order and understandable
leaving no confusion

trail pilot
#

should make 2 class for single and multiple home?

#

1 single home and an other for multiple

round finch
#

Homes:

trail pilot
#

so no more confusion

trail pilot
#

?

round finch
#

i mean if they're only allowed to one

#

maybe they should only be able to use first home

#

🤷‍♂️

trail pilot
#

that is my idea

round finch
#

the option is to you!

#

i just thought to select first in list
so they can only changed that

#

if multi homes was off

trail pilot
#

your idea sound more profesional

rough drift
#

me, trying to setup nginx

round finch
#

make them not delete first in list

#

but modify

#

if multi homes is off

#

🤷‍♂️

trail pilot
round finch
#

first home in list

#

first location

#

like replace first home in row

trail pilot
#

lol its hard to understand

round finch
#

i mean they only can change first home in list
homes:

#

if they dont have more 1 home add home

#

if multi homes is off

#

one select lemme get paint

trail pilot
round finch
#

first in list

#

you can call it Multi-homes mode

trail pilot
hybrid spoke
#

for only one home you dont even have to create more than 1 home object

#

just make it mutable

round finch
#

zacken02's idea is good

#

mine over complication

rough drift
#

does anyone have any clue about how to add ssl to nginx

hybrid spoke
#

think i missed the topic. whats the topic on the homes thing?

tender shard
round finch
#

Multi homes and single

rough drift
#

yes but i almost got it

#

and its like

tender shard
#

basically you can probably just run certbot and it does everything automatically

round finch
#

check for Permission Homes + number

trail pilot
#

so
default -> /sethome
default -> /sethome test (without the option to make it off)

#

thanks for this idea

#

talking about maximum homes how should be done>

hybrid spoke
#

in config? homes.max: 40

trail pilot
round finch
#

homes.max. + interger

trail pilot
#

Hmm

hybrid spoke
#

yeah im defo missing the topic

#

what are we on

round finch
#

Multi Home System

tender shard
hybrid spoke
trail pilot
#

ohthonking

tender shard
#

it's only a 1.41min video lol

round finch
#

my eyes f in chat

#

i didn't wanna know

#

oof

trail pilot
tender shard
hybrid spoke
round finch
#

Permission node is the way

trail pilot
#

Hm

round finch
#

why not just get number lol

#

unnecessary loops

trail pilot
#

damn

round finch
#

you get the number end of the permission

#

check contains

hybrid spoke
#

highest

round finch
#

then they're dumb enough to have duplications

hybrid spoke
#

dublications

round finch
#

😂

#

dub dub dup

#

of course you could loop the permissions strings

#

and get the highest

#

to solve that

#

but dont loop 1 to 100

#

if player has homes.100

#

fair enough

trail pilot
#

hm

round finch
#

this ..honestly tru

#

you could give different max homes perms to different players

#

or groups

torn vale
#

Hello 👋

#

Ive tried to create a stomp function (you sneak, fall down fast an do damage to all entities around you)

public class PlayerToggleListener implements Listener {

    @EventHandler
    public void onPlayerToggle(PlayerToggleSneakEvent e) {
        Player p = e.getPlayer();
        Location l = p.getLocation();
        if (l.add(0, -1, 0).getBlock().getType().isSolid()) {
            return;
        }
        if (!p.isSneaking()) {
            return;
        }
        if (p.isSneaking() && !l.add(0, -1, 0).getBlock().getType().isSolid()) {
            while (p.isSneaking()) {
                p.setVelocity(p.getVelocity().setY(2.0));
            }
        }
    }

}
#

But I have 2 problems:

#

1.: After this my DoubleJump wont work anymore

#
public class DoubleJump implements Listener {

    private final HashSet<UUID> cooldown = new HashSet<>();

    @EventHandler
    public void onJoin(PlayerJoinEvent event) {
        event.getPlayer().setAllowFlight(true);
        cooldown.add(event.getPlayer().getUniqueId());
    }

    @EventHandler
    public void onFly(PlayerToggleFlightEvent event) {
        Player player = event.getPlayer();

        if (player.getGameMode() == GameMode.SURVIVAL || player.getGameMode() == GameMode.ADVENTURE) {
            event.setCancelled(true);
            if (cooldown.contains(player.getUniqueId())) {
                return;
            }
            player.setVelocity(player.getLocation().getDirection().setY(1));
            player.playSound(player.getLocation(), "minecraft:custom.jump-1",0.1F, 1.0F);
            cooldown.add(player.getUniqueId());
            player.setAllowFlight(false);
        }
    }

    @EventHandler
    public void onMove(PlayerMoveEvent event) {
        Player player = event.getPlayer();
        Location location = player.getLocation().clone();
        if (cooldown.contains(player.getUniqueId())) {
            if (location.add(0, -0.5, 0).getBlock().getType().isSolid()) {
                cooldown.remove(player.getUniqueId());
                player.setAllowFlight(true);
            }
        }
    }

    @EventHandler
    public void onGamemodeChange(PlayerGameModeChangeEvent event) {
        if (event.getNewGameMode() == GameMode.SURVIVAL || event.getNewGameMode() == GameMode.ADVENTURE) {
            event.getPlayer().setAllowFlight(true);
        }
    }
}```
DoubleJump.class
#

2nd: My Server crashes after doing my stomp and I cant rejoin (I have to kill the whole process in order to join again)

fickle frost
#

Stomp was too powerful.

#

Any error log?

smoky oak
#

Does 1.13+ versions still have the possebility to add custom items somehow? I recall older versions utilizing the ability to use resource packs to assign new textures to item variants that dont exist in the vanilla game

#

but variants aint a thing anymore

hasty prawn
#

CustomModelData

smoky oak
#

can you give me a link to some sort of tutorial if you know of a good one?

hybrid spoke
hasty prawn
#

^

fickle frost
#

Yep, because you're on the main thread there, you've basically frozen the entire server until the player unsneaks, which they'll never get the chance to do, because you've frozen the main thread.

smoky oak
#

ouch

#

yea

#

dont use .sleep or equivalent

hybrid spoke
#

unsneak = new event called with a different boolean

#

or did he use players sneaking

fickle frost
#

He grabbed the player object.