#help-development

1 messages Β· Page 873 of 1

winter galleon
#

like how ?

young knoll
#

new Whatever(getConfig())

#

Basically

tulip phoenix
#

Is there a way to hide or disable the Wither health bar in version 1.8.8?

lilac dagger
#

i think so but i haven't looked into it

winter galleon
young knoll
#

Whatever is the class you want to pass your config to

winter galleon
#

public class TaserCommand implements CommandExecutor {

new TaserCommand(getConfig())

young knoll
#

You need to call the constructor from your main class

winter galleon
#

sorry im new to java so im trying to learn

young knoll
#

?learnjava

undone axleBOT
astral scroll
#

how can i do my javadocs?

#

like the web page

remote swallow
#

host them

#

serve the index.html that you get or use something like reposilite to extract the jar and host it inside it

young knoll
#

You could host them with GitHub pages too

#

I think

warm mica
astral scroll
#

but yeah

#

thanks

young knoll
#

Idk what that is

#

Remind me to have a looksy

astral scroll
#

but its cool

#

literally just

#

upload files

#

(you need to have a domain)

#

and yeah

#

only that

river oracle
#

@young knoll pineapplechat-legacy coming soon???

quaint mantle
#

Why you making spigot api again?

river oracle
tender shard
#

y tho

quaint mantle
#

Hey guys,

I'm creating shop plugin
I want to build bungeecord system so to share data with each serer, I saved my data on mysql not via caching, just retrieve data directly with using query
But I think this way have many problems (like security & stability)

so I've been searching many documents I found redis caching tool

Are you guys recommended Redis? If you recommend Redis I want to know the reason
Also I'm considering Mongodb

Please Recommend which is better

I'm sorry that I didn't know the Redis

vocal cloud
#

Could be really fancy and use websockets to stream it πŸ‘€

#

For a shop though you'll want to make sure that only one item is bought at a time. To do that you'll likely want to use redis to prevent duplication bugs. Many servers suffer from shop and auction dupes because they don't validate purchases properly

smoky wraith
#

Beaming | Help | Maven Dependency Issue

quaint mantle
wide coyote
vocal cloud
#

No, so in this case a duplication bug would occur if you did the following:
(assuming the shop is for players and not a server shop)

  1. User lists item
  2. Item is either broadcasted or updated in db
  3. 2 users on 2 other servers see item and click at almost the same time
  4. Send request to delete to DB
  5. Give item to player and subtract cost

(note that canceling and buying at the same time would duplicate the item as well. Allowing a user to list and delist spam on multiple servers to potentially game the system and dupe expensive items)

To solve this, step 4 and 5 need to be modified. It can create delay but delay is unavoidable in creating a system that doesn't have duplication exploits across servers/realms.

  1. send request to delete from DB await success response (1 row modified/whatever redis says) then you can continue with the transaction.
  2. ~
wide coyote
#

I am not quite sure if this will answer your all questions but should answer some

quaint mantle
vocal cloud
#

To prevent multi-tick delays yes. You'll likely end up having to create a system where you asynchronously update your DB, parse the response, then spawn a task on the main thread to run on the server to complete the transaction. It will have delay but at best it'll be 50ms (1 tick) and at worse you'll be looking at 150ms give or take. It'll be a bit of a delay but the tradeoff is total security and the prevention of any possible database-related dupe bugs.

minor junco
vocal cloud
#

Yeah, it's not difficult. Just takes a bit of tuning to make it feel as nice as possible and to ensure total security.

quaint mantle
vocal cloud
#

When I say multi-tick delays what I mean is that the write/read operation could take longer than 1 tick (50ms) to complete. Redis will help with this by providing the fastest possible method of writing/reading changes.

sullen marlin
#

confused what the issue with mysql is

vocal cloud
#

Probably nothing? I mean most peoples servers won't see a delay that insane unless the server is hosted in Antarctica

sullen marlin
#

you just need to make sure to lock appropriately

#

I think thats what they were concerned about

quaint mantle
#

mongodb

vocal cloud
#

I find mongodb to be quite bloated for a db. Personally I agree with md_5 I think you'd be okay just using sql.

quaint mantle
#

Yeah sql goat

vocal cloud
#

Postgres 🀀

quaint mantle
#

Why are you guys not hate SQL query?

I like NoSQL 'cause If I code with SQL it look just below

