#help-development

1 messages · Page 515 of 1

undone axleBOT
spare prism
agile anvil
scenic onyx
#

how do I make it so that when a player places a block with the "[ProtocolLib/NMS]" api, he digs it with the animation: "BLOCK BREAK ANIMATION"?

spare prism
#

I need the value to be taken from the config

#

to replace every \\n to \n?

spare prism
agile anvil
scenic onyx
eternal oxide
#

When a fake block is placed it's client side so you will probably not get any interact even on it

scenic onyx
#

I can't do it

chrome beacon
#

and when animation is done remove the block

scenic onyx
scenic onyx
#

"void sendBlockDamage(@NotNull
Location loc,
float progress)" what do they mean by float progress?

full rock
#

hey can anyone help me in dm fix my reload command?

tender shard
#

oh boy, aggregateJavadocJar is really severely broken

scenic onyx
charred blaze
full rock
#

Hard to explain here sicne more ppl are gonna type

scenic onyx
full rock
#

May I dm you @scenic onyx

scenic onyx
#

it is a plugin

#

minecraft?

full rock
#

Yes

scenic onyx
eternal oxide
#

?ask

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!

scenic onyx
#

or someone else

chrome beacon
#

I mean that doc says exactly what you need

#

?

#

What part are you having problems with

scenic onyx
full rock
#

Can anyone help me fix my reload command please? 🙂

rough drift
#

how did you even mess up a reload command

full rock
#

I m boutta break something

rough drift
#

just reloadConfig()

full rock
#

I m legit using that

rough drift
#

show some code

full rock
#

Do i need to nake all the getStrings into a instance?

rough drift
#

?

full rock
#
    private final JavaPlugin plugin;
    private FileConfiguration config;

    public DataHandler(JavaPlugin plugin) {
        this.plugin = plugin;
        loadConfig();


    }


    public void loadConfig() {
        File configFile = new File(plugin.getDataFolder(), "config.yml");
        if (!configFile.exists()) {
            plugin.saveDefaultConfig();
        }
        config = YamlConfiguration.loadConfiguration(configFile);
    }
    public void updateConfig() {
        config = plugin.getConfig();
    }

    public void reloadConfig() {
        plugin.reloadConfig();
        loadConfig();
    }

    public String getString(String path) {
        return config.getString(path);
    }

    public List<String> getStringList(String path) {
        return config.getStringList(path);
    }

    public boolean getBoolean(String path) {
        return config.getBoolean(path);
    }
}```
rough drift
#

inside your on enable just saveDefaultConfig

#

it doesn't replace it if it exists

full rock
#

you mean i don t need the datahandler class?

rough drift
#

also using plugin.getConfig() just returns the most up to date version after reloading

rough drift
full rock
#

yeah but i modified all my getstrings already to use the datahandler

rough drift
#

JavaPlugin#reloadConfig()
JavaPlugin#getConfig()

rough drift
full rock
#

like 12 classes

#

with 4 5 strings each

rough drift
#

you using intellij?

full rock
#

yeah i am

rough drift
#

just right click on getString -> find usages

#

and one by one edit them

full rock
#

Isn t it more organised tho?

#

By having a class handling all the data

rough drift
#

You're just delegating the config methods

#

It's a pointless class actually

#

myPluginInstance.getConfig().getString()

full rock
#

oh bruh

rough drift
#

Actually just replace all usages of your data handler with pluginInstance.getConfig()

rough drift
full rock
#

isn t it any way i can just modify the datahandler dude

#

i just gotta redo whole classes

#

and it s alot harder bruh

rough drift
#

Just replace it with plugin.getConfig().getString()

#

ofc you can edit the datahandler

#

pointless, but you can

full rock
#

Could you help me modify the datahandler please

rough drift
#

And do that for the other methods

full rock
#

Like dis?

earnest wasp
#

Hello , How make link Button in java without send URL (1.19)!

I use old Verssion me!

if (cmd.getName().equalsIgnoreCase("site")) {
    TextComponent message = new TextComponent("§7[§9Site§7] §8: §fSoon");
    message.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "Test"));
    player.spigot().sendMessage(message);
}
full rock
#

right?

tender shard
remote swallow
#

i couldnt get past aggregateJavadocJar

#

that was earlier so i doubt i can now

tender shard
#

yeah that's because the 1.19.4 module uses java 17

#

if you comment out that module, it'd work, but I don#t get it, because it's excluded from the javadocs

#

guess I have to exclude the whole javadoc plugin from the module, not just the classes

#

but idk how

remote swallow
#

im guessing just check if the project.name doesnt start with nsm

#

nms

green prism
#

Do you guys ever used SmartInvs by MinusKube?

scenic onyx
#

@chrome beacon mi da errore: "
private void sendBlockDamage(Location loc, float progress, int sourceId) {
// Utilizza NMS API per inviare il danno al blocco
// La seguente implementazione è specifica per la versione 1.17.1 di Minecraft, potrebbe non funzionare su altre versioni.

    // Ottieni il mondo tramite NMS API
    net.minecraft.world.level.World nmsWorld = ((org.bukkit.craftbukkit.v1_17_R1.CraftWorld) loc.getWorld()).getHandle();

    // Ottieni il blocco tramite NMS API
    net.minecraft.world.level.block.state.IBlockData nmsBlockData = nmsWorld.getType(new net.minecraft.core.BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));

    // Invia il pacchetto di danno al blocco tramite NMS API
    nmsWorld.playBlockBreakParticles(new net.minecraft.core.BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()), nmsBlockData, sourceId);
    // Invia il pacchetto di danno al giocatore (vedi nota sotto) tramite NMS API
    // Nota: Nella versione 1.17.1 di Minecraft, non è disponibile un metodo per inviare direttamente il pacchetto di danno al giocatore.
    // Pertanto, dovrai trovare un modo alternativo per notificare il giocatore del danno al blocco.

    // Puoi utilizzare PlaceholderAPI per ottenere il nome del giocatore da mostrare nel messaggio
    String playerName = PlaceholderAPI.setPlaceholders(player, "%player_name%");

    // Notifica il giocatore del danno al blocco
    player.sendMessage("Il blocco è stato danneggiato da " + playerName + "!");

    // Puoi eseguire altre azioni personalizzate qui, come premiare il giocatore per aver distrutto il blocco, aggiornare statistiche, ecc.

    // ...
}

"

#

mi da errore: "PlaceholderAPI", "player", "playBlockBreakParticles"

tardy delta
#

?codeblocks

chrome beacon
tardy delta
#

smh

chrome beacon
undone axleBOT
scenic onyx
subtle folio
scenic onyx
#

in what way?

subtle folio
#

Look at the javadoc.

scenic onyx
subtle folio
#

you rope it?

scenic onyx
subtle folio
scenic onyx
#

I do not understand what you mean

eternal oxide
#

particles are just packets, there is zero reason to use NMS/protocol to spawn particles when the API already wraps it

#

They never exist on the server

eternal oxide
#

?english

scenic onyx
#

one moments

eternal oxide
#

sendBlockDamage is still API.

#

its also fake

eternal oxide
#

the change never happens on the server

scenic onyx
#

do you know coralmc?

eternal oxide
#

no

#

if you are sending fake block damage you need to do it in a scheduler as the client actually hitting the block will reset any damage it sees

scenic onyx
#

it is a minecrat server where in the lobby if you place a block it will break it with the animation of the block breaking. if you want to check it out: "play.coralmc.it"

eternal oxide
#

very simple to do

scenic onyx
eternal oxide
#

player places block, play increasing damage to the block. When finished break block

scenic onyx
#

I was trying to do it but I don't know how.

eternal oxide
#

does this happen for every block placed?

scenic onyx
eternal oxide
#

and all players can see the blocks breaking?

scenic onyx
#

yes

eternal oxide
#

ok simple...

patent dagger
#

Hello everyone, can I ask here if I have a problem with my Spigot server? I'm sorry I'm totally new here

eternal oxide
#

you want a Map<Block, double> blocks placedBlocks = new HashMap<>();

patent dagger
eternal oxide
#

start a repeating task which iterates over the map sending fake block damage to any players, then increased the damage value in the map

scenic onyx
#

can you give me a little code that does that? at least to understand the reasoning

#

?

eternal oxide
#
Map<Block, double> placedBlocks = new HashMap<>();

onEnable() {

scheduler.runTaskTimer(this, () -> {
    placedBlocks.EntrySet.foreach... Loop and sendBlockDamage to each player...
    increase the double in the map.
    if new double > max break block and remove from map.} , 0, 1);

onPlace(event) {
  placedBlocks.put(event.getBlock(), 0);
}```
#

