#help-development

1 messages · Page 971 of 1

polar forge
#

ChatListener

tall dragon
#

bruh

eternal oxide
#

delete line 21

glad prawn
#
    private LuckPerms luckPerms;
    private MiniMessage miniMessage;```
polar forge
granite owl
#

i only want it to not be modifiable

#

the encapsuled one

eternal oxide
#

use plugin.getLuckPerms() where it errors

granite owl
#

because thats supposed to be accessed via a setter

polar forge
tall dragon
#

yea we know

#

luckperms is null

#

u set it in ur main class but not in the chat class..

eternal oxide
#

plugin.getLuckPerms().getUserManager()...

polar forge
#

So I should remove everything after the = and rip lace it with what Elg said?

tall dragon
#

no

#

replace luckperms with what elgar said

eternal oxide
#
User user = plugin.getLuckPerms().getUserManager().getUser(player.getUniqueId());```
tall dragon
#

🥄 troll_face

polar forge
#

Ok done

polar forge
#

Should it work now?

#

I’ll test it

#

Anything else?

#

ElgarL, anything else should be added?

eternal oxide
#

no

polar forge
#

Ok boss

glad prawn
#

bro cannot distinguish between declaration and initialization

granite owl
#

hope this isnt too ugly to read xD ```java
public Boolean setKeySeperator(Character keySeperator)
{
if (keySeperator == null) return false;
if (keySeperator.equals(this.settings.valueSeperator)) return false;
if (keySeperator.equals(this.settings.commentDeclarator)) return false;

    this.settings.keySeperator = Character.valueOf(keySeperator);

    return true;
}
tall dragon
#

why Boolean eyesshaking

rapid vigil
granite owl
#

returning if it was set or not

tall dragon
#

but boolean exists

remote swallow
#

why not primitive

tall dragon
#

no reason to not use primitive as far as i can see

slender elbow
#

java is an object oriented language

#

gotta use all the objects

tall dragon
#

hmmmm

#

a good point!, a good point

granite owl
#

i just wanted to keep it consistent since im also working with strings and primitive strings as char* do not exist

glad prawn
#

charAt(0) 💀

granite owl
#

what

polar forge
#

Bruh I still don’t see any Prefixes I set on LuckPerms

#

Why is that

eternal oxide
#

You don;t set any

polar forge
#

At least I don’t get any errors in my console

eternal oxide
#

you only change colour based on permissions

polar forge
#

Well I have the permission for color

#

But I don’t have any color

eternal oxide
#

ah you do set PlayerListName

granite owl
#

annoying that java doesnt have a built in ini parser, always json and xml..

polar forge
eternal oxide
#

which name are you trying to modify?

tall dragon
#

which is bassically the same thing

polar forge
#

Users’ names

#

If anyone has a prefix

eternal oxide
#

to display where?

polar forge
#

In chat

#

To everyone

granite owl
eternal oxide
#

then add the prefix to the display name

polar forge
#

To every else if statement?

granite owl
polar forge
granite owl
#

and why is that

rapid vigil
granite owl
#

and taste colors?

polar forge
granite owl
#

if you have a definitive amount of possibilities almost always use switch xD

#

or recursion

proud heart
#
Execution failed for task ':compileKotlin'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find org.spigotmc:spigot:1.20.2-R0.1-SNAPSHOT.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/org/spigotmc/spigot/1.20.2-R0.1-SNAPSHOT/maven-metadata.xml
       - https://repo.maven.apache.org/maven2/org/spigotmc/spigot/1.20.2-R0.1-SNAPSHOT/spigot-1.20.2-R0.1-SNAPSHOT.pom
       - file:/C:/Users/~/.m2/repository/org/spigotmc/spigot/1.20.2-R0.1-SNAPSHOT/maven-metadata.xml
       - file:/C:/Users/~/.m2/repository/org/spigotmc/spigot/1.20.2-R0.1-SNAPSHOT/spigot-1.20.2-R0.1-SNAPSHOT.pom
     Required by:
         project :

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
import java.nio.charset.Charset

plugins {
    id 'java'
    id 'org.jetbrains.kotlin.jvm' version '1.8.21'
}

group 'org.example'
version '1.0-SNAPSHOT'

repositories {
    mavenCentral()
    mavenLocal()
}
println Charset.defaultCharset()
dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib"
    compileOnly("org.spigotmc:spigot:1.20.2-R0.1-SNAPSHOT")
}


compileKotlin {
    kotlinOptions {
        //jvmTarget = "1.8"
        //freeCompilerArgs += ["-Xno-param-assertions"]
    }
}

jar {
    destinationDirectory.set(new File("C:/Users/~~"))
    from('resources')
}


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

I don't know what the problem is...
I've tried switching to 1.20, re-reading the manual and fixing it... I still get the same error.

Where did i go wrong?

https://www.spigotmc.org/wiki/spigot-gradle/

remote swallow
#

run buildtools for 1.20.2

polar forge
granite owl
#

i stopped hardcoding most stuff anyways and write generic functions reading from config files

polar forge
granite owl
#

and theyre either plaintext like xml, ini or serialized

polar forge
#

Oh nice

eternal oxide
granite owl
#

what was the recoomended api again?

#

the one someone released under MIT license which is an AST parser for mathematical expressions

#

forgot its name

polar forge
young knoll
#

Crunch?

granite owl
polar forge
#

Before ChatColor?

tall dragon
#

crunch is gpl-2.0 tho ;d

#

not mit

granite owl
#

it says mit

tall dragon
#

yea nvm

#

im confused with somethn else

#

mb

#

its mit indeed

granite owl
#

there aint no way im writing my own ast parser xD

tall dragon
#

why not. its fun

granite owl
#

because i suck at math

#

xD

tall dragon
#

well thats generally where the computer comes into play

granite owl
#

and im not writing my own compiler either

granite owl
tall dragon
#

i mean surely you understand the basic math rules?

granite owl
#

for the most part xD

tall dragon
#

it really is a fun challange to make a basic expression parser

#

though if u need something full fledged i would definately go with crunch

#

its very nice

#

and fast

granite owl
#

i want to define constant strings with variable names and replace them at runtime with values

#

then feed them to the parser

tall dragon
#

well crunch supports that

#

iirc

granite owl
#

yea ill prob go with that one

tall dragon
#

yea u can do that with an EvaluationEnvironment in crunch

granite owl
#

more importantly i have default arithemetic operations that are always the same thus constant, and user input to add to that term

tall dragon
#

soo a custom function?

granite owl
#

no

#

via a GUI

dawn flower
#

use evalex

proud heart
granite owl
tall dragon
polar forge
#

@eternal oxide Btw, Nop still doesn’t work

pliant topaz
#

When I set PersistentData, is it only for that specific item, or for all items which are excactly like that item? (so same metadata etc)

tall dragon
#

only for the one u set it to

#

which means its now different to the "identical" ones

pliant topaz
#

okay, thought so, then something in my code just isn't working haha

#

thx for the help

dawn flower
#

if minecraft is able to identify new items why dont they make a way to identify duped items without giving up stacking items

swift slate
#

looking for experienced dev need something good made

remote swallow
undone axleBOT
dawn flower
swift slate
#

dont have the effort to login their website

remote swallow
#

you dont need to login

#

find someone offering development services

dawn flower
#

across restarts as well, there must be an identifier or smth

shadow night
dawn flower
#

ah

shadow night
#

when an itemstack is duped, it's no different than calling new ItemStack and then adding on the same nbt data, ofc you could use that to identify duped items, but it'll be wacky with stackable items

dawn flower
#

would be cool if we had setStackable, ik this would break stuff but maybe we could also have getStack which returns the array of items in that itemstack

river oracle
dawn flower
#

crap i meant forceStackable

#

if u have 2 items with different pdc data but both r force stackable they would stack

river oracle
#

that would not work out well tbh

#

there are so many logical what ifs I can't even start

tall dragon
#

that would require a complete rewrite on how the item system is handled

river oracle
dawn flower
#

no need to mess with the current item system

tall dragon
#

currently an itemstack is stored with an amount

#

that woulnt be possible

#

since nbt is potentially different

river oracle
#

I don't think you're really thinking about how this would have to be implemented in NMS

high arrow
#

Hello, I have a problem concerning plugin messages ( again... )

I tried getting the player count of a server, but it doesn't work well, it says there is 68k players online, + papi has errors in the console because of this ( i have the bungeecord expansion )

LISTENER

@Override
    public void onPluginMessageReceived(String channel, Player player, byte[] bytes) {
        if(!channel.equalsIgnoreCase("BungeeCord"))
            return;

        ByteArrayInputStream in = new ByteArrayInputStream(bytes);
        DataInputStream stream = new DataInputStream(in);

        try {
            switch (stream.readUTF()) {
                case "PlayerCount":
                    PlayerCount = stream.readInt();
                    break;
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }
SENDING

public int getCount(String server){
        ByteArrayOutputStream b = new ByteArrayOutputStream();
        DataOutputStream out = new DataOutputStream(b);

        try {
            out.writeUTF("PlayerCount");
            out.writeUTF(server);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        getServer().sendPluginMessage(this, "BungeeCord", b.toByteArray());
        return listener.PlayerCount;
    }
dawn flower
#

u never wrote int here?

high arrow
#

?paste

undone axleBOT
high arrow
#

example of the bungeecord expansion:

switch (in.readUTF()) {
        case "PlayerCount":
          if (stream.available() == 0)
            return; 
          server = in.readUTF();
          if (stream.available() == 0) {
            getPlaceholderAPI().getLogger().log(Level.SEVERE, String.format("[%s] Could not get the player count from server %s.", new Object[] { getName(), server }));
            this.counts.put(server.toLowerCase(), Integer.valueOf(0));
            break;
          } 
          this.counts.put(server.toLowerCase(), Integer.valueOf(in.readInt()));
          break;
solemn meteor
#

in PlayerSwapHandItemsEvent, how do I get which hotbar slot I swapped with

#

I assume thats what the event does

young knoll
#

It swaps main hand with offhand

#

So the main hand is your currently selected slot

blazing ocean
dawn flower
#

for some reason when i try to strike lightning it just strikes it for a tick

#
entity.getWorld().strikeLightningEffect(new Location(entity.getWorld(), coords[0], coords[1], coords[2]));
oak mica
#

Hi, I set the value of a NBT tag here:

        container.set(Data.SUMMONING_MOB_UUIDS.key, PersistentDataType.STRING, "abc");

but when I try set the value again

        ItemMeta meta = stack.getItemMeta();
        PersistentDataContainer container = meta.getPersistentDataContainer();
        String uuids = container.get(Data.SUMMONING_MOB_UUIDS.key, PersistentDataType.STRING);
        if(uuids == "abc") uuids = String.valueOf(entity.getUniqueId());
        else uuids += "," + entity.getUniqueId();
        container.set(Data.SUMMONING_MOB_UUIDS.key, PersistentDataType.STRING, uuids);
        stack.setItemMeta(meta);

I get a error

Caused by: java.lang.IllegalArgumentException: The found tag instance (NBTTagByte) cannot store String
vague dawn
rapid vigil
# vague dawn

Use EntityDamageByEntityEvent and check if both are a player, if so then teleport the one who got damaged to the spawn location

vague dawn
#

when the y is <=80?

rapid vigil
#

if you want to

vague dawn
#

hmm

dawn flower
vague dawn
#

is there a way how to get the killer?

dawn flower
#

Entity#getKiller

chrome beacon
#

That event would be too early for that

rapid vigil
young knoll
#

You can't teleport in the death event

chrome beacon
#

Respawn the player the next tick and then teleport them

young knoll
#

Just get the damger in EntityDamageByEntityEvent?

chrome beacon
#

or that ^^

vague dawn
#

and i do not want the player to be dead, i want to get the damager and if the damager equals "killer" and the player y <= 80 then telepor the player

chrome beacon
#

depends on how much compatability you want

young knoll
#

And check if the targets current health - event.getFinalDamage <= 0

#

aka it kills them

dawn flower
quaint mantle
#

Hello, anyone knows how to send an action bar message to a player?

dawn flower
#

Player#sendActionBar

rapid vigil
dawn flower
#

Player#spigot

young knoll
#

Player#spigot#sendMessage with ChatMessageType.ACTION_BAR

dawn flower
#
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, component here);
rapid vigil
#

and NMS in older versions :)

chrome beacon
dawn flower
#

i am

shadow night
#

what does /version say

dawn flower
#

1.20.4

shadow night
#

what exactly does it say

young knoll
#

That's not an output of /version

dawn flower
#

u want a pic?

shadow night
#

yes

dawn flower
#

aight

vague dawn
#

hmm, i have tried it like this, but not wokring

#

there is nothint like player.getDamager

chrome beacon
#

?

rapid vigil
#

its event.getDamager

chrome beacon
#

^^

#

You already have the killer

#

also that will cause an error when damaged by an entity that isn't a player

vague dawn
#

yes, but how to chesk it in the if ?

chrome beacon
#

You don't need to check if the killer is the killer?

#

you already know it is

quaint mantle
dawn flower
rapid vigil
vague dawn
chrome beacon
#

What are you talking about then?

slender elbow
#

you named the variable killer

#

lol

young knoll
vague dawn
#

i do not need the killer... i just want to teleport the player if his y <= 80 and get lasthitted by damager

shadow night
#

I read that as lastshitted

rapid vigil
#

ooh alr

vague dawn
#

so i came out with this:

#

but its not working

rapid vigil
#

I actually dont understand what you are trying to make

chrome beacon
dawn flower
#

/ver isnt working

chrome beacon
dawn flower
#

nvm fixed it

vague dawn
#

but i need to know the last damager before the player teleport

young knoll
#

The last damager is the damager in the event

delicate lynx
#

then just use damager

#

you already know who did the last damage

vague dawn
#

true

polar forge
#

Guys

vague dawn
#

but its still not teleporting the player when his y <= 80

polar forge
#

So I got this problem, I still can’t see the LuckPerms prefixes I set, when I load my plugin

rapid vigil
young knoll
#

It’s always set

#

Lul?

rapid vigil
#

don't you need to run /setworldspawn

young knoll
#

No

vague dawn
young knoll
#

Where do you think players spawn when you don’t run that?

rapid vigil
#

they don't spawn at all

dawn flower
young knoll
#

Ah yes of course

dawn flower
#

its been 45 minutes

young knoll
#

Are you using some weird client

#

Or any client mods tbh

dawn flower
#

me?

vague dawn
#

but the problem is still with the teleportation

young knoll
dawn flower
#

no

#

doing it with something /summon works

vague dawn
young knoll
#

Interesting

#

Does calling strikeLightning also work

delicate lynx
#

that won't run for void damage

dawn flower
vague dawn
dawn flower
#

both strikeLightningEffect and strikeLightning die after a tick

young knoll
#

They don’t even take damage in that video

#

How are you expecting the damage event to fire

sullen canyon
#

Hello, I am making a minigame and I want to send different messages to players, my current system looks like

Classes:
SkywarsPlayer
- GameSendingMessageService
- ...other services related to players/games

(Some of the messages include calculating top 3 killers, or displaying new statistics to the player in chat and some of the messages are just 2-3 lines simple messages)

I am pretty sure it's a poor designing way and it could have been improved. In my GameSendingMessageService class I have 10-15 methods to send different messages (I attached the picture). What could I change to make the system more flexible and well designed? How do you usually do this?

rapid vigil
#

i think he doesn't read what he's writing

vague dawn
brittle geyser
vague dawn
dawn flower
#

4060 isnt that expensive

#

well its expensive but not like a 4090

brittle geyser
#

i have only 3060

dawn flower
#

my guy i have 128mb vram

#

perfectly fine

vague dawn
#

you can see on the video, igor get hitted by entity and still doesnt teleported him

sullen canyon
chrome beacon
chrome beacon
#

Bro running a GPU from 20 years ago

vague dawn
#

yes

delicate lynx
#

EntityDamageByEntityEvent only fires when a mob attacks another mob. you're checking if their location is <=80, which will only run while they are down in the void below and get hit by another player

shadow night
#

You guys got graphic cards?

dawn flower
vague dawn
shadow night
#

Mine is called intel integrated graphics

dawn flower
rapid vigil
young knoll
#

You’d need to check the last damage cause if you want to handle the void damage

quaint mantle
dawn flower
#

u dont

delicate lynx
#

sorry, saw void, still

dawn flower
#

u can spam send tho to make it longer

delicate lynx
#

that event is not what you want to achieve this

#

since it will only listen for when the player first gets hit, not when they fall

young knoll
#

Normal damage event -> check if lastDamageCause instanceOf entityDamageByEntityEvent -> check if the damage in said event is player

rapid vigil
#

PlayerFallEvent and then if y is less than 80 :>

vague dawn
#

true, tested it

#

it telepor tthe player only when i hit him when hes under 80

young knoll
#

Or you can use the move event instead of waiting for them to take void damage

#

If you prefer

quaint mantle
dawn flower
#

only for titles iirc

muted otter
#

how do teams work with scoreboards?

young knoll
#

Not sure why the methods would be broken

dawn flower
muted otter
vague dawn
#

now i need to check, if there was damager or not xd

young knoll
#

Create a bug report with a minimum reproducible example if you can verify it’s a spigot issue

delicate lynx
#

are you telling it to lightning strike for more than one time

vague dawn
#

thx guys

eternal oxide
dawn flower
#

yes

#

getLifeTicks returns 2 btw

eternal oxide
#

so set it longer and see what happens

#

also increase flashes

dawn flower
#

i tried to make it 15

eternal oxide
#

the life ticks is only how long it will cause damage for

#

flashes is how long it displays

dawn flower
#

ah

#

how many flashes is the default

eternal oxide
#

probably 1

delicate lynx
#

docs says 1 to 3

oak mica
#

holla i tried to set the value of a NBT tag then change it later

to originally set it i use this

        container.set(Data.SUMMONING_MOB_UUIDS.key, PersistentDataType.STRING, "abc");

to change it i use this

        ItemMeta meta = stack.getItemMeta();
        PersistentDataContainer container = meta.getPersistentDataContainer();
        String uuids = container.get(Data.SUMMONING_MOB_UUIDS.key, PersistentDataType.STRING);
        if(uuids == "abc") uuids = String.valueOf(entity.getUniqueId());
        else uuids += "," + entity.getUniqueId();
        container.set(Data.SUMMONING_MOB_UUIDS.key, PersistentDataType.STRING, uuids);
        stack.setItemMeta(meta);

thenn i get this error

Caused by: java.lang.IllegalArgumentException: The found tag instance (NBTTagByte) cannot store String

anyione know how i can fix this

eternal oxide
#

that can;t be all the code

oak mica
#

wym

dawn flower
#

seems normal

oak mica
#
        SUMMONING_MOB_UUIDS(NamespacedKey.fromString("overcharged:summoning_cooldown_ultimate")),
#

this is the value

eternal oxide
#

3 is max, so if you want it to strike longer you have to spawn is more than once

oak mica
#

oh nvm your not tlaking to me

#

🔥

eternal oxide
#

sorry 🙂

dawn flower
#

tfdym, adding 1 more wont make it from 1 tick lifespan to like a second

oak mica
#

nah im being dumb sorry

eternal oxide
#

If you want it to flash lightning for a second you have to fire it more than once

dawn flower
#

wouldnt that just create abunch of lightning bolts

eternal oxide
#

just make the additional hits cause no damage

#

yes, you delay them

dawn flower
#

ugh

eternal oxide
#

thats how a lot of things in MC work, like sounds

vague dawn
#

one last question - how to reset the damager after the teleport?

dawn flower
#

well for whatever the damn reason skript's lightning works perfectly AND THEIR CODE IS THE SAME AS MINE

young knoll
#

I think there’s a setLastDamageCause

vague dawn
#

but what to put there

delicate lynx
#

it's deprecated lmao

dawn flower
#

my code: entity.getWorld().strikeLightningEffect(entity.getLocation());

their code: lastSpawned = l.getWorld().strikeLightningEffect(l);

and their code works

#

so its def not spawn abunch of lightning

young knoll
#

Mmm so it is

#

I guess it would be better to track the last damager yourself then

vague dawn
#

thats impossible, i want to give the damager some items, so i need to reset it, bcs when player next falls on their own, there would still be the last damager right?

young knoll
#

Yes

dawn flower
#

so i did some debugging

young knoll
#

Also wdym that’s impossible

dawn flower
#

and found out a plugin is killing it

#

but idk which plugin

vague dawn
young knoll
#

Binary search time

tardy delta
dapper flower
#

How do i turn on a redstone lamp?

young knoll
#

getBlockData -> cast to lightable -> setLit -> setBlockData

dawn flower
young knoll
#

That’s what the binary search is for

dawn flower
#

i hate my life

dawn flower
oak mica
#

im so confused

young knoll
#

Disable half
If it goes away:

  • switch to the other half and check again
  • repeat process
    if it does not go away:
  • repeat process
dawn flower
#

i always do that

tardy delta
#

congrats you invented binary search

dawn flower
#

anyways i found it first try

#

i should go try my luck with a lottery ticket before my luck is gone

young knoll
tardy delta
#

tried to be funny

dawn flower
#

hahaa

#

that wasnt funny

#

can u make effect lightning have sound

young knoll
#

Just play the sound

dawn flower
#

what is the sound

quaint mantle
#

What is the equivalence between ticks and seconds?
1 second = ? ticks

young knoll
#

20

dawn flower
#

1 second = 20 ticks

young knoll
#

(By default)

dawn flower
#

basic knowlage

quaint mantle
dawn flower
#

knowledge*

young knoll
dawn flower
#
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) ~[?:?]
        at java.lang.Integer.parseInt(Integer.java:661) ~[?:?]
        at java.lang.Integer.parseInt(Integer.java:777) ~[?:?]
        at missing.plugins.turboenchants.enchants.Enchant.evaluateCondition(Enchant.java:666) ~[TurboEnchants-1.0.jar:?]
        at missing.plugins.turboenchants.enchants.Enchant.evaluateAction(Enchant.java:146) ~[TurboEnchants-1.0.jar:?]
        at missing.plugins.turboenchants.enchants.Enchant.call(Enchant.java:118) ~[TurboEnchants-1.0.jar:?```
