#help-development

1 messages ยท Page 652 of 1

quaint mantle
#

or login event not taking connected player ?

#

for bungeecord ?

eternal oxide
#

throws?

lost matrix
#

Dont let eventhandler methods throw exceptions

quaint mantle
quaint mantle
lost matrix
quaint mantle
#

which ex am i need catch ?

lost matrix
quaint mantle
#

idk

#

wdym guys

#

๐Ÿ˜„

lost matrix
quaint mantle
#

am i need catch exceptions ?

#

no exception

#

on console

#

wait i will test again

#

brb

amber stump
#

How do I get the download link from a plugin which always downloads the latest version?

quaint mantle
amber stump
quaint mantle
lilac dagger
quaint mantle
#

rly ?=

#

oh

#

so they talking about

#

๐Ÿ˜„

lost matrix
# quaint mantle

Again: Dont let eventhandler methods throw any exceptions. Catch and handle them yourself.

quaint mantle
#

well

#

alright

lost matrix
#

And make sure your listener is registered

quaint mantle
#

that right

#

i feel stupid

quaint mantle
#

OMGGTGY

#

I won't write code again at midnight

opaque scarab
#

It appears item entities do not trigger EntityMoveEvent. Is this true?

tender shard
amber stump
#

alright thanks

tender shard
#

e.g. like this (haven't tested but should work fine)

    public static String getLatestResourceDownloadLink(int resourceId) {
        try {
            URLConnection connection = new URL(String.format("https://api.spiget.org/v2/resources/%d/versions/latest", resourceId)).openConnection();
            try (
                    InputStream inputStream = connection.getInputStream();
                    BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8))
            ) {
                String json = reader.lines().collect(Collectors.joining("\n"));
                JsonObject jsonObject = gson.fromJson(json, JsonObject.class);
                return String.format("https://www.spigotmc.org/resources/%d/download?version=%d", resourceId, jsonObject.get("id").getAsNumber().intValue());
            }
        } catch (IOException ex) {
            throw new UncheckedIOException(ex);
        }
    }
amber stump
tender shard
#

doesn't close the inputstream nor the reader

#

don't use it

amber stump
#

Alright ^^

#

@tender shard

hazy parrot
#

Make gson instance

#

Gson gson = new Gson()

#

You don't have to make it every time tho, you can have single instance

amber stump
#

Whats a good way to download a file from an URL?

shadow night
#

I would recomend using an intetnet browser

remote swallow
#

could curl it

shadow night
#

Or wget

amber stump
#

in java

remote swallow
#

depends

shadow night
#

You mean on the island or in the language?

hazy parrot
#

Get Inputstream like you already did, and write it to fileoutputstream

iron palm
#
        BanList<UUID> banList = Bukkit.getBanList(BanList.Type.PROFILE);
        banList.addBan(player.getUniqueId(), reason, expires, sender.getName());

is there anything wrong with this code? it throws nullexception

#

or maybe i shouldnt give null as date to it since i wanted to make the player permanently banned

obsidian bough
#

how can i make a plugin that gives effects to a player with an nbt item?

calm robin
#

How do i get the line of text with the health, mana and duration to pop up
not like the health and stuff, but how can i put text on that line
just above where the item name is when you hold it

amber stump
iron palm
#

what T does getBanList method return when i want to use BanList.Type.PROFILE?

remote swallow
#

The profile ban list

iron palm
#

PlayerProfile ?

pseudo hazel
#

try it out

iron palm
#

i did but i cant figure it out even it isnt said in javadoc

pseudo hazel
#

does it not get intellisense?

iron palm
#

i thought it returns BanEntry<UUID> which i was wrong

iron palm
#

I gotta know what type that T is

#

since BanEntry#addBan methods first parameters type is that

#

and basically without knowing it type i cannot enter anything

remote swallow
#

it returns a generic, it depends what type you ask for

#

if you get the profile ban list it will return the PlayerProfile ban list

iron palm
upper hazel
#

Who faced such problem of abstract classes? there are 4 classes working with speed, player attack with the SAME logic but different parameters, so I wanted to create a common method for them, but 1 class has unique parameters for clarity, I will show it config Abilities:
day:
attack: 2.3
speed: 1.4
night:
attack: 1.6
speed: 0.8
and for the rest Abilities:
attack: 1.2
speed: 0.7
waterSpeed: 2.4

#

4 class have 4 parameter instead of 2

smoky oak
#

make a method that calculates what you want and input default parameters if a value isnt present

#

thats what I'd do

upper hazel
#

Is this problem common in the IT industry?

smoky oak
#

similar but yes

upper hazel
#

does it make sense to adjust the method for it because of 1 class

smoky oak
#

well

#

you can either make the method once and adjust it when required

#

or you can write it for every class separately

#

keeping it in one place tends to be simpler

quiet ice
#

Generally one is overcomplicating the problem

upper hazel
#

and if in the future a similar class appears, but for example, there are already 3 identical repetitions of parameters

smoky oak
#

i dont think there's a 'best' solution here

upper hazel
#

what is in the books about it

quiet ice
#

Params themselves can repeat whatever

#

You are probably thinking of behavior similar to interfaces here

smoky oak
#

i dont know the name for it but what sometimes happens is constructor classes wher you do something like
constructor.setHeight(10).setWidth(25).setStartingHeight(17).build() which then puts the values you specified and default values into the object created

#

not really applicable here tho

upper hazel
#

so interfaces solve this problem?

#

what about code repetition?

quiet ice
#

Interfaces do not solve this specific problem this way

upper hazel
#

I saw a video somewhere about this problem where I think it was talking about using interfaces instead of abstract classes

shadow night
#

I wonder why subscribing to this event does not ever fire

quiet ice
#

Uh, are you really subscribing?

upper hazel
#

no

quiet ice
#

Ah I see

#

Bit strange to implement Listener here

quiet ice
shadow night
#

both listeners are registered

quiet ice
#

Do you have the event essentials set up?

#

So those two magic thingies?

shadow night
quiet ice
#

I take that as a no

shadow night
#

what are event essentials

quiet ice
#

However since I am on mobile I can only say that is the problem

remote swallow
#

the handler lists

quiet ice
#

Yeah just look at the bukkit event classes

shadow night
quiet ice
#

Not the abstract ones you cannot listen to

remote swallow
#

that isnt named correctly iirc

