#help-development

1 messages · Page 876 of 1

tender shard
#

?switchmappings

lilac dagger
#

DataWatcher is called EntityData in the mojang mappings

agile hollow
#

sry for the ping but thx to @tender shard and @icy beacon for all the help u gave to me <3

tender shard
lilac dagger
#

ah yes

tender shard
#

SycholicEntityData

lean arrow
#

(resending this because i changed over to remappings <3)

val dataWatcher = (event.player as CraftPlayer).handle.entityData
dataWatcher.set(EntityDataAccessor(0, EntityDataSerializers.BYTE), 0x40.toByte())
val glowingByte = dataWatcher.packDirty()
if (glowingByte == null) {
  dataWatcher.set(EntityDataAccessor(0, EntityDataSerializers.INT), 0)
  val cancelByte = dataWatcher.packDirty()
  val packet = ClientboundSetEntityDataPacket(event.player.entityId, cancelByte)
  (event.player as CraftPlayer).handle.connection.send(packet)
  return
}
val packet = ClientboundSetEntityDataPacket(event.player.entityId, glowingByte)
(event.player as CraftPlayer).handle.connection.send(packet)

I cannot figure out why this packet gets sent globally instead of to just one player? If someone could help I'd be greatly appreciative!

tender shard
#

can you show the whole class or at least method?

quaint mantle
#

hey can anyone help me
pls
im trying to export a spigot plugin as jar file
but when i drop the plugin on my spigot server
it is not showing any plugin
i have used the same code in eclipse ide and intellijide when i export from there it works as fine

lilac dagger
#

you're editing the datawatcher itself

echo basalt
#

Hmm seems like cancelling void damage seems to cause a weird infinite loop

chrome beacon
#

if that works

quaint mantle
#

i like to use vscode

chrome beacon
#

Setup a proper build tool like maven or gradle

quaint mantle
#

because i always code html and css on here

chrome beacon
#

and let that handle the building

echo basalt
quaint mantle
#

im not using any maven im using no build toos

chrome beacon
#

Yeah that will just cause problems in vscode

#

It's much easier for you to use maven

agile hollow
#

