#help-development

1 messages · Page 474 of 1

eternal oxide
#

your current code detects the first closest player (if in range) it never does anything with the others

#

but it adds them repeatedly to a List

tender shard
#

that code is a huge mess

eternal oxide
#

add a sysout before you call launchProjectile

#

see if it's even being called

lost matrix
#

Ugh finally. Works but i had to create a custom model.

tender shard
#

why do you only have 3 college profiles but not a single university profile?

#

where's the staatsexamen profile?

lost matrix
tender shard
#

WHERE IS THE STAATSEXAMEN PROFILE

lost matrix
#

Useless. We have anarchy. No need for filthy lawyers.

tender shard
#

fair enough. give IP, I wanna send you some abmahnungen

lost matrix
#

This will be met with a unterlassungsklage

tender shard
#

then oxford english dictionary will join and demand it to be changed to "an unterlassungsklage"

shadow night
#

._.

tender shard
#

oh shit this reminds me, I missed my meeting with sonatype

lost matrix
#

Its "a lawsuit" right?

tender shard
#

no, but you know spigot's library loader feature, right?

#

funny dudes from paper's discord claimed it violates maven central's ToS

#

so I asked them whether it actually does

lost matrix
#

Huh?

tender shard
#

and instead of just answering, they invited me to some zoom meeting

lost matrix
#

lol

tender shard
#

which I forgot to attend

lost matrix
#

Oh no 😦
Dont put the spigot community in a bad light

tender shard
#

well I didn't mention spigot specifically

#

I just said "some software" etc

lost matrix
#

When was it? Cant you just claim time zone fkery?

tender shard
#

they even put some "agenda" into the invitation

lost matrix
#

So nice of them

tender shard
#

and now the best thing: I wrote the email like 3 weeks ago, then a few days ago, some random german mobile phone called me. and when I confirmed that I got time on the scheduled date, the dude was like "yo nice digga, dann trag ich das so ein"

lost matrix
#

XDD

tender shard
#

it was indeed funny though, at first I thought they scammed me

lost matrix
#

Throwing you a meeting and you are like "the fk you want from me"

warm mica
tender shard
shadow night
#

how do I get the armor points of a entity that is not a player?

lost matrix
shadow night
#

how do I do that?

lost matrix
#

LivingEntity#getAttribute(Attribute attribute)

tender shard
shadow night
#

lemme see if my code doesn't become red as it did the last 5 hours

#

wow it worked

#

no way

tender shard
#

if your code becomes red, it either got a fever, or some STDs. in both cases, go see a doctor

#

or a doctress, if that's a word now

shadow night
#

a what?

tender shard
#

a female doctor

shadow night
#

just say doctor

lost matrix
#

a doctress

#

lol

tender shard
#

english is weird

#

if there's actor and actress, there should also be doctor & doctress

lost matrix
#

a docthem

#

dont be a bigot

tender shard
#

doche/she/it

#

don't be a spigot

lost matrix
shadow night
#

wait, how does minecraft calculate damage with armor and stuff whatever

tender shard
#

can you maybe get a bit more precise lol

shadow night
#

like, I have a certain amount damage and I need to get the armor value and calculate how much damage is left after applying the armor values.

#

what is that ._.

lost matrix
misty current
#

how can I make a chunk feature generation? right now i'm generating something every x chunks and i want to add some offset but the offset often ends up being in another chunk so i would need to know if the offset is in another chunk when the actual chunk generates

#

not sure if that's clear

lost matrix
shadow night
#

okay, I'll try that

lost matrix
#

open simplex noise is the best imo

misty current
#

i had thought of noise, but I need a single point rather than a map to sample from

#

i basically need to generate asteroids

lost matrix
#

Then use a noise map

misty current
#

of different sizes

#

the asteroids are set structures and i just need to choose the locations where i want them to generate

#

without them overlapping

orchid trout
#

exception.printStackTrace(); or Bukkit.getLogger().severe(exception.toString());

lost matrix
#

The former

shadow night
#

Does EntityDamageEvent.getFinalDamage() get the damage that is going to be dealt including all values such as enchantments, armor, etc.?

shadow night
#

I'm stupid af

orchid trout
#

someone send sqlite implementation that you think is very good thanks

undone axleBOT
orchid trout
#

i did

#

then i do what the website says

#

and someone says that there is a better way of doing it

lost matrix
orchid trout
#

like how to make a connection

hazy parrot
#

You mean driver?

lost matrix
orchid trout
#

ok

sacred mountain
#

whats the maximum amount that i can zoom a player's FOV using effects/attributes

#

because slowness isnt cutting it

#

i've seem a forum page saying set their base walk speed, i tried it in game with the attribute command, but im not sure if its the same because it actually removes the fov change and enables me to walk with slowness 255 which is a weird interaction

chrome beacon
#

The effectiveness of potions starts looping after a certain amount of levels

sacred mountain
#

yeah slowness 9 does it or smn

#

im testing now

#

seeing if walkspeed + slowness stacks or not

#

i found another thing: freezing adds fov but im not sure exactly if i use .setfreezeticks() itll trigger that.

nocturne steppe
#

spigot artifact (for NMS) makes intellij give this warning:

Provides transitive vulnerable dependency maven:commons-codec:commons-codec:1.11
Cxeb68d52e-5509 3.7 Exposure of Sensitive Information to an Unauthorized Actor vulnerability pending CVSS allocation

is it ok?

#

or should i be worried

rough drift
#

It's fine

sacred mountain
#

looks complicated i usually look at that and think hmm yes agreed

quaint mantle
#
Exception in thread "main" java.lang.RuntimeException: Zip entry 'META-INF/plugin.xml' tries to escape target directory
        at org.jetbrains.java.decompiler.struct.StructContext.addArchive(StructContext.java:143)
        at org.jetbrains.java.decompiler.struct.StructContext.addSpace(StructContext.java:86)
        at org.jetbrains.java.decompiler.struct.StructContext.addSpace(StructContext.java:64)
        at org.jetbrains.java.decompiler.main.Fernflower.addSource(Fernflower.java:73)
        at org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler.addSource(ConsoleDecompiler.java:111)
        at org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler.main(ConsoleDecompiler.java:79)

just trynna use fernflower java -jar fernflower.jar e.jar e

#

trynna decompile this e.jar

#

and decompiled results in e

#

wtf is this

tardy delta
#

sounds like ai trying to escape

quaint mantle
#

i got this from my intellij install

tardy delta
#

its on your whole network already

quaint mantle
#