quiet ice
#

?jd-s

undone axleBOT
shadow night
remote swallow
#

oh it is

#

i thought it had some weird capitaliztion needs

quiet ice
#

You need a non-abstract getHandlers method

shadow night
quiet ice
#

Also singular, not pular for the static method

#

Ah nvm, didn't look correctly lel

#

Holy, how bad is my memory

smoky oak
#

better than mine ill tell you that

shadow night
quiet ice
#

The run method of the timer is executed, right?

shadow night
#

the runnable itself works

#

the event just doesn't call

upper hazel
#

Ahh, I understand the problem is not in the abstract class, but in the hierarchy

quiet ice
#

?stash

undone axleBOT
upper hazel
#

you need to clearly understand where you need an interface and where an abstract class

eternal oxide
quiet ice
#

Yeah but not the sauce of the issue

remote swallow
undone axleBOT
quiet ice
#

However that is a valid point, is the event handler even registered correctly?

tender shard
#

Ketchup is sauce

noble lantern
#

smoothie

tender shard
#

Smoothie with sauce bernaise

quiet ice
#

Like the true listener, not your psedo-listener that emits events instead of subscribing to events

noble lantern
#

mmmm

#

i wonder how many people still think tomatoes are a vegetable

Also i just now realized this is the help dev channel my bad lmfao

quiet ice
#

Aren't they legumes?

shadow night
quiet ice
#

I have objections to your usage of the new keyword but whatever

shadow night
#

wdym

remote swallow
#

this has no reason to be a listener

shadow night
#

actually nvm I'm stupid as fuck

quiet ice
#

Are you really registering TicksEvent?

shadow night
#

I'm not registering any listeners at all lmfao

quiet ice
#

Because I don't think so

remote swallow
#

and these listeners are registere

quiet ice
# shadow night wdym

Generally you shouldn't pop items of the operand stack immediately after invoking the constructor

#

That is they should be used in other methods or stored in a local var

remote swallow
#

also why do some of the classes have an empty constructor

quiet ice
#

That is the issue

#

But he realized

remote swallow
#

ah

zenith gate
#

Having local dependcies means i only need to add this and not a repo right?

<dependency>
            <groupId>pine.toast</groupId>
            <artifactId>mana</artifactId>
            <version>1.2.4</version>
            <scope>provided</scope>
        </dependency>
shadow night
#

I have realized I'm stupid as hell

remote swallow
#

correct

zenith gate
#

It's my own. in the same directory.

remote swallow
#

but is it a plugin or a library

zenith gate
#

library.

remote swallow
#

change the scope to compile

#

and make sure u maven installed it

quiet ice
quiet ice
#

But if the dep is a standalone plugin it does not matter whether it is a lib or not - no shading is required and scope should stay at provided

zenith gate
#

Yeah that's what I've heard before. it is a library but worked with provided so i just left it. it just kind of stopped now. prolly because i changed computers but who knows lol.

remote swallow
#

if its shaded in another plugin it would also work

quiet ice
remote swallow
#

depends how it was shaded

quiet ice
#

Shading in plugins into plugins isn't a flawless process

#

Especially not with standard behavior

remote swallow
#

shading a library would work

#

plugins is a different story

quiet ice
#

As in the lib must specifically support these kinds of shenanigans

tall dragon
#

tryna learn docker and thought running a mc server would be a great way to practise.
it works fairly well and all starts up correctly. as soon as i try to connect or re fresh my server list it spams this error untill shutdown

[19:59:08 WARN]: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.lang.RuntimeException: Unable to access address of buffer
        at io.netty.channel.epoll.Native.read(Native Method) ~[patched_1.8.8.jar:git-PaperSpigot-445]
        at io.netty.channel.epoll.EpollSocketChannel$EpollSocketUnsafe.doReadBytes(EpollSocketChannel.java:678) [patched_1.8.8.jar:git-PaperSpigot-445]
        at io.netty.channel.epoll.EpollSocketChannel$EpollSocketUnsafe.epollInReady(EpollSocketChannel.java:714) [patched_1.8.8.jar:git-PaperSpigot-445]
        at io.netty.channel.epoll.EpollSocketChannel$EpollSocketUnsafe$3.run(EpollSocketChannel.java:755) [patched_1.8.8.jar:git-PaperSpigot-445]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:380) [patched_1.8.8.jar:git-PaperSpigot-445]
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:268) [patched_1.8.8.jar:git-PaperSpigot-445]
        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [patched_1.8.8.jar:git-PaperSpigot-445]
        at java.lang.Thread.run(Thread.java:833) [?:?]

any1 knows why this could be happening?

tall dragon
#

ah i thought that was the problem

#

isnt java backward compatible

#

or am i tripping here

chrome beacon
#

Netty is doing native stuff I believe

tall dragon
#

ahh, fair enough i will try that then

tall dragon
obsidian fulcrum
#

i need help

#

i installed world edit and world guard on my local server and when i try to use it /tg command doesnt exist

tall dragon
obsidian fulcrum
#

can u help me?

#

please

tall dragon
#

dk what /tg is even supposed to be tho

flint coyote
#

never heard of that either

tall dragon
#

i know of //wand and /rg

#

for both plugins

obsidian fulcrum
#

i mean rg

#

sorry my bad

#

it doesnt exist

tall dragon
#

is worldguard enabled

obsidian fulcrum
#

that command

tall dragon
#

see in /pl

obsidian fulcrum
tall dragon
#

it should automatically unless there is an error

#

in which case u need to check the console and see what the problem is

obsidian fulcrum
#

okay give me sec

#

oh okay XD it magicly started to work

#

thank u for your time

tall dragon
#

ah well

#

great

obsidian fulcrum
#

to my question

#

bye

tall dragon
#

is it rlly that hard to google "fabric discord" ?

#

aaand he deleted the message

flint coyote
#

Do you need help, epic? I can show you how to use google /s

tall dragon
#

ah no someone asked for an invite to fabric's discord

flint coyote
#

It's funny that telling someone google exists is enough sometimes lol

tall dragon
#

im good myself thanks though!

flint coyote
#

Anytime!

twin venture
#

?paste

undone axleBOT
upper hazel
#

how to increase swimming speed of bukkit api player

#

and turn off the removal of bubbles under water
when player swimming

flint coyote
#

dolphin effect is the first thing that comes to my mind