why if i put the value String balance = String.valueOf(VaultHook.getBalance(p)); in the scoreboard everytime the scoreboard update it send getBalance() detected! Map: {}
if i delete the line System.out.println("getBalance() detected! Map: " + this.balances); Here:

        System.out.println("getBalance() detected! Map: " + this.balances);

        return this.balances.getOrDefault(playerName, 0);
    }```
it will make the server lag for the spam or it's only a fake spam then nothing will appen to the server status?
lean arrow
# tender shard can you show the whole class or at least method?

Right, sorry!

@EventHandler
    fun onSneak(event: PlayerToggleSneakEvent) {
        if (event.isSneaking) {
            event.player.sendMessage("You are sneaking!")
            val dataWatcher = (event.player as CraftPlayer).handle.entityData
            dataWatcher.set(EntityDataAccessor(0, EntityDataSerializers.BYTE), 0x40.toByte())
            val glowingByte = dataWatcher.packDirty()
            if (glowingByte == null) {
                dataWatcher.set(EntityDataAccessor(0, EntityDataSerializers.INT), 0)
                val cancelByte = dataWatcher.packDirty()
                val packet = ClientboundSetEntityDataPacket(event.player.entityId, cancelByte)
                (event.player as CraftPlayer).handle.connection.send(packet)
                return
            }
            val packet = ClientboundSetEntityDataPacket(event.player.entityId, glowingByte)
            (event.player as CraftPlayer).handle.connection.send(packet)
        }
    }

I know it uses Paper event handlers but I thought asking about packet problems made more sense here, I hope that's okay!

river oracle
#

gradle support is meh but I highly reccomend maven with VSC

echo basalt
lilac dagger
echo basalt
#

yeah I've got no clue

#

It could be a slimeworldmanager thing

#

It could be a teleport thing

quaint mantle
#

olivio it is asking me to choose an archetrype which one should i choose

lean arrow
lilac dagger
#

let me see

#

make a copy of the list from pack dirty

#

and of the items inside

#

then find the one for sneaking in that list and modify it to your needs

tribal quarry
echo basalt
#

purpur but ye

tribal quarry
#

if something unexpected happens to client and there's absolutely no clue, try listening on packets which is being sent to client, you may find whats wrong

lean arrow
tribal quarry
#

I used it for setSpectatorTarget bug for my plugin (conflicting with ac)

quaint mantle
#

@river oracle can u tell me to add extern jar like spigot api in vs code dependecies

#

i cant find the place to add it

river oracle
#

Can't help unless you switch

quaint mantle
#

yeah im using maven too

#

im trying it

#

in vsc

river oracle
lilac dagger
lean arrow
#

I'd need to do that first and then dataWatcher.set(EntityDataAccessor(0, EntityDataSerializers.BYTE), 0x40.toByte())?

#

Like this? :

val dataWatcher = (event.player as CraftPlayer).handle.entityData.packDirty()?.toMutableList() as SynchedEntityData
dataWatcher.set(EntityDataAccessor(0, EntityDataSerializers.BYTE), 0x40.toByte())
val glowingByte = dataWatcher.packDirty()
if (glowingByte == null) {
  dataWatcher.set(EntityDataAccessor(0, EntityDataSerializers.INT), 0)
  val cancelByte = dataWatcher.packDirty()
  val packet = ClientboundSetEntityDataPacket(event.player.entityId, cancelByte)
  (event.player as CraftPlayer).handle.connection.send(packet)
  return
}
val packet = ClientboundSetEntityDataPacket(event.player.entityId, glowingByte)
(event.player as CraftPlayer).handle.connection.send(packet)

i fixed the indentation, dont know why i made note of it afterwards

quaint mantle
#

@river oracle it is giving more prblms

tame wolf
#

Why ping them

quaint mantle
#

i have add the repositers and dependency but now when i do extends JavaPlugin it is not import the org.bukkit thing and also when i created a new class inside a package it is not doing package etc.etc;

quaint mantle
river oracle
#

sounds like you don't have all the right plugins or something

#

make sure you have the Java plugin extension pack

fallow gyro
#

I'd like to test my plugin in a high latency / ping environment. Is there a way I an artificially add latency between my client and the spigot server?

eternal night
#

on linux you could do so via tc. idk if windows has a similar utility to artificially add delay to network interfaces

lilac dagger
#

you're telling me someone thought of it? 😮

fallow gyro
eternal night
#

nice party

blazing ocean
tender shard
#

thank you IntelliJ

#

for this beautiful information

#

"plugin" is null

#

because you never assign any value to it

#

You often need a reference to your main instance (the instance of your class that extends JavaPlugin) in some of your other classes. There’s two basic concepts for this. Choose whichever you like more. Method #1: Static Getter First way is to create a static method called getInstance() or similar in your main class. You...

#

btw your "plugin" field should not be public

quaint mantle
# tender shard "plugin" is null

where my error told ? org.bukkit.event.EventException is 'Plugin' ? and i used public static SetStaticIpforeveryplayer plugin;
public static SetStaticIpforeveryplayer getPlugin(){
return plugin;
} and SetStaticIpforeveryplayer plugin = SetStaticIpforeveryplayer.getPlugin();

blazing ocean
#

do something like this:

public final class SetStaticIpforeveryplayer extends JavaPlugin {
    private SetStaticIpforeveryplayer plugin;
    public static SetStaticIpforeveryplayer getPlugin() {
        return plugin;
    }
    @Override
    public void onEnable() {
        plugin =  this;
        getServer().getPluginManager().registerEvents(new MyCodes(), this);
        saveDefaultConfig();
    }

    @Override
    public void onDisable() {
        // Plugin shutdown logic
    }

}
blazing ocean
#

wdym

#

oh right

#

fixed!

#

also, try to not get the value on every player join:


    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent event){
        SetStaticIpforeveryplayer plugin = SetStaticIpforeveryplayer.getPlugin();
        String database = plugin.getConfig().getString("connection");

        String root = plugin.getConfig().getString("username");

        String password = plugin.getConfig().getString("password");

        String registermessage = plugin.getConfig().getString("registermessage");

        String errormessage = plugin.getConfig().getString("errormessage");

        String welcomemessage = plugin.getConfig().getString("welcomemessage");

        Player player = (Player) event.getPlayer();
        UUID uuid = player.getUniqueId();
        String stringuuid = uuid.toString();
        String name = player.getName();
        String Ip = player.getAddress().getAddress().toString();
    }

might be a little bad performance-wise and bad practice
also I genuinely have no idea if that is sql injection safe

quaint mantle
river oracle
#

storing passwords in config files? WILDDDDDD

quaint mantle
#

this isn't save any password

quaint mantle
blazing ocean
livid dove
#

is there any specific way to determine what type of loot event is being called or any mcguivered way folk have come up with?

Would like to know if the loot being generated is like spawner dungeons, mineshafts, strongholds etc.

tender shard
#

check the namespacedkey of the loottable

#

LootGenerateEvent -> getLootTable() -> getKey()

livid dove
#

Ah sweet

#

is there a list of keys?

#

for reference

tender shard
#

check the LootTables class

#

just decompile it / Ctrl+B into it in IJ

livid dove
#

I always have the java docs open we gucci. Missed the LootTables Enum. Cheers Mfnalex. Makes this so much easier

tender shard
#

np

#

RIP I just spent 5 minutes debugging why the flags for my command are not working, wihtout any errors... until I realized I missed this line

#

default args in kotlin are dangerous!

livid dove
#

ew kotlin

#

lol

tender shard
#

people keep complaining about it but it saved me so much work ¯_(ツ)_/¯

livid dove
#

I respect it. I just personally prefer java

#

And in my defence, default args did just kick ur ass lol

tender shard
#

yeah but it's my fault for using them lol

#

I could have also made that parameter required, it's my fault kek

livid dove
#

AYOOO

#

Jk

#

But yeah where is loottables even called from?

tender shard
#

in spigot itself? nowhere, I guess

#

it's just there so you can quickly access them

livid dove
#

God damn that sucks. Would of been god tier to have a way to get the enum based on the namespaced key lol

tender shard
#
public static LootTables getByKey(NamespacedKey key) {
  for(LootTables table : LootTables.values()) { ...

well you'll just need a method like this ^

#

then return null if it's not there, because it might be a custom loottable, or from a datapack, or whatever

livid dove
#

Yeah its the for loop that does me an ick

#

Might make a manager or cache or something and map em all out.

#

Cause yknow. Even the term "key" implies mapping would be big n clever

#

I know its actual purpose dgmr

#

But like, if this is gonna call every time an event procs , imagine a 100 person server with loads of folk fishing etc

#

cant see a for loop without mapping going well for tps

young knoll
#

Why do you need the enum

livid dove
#

Working on a project where a user could define additional loot for specific loot cases based on the LootTables enum

tender shard
#

why do baboons like bananas

livid dove
#

To give a lot of flexibility to what the user can change

slender elbow
#

so, uh, datapacks but not with a datapack?

tender shard
#

aren't datapacks json?

slender elbow
#

from what i understand that stuff is fairly easy to change with data packs lol

livid dove
#

Mhm. I dont wanna say too much but . points at mythiccraft

young knoll
#

Why not do it with the key

#

Rather than the constant

livid dove
#

The key , unless im misreading, is not commonly available to the end user unless you decompile.

It is a lot nicer for user experience to go "to see valid loot events you can effect, check out LootTables in the javadocs"

young knoll
#

I mean

#

You can easily see the keys with /loot

#

Or by looking at the vanilla datapack

#

Or you could just make a /listkeys command

slender elbow
#

or by looking at the mc wiki

young knoll
#

^

livid dove
#

Is there a decent wiki page of it?

slender elbow
#

i like the idea of directing people to the wiki ngl

slender elbow
#

🤔

livid dove
#

I meant a wiki page with the keys

slender elbow
#

probably? it has a lot of stuff

#

lemme check rq

livid dove
#

nw

#

Seems like a border line "why cant we just have the loottables type as a method in the LootTable class" moment lol

#

Like im not crazy for thinking thats a reasonable idea right?

young knoll
#

hmm?

livid dove
#

Well my thought process is time saving. All the end user is gonna get is the namespaced key. And then there is no way to get the type of LootTable it is from the LootTable u get from the LootGenerateEvent.

Seems like an odd thing to have to rubber band and glue together

young knoll
#

wdym type

livid dove
#

Like "I just wanna know what type of loot ive generated fml" sorta moment lol

young knoll
#

Like the constant?

livid dove
#

Like its as reasonable (in my head at least) as wanting to know the material type of a block or item etc

young knoll
#

Registry.LOOT_TABLES.get()?

#

or .match

livid dove
#

wow im a muppet lol

slender elbow
#

registry ❤️

brazen badge
#

I have a problem. With this code some mobs spawn, others don't, and I don't understand the reason for this

#

proof that the id is passed correctly

#

yes, these ids exist and the mobs are configured

#

I noticed that a mob with a certain id was spawning, so I put the id to the same mob that doesn't spawn. But it doesn't spawn anyway

#

i solved it, np

quaint mantle
#

@brazen badge use primitives btw

#

float != Float

#

But I think the compiler might optimize it alrdy idk

hollow oxide
#

i'm making a custom kb:

    public static void KB (LivingEntity attacker, LivingEntity victim, double force) {
        force/=10;
        Vector direction = new Vector(victim.getLocation().getX() - attacker.getLocation().getX(), 0.5, victim.getLocation().getZ() - attacker.getLocation().getZ()).normalize().multiply(force);
            victim.setVelocity(direction);}

and sometime there is some kind of bug:

sometime the kb is sending straight up and extremely high

sterile token
astral scroll
#

how does world border work

#

i dont understand it

eternal night
#

its a border in the world NODDERS

astral scroll
#

like size

#

its a radius

#

a diameter

#

what is size

eternal night
#

its not a circle its a square

astral scroll
#

well

#

what its size

#

from an edge to another

#

from a side to another

eternal night
#

nah, half the height

astral scroll
#

from side to center

#

HEIGHT?

eternal night
#

Well

#

sorry

#

width I guess

astral scroll
#

like y axis?

#

oh

#

so its from center to a side

eternal night
#

yeee

brisk estuary
#

Has anybody ever developed a plugin using clojure?

tender shard
#

The automatic loading of test framework implementation dependencies has been deprecated. This is scheduled to be removed in Gradle 9.0. Declare the desired test framework directly on the test suite or explicitly declare the test framework implementation dependencies on the test's runtime classpath. Consult the upgrading guide for further information: https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#test_framework_implementation_dependencies
BUILD SUCCESSFUL in 1s

I'm using this:

dependencies {
    testImplementation(kotlin("test"))
}

// ...

tasks.test {
    useJUnitPlatform()
}

I supposed I have to add JUnit manually but which version am I even using right now? lol

#

well guess doesnt matter, I just added their exampe for JUnit Jupiter and that fixed it

mint nova
#

Can i somehow disable defualt drop for ores with event?

young knoll
#

BlockDropItemEvent or BlockBreakEvent

sterile axle
#

We need your event handler code @sharp heart

sharp heart
#

that's the method that is called in my event @sterile axle

sterile axle
#

Show your entire event handler please

mint nova
sharp heart
sterile axle
#

Explain the issue you're getting again?

sharp heart
#

So my event is called twice only when the player doesn't have any item that is gaved at the end of the event

#

Exemple :

#

I have my inventory cleared
I'm making a left click
It gaved my 1 fence
And if my inventory doesn't contained this fence, it will recall again this event

#

So this event is called twice only when the item gaved weren't in my inventory before

#

That's why I think it's a spigot problem

sterile axle
#

@young knoll any idea about this

topaz cape
#

im not surprised

sharp heart
#

Maybe it's a packet problem

topaz cape
#

doubt

sharp heart
#

maybe ?

sterile axle
#

im not convinced it's a spigot problem but im not sure what the problem is, so let's wait to see if anyone else has any ideas

sharp heart
#

how can I share img ?

sterile axle
#

?verify

#

you need to verify your account

#

there should be a channel in your left sidebar

#

go there and do it; i can't see it anymore since im already verified but it's pretty easy

kind hatch
#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

sterile axle
#

why do we have ? commands and ! commands

#

consistency people

sharp heart
quiet ice
#

We have !commands?

#

Ah right, verify.

remote swallow
young knoll
#

In a perfect world they would all be /

kind hatch
#

Just update redbot

mint nova
#

yea i now im dumb

#

i searching on spigot docs and i cant find anything idk what im doing wrong

remote swallow
#

Material.COAL_ORE

lost matrix
#

You need to pass a Block and a Player
Material wont do

mint nova
#

OH my god thanks

remote swallow
#

do i question why your firing ur own block break event though

mint nova
remote swallow
#

looking at that your calling new BlockBreakEvent, why

mint nova
#

so when i break the block the player is given like idk diamond or something

#

i just learning and im watching some tutorials about java and plugin tutorials (my last java learning ends like year ago and i forgotten everything (not really but yea)

remote swallow
#

just listen to the event

#

not call it

ember estuary
#

I have a Kotlin class ClaimListener which extends Spigot's Listener Interface.
I have a Main written in Java, where i register this listener: Bukkit.getPluginManager().registerEvents(new ClaimListener(), this);.
Now when running the plugin, i get the following error in the console:
"[... ERROR]: [...] Failed to register events for class de.floskater99.mapmenu.listeners.ClaimListener because kotlin/jvm/functions/Function1 does not exist."

I'm using maven and i've added the Kotlin 1.9.22 dependency / plugin in it. (maybe wrongly? i can send the file if needed)

Does anyone know how to fix this?

lost matrix
#

Did you also shade the kotlin dependency?

remote swallow
#

shade the std lib

ember estuary
#

Nope, I don't think so, how do i do that?

tender shard
#

either use the plugin.yml library loader

#

or - are you using gradle or maven?

ember estuary
#

maven. ChatGPT told me to use the maven-shade-plugin and put <include>org.jetbrains.kotlin:kotlin-stdlib</include> and <include>org.jetbrains.kotlin:kotlin-stdlib-common</include> etc. in the <includes>.

#

seems to do the trick

tender shard
#

do you support anything lower than 1.16.5?

ember estuary
#

nah i'm doing 1.20.4 only

tender shard
#
libraries:
- "org.jetbrains.kotlin:kotlin-stdlib:1.9.22"

plugin.yml ^

#

then you don't have to shade it. Because shading it will make your .jar like 5mb bigger

#

However, if you do wanna shade it instead: https://blog.jeff-media.com/common-maven-questions/

People just getting started with maven always ask me the same 3 questions, so here’s a a short FAQ! How to change the output directory? Read this. How to shade dependencies and what it means Sometimes you are using certain libraries (for example, my CustomBlockData class, or similar stuff) that is not already present at...

ember estuary
#

ah cool, ill try that

#

ty

paper rain
#

Does any1 has expierences with JDA?

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

tender shard
tender shard
paper rain
#

xd

#

can some1 who has go dms please

#

.c

tender shard
#

why dont you just ask here

paper rain
#

okay

ember estuary
#

Where can i find the plugin.yml?

paper rain
#

im adding JDA to my spigot plugin

tender shard
ember estuary
#

nope, not even that

tender shard
#

huh

paper rain
#

im tryna create easy mc command /message which sends message to some discord channel with some id

ember estuary
#

i have a spigot.yml

tender shard
ember estuary
#

is that it?

paper rain
#

i added JDA to library

ember estuary
#

ah ok lemme check

paper rain
#

and to maven

ember estuary
#

ah there it is, yea

#

ty

tender shard
#

np

tender shard
paper rain
#

YES

tender shard
#

second headline "how to shade ..."

#

alternatively, do the same as we told Flo, and use plugin.yml libraries feature

paper rain
#

so i have to add something to pom

#

why?

remote swallow
#

to include jda inside your jar

paper rain
#

when i added some other API etc it didnt need to

tender shard
tender shard
remote swallow
tender shard
#

JDA is not

#

JDA is not already running on the server

#

you have to bring it on your own

paper rain
#

oh okay

tender shard
#

stash it into your pockets

#

yk

#

into the .jar

paper rain
#

soo i have to add the maven shade plugin?

remote swallow
#

yup

mint nova
#

when i export the plugin i dont have .jar file, why

tender shard
paper rain
#

how?

tender shard
mint nova
tender shard
paper rain
#
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-shade-plugin</artifactId>
  <version>3.5.0</version>
  <executions>
    <execution>
      <phase>package</phase>
      <goals>
        <goal>shade</goal>
      </goals>
    </execution>
  </executions>
</plugin>```