pseudo, fill in the blanks

scenic onyx
#

in "player..." "what shall I wear?"

opal juniper
#

basically kotlin

eternal oxide
#

This is pseudo code. it simply shows what you have to do it. The logic of how to do it, You need to write the code based on that example

scenic onyx
#

i put it in "public class BlockDamageSender implements Listener {
private Plugin plugin = CoralLobby.getPlugin(CoralLobby.class);
@EventHandler
public void onBlockPlace(BlockPlaceEvent event) {

}

}"

#

i can't

#

because is in on enable it

eternal oxide
#

you can start the task from wherever you want

#

move it to your listener class constructor

scenic onyx
#

can you put that code in that one?

#

I just don't know how to do it

eternal oxide
#

Sorry I'm not writing it for you

scenic onyx
#

ok

torn shuttle
sonic sky
#

Is this known?

river oracle
#

Microsoft prob changed jar location

#

You'll have to find it yourself

#

Have fun :P

sonic sky
#

That's helpful hahaha

#

Wish me luck

#

I think I have it archived on an old device fortunately

river oracle
#

Eh I wouldn't rely on that

#

Log4j might still impact that Kar

#

Jat

#

Jar

#

Try paperclip

sonic sky
#

Forgot about that

#

I'll take a look at Paper Clip

eternal oxide
#

it read fine from s3 here

river oracle
#

You don't get this?

quiet ice
#

Yeah I also get that

opal juniper
#

i get that

#

its been moved for months

scenic onyx
#

@eternal oxide this?: "
`public class BlockDamageSender implements Listener {
private Plugin plugin = CoralLobby.getPlugin(CoralLobby.class);
private Map<Block, Double> placedBlocks = new HashMap<>();
private double max = 10.0; // Valore massimo di danno consentito per un blocco

public BlockDamageSender() {
    plugin.getServer().getScheduler().runTaskTimer(plugin, () -> {
        placedBlocks.entrySet().forEach(entry -> {
            Block block = entry.getKey();
            double damage = entry.getValue();
            // Invia il danno del blocco a ciascun giocatore...

            damage++; // Aumenta il danno del blocco di 1

            if (damage > max) {
                // Rompi il blocco e rimuovilo dalla mappa
                block.breakNaturally();
                placedBlocks.remove(block);
            } else {
                placedBlocks.put(block, damage);
            }
        });
    }, 0, 1);
}

@EventHandler
public void onBlockPlace(BlockPlaceEvent event) {
    placedBlocks.put(event.getBlock(), 0.0);
}

}`
"

eternal oxide
scenic onyx
#

didn't fuinction: 'The blockade splits it but you can't see it'.

eternal oxide
#

yes you never sent the damage block in the task

scenic onyx
eternal oxide
#