         String actionSQL = "INSERT INTO `" + shopItemTable + "` (`itemstack`, `slot`, `sell_price`, `buy_price`, `max_stock`, `remain_stock`, `popularity`, `commands`) " +
                                "VALUES ('" + encoded + "', '" + slot + "', '" + sellPrice + "', '" + buyPrice + "', '" + maxStock + "', '" + remainStock + "', '" + -1 + "', '" + commands + "') " +
                                "ON DUPLICATE KEY UPDATE itemstack = VALUES(itemstack), slot = VALUES(slot), sell_price = VALUES(sell_price), buy_price = VALUES(buy_price), " +
                                "max_stock = VALUES(max_stock), remain_stock = VALUES(remain_stock), popularity = VALUES(popularity), commands = VALUES(commands)";

It's too dirty isn't it?

vocal cloud
#

I mean ORMs exist for this exact reason lol.

quaint mantle
vocal cloud
#

object relational mapping. It allows you to map an object to a DB table so that you can easily perform CRUD operations without needing to write any SQL

quaint mantle
#

Just use jooq

vocal cloud
#

Also, you should never be doing a "on duplicate key". If you've pulled an object you should know if it's new or not. You never really want to make it so that you're guessing and writing queries that are longer than they need to be

#

If you want to learn a library that business overuse you can always go with hibernate KEKW. Really bloat things up

quaint mantle
#

Plus
I asked this question 'cause I want to upload my plugin on SPIGOT premium So I think I have to use Scalable SQL Guys What do you think is most scalable SQL?

vocal cloud
#

Technically if you use an ORM (hibernate, JOOQ) or any driver that supports multi-db that would be for the client to decide.

quaint mantle
vocal cloud
#

Yes. Redis is only if you get to the point where you're seeing considerable delays in your queries.

quaint mantle
#

Which is rare

#

You prob gonna have 30-100 concurrent players

#

Thank you guys for answers ! ❀️

vocal cloud
sullen marlin
quaint mantle
sullen marlin
#

yes sql is fine

#

in fact your example is so simple it doesnt even need a lock

#

just check the item was deleted before giving the money

quaint mantle
sullen marlin
#

If (rowDeleted) giveMoney(); else // item was already purchased

quaint mantle
quaint mantle
sullen marlin
#

Yes, SQL is the right tool for the job here. You just need to be defensive how you code and use locks if necessary

quaint mantle
sullen marlin
#

No worries

echo basalt
#

Anyone got a list of all the events I need to handle for region protection?

brisk estuary
spare hazel
#

how can i change an inventory's title

echo basalt
#

For old versions you need to send a window open packet

spare hazel
#

will this work: create the inventory again but with a new title, initialize the items and display the inventiry to the player?

echo basalt
#

That'll reset the cursor's position

chrome beacon
#

I believe you can open a new one

#

Just don't close the old inventory

spare hazel
#

okay

brisk estuary
echo basalt
#

And are you building with shadowJar?

brisk estuary
#

also it works perfectly when I start a server with the runServer task

echo basalt
#

Decompile your jar and see if it's actually there

brisk estuary
spare hazel
#
playerAccount.setMithrilPower(playerAccount.getMithrilPower() - cost);
                this.inv = Bukkit.createInventory(null, 9 * 6, "Mithril Management | " + ChatColor.DARK_GREEN + playerAccount.getMithrilPower());
                initializeItems();
                openInventory(e.getWhoClicked());```
will it work like this?

```java
public void openInventory(final HumanEntity ent) {
        ent.openInventory(inv);
    }```
echo basalt
#

hey look another hypixel clone

spare hazel
#

oh cmonnnnn you can litteraly see how shitty of a clone this is

brisk estuary
#

idk why though, my gradle.build looks right

#

nevermind

#

there are two final jars, one of them ends with "all"

#

everything is relocated inside this jar, but I was picking the other one

tender shard
#

"all" is the default classifier for shadow's shadowJar task's output

#

you can set the classifier to an empty string instead to make gradle bahave like maven and replace the existing .jar

tasks.getByName("shadowJar", ShadowJar::class).apply {
    archiveClassifier.set("")
}
sullen marlin
#

that is an insane configuration syntax

tender shard
#

how do you like ths

tasks.shadowJar {
    archiveClassifier = ""
}
eternal night
#

Yea was about to say xD

#

that first example was fucking butchered

tender shard
#

well not always possible otherwise

eternal night
#

Yea, I mean functional for 90% of plugin developer usecases kekwhyper

tender shard
#

only because none of them properly use buildSrc

eternal night
#

thank god they merged the assign shit for kotlin dsl in 8.5

tender shard
#

what actually is a pain is seeing all those build files generated by mv "dev" plugin

#
plugins {
    id 'java'
}

group = '${GROUP_ID}'
version = '${PLUGIN_VERSION}'

def targetJavaVersion = ${JAVA_VERSION}
java {
    def javaVersion = JavaVersion.toVersion(targetJavaVersion)
    sourceCompatibility = javaVersion
    targetCompatibility = javaVersion
    if (JavaVersion.current() < javaVersion) {
        toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
    }
}

tasks.withType(JavaCompile).configureEach {
    options.encoding = 'UTF-8'

    if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
        options.release.set(targetJavaVersion)
    }
}

processResources {
    def props = [version: version]
    inputs.properties props
    filteringCharset 'UTF-8'
    filesMatching('${MANIFEST_NAME}') {
        expand props
    }
}

like wtf is this ^ Why not just this:

plugins {
    id 'java'
}

group = '${GROUP_ID}'
version = '${PLUGIN_VERSION}'

java {
    toolchain.languageVersion = JavaLanguageVersion.of(8)
}

tasks.compileJava {
    options.encoding = 'UTF-8'
}

processResources {
    filteringCharset 'UTF-8'
    filesMatching('${MANIFEST_NAME}') {
        expand "version" to version
    }
}
#

but I'm already happy there's no // Build file start logic and // Build file end logic comment in their build.gradle

dry hazel
#

tasks.compileJava {} configures only that one task by the way, whereas the other thing configures all compilation tasks

tender shard
#

there is only one task

#

if there would be more, it should be split up into a buildSrc part anyway. and even if not, then one would just use tasks.withType(JavaCompile).configureEach too, it's still unneccessary to spend 14 lines to define the java version

#

I mean, under what circumstances would you even have different compileJava tasks in one project for a plugin? that sounds like a scenario that's only gonna happen if one strictly refuses to split up logic into proper subprojects

dry hazel
#

tests

echo basalt
#

@tender shard Is there a way to relocate a transitive dep on maven?

#

Basically my library depends on lib2

#

and I depend on my library and would like to relocate lib2

tender shard
#

then you'd either publish a shaded version of myLibrary that already got lib2 relocated, or the user of myLibrary would have to declare the relocation for classes from lib2

#

I don't think the shade plugin can differentiate between classes that came from "current project" or another dependency while relocating

echo basalt
#

That's fine

#

Trying the second approach

#

It relocates the library but breaks import statements

tender shard
#

huh? are you excluding things from relocations or sth?

echo basalt
#

Doubt

tender shard
# dry hazel tests

if you unit test a spigot plugin then I assume that the logic is already split up into a plugin and a "core" part or similar, and hence you'd include the whole stuff as java-conventions from buildSrc anyway?

echo basalt
#

My library has 2-3 modules

#

only shading for one of them is broken

tender shard
#

fancy, that's only 33-50%

echo basalt
#

screw it here

#

This is the project that's using the conversations module

#

(this specific branch)

#

And the lib we depend on is Adventure

tender shard
#

you're not using paper api, do you?

echo basalt
#

Uh no

tender shard
#

ok because if you relocate adventure, you won't be able to throw those objects at any paper methods anymore

echo basalt
#

It's fine

#

Understandable

#

Actually think3d

#

Yeah it's fine we use legacy serializers n stuff

#

I just call the Audience.sendMessage method

#

and create the audience with BukkitAudiences

tender shard
#

but from your included adventure

#

that's fine

#

what you can not do is e.g. PlayerJoinEvent#joinMessage(aComponentFromMyShadedAdventure)

dry hazel
echo basalt
#

Yeah that's expected

#

We don't use paper api on the Quests project

#

Now I'm thinking like

#

the pom structure is slightly fucked

#

at least for conversation-api

#

I wonder where tf he got the kyori import from

dry hazel
echo basalt
#

think3d why didn't this specific class relocate

tender shard
sullen marlin
#

This is what happens when you have a programmatic build system

tender shard
sullen marlin
#

You can do a million things a million ways

tender shard
#

@echo basalt show the output of mvn dependency:tree

dry hazel
#

having a java convention is nice, but what are we discussing here exactly

tender shard
#

Nothing really. I'm just complaining about people who scram their whole logic into the parent build file instead of separating it properly kek

dry hazel
#

I was talking about tasks.compileJava {} vs. tasks.withType<JavaCompile> {}

echo basalt
#

Not home anymore

ashen quest
obsidian drift
#

Is there a way to make a parrot go really quick? I tried changing movement and flying speed attributes and the speed is still capped at quite low. I also tried changing the speed in the pathfinder goals and it is still capped

lilac dagger
#

sounds like you missed something

#

i remember having a similar problems with minecarts, turned out there was a flag that limited the maximum speed

#

@obsidian drift

obsidian drift
#

I'll try look

#

entities dont have flags though

#

they have attributes

lilac dagger
#

they all have datawatchers and there the flags are stored

#

or entitydata if i remember correctly how mojang calls it

obsidian drift
#

seems like only a minecart thing

#

not for flying entities

elder harness
#

Does Spigot have a built-in method to get an OfflinePlayer by name?

#

I know I can use Mojang's API, but it would save me time and effort if it is already in there

shadow night
#

yeah, Server#getOfflinePlayer(String) or something similar should exist, I'm pretty sure

elder harness
#

Yea, but it's deprecated and not persistent

lilac dagger
#

did you try to modify this?

elder harness
shadow night
elder harness
#

Like I said, requesting directly to Mojang's API, you do get the up-to-date usernames

shadow night
#

No idea about that and no idea why you would want to know their new usernames

elder harness
#

The reason to not use the method is because the server's persistent player cache only gets updated for the player when he joins. When the player changes their username and not join the server, the server is still holding the old username

shadow night
#

Ye, but why would you want their new username

elder harness
#

I'm making a plugin where I can look-up players based on their name

#

UUIDs aren't user-friendly

#

The player has to simply be able to enter a player's name rather than their UUID

lilac dagger
shadow night
#

Spigot/Bukkit was made to interact with the game, not with mojangs api

elder harness
#

I figured that, but I was wondering if Spigot had this built-in so I don't have to set up the request and what not

elder harness
young knoll
#

The new profile stuff might work for this

elder harness
#

Thank you. Any docs on it?

shadow night
lilac dagger
#

@obsidian drift parrot.getNavigation().setSpeedModifier(speed) should do it the easiest way

#

the parrot being nms

obsidian drift
#

ill try but I did change the goal speed so it probably wont work

lilac dagger
#

you can disable your goals and see if this work, might save you time

#

and later on maintenance time

obsidian drift
#

It's still limited

#

im gonna try boost its delta movement on entity move

small current
#

hello
intellij question
how to change this font and size

obsidian drift
#

use google?

small current
#

what is that part called

#

not the editor

#

fixed nvm

clever lantern
#

how to make mobs not attack a certain player?

young knoll
#

cancel the EntityTargetLivingEntityEvent

clever lantern
#

ty

tranquil prairie
#

How do I measure code coverage into a spigot plugin?

short plover
#

how do you get a block in a chunk using ChunkSnapshot?

chrome beacon
eternal oxide
young knoll
#

^ A snapshot does not allow you to get a live block instance

eternal oxide
#

just use the libraries entry in the plugin.yml

#

then load yourself...

tender shard
#

what even is SimpleMirrorSelector.ALT_CENTRAL_URL ?

eternal oxide
#

that code I linked you will do the same job as libraries

#

yes

young knoll
#

Libby when

tender shard
#

i still think it's simply the wrong repo url or sth

#

also

#

?nocode

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

tender shard
#

you still haven't sent the code you're actually using to load gson

#

well your stacktrace claims it cannot find gson and the code you sent is definitely not from a spigot plugin?

#

so obviously i have no clue what you're talking about or trying to do. why does your stacktrace mention gson if you don't use it? why do you say you use an old api version if you got a psvm method, so obviously not a spigot plugin at all, etc

#

and now you say you're not using gson but then you say "i already have gson in my dependencies"

#

and then you say gson isn't the issue but the stacktarce is all about it not being able to find gson

dawn plover
#

I have a really weird bug with my code, and i am trying to find it, but am getting closer and closer to think that it has to do something with this event being depricated.

I am wondering if anyone knows something about some sideeffect that this event has because of it being depricated, and if there is a event that i can check if a player picks something up

tender shard
#

maybe just ?paste your build file and your whole main class

tender shard
young knoll
#

It does tell you the exact replacement event

#

;c

tender shard
#

BaboonPickupFungusEvent when

lilac dagger
#

so it will be removed

tender shard
#

and it will print a nag warning when registering the listener

dawn plover
#

aha okay, then thats probably not the bug but i will still replace it with EntityPickupItemEvent to be future proof

tender shard
#

what's the issue?

young knoll
#

Why are boats fuckin weird

#

This is comparing the players position to the players position when the task started... how does it just magically increase

#

I am not moving the boat

opal carbon
#

@topaz kestrel am i being pranked rn

ashen quest
#

Just make it so u only check if the diff is bigger than 2

ashen quest
opal carbon
#

idk

ashen quest
#

Can u check I really like it

young knoll
#

A diff of 2 is a decent difference

#

Plus it's even worse for horses

ashen quest
opal carbon
#

a site

ashen quest
#

Ohh

#

Can u send it

opal carbon
#

random paste from person who sent it here

#

then deleted it for some reason

topaz kestrel
opal carbon
dawn plover
# tender shard what's the issue?

i am creating bingo, but I am making it in a way so you could theoraticly make any type of task you want (from picking up items, to making amongus figure in a chest when underwater (not a real task, but its possible) )
currently i only made a task which called "ObtainTask" which is basicly the task you would expect when playing bingo, just pick up an item, and then that item will be done in your card

However, this bug is so weird,
60% of the te time, it works fine.
20% of the time it will for some reason send the message that you obtained the item twice, but other than a double message it works fine
20% of the time you pick up an item that is not on the list ,and it will say you obtained a task that did not exist, and sometimes it even replaces a task with this task that did not exists

eternal oxide
#

its not an issue with the event, its your code.

dawn plover
#

yea XD, i am trying to find it a few days in a row

eternal oxide
#

We'd need code to help

dawn plover
#

well, i would love to, but idk how i am going to, its probably really complex because it involves a lot of structure, also probably need to create a class diagram for this lol

I have one question though, these events, when will they activate, and in what order, and can i make it so the Pickup is before Inventory or verse vica for example?

eternal oxide
#

before inventory what?

dawn plover
#

well, for example EntityPickItemEvent, when will a method tagged with this as eventHandler be called
is it whenever an item gets pickedup. or is it every tick for every item picked up in between the last and current tick

#

or maybe something else

eternal oxide
#

it fires once for any item that is picked up

dawn plover
#

yea, but is that imidiatly, or in groups per tick?

eternal oxide
#

depends how many packets come in

#

You can;t pickup two items at the same time

dawn plover
#

i know, but it could be possible that whenever you pick up, a callback to your plugin is done imidiatly
but it could also be possible that whenever you pickup, it will be send to a buffer, and every tick iteration or gametick iteration they will go over this buffer and send it to your plugin

#

it does not matter for my plugin, but i would love to know some background on how its done lol

eternal oxide
#

it doesn;t matter how it does it behind the scenes. Only ONE item will be processed at a time

lilac dagger
#

i guess neither playerchatevent wasn't removed

eternal oxide
#

API almost never gets removed

lilac dagger
#

that's cool to know

young knoll
#

API only gets removed if it has a higher maintenance cost than its value

eternal oxide
#

ha, so small

#

its porn btw

#

@young knoll

young knoll
#

?ban @quaint mantle pron

undone axleBOT
#

Done. That felt good.

young knoll
#

I’ll take your word for it… I’m in public atm lol

slender elbow
#

"that felt good"

river oracle
#

@young knoll PineappleChat legacy adapter coming soon pepeLaugh

kindred valley
#

is onfirst join inheriting join event

young knoll
#

What

river oracle
kindred valley
#

like if its players first join is it going to construct stuff at PlayerJoinEvent

river oracle
#

there is no difference with the PlayerJoinEvent no matter which join number it is

#

it could be join 10,000 or join 1 the event always function the same

river oracle
young knoll
#

Ur a legacy adapter

river oracle
young knoll
#

What does that even mean

echo basalt
#

any maven ppl around? im noob

river oracle
#

I'm not advanced but I know my fair share

echo basalt
#

basically I have like 3 modules and I'm having shading issues

#

because idfk what I'm doing

#

so I need someone to help me setup shading

#

because relocations are fucked

river oracle
#

what type of shading issue? You trying to shade all the modules into some core module or what

#

or is it just not relocating

echo basalt
#

A shades Adventure and relocates adventure
B shades A, Adventure-Bukkit and relocates adventure-bukkit

river oracle
#

πŸ₯²

echo basalt
#

yes im noob

river oracle
#

step 1. Use PineappleChat

eternal night
#

does b shade a's shadow configuration ?

river oracle
eternal night
#

or just a

echo basalt
#

it's maven

eternal night
young knoll
#

Step 1. Library system

eternal night
#

no clue then mb

echo basalt
#

this is fun

river oracle
young knoll
#

Booo 1.8

echo basalt
#

it's a library for a public plugin with like half a million downloads

echo basalt
#

but A's imports weren't relocated and that caused issues

river oracle
#

relocation is a mess sorry I barely ever touch that shit out of fear 😨

river oracle
# echo basalt

@young knoll #1 example of what happens to people who don't use PineappleChat

#

take notes you're next

young knoll
#

I don’t use any versions without the library loader

#

So no I’m not next

river oracle
#

next Y2K_ PR. Remove Library Loader if Detecting Jishuna's System

glad prawn
#
    public void onBreak(BlockBreakEvent e) {
        Block block = e.getBlock();
        
        for (BlockFace face : faces) {
            if (block.getRelative(face).getType() != Material.LAVA ||
            block.getRelative(face.getOppositeFace()).getType() != Material.WATER) 
                continue;
            
            block.setType(type); // set type of the block will drop but i dont want it
        }
    }```
Is there a way for me to set the block type will form as in BlockFormEvent but in BlockBreakEvent?
#

I need it cuz i wanna use Player object.

young knoll
#

what?

eternal oxide
#

use BlockDropItemEvent if you want to alter a BlockBreak drops

young knoll
#

^

glad prawn
#

No, i want to change the type of the block that will be formed from the cobblestone generator, and I need the Player object to get their Generator.

lost matrix
eternal oxide
#

then why are you in the break event at all if you want to control it forming

glad prawn
#

Cuz i want the Player object.

eternal oxide
#

you want to get teh player who broke the block?

lost matrix
#

What determines which block is generated?
The player who placed the water/lava or the location at which the block gets generated (an island for example)

round finch
#

just had to mention it is possible to have more events in a method
but this ain't probably no help

glad prawn
lost matrix
#

What determines which block is generated?
The player who placed the water/lava or the location at which the block gets generated (an island for example)

eternal night
#

have you tried excluding all transitive shit ?

echo basalt
#

im maven noob dont forget

eternal night
#

ah

#

Well like, if you depend on the shaded artefact

#

those classes for module B should already be relocated

#

like B should not see net.kyori but a.kyori

agile hollow
#

why i'm having troubles here