i just have to add this to plugins in maven?
tender shard
# mint nova ohh mb

If you’re using maven for your Spigot plugins (which you should do), it’s easy to make maven automatically save your plugin’s .jar in your plugins folder. There’s two ways of doing this: 1. The lazy way (not recommended) If you only work alone on one computer, you can just directly declare the output location in...

paper rain
#

like its there all time

#

and it still doesnt work

tender shard
#

Then youre not compiling properly

#

How do you compile your jar?

paper rain
#

maven?

tender shard
#

With package?

paper rain
#

yeah

tender shard
#

?paste your pom

undone axleBOT
paper rain
tender shard
#

youre setting JDA to "provided"

#

either remove the <scope> part in JDA, or set it to <scope>compile</scope>

paper rain
chrome beacon
#

JDA isn't provided by anything

#

You're the one that needs to provide it by shading it

paper rain
#

so i hae to remove
<scope>provided</scope>

tender shard
#

Yes

paper rain
#

and somethingh else?

tender shard
#

No

paper rain
#

so im gonna try it xd

tender shard
#

<scope>provided means "Yo, JDA is already provided by something else (e.g. the server)", but since it isn't, it doesnt work.

For spigot-api using scope provided is fine, because the server already includes it

paper rain
#

ohh i understand

#

thx