something like world.getPlayers().forEach(p -> {p.sendBlockDamage(...

scenic onyx
#

ah ok

#

i try

eternal oxide
#

you can get world from the Block

scenic onyx
#

ok

#

Bukkit.getOnlinePlayers().forEach(player -> { player.sendBlockDamage(block.getLocation(), (float) damage); }); error: "sendBlockDamage"

#

how i resolve this @eternal oxide

eternal oxide
#

pretty sure world has getPlayers

#

you only want the players in the relevant world

scenic onyx
#

get error: "
private void sendBlockDamage(Player player, Block block, double damage) { player.sendBlockDamage(block.getLocation(), (float) damage); }"

#

@eternal oxide

eternal oxide
#

takes a float not double

#

change the map to use a float not a double

scenic onyx
#

still gives error

eternal oxide
#

what error?

scenic onyx
#

sendBlockDamage

eternal oxide
#

need an actual error

scenic onyx
#

error: "Cannot resolve method 'sendBlockDamage' in 'Player'"

#

I don't know how to solve

#

@eternal oxide

eternal oxide
#

will need to see code

vocal cloud
#

What version of spigot is this

scenic onyx
dim oxide
#

Which api to create custom yml files do you recommend me?

eternal oxide
#

not possible in 1.12

scenic onyx
#

verison?

round finch
#

i recommand java file

scenic onyx
scenic onyx
round finch
vocal cloud
scenic onyx
#

1.19.4?

#

or 1.16.5

#

or 1.17

#

@vocal cloud ?

vocal cloud
#

No clue what version it's in. I usually ask because it helps to figure out if this is a version issue which it seems to be

eternal oxide
#

it was probably added around 1.16.5

scenic onyx
#

ok but give error: "Bukkit.getOnlinePlayers().forEach(player -> {
sendBlockDamage(player, block, damage);
});
" damage

tardy delta
#

whats with people using a forEach for no reason

#

its only fancy if you can pass in a method ref

chrome beacon
scenic onyx
eternal oxide
#

?paste the whole class

undone axleBOT
scenic onyx
agile anvil
#

click the link

#

copy

#

paste

#

copy link

#

send link here

scenic onyx
eternal oxide
#

no need to cast here player.sendBlockDamage(block.getLocation(), (float) damage);

#

but nothing wrong with that code

#

you are using the wrong spigot version

scenic onyx
#

not sendBlockDamage

eternal oxide
#

also this line damage++; // Aumenta il danno del blocco di 1 should be damage+=0.1; // Aumenta il danno del blocco di

eternal oxide
#

are you still getting the method error?

scenic onyx
#

at damage get error Variable used in lambda expression should be final or effectively final

eternal oxide
#

if you are try Spigot 1.18.2

scenic onyx
eternal oxide
#

ah ok

scenic onyx
eternal oxide
#

just make line 50 and 51 final

scenic onyx
#

ther is new cose

#

code

eternal oxide
#

make line 23 and 24 final

scenic onyx
#

i try 1.18.2?

scenic onyx
#

error block: "Cannot resolve symbol 'block'"

#

I cannot because it gives all error then

#

is there another way to make this queue?

eternal oxide
#

you don't need line 43 to 45

#

change line 28 to player.sendBlockDamage(block.getLocation(), damage);

scenic onyx
#

damage get error

eternal oxide
#

You seriously need to give more information than "error"

scenic onyx
#

Variable used in lambda expression should be final or effectively final

eternal oxide
#

you did not set lines 23 and 24 final

scenic onyx
#

Block block = entry.getKey();
float damage = entry.getValue();

eternal oxide
#

I see no final key word in either line

scenic onyx
#

were already non-final

eternal oxide
#

make them final

scenic onyx
#

float damage = entry.getValue();

#

I do not risk too many mistakes

eternal oxide
#

still not final

eternal oxide
#

damage is still not final

scenic onyx
#

if I put it 'final' then it gives an error in all

#

If we do it another way?

eternal oxide
#

can't work with "error"

scenic onyx
#

Cannot resolve symbol 'damage'

eternal oxide
#

where?

scenic onyx
#

if finaò

#

final

tranquil prairie
#

Hey, I have code so what if a player tries moves out of a WorldGuard region it sets there velocity to send them backwards. Though the code to send them backwards runs multiple times because while the velocity is moving them they are still outside the region so its sets there velocity 3 times. How do I make it only run 1 time?

tranquil prairie
chrome beacon
tranquil prairie
chrome beacon
#

You could teleport them outside of the trigger area

#

and then push them

tranquil prairie
scenic onyx
#

@eternal oxide lo sto rifacendo con protol lib

chrome beacon
#

Don't make this harder for yourself you can barely use the spigot API

scenic onyx
#

second you want it to work

#

?

chrome beacon
#

Why are you using Protocollib

scenic onyx
#

NMS gives problems with damage

#

at the block

chrome beacon
#

You shouldn't be using NMS either

scenic onyx
chrome beacon
#

Use the Spigot API like I told you to a few hours ago

#

and like you were working on 10 minutes ago

#

btw are you using ChatGPT or smth for code

scenic onyx
scenic onyx
chrome beacon
#

I doubt that

agile anvil
#

totally gpt according to openai text classifier x)

scenic onyx
#

I don't think so

agile anvil
#

this is the problem of this tool. people use it to skip the learning part

chrome beacon
#

you seem to be struggling with basic Java so how did you end up with obfuscated nms names and ProtocolLib code in less than 10 minutes

scenic onyx
chrome beacon
#

And run 1.19.4 and you'll be fine

scenic onyx
#

I don't think it's as easy as you think

chrome beacon
#

It really is

#

It's one method call in a scheduled runnable

eternal oxide
#

It is, I gave you all the code. You are stuck on basic java

weak meteor
#

should i care about the error in gradle?

chrome beacon
#

All I see is a warning

#

which happens all the time with gradle

weak meteor
chrome beacon
#

if it runs that's good enough

weak meteor
#

okay

#

i cant access any of the methods.

#

Also tried if they're static

scenic onyx
weak meteor
#

No suggestions

#

gradle is faster

#

and easier

#

for me

rotund ravine
scenic onyx
weak meteor
#
repositories {
    mavenCentral()
    maven {
        name = "spigotmc-repo"
        url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
        url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/'
    }
    maven {
        name = "sonatype"
        url = "https://oss.sonatype.org/content/groups/public/"
    }
    flatDir {
        dirs 'libs'
    }
}