what in the world in spigot drinking
#

"2" is a number

slender elbow
#

"2.0" is not an integer

young knoll
#

It’s not an int

#

It’s a float/double

dawn flower
#

oh shit im parsing int

remote swallow
#

read dms

dawn flower
#

who split numbers to be double and int 😭

#

just make it one number class that support both

young knoll
#

Computers

dawn flower
#

computers only understand binary, binary can be converted to decimal directly

#

not integer and decimal

young knoll
#

What

tardy delta
#

what

#

ever heard of ieee754

dawn flower
#

java can just compile '3' as 3.00 and '3.69' as 3.69

tardy delta
#

whats that supposed to mean

dawn flower
#

theres no point for integer

#

double cna be an integer

tardy delta
#

performance?

dawn flower
#

good point

#

but isn't 3.00 = 3

#

how does that affect performance

slender elbow
#

floating point precision goes brrrr

tardy delta
#

your questions dont make sense at this point

dawn flower
#

it does

young knoll
#

I can’t think of any language that doesn’t separate floating point and non floating point

dawn flower
#

just make computers better

#

what's so hard abt that

eternal oxide
#

there was a time we didn;t have FP processors

young knoll
#

Those are both weakly typed

dawn flower
oak mica
#

holla i tried to set the value of a NBT tag then change it later