yours too

#

it has taken over the world

sleek spoke
#

Hi, a friend of mine is holding out on one aspect of the game. He tells me that it's impossible to modify an item like a leather chestlate to be lava resistant by changing an NBT attribute, is it true?

rough drift
#

no

#

you can disable it from burning iirc

sleek spoke
#

thanks 🙂

#

even in a datapack ?

tall dragon
#

pretty sure u can give items tags in data packs

#

the tag Invulerable should also work on items

pseudo hazel
#

I tried making a plugin and having my other plugin be a dependency of the new plugin

#

I thought I had it working but I was wrong

#

it says missing symbols on the import statements when I build it

#

even though I dont get errors in intellij

serene sigil
#

does playerteleportevent also trigger when a player changes the world?

pseudo hazel
#

the code for my old plugin is local on my pc

#

probably not

#

you probably need to use PlayerChangedWorldEvent or w/e its called

tall dragon
pseudo hazel
#

how do I do that?

serene sigil
tall dragon
#

File -> invalidate caches

pseudo hazel
#

didnt change anything

#

it just says that the POM for teh old plugin is missing, no dependency information available

#

I thought adding a dependency block to the new pom would be enough

#

is there a way I can build the old plugin in the local repository?

#

I thought it was done automatically but i am unsure

tall dragon
#

like.. install in in your local repositories?

#

u can do that with mvn clean install

pseudo hazel
#

omg im dumb

#

thanks it works now 😛

#

also why does my jetbrains annotations dependency keep dissapearing after I restart intellij

#

like my other plugin doesnt do that but I cant find any differences between the two dependency wise

#

because I wanna use NotNull since that waht intellij defaults to when generating code

misty ingot
#

any good lib for custom mobs?

#

custom stuff run when diff stuff is done with the mob

#

etc.

tribal quarry
#

how should i remove the -dev prefix on jar with paperweight on gradle?

urban kernel
#

?whereami

serene sigil
#

how to disable entering a nether portal in a world?

native ruin
#

Can't you disable the nether in server properties?

misty ingot
#

I think they want it for a specific world

serene sigil
native ruin
#

Hm

eternal oxide
#

listen to the portal event and cancel it

#

then teleport where you want

serene sigil
flint coyote
#

yes

serene sigil
#

👌

wanton lynx
#

Is it possible to create worlds asynchronously? I get this exception when trying to do that.