dependencies {
    compileOnly "org.spigotmc:spigot-api:1.8.8-R0.1-SNAPSHOT"
    compileOnly 'me.clip:placeholderapi:2.11.3'
    implementation ":AquaCoreAPI"
    implementation ":BountifulAPI"

}```
#

i have AquaCoreAPI and it works :I

rotund ravine
undone axleBOT
weak meteor
#

there

rotund ravine
#

No

#

The code where you are trying to use it.

weak meteor
#

Oh

#

Theres no code

#

i was just trying it

#

and therefore, implement it after

rotund ravine
#

Show me how you were trying

#

Like properly not just a small screenshot

torn shuttle
#

not surprised

weak meteor
#

Okay

#

BountifulAPI.sendActionBar(player,"Action Bar Message", duration);

#

It is static

#

but if i try in IntelliJ

#

nvm

#

worked

#

now

#

idk why+

torn shuttle
#

very cool very useful tool

vocal cloud
#

Ask Bard if it can give you a recipe for brownies

torn shuttle
#

I heard Bard gets a conniption if you mention the word death

vocal cloud
#

No clue but it's unable to give me a brownie recipe because it's a text model

weak meteor
#

whats a conniption

torn shuttle
#

I started running uncensored models locally when I asked gpt4 to give me a list of 100 names associated with death and it says that's just over the line

vocal cloud
torn shuttle
#

can't even generate names for my dnd campaign because the ai doesn't want me to know about Hades

#

it's not even consistent, if you hit regenerate a bunch of times it sometimes still gives you a list

agile anvil
#

That's hard to achieve a nice and smooth filter

tranquil prairie
#

I make a method that returns if a location is within an area. How do I make sure if a player shoots an arrow that arrow doesnt leave the area?

agile anvil
#

Well depends

#

What do you want to do if it leaves the area ? Remove it or redirect it?

tranquil prairie
#

remove it

#

But Im worried if I just check every time it moves it will lag server

agile anvil
#

When the player shoots the arrow, it has a velocity

#

You'll just have to compute the time it will take to distance your radius

#

Launch a scheduler to remove the arrow after the corresponding time

quiet ice
#

Yeah as long as "in an area" is just a cuboid there is no problem to be had

#

But once you have like a composed shape it can be taxing on performance

next stratus
#

Likely gonna sound stupid, but is there a way to spawn a block but using sand physics? Like if I wanna spawn cobble blocks but make them fall like sand

agile anvil
#

Search for FallingBlocks

next stratus
#

That's what I've been trying to use 😅

#

Well I did but it lagged heavily

wise mesa
#

are there any apis for creating custom mobs without nms

agile anvil
next stratus
#

When I tried to spawn a bunch of falling blocks my server lagged out because it tries to update each block location each tick

agile anvil
#

What

#

How do you spawn them?

hard socket
#

how do I make these particles travel inside the chest

#

I tried this but its not working

agile anvil
#

You'll have to change the offsetX,y,z to point the chest location

#

Your offsetX y z are in reality a relative spawn location

#

Not their speed

hard socket
#

like this @agile anvil ?

native nexus
#

Has anyone ever cached their messages in memory so they don't have to plugin.getConfig().getString() everytime or is this just bad practise?

hard socket
#

you can create a variable that you will use

agile anvil
#

Spawn you particle a little around the chest

#

Then substract the chest location with your spawn location

#

This will give the offset of the spawnParticle

young knoll
#

And easier to read

native nexus
young knoll
#

I mean thats already what it is internally

#

Iirc

#

But it does do some transformations to the key first so I guess it will still be slightly faster

#

Even better though is to save it to single variables

wary topaz
hard socket
#

Like this @agile anvil

agile anvil
#

Tell me the result

hard socket
#

kk

#

nope

#

its going out not in

#

@agile anvil

young knoll
#

The offset values are the maximum random offset on that axis

agile anvil
#

Oh

young knoll
#

The offset will be between 0 and that value

agile anvil
#

Oops

tender shard
#

is there any way to set a custom source/target version while using gradle's toolchains? e.g. using "java 17" toolchain but still setting source/target to 8?

wet breach
#

if your intention is to use a negative

agile anvil
hard socket
#

I want the particle to go in

agile anvil
#

Mb

wet breach
agile anvil
#

.1

wet breach
#

oh you are not the one

#

anyways, its not being multiplied by a negative

#

0.1 is not negative

agile anvil
#

Yeah

#

I know

young knoll
#

I assume they want it to be positive or negative

agile anvil
#

But

#

It could be negative

young knoll
#

The current code gives a value between -0.1 and 0.1

hard socket
#

so like this?

agile anvil
#

That's the same

#

It will give a location in a .1 radius around the chest

hard socket
#

what should I do then

agile anvil
#

Well you should find how to apply velocity to a particle, never played with that sorry

wet breach
young knoll
#

random.nextDouble is a value between 0 and 1

agile anvil
#

nextDouble in [0, 1]

wet breach
# hard socket

at least now its negative, however even this isn't necessary btw

young knoll
#

Multiplying it by 0.2 will make it value between 0 and 0.2

agile anvil
#

*0.2 becomes [0, .2]

#

Gosh you're so fast

wet breach
#

you can just provide a range

young knoll
#

And then subtracting 0.1 makes it between -0.1 and 0.1

#

Does nextDouble in the standard random class take a range?

hard socket
#

what should I do now?

wet breach
#

anyways this is how you could get a negative range

#

the above would be -10 to 30 exclusive

young knoll
#

Well yeah that’s one way to do it

agile anvil
#

I personally don't know

hard socket
young knoll
#

You could technically also do it with the new stream methods

young knoll
wet breach
#

yes you could but my intention was just pointing out the math was flawed

#

so how they do it doesn't matter as long as its correct 🙂

young knoll
#

Particles either spawn with a random velocity or no velocity afaik

pliant wind
#

I'm trying to store a player object in a PDC so that I can access info like exp and inventory later, but I can't figure out how to get a deep copy of the player object to give to the PDC. Is this even possible or am I misunderstanding how the player object works?

young knoll
#

Uhh

agile anvil
#

Just why

#

You need to access the player to get the pdc

young knoll
#

And if you have the player you can already get their level and whatnot

pliant wind
#

I'm trying to save the state of the player at some time in the past

young knoll
#

Well what part of it

#

Because a player is made up of a lot of data

agile anvil
#

You'll have to write your own object storing infos you want (like level)

pliant wind
#

like all. xp, health, food, inventory mainly. I know I can save them individually but I want to avoid doing that

young knoll
#

Make a data class that holds it all

#

You can’t instantiate a player anyway

#

Not with the api at least

pliant wind
#

yea a data class would probably be the best way actually

wet breach
tender shard
#

is there any spigot alternative to paper userdev? like, just a maven specialsource plugin for gradle?

#

or do I really have to manually run the specialsource .jar through ProcessBuilder to get it working? D:

#

this can't be

young knoll
#

I mean I’ve seen some GitHub projects for it

#

Nothing really fleshed out though

tender shard
young knoll
#

Pretty much

tender shard
#

at least I didnt understand it, so I didnt bother to even try

young knoll
#

I just use userdev, I have no issues with it

#

Well, no issues now that it has shared caches

tender shard
#

yeah but my issue is, I need to create a jar working on java 8

#

and userdev uses toolchains

#

and toolchains prevent to use -source and -target compiler args because it itself uses -release

young knoll
#

Ah

#

Idk I don’t deal with java 8 compat anymore

tender shard
#

I kinda got around with that by only specifying the toolchain for my nms modules but then, the aggregateJavadocJar plugin freaks out

tender shard
#

idk why 1.16 is still so popular

#

probably they use one of those hybrid forks

young knoll
#

1.16 is still a fairly big modding version so that’s probably it

#

/shrug Granted there are plenty of good graves mods so…

vocal cloud
#

Can't something like TeamCity do these things?

tender shard
#

looks like I don't have the "gradle toolchain" issue anymore

young knoll
#

Sometimes you just have to tell ‘em to get fucked

tender shard
#

yeah but first of all, I ask people if it's okay that I fuck them

#

and right now, nobody complained yet

young knoll
#

Meh, they can still use it they just won’t get updates

#

And if they are already using it that means it has the features they need anyway

tender shard
#

57 to 1 now. I love this, I should have asked this earlier

young knoll
tender shard
#

that means I can use records

#

and ignore the weirdness of having different toolchains per NMS module

#

I love this

flat lark
#

Is LootGenerateEvent to add loot to loot tables?

young knoll
#

Well

#

To the chests using them yes

flat lark
young knoll
#

What does the event give you

flat lark
young knoll
#

It provides a mutable list with getLoot

#

Just add your item to that

flat lark
young knoll
#

Well you need to provide an ItemStack to the add method

flat lark
young knoll
#

Create a set of the loot tables you want to add to

#

And check if the table from the event is in that set

weak meteor
#

hey @young knoll

#

do u mind helping me with smth?

young knoll
#

?ask

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!

weak meteor
# young knoll ?ask

K so, the stuff here is a wanna make a claiming system this works like this:
There are Teams that can have only 1 claim in overworld, no nether neither end.
This claims should be at least 5x5 and maximum 60x60.
This claims are made with a wand (Like worldedit) pos1 and pos2.
When selected, claims from 1 team and another need to be atleast 2 blocks away like Claim <- 2 blocks -> other claim.
Also, when entering and leaving should inform the player

#

The stuff is

#

i dont know how to make it

#

Spigot 1.8.8 vanilla being used

young knoll
#

What part of it

weak meteor
#

wdym

young knoll
#

What part do you not know how to make

weak meteor
#

Everything

#

Like

#

the stuff is

#

idk how to make claims only private for the team members

#

(obv other people can enter)

#

lemme make a video

#

so u can see

young knoll
#

If you don’t know how to do any of it you may want to spend more time learning

tender shard
#

lol 98.85% voted for yes, I didnt expect that

#

I expected like 70/30

young knoll
#

Who’s the no vote

#

Kek

tender shard
#

lets see

weak meteor
#

So theres a message when i leave and enter

#

Also i cant modify anything in their claim

#

I can make it very easily with .yml files and checking the location

#

but the stuff is

#

i dont want to check all world to check where the player is

#

and idk how to like, check only 10 blocks from the player lets say

young knoll
#

You only need to check the block they are in?

weak meteor
#

but without checking all teams claims

#

u know

#

i thought 2 solutions

young knoll
#

Partition claims by chunk

weak meteor
#

1st: Divide all map in a list of hashmaps that will be like 200 - 300 301 - 400

#

and like that

young knoll
#

Well yeah that works too

weak meteor
#

also cuadrants

#

++, +-, -- and -+

#

but thats also a big area

young knoll
#

But chunks is basically spatial partitioning done for you

weak meteor
#

yah

#

the problem

#

is that in HCF normally theyre custom

#

and well

#

i like it custom

#

gives freedom

#

So

#

maybe ill try the hashmaps

delicate lynx
#

I have a GUI that I create, I can cancel clicks just fine in the top inventory (the custom one), but how can I cancel clicks in the bottom one (player inventory)?

young knoll
#

I still don’t see why you are making your own spatial partition with hash maps

young knoll
flat lark
weak meteor
#

:(

flat lark
#

My Code.

public class LootGenListener implements Listener
{
    @EventHandler
    public void onLootGen(LootGenerateEvent event) {
        Random random = new Random();
        int max = 5;
        int pointval = random.nextInt(max);

        ItemStack item = new ItemStack(Material.PAPER);
        ItemMeta meta = item.getItemMeta();
        ArrayList<String> lore = new ArrayList<String>();
        lore.add("");

        if (pointval == 1) {
            meta.setDisplayName(ChatColor.GREEN + String.valueOf(pointval) + " Point");
        } else {
            meta.setDisplayName(ChatColor.GREEN + String.valueOf(pointval) + " Points" );
        }

        meta.setLore(lore);
        item.setItemMeta(meta);
    }
}
native nexus
#

meta.setDisplayName(ChatColor.GREEN + String.valueOf(pointval) + " Point" + ((pointval == 1) ? "" : "s"));

young knoll
#

You still need to add the item to the list of item stacks

weak meteor
#

w

flat lark
young knoll
#

It’s literally a list of itemstacks

#

You add your item to the list

#

And that’s it

flat lark
flat lark
#

List<ItemStack> items = new ArrayList<ItemStack>(); basiclly this.

young knoll
#

No you add it to the list you get from the event

#

Not a new list

flat lark
young knoll
#

It’s a list

#

A fairly basic java concept

quaint mantle
#

it's a mutable list, you remove and add items from it

young knoll
#

But yes that code is correct

#

Now just add the item

flat lark
#

That's why its hard for people to understand cause it gives no examples for it. Except docs that methods.

young knoll
#

Spigot has full javadocs

flat lark
#

Yeah I don't like javadocs.

#

I like an actual code example of things. Its easier to understand vs looking at docs because you have no idea what the hell mean.

fossil lily
#

Press . and scroll

#

Usually the methods are fairly comprehensive

#

You probably don’t need examples for getting a list from something

fallow latch
#

I am learning vector stuff but got a bit of a problem understanding it, i am trying to move the armorstand 0.5 block to the right and 0.5 down relative to its direction with this code:

Location loc = this.armorStand.getLocation();
Location newLocation = loc.add(loc.getDirection().multiply(new Vector(0.5, -0.5, 0)));
this.armorStand.teleport(newLocation);

but its not moving correctly so i must be doing somethign wrong here, can anyone give me some pointers?

fossil lily
#

What are we multiplying here

frail gazelle
#

how would i go about making an event not trigger?

essentially i have a listener detecting when a player closes a minigame inventory then sends them a message saying that they failed the challenge.
though I also have it so if a player takes too long in the minigame it will automatically close the minigame inventory and say they failed.
as expected the failed message prints twice and i don't want it to do that.

before you say to not put the failed challenge message, on the last stage i also have it close out of the inventory and prints to the player that they won, but the failed message also triggers because of the inventory close event

fallow latch
# fossil lily What are we multiplying here

i really dont understand vectors but, i thought if direction.multiply(5) is five blocks forward, then direction.multiply(Vector(...)) is moving it relative to its direction

frail gazelle
#

thats just not what i asked

#

i don't want the inventorycloseevent to trigger in certain scenarios

#

i'm asking how i go about doing that

young knoll
#

Vectors are based on the 3 axis

#

So y is always up and down but x and z aren’t always forwards backwards left and right

fossil lily
fallow latch
#

then how should i move it left/right relative to its direction?

young knoll
#

You can rotate the vectors

fossil lily
young knoll
#

They have various rotateAround methods

frail gazelle
fossil lily
fallow latch
#

vectors are just so confusing

young knoll
#

If you rotate it 90° around the y axis you should have a vector pointing to the left of your original one

#

And then 270/-90 for the right

#

Although the methods use radians so you’ll need to remember that

fallow latch
#

ah alright thank you very

tall saffron
#

does someone know a placeholder where the prefix of the group doesnt have a space?

#

as %vault_groupprefix% has a space included idk why

tender shard
#

do you mean the underscore?

#

or do you mean the VALUE of the prefix including a space?

#

if so, that's because that's how you added it into the luckperms/whatever config

#

you can however use other placeholders to manipulate strings to remove that space

tender shard
#

oh so you fixed it now?

tall saffron
#

yea i though it was the placeholder, i created my group with a space, my bad thanks!

tender shard
#

no problem!

flat lark
#
    ArrayList<String> structures = new ArrayList<String>();
    
    public void addStructures() {
        structures.add("LootTables.DESERT_PYRAMID");
    }

    @EventHandler
    public void onLootGen(LootGenerateEvent event) {
        addStructures();
        List<ItemStack> items = event.getLoot();
        Random random = new Random();
        int roll = random.nextInt(100) + 1; // Generate a random number from 1 to 100

        int pointVal;
        if (roll <= 50) {
            pointVal = 1;
        } else if (roll <= 70) {
            pointVal = 2;
        } else if (roll <= 85) {
            pointVal = 3;
        } else if (roll <= 95) {
            pointVal = 4;
        } else {
            pointVal = 5;
        }

        ItemStack item = new ItemStack(Material.PAPER);
        ItemMeta meta = item.getItemMeta();
        ArrayList<String> lore = new ArrayList<>();
        lore.add(ChatColor.GREEN + "Right Click to Redeem!");

        meta.setDisplayName(ChatColor.GOLD + String.valueOf(pointVal) + " Point" + (pointVal == 1 ? "" : "s"));
        meta.setLore(lore);

        PersistentDataContainer data = meta.getPersistentDataContainer();
        data.set(key, PersistentDataType.INTEGER, pointVal);
        item.setItemMeta(meta);

        if (structures.contains(event.getLootTable().getKey().toString())) {
            items.add(item);
        }
    }

I'm trying to spawn my custom item in the desert temple as a test. I'm most likely putting the wrong structure id.

mystic monolith
#

how could i send a title to the player (and put it on the actionbar) in api version 1.14? I'm new to plugin development i was using command blocks before lol

mystic monolith
#

it would be each time they break a certain block type (logs in this case)

public void onLogBreak(BlockBreakEvent e){
if(e.getBlock().getType().toString().endsWith("_LOG")){
  //whatever code to send a title to the actionbar when the block is broken
}

young knoll
#

Does 1.14 have player.spigot().sendMessage

mystic monolith
#

yes

young knoll
#

Use that

#

ChatMessageType.ACTION_BAR

mystic monolith
#

thanks

#

ive never used that before

chrome beacon
#

?services

undone axleBOT
icy beacon
#

the magic word

obsidian plinth
#

$paste

#

?pastge

#

?paste

undone axleBOT
obsidian plinth
chrome beacon
#

It's up to the plugin using it to refresh the placeholder every second

obsidian plinth
#

Nm im just slow a=ig bc when its on a holo it updates slow af

hearty zenith
#

Any way to enable cross play on a server with version 1.8?

smoky anchor
# flat lark ```java ArrayList<String> structures = new ArrayList<String>(); pub...