tender shard
#

np :3

mint nova
#
public class Drop  implements Listener {

    @EventHandler
        public void onBlockBreak(BlockBreakEvent event){
        if(event.getBlock().getType() == Material.COAL_ORE) {
            event.getBlock().getDrops().clear();
        }
    }
}

what im doing wrong, the coal drops normally :I

paper rain
#

AAHAHAH it works

#

thank you :3

tender shard
#

great! however your .jar is probably 10 mb now haha

tender shard
#

use BlockDropItemEvent

paper rain
#

yes i see

worldly ingot
#

:p beat me to it. It just gives you a copy of a list of drops

tender shard
#

alternatrively you can use setDrops to false or sth I guess

mint nova
paper rain
#

yep

tender shard
mint nova
tender shard
#

if the block would be a chest, the Block#getDrops list would just contain a chest, not its contents. Or if it's wheat it contains the wheat but no seeds

paper rain
#

@tender shard ily fr

#

im so happy

#

that

#

it finally

#

works

tender shard
#

if you only support 1.16.5+, you can also use the plugin.yml library feature to stop having to shade it, so your .jar isnt 10mb

sharp heart
#

do someone know why, directly with the entity (item), the remove method doesn't work (the entity isn't removed), but with getEntity and with this remove method, it works ?

tender shard
sharp heart
#

3rd line doesn't work, but 4th yes

mint nova
#

eh

chrome beacon
mint nova
tender shard
mint nova
#

mbb bro

chrome beacon
sharp heart
sharp heart
chrome beacon
#

.-.

tender shard
#

check if item.isValid() returns true

chrome beacon
#

How

sharp heart
#

It's ItemDisplay, not Item

tender shard
#

maybe you have a "dead" reference to the item. Check if isValid() is true. If it's false, it makes sense that you can only remove it by getting it again through Bukkit.getEntity(UUID)

tender shard
sharp heart
chrome beacon
#

I was just lazy

#

Doesn't change what I said

tender shard
sharp heart
#

that's false

#

isValid is false

chrome beacon
#

Dead reference

tender shard
#

then you're keeping a dead reference, probably the chunk got unlaoded or something similar

sharp heart
#

NICE

tender shard
#

you should generally avoid storing entities directly, and just use a List<UUID> or whatever

sharp heart
#

why ?

tender shard
#

well to avoid issues like the one you're currently facing

#

also keeping references of dead objects causes memory leaks

#

right now you keep a reference to the "dead" entity so it can't get garbage collected

#

if you'd store the UUID instead, you wouldnt have this problem

sharp heart
#

The problem is that I summon my entites at loading and the chunk isn't loaded, so they are "dead"

sharp heart
tender shard
#

that wouldnt help, the entity gets invalid as soon as the chunk unloads again

#

why don't you just store UUIDs instead of entities

sharp heart
#

entities are displayed but aren't "linked" with my object

chrome beacon
#

It will fix your issue

sharp heart
#

my remove issue yes

young knoll
#

Spawn them in the entitiesLoadEvent instead

sharp heart
young knoll
#

You can also use setPersistent false to automatially remove them when the chunk unloads

sharp heart
#

I want them to be keeped alive

tender shard
#

am I blind or does Permission not have a proper equals method

young knoll
#

It does not

tender shard
#

that sucks

#

then not even this will work 🥲

worldly ingot
#

Well children is a Map so != wouldn't have worked anyways

tender shard
#

why that?

young knoll
#

!= is not the same as .equals

#

Unless kotlin shenanigans

dry hazel
#

kotlin

tender shard
young knoll
#

Shenanigans

astral scroll
#

i love

tender shard
#

stupid permission not having equals and hashcode sucks

astral scroll
#

kotlin

#

!

young knoll
#

You should pr it

#

Kek

astral scroll
tender shard
#

I can even compare minecraft versions with > and < huehue

young knoll
#

What is the rustySpigotThreshold

astral scroll
#

i like it

#

and no ;

#

that is a pain in the ass

young knoll
#

Who doesn’t have that auto filled by the ide

tender shard
sharp heart
#

@sterile axle, here's a video to show you the bug in details

young knoll
#

Damn rusty spigot is anything but latest

#

Facts tbh

tender shard
#

yeah fuck those rusty spigots

#

at least its just a txt file so in theory stupid admins could just edit that file

young knoll
#

Lol

tender shard
#

like how they "add folia support" to arbitrary plugins

young knoll
#

Kek

tender shard
young knoll
#

I mean does 1.20.2 have EntityKnockbackEvent? I didn’t think so

tender shard
#

imagine complaining that you can't recreate 1.8 knockback in modern versions but the actual issue is that your "modern version" is just outdated too lmao

young knoll
#

Looks like the first click removes two items from the barrel

#

Which is interesting

#

Does an item appearing in your hand fire an interact event?

#

I think it makes your arm swing, but idk about the event

young knoll
#

A bandaid solution is to just ignore events from the same player within a short time

sharp heart
young knoll
#

Looks almost instant to me

tender shard
#

50ms is one tick, can't be faster anyway, can it?

young knoll
#

I guess 50ms is basically instant

young knoll
#

Unless maybe some /tick shenanigans

young knoll
#

I guess the other option is to use Interaction Entities and the events related to them

#

Might avoid the double event fire

sharp heart
#

yes, instead of PlayerInteractEvent, it's probably a good idea

young knoll
#

I’ll have a look at the interact event tomorrow to see if I can find why it fires twice

sharp heart
#

But for me, it's 100% a bug from Paper or Spigot

young knoll
#

Does it occur on spigot

#

Or only paper

sharp heart
#

you mean, the server ?

young knoll
#

Yes

sharp heart
#

The bug occured on purpur

#

Il'l check for others