to originally set it i use this

        container.set(Data.SUMMONING_MOB_UUIDS.key, PersistentDataType.STRING, "abc");

to get the current value

        ItemMeta meta = stack.getItemMeta();
        PersistentDataContainer container = meta.getPersistentDataContainer();
        String uuids = container.get(Data.SUMMONING_MOB_UUIDS.key, PersistentDataType.STRING);

thenn i get this error

Caused by: java.lang.IllegalArgumentException: The found tag instance (NBTTagByte) cannot store String

anyione know how i can fix this

tardy delta
#

good ol time with bcd

young knoll
#

No lol?

dawn flower
#

at least u dont need to call THREE methods / fields for a simple print

young knoll
#

?

tardy delta
#

thats type erasure mate

dawn flower
#

System.out.println
^ ^ ^

young knoll
#

Oh no

tardy delta
#

lol

young knoll
#

Whatever will we do

#

It’s still 2 in js

tardy delta
#

println in kotlin

remote swallow
dawn flower
tardy delta
#

could static import System.out and now you have two

dawn flower
#

too bad proper optional args arent made

tardy delta
#

we have kotlin for that

dawn flower
#

doesnt count

young knoll
#

I agree overloading is kinda meh

#

But it’s not a huge deal

dawn flower
#

its not a huge deal until u have a 100 line method and u need optional args