Not sure what you're doing with the structures array, but this way - whenever somebody opens a chest and generates its loot for the first time, it will always add "LootTables.DESERT_PYRAMID" into the list thus increasing the memory usage for no apparent reason.
The if check you have at the bottom should be on top so you don't waste resources creating itemstack and stuff and not using it.
(I would also recommend inverting it and exitting the function)
Lastly: you can just print the current loot table in console or logs.
And yes, the loot table id is wrong, from the code it should be minecraft:something I think

smoky anchor
flat lark
smoky anchor
#

I do believe so
wait a sec

hearty zenith
#

My main server version is 1.8 which geyser doesn't support

smoky anchor
smoky anchor
flat lark
smoky anchor
#

ok I can't find a full list rn but if you got into a world and start typing out the /loot command it will give you all possible loot tables as a suggestion
Not really sure if what the command gives you is actually the internal key tho

smoky anchor
smoky anchor
# hearty zenith Np

I mean you could have the server on latest, use viabackwards to enable compatibility with 1.8 and use Geyser
If you're looking for 1.8 pvp there should be a plugin for that as well.. probably
Also I believe your question is more of #help-server question

hearty zenith
#

So I'm finding a way to enable cross play on it

smoky anchor
#

Well GL in searching I guess then

agile anvil
hearty zenith
#