                    ProxyServer.getInstance().broadcast(content);
                }```

'getServerInfo(java.lang.String)' in 'net.md_5.bungee.api.ProxyServer' cannot be applied to '()'
eternal night
#

So I guess try smacking a

<exclusions>
  <exclusion>
    <groupId>*</groupId>
    <artifactId>*</artifactId>
  </exclusion>
</exclusions>

at the dependency declaration in B for A

#

or just don't depend on a relocated artefact

#

that seems counter productive in the first place

#

why does A need to shade when B consumes it

#

Is A used outside of a consuming module like B ?

lost matrix
agile hollow
lost matrix
#

You need to simply not send your message to the server the gui was clicked from.
The code snippet from above doesnt tell us enough. Pls send more code.

agile hollow
# lost matrix You need to simply not send your message to the server the gui was clicked from....

that all the code in the server A plugin

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (label.equalsIgnoreCase("opengui") && sender instanceof Player) {
            Player player = (Player) sender;
            // Apri la tua GUI e interagisci con essa

            // Dopo l'interazione con la GUI, invia un messaggio a tutti i server tramite Redis
            sendMessageToAllServersExcept("sumo", "Evento sumo startato da " + player.getName() + " /join sumo per entrare all'interno dell'evento!");

            return true;
        }
        return false;
    }

    private void sendMessageToAllServersExcept(String excludedServer, String message) {
        try (Jedis jedis = new Jedis("localhost", 6379)) {
            // Pubblica il messaggio su un canale Redis (ad es. "guiInteractions")
            jedis.publish("guiInteractions", excludedServer + ":" + message);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }```