java.lang.IllegalStateException: WorldInitEvent cannot be triggered asynchronously from another thread.
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:572) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at net.minecraft.server.MinecraftServer.initWorld(MinecraftServer.java:606) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3735-Spigot-e4265cc-b421af7]
        at org.bukkit.craftbukkit.v1_19_R3.CraftServer.createWorld(CraftServer.java:1133) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3735-Spigot-e4265cc-b421af7]
        at org.bukkit.Bukkit.createWorld(Bukkit.java:672) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.WorldCreator.createWorld(WorldCreator.java:405) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at com.seailz.towerwars.game.Game.<init>(Game.java:51) ~[?:?]
        at com.seailz.towerwars.queue.QueueManager.lambda$new$0(QueueManager.java:29) ~[?:?]
        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftTask.run(CraftTask.java:82) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3735-Spigot-e4265cc-b421af7]
        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3735-Spigot-e4265cc-b421af7]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]```
flint coyote
#

You cannot interact with the world asynchronously in any way. Besides using ChunkSnapshots or editing the files directly

wanton lynx
#

That's a pain.. thanks for letting me know.

flint coyote
#

I mean there would be a (quite tedious) workaround for this if you really want to save like 2 seconds.
You could let another server create the world, copy the files over and then only load the world on your server.
Loading the world is a synchronous operation tho. So you would only save the creation time.

#

It would however take longer than creating it on your server due to the http based transfer + you will run into issues if the other server is not reachable

icy beacon
#

?pdc for me

cobalt thorn
#

Someone knows how to import a dependency in automatic in every maven project on intellij?

flint coyote
#

I doubt there's a way since copying a pom is no effort at all.

#

You could create a huge project and create subprojects that take the dependency from the large projects parent pom. The larger the project gets the longer your intellij loading times will get tho

wet breach
cobalt thorn
wet breach
#

oh you want something already made

cobalt thorn
flint coyote
#

Is that really worth the effort? I said no because I doubt anybody made this already. There might be a slight chance to find something if you dig deep enough tho

cold sparrow
#

Why does this not work (what should be the channel?) private void sendServer(Player player, String server) { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); DataOutputStream dataOutputStream = new DataOutputStream(byteArrayOutputStream); try { dataOutputStream.writeUTF("Connect"); dataOutputStream.writeUTF(server); } catch (IOException e) { e.printStackTrace(); } player.sendPluginMessage(PremiumLobby.getInstance(), "bungeecord:bungeecord", byteArrayOutputStream.toByteArray()); }

sacred mountain
#

anyone nkow if theres a method to see if a player is currently using a spyglass

#

since there's the animation that other players see

#

of you holding it

#

so it's got to be somewhere

flint coyote
#

There's probably a function in nms. Although the interact event would trigger for the zoom-in. You won't notice when the player stopped though

sacred mountain
flint coyote
#

Unless it keeps triggering when holding rightclick, idk about that

sacred mountain
#

the animation will stop for other players on the server so theres gotta be some sort of data

zealous osprey
#

I've got a question:
If I want to send a player from one server to another, why do I need Bungeecord for it?
And I just want the player to connect to the server, don't want to send playerdata or so.

flint coyote
#

Well in that case you will have to dig into nms and find the right methods

sacred mountain
#

before i waste my life away does anyone have methods for that

wet breach
sacred mountain
#

so...

flint coyote
#

But they send a packet, otherwise players would not recognize it

tardy flame
sacred mountain
#

yeah

tardy flame
#

Without it there is no server-server connection

zealous osprey
humble tulip
#

Bungeecord acts as a middleman between the server and player

tardy flame
#

It's not exactly that it holds

#

Just read how bungee cord works

humble tulip
#

The minecraft client doesn't allow servers to move you to another server

zealous osprey
humble tulip
#

The workaround is have a middleman between client and server, when the server wants to move the player to another server, it can tell the client thatt they're just changing worlds

#

The player always is connected to the bungee server, not the minecraft server

wet breach
sacred mountain
flint coyote
wet breach
#

because its sent again

sacred mountain
#

is it?

#

oh

humble tulip
#

Probably the same

sacred mountain
hard ether
#

I have been struggling with my project for a while now. How do I use classes from another plugin that is required to start. I cannot access it in any way, and it is starting to annoy me. Can anyone help?

This is what i'm trying to do:

  • Parent
    • Plugin A
    • Plugin B
    • Plugin C

From plugin B, I want to be able to access plugin A, and from plugin A, I want to be able yo access plugin B. Same with with C and all the other plugins in my parent project.

I have already added the plugins as dependencies, but i'm pretty sure maven can't recognize them. In plugin A I have a function called format() that is attached to the String class. In plugin B I cannot access String.format(). Any ideas?

flint coyote
#

Are you using kotlin or how did you achieve the last part?

hard ether
#

oh yes, i'm using kotlin. mb

#

that shouldn't change anything though.

flint coyote
#

Extension functions have to be imported into other classes from the class that introduced it. You can't just expect kotlin to know that any class added an extension function to the String class

#

For the other part it should work by just adding your plugin as a dependency (mvn clean install and add it to pom)

hard ether
hard ether
flint coyote
#

Are they seperate projects or seperate modules?

hard ether
#

separate modules.

flint coyote
# hard ether separate modules.

Oh in that case I haven't done it yet.
I have two completely seperate projects and just added this to my other project:

<dependency>
            <groupId>me.fabsi</groupId>
            <artifactId>eventengine</artifactId>
            <version>1.0.0</version>
            <scope>provided</scope>
</dependency>
hard ether
#

so how does maven know where to find it..?

flint coyote
#

Maven always checks the .m2 folder first before checking online

hard ether
#

oh

#

wait so when i clean install it adds it to the m2 folder?

flint coyote
#

yup that's exactly what the install-stage does

hard ether
#

and then it jars it?

#

ohhhh

flint coyote
#

yes

hard ether
#

tysm

#

it should be the same for modules aswell in that case

flint coyote
#

Most likely

#

However you might run into conflicts for your first build since both depend on each other.
Therefore you should build one side without depending on the other side at first, then build the other side and then add the dependency and rebuild the first.

#

Dunno if maven is smart enough to resolve that by itself, it might be

eternal oxide
#

You can't have a cyclic dependency

cobalt thorn
cold sparrow
flint coyote
cobalt thorn
weak meteor
#

Im trying to delimitate a zone with a Hoe, how to get Right and Left click in a block?

#

Im trying with the BlockBreakEvent

#

but that only gets left

flint coyote
#

PlayerInteractEvent?

weak meteor
#

Lemme see

weak meteor
flint coyote
#

don't forget to check hasBlock()

eternal oxide
#

and hand

weak meteor
#

Lemme see whats that lol

eternal oxide
#

?interactevent

undone axleBOT
#

The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.

For example, only executing code if the main hand was used:

@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
    if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
        return; // do not progress past this point  |
    }
    // provide functionality
}
flint coyote
#

PlayerInteract fires on left and right click (once per hand). And it fires for air and blocks

weak meteor
#

Hmm

#

Okay

flint coyote
#

So basically you can ignore events that interact with air (hasBlock() = false) in your case

weak meteor
#

K

#

Thanks

weak meteor
ancient plank
#

Had an aneurysm making my tool listeners because of hand shenanigans

flint coyote
weak meteor
flint coyote
#

Maybe 3 times if we ever get a third arm /s

#

Maybe for an april fools snapshot lol

weak meteor
#

so now i could make my own logic, right?

flint coyote
#

I would implement it with guard clauses like in the example. But besides that, yes

weak meteor
#

Like world Edit

#

but for only delimitate a zone

flint coyote
#

Guard clauses don't change your logic, they just prevent deep nesting

weak meteor
#

Any example?

tall dragon
#

if(condition){
stuff
}

guard clause:

if(!condition){
return;
}
stuff
weak meteor
#

oh

#

thats a guard clauses

#

?

flint coyote
#

No guard clause

@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
    if (event.getHand() == EquipmentSlot.HAND) { // * if the hand used is the main hand:
        // provide functionality
    }
}

Guard clause

@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
    if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
        return; // do not progress past this point  |
    }
    // provide functionality
}
tall dragon
#

wasnt there a command for this?

weak meteor
#

Oh

#

Okay

tall dragon
#

for cafebabe

#

?guard

flint coyote
#

idk

#

?guardclause

flint coyote
#

?if

tall dragon
#

gosh why isnt there a list of commands -,-

eternal oxide
#

here we refer to it as early return

flint coyote
#

What if you do it in a loop with continue? Then it's not exactly a 'return'

#

I like to leave out the brackets for guard clauses aswell. So basically

@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
    if (event.getHand() != EquipmentSlot.HAND) return;
    if (!event.hasBlock()) return;
    // logic
}
tardy delta
#

?interactevent

undone axleBOT
#

The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.

For example, only executing code if the main hand was used:

@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
    if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
        return; // do not progress past this point  |
    }
    // provide functionality
}
wet breach
flint coyote
#

That's personal preference but I prefer it this way

tall dragon
wet breach
#
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
    if ((event.getHand() != EquipmentSlot.HAND) || (!event.hasBlock())) return;
    // logic
}
eternal oxide
#

not enough comments

pseudo hazel
#

comments for what

eternal oxide
#

needs at least a paragraph explaining the early return

pseudo hazel
#

true

eternal oxide
#

We joking, for anyone listening, Please don;t listen to us

pseudo hazel
#

never use comments kids

eternal oxide
#

its a bad addiction to start

flint coyote
#
if (!event.hasBlock()) return; // return if event has no block

The only right way

pseudo hazel
#

they are an invention of the human mind therefore they suck

#

no it should me more like "if the event does not has block, return"

flint coyote
#

Although it might not be detailed enough. Maybe more like

if (!event.hasBlock()) return; // return if event has no block. It might be that the interaction was triggered by air interact. We don't want to listen to that
ancient plank
#

I don't write comments unless I'm getting a headache and do something really stupid to bypass something equally stupid

flint coyote
#

Building a workaround to bypass issues that are there because you workarounded something earlier. Lovely - we need more technical debt.

pseudo hazel
#

well you also have to put a link to the docs explaining what hasBlock does

ancient plank
#

It's not something I made so it's not my fault

flint coyote
pseudo hazel
#

yes

#

and include the version of the docs you used too

#

so people can trace it back

ancient plank
#

To make the changes needed to fix that issue requires such a sweeping change that it's not worth the time fixing it

flint coyote
#

If you don't have 4 lines of comments for every line of code, are you even coding?

pseudo hazel
flint coyote
ancient plank
#

I always do

pseudo hazel
#

lmao

#

TODO: fix this

ancient plank
#

except I put

// TODO: should be fixed by doing A
#

the : makes a difference!!

eternal oxide
#

I have some 20 year old TODO's

ancient plank
#
    public static FishingItem getFishingItemFromItemStack(ItemStack itemStack) {
        String identifier = ItemUtil.getCustomTag(itemStack, "hooked_item");

        if(identifier != null) {
            return Hooked.getInstance().getRepository().findItem(identifier);
        }
        return null;
    }

don't need comments if you embrace long names

pseudo hazel
#

well yes, you need to explain why you chose that name

tardy delta
#

Optional<String> :)

eternal oxide
#

wasn;t clear enough

ancient plank
#

silence wench

pseudo hazel
#

if you dont provide an explanation for why you named it as such, it doesnt get compiled

flint coyote
#

How am I supposed to work with code of others when I can't trace back the exact thought of the developer coming up with the variable name?

pseudo hazel
#

thats why I work alone

ancient plank
#

I'm reading the github page for this file and noticed there's no space between two of my methods despair my ocd

tardy delta
#
return ItemUtil.getCustomtag(item, "hookied_item").map(Hooked.getInstance().getRepo()::findItem).orElse(null);```:)
flint coyote
#
Block block = event.getBlock(); // the variable is named block because it holds a Block from the BlockBreakEvent
#