Idk he had made it

#

My freind I meant

agile anvil
#

That's strange, you should convince him that the solution is to update the server to the latest version and use eventually viabackwards and 1.8 pvp

hearty zenith
agile anvil
hearty zenith
#

Ya

agile anvil
#

Maybe there are some disliked new features, but you can disable or change them

#

But latest versions are way better in term of performances and security

flat lark
agile anvil
#

Alright, show me something that backs up your point

#

Is it a local LAN server?

#

Then security matters

smoky anchor
agile anvil
#

I don't have time, neither desire to argument with you. But it's not because you gave a permission to a folder or a program that it cannot access your whole computer, or network. That's why cybersecurity exists

smoky anchor
agile anvil
smoky anchor
#

ye make it private static final Set<String> structures = new HashSet<>();
Or public if you need to access it elsewhere

#

The contents of the list can change even if it is final

#

That does not seem to be the case

#

Do you mean to change the type of his structures from Set to List at runtime ?
If he chooses he wants a different type he has to change it in source and the final can stay.
I may be not understanding you correctly here.

#

Oh ye I see
Tho I do not think he could switch from Set<> to ArrayList<>
I was just confused by your example then

smoky anchor
#

Yes, I understand now
I just thought you meant switch between list, set, map from this message.
My bad

#

I mean, I think they all implement Collection so you could technically do it if they were set as Collection
But that would be just stupid

#

lol

ivory sleet
#

static here is just terrible

smoky anchor
#

please do enlighten me with your reasoning

ivory sleet
#

You can’t apply humble object principle, goes against object orientation, couples your code tightly, is not thread safe unless externalization of it, global mutability, you go against SOLID, code is less testable, code is less re-usable.

agile anvil
#

I like the Steve's way since it voluntarily shows that this list is above the object level

smoky anchor
#

Alright, I assume you are indeed more knowledgeable than me
I am just a hobbyist java developer after all
I do what I think looks best and makes the most sense

agile anvil
#

Moreover it avoids multiple instantiations of this list which would be totally useless

ivory sleet
#

If you wanna use a set globally, make it immutable at least

#

I mean you can use ImmutableSet.Builder if you wanna avoid some type of clone

#

^ yeah u have multitons for instance

agile anvil
#

Yeah but can happens who knows. Since you can do it, it is possible

ivory sleet
agile anvil
#

I know, but speaking of this case

ivory sleet
#

In this case it looks like it can be immutable also :> since the population part is happening post class load initialization

agile anvil
#

iirc, you'll need to use static to create singleton or multiton right? That's why I personally find the static use totally appropriate

ivory sleet
#

Yeah

#

Well speaking strictly canonically

agile anvil
#

Wasn't speaking of set

ivory sleet
#

singleton is the design pattern where there is only one instance and it has a global access point

#

Now ofc u can have staticless singletons etc

agile anvil
#

Yeah like a private constructor, static variable and static getInstance

ivory sleet
#

But the definition is the canonical singleton

#