tender shard
#

would also be helpful to print out all the things from the interact event (hand, action, clicked entity, ...), I'm pretty sure the event itself doesnt fire exactly the same

#

there's probably at least one difference in both events

sharp heart
#

it's the same

tender shard
#

with all the methods?

sharp heart
#

yes

tender shard
#

hm

#

RIP then

#

yeah well maybe it works on spigot

young knoll
#

Thread.currentThread.printStackTrace() :p

#

Or whatever it was

tender shard
#

I always do new LinkageError().printStackTrace() kek

young knoll
#

dumpStack

#

Thread.currentThread().dumpStack()

quiet ice
#

dumpStack is a static method

young knoll
#

actually you can skip the curr- yeah

sharp heart
quiet ice
sharp heart
#

I spend more time patching bugs than coding

tender shard
quiet ice
#

that is a very moot reason

sharp heart
young knoll
#

Is it just left click on block -> add item to inventory

tender shard
#

No idea why they chose that - maybe it also uses a different throwable everytime, haven’t checked

late sonnet
young knoll
#

It’s just Thread.dumpStack()

#

Yeah

lilac dagger
#

apparently it only does new Exception().printstacktrace()

young knoll
#

Hey if it works it works

late sonnet
#

StackTrace for debug CB is the best... NMS calls are a little... Stranges xd

lilac dagger
#

how so?

late sonnet
# lilac dagger how so?

Things like my last PR where WindCharge call explode call discard on hit block and not in hit entity but in vanilla this entity is discarted then that track help me found where is called the discard

inner mulch
#

which class function returns jsut the class name and nothing more like the pull import? getName(), getCanonicalName(), getSimpleName() ... ?

lilac dagger
#

that's a cool way to use it

lilac dagger
#

altho if it's an array object it'll have [] to signify it

inner mulch
#

okay

inner mulch
#

thank you

mint nova
#

where i can storage player data (i know in json but howw), so for example he breaks stone and get like point or something idk something simple

young knoll
#

You have a ton of options

#

Yaml, json, a database, pdc

#

Yaml is probably the easiest since spigot has a simple api for it

mint nova
#

oh yea yaml i forgot

#

i was thinking that was only for config

#

but how i can pass info to it? exact player

young knoll
#

Use the players uuid as a key

#

Or create a file with their uuid as the name

mint nova
#

have spigot docs for it? like pass etc

#

and yea 1 file sound good then few file

#

it would be for me messy ngl

young knoll
#

?

#

It’s just set(key, value)

#

It’s all in the javadocs

mint nova
#

oh

#

thanks

cobalt marlin
#

is there a way to modify the values of a potion effect when it is added to a player?

#

EntityPotionEffectEvent has no setter or way to edit the effect it seems?

young knoll
#

Could just cancel it and then apply an effect manually

cobalt marlin
#

will using livingEntity#addPotionEffect just call the event again

young knoll
#

Yes

cobalt marlin
#

how can i add this without calling the event

young knoll
#

Check the cause

#

Or just use a simple Boolean to ignore the event when it’s true

cobalt marlin
#

thanks :)

river oracle
#
BEGIN transaction
IF EXISTS (SELECT * FROM "basics-homes" WHERE "uuid" = ? AND "name" = ?)
BEGIN
  UPDATE "basics-homes" SET "x" = ?, "y" = ?, "z" = ?
END
ELSE
BEGIN
  INSERT INTO "basics-homes" ("uuid", "name", "x", "y", "z") VALUES(?, ?, ?, ?, ?) 
END
commit transaction

I have this SQL query how would I properly substitute given the condition statements?

slender elbow
#

I'd suggest using something like jetbrains exposed for kotlin/sql, but depending on how deep you are with jdbc, it might require you to restructure a ton of your app, or virtually nothing :D

river oracle
young knoll
#

Does MySQL seriously have no upsert

#

Wait no it has ON DUPLICATE KEY UPDATE

river oracle
#

guh I might look into exposed again, but last time I looked it really just didn't look ideal for basics pepesob

slender elbow
wide coyote
#

is there an easy way to get the affected item when moving items one inventory to another using hotbar buttons? getCursor and getCurrentItem both seems to return itemstacks that are not related

#

solved by getting the item directly from their inventory using the hotbar button

#

there should be an easier way to do this tho

sullen marlin
#

Isn't there a get key or something

#

?jd-s

undone axleBOT
sullen marlin
wide coyote
#
ItemStack item = event.getHotbarButton() != -1 ? event.getWhoClicked().getInventory().getItem(event.getHotbarButton()) : event.getCursor();
#

here is the exact method for future references

#

what I meant by an easier method was that, maybe make event.getCursor return the item that is being moved or maybe make a new method

quaint mantle
#

I was thinking like load up the world from /backup/ncidosncisndicsoi and unloading the current world

sullen marlin
wide coyote
#

ah yeah

#

I guess so

#

even a method like getHotbarItem() would be appreciated, would that be possible?

river oracle
#

that'd be basically the same thing

summer scroll
#

I'm trying to remove banner patterns and dye color from shield, this is my attempt https://paste.md-5.net/arohupiyan.cpp and I couldn't find anywhere to do that, can someone help please?

tender shard
#

does it send the message?

summer scroll
tender shard
#

i guess getPatterns() just returns a copy, use setPatterns(...) with an empty list

summer scroll
#

I'm thinking to create another shield but copy like the enchantments and stuff.

sullen marlin
#

Not sure if get patterns is a copy

summer scroll
#

The patterns got removed but the color is not.

sullen marlin
#

Might need to .setPatterns

#

Oh

tender shard
#

but i have no idea what that means / what the replacement is supposed to be kek

summer scroll
sullen marlin
#

Well you set it to white, so that's why it's white?

summer scroll
#

Yes I think so, but there is no default dyecolor is it?

sullen marlin
#

Use the /data command to compare the banner you have with the banner you want

summer scroll
#

Before I put color and patterns to the shield, the value come up as WHITE so I use that.

sullen marlin
#

I think what you're really after is a banner with no meta?

#

Blockstatemeta.setBlockState(null)?

summer scroll
#

That's maybe correct.

#

But it's annotated as @NotNull

tender shard
#

just get a new itemmeta

sullen marlin
#

Hmm

summer scroll
sullen marlin
#

Yeah I guess that's an option

#

I wonder why it's notnull

tender shard
#

ItemMeta newMeta = Material.WHITE_BANNER.createItemMeta();

#

no wait

summer scroll
#

I've tried to set the blockstate with this

    public static Banner getDefaultBanner() {
        ItemStack stack = new ItemStack(Material.SHIELD);
        if (stack.getItemMeta() instanceof BlockStateMeta blockMeta &&
                blockMeta.getBlockState() instanceof Banner banner) {
            return banner;
        }
        throw new RuntimeException("Failed to retrieve default banner data!");
    }
#

But same results happening.

tender shard
#
ItemMeta newMeta = Bukkit.getItemFactory().getItemMeta(Material.WHITE_BANNER);

