#help-development

1 messages Β· Page 2195 of 1

urban kernel
#

o

#

doesnt do

#

shit

sacred mountain
#

bruh

#

then

#

use oliver's screenshot

tender shard
#

click the maven reload button

urban kernel
#

click the "m"

tender shard
#

no

sacred mountain
#

what

tender shard
#

the reload button

sacred mountain
#

click the maven tab and click the 2 arrows

tender shard
sacred mountain
#

πŸ”„

limber owl
#

please

urban kernel
sacred mountain
opal sluice
#

Does someone know what could I use instead of ArmorStands to make holograms?

urban kernel
#

do u get there

sacred mountain
#

bruh

#

right hand side

#

please learn your ide first

somber hull
jagged quail
urban kernel
#

nope

tender shard
river oracle
#

How do you use maven and not even know where it's at πŸ’€

limber owl
somber hull
urban kernel
tender shard
tender shard
urban kernel
#

yessir

tardy delta
#

whats wrong with a second monitor lol

urban kernel
#

i hab pommers

sacred mountain
tender shard
sacred mountain
#

and not just created a pom.xml file

limber owl
somber hull
sacred mountain
tardy delta
#

πŸ™

jagged quail
#

its right there under where the build stuff is

river oracle
#

Funny guy I

sacred mountain
#

it makes more block in chunk? what does that even mean

limber owl
jagged quail
#

there will be a "Maven" tab

sacred mountain
#

right

tender shard
#

View -> Tool Windows -> Maven

sacred mountain
#

read this then

urban kernel
sacred mountain
#

i literally just googled blockpopulator

#

and thats the first thing that came up

tender shard
sacred mountain
#

whats up with ur google lmaoi

urban kernel
#

ok

#

i smached it

#

smashed

sacred mountain
#

rip monitor

somber hull
#

Ooo block population is something I’m gonna use

#

Didn’t know that existed

sacred mountain
urban kernel
#

rip lap

jagged quail
#

ok so wanna add the plugin version here

urban kernel
#

i hit reload

#

now what

jagged quail
#

any ways to add it?

urban kernel
#

getPlugin().gerVersion()

#

i think

sacred mountain
jagged quail
sacred mountain
#

you can just use a string if you like

sacred mountain
jagged quail
sacred mountain
#

get the plugin instance?

somber hull
sacred mountain
#

then

somber hull
#

Through your constructor

urban kernel
#

right i clicked reload

#

now

sacred mountain
#

plugin.getVersion() or whatever it is

urban kernel
#

what

sacred mountain
#

just follow the fricken thread

#

he says literally everything there

#

all the code is spoonfed right to you

urban kernel
#

pom err

sacred mountain
#

what error

urban kernel
#

nvm

sacred mountain
#

bruh

somber hull
#

Bruh

sacred mountain
#

cba to send more

#

just go check the thread

#

its all there

urban kernel
somber hull
sacred mountain
#

then get your ID?

sacred mountain
urban kernel
#

is that what i put

tardy delta
#

#checkEvery(long, TimeUnit) when

sacred mountain
#

update checker*

compact haven
#

wait is the update checker hard coded to only do spigot resources, given that it's taking a spigot resource id instead of a link?

jagged quail
#

πŸ€”

compact haven
#

lol

urban kernel
#

do i put trhe whole likn

#

or id

jagged quail
compact haven
#

the id

sacred mountain
#

private static final int SPIGOT_RESOURCE_ID = 59773;

#

it says ID right there

urban kernel
#

so
new UpdateChecker(this, UpdateCheckSource.SPIGOT, "102473")

tender shard
#

lol everyone here is talking about my update checker

#

what's the problem?

sacred mountain
jagged quail
#

deveroonie is trying to add it to his plugin

sacred mountain
#

without even looking at the wiki properly

tender shard
#

who?

compact haven
#

lol why are you making it a string

sacred mountain
#

deveroonie

urban kernel
tender shard
#

and to allow using the %%__RESOURCE__%% placeholder

compact haven
#

oh that's why you need what I proposed

sacred mountain
compact haven
#

I'll PR it sometime

tardy delta
#

just write your own updatechecker, problem solved ez

urban kernel
#

@tender shard is this right
new UpdateChecker(this, UpdateCheckSource.SPIGOT, "102473")

granite owl
#

potions get their color from a template sprite and then apply given color. is it somehow possible to apply this behavior to custom item sprites non potion related too?

tender shard
compact haven
#

yeah because spigot replaces placeholders

#

but that's depending on Spigot then

tender shard
#

that's why it's a string

compact haven
#

the update checker shouldn't depend on spigot ;-;

tender shard
#

it doesn't

sacred mountain
urban kernel
#

updaterijg

tender shard
#

noone forces you to use %%__RESOURCE

#

you could also simply not use that

#

so no, my updatechecker does not rely on spigot or anything else but the bukkit api