Myeaa

#

Myea classic example of eager singleton

tender shard
#

what should be final? the "instance"? how are you going to achieve that?

#

oh with the static block, sure. but won't work for spigot or sth

#

singletons are weird design anyway

ivory sleet
#

Weird?

#

I mean they have specific use-cases, would not say they’re weird design wise

tender shard
#

they are very weird, because they force you to use the -release flag instead of setting -target and -source manually

#

oh I thought you talked about gradle toolchains lmao

#

mb

tender shard
#

yeah I was confused because I called them weird in #general a few mins ago

icy beacon
tender shard
#

a lasagna is basically a bologna hotdog with shredded sausage

#

and without the soggy bread

quaint mantle
#

how do i make this but chain them like a dialog?

smoky anchor
#

What exactly do you mean ?

quaint mantle
#

you can click each

#

and they can start different chains of dialogs

agile anvil
#

You'll have to be more precise and give examples

quaint mantle
#

its a system hypixel uses

#

you can click each option

tender shard
#

are you talking about the clickable links, or the conversation that's behind it

quaint mantle
#

and they each have a chain of dialog

tender shard
#

you assign a command to each link, e.g. /answer 1, /answer 2, etc

quaint mantle
#

how do i link 2 clickable elements w/the chat components?

tender shard
#

it's just a list of TextComponents

smoky anchor
quaint mantle
#

ight ty

round finch
#

best away to calculate time?

brave sparrow
round finch
#

i wanna make a timer
every time it pass 5 mins

#

it rests

#

java applet

smoky anchor
#

Sir, this is Spigot development help

round finch
#

dude it is java

#

shush

smoky anchor
#

Actually, are applets still a thing ?
I thought they got yeeted at some point.

chrome beacon
#

They probably used the wrong word

#

I hope

round finch
#

whatever you call it

#

just making some java program

fierce whale
#

Is there a way to get plugin message in bungee cord?
I don't know well how to use PluginEventMessage and Listener in BungeeCord

chrome beacon
#

or are you talking about event listeners?

fierce whale
chrome beacon
#

?jd-bc

eternal oxide
blissful wagon
#

When I Spawn A Invisible ArmorStand Using spigot

ArmorStand armorStand = ((ArmorStand) e.getBlock().getWorld().spawnEntity(e.getBlock().getLocation(), EntityType.ARMOR_STAND));
armorStand.setInvisible(true);

A Visible Armor Stand Spawn and After a millisecond it goes in Invisible
But When I Spawn A ArmorStand Using Command

/summon minecraft:armor_stand ~ ~ ~ {Invisible:1b}

Its Much Much Cleaner, It Spawn it Invisible At The First Place,
There Is Anyway To Make Spigot Version Clean Like Command Version ?

young knoll
#

Use the spawn method that takes a consumer

#

It allows you to modify the entity before it’s spawned in the world

fierce whale
#

Is there a way to listen plugin message in BungeeCord?

quaint mantle
fierce whale
agile anvil
fierce whale
eternal oxide
#

I gave you a link for the bungee side

fierce whale
#

thx 🙂

agile anvil
#

Please note that you need a player connected on the backend server to communicate with it

fierce whale
#

Ahha I got it
it works! 🙂

red otter
#

Hay, i need help how can i create an scoreboard with a sidebar and tablist teams with hex?

smoky anchor
#

by "hex" do you mean text with the new hex colors ?

red otter
#

yes

agile anvil
#

How do you manage your teams ?

red otter
#

what do you mean?

agile anvil
#

Well what have you already done ?

red otter
#

now i only have the tablist team via the scoreboard

agile anvil
#

What do you mean by "tablist team" ?

red otter
#

player prefix in the tab

agile anvil
#

Okay, and what do you need now ?

red otter
#

a sidebar

smoky anchor
#

So you need the team prefix to use the fancy colors ?

tall saffron
#

Should I share the github page of my plugin code in my plugins page? Or is going to happen smth

red otter
agile anvil
agile anvil
#

Because Sidebar is basically an Objective of Scoreboard

smoky anchor
red otter
smoky anchor
#

So you can see the prefix color in the tablist but not in sidebar ?

red otter
#

i dont have a sidebar can i create a sidebar with the same scoreboard?

agile anvil
#

Yes

#

Add an objective

#

Well it depends on what you want to display on the sidebar

#

If it's only the team names, just use the same one

red otter
#

Okay i have and it work but how can i add Hex colors to the sidebar?

    private Player player;
    private Objective objective;

    public PlayerScore(Player player, String displayName){
        this.player = player;
        this.scoreboard = player.getScoreboard();

        if(this.scoreboard.getObjective("display") != null){
            this.scoreboard.getObjective("display").unregister();
        }

        this.objective = this.scoreboard.registerNewObjective("display", "dummy", displayName);
        this.objective.setDisplaySlot(DisplaySlot.SIDEBAR);
    }
    public void setDisplayName(String displayName){
        this.objective.setDisplayName(displayName);
    }
    public void setScore(String content, int score){
        this.objective.getScore(content).setScore(score);
    }
 
agile anvil
#

Well I guess it's when you use setScore that you add a line right?

worldly ingot
#

Correct

agile anvil
#

Then just input a hex color and a text in your content variable

worldly ingot
#

BungeeChat's ChatColor class can get you an RGB colour code which can be inserted as legacy text

#

ChatColor.of(0xRRGGBB) + "some string"

#

I have a PR waiting to support components in scoreboards (and everywhere else), but for the time being it has to be legacy chat

scenic onyx
smoky anchor
#

sorry, what is your question ?

scenic onyx
#

tis is the errore: "14:00:42] [Server thread/WARN]: [CoarlLobby-1.16.5] Task #2 for CoarlLobby-1.16.5 v1.0-SNAPSHOT generated an exception
java.lang.NoSuchMethodError: 'void org.bukkit.entity.Player.sendBlockDamage(org.bukkit.Location, float)'
at org.plaxer.it.coarllobby1.Listener.BlockDamageSender.lambda$null$0(BlockDamageSender.java:30) ~[?:?]
at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1092) ~[?:?]
at org.plaxer.it.coarllobby1.Listener.BlockDamageSender.lambda$null$1(BlockDamageSender.java:29) ~[?:?]
at java.util.HashMap$EntrySet.forEach(HashMap.java:1126) ~[?:?]
at org.plaxer.it.coarllobby1.Listener.BlockDamageSender.lambda$new$2(BlockDamageSender.java:22) ~[?:?]
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:59) ~[patched_1.8.8.jar:git-PandaSpigot-103]
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:352) ~[patched_1.8.8.jar:git-PandaSpigot-103]
at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:890) ~[patched_1.8.8.jar:git-PandaSpigot-103]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:412) ~[patched_1.8.8.jar:git-PandaSpigot-103]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:815) ~[patched_1.8.8.jar:git-PandaSpigot-103]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:648) ~[patched_1.8.8.jar:git-PandaSpigot-103]
at net.minecraft.server.v1_8_R3.MinecraftServer.lambda$spin$0(MinecraftServer.java:133) ~[patched_1.8.8.jar:git-PandaSpigot-103]
at java.lang.Thread.run(Thread.java:833) [?:?]"