Spigot discords new #badpracticesunday

tardy delta
#

reminds me its back to college for me tmrw

#

fuck

flint coyote
#

Also, where's the

// FIXME: Because why TODO when there's a longer option

gang?

eternal oxide
#

I don;t use FIXME as it implies I did something wrong.

pseudo hazel
#

why is that a thing

tardy delta
#

i always do todo

#

and i never look at them

cobalt thorn
tardy delta
#

the javadocs for what

eternal oxide
#

check yoru build log to see if the javadoc built

pseudo hazel
#

same my todos are basically for stuff like i could improve it with more time, but why bother if it works

cobalt thorn
cobalt thorn
hard ether
#

would the correct way of getting my core plugin be this

public ScorchCore getCore() {
  return (ScorchCore) getServer().getPluginManager().getPlugin("ScorchCore")
}```
young knoll
#

That's one way, yes

hard ether
#

is that the best way, though?

young knoll
#

But getPlugin might return null

hard ether
#

if the plugin is installed it won't though.

young knoll
#

As long as it is enabled, yes

hard ether
#

okay, thanks!

orchid trout
#
    @Getter
    private UUID uuid;

    @Getter
    @Setter
    private int kills;
    @Getter
    @Setter
    private int deaths;
    @Getter
    @Setter
    private int gems;``` would it be proper usage to make them static?
#

in my user class

flint coyote
#

Why would you want them to be static? They are not the same for all users

orchid trout
flint coyote
#

Why are you in a static context in the first place?

eternal oxide
#

you need an object instance

orchid trout
#

oh

#

yeah

hazy parrot
#

How do you expect to call instance method from static call

#

What object will it use

orchid trout
#

i was using User as a placeholder

#

and i forgot

eternal oxide
#

so java User user = new User(uuid); user.setKills(5);

orchid trout
#

yeah

torpid blaze
#

Hey,
I have a problem. I want to prevent the player from moving before a minigame start. I tried Canceling the move event and settings the to location to the from location, which starts teleporting the player around on his block. Teleporting the player back does also do nothing, not even resetting the player.

I think the event triggeres itself when setting the to position to the from position and then it is in a loop. But checking if the event is already cancelled is not working. Even giving the player a custom Metadata while he gets teleported back and then checking if the player doesn't have the tag set before teleporting him in the event does also not work.

Anyone any Idea, because this is really frustrating?

young knoll
#

try setting the to position to the from position

orchid trout
eternal oxide
#

you only need to cancel the move event

#

not make any changes

#

only cancel if x,y,x change

torpid blaze
eternal oxide
#

ignore pitch/yaw

#

it works

#

The player will attempt to move but the server will foce him back to his spot

#

You can't prevent the client predicting the movement

#

but the server will correct it

sterile token
#

paper api totally sucks

#

starting from the weird naming naming for the things: Player (Spigot), Source (Paper), also paper dont name getters methods as getMethodName()

torpid blaze
eternal oxide
#

then you are doing that

torpid blaze
#

what?

eternal oxide
#

Spigot will not do that unless you are doing it

torpid blaze
#

I use paper 1.8

#

😄

#

but is it so different?

eternal oxide
#

?paste your move event and your teleport event

undone axleBOT
weak meteor
#

Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
at cirosanchezb.tengucore.commands.main.TenguCoreCommand.onCommand(TenguCoreCommand.java:31) ~[TenguCore-1.0.jar:?]