sacred mountain
#

immediate update notifs would be so hot

tender shard
#

you can do that

sacred mountain
#

woah

#

how

tender shard
#

you can provide a consumer

#

onFail and onSuccess

sacred mountain
#

lets go

urban kernel
#

jar goes from 12kb to 42kb

compact haven
#

that wouldn't do what he's talking about tho

tender shard
#

Nemo addedf the consumer stuff though

sacred mountain
compact haven
#

he means like he posts an update and all running servers instantly get the message

tender shard
#

all my plugins are like 1.5 mb

terse raven
#

how do i prevent spigot from removing ghost blocks on interaction

granite owl
sacred mountain
humble tulip
sacred mountain
#

adding a new item would need the server and the client to have something installed

tender shard
granite owl
humble tulip
#

Idk how i got an A but some abomination of repos get A+

sacred mountain
granite owl
#

no

tender shard
#

codefactor is upper bullshit

granite owl
#

is it possible to make use of the potions color system with a custommodeldata?

sacred mountain
#

i mean you can have a texture that changes based on some properties

#

just have a bunch of tesxtures with different colors

terse raven
#

then probably yes

sacred mountain
#

and set the property in the PDC or something idk how that works

jagged quail
granite owl
#

ik how i can hardcode new item sprites

jagged quail
#

with bStats and Jeff Media update checker

tender shard
terse raven
sacred mountain
#

before i shadowjarred and stopped shading all my libraries my plugin was like 10 mb

terse raven
#

you can always generate sprites on the fly and resend them to the client, just dont do that too often

urban kernel
#

a version that came out 2m ago about to be outdate

granite owl
# terse raven wdym

i want to use the potions color system on other items only using a resource pack and custom model data

tender shard
#

that's almost enough to run a whole MC server lol

sacred mountain
#

like the entire google commons and stuff

sacred mountain
#

i basically nebver removed anything from my pom because i forgot

terse raven
# granite owl i want to use the potions color system on other items only using a resource pack...

Today I'll show you an exceptionally cool trick on how to design new blocks within Minecraft itself!

β–ΊSubscribe - http://bit.ly/Subscribe_Sarc
β–ΊFollow Me On Twitter - http://bit.ly/SarcTweet

───────
Other info:
───────

Music: http://incompetech.com
Sound Effects: http://www.freesfx.co.uk/

β–Ά Play video
tender shard
#

it is

terse raven
#

he does something similiar

tender shard
#

it'S 13.99€

compact haven
#

nvm Im stupid

sacred mountain
#

it's his plugin

#

lmfao

reef lagoon
#

how do i convert a string to an offline player

jagged quail
tender shard
compact haven
#

I saw your download thing but then realized, well duh he'd be logged in

sacred mountain
#

async?

reef lagoon
tender shard
#

what does the string look like?

#

is it a UUID?

reef lagoon
#

a discord message

tender shard
#

wtf

terse raven
#

yea

sacred mountain
#

LFMAO

terse raven
#

wtf

sacred mountain
#

i agre

jagged quail
#

@tender shard

reef lagoon
#

tryna do !stats player in jda

terse raven
#

oh

#

get uuid from username

#

and then look it up in your database

reef lagoon
#

ty

urban kernel
#

why cant i download 1.1.0 of my plugon

terse raven
#

i know i could just resend it

urban kernel
#

why do i habe to download latest

terse raven
#

but that would send 2 block changes

#

and i just want to prevent the "air" one from being send

tender shard
urban kernel
#

yeah i have

tender shard
#

then you can download any version

urban kernel
#

ah

#

what

#

my version that was out for 5m has 2 downloads

#

and then latest has 1

tender shard
#

you can download any version from the version history. unless you used an external link

urban kernel
terse raven
#

click the "Download" button

urban kernel
#

i did

#

im showing dls

terse raven
#

then what happened

urban kernel
#

oh no

#

outdate

terse raven
#

uhm

#

what

urban kernel
#

essentialsk is outdated

#

!!!

terse raven
urban kernel
#

no

terse raven
#

then how is that coding related?

urban kernel
#

im showing that essentialsk updater works

terse raven
#

oh okay

urban kernel
#

your essentialsk is outdate

terse raven
humble tulip
#

Enssentialsk is already a plugin

urban kernel
#

uh

humble tulip
#

πŸ˜‚πŸ˜‚

limber owl
#

how can I make more ores generate, anyhow except using ChunkGenerator please

terse raven
#

i am pretty sure Essentials + [any letter of the alphabet] is already taken

urban kernel
#

essentialskock

terse raven
terse raven
urban kernel
#

essentialsk an sue me then'

#

can

reef lagoon
#

is there a way to get the playtime of an offline player (ignored)

humble tulip
#

Lol no

#

Pretty sure they didn't trademark their plugin name

terse raven
#

he wouldnt be so happy

tender shard
subtle folio
#

im trying to win an argument