this should give a new item meta for an empty banner

#

then set the banner's meta to that

summer scroll
#

Yeah I think that's the workaround, I'll do that thank you.

tender shard
#

i could swear that Material#createItemMeta() was a thing

sullen marlin
#

confused, are you after a plain shield or a white shield

summer scroll
#

Converting colored shield with banner patterns to plain shield.

sullen marlin
#

looking at the code this may not be possible for whatever reason

#

I think it would need a null blockstate which isn't allowed

summer scroll
#

I throw blockstate from new shield item and the result still the same.

sullen marlin
#

I think you have to replace the whole itemmeta

#

but you should also open a bug report

tender shard
#

what about setting it to an air blockstate maybe

sullen marlin
#

will error due to invalid blockstate for material

tender shard
#

oh

sullen marlin
#

I think this is a bug due to the special casing of shield. setBlockState should probably be nullable to allow it

summer scroll
#

Yeah so, creating a new item meta works perfectly, a little bit mess but it's okay xd.

#

Thanks for the help guys!

tender shard
#

item meta is always messy anyway 🥲

wide coyote
#

its not about the players hand item after all

#

you can press any hotbar button

upper hazel
#

what flag object is needed to add existing flags

quaint mantle
#

region#setFlag()?

upper hazel
# quaint mantle region#setFlag()?

You don’t understand, I know how to add a flag, but what object is needed for the flag itself? I tried using - Flag<?>, Flags - for now

quaint mantle
#

Flag type

#

Like StateFlag

#

Need bool

upper hazel
quaint mantle
#

Flag<Input Type>

upper hazel
#

region.setFlag<"what here", Flag.StateFLag>

#

what the object

quaint mantle
#

In state it will be StateFlag.State

#

as input

upper hazel
#

what objects are included in the input

quaint mantle
#

Or Flags.PVP

upper hazel
#

I need a flag type that exists in worldGuard, is it really possible to use String and not enum to add a flag?

quaint mantle
#

Flags.WG_FLAG

#

Like region.setFlag(Flags.PVP, StateFalag.State.ALLOW)

upper hazel
hushed spindle
#

does Entity#setPersistent() determine if an entity despawns or not

quaint mantle
#

Yup

hushed spindle
#

ty

quaint mantle
#

Bruh setFlag have 2 args

#

forEach gives one arg

upper hazel
#

in code 2 args

quaint mantle
#

flags.forEach(region::setFlag);

upper hazel
#

like this is a shortened version of argument 2

#

flag, state

quaint mantle
#

Flag can take not only states

#

For example greeting message flag takes string

upper hazel
quaint mantle
#

Map<Flag<?>,?> should be like that

upper hazel
#

lol

#

no not working - 'setFlag(T, V)' in 'com.sk89q.worldguard.protection.regions.ProtectedRegion' cannot be applied to '(com.sk89q.worldguard.protection.flags.Flag<capture<?>>, capture<?>)'

#

i gess i need generic

#

i find Map<Flag<?>, Object>

#

Now the problem is how to create the correct objects from the string (flags from the config).

tawny pine
#

is there any way to disable a plugin from sending messages to a player? for example, a plugin with no config and no normal options for disabling messages?

tender shard
#

listen to outgoing chat packets

#

either with protocollib or inject into netty

tawny pine
#

ok thanks 🙂

tender shard
#

should be ClientboundSystemChatPacket

tawny pine
#

ah k

tender shard
#

(in mojang maps)

tawny pine
#

ty 🙂

tawny pine
#

how can i execute a command from a player even when that player is not online?

smoky anchor
tawny pine
#

🙂

#

ty

fathom jay
#

ik this may be stupid but, is it possible to do an optional parameter to a void method? (kinda not used to java)

eternal oxide
#

method overloading

tender shard
#

yeah

public void printName() {
  printName("default value");
}

public void printName(String name) { 
  System.out.println("My name is " + name);
}
fathom jay
#

oh ok, so I can just create same method but with different parameters... cool cool

#

Depending on which types of parameters I give it, it will look for the suited method, thats nice

#

ty for the help, both of you

astral scroll
#

Hello

#

Im having an issue using FAWE

#

I want to create a world and paste an schematic

#

The problem isnt the code, it works

#

The problem is, it lags the server when pasting

#

so i tried with Async Tasks, it still lags the server

#

Sync tasks, also lags

#

So what can i do to prevent this lag?

#

(i tried creating the worlds and pasting the schem on enable but that doesnt work for me)

eternal oxide
#

you can't. Pasting multiple blocks will lag

inner mulch
#

does anybody know how I can listen to redis streams when using jedis? Do i need a runnable looking for new packets every tick or can i have something like an event listener?

vocal cloud
#

Why would you want to do that?

inner mulch
#

i want to listen to redis streams?

#

i dont know how to properly listen to them as a bukkitrunnable doesnt feel like the right way

chrome beacon
#

Might want to pubsub instead though

#

Depends on what the goal here is

inner mulch
#

im trying to send data across servers

#

to get data in sync

tender shard
#

is it possible to merge a pull request on github into another branch, but still letting github know that the pull request was merged? Right now it just still says "Open" because obviously it's not merged into master

inner mulch
#

at least i cannot find it

#

they only explain xread

astral scroll
cold oyster
#

is there a documentation on spigot resource api? couldnt find one

eternal oxide
#

?jd-s

undone axleBOT
cold oyster
#

not talking about the server software

#

website

eternal oxide
#

oh that

#

no idea, never used it

cold oyster
#

i want to get the latest version of a resource id

fathom jay
#

kind of old and idk if that can even help u

cold oyster
#

is that the only documentation? i wanted it outside java

#

i can go through the code

fathom jay
#

srry thats the only thing i knew about the topic

cold oyster
#

👍

remote swallow
cold oyster
#

thanks

icy beacon
#

I was just implementing a login system for my android app and realized I'm stuck. I use argon to hash my passwords and everytime I generate a password, I generate a new salt. This means that if the user registers with a password and then tries authenticating with the same password, they'll fail, because the salts don't match. What should I do? Should I maybe base my salt on the email hash code?

chrome beacon
#

I'd just let a bcrypt library handle password hashing

icy beacon
#

I am using a library indeed

kind hatch
#

That’s just part of the problem with salts. They have to be deterministic in order to be reliable.

icy beacon
icy beacon
kind hatch
#

Probably a combination of both at least to get started.

icy beacon
#

I think that my understanding of the concept is just a bit convoluted.. I imagined that the approach would be as follows: the user puts in their credentials, I hash the password and then send the email & hash to my API. In the API, I simply compare the hash stored in the database with the requested hash, so just a string comparison. Am I doing something wrong? Because for some reason it feels weird now that I say it all out loud lol

kind hatch
#

You’d do a comparison with hashFunction(password + salt)

tender shard
#

How would you be able to recreate it

icy beacon
#

Well, if I have password abc, the salt would be the hashcode of abc

#

That's what I mean

icy beacon
eternal night
remote swallow
#