Code: ```java

private ArrayList<SubCommand>subCommands = new ArrayList<>();

public TenguCoreCommand() {
    subCommands.add(new Help());
    subCommands.add(new Terrain());
}

@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {

    if (sender instanceof Player){
        Player player = (Player) sender;
        if (args.length > 0){
            for (int i = 0; i < subCommands.size(); i++){
                if (args[i].equalsIgnoreCase(getSubCommands().get(i).getName())){
                    getSubCommands().get(i).perform(player, args);
                }
            }
        } else if (args.length == 0) {
            player.sendMessage(ChatColor.translateAlternateColorCodes('&', "&6&lTengu Core &eVersion: 1.0"));
            player.sendMessage(ChatColor.translateAlternateColorCodes('&', "&eUse &f/tengucore help &efor a list."));
        }


    } else {
        Bukkit.getConsoleSender().sendMessage(ChatColor.GOLD+"[TenguCore] "+ChatColor.RED+"You can't execute this command");
    }


    return true;
}
#

It cant be a out of bounds

#

literally im looping on the list

torpid blaze
# eternal oxide ?paste your move event and your teleport event
if (event.isCancelled())
     return;

if (!player.hasMetadata("cancelMove") && gm.getGameState().equals(GameState.DEATHMATCHPREPORATION) && (event.getTo().getBlockX() != event.getFrom().getBlockX() || event.getTo().getBlockZ() != event.getFrom().getBlockZ())){
     player.setMetadata("cancelMove", new FixedMetadataValue(main, true));
     event.setCancelled(true);
     //event.setTo(event.getFrom());
     player.removeMetadata("cancelMove", main);
     return;
}

This is all

weak meteor
#

if (args[i].equalsIgnoreCase(getSubCommands().get(i).getName())){

young knoll
#

If you only pass 1 arg to the command, args[1] will not exist

hazy parrot
#

so you are doing args[1] at some point

#

where you have only 1 arg

#

you are iterating over array list

#

not args array

weak meteor
#

OMG

mossy marlin
#

Hum... Hello sorry i don't know where i can post my problem but i have trouble in spigot-api 1.19.2

the AdvancementDisplayType doesn't exist but it's present in documentation i don't know how it wrong

i use gradle in java 17

weak meteor
#

But

#

args starts after the command

hazy parrot
#

yap

eternal oxide
hazy parrot
#

/foo bar have only 1 arg which is bar

eternal oxide
#

so next check they have no meta

weak meteor
#

so this is the command: /tengucore terrain

#

so

#

it should be 1 not i

hazy parrot
#

so only args[0] would exist

torpid blaze
weak meteor
#

yess

#

thanks

torpid blaze
#

but does this not work?

eternal oxide
#

well your setting/removing meta is pointless

#

you literally add it then instantly remove it

torpid blaze
#

yes, I forgot to remove it. It was fo then teleporting the player or setting the TO

#

or does it event then not function?

eternal oxide
#

no it's just pointless code

wise mesa
#

for a task timer, if I have a period of 0, does that mean every tick?

#

or is every tick a period of 1

eternal oxide
#

your current code allows them to move around in a single block

torpid blaze
eternal oxide
#

IF that code is actually in the PlayerMoveEvent

torpid blaze
eternal oxide
#

they will only get "teleported" back a block if they move off that one block

#

OR you are doing some teleporting yourself

mossy marlin
#

Have seen this error previously when you trying to use spigot api ?

#

sorry my english is very bad

tardy delta
#

man speaking google translate

mossy marlin
#

i didn't use it because it's not good practice to understand how to speak it

sterile token
mossy marlin
#

gradle

sterile token
#

okay sorry man i can help

sterile token
# wise mesa .

Pacient all people are here for free thats the sence of a community

wise mesa
#

i'm aware

sterile token
wise mesa
#

just making sure my question doesn't get lost in the mess

mossy marlin
sterile token
lost matrix
# wise mesa .

yes. Minimal instant delay is next tick (0 or 1) and for repeated delays its once a tick(also 0 or 1)

wise mesa
#

and hopefully someone will answer it eventually

wise mesa
sterile token
#

You have to wait

#

mate

wise mesa
#

I feel it would be wasting everyone's time to make a thread

#

????

#

okay???

flint coyote
#

You already got your answer

wise mesa
#

I'm waiting

sullen canyon
#

why are we actually arguing about this

wise mesa
#

appreciate it

wise mesa
sterile token
pseudo hazel
#

the motd for the Cubecraft server is making use of some non standard minecraft font to display text, how is this done and can you also use it in game?

lost matrix
wise mesa
tender shard
wise mesa
#

alright adios

lost matrix
mossy marlin
rough ibex
#

well it's not ascii

#

that's a misnomer

lost matrix
#

Some utf8 chars

pseudo hazel
#

how do I print a ping response

rough ibex
#

they're simply using unicode characters

pseudo hazel
#

can you elaborate?

lost matrix
#

for sure not ascii, but i think thats what alex meant

#

unicode table has some spacing chars

lost matrix
rough ibex
#

these should? be the characters

pseudo hazel
#

no

#

im talking about the lettering

rough ibex
#

those are small caps

pseudo hazel
#

how can I get those

rough ibex
#

In typography, small caps (short for "small capitals") are characters typeset with glyphs that resemble uppercase letters (capitals) but reduced in height and weight close to the surrounding lowercase letters or text figures. This is technically not a case-transformation, but a substitution of glyphs, although the effect is often approximated by...

#

copy

pseudo hazel
#

oh I got it

#

thanks

pseudo hazel
#

or do you mean I can make my plugin generate text in a similar way using small caps?

rough ibex
#

you can make a function that translates simple latin text to small caps

pseudo hazel
#

yes I get that

sacred mountain
#

i press tab too much

#

alomst every one of my classes

#

has these

mossy marlin
#

7smile7 i reinstall buildtools 1.19.2 doesn't change and i 'm trying to see if is my jdk version 17

tender shard
#

what's your issue @mossy marlin ?

#

are you using maven?

mossy marlin
#

no i'm using gradle

tender shard
#

ah ok

#

and it cannot find the spigot dependency for 1.19.2?

mossy marlin
#

my issue :

bad class file: C:\Users\Georgio\.m2\repository\org\spigotmc\spigot-api\1.19.2-R0.1-SNAPSHOT\spigot-api-1.19.2-R0.1-SNAPSHOT.jar(/org/bukkit/advancement/AdvancementDisplayType.class)
    class file is invalid for class org.bukkit.advancement.AdvancementDisplayType
    Please remove or make sure it appears in the correct subdirectory of the classpath.

and this class of spigot-api dependencie not found ?

tender shard
#

are you sure that you use spigot, and not paper?

#

as dependency

mossy marlin
#

but i verify in my computer and i it's
i have on it

mossy marlin
tender shard
#

please paste your build.gradle file

#

?paste

undone axleBOT
rotund ravine
mossy marlin
tender shard
mossy marlin
#

oh !

lost matrix
#

What even is that path?
This guy doesnt use gradle or maven

#

Is he trying to fork spigot?

mossy marlin
#

i don't know what i'm trying xD

#

i read the documentation but i didn't see that previously

#

I'm verry sorry for that

#

i think i'm bad because i don't understand what wrong again when i use exactly the same following gradle

#
Could not find io.netty:netty-transport-native-epoll:4.1.77.Final.
     Searched in the following locations:
       - https://oss.sonatype.org/content/repositories/snapshots/io/netty/netty-transport-native-epoll/4.1.77.Final/netty-transport-native-epoll-4.1.77.Final.pom
       - https://oss.sonatype.org/content/repositories/central/io/netty/netty-transport-native-epoll/4.1.77.Final/netty-transport-native-epoll-4.1.77.Final.pom
       - file:/C:/Users/Georgio/.m2/repository/io/netty/netty-transport-native-epoll/4.1.77.Final/netty-transport-native-epoll-4.1.77.Final.pom
     Required by:
         project : > org.spigotmc:spigot:1.19.2-R0.1-SNAPSHOT
eternal oxide
#

Question: why are you trying to use gradle with Spigot?

lost matrix
eternal oxide
#

?maven

undone axleBOT
mossy marlin
#

ok thank you i read it thank you for your time ^^

rough ibex
#

magically my problem fixed itself after i came back to it after a week

#

i changed nothing

quaint mantle
#

how do i see the total lines or chars of my project

#

in intellij

tawny remnant
flint coyote
mossy marlin
#

and i have good pom.xml

#

i see the same on doc

#
<repositories>
        <repository>
            <id>spigotmc-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
        </repository>
        <repository>
            <id>sonatype</id>
            <url>https://oss.sonatype.org/content/groups/public/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.19.2-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

i didn't fail again is correct, no ?

quaint mantle
#

whats your error

mossy marlin
#

same cannot access org.bukkit.advancement.AdvancementDisplayType

#

and i have on other class

quaint mantle
#

doesnt work for me

mossy marlin
#

it's find for me

quaint mantle
#

im using 1.8.8 api so yeah

quaint mantle
#

whats the problem

mossy marlin
#

when i run package

quaint mantle
#

idk sorry

mossy marlin
#

no problem

lost matrix
mossy marlin
#

no i change outpath of package jarfile in my server/plugins automatically

sacred mountain
#

do i put the remapped obf jar into the server or the normal jar

#

when using mappings

lost matrix
lost matrix
mossy marlin
#

yes really yes i starting new clean project

lost matrix
mossy marlin
#

ok it's removed

lost matrix
#

You should never add jars to your project

#

When using maven or gradle

#

Now compile again

mossy marlin
#

same problem

#

didn't find the class

cobalt thorn
lost matrix
# mossy marlin didn't find the class

Im 90% sure that you still have the spigot jar added to your project.
Remove the project and create a new one. Just follow the maven steps and dont do anything else.

lost matrix
mossy marlin
#

ok i trying again

cobalt thorn
lost matrix
#

Why

lost matrix
cobalt thorn
# lost matrix Why
        <dependency>
            <groupId>net.rosamei</groupId>
            <artifactId>AlixAPI</artifactId>
            <version>1.0-SNAPSHOT</version>
            <scope>system</scope>
            <systemPath>${user.home}/IdeaProjects/AlixApi/target/AlixAPI.jar</systemPath>
        </dependency>
lost matrix
#

Yeah dont do that

delicate lynx
#

install the jar with maven 10000% times easier

lost matrix
crystal bay
#

question is a databse in a yml file just a thingy u need to make a virtual storage system or do u need to link it to some website

delicate lynx
#

wat

mossy marlin
#

thx you, sorry i need to sleep it's late, and i have most tests tomorrow (3) in noSQL xD

regal scaffold
#

Alex

#

Have you played around with dispaly entities?

earnest lark
#

do me.CyfiWolfie.main.Main

crystal bay
#

This is a reference to negativitys source code

Database:
  # Enable database
  isActive: false
  # Info is stored by player ID, not username.
  # This plugin doesn't edit the database.
  # The database credentials and IP are never accessable by us.
  url: "example/mydb"
  user: "root"
  password: "example"
  type: "mysql
``` do you need to link the database to some website or something?
earnest lark
#