misty current
#

kinda

#

could be worse

tender shard
urban kernel
#

how do i check if args is player

humble tulip
#

Just pass the file path int he constructor

limber owl
misty current
#

i'd rather put the stuff you have in the setup method into the static constructor of the class

subtle folio
#

thank you gaymers

#

new Instance would be better πŸ˜›

tender shard
subtle folio
#

mbmb

misty current
#
static {
  //your setup code
}
tender shard
subtle folio
#

Redlib vs JeffLib

#

who will win

misty current
#

lmao

tender shard
terse raven
#

how do i prevent spigot from removing ghost blocks on player interaction

subtle folio
#

ive tried jeff lib already, redlib suprememcy πŸ˜›

tender shard
#

of course redempt's lib has some useful features but so does mine

#

it's not like you'd have to choose between one of them lol

misty current
subtle folio
#

what is their to gain from using your's?

#

that redlib doesnt alreayd have

terse raven
subtle folio
subtle folio
#

tuokes

#

tuples

#

omg python

tender shard
#

yeah tuples are weird

#

one should rather create a custom object instead of using tuples

subtle folio
#

but what if i am weird

tardy delta
#

can you link me the github

subtle folio
#

lmfao

tender shard
#

do you want to be loved by me though? probbaly not

subtle folio
#

yes i do

tender shard
#

ok

#

❀️

tardy delta
tender shard
#

but yeah tuples suck

#

I mean sometimes you just need to return two objects and then a Pair<A,B> is nice

subtle folio
#

fs

#

but at the same time,

tender shard
#

but most of the time creating a custom object that holds both (or more) values is better

subtle folio
#

list<UUID> also works

#

oh waitim

#

im silly yes

tardy delta
#

spigot
πŸ‘…

#

what api version

tender shard
#

no

#

for example this is something where I consider a Pair to be ok:

    public @Nullable Pair<String,Boolean> isItemBlacklisted(final ItemStack item) {
        if (!Stepsister.allows(PremiumFeatures.GENERIC)) { // Don't add feature here, gets called for every item on death
            return null;
        }
        for (final BlacklistEntry entry : itemBlacklist.values()) {
            final BlacklistResult result = entry.matches(item);
            if (result == BlacklistResult.MATCH_IGNORE) {
                return new Pair<>(result.getName(), false);
            } else if (result == BlacklistResult.MATCH_DELETE) {
                return new Pair<>(result.getName(), true);
            }
        }
        return null;
    }
lost matrix
#

If you compile your plugin with a higher version and run it on an older server then yes.

tender shard
#

anythin that's only a bit more complex should not return a Pair but something like MethodThatWasCalledResult instead

tardy delta
#

why not just returning a nullable string?

restive mango
#

How might I make a projectile pass through solid blocks?

tardy delta
#

ah wait

tender shard
tardy delta
#

i see mb

subtle folio
#

is there a benefit from making things final?

#

like if they can be should I?

lost matrix
tender shard
#

the benefit is that you always know that this object will never change

#

well

#

not the object but the reference

subtle folio
#

that seems kinda dumb

tender shard
#

not at all

subtle folio
#

still gonna do it

restive mango
#

@lost matrix my other thought is a packet based strategy

tardy delta
#

people want the let keyword 🀀

#

jk

subtle folio
#

let urmom = gay

lost matrix
tender shard
subtle folio
#

TRUE

#

i like the way you think

tardy delta
#

πŸ€”

lost matrix
tender shard
#

I would always make everything final

restive mango
#

β€˜This does NOT prevent block collisions, and explosions will still occur unless their respective events are cancelled.’

#

says javadocs

lost matrix
#

Its quite the task.

tender shard
# lost matrix In what dimension?

hm idk you're probably hetero, so imagine this:

You're looking for a sex date. You open Tinder (or any other dating app). You write with some girl for half an hour before you realize she's not interested in you. Meanwhile I already sent my date home again lol.

#

that's how Grindr works

restive mango
#

I wish I knew how to make custom entity classes server-side 😭

quaint mantle
#

like bumbl

#

or something

tender shard
subtle folio
#

thats not gay

restive mango
#

Maybe I could tamper with projectile movement AI or something

subtle folio
#

bumble is straight πŸ˜›

#

personal experience

tender shard
#

I only know GayRomeo and Grindr

subtle folio
#

Grindr is where it at

quaint mantle
#

gayromeo πŸ’€

tender shard
lost matrix
tender shard
#

and imajin, imagine: if mfnalex says that someone is weird, they definitely must be weird

quaint mantle
#

yus

#

swinger club

#

i learned that existed from jeff ^

tender shard
#

so yeah all dating apps suck lol. I just want someone to cuddle with πŸ˜΅β€πŸ’« lol

sacred mountain
#

the only dating app i've ever heard about is tinder

#

I just do stuff irl

tender shard
sacred mountain
#