lost matrix
#

Alright, now show your subscribed method on the proxy

agile hollow
# lost matrix Alright, now show your subscribed method on the proxy
    public void onEnable() {

        String redisHost = "localhost";
        int redisPort = 6379;

        // Inizializza il client Jedis
        try (Jedis jedis = new Jedis(redisHost, redisPort)) {

            // Iscriviti a un canale Redis per ricevere le interazioni con la GUI
            new Thread(() -> jedis.subscribe(new GuiInteractionsSubscriber(), "guiInteractions")).start();

        } catch (Exception e) {
            e.printStackTrace();
        }
        // avoid a java.lang.IllegalArgumentException: Channel must contain : separator (attempted to use <...>)
        this.getProxy().registerChannel("custom:mytestchannel");
        // this seems to be like a regular event listener for bungeecord
        this.getProxy().getPluginManager().registerListener(this, new Event(this));
    }

    private class GuiInteractionsSubscriber extends JedisPubSub {
        @Override
        public void onMessage(String channel, String message) {
            // Decode the message to get server information and actual message content
            String[] parts = message.split(":", 2);
            if (parts.length == 2) {
                String excludedServer = parts[0];
                String content = parts[1];

                // Broadcast the message to all BungeeCord servers except the excluded server
                if (!excludedServer.equals(ProxyServer.getInstance().getServerInfo().getName())) {
                    ProxyServer.getInstance().broadcast(content);
                } else {
                    ProxyServer.getInstance().broadcast("Sei in un server escluso dal brodcast!");
                }
            }
        }
    }```
lost matrix
#

You need to iterate through all servers and exclude the one that has your "excludedServer" name.
A simple .equals() wont do.
ProxyServer.getInstance().broadcast(content); will send a message to all servers. No exception.

inner mulch
#

why is there nothing that i can do with unifiedjedis, even tho there are definetely methods?

glad prawn
lost matrix
lost matrix
# glad prawn The player has broken that block

So the player who has broken the last block determines which new block will be generated?
In that case:

  • BlockBreakEvent -> associate Player with Block
  • BlockFormEvent -> Check if Block is associated with Player and act accordingly
inner mulch
river oracle
lost matrix
#

Not event that. It has no access modifier which results in something called package-private access.

river oracle
#

and it is used

inner mulch
#

(im currently using this via my own api for the redisconnection=

river oracle
lost matrix
river oracle
agile hollow
river oracle
lost matrix
#

Never heard a prefix tree being called Trie

river oracle
#

e.g. if I have a Trie with the value "hello" "hell" and "he" won't return true from the contains method. That is pretty much the only difference

lost matrix
agile hollow
inner mulch
river oracle
lost matrix
inner mulch
river oracle
#

if its not transistive java won't know what to do with this random object it doesn't know exists in some other random library

river oracle
#

it should work if you have it added

#

or shaded in your other library

inner mulch
#

yes i shaded it into my other library

#

at least i think so

river oracle
#

then Shrug try clearing caches

glad prawn
# lost matrix So the player who has broken the last block determines which new block will be g...
    public void onBreak(BlockBreakEvent e) {
        Block block = e.getBlock();
        
        for (BlockFace face : faces) {
            if (block.getRelative(face).getType() != Material.LAVA ||
            block.getRelative(face.getOppositeFace()).getType() != Material.WATER) 
                continue;
            
            blocks.put(block, e.getPlayer()); return;
        }
    }
    
    @EventHandler
    public void onForm(BlockFormEvent e) {
        if (e.getNewState().getType() != Material.COBBLESTONE) return;
        
        if (blocks.get(e.getBlock()) != null)
            e.getNewState().setType(Material.DIAMOND_BLOCK);
    }```