oh

lost matrix
crystal bay
#

thats not what im asking

tawny remnant
lost matrix
crystal bay
#

then what is it exactly?

#

is that just some random db

tawny remnant
#

url is the adress isnt it

lost matrix
crystal bay
#

well im just confused like how does it work-

#

where does it store the data... how do i get to it with the url

hazy parrot
#

It's probably referred to jdbc as url

lost matrix
tawny remnant
lost matrix
crystal bay
eternal oxide
#

?nms

eternal oxide
#

I was slow

lost matrix
crystal bay
#

yeah but would that video help at all

lost matrix
#

And the server needs a started DB ofc

#

How do you need a fking hour to explain how to connect to a database?
You need 10 mins max for each

  • Create table
  • Insert query
  • Get query
lost matrix
tardy delta
#

uh oh kody simpson

#

that man learnt me to abuse every aspect of spigot

lost matrix
#

Im already triggered

tardy delta
#

calm down 💀

eternal oxide
#

annoying no space. as annoying as { on a new line

round finch
#

Yup

hazy parrot
#

How hard is it to press ctrl alt l. No way someone is preferring no space

late sonnet
tardy delta
#

me with c++ rn

#

i refuse to put { on a new line

round finch
late sonnet
#

or

if( true )
{
}
drifting anvil
#

just do whatever autocomplete does for you

round finch
#

More cursed

tardy delta
#

basically bungeecord code

late sonnet
#

and buildtools

round finch
#

If(true) {

}

#

Feels better

analog valley
#

I joined this server called TubNet and im wondering how is the custom message that forces you to use the server resourcepack made ? any ideas ?

tardy delta
#

no clue what that is

analog valley
#

heres what i get when i join. I want to know how its made

tardy delta
#

whats custom about that?

analog valley
#

how is it made ?

round finch
#

Why that random link

analog valley
#

its a screenshot

round finch
#

Hmmm

lost matrix
#

Cant see that image. Garbage website

tardy delta
#

ive done that myself but i forgot the event name 💀

regal scaffold
#

xd

analog valley
#

xd

tardy delta
analog valley
#

YES

sacred mountain
analog valley
lost matrix
tardy delta
#

its some event.setWhatever

#

but i forgot the event

#

and i cant seem to find it in the docs

analog valley
analog valley
regal scaffold
sacred mountain
#

theres a texture for the gui of the demo screen without the text, is it possible to trigger that overlay without the demo writing coming up:

#

or even better write whatever i want on it

tardy delta
#

isnt demo screen client side?

sacred mountain
#

you can put it on any players screen but i think the text might be

#

i remember having a util in my packets class

#

for a demo screen

#

i just used it to annoy my friends

tardy delta
#

its just Player#showDemoScreen or smth

sacred mountain
#

really? damn

#

mustve been a while back then

#

Servers can modify the text on this screen using a resource pack.

#

mmm

tardy delta
#

is that the This demo will last 5 in-game days (about 1 hour and 40 minutes of real time). Check the advancements for hints! Have fun! message?

sacred mountain
#

yeah think so

sacred mountain
#

i can't think why i wouldn't have used Player#showDemoScreen

#

tho

tardy delta
#

override that with a resourcepack

sacred mountain
#

yeahhhh

#

that's for 1.16.3 tho

tardy delta
#

same message probably

young knoll
#

Note that you can't change what the buttons do

analog valley
orchid trout
#

its client-side

analog valley
#

i get it, but i want to know how did they make it

tall dragon
#

code

young knoll
#

Pretty much

analog valley
#

you guys so useless fr

young knoll
#

What server are you even talking about

tall dragon
#

-,-

analog valley
young knoll
#

Okay

analog valley
#

try it for urself

young knoll
#

What did they make

analog valley
#

connect and see

young knoll
analog valley
#

it is

young knoll
#

That's just the forced resource pack screen

analog valley
#

but when i try to force it, when player clicks no, he doesnt get kicked, and if he did, he would get the screen when he connects second time

earnest lark
#

im blanking rn how do i set a items metadata

tall dragon
#

ItemStack#setItemMeta(); ?

analog valley
flint coyote
#

You get the metadata from the itemstack, change it and set it back on the itemStack

earnest lark
analog valley
#

yes

tall dragon
orchid trout
#

he didnt ask for that

earnest lark
#

it doesent like whn i try to accualy put in the data

tall dragon
#

show then

analog valley
#

@young knoll did you try it ?

tawny remnant
chrome beacon
young knoll
#

They probably just listen for the deny packet and change it to accept

#

Or somethin

analog valley
chrome beacon
#

Well then I'll just not help you

orchid trout
#

happy ending

chrome beacon
#

You're depending on the wrong version of Protocollib. (Doesn't causes your issue though)

chrome beacon
orchid trout
#

you probably forgot to add the command to the plugin.yml

chrome beacon
tawny remnant
#

i did not

tawny remnant
tawny remnant
chrome beacon
#

The error is probably caused by a remapping problem

orchid trout
#

what is remmapirng

chrome beacon
#

The server code is obfuscated

tawny remnant
chrome beacon
#

So we apply mojang mappings to make the method names make sense

#

Remapping changes things back to obfuscated names

orchid trout
#

why would building into the output directory be the issue

tawny remnant
#

yeah why would it

#

he did say try tho

chrome beacon
#

I wanted to see if the shade plugin would output the jar before remapping

orchid trout
#

ok

tawny remnant
#

it still gives this
java.lang.NoClassDefFoundError: net/minecraft/world/entity/player/Player

#

even when i change the entire code

chrome beacon
#

What version is the server running

sly berry
#

where is the code which sends the packet to client about the item change in

PlayerInventory#setItem()```
tawny remnant
#

1.19.3

chrome beacon
sly berry
tawny remnant
#

[21:05:05] [Server thread/INFO]: This server is running CraftBukkit version 3670-Spigot-454acb7-bd29f41 (MC: 1.19.3) (Implementing API version 1.19.3-R0.1-SNAPSHOT)
[21:05:05] [Server thread/INFO]: Checking version, please wait...
[21:05:06] [Thread-11/INFO]: You are 32 version(s) behind

chrome beacon
#

Send the packet yourself?

sly berry
#

I want to do something when the client receives the packet. I am making a fabric client side mod

#

so I want to know what packet is being sent

tawny remnant
#

ask chatGpt

chrome beacon
#

There no real reason to listen to the packet then

chrome beacon
sly berry
#

but I need to

chrome beacon
#

Why?

sly berry
#

for science?

tawny remnant
#

let chatgpt cook

chrome beacon
#

You can interact just fine with the invetory without messing with packets

tawny remnant
#

okay back to my error message

#

any more ideas?

chrome beacon
#

If you want to do things the hard way wiki.vg has protocol information

sly berry
#

but in my special case I need to interact with the packet

#

on client side

chrome beacon
#

Doubt that you really need it

sly berry
#

ook

tawny remnant
#

okay so what do you think is wron

#

cos i have no idea

chrome beacon
#

Not sure what's wrong

tawny remnant
#

do you know what every person with a pink name would say

chrome beacon
#

Make sure you're not running an old jar

chrome beacon
#

I've seen that happen before

tawny remnant
eternal oxide
#

1.19.3 it's probably EntityHuman

chrome beacon
#

Yeah

#

Which is why I think it's a remapping problem

eternal oxide
#

definitely

tawny remnant
#

net.minecraft.world.entity.player.Player is never defiened

eternal oxide
#

because you are not remapping

tawny remnant
#

doesnt this remap

eternal oxide
#

pretty sure your version is wrong

#

1.2.4?? or 3

chrome beacon
#

.4

tawny remnant
chrome beacon
#

.2 should still work as far as I'm aware

chrome beacon
eternal oxide
#

I'll check

#

yep it compiles on .2

#

what are you using net.minecraft.world.entity.player.Player for?

tawny remnant
#

nothing

eternal oxide
#

give better answers if you want help

tawny remnant
#

i never do import net.mine.etc

#

so that is why i dont know where the problem is

eternal oxide
#

impossible

#

it can't throw a class not found on somethign you are not using

tawny remnant
#

should i drop every class?

eternal oxide
#

drop?

eternal oxide
#

where is yoru npc class?

#

ah nm

#

ok now paste your latest.log

tawny remnant
eternal oxide
#

QuestNPCCommand ?

#

ah nm, got it

#

ok thats startup stacktrace does not match the code you have shown

chrome beacon
eternal oxide
#

did you run clean package?

sly berry
#

is there any way to see the code of this method PlayerInventory#setItem() which sends the packet to the client

eternal oxide
#

?stash

undone axleBOT
eternal oxide
#

is as much code as Spigot has

sly berry
eternal oxide
#

if you want NMS internals add a --generate-source to buildtools

tawny remnant
eternal oxide
tawny remnant
#

[21:27:19] [Server thread/ERROR]: Error occurred while enabling NmsNew v1.0 (Is it up to date?)
java.lang.NoClassDefFoundError: net/minecraft/world/entity/player/Player
at me.danko.nmsnew.NmsNew.onEnable(NmsNew.java:15) ~[?:?]

tawny remnant
eternal oxide
#

it is definitely in your QuestNPCCommand.class

#

in the jar you just sent me

orchid trout
#

deobfuscating will land you to JAIL

young knoll
#

It's true

#

I once injected a single deobfusication and now I am serving life without parole

sly berry
tawny remnant
eternal oxide
#

Yeah I'm stumped by this one

tender shard
#

you did not reobfuscate your code

#

read above if you use maven ^

eternal oxide
#

oh no I found it

tender shard
#

if you use gradle, only god can help you

tawny remnant
tender shard
#

are you using maven @tawny remnant ?

tawny remnant
#

yes

tender shard
#

?nms

tender shard
#

^

chrome beacon
#

They've already done that

tender shard
#

they didnt

eternal oxide
#

Why are you importing but not using?

tawny remnant
#

not using what

eternal oxide
#

your ide should be complaining about an unused import

#

net.minecraft.world.entity.player.Player

chrome beacon
#

I still think this is an old jar

eternal oxide
#

its the one he just gave me

tender shard
#

if they would have actually used mojang maps properly, this error wouldnt show up

chrome beacon
#

Could you add some new code link a print statement

#

And then run that

eternal oxide
#

I believe it's actually a remapping failure. The import is never used so it seems to be ignored

#

never remapped

tawny remnant
#

its not there

#

is that the latest link i sent?

eternal oxide
#

that is YOUR jar that you just sent me decompiled

warm mica
#

Oh nevermind

eternal oxide
#

clearly has import net.minecraft.world.entity.player.Player;

tawny remnant
#

look at this on i made it into 1 class

eternal oxide
#

in NPCManager

tawny remnant
#

in this jar there is no NPCManager there is only 1 class

eternal oxide
#

yes ther eis

tawny remnant
#

bro

#

you aint reading my messages

eternal oxide
#

that jar you just dropped is exactly the same

tawny remnant
eternal oxide
#

I just did

tawny remnant
#

what

eternal oxide
#

Literally the jar you just dropped in this channel

tawny remnant
#

no way

eternal oxide
#

download it yourself

chrome beacon
#

The jar is 2kb smaller though

eternal oxide
#

drop it into jd-GUI

orchid trout
#

spigot drama keeps me awake

eternal oxide
#

jar I have here is 4.44

#

um odd

#

I guess jd-gui cached

tawny remnant
#

i just decompiled it

tender shard
eternal oxide
#

yep, it seems if you don;t close jd-GUI between decompiles it caches

tender shard
#

did you use File -> export to jar (or similar)?

tender shard
tawny remnant
#

are you here to help or to type ?nms

eternal oxide
#

yep, it's still there as an import

tender shard
#

I'm not here anymore, I'm gone now

#

because you clearly do not read ?nms

young knoll
#

He was never here

tender shard
#

never

eternal oxide
#

just delete the import, you never use it

tawny remnant
#

its not there

tender shard
#

imports don't get compiled "into" the .class file though @eternal oxide

chrome beacon
eternal oxide
#

they get inlined though

tender shard
#

they did, but they don't compile using maven

eternal oxide
#

ooh good point

tender shard
#

they compile through their normal IJ method

eternal oxide
#

yep using artifacts

tender shard
#

yes

eternal oxide
#

never ran maven

chrome beacon
#

I assumed they were using maven since they had a custon output folder set

eternal oxide
#

Its been so long since we saw anyone do that I'd forgotten

tawny remnant
#

excuse me?

tender shard
#

How do you compile? @tawny remnant

tawny remnant
tender shard
#

And then, which .jar do you use?

#

do you copy it yourself into the server folder?

tawny remnant
#

yes

tender shard
#

from where did you take the .jar from?

#

from the target/ directory?

tawny remnant
#

i guess

tender shard
#

don't guess

chrome beacon
#

^

tender shard
#

you must know this

tawny remnant
tender shard
#

why the heck

#

no

#

that's wrong

chrome beacon
#

I told you to remove that

tawny remnant
#

is it

tender shard
#

where did you take this from

chrome beacon
#

So long ago

tawny remnant
#

i dont know

#

it was there

tender shard
#

the outputDirectory part does NOT belong into the shade plugin

#

it belongs into the jar plugin

#

I don#t get it, why does everyone use the wrong plugin to change the output dir lol

eternal oxide
#

someone posts a bad pom and everyone copies

tender shard
eternal oxide
#

its just like everyone calling defaults on teh config

#

which returns a boolean and does nothing

tawny remnant
#

this right?

tender shard
tender shard
young knoll
#

Once a bad practice starts it spreads

tender shard
#

but you also have to remove the other stuff from the maven-shade-plugin

#

Elgar or Oli already told you

young knoll
#

I wonder if any of those plugin tutorial YouTubers have unleashed various plagues on coding

eternal oxide
tender shard
eternal oxide
#

they just call that with no logic around it at all

chrome beacon
tender shard
#

olivo good boy

young knoll
#

I remember when I was learning way back in the Stone Age

#

They made a countdown by scheduling a bunch of delayed tasks with 20 ticks longer delay for each

tender shard
#

doing things wrong is totally fine, everyoe did things wrong. the skill is to realize you do things wront, after people told you on discord 20 times, then adjusting it

#

my most popular plugin got over 130k dowloads and the code is total shit lol. if I#d were to rewrite it, I'd to it totally different

young knoll
#

Tons of popular things have questionable code

#

Like minecraft

tender shard
#

yeah lol

young knoll
#

And that TF2 leak with the developers losing their sanity

tender shard
#

what's TF2?

round finch
#

Minecraft spragetti code hahaha

eternal oxide
#

GM has a lot of TERRIBLE code in it. Can't rewrite it though as it would break so many plugins

young knoll
#

It makes me feel better about myself when I learn a popular thing is powered by spaghetti

chrome beacon
tender shard
#

oh

#

did they open source valve games?!?!

young knoll
#

No

#

It was leaked

tender shard
#

aaah

#

funny

#

I recently looked at GTA's code (san andreas and vice city)

young knoll
#

||| code courtesy of the tf source leak |||
Music: Hall of the Mountain King

channel discord --- https://discord.gg/8TYgJhwA7S
channel patreon --- https://www.patreon.com/shounic
channel tracker --- https://trello.com/b/L3B65jUX
[ todo list / current progress on upcoming videos / channel roadmap ]
feedback --- https://forms.gle/bkuGF6attQrRPc6o...

▶ Play video
round finch
tender shard
#

and I was like "wtf this looks like I myself wrote this 3 years ago)

#

which is not a good sign

eternal oxide
#

Looking back at your old code can be embarrassing or just sometimes you look and are amazed at how good it is.

tender shard
#

there are 2 rules in coding:

  1. whenever someone else coded sth X years ago, it always looks like shit
  2. If you are the person who coded it X years ago, it looks like X*2 shit
eternal oxide
#

very often

tender shard
#

if youre still happy with your code from 3 years earlier, you're either great, or hasn't improved

earnest lark
#

bro how do i change a Itemstack name

eternal oxide
#

depends which name

tender shard
#

by getting the ItemMeta, then using setDisplayName(), then setting the item back

#

or is it setCustomName()? idk, your IDE will tell you

earnest lark
#

oh

#

i feel dumb