#

have fun dealing with that

tardy delta
#

just write your own lang

young knoll
#

?

slender elbow
#

wouldn't be an issue in kotlin

young knoll
#

Its not really a huge issue in java

dawn flower
#

this is a java argument not a kotlin argument

young knoll
#

You just add an overload

#

It’s like 3 lines

dawn flower
#

ugh

#

serialization

#

is bs in java

tardy delta
#

as in the reflective approach?

slender elbow
#

wouldn't be an issue with kotlinx.serialization

tardy delta
#

lucky you that you arent using c

dawn flower
#

u cant make an object without calling the constructor

tardy delta
#

you can

#

do some research

dawn flower
#

which makes it pain to serialize

dawn flower
#

which isnt safe

tardy delta
#

so what

dawn flower
#

tfdym so what

#

when was the last time u saw java being used outside of minecraft

tardy delta
#

unsafe doesnt mean its unsafe

slender elbow
#

wouldn't be an issue with datafixerupper

tardy delta
#

it means that it isnt made fool proof for idiots

chrome beacon
dawn flower
#

in?

tall dragon
#

Intellij ? XD

chrome beacon
#

Backend systems

young knoll
#

Believe it or not code is used for more than just games

chrome beacon
#

^^

blazing ocean
#

🤯

eternal oxide
#

lies

chrome beacon
#

Java isn't exactly used for frontend stuff

dawn flower
#

dead srs?

echo basalt
#

Binance's entire backend is made in java p sure

blazing ocean
#

but yeah it is also used for (kinda legacy) android dev

echo basalt
#

There's vaadin for frontend

blazing ocean
#

since kotlin is mainly used for mobile dev now

#

which is good

#

since multiplatform is really enjoyable to work with

quaint mantle
#

https://www.spigotmc.org/threads/raycast-returning-incorrect-multiple-blocks.644537/
^ need help and it’s a lot so I’m just sending link, here’s a quick rundown…

“For the people who don't watch the video, when looking straight up in the air and tracing a ray from the players eyes, it will return that result.getHitBlock().equals(block) stating that the block that was being broken is the same one the ray was looking at.”

dawn flower
#