upper hazel
flint coyote
#

Wdym not configured?

upper hazel
#

i mean i not can

tall dragon
#

you could try just multiplying the players velocity when hes swimming in the playermoveevent

#

though be cautious

#

its an heavy event

upper hazel
#

thf

stuck imp
#

Bold name of equipment

tall dragon
#

what is the result then

#

should probably change this to & since ur translating color codes

silk ore
#

I'm getting such an error can anyone help?

lilac dagger
#

did you import java?

stuck imp
#

Ok i will try

lilac dagger
#

java not spigot

silk ore
#

Any idea how I can fix the error?

flint coyote
#

Right click -> properties and then there should be something with JRE

#

has been a while since I used eclipse

tall dragon
#

imagine if an editor existed that just does all that automatically

#

that be so cool

flint coyote
#

Right? Vim is great

stuck imp
#

And i want to bold the name of stuff

tall dragon
#

did you change what i said

#

ur code hasnt changed

stuck imp
#

Yes

tall dragon
#

ok

stuck imp
#

I didn't update the code on pastebin

#

but i change on java

tall dragon
#

maybe try ChatColor.BOLD instead of &l since ur doing that with ur colors too

#

woulnt know otherwise

flint coyote
#

The order is important for colors and formatting

quiet ice
flint coyote
#

I think BOLD then color, I keep forgetting though

stuck imp
#

Ok, thanks i will try

upper hazel
flint coyote
#
  1. You can also just cancel the event so they don't decrease in the first place
upper hazel
#

thf

mortal hare
#

how can i set vararg type as @NotNull annotated?

#

@NotNull Foo... objects

#

would annotate Foo type

#

but not the vararg

stuck imp
#

Still not work

mortal hare
#

so if if do smth like this

Foo[] objects = null;
bar.callNotNull(objects)

it doesnt invoke the warning on my ide

stuck imp
worldly ice
#

@NotNull Foo @NotNull ... objects

mortal hare
#

this is great, i've annotated my all my builder methods with not nulls

#

because what's the point of invoking a method which supplies null

lilac dagger
#

alos @NotEmpty

#

wish i knew of it sooner

mortal hare
#

with varargs

#

so if it does supply empty vararg it wouldnt work

#

because the call would be ambiguous

#

and hey compile time error, which is great since i dont need to check it at runtime ๐Ÿ™‚

sullen marlin
#

This question came up yesterday

#

People living varargs and annotations all of a sudden

mortal hare
#

really?

#

who asked

#

๐Ÿค”

icy beacon
#

this was highly unreasonable dovidas

tall dragon
icy beacon
#

but ok

mortal hare
#

wdym?

#

i just asked who asked the question

flint coyote
#

xD

mortal hare
#

i didnt meant to insult if that's what you're interpreting

#

lol

icy beacon
#

yeah there was no malice emanating from your lexicon usage

#

totally

#

anyhow goodnight

flint coyote
#

ZBLL always sees malicious intent

icy beacon
#

it's not like I have trust issues for nothing lol

#

gotta put my mental instability to use

flint coyote
#

using weaknesses as a skill, I see

#

makes it a good thing

median berry
#

How to make the armor stand impossible to hit? Such stands usually use plugins for holograms

flint coyote
#

Impossible to hit or invulnerable?

quaint mantle
#

am i set default value with sql code ?=

median berry
#

Let's say you have a decentholograms plugin on the server, you create a hologram, a hologram is an invisible stand, but if you just create an invisible stand with the colosseum disabled, you can click on it

#

colider*

#

my eng is bad sorry

#

Collisions

flint coyote
#

Are you on 1.20?

#

spigot/mc version?

median berry
#

1.18.2

flint coyote
#

unfortunate, 1.20 would have had display entities

median berry
#

I have heard that such stands that cannot be deleted (there is no hitbox) are created using packets

#

But I'm not sure that's true

flint coyote
#

Yes usually you use packets

median berry
#

Do you have any wikipedia on this or do I just need to find "how to create a packet stand" on the internet?

tall dragon
#

typically people use protocollib

#

and rely on their documentation

#

of the packet structure

flint coyote
#

You can look at open source plugins or maybe you can find a protocollib guide.
I think there is a way to disable hitboxes on armor stands though. At least I found how it works with commands

tall dragon
#

pretty sure you need to set the armorstand as marker

#

not sure though

flint coyote
#

yes

median berry
#

stand.setMarker(true)?

tall dragon
#

should be it yea

flint coyote
#

If that's an option, yes try it

tall dragon
#

you used to need reflection

#

i guess thats added to api

median berry
#

Ok, i try later

#

I don't know anything about reflections

tall dragon
#

well looks like you wont need it

flint coyote
#

yup seems to be in the api

tall dragon
#

oh it just makes it very small

#

thought it would be nonexistent

flint coyote
#

that's what I found on google images

median berry
# flint coyote yup seems to be in the api

maybe that's what I need (I'm making a plugin for rp)
the player writes /desc and a text with arguments appears over his head, for example ("I love dogs") and due to the fact that he can't build with a hitbox when you jump and you can't do it over a nickname

flint coyote
#

so it doesn't change its appearance, only hitbox

tall dragon
#

and how high the text appears apernatly

flint coyote
#

On 1.20 you could set a display entity as a passenger :/

median berry
# tall dragon and how high the text appears apernatly

I removed that function temporarily because there was a bug that the player could not break the entity because of my crooked code without using prepared functions, the stand was small and was just above his head if you look at his platform

copper sand
#

hello, good afternoon. how can i remove this? about the /help command

median berry
#

add /help command in your plugin.yml and don't make a command handler, the command will override the commands of minecraft or other plugins, at least that's how it worked for me

copper sand
#

oc thanks i will try that

quaint mantle
#

If Iโ€™m wanting to make a plugin that listens for when other plugins try and give items but if the players inv is full I want to create a mailbox thing for the items what is the best way to go about this ideally not using asm for player.giveItem or whatever

stuck imp
#

How do I do in java to dynamically color an equipment? The team moves from the first letter to the last letter from one color to another

sullen marlin
#

There's a ColorableArmorMeta or something

#

Get see what getItemMeta on leatherarmor returns

tall dragon
#

think hes tryna color the name

#

at least thats what he was asking about earlier

median berry
copper sand
median berry
copper sand
median berry
#