couldnt you then unsalt that

icy beacon
#

Perhaps.. I'm so confused rn lol

#

I thought I understood the topic and now I'm getting more confused by the minute

tender shard
#

You have to be able to recreate the salt without having the password

eternal night
#

why would your client application be the one to hash and salt the password

eternal night
#

beacuse your client application would then know the salt and hash function you use ?

icy beacon
#

Oh shit

eternal night
#

like, you are already encrypted via SSL

icy beacon
#

So do I send my password in plain text to the API?

#

And it does the heavy lifting

eternal night
#

you send the password to the server. The server grabs the password, combines it with the salt for the user you store in the db, does the hashing and then compares

eternal night
icy beacon
eternal night
#

salt exists because you want to prevent people from guessing the password if they get your DB

icy beacon
tender shard
icy beacon
eternal night
#

if your original PR targets master and you just manually merge then no

icy beacon
#

Now it is starting to make sense

eternal night
#

the PR should obviously stay open

#

the changes did not make it into the branch the PR targetted

tender shard
#

yeah that's why I'm asking whether I can tell github that I want to it to target another branch, without asking the PR author to PR again

eternal night
#

don't think so

tender shard
#

ok sad

#

I hope it recognizes it when I finally merge the other branch into main

eternal night
#

I mean, if they have the "let admins edit" thing enabled you might be able to ?

#

Yea

#

the save button was an edit button prior ^ @tender shard

tender shard
#

aah yeah that's exactly what I was looking for I guess. thanks!

remote swallow
#

woah 2ss in the wild

eternal oxide
#

Not related to Spigot so keep it to yourself

icy beacon
#

I mean.. yes? Very odd question though

halcyon hemlock
tender shard
#

this is help-dev

halcyon hemlock
#

i was wondering how you could stream audio to note blocks

icy beacon
#

Could be worse xD

halcyon hemlock
#

is it possible

halcyon hemlock
#

thats why i said that

tender shard
#

there is ofc noteblock api but that's like midi on crack

halcyon hemlock
#

how does hypixel do it

#

play music in boss rooms

tender shard
#

there is only resource packs, or reusing existing sounds like noteblocks

halcyon hemlock
#

how do you turn audio stream into noteblocks

#

never did audio stuff so am confused

tender shard
#

NoteBlockAPI can read "midi" files (nbs)

echo basalt
#

@carmine mica I need a favor

young knoll
#

👀

echo basalt
#

I need more real estate below my good habits post

#

As I'm doing an edit and it'll likely go over the message limit for the reserved message too

#

(This edit's present on the spigot version)

#

Yikes

#

Conclube could also help :)

young knoll
#

At this point maybe consider a gist

echo basalt
#

I already have it as a forum thread and on git

#

A discord message feels more personal

#

Hm I wonder what nitro's message limit is

#

I'm thinking 4000

young knoll
#

I think it’s double the normal

echo basalt
#

Yeah that's not enough

#

The message I'm going to edit + reserve hits 8k

#

need one more and that needs deleting at least 3 messages

remote swallow
#

just make a blog /shrug

young knoll
#

Tumblr post

remote swallow
#

or use a webhook embed builder and get coll to send the link

#

iirc they dont get as hard of a char limit

proud badge
#

What takes more time,
Statement statement = connection.createStatement();
or
stateement.execute(a);

rough drift
#

if you need more control do the 1st

proud badge
#

Nah because im making some java code to migrate an SQlite database to mysql, and its 20 gb in size so theres lots of sql executions im gonna need to do

rough drift
#

ah then they're the same

slender elbow
#

you need the first to do the second

#

lol

#

you need a Statement if you want to run execute on a Statement

remote swallow
#

prepared statement be like

slender elbow
#

also batching 🙏

river oracle
#

what tf could cause this erorr I'm so confused lol

e: file:///home/miles/IdeaProjects/basics/modules/basics-home/src/main/kotlin/com/github/spigotbasics/modules/basicshome/data/BasicHomeDao.kt:5:1 Inherited platform declarations clash: The following declarations have the same JVM signature (references$default(Lcom/github/spigotbasics/libraries/org/jetbrains/exposed/sql/Column;Lcom/github/spigotbasics/libraries/org/jetbrains/exposed/sql/Column;Lcom/github/spigotbasics/libraries/org/jetbrains/exposed/sql/ReferenceOption;Lcom/github/spigotbasics/libraries/org/jetbrains/exposed/sql/ReferenceOption;Ljava/lang/String;ILjava/lang/Object;)Lcom/github/spigotbasics/libraries/org/jetbrains/exposed/sql/Column;):
slender elbow
#

e

river oracle
#

unable to find any github issues on the repository of exposed

slender elbow
#

method signature clash !!!

upper hazel
#

hi i dont remember how i can rename jar in maven (not source just jar name)

slender elbow
#

BasicHomeDao:5

tardy delta
#

generated code?

river oracle
#

quite literally the same as their example 🥲

slender elbow
#

lol

#

no methods overridden?

quiet ice
#

is the example even valid?

river oracle
#

maybe because I didn't override the primary key, but it's not forcing me to do it?

#

I don't really want primary keys

#

I want to beable to have multiple entries with the same uuid

slender elbow
#

impressive

#

never seen that before lmao

river oracle
#

kinda confused lmao

#

I wonder if it has to do with the relocations

slender elbow
#

oh uh yeah there was something about exposed and relocations

#

lemme check

river oracle
short plover
#

how do you break a block naturally just like vanilla? I tried block.breakNaturally() but it doesn't spawn particles if the block wouldn't drop for the tool the player is using and doesn't get rid of durability of the tool the player used to break the block and it also doesn't seem to take into account the fortune enchantment

slender elbow
river oracle
#

no clue @tender shard how to not relocate xD

#

ig I can test on my own repo

short plover
tender shard
river oracle
#

okay

tender shard
#

i think I'm relocating all the stuff in a for loop or sth

river oracle
#

yeah I'ma just add an exception for everything under org.jetbrains.exposed

#

hermmm well

e: file:///home/miles/IdeaProjects/basics/modules/basics-home/src/main/kotlin/com/github/spigotbasics/modules/basicshome/data/BasicHomeDao.kt:3:34 Unresolved reference: Column
e: file:///home/miles/IdeaProjects/basics/modules/basics-home/src/main/kotlin/com/github/spigotbasics/modules/basicshome/data/BasicHomeDao.kt:4:34 Unresolved reference: Table
#

that's not good either

slender elbow
#

how are you building?

river oracle
#

@tender shard now it won't detect the imports xD

tender shard
#

did you clean and then change the imports to non-relocated ones?

river oracle
#