damn it actually works
lost matrix
glad prawn
#

yeah thank you anyway

agile hollow
lost matrix
stable sentinel
#

I made a simple custom join message plugin. I added config.yml, now how do I add colors to it? For example:
customJoinMessage: "&5Hey, welcome to the server!"

stable sentinel
#

How do I let user change colors in config.yml?

tender shard
#

by telling them to use &c etc in the string?

river oracle
#

But fr just use the ChatColor#tranalateAlternateColorCodes

upper hazel
stable sentinel
upper hazel
#

oh wait

tender shard
upper hazel
remote swallow
#

that will return true as soon as it finds 1 region

#

you need to set a variable outside the loop

upper hazel
#

so that mean "empty region"

remote swallow
#

okay so

#

lets say you have 5 regions

#

the region that it is, is at position 3

#

you do the first entry, and its not the region so it ends the loop because of the return

#

it doesnt get to position 3

upper hazel
# remote swallow okay so

I just need that either there are no regions in this place or there is ONLY the specified region in this place

remote swallow
#

which requires you to loop all entries

upper hazel
#

????

remote swallow
#

you loop 1

upper hazel
#

Are you implying that there is another way?

remote swallow
#

no

#

you just need to modify your code

upper hazel
#

stream api?

remote swallow
#

instead of returning set a variable outside the loop

upper hazel
#

or wdym

remote swallow
#

you arent understanding

upper hazel
#

oh

shadow night
#

what does that even mean

remote swallow
#

return inside a for loop cancels the loop

#

you loop 1 entry every time

#

you need to loop them all

upper hazel
#

i see now

#

you mean just break

#

loop

remote swallow
#

no

#

well

#

yes

#

return breaks the loop

#

you need to set a variable outside the loop and not break it on the first iteration

upper hazel
#

and in what cases should this not be done?

remote swallow
#

make a variable outside the for loop

#

this is basic java

shadow night
#

if you don't know basic java

#

then you need

#

?learnjava

undone axleBOT
upper hazel
#

not say it

#

bruh

upper hazel
remote swallow
#

go learn java

#

but ur lucky i have no paitence

upper hazel
#

lol

remote swallow
#

  public boolean foreignRegion(Location center, String id){
    if(center == null || center.getWorld() == null || id == null) return false;
    ApplicableRegionSet regionContainer = getRegionContainer(center);
    if(regionContainer == null) return false;
    boolean matches = false;
    for(ProtectedRegion region: regionContainer.getRegions()){
        if(!region.getId().equals(id)){
            System.out.println(77);
            System.out.println(region.getId());
            System.out.println(id);
            continue;
        }
        matches = true;
    }
    return matches;
}
#

super hard

upper hazel
#

now I understand "return true" also creates a variable

#

this is a translator
i mean

remote swallow
#

no

#

im saying it in english which you should be able to understand if your coding

upper hazel
#

no no need

#

too expensive

echo basalt
#

if you ever pick cmarco as a tutor reconsider your life choices

upper hazel
#

lol

upper hazel
#

and that means the variable is created 1 time

#

how then is it different from "continue"

#

because if the condition is false, then the loop just continues to go without creating anything

shadow night
echo basalt
#

Ilmir do you know the difference between a primitive and an object?

smoky anchor
#

Heyo
How do I set per-player thunder ?
I found setPlayerWeather but that one has only CLEAR and DOWNFALL

echo basalt
#

Thunder is odd

#

It's like an entity

smoky anchor
#

No that's.. lightningbolt or whatever
But there has to be a variable for the sky darkening.

echo basalt
#

hm

#

Seems like it's a game event

shadow night
echo basalt
smoky anchor
#

So I'm just gonna assume it's not exposed in the API

upper hazel
smoky anchor
#

ty for the double check tho

timid hedge
#

Hey, if you have time could you please help me fix it?

upper hazel
#

but β€œcontinue” needs to go through the entire cycle (almost) provided that there are a bunch of regions at the point

inner mulch
#

Hello, I'm using Maven, I got a dependency, which has a dependency, when trying to access the dependencies dependencies, i cannot access those classes any ideas?

shadow night
#

you have to add the dependency in your pom.xml and mark them as provided I think

inner mulch
#

so adding the depencies dependeny as provided?

#

thanks, but that sounds kinda inconvenient telling ppl they have to do this to fully access all the classes, but still thanks.

sterile token
hot creek
#

Hi, a friend and I are making a server with items customized by textures and we don't know how to block the renaming of items on the anvil, does anyone know?

tender shard
#

cancel InventoryClickEvent when taking out renamed versions of your items

hot creek
#

How can i cancel This?

quaint mantle
#

Hi , how to get ispname in java ?

quaint mantle
tender shard
upper hazel
#

Is there an event that eavesdrops on the middle of the furnace melting process?

#

not start, not end

#

or how check does the furnace burn after finishing melting 1 unit of item?

#

in end event

quaint mantle
#

even now i working on ipinfo api

#

but i don't like this api

sullen marlin
quaint mantle
tender shard
#

I guess all the proper apis will cost money

#

why do you even need a player's ISP's name?

hushed spindle
#

is World#getNearbyEntities() quick? like do i have to worry if its called potentially a couple times in a tick (not continuous) in a short radius