Or you want /help plugin like essentials or cmi?

zinc moat
#

can someone help me

#

i keep getting an error

#

i dont know how to fix

copper sand
median berry
# copper sand yes

if you create your own plugin, you must have a plugin.yml file, do you have one?

lost matrix
zinc moat
#

ill dm u it

lost matrix
#

Nope

median berry
lost matrix
#

?img

undone axleBOT
#

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

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

zinc moat
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

zinc moat
#

!verify EzedOn

undone axleBOT
#

A private message has been sent to your SpigotMC.org account for verification!

zinc moat
#

this is the issue

#

i have no idea where its coming from

#

i cant add code since i dont know where its coming from

lost matrix
#

The exception tells you where it comes from

zinc moat
#

it doesnt

lost matrix
#

click on a higher hierarchy tab

zinc moat
lost matrix
zinc moat
#

the highest one i click?

lost matrix
#

Are you using maven or gradle?

zinc moat
#
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.3.0:resources (default-resources) on project boxessentials: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:3.3.0:resources failed: newPosition < 0: (-1 < 0) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
zinc moat
lost matrix
#

Show your pom pls

zinc moat
calm pasture
#

anyone here do comissions?

echo basalt
#

?services

ivory sleet
#

?services

undone axleBOT
ivory sleet
#

:^)

echo basalt
zinc moat
#
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>me.ezed</groupId>
    <artifactId>boxessentials</artifactId>
    <version>1.0</version>
    <packaging>jar</packaging>

    <name>boxessentials</name>

    <properties>
        <java.version>1.8</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>

    <repositories>
        <repository>
            <id>spigotmc-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
        </repository>
        <repository>
            <id>sonatype</id>
            <url>https://oss.sonatype.org/content/groups/public/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.19.4-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
</project>
#

here

lost matrix
# zinc moat maven

Before that. Do mvn clean and then try mvn install again. Sometimes you just need cleaning.

calm pasture
#

they message me then stop messaging

echo basalt
#

We see every post

#

Some of them are just bad ideas

calm pasture
mental moon
lost matrix
mental moon
#

Anyone know of a way, packets or otherwise, to make it so the client reacts to the side of a block as if it were vine/ladder to climb it?

echo basalt
#

You need to make a resource pack that makes vines invisible

#

And some code to detect walls

mental moon
hybrid spoke
mental moon
hybrid spoke
#

otherwise not sure if you can fake vines

#

you could probably send them a ladder packet

#

but that will get them kicked

#

tell them to use spider hack

#

or let them sit on one

#

otherwise push them up with velocity

mental moon
#

That would be pretty funny.
Yeah it's for the Spider ability in my plugin.
Trying to get it so they could walk through spider webs at normal speed was an impossible task too lol

hybrid spoke
#

hm, you could apply velocity at them if they sneak at a wall

mental moon
#

That may be the way I gotta go.

echo basalt
#

ehh that's annoying

hybrid spoke
#

not that hard

mental moon
#

Sucks I can only go off of the jump increment for spacebar usage. Up/down will be very painful

#

I already got systems to create threads to watch the player and disable effects.
I'll try watching the cardinal blocks around them and seeing whatworks. Thanks

hybrid spoke
#

yeah you just gotta check the 4 direct neighbour blocks and if one of them is solid and the player sneaks, set them into spider mode and push him up

#

if he unsneaks let him in spider mode and push him slowly down without falling

#

once he's away from that wall spider mode off and he can fall as usual again

mental moon
#

Yeah.
I could give them feather falling for a couple seconds to make wall to wall jumps possible.
Still wanna punish them if they mess up though

hybrid spoke
#

double sneak for jump into a direction ๐Ÿค”

copper sand
mental moon
#

CodySimpson has very good tutorials on youtube

median berry
copper sand
median berry
#

you need /help plugin?

#

i can create this plugin

#

wait 1 min

#

Which you version use?

#

Which version you use*

copper sand
#

no, no, what I want is to remove the /help command from my minecraft server

median berry
#

I can create a plugin that will remove this command from you, do not be afraid, I will post the plugin code on github, you can make sure that it is without backdoors

young knoll
#

Just use a permission plugin

#

And negate the help permission

median berry
young knoll
#

Does it really matter if it says unknown command or you do not have permission for this command

median berry
#

idk

copper sand
median berry
copper sand
wanton path
#

Good evening, I wanted to ask what is the best way to deactivate a function in a plugin? it should not be usable later for normal players.

median berry
inner mulch
#

What is the messagetype used to send a message which is in the middle of the players screen (and how can i send it)?

inner mulch
#

i guess title then

wanton path
#

The function is a butcher function that kills animals / mobs directly and only drops the loot. So as not to strain the performenc. The thing behind it I have little to no experience in the Java language.

median berry
median berry
young knoll
#

Thatโ€™s title

median berry
inner mulch
median berry
inner mulch
#

i alr got it

young knoll
#

Itโ€™s just Player#sendTitle

median berry
#

yeah

inner mulch
#

coll, do you know a satisfying sound that i can play when this title appears?

#

or a nice sound

median berry
inner mulch
#

no, im talking about the sound

#

Sound.blabla

#

idk which one sounds good

median berry
#

You can find all sound on minecraft wiki

young knoll
#

What kind of sound do you want

copper sand
young knoll
#

A ding?, something magic sounding?

inner mulch
median berry
inner mulch
#

maybe amethyst

copper sand
#

the default help command won't let me because it commands something else

#

And block the /help command of the other plugin

median berry
#

I hope you can throw links here..

inner mulch
#

to listen to all of them?

median berry
mental moon
inner mulch
#

i found a site with mp3 files

#

im listening to them rn

copper sand
young knoll
#

Use something like DeluxeMenus if you want a help gui

median berry
#

Yeah, dont use another plugins, simply gui menus plugin

copper sand
inner mulch
#

Is thread.sleep a good idea?

#

to implement a cooldown?

young knoll
#

No

#

Use time stamps

inner mulch
#

how?

young knoll
#

Store the timestamp when they will be off cooldown

#

And then compare it when they try to do whatever

#

Thereโ€™s also method 3 which is just a slightly improved version

#

The entire guide is useful

inner mulch
#

okay

#

i will look into this

#

thank you

primal goblet
#

Hey, does any one know how to register a custom entity in spigot (version 1.8.x) ?

ivory sleet
#