im not going out of my way to drive to someones house

tender shard
#

oh that reminds me to do a rapid test rn

vocal cloud
#

Get a body pillow uwu

sacred mountain
tender shard
#

lol

tardy delta
#

garfield lol

sacred mountain
#

had one since 2009 or something when i was a kid

subtle folio
sacred mountain
#

i thought it would have decomposed by now

tardy delta
#

whats a body pillow btw

sacred mountain
#

but its still in good shape

#

i bit the corner off

subtle folio
sacred mountain
#

or do other stuff

#

waifu body pillows are mid

humble tulip
#

Mods pls delet

sacred mountain
#

shes 2d

lost matrix
sacred mountain
#

its fine

terse raven
#

how do i prevent spigot from removing ghost blocks on interaction

tardy delta
subtle folio
#

woah wtf

sacred mountain
#

if i saw that irl i would be scared as fuck

subtle folio
#

im seeing it online and im scared asf

lost matrix
terse raven
tardy delta
#

got five tags for that image, tells alot.. uwu

humble tulip
#

It was a joke lol

lost matrix
humble tulip
#

U may have to actually send the packet

terse raven
tardy delta
#

bruh they really deleted it

echo basalt
#

you can either cancel or resend

tardy delta
#

whats wrong with it

echo basalt
#

generally doing both works best

sacred mountain
quaint mantle
quaint mantle
tender shard
#

I love this discord

subtle folio
sacred mountain
tardy delta
sour brook
sacred mountain
humble tulip
#

Alllllright

sacred mountain
#

Β―_(ツ)_/Β―

tender shard
#

on other discord, discussions about "how fast can you get laid" are quickly ended once staff joins. BUt here, the opposite is true lol

humble tulip
#

Ima log off

tardy delta
#

dont ban me btw

sacred mountain
tender shard
humble tulip
#

/ban @tardy delta

tender shard
tender shard
humble tulip
#

The server i was dev on forgot to remove my perms

sacred mountain
#

real*

tardy delta
#

he has a body pillow gf

#

jk

quaint mantle
sacred mountain
#

nuke it

humble tulip
#

Haha nah

#

I'm friends with the owner

sacred mountain
#

friends are temporary

tender shard
sacred mountain
#

victory is forever

tender shard
#

"my ex gfs made me gay"

tardy delta
#

lmao

quaint mantle
#

i was so mad

subtle folio
#

"my ex gfs made me gay"
Relatable πŸ‘€

tender shard
tender shard
#

you know, there's also one additional adventage when being gay: girls on the internet won't find you creepy, because they know you're not interested in them anyway

tardy delta
#

what are gfs btw

subtle folio
#

this entiere server is fully of virgins

quaint mantle
sacred mountain
#

german firearms

tender shard
#

so yeah 100% can recommend being into dudes

sacred mountain
tardy delta
#

πŸ’€

tender shard
sacred mountain
tender shard
#

np :3

sour brook
humble tulip
#

Pff imajin having gfs

tender shard
sacred mountain
#

younger than 25 you say

#

🀨

tender shard
sacred mountain
#

a newborn fits this criteria

tender shard
#

anyway lets stop this

sacred mountain
#

🀨

tender shard
#

we're not in #general ol

sacred mountain
#

i guess it's ok as long as we dont ignore them

tender shard
#

I always invade this chat by accident

vale ember
#

what would be the equivalent of new File(File, String) in java's NIO?

sacred mountain
tender shard
compact haven
sacred mountain
#

path string

lost matrix
compact haven
#

gf monopolizing choco pfp ;<

#

I want dog instead tbh

vale ember
#

File.toPath().resolve(String) is this right?

tender shard
sour brook
compact haven
#

choco used to have one of his huskys in the pfp

tender shard
#

oh didnt know

lost matrix
#
      //initialize Path object
      Path path = Paths.get("D:file.txt");
      //create file
      try {
         Path createdFilePath = Files.createFile(path);
         System.out.println("Created a file at : " + createdFilePath);
      } catch (IOException e) {
         e.printStackTrace();
      }
compact haven
#

doggie

sacred mountain
#

discord should add auto indenting

tender shard
#

that works?

#

shouldnt it be D:\file.txt

sacred mountain
#

whenever i copy paste code from somewhere in my ide it always ends up like