oh wait this is supposed to be a helping channel

blazing ocean
#

yes...

dawn flower
#

cough

quaint mantle
dawn flower
#

cough

tardy delta
quaint mantle
#

Reel

tardy delta
#

there are differnt types of air

dawn flower
tardy delta
#

Material::isAir

quaint mantle
quaint mantle
blazing ocean
#

null

quaint mantle
#

There are different materials

young knoll
#

There’s 3 airs

quaint mantle
#

What are they?

#

Water

#

Fire

tardy delta
#

cave, void and normal iirc

quaint mantle
#

wtf is cave

#

And is void all of the air under the void or is it the air section that you take damage from? Probably the second one

#

If you don’t understand it just watch the video

young knoll
#

Anything out of the world is void air

#

Caves are filled with cave air

quaint mantle
#

Wait the video didn’t process bruh

#

Here’s the video showing the issue^

#

Well here v

#

Soon

#

😭

#

Brooo

cinder abyss
#

Hello, I've got an error with my BlockPopulator code:

public class RocksPopulator extends BlockPopulator {
    @Override
    public void populate(@NotNull WorldInfo worldInfo, @NotNull Random random, int chunkX, int chunkZ, @NotNull LimitedRegion limitedRegion) {
        if(worldInfo.getEnvironment() != World.Environment.NORMAL) return;
        int randomX = (int) (random.nextDouble()*16*chunkX);
        int randomZ = (int) (random.nextDouble()*16*chunkZ);
        int perfectY = limitedRegion.getHighestBlockYAt(randomX, randomZ);

        System.out.println("chunkX " + chunkX);
        System.out.println(randomX);
        System.out.println("chunkX " + chunkZ);
        System.out.println(randomZ);
        System.out.println("perfectY " + perfectY);

        Switch button = (Switch) Material.STONE_BUTTON.createBlockData();

        button.setFacing(BlockFace.UP);

        limitedRegion.setBlockData(randomX, randomZ, perfectY, button);
    }
}```
#

Do someone know how to fix that?

quaint mantle
#

Why is it called clazz?

blazing ocean
# quaint mantle Why is it called `clazz`?

clazz has been used in Java in place of the reserved word "class" since JDK 1.0. "class" is what you want, but abbreviating or inserting junk ("a", "the", "_", etc) reduces clarity. clazz just says class. "International" English speakers (those reading both British and American English) are used to transposing 's' and 'z'.

quaint mantle
#

Oh kk

quaint mantle
# quaint mantle

“For the people who don't watch the video, when looking straight up in the air and tracing a ray from the players eyes, it will return that result.getHitBlock().equals(block) stating that the block that was being broken is the same one the ray was looking at.”

Here we go the video loaded

blazing ocean
#

interfaces or interfaces-kotlin for kotlin

lost matrix
quaint mantle
eternal oxide
cinder abyss
#

I'm so sorry 😭

quaint mantle
blazing ocean
#

lmfaoo

cinder abyss
#

It's just a switch blockData?

quaint mantle
#

Anyone know this issue?

“For the people who don't watch the video, when looking straight up in the air and tracing a ray from the players eyes, it will return that result.getHitBlock().equals(block) stating that the block that was being broken is the same one the ray was looking at.

if (block.getType() == Material.AIR) return;

I don't think it would have anything to do with this but that's the only thing I can think of since the player is looking in the air”

eternal oxide
cinder abyss
#

oh okay I see

eternal oxide
#

of the LimitedRegion

cinder abyss
#

yeah

young knoll
#

Use setAttachedFace not setFacing

quaint mantle
eternal oxide
#

that too, for your other error (coll's post)

cinder abyss
quaint mantle
cinder abyss
quaint mantle
lost matrix
eternal oxide
#

um, math!?

#

a Chunk is 0-15 size, then a LImited region has a buffer around it of x size

cinder abyss
quaint mantle
#

Btw I’m guessing that’s the issue

#

Most likely is

eternal oxide
#

ok, get a random between -getBuffer() and 15+getBuffer

quaint mantle
cinder abyss
quaint mantle
#

Bruh

#

Don’t say it don’t say it

young knoll
#

I mean, the buffer is there for big things

quaint mantle
#

I’m so stupid lmao

young knoll
#

You should only get a random from 0-15

eternal oxide
#

true

young knoll
#

The other chunks will have their own calls of the populator

quaint mantle
eternal oxide
#

as it's a chunk populator

#

so do just 0 to 15

cinder abyss
#

okay

#

so only that, nothing more?

quaint mantle
#

Bro someone add a Minecraft heart emoji 😭

neon shoal
#

Hey where can I find the docs?

eternal oxide
#

you are only placing a single block so no need to cross chunks

eternal oxide
#

?jd-s

undone axleBOT
neon shoal
#

Ty

cinder abyss
#

I thought it was ?docs or slt

neon shoal
#

Ima spend half my life reading it so I can quit when I get into plugin dev

blazing ocean
#

based

young knoll
#

I’d like to recommend ChatPaginator

neon shoal
#

Already getting the urge to quit

eternal oxide
#

No real need to learn the javadocs. The search box top right is your best friend

oak mica
#

holla i tried to set the value of a NBT tag then change it later

to originally set it i use this

        container.set(Data.SUMMONING_MOB_UUIDS.key, PersistentDataType.STRING, "abc");

to get the current value

        ItemMeta meta = stack.getItemMeta();
        PersistentDataContainer container = meta.getPersistentDataContainer();
        String uuids = container.get(Data.SUMMONING_MOB_UUIDS.key, PersistentDataType.STRING);

thenn i get this error

Caused by: java.lang.IllegalArgumentException: The found tag instance (NBTTagByte) cannot store String

anyione know how i can fix this

cinder abyss
#

(sorry for ping, I recheck my code)

#

@eternal oxide, I get Coordinates 24, 22 are not in the region for java int randomX = randomBtw(random, -limitedRegion.getBuffer(), 15+limitedRegion.getBuffer()); int randomZ = randomBtw(random, -limitedRegion.getBuffer(), 15+limitedRegion.getBuffer());

#

And same for chunkX + rdm, chunkZ + rdm...

copper scaffold
#

is there a way to set specific permissions to a player? like i set the permissions in the plugin.yml like this:
https://pastebin.com/8qJPg6rT
i want that one player can have the permission command.settings how can i set the player permission for that.
here is the code how i try to set the permissions:
https://pastebin.com/MZeLK4kp

sullen marlin
#

Code seems fine?

copper scaffold
#

But i can‘t use the command when im not op

young knoll
#

You might have to refresh commands?

cinder abyss
#

Hello, I get Coordinates 24, 22 are not in the region for java int randomX = randomBtw(random, -limitedRegion.getBuffer(), 15+limitedRegion.getBuffer()); int randomZ = randomBtw(random, -limitedRegion.getBuffer(), 15+limitedRegion.getBuffer());

#

Please, Is there a way to fix that?

sullen marlin
#

Read the docs

cinder abyss
#

okay thanks

#

so without buffer?

#

I'll not send you what they'll send to you

#

Idk about regex sorry

slender elbow
#

just parse manually 💀

echo basalt
#

Yeah p much

#

that regex is trippy

cinder abyss
#

is there really regex optimization?

#

there is a real performance impact with regex?

muted otter
#

How do I make a scoreboard that can update its values? Like player health for example

young knoll
#

There’s a performance impact on my eyes

delicate lynx
#

multiverse incident 2021

cinder abyss
echo basalt
#
public List<String> parseWords(String input) {
  List<String> list = new ArrayList<>();

  int startIndex = 0;
  for(int index = 0; index < input.length(); index++) {
    char character = input.charAt(index);
    
    if(character == ';') {
      list.add(input.substring(startIndex, index - 1);
      startIndex = index;
      continue;
    }
  }

  if(startIndex < input.length()) {
    list.add(input.substring(startIndex));
  }

  return list;
}
#

close enough

rough ibex
#

blinks/sec

cinder abyss
#

Same error, Coordinates 27, 42 are not in the region

int randomX = randomBtw(random, 0, 15)*chunkX;
int randomZ = randomBtw(random, 0, 15)*chunkZ;```
How can I fix that please?
cinder abyss
#