like u can use it but it becomes problematic when u wanna scale of it

young knoll
#

You should use it on the main thread

#

Heh

ivory sleet
#

i think the biggest issue comes with thread prioritization and and interruptability design

livid dove
# inner mulch Is thread.sleep a good idea?

I am gonna say I personally think you are going too fast chief.

You were unaware of abstraction or general OOP concepts earlier today and now ur mucking about with threads?

livid dove
livid dove
vocal cloud
#

The honest truth is that 90% of what he teaches is quite literally just "read the docs" and "learn java". So if someone here was to make a video it should be about reading the docs and how to use javadoc over teaching spigot things.

small holly
#

Hey I got a question, how exactly do I do modular plugins using gradle?

#

as in allowing verious NMS versions

livid dove
echo basalt
#

Well

#

That needs planning

#

And it's overall a pain

livid dove
#

Lol true.

echo basalt
#

I've always though of doing something like that but I hate my own voice and have a rough accent

vocal cloud
#

People say they like my voice but I tend to ramble and become incoherent lol. I'd hate to make a tutorial and have it be a video essay

echo basalt
#

I'd need to write a script to not trip in my own words but it ends up sounding unnatural

#

I just prefer sticking to my usual illusion index posts

young knoll
#

Just have no mic and write in notepad for the video

echo basalt
#

And my github wiki stuff

echo basalt
gray saddle
#

hi my console keep sending Could not save messages.yml to plugins\Votekick\messages.yml because messages.yml already exists.

ivory sleet
#

would more say that he doesn't apply enterprise thinking to his vids

#

just normal spigot tuts where he shows how to code against spigot api

vocal cloud
#

I feel like a 1 hour video on the basic setup/config along with some basic "good to know" things like PDC and whatnot would be useful. Then, another video on NMS. That'd probably be all you'd need

echo basalt
hybrid spoke
echo basalt
#

huh?

vocal cloud
#

ctrl backspace

echo basalt
#

ah

#

read it as worlds

hybrid spoke
#

ohhh

vocal cloud
#

it's so natural you just do it

#

it's amazing because if you misspell you can just delete the who thing

echo basalt
#

yeah it's natural

hybrid spoke
#

i always do the "so this word has 8 letters so i press backspace 8 times"

echo basalt
#

I intentionally smack the backspace

#

in the vid

#

for the memes

young knoll
#

Itโ€™s annoying

#

Just add a check to see if it already exists

vocal cloud
#

when you type fast enough it's better to delete the entire word and start over

echo basalt
#

I can do like 120wpm with this keyboard

#

got it a bit over a week ago

vocal cloud
#

I'm on a surface keyboard rn so my wpm is probably sub 30

echo basalt
#

logi mx mechanical ๐Ÿ’ช

#

broke my mx keys woeisme

hybrid spoke
#

speedtype test are always the complex words fast and shit like "him", "it", or "or" breaks it

proven jay
#

hey im currently working with click types in the inventory click event and ive been debugging this for a long time now, but it simply seems like the check "event.getClick() == ClickType.NUMBER_KEY" or any other click type does nothing, can someone point me in the right direction for what im doing wrong and for how to fix it? if so, then thanks.

echo basalt
#

Is your event firing at all?

proven jay
#

The event is registered and it works for some other checks in it, but not for the click type one above

smoky oak
#

the code you posted should work

echo basalt
#

Time to print the click type

smoky oak
#

please post the relevant function

proven jay
#

Are you guys going to be online in about one hour? I've just went away for one second.

smoky oak
#

not me

echo basalt
#

no clue if I'm gonna feel sleepy within an hour

#

but I usually stay up til 5am so you got maybe 4 hours

tender shard
#

does anyone-a-reno know how to use the plexus/eclipse compiler-eno in gradle-ahoo?

proven jay
tender shard
#

you philistine haven't played thimbleweed park

echo basalt
#

hey look smile's lurking

tender shard
#

smile is leaking. leaking mucus

lost matrix
#

Allright. Thats enough internet for today. Im gonna go hit the hay.

echo basalt
#

sleep tight smile

#

only person I actually care about in this discord

smoky oak
#

see thats a paid game

#

of course i havent played it

lost matrix
smoky oak
#

im broke asf

tender shard
#

dont let the bedbugs bite

echo basalt
echo basalt
tender shard
#

i got 7 japanese money

#

on paypal

echo basalt
#

got 5โ‚ฌ on paypal

tender shard
#

nice, a burger in the clinic where I was only costs 4.50โ‚ฌ

young knoll
#

I just got $70 from nexus mods

tender shard
young knoll
#

Pretty much rich now

echo basalt
#

gotta survive for 2 days with this money

#

but I do have chicken in the fridge

#

Enough for a day

#

And I can buy more chicken

smoky oak
#

flesh is really expensive here

#

the kilo's like โ‚ฌ40

echo basalt
#

chicken's like 6โ‚ฌ/kg

smoky oak
#

yea for you

#

unfortunately im stuck in the middle of a city

echo basalt
#

So am I

tender shard
#

I once tried to copy money but the printer just printed black bars

#

And photoshop refused to open the scanned bill

young knoll
#

Is that an actual thing computers do

tender shard
#

Yes

echo basalt
#

Yea

young knoll
#

Neat

smoky oak
#

well, depends on the software

tender shard
#

Theres some name for this system

#

But i forgot

echo basalt
#

Printers also print with nearly-invisible yellow dots

#

That are a sort of metadata

#

That display info about the printer

young knoll
#

I figured it just didnโ€™t matter since the printer wouldnโ€™t be able to copy and of the fancy security stuff

smoky oak
#

money is almost impossible to fake

tender shard
#

Eurion constellation its called

young knoll
#

Interesting that photoshop also says no

tender shard
#

Eurio*

young knoll
#

Wonder if other image editors do

smoky oak
#

krita and inkscape probably dont check

tender shard
#

Well even if they didnt, the printer refuses to print it

echo basalt
#

Krita is meh

#

Tried using it as a sort of whiteboard

#

It keeps the entire image in ram

#

so a 40kx40k image was like 20gb

young knoll
#

What about paint 3D

#

Kek

echo basalt
#

I then switched to microsoft whiteboard

#

lmao

smoky oak
#

wtf r u doing with a canvas that big

echo basalt
#

taking notes with a drawing tablet