int blah = 0;
                                                          int blah1 = 1;```
lost matrix
#

D:file.txt is a valid uri

tender shard
lost matrix
tender shard
#

Ctrl+Shift+L IIRC

#

or Ctrl+Alt+L

sacred mountain
#

no i meant like

tender shard
#

sth like that

sacred mountain
#

into discord

#

from my ide

tender shard
#

eclipse user detected

sacred mountain
#

what

#

eclipse is pain

tender shard
#

those weird formattings only happen when you mix tabs and spaces

sour brook
tender shard
sacred mountain
tender shard
#

eclipse is shitty. the only advantage of eclipse is that it's open source

sacred mountain
#

eclispe is like

#

for just java

#

base java

sour brook
#

But for beginners, intellji is better

sacred mountain
#

well yes but the balance between good features and ram usage

eternal oxide
#

❀️ Eclipse

lost matrix
chrome beacon
compact haven
#

vim > intellij

sacred mountain
#

vim is bruh

ivory sleet
#

vim intellij plugin x)

compact haven
#

is that a thing lol

sacred mountain
#

:wq

lost matrix
tender shard
sour brook
ivory sleet
lost matrix
chrome beacon
tender shard
sacred mountain
#

vim uses hjkl or something to move the cursor

tender shard
#

but I have a university email address

#

so why not use it

sour brook
lost matrix
sacred mountain
tender shard
sacred mountain
#

ive never seen eclipse dark mode

#

does it exist

sour brook
lost matrix
chrome beacon
sacred mountain
#

how much ram does IJ use?

humble tulip
#

0 if you keep it closed

lost matrix
ivory sleet
#

I mean depends

lost matrix
#

Code completion for raw sql when writing code.

#

Actual useful completions when sending queries from Intellij

humble tulip
#

O damn

#

Wtf

#

That's cool

chrome beacon
#

Looks neat

sacred mountain
#

no more strings

#

well its a string stilll but

#

code completion

#

syntax highlight

humble tulip
#

Unfortunately i dont have ultimate so we just write our queries and hope it runs

sacred mountain
#

lmao

#

how much is ultimate?

#

jesus

humble tulip
#

Idek

#

Not worth for me though

lost matrix
sacred mountain
#

400 quid

sacred mountain
#

thats a lotta money

#

incl. VAT Β£478.80

quaint mantle
lost matrix
sacred mountain
#

uni?

lost matrix
quaint mantle
#

oh

lost matrix
sacred mountain
#

neat

#

how

subtle folio
#

gaymers, reloadConfig(); does not reload new data inputted in the config.yml until i erload the plugin

lost matrix
sacred mountain
#

thanks

tender shard
lost matrix
subtle folio
#

unfortunately not

sacred mountain
#

my school email worked aha

#

is there some sort of government list of school email

#

extensions? whats the word

lost matrix
sacred mountain
chrome beacon
#

I guess you aren't the first one with that domain to register

lost matrix
terse raven
#

my school doesn't have isic or an edu Mail ._.

sacred mountain
#

well

#

warwickshire

lost matrix
terse raven
sacred mountain
terse raven
#

we only have an internal school mail system

golden turret
#

so with that i can set a different attack speed for each item?

terse raven
#

that cant send or receive mails from outside

#

._.

golden turret
opal juniper
#

at what length is a line of code too long

terse raven
#

if you need to scroll

opal juniper
#

it’s just these streams making it kinda long

terse raven
#

then add a new line

#

before every dot

lost matrix
opal juniper
#

i like your thinking

sacred mountain
lost matrix
#

I usually have a cap in between 120 and 150
120 for public projects

sacred mountain
#

i keep emailing myself things that i probably shouldnt have

tender shard
#

or 120

terse raven
# sacred mountain rip

i just noticed my github account is called "StayWithMeSenpai", i think i should rename it and remove the anime profile picture

sacred mountain
#

font size 5

#

efficient code πŸ‘

sacred mountain
lost matrix
terse raven
#

i am called "StayWithMeSenpai" on most sites

#

lmao

tender shard
sacred mountain
#

🀨

#

png

#

im gonna run it

lost matrix
#

rename it to png.exe

#

lol

sacred mountain
#

done

#

is this gonna hack me

#

is it safe to run

#

seems fine

lost matrix
#

its literally the png ive sent

sacred mountain
#

oh

#

bruh

#

i was gonna run it

#

πŸ˜”

brittle lily
#

Guys for setup server which one is better? localhost or ||minehut||

tender shard
sacred mountain
#

yay

opal juniper
#

i will not be downloading a rar file from some random german guy

tender shard
#

in real life he looks exactly the same

tall dragon
#

sooo

#

what do you do

tender shard
#

you have to get rid of the dude sitting oh the touch, to get to the second level

#

you can get rid of him by cooking the fish that you can find inside the right side of the couch

#

but to do so you first have to get drunk

tender shard
tall dragon
#

this is some peak gameplay

lost matrix
#

looks like unreal engine 5 was used.

tender shard
#

Visionaire Studio

#

I have even bought it for this weird game lol

#

it's a bit like unity

lost matrix
idle loom
#

how do split a component, since yk its not a string

tender shard
#

I am from MΓΌnster, if that's your question

tall dragon
#

oh and if you click esc

#

it just closes

#

ok

tender shard
#

so do not use it lol

tall dragon
#

ye

#

thanks for the warning πŸ‘

lost matrix
tender shard
lost matrix
idle loom
#

?

#

what

lost matrix
#

What type of component

tender shard
#

what "component"?

#

an bungee component?

#

probably

#

since he said "?" after you asked "adventure" @lost matrix

lost matrix
#

Sounds like a 1.8 problem. What spigot version are you using?

idle loom
tender shard
#

why do you check their Y location in the first place

#

?xy

undone axleBOT
tender shard
#

because "why"

lost matrix
#

What are you trying to do in the first place?

tender shard
#

no I simply wonder why you only want to cancel blockbreaks depending on the player's Y position

#

well it's exactly what you're doig though

tall dragon
#

i think he is trying to stop players from glitching up

#

rapidly placing blocks

#

that are being cancelled

#

u know how they are there for like a tiny amount of time

lost matrix
#

Use an anti cheat. The server basically sees this as flying because the blocks never exist on the server side.

tender shard
#

preventing stuff like this is "tedious" at best

lost matrix
#

Then they should not be able to glitch up unless you are doing some bad block placing cancels that replace the block with air one tick later.

humble tulip
#

Check if the block they clicked to place the block is air then cancel

lost matrix
#

Just write in your rules that it is not allowed to glitch up.
Then they wont be able to do it because it would be against the rules of the server.

terse raven
#

and then cancel the movement / roll them back

brittle lily
#

first time I tried something like that Can you guys say my faults/mistakes to me?

lost matrix
brittle lily
#
  1. The first method is obsolete.
    Oh really?
lost matrix
#

It does nothing besides calling p.sendTitle.
Why would you call that method instead of the one from Player?

brittle lily
#

Oh like to said I tried something like that first time. I'm trying to get used/learn to these methods. Just I have seen some codes like that and I wanted to try this.

eager knoll
#

help

subtle folio
#

With?

lost matrix
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!

eager knoll
#

The setClickEvent is giving me errors, I tried multiple ways of sending a link but none are working.

subtle folio
#

link.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "url"));

tardy delta
#

ComponentBuilder is much nicer

subtle folio
#

example: #setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://www.youtube.com/watch?v=dQw4w9WgXcQ"));

humble tulip
#

takes abt 1 ms to create an inv and populate it

lost matrix
humble tulip
#

i wanna do it on join

humble tulip
#

but i'm thinking to generate them as needed

subtle folio
tardy delta
humble tulip
#

most of the time it's gonna be like 4-5 invs on join to load up

lost matrix
tardy delta
#

ill save that screen for later

humble tulip
#

it's not a gui

#

it's with storage stuff but also has gui elements

lost matrix
#

So its a storage gui... which is still a gui.

humble tulip
#

well yeah

#

guess i can change how they are generated

#

it was a pain to follow the logic but ill write some pseudocode and change it

lost matrix
#

But that doesnt matter. Observer pattern -> load the data always. -> Create a gui when needed to interact with the data.

humble tulip
#

that was my original plan

#

then realized it was easier to load all the guis on join

#

now i may go back to generating as needed

lost matrix
#

Are the guis just multiple pages of a single storage space?

humble tulip
#

ye

lost matrix
humble tulip
#

nah

iron glade
#

Any paginated gui LiBrArY you can recommend?

humble tulip
#

isn't there one called pagination

dire marsh
#

inventoryframework

grim ice
iron glade
#

do you have links so I can check them all out

dire marsh
grim ice
#

lmao

iron glade
#

:D

lost matrix
# iron glade Any paginated gui LiBrArY you can recommend?

Its quite hard to recommend one because most that ive used had trashy implementations and i
ended up writing my own gui library.

Im currently forced to use Triumph. I dont completely like how they implement their guis but
its performant and the API is easy to understand.

lost matrix
# humble tulip nah

Actually let me write a very quick storage GUI with Triumph to show that its quite easy.
Assumption: the data is stored as List<ItemStack>

humble tulip
#

i use ItemStack[]

#

but it's whatever

iron glade
iron glade
grim ice
#

and found them naming a nsk

#

with a capital letter

#

:O

dire marsh
#

a what

grim ice
#

namespacedkey

dire marsh
#

oh

humble tulip
#

@lost matrix Just lookedat Triumph

#

can it do the scrolling inv for storage?

#

wait actually i dont wanna do that

lost matrix
humble tulip
#

can lead to dupes since i want admins to also be able to open the invs as well

grim ice
#

and they have some obsession with ifs and elses and they never use switches or ternary operators

grim ice
#

IF

#

they also have trouble naming methods but it doesnt really matter since theyre documented

lost matrix
grim ice
#

lmao

lost matrix
#

It doesnt look too bad

grim ice
#

ye except they have some methods with repeated implementation

#

e.g

    public ShulkerBoxGui copy() {
        ShulkerBoxGui gui = new ShulkerBoxGui(getTitleHolder());

        gui.inventoryComponent = inventoryComponent.copy();

        gui.setOnTopClick(this.onTopClick);
        gui.setOnBottomClick(this.onBottomClick);
        gui.setOnGlobalClick(this.onGlobalClick);
        gui.setOnOutsideClick(this.onOutsideClick);
        gui.setOnClose(this.onClose);

        return gui;
    }```