this should work

    archiveClassifier = "shaded"
    for (path in listOf(
        "net.kyori",
        "io.papermc.lib",
        "org.intellij",
        "org.jetbrains",
        "com.tcoded.folialib"
    )) {
        if (path in listOf("org.jetbrains.exposed")) {
            continue;
        }
        relocate(path, "$SHADED.$path")
    }```
#

yeah, but it won't detect them on classpath now

slender elbow
#

paper !!!

#

argh

tender shard
#

just comment out org.jetbrains

proud badge
#
        try {
            Statement litestatement = liteconnect.createStatement();
            Statement mystatement = mysqlconnect.createStatement();
            String sql = "SELECT * FROM co_art_map";
            ResultSet result = litestatement.executeQuery(sql);
            while(result.next()) {
                mystatement.execute("INSERT INTO co_art_map VALUES("+result.getInt("id")+", '"+result.getString("art")+"'");
            }
        }catch(SQLException e) {
            System.out.println("Error when doing co art migration");
            e.printStackTrace();
        }
        
    }```
Hi issue, what if the table im trying to migrate is like 15 GB in size? I dont have that much ram in my PC to store a 15 gb sized ResultSet
#

migrating sqlite -> mysql

river oracle
tender shard
#

just comment out org.jetbrains, doesnt really matter where they are or if at all

river oracle
#

😭 wtf is going on

#

ig I'll invalidate my caches

#

gradle clean ain't cutting it

slender elbow
#

gradle does not care about intellij caches

slender elbow
river oracle
#

everything with gradle should be good to go though

river oracle
#

or for a clean build ./gradlew clean build

#

@tender shard just took a while to refresh ig

#

it was intellij

#

dude wild

e: file:///home/miles/IdeaProjects/basics/modules/basics-home/src/main/kotlin/com/github/spigotbasics/modules/basicshome/data/BasicHomeDao.kt:5:23 Unresolved reference: Table
#

lol invalidating caches fixed it

#

@slender elbow it was our relocations

#

gonna have to figure that out

slender elbow
#

:trollface:

upper hazel
#

somone how rename jar name in build process? <finalName> not work

river oracle
#

can't exactly not relocate with minecraft

#

cuz of sPIGOOT

sand spire
#

Is it possible to remove the default particle trail that spawns when an spectral arrow is flying?

tender shard
#

If you’re using maven for your Spigot plugins (which you should do), it’s easy to make maven automatically save your plugin’s .jar in your plugins folder. There’s two ways of doing this: 1. The lazy way (not recommended) If you only work alone on one computer, you can just directly declare the output location in...

upper hazel
upper hazel
#

create a version system

#

like "plugin-1.0.0" without affecting the main class

#

not "put plugin automatically into derictory"

tender shard
#

then don't change the directory

#

just leave out the <outputDirectory> part

upper hazel
#

and yet I don’t understand why the build system doesn’t support tags like Jar.fileName or just FileName, in the end the name remains the same, it should have been easier

tender shard
#

it is extremely easy

#

it's just one property that you have to set

upper hazel
#

when you know which tag works, then yes, but no matter how many tags I tried, it didn’t work

tender shard
#

it is literally mentioned in the blog post I sent you

icy beacon
#

Should timing attacks worry me if I hash passwords

upper hazel
#

in fact, tags like finalName should work, but they don’t

tender shard
#

?paste your pom

undone axleBOT
tender shard
#

@upper hazel paste your pom

upper hazel
#

wait

tender shard
#

yeah well you haven't read my blog post at all

#

that's why it doesnt work

#

do it like my blog post explains and it will work

#

If you’re using maven for your Spigot plugins (which you should do), it’s easy to make maven automatically save your plugin’s .jar in your plugins folder. There’s two ways of doing this: 1. The lazy way (not recommended) If you only work alone on one computer, you can just directly declare the output location in...

upper hazel
#

Are you talking about creating a profile in maven?

tender shard
#

it doesnt matter whether you choose option 1 or option 2

#

both will work

#

you are currently using option 3 (the wrong one) plus a few useless <properties>

upper hazel
#

I've tried to put that tag in every possible place....

tender shard
#

dude

upper hazel
#

When I read about this topic nowhere it was mentioned about outputDirectory tag I don't understand the specifics of this bukkit api

tender shard
#

what does this have to do with bukkit?

#
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-jar-plugin</artifactId>
  <version>3.3.0</version>
  <configuration>
    <finalName>WhatEver</finalName> <!-------------------------------------- here -->
  </configuration>
</plugin>
#

your current way is the one described in "3. The wrong way (don't do this)" so I am pretty sure you didnt read the blog post at all

upper hazel
#

were need add fileName tag?

#

i was add OutDirectory tag with path

tender shard
upper hazel
#

i not have this tag

#

<artifactId>maven-compiler-plugin</artifactId>

#

i have this

tender shard
upper hazel
tender shard
upper hazel
#

ehh i was can just add this tags?

tender shard
upper hazel
#

no not work

tender shard
#

?paste your pom

undone axleBOT
upper hazel
tender shard
#

how do you compile?

upper hazel
#

build-> artifact

tender shard
#

wrong

upper hazel
#

eh?

tender shard
#

maven tab -> package

upper hazel
#

why so???

tender shard
#

because you're using maven. that's what the pom.xml file is for

#

pom.xml = maven file

#

so you have to use maven

#

otherwise your pom.xml is useless

upper hazel
#

i know but build -> build artifact not use maven lol?

tender shard
#

i dont know what build artifact does, but it definitely doesn't do the correct thing

tender shard
#

just do what I said. Maven tab -> double click on package

upper hazel
#

why in name exists "original" original-FudziEconmy-bukkit-1.0.0-beta

tender shard
#

because you're using the maven-shade-plugin

upper hazel
#

i can clear this in build?

tender shard
#

yes. but why are you using the maven-shade-plugin in the first place?

#

you don't have anything that needs to be shaded

upper hazel
#

I don’t know maven well, I can only create dependencies, but I build through the display for the first time

tender shard
#

you can remove the whole <plugin> part for maven-shade-plugin

upper hazel
#

i was use only "build option" in top left

tender shard
#

you can remove all of this

#

then you won't have an "original-....jar" anymore

upper hazel
#

oh thenks

carmine mica
#

oh you probably wanted to hijack one of my messages. but I think you got one from Conclube?

echo basalt
#

Nah

#

I need you to delete those 3 messages after my reserved one

#

so I can edit the one after

carmine mica
#

ok, deleted

#

you have 5 messages above that one too, you can use those by shifting stuff up

echo basalt
#

oh bummer

#

I can't edit these because they're too old

late sonnet
carmine mica
#

wait what? I can edit messages that old, for example my messages just after that

echo basalt
#

@ivory sleet Is it fine if I delete the good habits message and repaste the "new" one that includes an explanation on all SOLID topics?

#

it doesn't let me paste it

upper hazel
#

what is the difference between build in the upper left corner and build through the maven plugin display

tender shard
#

maven = uses your pom.xml
the other one = doesnt

upper hazel
#

but this worked like standard maven

echo basalt
#

Seems like smaller messages did the trick

#

discord does not like anything over ~3.5k characters

tender shard
upper hazel
#

oh

echo basalt
#

There we go

upper hazel
#

what use for maven ripository public

#

i mean what the site

remote swallow
#

wat