smoky oak
#

i

#

i do that aswell

#

but i just do HDR

tender shard
#

I havent written anything by hand in years

young knoll
#

Me either

#

Thankfully

echo basalt
#

teacher was a bitch and insisted we wrote by hand

#

nowadays I just ignore their demands

young knoll
#

My handwriting is godawful

tender shard
#

Mine too lol

smoky oak
#

mine depends on how much sleep i had

echo basalt
#

Mine's decent

#

but I sweat a lot and the paper always gets smudged

smoky oak
#

i'd recommend using pens then

echo basalt
#

ink smudges too

#

I gotta write on fucking stone tablets or something

smoky oak
#

graphene doesnt get smudged nearly as much by water(like) stuff as ink does

echo basalt
#

ehh

smoky oak
#

i've discovered when a notepad i wrote in with both got soaked once due to rain

echo basalt
#

the page warps

smoky oak
#

i can still read all the stuff i wrote with a pen

young knoll
#

Write in blood

smoky oak
#

and none of the stuff i wrote with ink

young knoll
#

It also sends a message

echo basalt
#

I think you mean pencil

smoky oak
#

google translate time

#

youre righ

#

t

tender shard
#

This is my handwriting when taking notes

echo basalt
#

fun

smoky oak
#

youre clearly a doctor

tender shard
#

the only thing that's readable are the section signs ยงยง

smoky oak
#

can you still read that?

tender shard
#

sure

#

the ยง sign in the header (first line) is a bit creative though lol

smoky oak
#

eh you do you

#

im asking cuz i can somehow read everything ive written

#

except one line of text

#

has been bugging me for years

tawny talon
young knoll
#

Just use a runnable?

lunar wigeon
#

just schedule it

tawny talon
lunar wigeon
#

??

#

just do it then lol

tawny talon
#

No, I don't remember which was the method to open it, was it player#openInv or something else?

young knoll
#

Player#openInventory

lunar wigeon
#

player.openInventory

#

you dont have any code completion or idk

#

also use documentation

#

or even google it

young knoll
#

?jd-s is your friend

undone axleBOT
tawny talon
#

Guys I know the Javadocs and everything, i tried to google it multiple times and came up with nothing, the method should even set the block to air after its opened but doesn't work

lunar wigeon
#

what didnt work, opening inventory? XD

tawny talon
#

Also with the current code it doesn't make 1) the animation or like, it makes them but after i opened the barrel which is not really what was I'm trying to achieve

lunar wigeon
#

so you want to play animation and then open barrel gui?

tawny talon
lunar wigeon
#

so why wont you open it when calling cancel method?

young knoll
#

So whatโ€™s the issue here?

tawny talon
lunar wigeon
#

yes

#

right before calling cancel method

#

I assume cancel method means end of animation

tawny talon
#

if so it doesn't work

lunar wigeon
#

openinventory,
set type to air
cancel

vital ridge
#

I have a custom yaml file, I'm trying to add default values, but it seems like I cannot choose the type of the value. I'll specify the path, but the value is just an object.

#

So if I want the value to be a string, it will still be displayed without "" in the file

young knoll
#

Include a default file in your jar

#

And saveResource it

lunar wigeon
tawny talon
young knoll
#
  1. Interact event
  2. Start repeating task with a counter
  3. When counter hits N, cancel task, open inventory, break barrel
young knoll
#

Yes

tawny talon
#

this should be all time a player opens a barrel

#

perfect I'll try out thank you ;)

inner mulch
#

Is there any event that i can use to listen, if a player uses tnt to destroy blocks?

young knoll
#

BlockExplodeEvent

#

Actually

young knoll
#

TnT is EntityExplodeEvent

inner mulch
#

How do i get the player?

hybrid spoke
#

check who interacted last

inner mulch
#

which one is the better event?

waxen plinth
#

you have a lot of bases to cover

young knoll
#

TNT stores who activated it in some cases

waxen plinth
#

I am going to place tnt and a redstone wire to activate it, then stand on a pressure plate to activate the redstone

#

I am going to place tnt and a daylight sensor next to it and it will explode when the sun comes up

#

I am going to place tnt and get a skeleton to shoot a flaming arrow at it

#

your best bet is to attach metadata about who placed the block initially

#

getting who actually triggered the explosion is a fool's errand

young knoll
#

You can use getSource on primed tnt to get the activator

#

In some cases

waxen plinth
#

what are you trying to cover then

young knoll
#

Aka the same cases minecraft tracks it

waxen plinth
#

because different events can cause it

inner mulch
#

anyone knows if i can get the destroyed blocks as well? from the event

young knoll
#

From the EntityExplodeEvent, yes

inner mulch
#

but this one only activates if an entity is being killed by tnt

young knoll
#

What is your goal

inner mulch
#

tracking, which blocks the player breaks with an explosive

young knoll
#

Then yeah, EntityExplodeEvent

inner mulch
#

? but its only called if an entity is killed?

young knoll
#

No?

#

Itโ€™s called when an entity explodes

inner mulch
#

by an explosive

young knoll
#

Lit tnt is an entity

inner mulch
#

i need to test this

#

you are right, it works

proven jay
#

@echo basalt are you available?

echo basalt
#

Uhh yeah

proven jay
# echo basalt Uhh yeah

Okay so i have this in my inventory click event

