#help-development

1 messages Β· Page 771 of 1

orchid gazelle
#

So thats bad for modding

dry hazel
#

minestom is written in java lol

lost matrix
orchid gazelle
#

Wait what really?!

slender elbow
#

lmao

orchid gazelle
#

I thought that was a C++ rewrite lol

lost matrix
#

You can just write plugins in java for this

orchid gazelle
#

But it does not support bukkit plugins

echo basalt
#

what if

#

minestombukkit

orchid gazelle
#

That won't really work

#

Bc multithreading

#

They cannot support bukkit plugins

echo basalt
#

just make it all thread safe

#

:p

#

same way folia can work its just a little hacky

orchid gazelle
#

Plz do it

#

Plz just go multithread entity ticking and commit to spigot

vocal cloud
#

Wait for the rust heads to finally finish their port

dry hazel
#

😴

lost matrix
#

I mean there are first attempts to regionize worlds to allow multithreading. Folia uses a system to check if
a group of chunks border on another group, and if not, they get their own tick loop.
But writing plugins for this is completely different than writing plugins for spigot.

orchid gazelle
#

Yeah

#

That's the issue

#

We need entity ticking only

echo basalt
#

p sure minestom doesnt work with plugins

orchid gazelle
#

And make it threadsafe

echo basalt
#

well

#

at work we kinda just shade it all

#

and have our own mega jar

orchid gazelle
#

Only way to get 1000 players up rn is Sharding

#

And that fucks plugin compat

dry hazel
#

folia has had around 1k players on a test on a single machine

orchid gazelle
#

Yeah but that fucks compat even more

slender elbow
#

"even more"

orchid gazelle
#

And another issue with sharding or folia is when all players are at one place

echo basalt
#

with sharded servers I wonder like

#

what if we had a proxy

#

that hid all the world transfering BS

#

so you could seemlessly transfer between servers as long as they all had the same worlds

orchid gazelle
#

Thats already how it is done?

#

MultiPaper

kind hatch
#

Anyone know how I can intercept the applyPatches stage of BuildTools with my own?

eternal night
#

what

peak depot
#

How can I receive messages from the messaging channel on bungeecord

eternal night
#

onPluginMessageReceived

cinder abyss
#

for triangulation

#

I'll try your code

kind hatch
# eternal night what

I'm trying to fix the issue of buildtools messing with the global git config and I need to find a way to use my own version of applyPatches instead of the one that's automatically downloaded.

eternal oxide
#

I believe thats mentioned in the contributing page

#

?contributing

river oracle
eternal oxide
#

?contribute

kind hatch
river oracle
#

ahh I see

kind hatch
#

I just don't know where I can have it use my version instead of the one that's automatically downloaded.

river oracle
#

does it autoreplace one if it already exists

kind hatch
#

Yes

river oracle
#

I mean we do have access to BT source no? maybe could do something inside of there since you already have it downloaded

kind hatch
#

Even when you run it directly after, any changes are overwritten.

#

My workaround for the time being is to

  1. Run once to build against the version I want.
  2. Unset all global git config values.
  3. Copy and paste changes into applyPatches.sh
  4. Set --dont-update
  5. Run again

Using --dont-update seems to not overwrite anything, but I had to disable some other things in buildtools to allow it to work with --rev.

#

I'm trying to figure out what md was talking about that one patch breaking against older versions, but I am not running into any such issue.

desert tinsel
#
 public ItemStack mapItem(BufferedImage image) {
        ItemStack i = new ItemStack(Material.MAP);
        MapView view = Bukkit.createMap(Bukkit.getWorlds().get(0));
        view.getRenderers().clear();
        view.addRenderer(new MapRenderer(image));
        i.setDurability((short) view.getId());
        return i;
    }``` does this work to get the itemstack of a custom map?
wet breach
kind hatch
#

Yes

#

It shouldn't

wet breach
#

it should be removed =/

river oracle
wet breach
#

so it is only confined to the repo

#

the only downside is that it would need to be set two times though

kind hatch
#

It does do an --includes check, but like you said, it should just be done on the repo level.

wet breach
#

the reason for being set two times is because buildtools does 2 cloning

kind hatch
#

No? It does two checks for name and email.

#

I have commented that out in my test build btw.

wet breach
river oracle
wet breach
#

cloning I don't think automatically transfers over the author/committer settings

#

so you would need to set it for those repos

kind hatch
#

Ye

#

That should be possible during the applyPatches stage.

wet breach
#

yes, but there is a cloning that happens before that as well as I said, so it would need to be set twice πŸ™‚

kind hatch
#

Adding these two lines seems to work.

wet breach
#

I could be wrong, but I generally don't use buildtools anyways

kind hatch
#

Cloning is all done before hand, then this script is applied on both directories.

wet breach
#

cloning happens twice

kind hatch
#

So setting the local config should work as expected.

wet breach
#

you can see where buildtools clones bukkit repo to spigot repo

#

so you have patches that happen with bukkit and cb

#

once those are done being built, it then clones bukkit and cb to spigot

#

and then applies spigot patches

umbral ridge
#

the cloning process happens twice in the context of using BuildTools. The initial cloning is done beforehand, and then the script is applied to both directories

quaint mantle
#

Hello, so I am trying to use modules for different versions (gradle) but the problem is that each module requires an instance from the main class, giving it wouldn't be a problem, the problem is how do I get the methods from those modules back to the main class so I can execute the different versions?

kind hatch
cinder abyss
#

Hello, when I trigger this on entity spawn, the speed effect isn't applied and protection on the armor isn't applied too:

public void modifiers(Zombie entity) {
        PotionEffect speed = new PotionEffect(PotionEffectType.SPEED, -1, 1);
        entity.addPotionEffect(speed);
        EntityEquipment equipment = entity.getEquipment();

        // Ajouter armure
        ItemStack helmet = Main.getHighestHelmet();
        ItemMeta hMeta = helmet.getItemMeta();
        ItemStack chesplate = Main.getHighestChestplate();
        ItemMeta cMeta = chesplate.getItemMeta();
        ItemStack leggings = Main.getHighestLeggings();
        ItemMeta lMeta = leggings.getItemMeta();
        ItemStack boots = Main.getHighestBoots();
        ItemMeta bMeta = boots.getItemMeta();
        ItemStack sword = Main.getHighestSword();
        ItemMeta sMeta = sword.getItemMeta();

        if(hMeta == null | cMeta == null | lMeta == null | bMeta == null | sMeta == null
        | equipment == null) return;

        hMeta.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, false);
        cMeta.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, false);
        lMeta.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, false);
        bMeta.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, false);
        sMeta.addEnchant(Enchantment.DAMAGE_ALL, 5, false);

        helmet.setItemMeta(hMeta);
        chesplate.setItemMeta(cMeta);
        leggings.setItemMeta(lMeta);
        boots.setItemMeta(bMeta);
        sword.setItemMeta(sMeta);

        equipment.setHelmet(helmet);
        equipment.setChestplate(chesplate);
        equipment.setLeggings(leggings);
        equipment.setBoots(boots);
        equipment.setItemInMainHand(sword);
    }```