If anyone knows 🙏

cinder abyss
#

See you tomorrow for help 🫡 good night everyone

oak mica
#

holla i tried to set the value of a NBT tag then change it later

to originally set it i use this

        container.set(Data.SUMMONING_MOB_UUIDS.key, PersistentDataType.STRING, "abc");

to get the current value

        ItemMeta meta = stack.getItemMeta();
        PersistentDataContainer container = meta.getPersistentDataContainer();
        String uuids = container.get(Data.SUMMONING_MOB_UUIDS.key, PersistentDataType.STRING);

thenn i get this error

Caused by: java.lang.IllegalArgumentException: The found tag instance (NBTTagByte) cannot store String

anyione know how i can fix this

sullen marlin
#

not sure, code looks fine

#

are you sure you arent setting it somewhere else also

#

if that really is all the code, create a test plugin and open a bug report

ionic terrace
#

I know with the server version of minecraft the minimum java version is 21 but does this apply to plugins as well?

young knoll
#

The minimum is still 17 until 1.20.5 comes out

#

The api also uses 17 now

ionic terrace
#

I know but when it comes out, do I need to change to Java 21?

#

Not at the moment

young knoll
#

If you use NMS you probably will

#

Otherwise no

ionic terrace
#

Cool thanks!

deep herald
#

how do i make a hover and click in the middle of a message using bungee components

#

so like

#

nvm idk how to do an example for this lol

young knoll
#

3 components

muted otter
#

Is there a good way to hide the text on the scoreboard that comes from registering a new team on a line?

Team line = scoreboard.registerNewTeam("" + i);

Because right now I have the index numbers from my foor loop next to my text. I do not want any text related to the for loops at all on the scoreboard, but I need to have the index there to see what line it is.

young knoll
#

Add the hover and click to the middle one

#

And then append them together

deep herald
#

how do i check if the top of a door is gone

#

so like half

rough ibex
#

check if block above is not door

#

if not door, not door

#

if door, door

#

👍

vast ledge
#

👍

deep herald
#

how do i get above?

vast ledge
#

y + 1

#
Block doorBottom = YourSource;
Location doorTopL = doorBottom.getLocation().clone().add(0, 1, 0);
Block doorTop = doorTopL.getBlock();
deep herald
#

wait no

muted otter
#

Is there a good way to hide the text on the scoreboard that comes from registering a new team on a line?

Team line = scoreboard.registerNewTeam("" + i);

Because right now I have the index numbers from my foor loop next to my text. I do not want any text related to the for loops at all on the scoreboard, but I need to have the index there to see what line it is.

waxen parrot
#

is anyone familiar with luckperms?

muted otter
waxen parrot
#

Why can I not get the default commands like /me, /tell, etc to work on my default rank?

muted otter
#

what commands does the default group have?

#

which ones cant you do

waxen parrot
#

well, for starters I just added: minecraft.command, minecraft.command.help, minecraft.command.tell, and minecraft.command.me to see if they'd work and which they don't when applied.

#

It just pops up saying "Do not have access to that command".

#

I have the prefix and everything set

muted otter
#

try to look at the web editor and double check everything

waxen parrot
#

I figured development, since i'm developing my server atm. but idk, all this channel topic stuff is confusing. It's spigot related technically lol

muted otter
#

ye ik lol

#

sometimes can be hard to understand

waxen parrot
#

ah gotcha

#

I will head there then. still haven't been able to figure it out lol

muted otter
#

accept my friend req

deep herald
#

anyone know why this is happening?

#

nvm im just gonna use adventure

worldly ingot
#

Only reason it's doing that is because you're toString()ing the component instead of sending it as a component

muted otter
#

Is there a good way to hide the text on the scoreboard that comes from registering a new team on a line?

Team line = scoreboard.registerNewTeam("" + i);

Because right now I have the index numbers from my foor loop next to my text. I do not want any text related to the for loops at all on the scoreboard, but I need to have the index there to see what line it is.