if (clickedInv != null && event.getCursor() != null) {
            if (if event.getCursor() is the custom itemstack i have) {
                if (clickedInv.getType() == InventoryType.PLAYER) {
                    Bukkit.broadcastMessage("inventory type is player");
                    Bukkit.broadcastMessage("shift left - " + (event.getClick() == ClickType.SHIFT_LEFT));
                    Bukkit.broadcastMessage("shift right - " + (event.getClick() == ClickType.SHIFT_RIGHT));
                    Bukkit.broadcastMessage("number key - " + (event.getClick() == ClickType.NUMBER_KEY));
                    Bukkit.broadcastMessage("shift click - " + event.isShiftClick());
                    if (event.getClick() == ClickType.SHIFT_LEFT || event.getClick() == ClickType.SHIFT_RIGHT || event.getClick() == ClickType.NUMBER_KEY) {
                        event.setCancelled(true);
                        Bukkit.broadcastMessage("shift or number");
                    }

                    return;
                } else {
                    event.setCancelled(true);
                    Bukkit.broadcastMessage("inventory type is not player");
                }
            }
        }```  

What works: a player can move the custom itemstack in their own inventory where ever they want to, but they can't put and drag it into another inventory. 

What doesn't work: a player can shift click and use their number keys to put the custom itemstack in another inventory.
echo basalt
#

Yeah so

#

Cursor only gets you so far

#

When dealing with this event, the values are set like following:
Cursor: The item that was in the player's cursor before clicking
Current Item: The item at the highlighted slot

#

So you'll have to do extra handling to see where things will go

proven jay
echo basalt
#

You should write better checks

#

And get the specific item depending on the click type

proven jay
#

I feel like I'm going in circles

echo basalt
#

Write better checks then

proven jay
#

No duh lol

#

The checks seem all good, but they're obviously not

#

I'm not sure what's wrong in it

echo basalt
#

Do me a favor and print out all the values of the event outside of any checks

#

See if you can recognize any patterns

#
  • Item in cursor
  • CurrentItem
  • Item at raw slot
#

Grr I'm looking at luckperms' dependency loader and this code looks annoying to write

proven jay
proven jay
# echo basalt - Item in cursor - CurrentItem - Item at raw slot

ive debugged this

        Bukkit.broadcastMessage("cursor - " + event.getCursor());
        Bukkit.broadcastMessage("current item - " + event.getCurrentItem());
        Bukkit.broadcastMessage("item at raw slot - " + event.getRawSlot());``` 

and when i click on the custom itemstack in my inventory, cursor shows as the custom item stack, current item shows as material air, and item at raw slot shows as thirty six
slender elbow
echo basalt
#

Still annoying

#

What I used to do back in the day was toss all my dependencies in an external plugin and download it from a web server

simple schooner
#

which is better nested if statements or nested switch statements (I know neither is)

white root
#

(Please ping with replies, yall)

river oracle
#

nexus must be down atm

white root
#

I just spent entirely too long trying to fix my gradle/intellij before checking that lmao

fluid river
#

nexus was down week ago

simple schooner
#

what event gets triggered when the player closes an inventory

#

op nvm found it

river oracle
fluid river
#

oh thats what guy tried to connect

#

mb

#
Nexus Mods

We host 480,373 mods for 2,348 games from 118,519 authors serving 42,160,758 members with 8,271,323,075 downloads to date. We've donated $2,224,356 to our mod authors through Donation Points. If you can mod it, we'll host it.

#

i thought bout this for some reason

still verge
#

ping me when its back

white root
#

same

bitter crystal
gray saddle
#
if (!getDataFolder().exists()) {
    getDataFolder().mkdir();
}
msgs = new File(getDataFolder(), "messages.yml");

if (!msgs.exists()) {
    try {
        msgs.createNewFile();
    } catch (IOException e) {
        e.printStackTrace();
        Bukkit.getConsoleSender().sendMessage("ยงcThere was an error creating the messages.yml file!");
    }
}

msgsc = YamlConfiguration.loadConfiguration(msgs);
msgsc.options().copyDefaults();
saveResource(msgs.getName(), false);
#

My messages.yml gets created but its all empty

#

it apparently didn't save the default config