#

or is there a quicker method to get players in a small radius

#

doesn't have to be circular either

tender shard
#

getNearbyEntities just loops over the list of entities and does some tiny math

#

totally negligligable

#

ngliblae

#

neglblgb

#

fuck that word

hushed spindle
#

agree

tender shard
#

you can use it many times per tick

hushed spindle
#

epic

quaint mantle
echo basalt
#

oh yeah alex im still struggling with maven

#

spent a solid 3 hours

#

still no fix

tender shard
tender shard
#

always useful to look at it

tender shard
#

let me see

sullen marlin
#

You'll need some logic/parsing but not much

tender shard
#

yeah that works - even though the mentioned unitymedia is meanwhile dead

echo basalt
#

Currently looking like this

tender shard
tender shard
sullen marlin
#

No it's like dns

#

Referral based from root

tender shard
#

ah I see, handy

echo basalt
#

uH

#

At the moment

tender shard
#

whois shows ? for special char cities lol

sullen marlin
#

Alex on an encoding crusade today

echo basalt
#

api shades and relocates adventure-api and adventure-platform-api
impl imports api, shades and relocates adventure-text-serializer-legacy
bukkit shades api, impl, shades & relocs adventure-platform-bukkit

tender shard
eternal night
#

why is your API shading things..

echo basalt
#

Β―_(ツ)_/Β―

#

Should I do all relocations on bukkit?

eternal night
#

I mean, in gradle I'd say expose it as transitive to consumers via apiCompileOnly

echo basalt
#

We also have a fabric module somewhere and we'd like to keep the same relocations

#

this is maven

eternal night
#

yea

river oracle
#

supporting legacy chat be like pepeLaugh

echo basalt
#

but yeah with the current setup I can't compile the bukkit module

tender shard
eternal night
#

Yea idk, I think your API might be better off no shade things

#

lets see if there is a fun scope for that

#

in maven

river oracle
young knoll
#

Quite a few chat changes since 1.8

river oracle
#

because it is

young knoll
#

:p

#

When was chat moved to components anyway

tender shard
#

it wasnt

eternal night
#

Yea I mean, you could just have API define them as compile

#

not shade them

tender shard
#

AsyncPlayerChatEvent has a string for format, and a string for message

eternal night
#

your bukkit should then be able to shade those

echo basalt
#

So I import everything as provided and on bukkit I shade and relocate it all

eternal night
#

no you import everything as compile but don't shade

river oracle
eternal night
#

provided isn't passed to deps is it ?

echo basalt
#

not passing a scope rn

young knoll
#

Just because stuff is all strings in Bukkit api doesn’t mean it is internally

eternal night
#

well no scope is just compile

young knoll
#

:p

eternal night
#

Yea, provided scope means it isn't transitive

#

but you want it to be

echo basalt
#

I guess that's it

eternal night
#

so I think you just put it as compile but disable shade

echo basalt
#

seems to work

eternal night
echo basalt
#

just nuked all shading on the other modules

#

compile scope

#

and shade and relocate all on each platform module

#

which is a bit icky but whatev

eternal night
#

Β―_(ツ)_/Β―

echo basalt
#

oo I hit the 6 hours

#

only a solid 2 of those are paid

young knoll
#

F

echo basalt
#

I'm also running on 1 hour of sleep

tender shard
#

do you need a coffee machine? I got 2 leftover

echo basalt
#

we have a coffee machine at home

#

I don't drink coffee

river oracle
#

@young knoll which version was it you could start using hex again

echo basalt
#

had a red bull at ~hour 5

tender shard
#

coffee machine at home:

river oracle
#

was that 1.16.5

young knoll
#

1.16.something

#

I think .2

echo basalt
#

I'll accept dinner money though

tender shard
#

yo and now everyone get back to basics!

#

someone write a tp, tpa module

#

someone write a storage thing

echo basalt
#

wrong channel

tender shard
#

no

echo basalt
#