red otter
scenic onyx
#

intellij

worldly ingot
#

sendBlockDamage() didn't exist in 1.16.5. It was a relatively recent addition. I want to say 1.18

smoky anchor
smoky anchor
undone axleBOT
scenic onyx
smoky anchor
#

Either use newer version or probably packets

red otter
#

it is from bungee

subtle folio
#

Looks like Red

agile anvil
#

And tell us if it's the same color

smoky anchor
scenic onyx
#

ah ok

smoky anchor
#

what ?

red otter
agile anvil
scenic onyx
agile anvil
agile anvil
#

My bad

#

What's your server version?

red otter
#

1.19.2 paperspigot

smoky anchor
#

Are you joining with 1.19.2 as well ?

agile anvil
#

Well I haven't dug deep, but it seems that hex color only works on display objectives, not objectives tables

agile anvil
#

If some are using HEX somewhere else than in the display name of Scoreboard, that means you'd probably have to use NMS

smoky anchor
#

It uses Kotlin but should be still readable

agile anvil
#

Yeah that's the solution Steve

#

Using team prefix and suffix

red otter
#

Ok

red otter
smoky anchor
agile anvil
#

Didn't hex appeared in 1.16 ?

smoky anchor
#

ye 1.16, I missread, the number is line below :D

green gyro
#

How can a view mojang-mapped nms source code? Is it produced by buildtools?

smoky anchor
#

yes
there is an argument for it
wait

green gyro
#

ty

#

does it also make sources I can browse or just jar?

smoky anchor
#

there are --generate-source and --generate-docs
Might be what you want

agile anvil
young knoll
#

There’s api for that

#

💀

river oracle
#

Why 1.16 😭 😭 😭 😭

smoky anchor
#

Ye, he seems to be compiling plugin for 1.16 and trying to use it on 1.8

sick matrix
#

Hi

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!

sick matrix
#

Can someone help me fix the Spigot server, it gives an error

smoky anchor
sick matrix
smoky anchor
fossil lily
sick matrix
smoky anchor
#

But why, there are better ppl to help you solve whatever problem you might have.
Just send the log to #help-server

#

He's trying to run buildtools but the main class is not found. If anybody wants to help him, feel free to do so :)

surreal skiff
#

Hi there, I'm trying to use the NametagEdit API however I keep getting the error below. Wondering if anyone can help.

#

the code is below

eternal night
#

are you shading the nametag edit apit

surreal skiff
#

so top is error message

surreal skiff
#

i'm using maven

eternal night
#

yea, did you define it in the compile scope ?

surreal skiff
#

I'm new to maven so still learning a lot

eternal night
#

yea, add <scope>provided</scope> to the nametag edit dep

#

similar to how your spigot dep is setup

surreal skiff
#

oh okay

#

is there any specific reason for that?

#

or just cause it's how it is

eternal night
#

Well, basically maven packages the classes of the nametag API into your plugin jar if you don't use the provided scope

#

which means there are two version of the nametag edit api classes in the server, one from the nametagedit plugin and one from your plugin

surreal skiff
#

ah ok, so I need the plugin and the scope provided thing?

#

Alright cause I had the plugin installed

#

and thought that may be causing the issue

eternal night
#

Yea you want the plugin instsalled

#

you just don't want to shade the nametagedit api

surreal skiff
#

ah okay

rustic grail
#

Hey everyone!

I'm a programmer with a passion for AI and data science. I'm currently working on an exciting project involving an automated PvP bot for a Minecraft Server. I'm looking for skilled Java developers who are interested in collaborating and contributing to the project. If you have experience in Java development for Minecraft or are enthusiastic about PvP bots, I would love to hear from you.

young knoll
#

?services

undone axleBOT
eternal night
#

the experience

rustic grail
#

and a python ai dev to add to your network/ friend

#

look if you are intrested please just dm me

young knoll
#

Only the finest exposure

rustic grail
#

otherwise ignore it

#

This is just a hobby project, and I need someone who knows java to help integrate stuff. If you're interested in helping, DM me

fierce whale
#

How can I check if backend server is online in bungee cord?

chrome beacon
#

Not sure why you need to check if they're online mode or not

undone axleBOT
fierce whale
chrome beacon
#

oh I read that wrong

#

mb

#

Just ping the ip

#

and see if you get a response

fierce whale
#

Is this the only way to check it?

chrome beacon
#

It's probably the easiest way to do it

fierce whale
ember estuary
#

MapPalette.getColor and MapPalette.matchColor are deprecated - what should i use instead?

My goal is to get the color and then make it slightly greener.
This is the code i have been using so far:

Color pixelColor = MapPalette.getColor(canvas.getBasePixel(i, j));
canvas.setPixel(i, j, MapPalette.matchColor(Math.max(0, pixelColor.getRed() - 40), Math.min(255, pixelColor.getGreen() + 100), Math.max(0, pixelColor.getBlue() - 40)));
eternal oxide
echo basalt
#

keep in mind that matchColor doesn't do any caching so it ends up being quite slow to paint a 128x128 frame

ember estuary
#

Oh, good to know, I'll implement some caching then, thanks

ember estuary
chrome beacon
#

Read the deprecation note?

echo basalt
chrome beacon
#

or is that nms

eternal oxide
#

it just means it uses magic numbers which you shoudl not do, but currently there is no alternative

#

it's just warning you that it may be replaced at a later date

chrome beacon
#

Do you want the color?

eternal oxide
#

when there is a replacement the deprecation will tell you what to use.

chrome beacon
echo basalt
#

ehh I'm not a fan of those methods

#

pretty sure they re-render the whole thing internally

#

overall the map api is quite slow compared to just doing stuff yourself

chrome beacon
echo basalt
#

can't bother

#

lot to rewrite

#

and NMS renders stuff too

#

The map API is not made to like

#

refresh dozens of frames in less than a tick

#

I remember doing tests and it was always above 30ms to render a whole frame

lone jacinth
#

Since the cache was added it is way faster

echo basalt
#

matching the colors without caching them accounted for 3ish ms

lone jacinth
ember estuary
#

Oh what, is the client not restricted to 20 ticks / sec ?
So i can just spam it with map packets and it will give me like a 60fps animation?

echo basalt
#

p much

#

I doubt the packet buffers are unlocked like that