primal goblet
#
[00:53:17 WARN]: Exception in thread "Timer-1"
[00:53:17 WARN]: java.lang.NullPointerException
[00:53:17 WARN]:        at pg.perms.api.inits.MySQL$1.run(MySQL.java:26)
[00:53:17 WARN]:        at java.util.TimerThread.mainLoop(Timer.java:555)
[00:53:17 WARN]:        at java.util.TimerThread.run(Timer.java:505)
``` is that normal?
waxen gust
#

Gateway time-out Error code 504

mighty pine
#

ah yes of course

#

thanks spigot

exotic garnet
#

I'm looking to allow crops to grow in the dark, with no light level requirement. Has anyone ever done this before or has an idea how?

fluid river
#

isn't it kinda hardcoded into mc

#

i mean every light manipulation

sweet sonnet
#

Would be more of a server implementation thing I guess

#

Just fork paper

fluid river
#

disable day cycle ๐Ÿ˜‰

north nova
#

is the repo down for everyone else?

#

nvm i saw the msg above, it is

sterile breach
#

Hello, how do you give a spawner that spawns a certain entity (e.g. creeper)?

stuck imp
#

Hi, i have a problem on this code : https://pastebin.com/RQESGGGc. The problem is the following, the name of the equipment is not colored in yellow, and the yml file has the correct cooldown value, but not the Minecraft server (when the user checks his cooldown, it marks something else)

unkempt peak
#

Also elaborate more on the cooldown, what's wrong with it?

stuck imp
#

Honestly i don't know, im full beginner so i ask ChatGPT to help me x)

north nova
#

.....

unkempt peak
#

Well that makes a whole lot more sense lmao

stuck imp
#

What should i do for fix the problem ? I fix solo the name at yellow for stuff, but i don't arrive to fix the cooldown

unkempt peak
#

Well, I would start by actually learning what your code means

#

Your never going to get anywhere by copy-pasting code from ChatGPT and stack overflow without knowing what any of it does.

stuck imp
#

I understand but that not help me to fix the problem, that why i ask here ๐Ÿ˜…

#

I learn with experience like all people, ChatGPT help me to get experience by provide me a theorical code

smoky oak
#

eh, chatgpt is hit and miss

unkempt peak
#

ChatGPT is probably the worst source you could go to for education on anything

#

Ok maybe not the worst but still, there are a very large number of free sources better than it

#

ChatGPT does not know how to code. It rips code from it's training set and attempts to mash it together to fit your request

stuck imp
#

I just want help, not talk about ChatGPT please ๐Ÿ™ ..

#

If you don't know just tell me

smoky oak
#

ill take a look

#

btw

#

please use ?paste

#

its easier to read

unkempt peak
#

He sent a paste

stuck imp
zealous osprey
#

They meant using md5s paste via

#

?paste

undone axleBOT
quaint mantle
#

Dude that is completely wrong how ur setting Armor Color

#

โ€ฆ

zealous osprey
#

it has a bit of highlighting and much nicer to read

stuck imp
#

Alright ๐Ÿ™‚

unkempt peak
#

But fr tho my best advice is to just use a kits plugin if you don't know how to code

stuck imp
#

It's not only a kit plugin

#

It's a little part of the big code

unkempt peak
#

What exactly are you trying to do?

zealous osprey
quaint mantle
#

Honestly coding is easier then fucking with chat gpt. Chatgpt frustrates me so hard sometimes

#

@stuck imp if ur gonna use AI I recommend using phind.com

smoky oak
#

chatgpt may be useful to get debugging ideas but yea dont try to code with it

unkempt peak
stuck imp
#

ChatGPT give me idea to how to code something. It's not worth and stupid

#

With that, i code a perfect Python Bot

#

Able to do many things and task

unkempt peak
#

Tell me what you actually want to do and I can help you @stuck imp

lost matrix
#

gpt isnt there yet. Learn to code or you will be stuck with tiny projects forever.
And if they break you wont be able to update/fix them.

stuck imp
#

I want fix the cooldown bug. In Minecraft game, it's show "31/01/1970 at 00:37" when the real time is "02/09/2023 at 10:06
" for example

smoky oak
#

thats just default time

chrome beacon
#

?

smoky oak
#

somewhere in your code you grab time and dont set it to anything

#

resulting in timestamp 0

#

january 1970

stuck imp
#

How i fix that ?

smoky oak
#

find where you get your time

#

you're not setting it there

chrome beacon
#

Show your code

#

?paste

undone axleBOT
fluid river
#

whats goin on

unkempt peak
#

@chrome beacon

#

Is there anything in the config file @stuck imp

fluid river
#

what lol java setCooldown(player, System.currentTimeMillis() + 30L * 24L * 60L * 60L * 1000L);

simple schooner
#

What is L

unkempt peak
#

long

zealous osprey
#

long

simple schooner
#

oh

zealous osprey
fluid river
#

why

fluid river
#

currenttime is also good

simple schooner
fluid river
zealous osprey
#

System. currentTimeMillis() returns the milli second in the current second, doesn't it?

fluid river
#

i didn't mean to harass you for real

mortal hare
#

i would say for performance probs switch cases

#

but for readability if statements

smoky oak
#

eh debatable

#

depends on the usecase

fluid river
zealous osprey
#

changing if to switch is a very negligable change in performance; Might even be changed during compiling either way

unkempt peak
mortal hare
smoky oak
#

isnt switch based on a hash jump table

fluid river
#

it returns current time and that's all fr

#

everything is based on hash jump no?

mortal hare
#

no

zealous osprey
fluid river
#

under ze hood

mortal hare
#

if statements are not hash based jumps

#

actually it depends on the impl

hazy parrot
#

Also on data being switched

fluid river
#

i mean if you just go to c and do some ifs and then disassemble the resulting artifact

#

and look at code

mortal hare
fluid river
#

you just save millis to config and get millis from config

#

and only work around it when you want to display it to user

#

using SimpleDateFormat or smth similar

#

cuz saving it as date to config is just a waste of resources

#

and time

hazy parrot
#

I always freak out how little ms have passed since 50 years ago

mortal hare
#

i always freak out that c++ inventor is still alive

hazy parrot
#

How old is he

mortal hare
#

most of the god devs from 1970's are still alive

fluid river
#

freak out is my basic state

flint coyote
#

isn't your basic state freejava?

mortal hare
fluid river
unkempt peak
#

It makes you realize how new our technology really is

#

Kinda crazy

fluid river
#

first atomic station was built less than 100 years ago

mortal hare
#

"I Became A Programmer By Mistake" Says Bjarne Stroustrup

fluid river
#

Everybody in this discord be like

flint coyote
#

The first known filling station is from 1888

#

it was a pharmarcy though

sage dragon
#

Hey!

I'm currently trying to open a chest for a player.

When I do it, the chest doesn't visually open and InventoryClickEvents don't fire for this inventory.

This is how I currently do it:

Container container = (Container) block.getState();

player.openInventory(container.getInventory());
unkempt peak
#

Are you trying to open a chest that is in the world or just an inventory?

sage dragon
unkempt peak
#

Well the chest ins't going to open becuase your just sending the inventory to the player, as far as the events go InventoryClickEvent should work

#

Have you tested it with a normal inventory?

#

send your event listener

#

Make sure your event is registered properly

shadow night
#

Reminds me of yesterday

unkempt peak
sage dragon
# unkempt peak send your event listener

This is the code for my InventoryClickEvent:

    @EventHandler(ignoreCancelled = true)
    public void onShulkerOpenAlternative(InventoryClickEvent e) {
        e.getWhoClicked().sendMessage("Click!");
        
        //Rest of the code

It does not fire.

It does fire if I re-open the chest and try again though

shadow night
unkempt peak
unkempt peak
sage dragon
sage dragon
unkempt peak
#

Hmm

#

What is the overall objective here?

#

Why do you need to listen to clicks from a physical chest?

sage dragon
unkempt peak
#

Can you explain that a bit better?

#

What does the menu do

#

And how is the menu related to the contents of the chest

sage dragon
# unkempt peak Can you explain that a bit better?

Yes, sorry.

I should probably just explain what plugin I'm working on...

Basically, I'm allowing players to open shulker boxes without even placing them.

To make the process of viewing multiple shulkers inside a chest easier/faster, I want to re-open the chest afterwards so you can either view the next shulker or do something else in the chest

unkempt peak
#

Ah ok

#

I can't think of a reason why the event wouldn't be called

#

The inventory is being displayed correctly to the player right

sage dragon
#

Yes, it is.

I haven't tried taking anything out of the inventory though.

Maybe the inventory isn't even working

#

Just tested.

The inventory isn't even real.

If I take items out of it, they just vanish as soon as I try to interact with them

simple schooner
#

how do I store entities in a yaml file

unkempt peak
#

So when you open the chest the normal way and click on a shulker box it's inventory it's contents are displayed to the player but when you re open the chest iventory and click on a shulker the event is not firing? @sage dragon

sage dragon
unkempt peak
#

not real how?

#

Oh, you will need to set the contents of the chest inventory after it is closed if that is what you mean

sage dragon
# unkempt peak not real how?

The inventory seems to be completely client-side.

If I take items out of it, they get removed as soon as I try interacting with them

unkempt peak
#

Oh weird

unkempt peak
unkempt peak
#

Actually that could cause issues if multiple people try to interact with the chest

sage dragon
#

Yes ๐Ÿ˜…

simple schooner
unkempt peak
#

Man I'm sorry i really don't know could be causing that