:(

river oracle
young knoll
#

But I was messing with the spigot api

#

Did you know worldgen is weird

echo basalt
#

I'm not even writing any basics code all my contributions are just pasting utils I wrote like a year ago

tender shard
#

except cmarco

#

contributions from cmarco will not be accepted in any way

young knoll
#

Structure starts are their own phase of chunk generation

#

But the actual structure gets placed during the decoration phase

river oracle
#

I just realized I can't support 1.8.8 anyways since I use java 17

#

guess I'll go up to latest xD

upper hazel
#

I didn’t find a single event indicating the end of the stove’s burning. I found only 3 events not related to the burning animation

#

I'm talking about side animation

echo basalt
#

I'm too busy making pikamug's quest plugin work

#

let's see

#

do I have a test server

tender shard
echo basalt
#

Oh fun seems like transitive dependencies aren't relocated or something

upper hazel
#

lol

echo basalt
#

Alex you might know?

#

The jar I built works fine but when shading it the relocations roll back think3d

#

could be a jitpack thing

river oracle
#

why tf would mojang ever stop using this stuff ThinkO_O

tender shard
echo basalt
#

prob

eternal night
tender shard
#

dont

shadow shore
#

hi

echo basalt
#

seems like I dont touch it

tender shard
#

because the problem you describe sounds exactly like my example from my "dont disable this setting" blog post

echo basalt
#

only place where I might have that is the uh

#

module that's using my api

#

like the quests plugin itself

#

Could that cause the problem?

tender shard
#

ugh well which .jar exactly is the one that is "wrong"?

echo basalt
#

Quests-jar

tender shard
#

and that depends on which lib exactly? conversations-api?

echo basalt
#

uH yeah

#

lemme try the bukkit one instead

tender shard
#

and the .jar in your local maven repo for conversation-api looks correct, including the shaded and relocated things?

echo basalt
#

conversation-bukkit depends on api and impl

tender shard
#

if yes, the issue is that the shaded stuff are still mentioned as dependency in your dependency-reduced pom for whatever reason

echo basalt
#

and shades and relocates both

tender shard
#

and if you mvn install it, then does the result in your local maven repo look good for that?

echo basalt
#

The maven repo looks good

#

but I'm only checking the bukkit jar

tender shard
#

ok then show the mvn depencency:tree of that quest plugin

echo basalt
#

think this is trying to import the entire uber jar

#

which idfk how to import bukkit only

tender shard
echo basalt
#

think I got it

#

jitpack weird

tender shard
#

what is that lol

echo basalt
#

it's an empty module for some version conflict lmao

#

yeah I got it

#

testing now

#

no errors

#

which is gucci

tender shard
echo basalt
#

yeah this is just me messing up proxy config

lean pumice
#

?paste

undone axleBOT
ivory breach
tender shard
#

the bungee api is meant for plugins running on the bungee itself

#

you cannot just access bungeecord api in a spigot plugin

#

you'll have to use plugin messages

ivory breach
tender shard
#

Take a look at Connect and ConnectOther to send players from one server to another

ivory breach
#

Thanks

tender shard
#

(and dont forget to remove the bungee api from your pom completely)

tender shard
fervent robin
#

Hey I am using MockBukkit to run unit tests and when I try to run a unit test on DB I get

java.lang.RuntimeException: Failed to load driver class com.mysql.cj.jdbc.Driver in either of HikariConfig class loader or Thread context classloader

#

I have shaded hikari in my maven and it runs fine on a spigot server

#

just not during unit test

sullen marlin
#

Mysql driver is scope runtime so not sure it will appear in tests

river oracle
#

It won't you need to add it yourself

#

Just set scope to test

fervent robin
paper viper
#

[22:54:32 INFO]: [Plugin] Enabling Plugin v${project.version}
why isnt it saying the correct version?

sullen marlin
#

You need to enable resource filtering

paper viper
#

<resources>
<!-- Resource configuration for messages.properties with filtering -->
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>messages.properties</include>
</includes>
</resource>

        <!-- Resource configuration for all other resources without filtering -->
        <resource>
            <directory>src/main/resources</directory>
            <filtering>false</filtering>
            <excludes>
                <exclude>messages.properties</exclude>
            </excludes>
        </resource>
    </resources>
sullen marlin
#

Yes you have it false

#

You need it true for plugin.yml

paper viper
#
<resources>
            <!-- Resource configuration for messages.properties with filtering -->
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>messages.properties</include>
                    <include>plugin.yml</include>
                </includes>
            </resource>

            <!-- Resource configuration for all other resources without filtering -->
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <excludes>
                    <exclude>messages.properties</exclude>
                    <exclude>plugin.yml</exclude>
                </excludes>
            </resource>
        </resources>
``` like this?
sullen marlin
#

Yep

paper viper
#

woked thatnks

eternal night
#

I think the rest we can probably just have you implement with some more feedback on the PR

#

especially naming obvs remains to be discussed

young knoll
#

Pogress

eternal night
#

Also unsure if I want Registry.ITEM_TYPE to yield ItemType.Typed or ItemType

#

Also needs some more helpers around the .typed functions on ItemType and BlockType respectively

young knoll
#

Would the registry returning the typed one have any use

eternal night
#

Well rn it does

#

because it makes the assignment easier

#

but we could just have the method in Item/BlockType call .typed() on the thing prior

#

and then do the unchecked cast there

#

because yea like, that is the reason we move generics to typed, for the places wheree you have 0 actual compiler level knowledge of the type

#

which is the case here

young knoll
#

Ah right because the constants come from the registry

eternal night
#

Yee

river oracle
#

legacy magic

eternal night
#

.components to our rescue

young knoll
#

Yeah if we ever get the asm done

#

Kek

eternal night
young knoll
#

I think Lynx is volunteering!

eternal night
river oracle
#

the ultimate MiniMessage competator for those of us who enjoy Pineapples

eternal night
river oracle
#

sept I can't figure out how the fuck to post these modules to my repo

#

for god sakes

#

How would you go about posting each module in a project separetly to a maven repository with gradle?

#

right now I have publish in my subprojects block, but that doesn't work well :O

#

cuz of this error

Execution failed for task ':publishShadowPublicationToMaven2Repository'.
> Failed to publish publication 'shadow' to repository 'maven2'
   > Invalid publication 'shadow': multiple artifacts with the identical extension and classifier ('jar', 'null').

eternal night
#

I mean, change the classifier ?

#

or change the artefactId

#

I presume you'd want to change the artifactId

river oracle
#

yeah idk how to do that with shadow lol

eternal night
#

huh ?

#

is this shit on github kekwhyper

river oracle
#

I don't know very much about gradle I kinda copied this from the other library Ebic made where it all compiles into one jar, but I want multiple jar outputs. Not really sure how to achieve this yeah one sec I'll push again

#

I still suck at gradle :(

eternal night
#

Yea so lol

#

just define artefactId in your subprojects build.gradle ?

river oracle
#

you can do that?

eternal night
#

Yea lmao

river oracle
#

I've never seen that before

#

huh

eternal night
#

actually

#

like

#

not top level

#

but in the publishing block

river oracle
#

says there is no property

#

> Could not set unknown property 'artifactId' for extension 'publishing' of type org.gradle.api.publish.internal.DefaultPublishingExtension.

eternal night
#

no like, in the created publishing config

#

where you do publications.create

#

inside that block

#

next to your normal from(components["java"])

#

or whatever you source from

#

not that I want to know why the fuck you'd be publishing something that went through shadow

#

sounds pretty cursed

river oracle
#

isn't maven shade == gradle shadow

eternal night
#

Yea but why would your published artefact need that shaded

river oracle
#

well I did hear gradle had some built in shading tool, but I've heard it's a pain

eternal night
#

like, that is what transitive dependencies are for

river oracle
eternal night
#

yea

#

transitive dependencies

river oracle
#

so I don't need shadow CH_PepeThinking

eternal night
#

spigot-api does not shade google commons

#

yet you don't have to declare it to use it

river oracle
eternal night
#

a ✨ transitive dependency ✨

#

yea but your build tool doesn't know that

#

you can re-expose your dependencies to the consumer of your artefact via the api and apiCompileOnly configurations

river oracle
#

it's kinda just trusting somewhere down the line it is shaded

eternal night
#

you need the java-library

#

You are trusting yourself to shade it

#

or, if someone wants to shade your library they automatically shade the transitive deps too

#

and if they don't, they trust something else supplies your library

#

which, that something then would shade it

ivory sleet
#

apiCompileOnly is a bit scary ye

eternal night
young knoll
#

So that’s what api is for

eternal night
#

Yea, just api is fine xd

young knoll
#

I understand now

river oracle
#

so I can just get rid of shadow

#

and leave everything else how it is

eternal night
#

in your API yes

#

or whatever the fuck your stuff is xD

#

only the thing that wants to actually be a jar wants to shade in its needed deps

river oracle
#

do I need to switch my core from implementation to api then?

eternal night
#

is your core supposed to be depended on by plugins

#

or is it just a common baseline for other impls

river oracle
eternal night
#

Well yea, you'd still put it as API to propegate it to the local transitive things

#

but you obviously don#t publish it to a maven repo

river oracle
# eternal night but you obviously don#t publish it to a maven repo

so a module would kinda look like

plugins {
    id 'java-library'
    id 'me.champeau.jmh' version '0.7.2'
}

dependencies {
    api project(':pineapplechat-core')

    jmh 'org.openjdk.jmh:jmh-core:0.9'
    jmh 'org.openjdk.jmh:jmh-generator-annprocess:0.9'
}

configurations {
    testImplementation.extendsFrom(compileOnly)
    jmhImplementation.extendsFrom(compileOnly)
}
#

then how could I disable publishing for just one module?

#

should I just wrap an if statement and check for the module name or what

young knoll
#

Da heck is jmh

river oracle
#

java micro benchmarking

river oracle
#

oh I left the shadowJar dependncy

#

one second

eternal night
#

would people depend on that module ?

#

I thought you have a proper API or whatever

river oracle
#

and then users depend on the actual platform implementations not the core

eternal night
#

okay

#

then yea, you'd api that

#

and well, how do you define the publishing

#

by default, modules aren't published lol. You have to create the publishing block somewhere OMEGALUL

river oracle
#

right now its in the subprojects block

eternal night
#

Yea so

#

Either you move that into just each impl build.gradle

#

or you outside this into like buildSrc

#

as an extension

#

and then your build.gradles in the impl only call something like configurePublishing("bukkit")

river oracle
#

okay this may be a big ask but explain buildSrc with groovy xD

eternal night
#

I cannot xD

#

groovy is scary

river oracle
#

fuck

eternal night
#

idk who uses it

#

they ought to be crazy

river oracle
#

well I know the groovy, but do you know the buildSrc

#

how about that?

eternal night
#

I mean, its just a place to define extra shit that is shared between the modules kekwhyper

river oracle
#

😨

#

copy paste it is

#

i'll switch to kotlin later

young knoll
#

As if Kotlin isn’t also scary

woven fog
#

Has anyone here taken theory of computation / automata?

river oracle
young knoll
#

Lies

quaint mantle
#

'switch' expressions are not supported at language level '8'
bruh

river oracle
#

L java 8 moment

vocal cloud
#

Certified 1.8 developer moment

tender shard
#

looks like issues happened

young knoll
#

Well you did call it

tender shard
#

when I did call it, there were NoClassDefs all the place lol

inner mulch
#

im getting a nosuchmethoderror, even tho there is the plugin on the server and im sure that there is such method, any reasons why? or do i need to provide more information?

tender shard
#

show stacktrace

inner mulch
#

its one of my own methods

tender shard
#

have you changed the return type of that method?

inner mulch
#

no

tender shard
#

well then show the stacktrace, your code calling it, and the definition of the method

inner mulch
#

?paste

undone axleBOT
tender shard
#

are you relocating any classes?

inner mulch
#

the RedisConnection class is defined from a "data-api" that i made for myself, i made sure im using the latest version of that data api on the server as well as having it installed on the server

inner mulch
#

im shading jedis to the "data-api"

tender shard
#

your getJedis() method returns a mars.sql.internal.jedis.UnifiedJedis and not a redis.clients.jedis.UnifiedJedis

#

it looks like you're depending on the unshaded / unrelocated artifact

inner mulch
#

oh

tender shard
#

that won't work for above mentioned reason

inner mulch
tender shard
#

normally, the maven-shade-plugin replaces the original artifact with the shaded one. Is it possible that you're depending on "data-api", but the plugin that shades your data-api is relocating them, and now you're having a second plugin that wants to access the data-api from the first plugin? or sth like that?

inner mulch
#

im not sure what exactly happens, but im sure that im not depending on the shaded version, earlier i was wondering why i couldnt interact with the jedis api in the main plugin even tho it depended on one that should've jedis shaded into it

tender shard
#

show the pom files of all your related projects

inner mulch
#

?paste

undone axleBOT
inner mulch
tender shard
#

ah yeah I think I already found your issue

#

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...

inner mulch
#

OH

#

oh

tender shard
#

since you declared the output directory i nthe shade plugin, you get your shaded .jar on your server, but the unshaded .jar in your maven repo

inner mulch
#

but the weird part is that the .jar is 5mb

#

and im sure that my data api isnt 5mb

tender shard
#

which .jar is 5mb?

inner mulch
#

it has to have those methods

#

the data api

#

in the folder

tender shard
#

your data api .jar is 5mb because it shades hikari, mysql-connector, jedis, and commons-pool2

#

the data-api in your local maven repo most probably is not 5mb

inner mulch
#

oh

tender shard
#

check out $HOME/.m2/repository/mars/MarsSQLAPI

#

there you got the unshaded version, and that one declares your method to have the original return type of unshaded jedis

#

and that's what your other plugin is trying to access

inner mulch
#

oh yeah its the unshaded one

#

19kb

tender shard
#

TL;DR just declare the output directory properly as explained in the blog post

#

(for both projects)

inner mulch
tender shard
#

is the shaded one in your maven repo?

inner mulch
#

yes

tender shard
#

how is it called?

inner mulch
#

both are

tender shard
#

is it called blabla-shaded.jar?

inner mulch
#

-shaded at the end

tender shard
#

in that case you could use <classifier>shaded</classifier> i nthe dependency

inner mulch
#

okay

tender shard
#

but check the timestamps in your maven repo

#

are they both from the exact same time?

#

or is the shaded one a bit older?

inner mulch
#

yes they are both from the same time

tender shard
#

well ok then it should work... still, you should always set the output directory in the maven-jar-plugin to avoid such issues in the first place

#

then you also don't have to declare that you're depending on the shaded artifact

inner mulch
#

yes i will defo do that

#

you are german so you probably know derbanko right?

tender shard
#

derbawhat?

inner mulch
#

bastighgs dev

#

from his mc challenges

tender shard
#

i dont know any of those lol

inner mulch
#

are you watching mc on yt ? or are still playing mc?

tender shard
#

πŸ₯² neither

inner mulch
#

he is well known, but in this case, if you dont know them it will probably dont make sense what i was about to say, so i will just say nothing

#

thanks tho, it works now :)

tender shard
#

np!

quaint mantle
#

is github down

#

for anyone

tender shard
#

For you, apparently

young knoll
#

Mom said it’s my turn on the GitHub

tender shard
#

My mom doesnt know the GitHub

#

But she makes the best pesto

remote swallow
young knoll
#

Oops my finger slipped on the kick… command

remote swallow
#

You havent played in 7 months just give

topaz cape
#

the names are crazy like mc players

young knoll
#

?

#

Is that a list of real player names or what

river oracle
#

ig

#

could also be a rainbow table of random nicknames that aren't computer generated

young knoll
#

How did I manage to randomly scroll to an offensive name

topaz cape
#

actually they are all actual players

#

πŸ‘€

young knoll
#

Mojang get yo filter fixed

#

Anyway they probably just queried Mojangs api for a bunch of names

river oracle
#

tf 😭

topaz cape
#

i dont think you can do that

river oracle
#

bro stash and jira are down

#

sad day

topaz cape
#

hey mojang api give me 5k names of players ordered alphabetically

young knoll
#

MD just did stuff like 10 minutes ago

#

Blame him!

river oracle
#

oh how do you know

#

are you in the super secret discord

#

or did he say sum here

young knoll
#

I plead the fifth

river oracle
#

sounds of super secret discord

young knoll
#

Set up a server and just pull the name of everyone that joins kek

sullen marlin
#

ye sorry its restarting now

#

it ate all the ram

topaz cape
young knoll
#

Tasty ram

river oracle
sullen marlin
#

20gb not enough for that mf apparently 😦

young knoll
#

I mean I know you can query a name by uuid

#

But idk how you’d get valid UUIDs