tawdry echo
tawdry echo
#

And if you want get prot5 at armor you have to set boolen in ItemMeta.addEnchantment to true

tawdry echo
#

PotionEffect(PotionEffectType.SPEED, 20, 0) will be speed 1 for 1 second (20 ticks = 1 second) just look at docs

tawdry echo
#

What you want reach?

#

Speed for how long?

cinder abyss
tawdry echo
#

Spigot version?

cinder abyss
#

1.16.1

grand flint
cinder abyss
remote swallow
#

no

#

you cant get PotionEffect.INFINITE in a version it didnt exist it

#

infinite potions werent added still late 1.19 iirc

cinder abyss
#

then how can I get an infinite effect?

remote swallow
#

PotionEffect.INFINITE

cinder abyss
#

for 1.16.1...

remote swallow
#

you just said ur switching to 1.20.1, but for pre 1.19 you give it int max value and then check they still have the effect on death, join and world change

grand flint
dry hazel
#

that's the infinite duration value in newer apis

cinder abyss
#

okay thanks

grand flint
#

😰

quiet ice
#

Most useless cast ever

grand flint
#

is there any method that completely freezes the player

#

like from moving, breaking, placing

#

what is it

#

no

sullen marlin
#

cant you set move speed to 0

#

and dig strength to 0

grand flint
#

hi sexy

#

what about placing

sullen marlin
#

dunno about placing

grand flint
#

or moving inventory

#

hmm ill see

sullen marlin
#

adventure mode for placing

#

that would also handle breaking too

grand flint
#

oh ye

#

so a limbo

#

how r u gonna make the world white

#

then how can they

#

walk around infinitely

#

ok but u just said

#

ur gonna place white clay

#

around them

#

that wont render

#

just

#

make the person download a texture pack when they join

#

and that texture pack can include

#

the white effect for the server

#

but u can almost make a modded experience

#

with texture packs

#

it doesnt change textures

#

it just adds

#

texture

#

s

#

look ill show u something from my server

upper hazel
#

what the event were player drag item from his inventory to another

young knoll
#

click event

upper hazel
#

but how i can get old inventory and new

young knoll
#

They are both a part of the view

#

top and bottom

scenic onyx
#

because dont go in 1.18.2?

upper hazel
#

so this mean i have more then 54 slots??

scenic onyx
lost matrix
scenic onyx
lost matrix
lost matrix
scenic onyx
lost matrix
#

So, it returns a player that is behind you?

scenic onyx
lost matrix
#

That sounds very unlikely. Could you maybe show how you got those results?

scenic onyx
remote swallow
#

wait a minute

#

7smile is orange

remote swallow
#

wurst

scenic onyx
#

for test

scenic onyx
# scenic onyx

@lost matrix You see, the player I'm not seeing comes back to me

#

if i go in my localhost it go

lost matrix
#

Alright this doesnt sound like there is a problem with the code if it works on your localhost but not the remote server.

scenic onyx
#

not only

#

Also "com.github.retrooper.packetevents"

#

No, I'm seeing if through bukkit's raytrace it's looking at the player's hitboxes

#

I also created a modified version made by me obviously

#

?paste

undone axleBOT
scenic onyx
#

this is my raytrace

lost matrix
#

into that direction

scenic onyx
#

in localhost go very good

scenic onyx
lost matrix
#

No, i mean only because your screen shows that you look into a direction, doesnt mean that the server sees the same thing.
Im assuming that the wurst client actually aims at the player before hitting to prevent getting detected.

scenic onyx
scenic onyx
lost matrix
#

Well then its a problem with the server

scenic onyx
#

I'll show you the localhost

echo basalt
#

damn 7smile7 is a discord helper now

#