#

ive seen this a million times, just with different types

tardy delta
#

#clone 😒

grim ice
#

actually its a bit different from on to another

#

but they can just make a list of inventory components

#

and copy them instead of hard coding it to the amount of components in each type

#

also what the

#
        if (rawSlot == 0) {
            getFirstItemComponent().click(this, event, 0);
        } else if (rawSlot == 1) {
            getSecondItemComponent().click(this, event, 0);
        } else if (rawSlot == 2) {
            getResultComponent().click(this, event, 0);
        } else {
tardy delta
#

Β―_(ツ)_/Β―

grim ice
#

without the documentation, it would be real hard to maintain this lol

lost matrix
quaint mantle
#
Component component = this.components[rawSlot];

if (component != null) {
    component.click(this, event, 0);
}
sterile token
#

What events allow player getting damage?

lost matrix
sterile token
#

Yes i know that

#

But what about arrows?

#

Do they do damage?

lost matrix
#

EntityDamageEvent

tardy delta
#

Entity#damage

sterile token
#

Oh ok, so EntityDamageEvent is the master event right?

tardy delta
#

yes master πŸ™

sterile token
#

Thanks

lost matrix
#

No. Event is the "master" event

tardy delta
#

idk what you mean

sterile token
#

By master i ref if i cancel entity damage it doesnt allow any type of damage

#

Because im calling it, and them i dont know why im getting damaged

granite owl
#

braindead question but like how do i retrieve the "Potion of xyz" name from potions without custom display name? xD

somber hull
#

Can I listen to all events

#

And cancel them

#

Ig except player join event

somber hull
tardy delta
#

iirc you cant

eternal oxide
#

No, Event is Abstract

tardy delta
#

you can still put it as parameter πŸ˜‰

eternal oxide
#

Well you can, but it will never trigger

grim ice
#

why

tardy delta
#

cause it doesnt make sense, you should listen to a specific event instead

sterile token
#

Hey

#

Why the heck cancelling EntityDamageEvent i have fall dmage?

#

πŸ€”

iron glade
#

wdym?

sterile token
#

Yeah

iron glade
#

More context pls

sterile token
#

I have cancelled EntityDamageEvent, and if i fell from high, i have damage

iron glade
#

Show your code

sterile token
#

all

iron glade
#

just the event

#

?paste

undone axleBOT
sterile token
#

i ill open intellij because if not it a mess

#

Sorry for time, but my intellij didnt want to respond

#

IDK why it consume 4gb of ram

iron glade
#

Registered your event ?

sterile token
#

And i have 32gb so idk

sterile token
iron glade
#

try debugging it

sterile token
#

Wait

iron glade
#

Also you shouldnt cast to player without checking

sterile token
#

Because i need to 2 diff flag, one only for player damage and second for animals

#

HMn?

lost matrix
#

Just do a check in the EntityDamageEvent

sterile token
#

Oh the javadocs are updated

#

I never realized

#

For some reaon i coding on 1.18.8 and where looking on 1.8 javadocs

#

Please dont kill me

#

πŸ˜‚

iron glade
#

didn't know 1.18.8 is out already

eternal oxide
#

You are from the future

sterile token
#

Wait 1.18?

iron glade
#

1.18.2 is the latest one

sterile token
#

Yeah

#

Okay?

#

Mi IDE is crazy

#

Is telling me that getPlayer is okay

eternal oxide
#

Thats impossible, unless you have ALL warnings and errors turned off

sterile token
#

Oh

#

Wait

#

Maybe i disabled them

eternal oxide
#

or your IDE is Notepad

sterile token
#

Yesterday i was trying to take out

#

try-finally warnings

#

Yeah it was that

lost matrix
#

Dont disable any warnings at all. Correct them.

sterile token
#

My bad

#

Dont get mad :D

iron glade
#

Actually something that is really annoying me is that whenever I change some code that was used in other classes it doesn't immediately point out to those classes that there's an error now.. any way to fix it? In eclipse it was instantly, intellij somehow not doing that for me

sterile token
#

I alo hate github copilot, because it recommend some method that i dont want it

#

But if i press tab it write the whole fucked code

iron glade
#

disable it then if it's doing more bad than good

sterile token
#

So it helpful but sometime itds anoyying

#

I dont know why VSCode has a really good github copilot extension, but the IDE is really slow

sterile token
#

Lmao looking the docs, how the heck i get the player so?

#

I dont find the method

#

It doesnt contain any getPlayer() neither getEntity()

sterile token
#

My bad

austere solstice
#

Hello guys, I have a question. I want player first click Choose Block in GUI and then select item in inventory. I make first part but in "Case" I dont know how can I make second part

lost matrix
tardy delta
#

why the $ lol

#

money money

shadow gazelle
#

Any ideas for how I could compress this?

    private int checkCrop(Location location, Material material, boolean twoMaterials, Material secondMaterial) {
        location.add(0D, 1.0D, 0D);
        int amount = 1;
        final Block blockAtLoc = location.getBlock();

        if (!twoMaterials) {
            if (blockAtLoc.getType().equals(material)) {
                if (blockAtLoc.getBlockData() instanceof Waterlogged
                        && ((Waterlogged) location.getBlock().getBlockData()).isWaterlogged()) {
                    location.getBlock().setType(Material.WATER);
                } else {
                    location.getBlock().setType(Material.AIR);
                }
                amount = amount + this.checkCrop(location, material, twoMaterials, secondMaterial);
                return amount;
            }
        } else {
            if (blockAtLoc.getType().equals(material) || blockAtLoc.getType().equals(secondMaterial)) {
                if (blockAtLoc.getBlockData() instanceof Waterlogged
                        && ((Waterlogged) location.getBlock().getBlockData()).isWaterlogged()) {
                    location.getBlock().setType(Material.WATER);
                } else {
                    location.getBlock().setType(Material.AIR);
                }
                amount = amount + this.checkCrop(location, material, twoMaterials, secondMaterial);
                return amount;
            }
        }
        return amount;
    }
#

I'm pretty sure it could be compressed, but I can't figure out how

tardy delta
#

ah

shadow gazelle
#

what

#

wait, I could replace that with a loop πŸ€”

tardy delta
#

hmm actually

#

return and increment in one line

#

dont negate boolean if youre going to use an else

paper viper
#

(it's 8 hours, but you can skip to important parts)

ivory sleet
#

😌

paper viper
#

conclure certified

ivory sleet
#

pulse double certified

shadow gazelle
paper viper
#

No no no

shadow gazelle
#

I've been working on remaking the plugin for too long

paper viper
#

Making it 1 method makes it worse

#

Divide it into smaller methods

#

Have one big method and have it call smaller methods

#

and those smaller methods call smaller methods

shadow gazelle
#

I know

ivory sleet
#

there's a fundamental rule, every line in a function should be at the same level of abstraction elephant

paper viper
#

A very very loose rule you can follow is that if your method is more than 2 indentations you should probably write another separate method (but obviously it's very loose)

ivory sleet
#

by having colossal functions you most likely violate that rule

sterile token
paper viper
#

it varies

sterile token
#

its really extrange;

int $1;
int $2;

paper viper
#

no thats just bad

#

lol

#

please dont do that for no reason

sterile token
#

Specially in objects they uses

paper viper
#

xD

sterile token
#

Yeah i dont event like how the code looks

#

πŸ˜‚

ivory sleet
#

Java OFFICIALLY says not to use $

tardy delta
#

looks like php

sterile token
#

php?

#

Php-Shit

#

that the full name

tardy delta
#

correct

paper viper
#

I actually use 0 after method names sometimes

sterile token
#

I team #NextJS

tardy delta
#

ye same

paper viper
#

for stuff that doesnt want to be exposed

#

internals

tardy delta
#

just internal stuff

shadow gazelle
#

This seems better and actually uses a loop instead of re-running itself every time

    private int checkCrop(Location location, final Material material, final boolean twoMaterials, final Material secondMaterial) {
        int amount = 1;

        while (twoMaterials ? (location.add(0D, 1.0D, 0D).getBlock().getType().equals(material)
                || location.add(0D, 1.0D, 0D).getBlock().getType().equals(secondMaterial))
                : location.add(0D, 1.0D, 0D).getBlock().getType().equals(material)) {

            if (location.getBlock().getBlockData() instanceof Waterlogged
                    && ((Waterlogged) location.getBlock().getBlockData()).isWaterlogged()) {
                location.getBlock().setType(Material.WATER);
            } else {
                location.getBlock().setType(Material.AIR);
            }
            amount += 1;
        }
        return amount;
    }
paper viper
#

mhm

sterile token
#

But i use Typescript instead of javascript

tardy delta
#

aaaaa

sterile token
#

you fourten?

paper viper
#

lol

#

that conditional

#

oh boy

#

also

#

amount += 1;

crude estuary
#

if else if else if else if else

tardy delta
#

nothing seems better lol

paper viper
#

you know

sterile token
paper viper
#

you can just do amount++;

#

right

#

lol

tardy delta
#

rust doesnt have ++ :(

#

i += 1

ivory sleet
#

rust officially bad x)) /s

tardy delta
#

no u

shadow gazelle
sterile token
paper viper
#

does anyone know any good cross compilers out there that are like free and accessible

#

i feel like i rip my brains out trying to find os disks to run virtual machines

#

for like c++ and stuff

shadow gazelle
#

I did

sterile token
#

fourten?