plucky rock
#
                   new BukkitRunnable() {
                        int CurrentLength = 0;
                        @Override
                        public void run() {
                            for (Entity victim : world.getNearbyEntities(ParticleLoc, 5, 5,5)){
                                if (victim instanceof LivingEntity){
                                    if (victim == player) {
                                        continue;
                                    }
                                    Vector particleMinVector = new Vector(
                                            ParticleLoc.getX() - 0.25,
                                            ParticleLoc.getY() - 0.25,
                                            ParticleLoc.getZ() - 0.25);
                                    Vector particleMaxVector = new Vector(
                                            ParticleLoc.getX() + 0.25,
                                            ParticleLoc.getY() + 0.25,
                                            ParticleLoc.getZ() + 0.25);
                                    if(victim.getBoundingBox().overlaps(particleMinVector,particleMaxVector)){
                                        ((Damageable) victim).damage(10, player);
                                        this.cancel();
                                        return;
                                    }
                                }
                            }
                            CurrentLength ++;
                            if (CurrentLength >= finalTotalRange) {
                                this.cancel();
                                return;
                            }
                            ParticleLoc.add(dirOffset);
                            world.spawnParticle(Particle.FIREWORKS_SPARK, ParticleLoc,0);
                        }
                    }.runTaskTimer(RandomRoomGen.getPlugin(),0, 0);```
#

how do i make that run instantly

#

im sorry if thats a stupid question but i geniuinly dont know

glad prawn
#

runTask ?

upper hazel
#

Is the location object the same mutable as the player object?

#

this will be bad if i will save location in some object class?

sullen marlin
#

I don't understand

lilac dagger
mild pecan
#

does anyone need a plugin made im bored asl 😭

nova notch
#

chatgpt yourself some ideas

charred blaze
#

can i somehow force player to press f3+d?

quaint mantle
#

Nope

charred blaze
#

:(

quaint mantle
#

Debug is 100% client bound

charred blaze
#

debug?

#

thats chat clear iirc

lilac dagger
#

Just send 30 empty messages

charred blaze
#

about that

#

for (Player player : Bukkit.getOnlinePlayers()) {
System.out.println(player.getName());
player.sendMessage(color(message));
}

#

when im doing this

#

its spamming console too

#

and broadcast method doesnt work for legacy color codes

lilac dagger
#

Maybe it's the color

charred blaze
drowsy helm
#

System.out.println(player.getName());?

lilac dagger
#

What's with the sout?

drowsy helm
#

that will print to conosle

charred blaze
#

i know

drowsy helm
#

and just use Bukkit.broadcastMessage

lilac dagger
#

When you send a message to a player it can't send it to the consoke too

drowsy helm
#

if you're gonna send to all

quaint mantle
drowsy helm
#

ah

lilac dagger
#

Add a space

charred blaze
lilac dagger
#

It works

charred blaze
lilac dagger
#

In the message

charred blaze
#

in the color() method?

quaint mantle
#

Add &f to empty message

lilac dagger
#

Player send message (" " )

charred blaze
#

ok ill try

#

well its still spamming in console

#

Bukkit.broadcastMessage(" ");

#

this one

#

for (int i = 0; i < 600; i++) {
Bukkit.broadcastMessage(" ");
}

#

nvm fixed

lilac dagger
#

600 is a whole lot by the way

#

Put it to 30 or 50

rough drift
#

Thoughts on passing a plugin to a constructor vs calling an internal method whenever the object is registered?

glad prawn
#

wat

quaint mantle
blazing ocean
still ridge
#

Hello, I'm making a plugin in 1.20 and I was wondering if it was possible to make custom enchantments or if I really had to use PersistentDataContainer?

vast ledge
#

You cant exactly "Make enchantments"

#

You have to add the lore, yourself

#

usualy, you can read the lore, to confirm what enchants the item has

still ridge
#

ok and to store the enchant I need to use PDC

#

How I can remove the italic text effect on the lore ?

clear elm
#

how can i pin a line in inteliJ ultimate?

blazing ocean
#

bookmarks

clear elm
vast ledge
tardy delta
#

searching for files can be time consuming
heh? crtl-n?

ocean hollow
#

Why can't this code teleport?

tardy delta
#

where are you calling that

ocean hollow
tardy delta
#

uh not sure

warm mica
#

Is the location printed as intended? Maybe a plugin is blocking the teleportation

warm mica
ocean hollow
#

i checked player, and it's not null

warm mica
#

My bets are that some plugin is blocking PlayerTeleportEvent if the console is clear

ocean hollow
#

wth, I tried it via tp and it works.

#

player.performCommand("execute in minecraft:overworld run tp @s " + sL.getX() + " " + sL.getY() + " " + sL.getZ() + " " + sL.getYaw() + " " + sL.getPitch()); like

#

but this option doesn’t suit me, how can I do it through Player#teleport?

sullen marlin
#

Seems like world is the issue then?

ocean hollow
#

the names of the worlds are the same.

warm mica
#

Listen to PlayerTeleportEvent with MONITOR priority and check whether it is cancelled

proper cosmos
#

Guys, In PlayerDeathEvent#getPlayer() returns player that died, and PlayerDeathEvent#getEntity()returns entity that killed player?

rapid vigil
proper cosmos
warm mica
ocean hollow
#

no

rapid vigil
proper cosmos
rapid vigil
#

yw

warm mica
# ocean hollow it doesn't output anything.

That is weird then. #teleport only returns false if:

  • You are dead / don't exist anymore
  • You have no connection (NPC)
  • You are inside a vehicle
  • The PlayerTeleportEvent got cancelled
echo basalt
#

ignoreCancelled ?

summer gale
warm mica
echo basalt
#

java 8 for 1.15.2

#

hm

summer gale
#

ya

ocean hollow
summer gale
#

still same problem after updating. The gui one gives the same error on startup

warm mica
summer gale
warm mica
#

Although I am not very sure how well that works with vanilla commands

warm mica
summer gale
#

those don't work for 1.15.2

warm mica
#

1.15.2 is a very odd version to use, why specifically that one? If you still want to use it, copy and google the second line of the error message

warm mica
summer gale
oak mica
cinder abyss
#

Hello, I want to place buttons on the ground, how can I rotate them in different direction, while still being on the ground?
They are actually like that:

ocean hollow
cinder abyss
#

(I'm using Switch for BlockData)

echo basalt
#

Fun thing

#

display entities can be rotated with yaw and pitch

#

on top of their rotation matrixes

cinder abyss
#

yeah

#

but

blazing ocean
#

because the rotation is a pain to figure out without axiom

cinder abyss
trail coral
#

what would i use reflection for?

cinder abyss
trail coral
#

why would i need that tho

cinder abyss
#

adding mob, editing AI, adding biomes...

trail coral
#

oh alr thanks

summer gale
#

Could someone help please

summer gale
icy beacon
# trail coral what would i use reflection for?

You aren't limited to just NMS with reflection. You can call methods by just their name and the class' name, or you can get/set variable values just by their name, even when they're private, etc. Reflection is a compile-time unsafe coding tool

#

I personally use it to parse my locale files. I go through every message key and match it to a variable name in my Messages class

ocean hollow
trail coral
ocean hollow
#

so it doesn’t matter whether through or without them - the same thing.

warm mica
summer gale
lost matrix
ocean hollow
#

upon receiving a message from velocity, teleport the player to the point that was received. I get the correct location and the player is normal. But for some reason Player#teleport does not work

ocean hollow
lost matrix
ocean hollow
#

It only works through vanilla /tp, but not through mine. The problem is in Player.teleport()

summer gale
#

Hollup

#

Java 22?

#

when did this happen

lost matrix
lost matrix
ocean hollow
#

?paste

undone axleBOT
lilac dagger
ocean hollow
#

ServerLocation is not null, and has valid data. Player is not null, because I don't get NullPointerException

#

and the player is definitely not dead, and not on the entity

ocean hollow
lost matrix
echo basalt
#

sounds like a paper method

lost matrix
# ocean hollow

The only thing that comes to mind if this doesnt work is someone cancelling the teleport event

ocean hollow
summer gale
#

Just asking, where is the ServerLocation class from?

lost matrix
ocean hollow
#

and it outputs nothing

lost matrix
#

So you are telling me that you call Player#teleport(Location), and there is no exception, nothing is happening on the server and the event isnt fired?

#

When are you sending the message from velocity to the server?

ocean hollow
#

Yes, a debug message appears in the logs, but Player.teleport() will return false if checked

#

after the player has fully logged in. ServerPostConnectEvent

lost matrix
undone axleBOT
lost matrix
#

So... the player isnt even properly spawned on the server yet.

#

sigh

ocean hollow
#

the only event after which at least a message is sent

#

I tried it through ServerConnectedEvent, and it still doesn't work

oak mica
ocean hollow
lost matrix
ocean hollow
#

I was told that I cannot send a message if there are no players on the server, so I first throw the player there, and then send teleport messages.

lost matrix
#

Is this for a public project?

ocean hollow
#

only for my server

lost matrix
#

Why do you need the proxy to tell the mc servers where to spawn a player?

ocean hollow
#

I have two separate servers and need to create a way to move between them. For example /home, /tp, /warp, ...

#

For example, spawn is in Locations, and survival is in Kingdoms. and I need /spawn

#

if there was Player.teleport in velocity it would be easy, but otherwise I have to worry about messages

lost matrix
#

Ok, i personally would just use Redis for this because communication through the proxy sucks big time.
But you need to send the message from your proxy to the server before the player spawns but after he is connected.
Then listen for the PlayerSpawnLocationEvent and set the location there. Dont call player.teleport() for this.

thorny radish
#

Does anyone know how to create an NPC when you right click the NPC it will open a gui, with a bunch of multiple quests, like "deliver 30 stone blocks" "deliver 8 diamonds" etc when you're done with all of them you can rankup

#

with bossshop plugin maybe? if its possible

smoky anchor
ocean hollow
lost matrix
# ocean hollow I was told about using Redis, RabbitMQ, but I have no idea how to work with it. ...

Doesnt matter what you use Redis with. Its the same for any java application.
Create one Redis client for your application when it starts:

RedissonClient redisson = Redisson.create(config);

Subscribe to a certain topic on one application:

// Get the topic
RTopic topic = redisson.getTopic("teleports");
// Register a listener on that topic
topic.addListener(String.class, new MessageListener<SomeObject>() {
    @Override
    public void onMessage(String channel, String message) {
        //...
    }
});

Send messages to the topic from another application. Everyone listening on this topic will receive the message:

// Get the topic
RTopic topic = redisson.getTopic("teleports");
// Send a message to the topic
topic.publish("Hey there. Everyone gets this.");

Its literally like this for any java application. Doesnt matter if its a web server, Velocity or Minecraft.

cinder abyss
#

Hello, how can I do a BlockPopulator before tree generation?

lost matrix
cinder abyss
#

It'll be much faster

lost matrix
cinder abyss
#

well, let's do that

#

I might ask for more help later with optimization btw

lost matrix
ocean hollow
#

Velocity doesn't seem to have a regular driver for MySQL

lost matrix
#

Velocity doesnt need to interact with your DB for that

ocean hollow
#

like, create command in bukkit plugin, and everything else through velocity, and then back?

ocean hollow
lost matrix
#

This is all really convoluted. You might also just shade a sql driver in your velocity plugin.

ocean hollow
#

And to use Redis, do I also need to host it, just like hosting a database?

proper cosmos
#

Guys, I need help. Is there any way to retrieve Potion's duration from ItemStack? All I got so far is getting PotionMeta but this doesn't give any way to retrieve duration. I've tried potionMeta.getCustomEffects() but this is just empty

river oracle
#

That means it has no custom effects use get the potion type

#

You'll need to manually do getPotionEffects on that and grab the duration

lost matrix
oak mica
proper cosmos
#

Oh, I've must missed that. Thanks guys ❤️

orchid iron
#

i have a feature that places a 3x3 area of farmland and crops on top whenever a player places a farmland block.
It works fine but i have different unlockable crops and a few of them are corals: Whenever a player places farmland the corals on top will spawn but the center one will break instantly. Does anyone know how i can fix that? I can send a video via dm if you want

astral pilot
#

yo does Server#addRecipe() conflicts with other plugins?

#

because for some reason my plugin's custom crafting recipe wont work if there's another plugin that also uses Server#addRecipe()

young knoll
#

As long as your recipe has a unique key it should be fine

astral pilot
#

whenever there's another plugin that is using that method

cinder abyss
lost matrix
cinder abyss
#

Hello, is block PDC (by mfnalex) available on world population (with BlockPopulator)?

eternal oxide
#

no as it uses the chunk not a LimitedRegion

cinder abyss
eternal oxide
#

you can;t use teh Chunk before it's populated

cinder abyss
#

then I'll revert what I want to do

lost matrix
#

What are you trying to do?

#

Why do you need a persistent medium while generating anyways?

cinder abyss
#

so I'll invert that, and make the button without PDC and the buttons placed by players have a PDC

#

but, for compatiblity...

#

so, any idea?

lost matrix
#

Invert it or store the block in memory and only use the PDC when a chunk is (un)loaded

dawn flower
#

does this give support for skript addon development or spigot only

dawn flower
#

goddamn it

lost matrix
#

This is what you get when asking for skript support

dawn flower
#

not skript support, skript addon development support

glad prawn
#

the same

lost matrix
dawn flower
#

skript addon development = spigot

#

🧠

glad prawn
#

brain atrophy

#

💀

tardy delta
#

get the hell out of ere

still ridge
#

How i can add the enchant glowing effect on a item without necessarily enchanting ? (1.20)

grim hound
#

I'm kinda confused at the java.lang.reflect.Proxy class

grim hound
#

but it ain't that simple

slender elbow
#

it just creates an instance on a set of interfaces and it delegates to you the method calls, that's all

lost matrix
slender elbow
#

or by waiting until 1.20.5 comes out

dawn flower
#

or adding a null enchant

dawn flower
slender elbow
#

or by setting the enchants list in nbt to an empty list

grim hound
lost matrix
dawn flower
slender elbow
#

by reading mojangs changelogs?

#

they publish one with every snapshot/pre/rc/release

dawn flower
#

im reading em rn

slender elbow
#

or in the Minecraft wiki for 1.20.5,

dawn flower
#

there isnt anything abt glints

lost matrix
grim hound
slender elbow
dawn flower
#

mojang needs to add a way to remove this

#

looks shit

still ridge
slender elbow
remote swallow
dawn flower
#

what the fuck is a vault

slender elbow
remote swallow
#

iirc

slender elbow
#

F3 H or whatever

#

it doesn't show by default

dawn flower
grim hound
dawn flower
#

u can hide unbreakable yet there's still an itemflag

slender elbow
#

?

grim hound
#

but it'd enlarge my plugin quiet a bit

slender elbow
dawn flower
#

1.20.5 does everything i ever needed in life

#

when is 1.20.5 releasing

remote swallow
#

this week

grim hound
#

variable

dawn flower
slender elbow
#

Proxy is only useful for interfaces, you'd have to replace a field somewhere