:(

scenic onyx
#

@lost matrix and @solar musk is very good

lost matrix
young knoll
#

Oh hey he do be orange

young knoll
scenic onyx
young knoll
#

Ah

scenic onyx
#

but in the server dont go

echo basalt
#

now wait for ping to become a problem

slender elbow
#

he got da facelift

young knoll
#

Yeah ping will be an issue

#

Also you could just mess with the movement packets

scenic onyx
#

You're making me wonder why I didn't create the other server

scenic onyx
young knoll
#

Why have you made your own bounding box class

#

Bukkit has one

scenic onyx
#

my friend have put purpur

#

fuck

#

i have killed he

alpine urchin
#

of spigot

#

but i dont have context to this discussion

#

tldr

river oracle
#

if you using that you need mental help

quiet ice
young knoll
#

I think we only got one batch of helpers at the start

#

And then we lost one

river oracle
#

I believe it is because imajin uhm exploded

subtle folio
#

oh god please no

river oracle
#

rather die

#

its okay though the amount of helpers we can have is full

ivory sleet
#

nothing is impossible altho helpers are more or less selected nowadays

river oracle
#

I wonder if you were normal at any point

sterile token
#

how many years?

river oracle
#

3 same number as me

sterile token
#

he joined 3y ago this discord?

river oracle
#

sept I think he joined on the first day of this discord

river oracle
sterile token
#

but sept 21?

river oracle
#

look at oldest message

#

04/01/2020

#

for CMarco

sterile token
#

lmao i joined this discord in 21 and i have just 43k messages

river oracle
#

I also went afk for 1 year

sterile token
#

righ me too, i i think active talk around 22

river oracle
#

we're so much alike!

#

we should all be friends

sterile token
#

agree too much with u y2k

quiet ice
#

Meanwhile I have "just" 25K messages on here - what are you doing?
But I guess most of my messages are generally helping random people on here and that isn't something I do often these days

river oracle
#

most of my messages are from talking about Inventory PR

robust helm
#
public abstract class Item {

    private final BattleBowl plugin;

    protected Item(BattleBowl plugin) {
        this.plugin = plugin;
    }

    public ItemStack create() {
        final var itemStack = getItemStack();
        final var im = itemStack.getItemMeta();
        im.getPersistentDataContainer().set(plugin.getItemManager().getIdentifierNamespace(), PersistentDataType.STRING, UUID.randomUUID().toString());
    }


    protected abstract ItemStack getItemStack();

    protected abstract void runAction(PlayerInteractEvent e, Player p);
}

Any better way to write this? Passing around the plugin instance just to get one namespace is kinda annoying. Maybe a Constants class?

quiet ice
#

JavaPlugin.getPlugin(BattleBowl.class)

echo basalt
#

nah you're fine with DI

#

You could however make the Item class a listener and self register

robust helm
#

ye im still working on it

#

thanks tho!

eternal night
#

before you run into this down the line, you need to setItemMeta after modifying the pdc

young knoll
#

I just use fromString all the time

#

I’m a rebel ik

orchid gazelle
#

any ideas on how to change the Interpolation of a DisplayEntity at the same tick when/before spawning it? Usually it just teleports if you try it by default

onyx fjord
#

im using gradle multi module project with shadowjar

i have a module depending on another module like so

implementation project(path: ":universal", configuration: "shadow")

said module shades a bunch of stuff and relocates it but i cannot use those at all

#

they dont appear in autocomplete or even when trying to search the package manually

#

everything works fine if i use the dependency from my maven local

#
implementation "com.github.kaspiandev.kommons:universal:1-SNAPSHOT"

it works like so

#

i followed this

ivory sleet
#

what is the issue?

#

u tryna include x modules in ur jar

#

?

remote swallow
#

if he even knows how to ban people judging at the fact he couldnt even create a discord server and setup perms

onyx fjord
ivory sleet
#

ohhh

onyx fjord
#

so basically the published behavior

#

but when using the project() thing

ivory sleet
#

alr

#

how does ur module look

onyx fjord
#

it acts as if entire lib was gone

ivory sleet
#

wait do u have the thing on gh

onyx fjord
#

rly outdated

ivory sleet
#

dw dw

#

just push w/e u got and we'll figure it out

onyx fjord
#

i can send you my poms

#

well

ivory sleet
#

poms?

onyx fjord
#

build.gradle files i mean

#

lol

young knoll
#

We got that new graven build tool

remote swallow
#

whos, what, where, when, why graven

onyx fjord
umbral ridge
#

hey what's the best way to add player nametags? packets? setDisplayName? I want to modify the text above player head to something like "[{group}] {player}"

#

Any famous ways to do this? xD

onyx fjord
umbral ridge
#

😒
scoreboard is persistent during reloads/restarts right?

young knoll
#

Doesn’t really matter

ivory sleet
#

you want A to be included in B's jar?

onyx fjord
#

correct

#

well it is included in the jar

#

but for whatever reason its (shaded) dependencies arent

ivory sleet
#

YEAH

onyx fjord
#

OR intellij has trouble finding them

ivory sleet
#

so u need to use java-library plugin instead

#

and then use api, instead of implementation in B

chrome beacon
onyx fjord
#

i see

#

ill try

#

after reloading i still see nothing in autocomplete

#
api project(path: ":universal", configuration: "shadow")

i changed the line like so and reloaded all modules

#

after googling generally this should be the solution

#

but it isnt working

ivory sleet
#

and if u remove it just have in A
implementation project(':submodule')

quaint mantle
#

Hey, I keep getting the error Cannot invoke "net.minecraft.server.network.CommonListenerCookie.b()" because "commonlistenercookie" is null, how can I fix it?

ivory sleet
#

and then in B you'd use
api('some:dependency:ver')

onyx fjord
#

i played around with it and its buggy

#

dependencies seem to shade twice lol

#

ill send the updated files tomorrow

ivory sleet
#

yea, also its usually nicer to work w kotlin dsl

#

better type hinting system etc

#

just pulling the kotlin card yk :>

onyx fjord
#

not a fan of it personally but if makes it work sure

#

πŸ™ hopefully it will work magically tomorrow

ivory sleet
#

πŸ™

tribal wraith
#
    public void test(PlayerInteractEvent event) {
        System.out.println("PlayerInteractEvent: " + event.isCancelled());
    }```
```[22:59:13 INFO]: PlayerInteractEvent: false```

Players can't consume any items, I know it's from my plugin but InteractEvent is enabled, ItemConsumeEvent isn't triggered because the player can't fully consume it, it's cancelled prior am I missing an event ?
rotund ravine
#

What other events does your plugin use?

tribal wraith
#

I checked every other cancelled event and none relate to this

rotund ravine
#

And it works fine if ur plugin is not present?

tribal wraith
#

Yes

#

What other event is triggered before consuming food ?

#

Interact is the only one I know of and it's not cancelled

rotund ravine
young knoll
#

Check if useItemInHand is set to deny

#

Interact event is special and kinda has 2 cancellation states

young knoll
#

cancelling interact event sets both to deny

#

But you can just set one to deny with isCancelled becoming true

tribal wraith
#
[23:09:03 INFO]: DEFAULT```
young knoll
#

Hmm that’s normal

tribal wraith
#

Looks like this is just on me to find I appreciate the help though

storm crystal
#

im thinking about a way to make damage numbers appear on screen near entity, so I came up with this idea: Id get a vector pointing from entity to player, get it's x and z value, multiply it by a small number such as 0.1, and then take random value out of it from 0x to 1x it's value, and then make the number appear on screen in green field, is that a good idea?

young knoll
#

Why not just take the vector from entity to player and multiply it by 0.1

#

And then stop there

storm crystal
#

yeah but I want to make it so that it would appear in random field that would be in front of player

#

not everytime in same place of player's line of sight

young knoll
#

Ah

#

Yeah seems fine

storm crystal
#

wait wouldnt u_x and z be always positive since they belong to vector u which is basically distance between them?

#

or can game tell it apart?

young knoll
#

Idk

#

You could get the vector between them, and then random rotate it slightly, and then multiple by 0.1

echo basalt
storm crystal
#

what does normalize mean?

echo basalt
#

divides by its length

#

basically sets the length to 1

young knoll
#

.normalize is a vector operation that does ^

peak depot
#

Hey, I got a bit stuck with PluginChannelMessaging What I try to do Is to have a Clan name set in the Scoreboard but the Clan System is in BungeeCord now I try to encode a List and Later decode it on Spigot but when ever I try to send a message through neither side recives one My Code for BungeeCord:
(Main) https://paste.md-5.net/uzenuhirih.cpp
(Message Event) https://paste.md-5.net/daroyegifa.js

On Spigot it is:
(Main) https://paste.md-5.net/ipehixorow.java
(Message Listener) https://paste.md-5.net/xojojimahu.js

storm crystal
#

I assume end - start is just this vector's length?

hallow lion
#

Is there a way to get generated chunks even if they are currently unloaded?
Only found a way to get currently loaded chunks.

young knoll
#

That would be a massive amount of chunks

peak depot
young knoll
#

Then that’s why

#

Pmc requires a player to be online

peak depot
#

so I need to basicly Request it on Player join event?

rotund ravine
#

You got mysql use that

hallow lion
young knoll
#

Uhh

#

Parse each region file and get the chunks from them

hallow lion
#

Without using region files, can't i just get all the chunks via looping them with getChunkAt?

peak depot
young knoll
#

You could

thin iris
#

mods or plugins

rotund ravine
young knoll
young knoll
#

Ah there’s an isChunkGenerated

#

So yes you could call that for every chunk in a world

#

Which is

rotund ravine
#

Insane

#

And dumb

#

Like insanely dumb

hallow lion
young knoll
#

14,062,500,000,000 chunks

hallow lion
#

assume a 10k x 10k radius

#

get all chunks within that radius

young knoll
#

Okay well that’s a bit more reasonable

rotund ravine
#

0-10000 with 16 fun fun

young knoll
#

Get the chunk coordinate for 10000 and loop from positive to negative that value

#

For both x and z

slender elbow
young knoll
#

?

slender elbow
#

'?'?

young knoll
#

The method is called isChunkGenerated

slender elbow
#

yes

#

which requires some information about the chunk to be loaded, but it requests the entire chunk so it will generate it if it isn't generated

young knoll
#

I’d have to look at the impl

slender elbow
#

unless you are running {unnameable fork}

peak depot
young knoll
#

Right shift 4

rotund ravine
slender elbow
#

you need to wait a bit after the join event to send plugin messages, they are registered a tad later

#

iirc there's an event for that

inner mulch
#

?paste

undone axleBOT
rotund ravine
#

?jd-s

undone axleBOT
warm mica
inner mulch
rotund ravine
rotund ravine
inner mulch
#

wait lemme show you

#

?paste

undone axleBOT
inner mulch
hallow lion
warm mica
rotund ravine
inner mulch
#

public YamlFileBuilder config;

inner mulch
#

yeah i instantiate the class in main class?

peak depot
rotund ravine
inner mulch
#

config is a class that extends from the abstract class?

peak depot
rotund ravine
young knoll
#

Does it call the abstracts classes constructor

rotund ravine
inner mulch
#

config extends yamlfilebuilder

rotund ravine
#

Ahh, i read the above wrong my bad.

peak depot
young knoll
#

Config doesn’t call the super constructor

rotund ravine
inner mulch
warm mica
rotund ravine
glad prawn
young knoll
#

Really?

glad prawn
#

yes

hybrid spoke
#

i always send messages via mysql

inner mulch
#

help me

young knoll
#

Huh

#

TIL

peak depot
slender elbow
rotund ravine
inner mulch
#

the class worked when it wasnt a abstract class

#

thats why im clueless

warm mica
rotund ravine
inner mulch
#

but how when the stuff in the class isnt even called?

rotund ravine
#

Did you debug that?

inner mulch
#

im sure because if i create the file on my own everything else in the class works

rotund ravine
#

Debug debug debug debug

peak depot
inner mulch
#

debug make me sad

rotund ravine
rotund ravine
#

After join

warm mica
rotund ravine
#

Are you using the messages properly my man

#

What was the simplified test you ran

slender elbow
#

lol

peak depot
rotund ravine
#

?paste

undone axleBOT
young knoll
#

Is this one of those fun times where paper fixes something important and doesn’t bother telling upstream

slender elbow
#

yeah I was about to ask lol

peak depot
rotund ravine
slender elbow
#

surprisingly not

rotund ravine
#

You are still at yourself

warm mica
young knoll
slender elbow
#

not really, it's more so because leaf decided to rewrite the entire chunk system and like that method was in the way

peak depot
rotund ravine
#

?nocode

undone axleBOT
#

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

rotund ravine
#

Ask again tomorrow

#

When ur on ur pc

tribal wraith
#

Wondering if anyone can give me some sage wisdom, I was here earlier and I have no leads

Interact event is blocked, and even when it's not cancelled it still won't trigger

Output

[01:00:21 INFO]: Normalfalse
[01:00:21 INFO]: Highestfalse
[01:00:21 INFO]: Monitorfalse
[01:00:21 INFO]: false
[01:00:21 INFO]: true

Code

@EventHandler(priority = EventPriority.HIGHEST)
    public void playerInteract(PlayerInteractEvent event) {
        System.out.println("Highest" + event.isCancelled());
        event.setCancelled(false);
    }

    @EventHandler(priority = EventPriority.MONITOR)
    public void playerInteract2(PlayerInteractEvent event) {
        System.out.println("Monitor" + event.isCancelled());
        System.out.println(event.isBlockInHand());
        System.out.println(event.hasItem());
        event.setCancelled(false);
    }

    @EventHandler
    public void playerInteract3(PlayerInteractEvent event) {
        System.out.println("Normal" + event.isCancelled());
        event.setCancelled(false);
    }

    @EventHandler(priority = EventPriority.LOWEST)
    public void playerInteract4(PlayerInteractEvent event) {
        System.out.println("Lowest" + event.isCancelled());
        event.setCancelled(false);
    }
wet breach
#

Its purely there to well monitor of course lol

tribal wraith
#

Yea it still won't trigger regardless

wet breach
#

It does trigger otherwise it wouldnt have printed

#

What it didnt do was cancel the event because its a monitor

tribal wraith
#

It's still not cancelled at highest priority

wet breach
#

No, you set it to false for cancelled

tribal wraith
#

I worded it wrong

#

It is cancelling even though I've set it to false at every priority

torn oyster
#

if i have a location with direction, how would i get the block next to it

#

is that a thing i can do

wet breach
#

In fact with what you showed in code none of them get set to cancelled

tribal wraith
#

I know that's what I want but it's cancelling my action ingame

wet breach
#

But your debug does show it was cancelled at lowest

#

Which makes sense

tribal wraith
#

Yes

wet breach
tribal wraith
#

I know I've been debugging for 3 hours to find the source, I disabled everything in my plugin and I can't find it

#

My only solution is to uncancel it, which I'm doing

#

Yet it's still cancelled

wet breach
#

Try listening on entityonteract

tribal wraith
#

Ok

wet breach
#

And see if somethin is swatting that

tribal wraith
#

I'm just consuming a golden apple though

torn oyster
wet breach
#

Playerinteract derives from that one

young knoll
#

No it doesn’t

wet breach
#

Playerinteract doesnt come from entity one?

young knoll
#

No

wet breach
#

Must been some other even i was thinking of then

tribal wraith
#

Coll impart with me sage wisdom what in monkey is going on

wet breach
#

Do you have any other plugins?

tribal wraith
#

When I remove this it works again

#

It's from my plugin, but I can't find the source

wet breach
#

Are you in creative?

tribal wraith
#

That's why I'm uncancelling yet it still is cancelled

#

No

umbral ridge
#

Do you have any other plugins installed

wet breach
#

Are you opped and have a permissions plugin?

tribal wraith
#

My plugin is causing it, when I remove my plugin it is working again

wet breach
#

Yeah we need to know if there is, there has to be. That event doesnt magically get messed with

tribal wraith
#

Yes

#

My plugin is causing it, when I remove my plugin it is working again

wet breach
#

Ok what plugins do you have?

umbral ridge
#

I never registered the same event multiple times with different priorities

#

I dont know how this works

#

what if you register one event only

#

with no priority at all

tribal wraith
#

I did

wet breach
tribal wraith
#

When I don't have XPrison:

  • Eating a golden apple works

When I have XPrison:

  • It doesn't. The source is from my plugin

I can't find why it's cancelled, so I'm uncancelling it. Which leads to my code above
The event is still cancelling even when it says it's not

wet breach
#

We still need to know what plugins you have

umbral ridge
#

So if you dont register the event at all everything works and if you register it without cancelling or anything, then it doesnt work?

tribal wraith
#

EssentialsX,Factions,helper,,Multiverse,spark,Vault,worldedit,worldguard,XPrison(The plugin)

umbral ridge
#

ah

wet breach
# umbral ridge ah

And of course they list very important plugins notorious of overriding things

umbral ridge
#

worldguard might be the thing

wet breach
#

Yep it typically listens on highest and lowest

tribal wraith
#

It's from my plugin, the event is not cancelled when it's not installed

#

Everything works without my plugin

umbral ridge
#

Maybe your classes are cached and are not updating??

#

I dont know

tribal wraith
#

They're updating from the log I showed

wet breach
#

Well i will let someone else help. I need to drive to work lol. I recommend testing without all those plugins

tribal wraith
#

They're all dependents

wet breach
#

You are not using the reload command are you?

tribal wraith
#

No

#

The issue is 100% deriving from my plugin. So I'm hackily uncancelling which still doesn't work

wet breach
tribal wraith
#

No, there is no other plugin interfering. I'm trying to drive this point

#

The apple consumption works when my plugin is gone

#

When I add my plugin, it is cancelling, so I'm uncancelling which is doing nothing

umbral ridge
tribal wraith
#

They're all dependents

wet breach
tribal wraith
#

Yes those don't give any info

#

I've used an EventDebugger, it claims it's cancelled like my debug states

#

But it's cancelling

umbral ridge
#

and therefore is preventing you from eating it

#

maybe you don't have permission, etc..

wet breach
tribal wraith
#

My point is that I know that and is why I've messed with every priority to undo the cancelling because I don't know where it comes from. It's a bad solution but that still doesn't work

#

I am in creative, opped, in no region, global region has no flags relevant to items

#

I tested in both gamemodes

kind hatch
#

Why creative?

umbral ridge
#

Then the coder of XPlugin is dumb and you should contact them xD

#

poor code bet

tribal wraith
#

Yes I am dumb

wet breach
#

Well priority is also not the only thing. Last plugin registered also gets final say

umbral ridge
#

Check your source code

tribal wraith
#

I have

#

I used GitHub to check for any interact event, can't find it. Which is why I'm doing this

#

It still doesn't work

wet breach
#

Anyways i guess it must be magic

tribal wraith
#

My plugin is last registered

umbral ridge
#

Can I see it

tribal wraith
#

No

wet breach
#

Off to work for me

umbral ridge
#

Then I can't help

tribal wraith
#

Ok thanks anyways I appreciate it

kind hatch
#

?nocode moment

undone axleBOT
#

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

tribal wraith
#

Thanks

umbral ridge
#

It's no biggie to send your code, we'll help you if you do

wet breach
#

And we most likely wont if you choose not to

tribal wraith
#

I can't release it

hazy parrot
#

i can really assure you noone here will steal your code and make profit out of it

tribal wraith
#

It's a client's plugin I can't release it

kind hatch
#

NDA is just about the only reason not to share it.

tribal wraith
#

It's basically NDA

kind hatch
#

So it's not actually NDA?

tribal wraith
#

I would get fired if I did

wet breach
#

But whatever

tribal wraith
#

Are there any other events that trigger from right-clicking a consumable?

kind hatch
#

Should just be the PlayerInteractEvent that gets fired.

umbral ridge
#

?jd-s

undone axleBOT
umbral ridge
#

This maybe

tribal wraith
#

That isn't triggered it's cancelled beforehand, already tested

wet breach
#

Which it shouldnt be

tribal wraith
#

I know

wet breach
#

Worldguard is probably doing it to you

#

Since it does mess with consuming items

tribal wraith
#

My plugin is last loaded and I showed the debug for the priority

wet breach
#

Which i said earlier

tribal wraith
#
[01:00:16 INFO]: [X-Prison] Loaded 2 ranks!
[01:00:16 INFO]: [X-Prison] Β§aX-Prison - Module Ranks loaded.
[01:00:16 INFO]: [X-Prison] Using Money currency for Prestiges.
[01:00:16 INFO]: [X-Prison] Loaded 3 prestiges!
[01:00:16 INFO]: [X-Prison] Β§aX-Prison - Module Prestiges loaded.
[01:00:16 INFO]: [X-Prison] Β§aX-Prison - Module Mines loaded.
[01:00:16 INFO]: [X-Prison] Β§aX-Prison - Module History loaded.
[01:00:16 INFO]: [PlaceholderAPI] Successfully registered expansion: xprison [1.12.11]
[01:00:16 INFO]: Server permissions file permissions.yml is empty, ignoring it
[01:00:17 INFO]: Done (6.685s)! For help, type "help" or "?"```
thin iris
wet breach
#

How about dumping what is registered to the listeners or start looking in the configs of these plugins

#

Essentials can mess with item consuming as well

echo basalt
#

isn't xprison that one prisoncore on mcmarket

wet breach
#

Have no idea

tribal wraith
#

It's a fork

echo basalt
#

I have it on git

tribal wraith
#

I dumped RegisteredListeners, I can't really do anything with it

wet breach
tribal wraith
#

I never confirmed that let me try I just automatically assumed it was XPrison

#

That's on me let me try

wet breach
#

It is the definitive way to see which plugin is or is not messing with an event

wet breach
echo basalt
#

technically it's a private git

#

dude just adds literally anyone to the org

#

it has like 5 pages of members

wet breach
#

Nice

umbral ridge
#

Ok so if getNewScoreboard isn't persistent through reloads/reboots then how am I supposed to create teams at all? Recreate them everytime on onEnable? Shouldn't main scoreboard be left untouched? is scoreboard the only way to modify the player names (above their head)?

tribal wraith
#
[01:35:51 INFO]: Normalfalse
[01:35:51 INFO]: Highestfalse
[01:35:51 INFO]: Highestfalse
[01:35:51 INFO]: Monitorfalse
[01:35:51 INFO]: false
[01:35:51 INFO]: true
[01:35:51 INFO]: X-Prison from Plugin
[01:35:51 INFO]: WorldEdit from Plugin
[01:35:51 INFO]: Multiverse-Core from Plugin
[01:35:51 INFO]: WorldGuard from Plugin
[01:35:51 INFO]: Factions from Plugin
[01:35:51 INFO]: Essentials from Plugin
[01:35:51 INFO]: X-Prison from Plugin
[01:35:51 INFO]: WorldGuard from Plugin
[01:35:51 INFO]: X-Prison from Plugin
[01:35:51 INFO]: X-Prison from Plugin
[01:35:51 INFO]: X-Prison from Plugin```
#

Can I find where from X-Prison the listener comes from?

#

Updated

    public void playerInteract(PlayerInteractEvent event) {
        System.out.println("Highest" + event.isCancelled());
        event.setCancelled(false);
    }

    @EventHandler(priority = EventPriority.HIGHEST)
    public void playerInteract2(PlayerInteractEvent event) {
        System.out.println("Highest" + event.isCancelled());
        event.setCancelled(false);
    }

    @EventHandler(priority = EventPriority.MONITOR)
    public void playerInteract3(PlayerInteractEvent event) {
        System.out.println("Monitor" + event.isCancelled());
        System.out.println(event.isBlockInHand());
        System.out.println(event.hasItem());
        event.setCancelled(false);

        for(RegisteredListener listener : event.getHandlers().getRegisteredListeners()) {
            System.out.println(listener.getPlugin().getName() + " from Plugin");
        }

    }

    @EventHandler
    public void playerInteract4(PlayerInteractEvent event) {
        System.out.println("Normal" + event.isCancelled());
        event.setCancelled(false);
    }

    @EventHandler(priority = EventPriority.LOWEST)
    public void playerInteract5(PlayerInteractEvent event) {
        System.out.println("Lowest" + event.isCancelled());
        event.setCancelled(false);
    }

    @EventHandler
    public void voidodiaod(PlayerItemConsumeEvent event) {
        System.out.println("Consumption : " + event.isCancelled());
    }```
echo basalt
#

you can make something really hacky

#

which is like

#

extend the event and print the stacktrace whenever setCancelled is set

#

then cancel the original event and call this modified one

#

check to prevent recursion

#

bim bim bam bam

tribal wraith
#

My entire point from this is that something externally was cancelling it, so I wanted to uncancel which still didn't work

#

So not really an option

umbral ridge
#

If you know that XPrison is the cause, then look at its source code and go through the registered listeners

tribal wraith
#

I have

#

Everything is gone

umbral ridge
#

Did you reexport the plugin to the server?

tribal wraith
#

Yea

umbral ridge
#

and restarted

tribal wraith
#

Yea

umbral ridge
#

Then I dont know grinch came early and its messing with your server xD

tribal wraith
#

That's what I'm saying

#

So stumped

#

There's no way to find out the class of a RegisteredListener ?

umbral ridge
#

You could try one more thing

#

Make sure XPrison loads after your listeners test plugin

tribal wraith
#

It is it's the last loaded

umbral ridge
#

or not? idk if it has an effect.. eh

tribal wraith
#

Does anyone else have any ideas

echo basalt
#

you cna

#

RegisteredListener is just a wrapper iirc

#

RegisteredListener#getListener

tribal wraith
#

What do I do with that

#

I've tried printing the class name of that but it's just RegisteredListener

finite radish
#

Hello, so I am trying to create a fake player for 1.20.2 and I am at the point of creating an empty network manager, but even though I gave it an empty channel, I keep getting this: java.lang.NullPointerException: Cannot invoke "net.minecraft.network.EnumProtocol$a.a()" because the return value of "io.netty.util.Attribute.get()" is null does anyone maybe know a possible fix for it? Or has something changed between the way channels are used from 1.20.1 and 1.20.2?

storm crystal
#

is this way of doing it a good habit?

echo basalt
#

weird nms icky thing but yes that's perfectly fine

storm crystal
#

I havent really done it at all

#

I usually check if something that I grab is instance of what I need specifically

#

like entity is instance of livingentity

rotund ravine
tribal wraith
#

I used that

echo basalt
#

com.esotericsoftware

#

isn't that exerosis?

tribal wraith
#
[01:58:04 INFO]: EssentialsPlayerListener
[01:58:04 INFO]: MVPortalListener
[01:58:04 INFO]: EventAbstractionListener
[01:58:04 INFO]: WorldGuardPlayerListener
[01:58:04 INFO]: PlayerInteractListener```
These are the events, mine is registered last and uncancelling won't do anything
rotund ravine
#

What are you trying to do

tribal wraith
#

Uncancel an event when it's cancelled, yet it's still cancelled

rotund ravine
#

Why are you cancelling it

rotund ravine
#

Next to in which way

torn oyster
#

left/right

#

relative left/right

#

so that'd use the direction its facing

rotund ravine
#

?jd-s

undone axleBOT
torn oyster
#

???

#

that does not help at all

#

what am i meant to be looking for

rotund ravine
#

I was using it, wasn’t for you

#

Or here

rotund ravine
tribal wraith
#

I don't know where it's cancelled, that's my issue

#

So I'm trying to undo it in a hacky solution

#

But that doesn't work either

rotund ravine
#

Did you try to use the plugin i sent you?

tribal wraith
#

Yea

rotund ravine
#

Did u turn listentoallcancellable to true?

echo basalt
#

ignoreCancelled to false

rotund ravine
#

It’s like that by default is it not

echo basalt
#

dont think so

rotund ravine
#

And won’t really do anything

tribal wraith
#
[02:11:49 INFO]: WorldEditListener @ NORMAL
[02:11:49 INFO]: EssentialsPlayerListener @ NORMAL
[02:11:49 INFO]: MVPortalListener @ NORMAL
[02:11:49 INFO]: EventAbstractionListener @ NORMAL
[02:11:49 INFO]: WorldGuardPlayerListener @ HIGH
[02:11:49 INFO]: PlayerInteractListener @ HIGHEST
[02:11:49 INFO]: DEFAULT Item
[02:11:49 INFO]: false```
#

My output, it's cancelled, I revert it, it's no longer cancelled but it cancels in game

#

Is there no other event from right-clicking an item?

rotund ravine
#

Did you try to set listentoallcancellable to true

#

In

#

That plugin?

tribal wraith
#

What does that mean

rotund ravine
#

Cause that would tell you if another event is cancelled

#

It’s a config optiln

#

In the plugin

tribal wraith
#

Yea it said it wasn't cancelled

rotund ravine
#

Was that set to true

tribal wraith
#

Yes, nothing is output

rotund ravine
#

You sure? Cause even your changes would output smth

tribal wraith
#

I'm sure

#
  listen-to-all-cancellable: true # Off by default since this might provide too much information for simple tasks
  cancellable-namespaces:
    - "org.bukkit" # Contains all default events, got a plugin with events? Add their namespace.
  ignore-cancellable: # This will only work if above is set to true
    - "org.bukkit.event.player.AsyncPlayerChatEvent" # Example
    - "org.bukkit.event.player.PlayerInteractEvent" # Example
    - "org.bukkit.event.entity.EntityPickupItemEvent" # Example
exact:
  InteractEvent:
    class: "org.bukkit.event.player.PlayerInteractEvent"
    methods:
      - "isCancelled"
storm crystal
#

Is there any guide to custom animated objects made out of armor stands?

rotund ravine
#

latest.log after that please

tribal wraith
#

Sorry Jan it didn't load here's the output

[02:18:04 INFO]: WorldEditListener @ NORMAL
[02:18:04 INFO]: MVPortalListener @ NORMAL
[02:18:04 INFO]: EventAbstractionListener @ NORMAL
[02:18:04 INFO]: EssentialsPlayerListener @ NORMAL
[02:18:04 INFO]: WorldGuardPlayerListener @ HIGH
[02:18:04 INFO]: PlayerInteractListener @ HIGHEST
[02:18:04 INFO]: DEFAULT Item
[02:18:04 INFO]: false
[02:18:04 INFO]: [EventDebugger] EventDebugger START
[02:18:04 INFO]: [EventDebugger] -> Change in event 'PlayerInteractEvent'
[02:18:04 INFO]: [EventDebugger] -> Classpath for listener 'dev.drawethree.xprison.gap.PlayerInteractListener'
[02:18:04 INFO]: [EventDebugger] -> Caused by 'X-Prison'
[02:18:04 INFO]: [EventDebugger] -> 'isCancelled' changed from 'true' to 'false'
[02:18:04 INFO]: [EventDebugger] EventDebugger END```
#

Still cancelled

rotund ravine
#

And what changed it to true?

tribal wraith
#

I don't know

rotund ravine
#

It should say

tribal wraith
#

It didn't

rotund ravine
tribal wraith
#

From the log the only listener is the one I'm using to see other listeners

#
    public void playerInteract3(PlayerInteractEvent event) {
        System.out.println(event.isCancelled() + " isCancelled()");
        event.setCancelled(false);
        /**System.out.println("Monitor" + event.isCancelled());
        System.out.println(event.isBlockInHand());
        System.out.println(event.hasItem());
        event.setCancelled(false);*/

        for(RegisteredListener listener : event.getHandlers().getRegisteredListeners()) {
            System.out.println(listener.getListener().getClass().getSimpleName() + " @ " + listener.getPriority() + "");

        }

        System.out.println(event.useItemInHand() + " Item");
        System.out.println(event.isCancelled());

    }```
#

Same priority & everything

#

I tried adding setCancelled in the config just like isCancelled but it errored out

#

Any ideas @rotund ravine ?

rotund ravine
#

That’s interesting

tribal wraith
#

Am I out of luck

rotund ravine
#

I was linked this a while ago

tribal wraith
#

Your debugger works nothing else exists

rotund ravine
#

?jd-s

undone axleBOT
rotund ravine
#

@tribal wraith what’s the useItemInHand result set to?

tribal wraith
#
        System.out.println(event.isCancelled());```
In the method
#

It's a boolean to see if it's disabled from an item, it's not from the debug
[02:18:51] [Server thread/INFO]: DEFAULT Item

rotund ravine
#

You’re certain it’s your plugin yes?

#

If so how do you register your listeners

tribal wraith
#

I don't know what's disabling it originally, I just want to uncancel it

#

But it won't uncancel it

rotund ravine
#

I would just comment out a line at a time until it works

tribal wraith
#

I did

rotund ravine
#

At listeners?

tribal wraith
#

There's no other interact listeners other than the debug listener

#

I sent the debug listener

rotund ravine
#

Well there is probably other events πŸ€·πŸ½β€β™‚οΈ Comment those out too

tribal wraith
#

Other events can't affect a different event type

rotund ravine
#

What else do you have to loose πŸ€·πŸ½β€β™‚οΈ

tribal wraith
#

About 6 hours

#

Plugin's too big

#

Thx for the help I appreciate it

rotund ravine
#

?1.8.8

#

Let’s blame the mc version

#

Would love to see a screen recording of the issue @tribal wraith

tribal wraith
#

Ok

#

Sending to you

#

Sent

remote swallow
#

Check worldguard flags

echo basalt
#

@tribal wraith this related?

tribal wraith
#

That is it

quaint mantle
#

yo

#

any devs

tribal wraith
#

Bingo

river oracle
rotund ravine
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!

rotund ravine
#

But

#

?services

undone axleBOT
warm light
#

many plugin add there custom items. so it can be obtain by /give <P> <PluginName:ItemName>
how can I make this?

#

I checked google. but didn't found any solution

#

also I forgot the plugin name so can't check its src

wet breach
torn oyster
#
spawnArea = new BoundingBox(getNpcLocation().x(), getNpcLocation().y(), getNpcLocation().z(),
                getNpcLocation().x(), getNpcLocation().y(), getNpcLocation().z());
        Vector direction = getNpcLocation().getDirection();
        spawnArea.expand(direction, 10);
        direction.rotateAroundZ(90);
        spawnArea.expand(direction, 5);
        direction.rotateAroundZ(-180);
        spawnArea.expand(direction, 5);
        spawnArea.expand(0, -2, 0, 0, 4, 0);

        System.out.println(spawnArea.getMax());
        System.out.println(spawnArea.getMin());```
#

it does not put it in the right place

#

no clue what im doing

#

but im trying to make a bounding box around a point

#

and it faces a direction from a location's yaw

#

that is an amazingly drawn diagram

upper hazel
#

can i save some data in block

#

is this possible?

rotund ravine
#

?blockpdc

undone axleBOT
rotund ravine
#

For tilentities sure

#

But a wellknown trick is to use the chunk pdc and save data that way

upper hazel
#

this not bukkit api?

rotund ravine
#

It is

#

Unless ur on some ancient version

rotund ravine
torn oyster
upper hazel
rotund ravine
#

Oh

#

He just packaged the methods to do stuff

upper hazel
#

this is an api from bukkit

#

or no

rotund ravine
#

It is based solely on bukkit/spigot yes.

#

He has just provided a library to interact more easily in the way you are trying to

upper hazel
#

oh ok

torn oyster
#

jantuck do you know how to help with my issue

rotund ravine
upper hazel
#

I just meant that he uses complex systems for storing data in blocks

rotund ravine
rotund ravine
slate mortar
#

who pinged me in here...

rotund ravine
torn oyster
slate mortar
#

or else.

oblique crag
#

I'm using the donation-alert-api from GitHub for development. This API receives donation alerts from Twip and Toonation.
tonation and twip are Korean Twitch sponsored platforms.
I've confirmed the correct key integration via a Minecraft command. However, donation test subscriptions aren't working. The system console prints messages, but the Minecraft code is similar.

Here's the code:

import org.bukkit.Bukkit;
import com.outstandingboy.donationalert.platform.Toonation;
import com.outstandingboy.donationalert.entity.Donation;

public class DonationAlertManager {
    private Toonation toonation;
    public DonationAlertManager() { setupToonation(); }
    private void setupToonation() {
        try {
            toonation = new Toonation("xxxxx");
            toonation.subscribeMessage(s -> System.out.println(s));
            toonation.subscribeDonation(donation -> {
                System.out.println("[Toonation] " + donation.getNickName() + " donated " + donation.getAmount() + " won. Message: " + donation.getComment());
            });
        } catch (Exception e) { e.printStackTrace(); }
    }
}```
Is there an issue with my code? Correct key integration works, but not the subscription. I'm new to Java.
torn oyster
#

would it be viable to change a player's gamemode based on whether or not they are looking at a player-placed block? (survival if they are, adventure if they are not)

torn oyster
#

i know you can cancel the block break event

quaint mantle
torn oyster
quaint mantle
torn oyster
#

i just want to know if the adventure mode thing is possible

torn oyster
#

i already cancel event

olive vault
#

itemstack to block?

rotund ravine
#

Place it

olive vault
#

no other way?

rotund ravine
#

What do you need a block for

olive vault
#

like Block.fromItemStack, something like that

#

an api

#

it requires a block

rotund ravine
#

Why

#

Blocks are present in the world.

olive vault
#

mfnalex made it

rotund ravine
#

Link

olive vault
#

PersistentDataContainer customBlockData = new CustomBlockData(block, plugin);

rotund ravine
#

It’s to save data to a block

olive vault
#

yes ik

rotund ravine
#

It needs to be in the world

olive vault
#

oh really?

#

alr

#

thanks

smoky anchor
#

You can use PDC on itemStacks easily
get meta and then pdc..

rotund ravine
#

Yep

olive vault
#

how can I compare the itemstack before its placed

rotund ravine
#

?xyproblem

#

?xy

undone axleBOT
olive vault
#

well I'm making a keycard plugin

#

I need the doors to be for different levels

#

and have the same persistant data as the keycard

#

so how can I compare the itemstack before the door is placed

smoky anchor
#

I do not believe this explains the "compare the itemstack before the door is placed"
Seems like 2 different things to me.

olive vault
#

wdym

smoky anchor
#

I do not get why you need to compare some itemstack before the door is placed for this plugin.
What itemstack, what data does it hold.

olive vault
#

the itemstack will hold the data of what type of keycard door it will be

#

so I can transfer it with mfnalexes cool api

smoky anchor
#

So.. no comparation needed then, just copying data

olive vault
#

yes

#

ig

smoky anchor
#

Then just copy the data from the itemstack to the block ?
Idk, I'm probably not the best person for this lol. woke up 30 minutes ago

oblique crag
#

This is a Korean Twitch donation API. Connection works, but I can't subscribe to messages or donations. Any ideas why?

wind veldt
oblique crag
wind veldt
#

Try the solutions they provide

meager wolf
sullen marlin
#

By changing your skin

inland apex
#

I'm trying to use:

        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.20.1-R0.1-SNAPSHOT</version>
            <classifier>remapped-mojang</classifier>
            <scope>provided</scope>
        </dependency>

but i keep getting an error of:

org.spigotmc:spigot:jar:remapped-mojang:1.20.1-R0.1-SNAPSHOT was not found in https://oss.sonatype.org/content/groups/public/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of sonatype has elapsed or updates are forced
tranquil beacon
#

If you need to access NMS classes from inside your Spigot plugin, it is a very good idea to use the so called Mojang mappings. Disclaimer: This post is obviously written for 1.18.2. If you use another version, you of course have to replace every occurance of β€œ1.18.2” with the version you actually use. What...

lost matrix
wet breach
inland apex
icy beacon
#

Deserved

lost matrix
tranquil beacon
#

?bt

undone axleBOT
onyx fjord
inland apex
tranquil beacon
#
java -jar BuildTools.jar --rev 1.20.1 --remapped
inland apex
#

when i remove the net md5 thing then it works but

grim hound
inland apex
#

idk how to fix it

tranquil beacon
#

show pom

smoky anchor
icy beacon
#

He's always helpful and kind so he is definitely a helper haha

grim hound
#

then I could use some help

#

I'm sending a PacketPlayOutWindowItems but the player seems to not care about it

#

does the list have to be full (like my_item, air, air, air)?

#

because for now I only do: (my_item)

icy beacon
#

Wait

#

How long has Coll been a helper

grim hound
#

dunno

tranquil beacon
# lost matrix <:PES2_BlushCoffee:838743169473839188>

oh wow, congratulations on becoming a helper. You really deserved it. Even though we haven't talked much here, I've always noticed that you provide detailed replies to others about what to do or improve, and I was actually surprised that you didn't have the helper role yet steamhappywobble

icy beacon
#

I think not long

young knoll
#

Who’s coll

grim hound
#

the big guy just probably woke up one day and made many ppl helpers

icy beacon
#

Congrats to that dude though

young knoll
#

Thanks

icy beacon
#

He definitely deserves a helper

young knoll
#

MD contacted me and smile a few days ago

icy beacon
#

You guys chose trick on trick-or-treat it seems

tranquil beacon
# young knoll Who’s coll

congratulations to you as well for becoming a helper. Same as with 7smile7, I always saw you active and helping others. Well done! poggertrain

worldly ingot
#

We figured it was only fair to turn them into unpaid workers like us PES2_EvilGrin

tranquil beacon
slender elbow
#

orage

spare hazel
#
public class ItemManager {
    public static HashMap<Integer, CustomItem> items = new HashMap<>();
    
    public boolean register(CustomItem item){
        if(items.get(item.getId()) != null) return false;
        items.put(item.getId(), item);
        return true;
    }
    
    public boolean unRegister(int id){
        if(items.get(id) == null) return false;
        items.remove(id);
        return true;
    }
}

any way i can make this code better?

glad prawn
#

static Map πŸ€”?

quaint mantle
#

Instead of

public static HashMap<Integer, CustomItem> items = new HashMap<>();

do:

private HashMap<Integer, CustomItem> items = new HashMap<>();
// Getter etc
spare hazel
glad prawn
#

so why not all other method static either

smoky anchor
#

Accessing a static variable with non static methods like this is kinda yikes

quaint mantle
#

Static abuse

#

😭

icy beacon
#

And use dependency injection

#

?di

undone axleBOT
quaint mantle
#

Why you need entire class if you just use map instead?

spare hazel
spare hazel
spare hazel
desert tinsel
#
private ItemStack createCustomMap(BufferedImage image) {
        MapView mapView = Bukkit.createMap(Bukkit.getWorlds().get(0));
        mapView.setScale(MapView.Scale.NORMAL);
        mapView.addRenderer(new MapRenderer() {
            @Override
            public void render(MapView map, MapCanvas canvas, Player player) {
                canvas.drawText(0, 0, new MapFont(), "pula sa imi bag");
            }
        });

        ItemStack mapItem = new ItemStack(Material.FILLED_MAP, 1);
        mapItem.setDurability((short) mapView.getId());
        return mapItem;
    }``` I tried this to get a custom map as itemstack, but it does not work, why?
icy beacon
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

desert tinsel
#

I expect getting an itemstack with a filled map with that text

#

I expected it with an image, but now I'm lowering my expectations πŸ™‚

#

I mean, how can I do it happen?

smoky anchor
desert tinsel
wet breach
#

Congrats on the new title regardless though lol

#

same to you @young knoll

smoky anchor
#

I helped
Where is my Helper role ? :D

young knoll
#

thanks y'all ❀️

spare hazel
#

how can i set an item to the player's hotbar?

young knoll
#

Get their inventory and setItem

#

Hotbar is slot 0-8

smoky anchor
#

what's the command for the inventory slots

#

?slots

#

?inventory

#

?container

spare hazel
icy beacon
smoky anchor
#

ooh ty, didn't know

upper hazel
#

why this so

#

i think all load good

smoky anchor
#

<shadedPattern>your.package.name.customblockdata</shadedPattern>
You forgot to actually fill in your package lol

upper hazel
#

oh

#

yea

dry hazel
#

shouldn't be the issue though, are you using the right jar?

smoky anchor
#

ye, not the issue but still, it is incorrect

upper hazel