#dev-general

1 messages · Page 27 of 1

prisma wave
#

no

#

that's not true

distant sun
prisma wave
#

thing 1 is fast
thing 2 is not fast

more than 1 thing, but thing 1 is clearly the best!

#

shocking

distant sun
#

Thanks, I was really looking for a math lib

half harness
#

lol np

prisma wave
#

no problem

#

any time

half harness
#

tldr:
Q: What's the best library to use for fast math?
lib 1: 10ms
lib 2: 50ms
A: lib 1 is the best option

cinder flare
#

Bro does not understand comparisons between things based on quantitative and qualitative measurements

prisma wave
#

i just said that dkim

#

smh

half harness
#

oh

#

oops

distant sun
#

tldr:
Q: What's the best library to use for fast math?
lib 1: 10ms
lib 2: 50ms
A: lib 1 is the best option

prisma wave
#

very well said

#

sums it up perfectly

ocean quartz
#

It's like arguing that there isn't an objective better when comparing in terms of speed between an F1 car and a fucking Fiat Multipla

distant sun
#

I don't have micro (mu) on my keyboard, so ms is all you get

prisma wave
#

yeah 50ms is actually pretty terrible lmao

#

so's 10 really

cinder flare
prisma wave
#

i bet at least 1 person does

distant sun
#

Smh Star

cinder flare
#

I guess the Greeks maybe

#

I dunno if they still like use that as their primary alphabet lol

distant sun
prisma wave
#

It’s fast and easy in a way that alternatives aren’t

cinder flare
#

Or why most people use a config library that's not snakeyaml if they possibly can

pastel imp
#

I left for a few minutes and a whole war happened here

prisma wave
#

classic really

distant sun
#

The daily 10PM war

prisma wave
#

um actually it's only 9pm 🤓

cinder flare
#

um actually it's only 2pm 🤓

prisma wave
#

loser

#

get this guy out

distant sun
#

The daily <t:1683835012> war

cinder flare
#

Look I have the whole day ahead of me

half harness
#

3:56pm

prisma wave
#

thats straight up just embarrassing

half harness
#

😌

cinder flare
distant sun
#

Ah darn it

half harness
#

The daily 18 hours ago war

distant sun
#

I give up

half harness
#

🙃

pastel imp
prisma wave
#

L

half harness
#

The daily <t:1683835020:t> war

cinder flare
#

L

#

nice

distant sun
#

Google lied to me

half harness
#

Google told the truth to me

#

😌

wind patio
prisma wave
#

man you just missed like a 6hr one

#

was gonna do another in a lil bit though

wind patio
#

ainnoway

#

wrong timezone

prisma wave
#

epic fail

wind patio
#

EEST 😩

prisma wave
#

move house

#

to a better country

wind patio
#

anything but murrica

static zealot
#

yes

#

they said better

prisma wave
#

oh of course

#

yeah lmao

wind patio
#

never heard of anything remotely close in my country unlike in murrica where you get killed because you added to much mayo on customer's sandwitch

prisma wave
#

it's ok

#

this is a development topic

#

kind of

wind patio
#

story development

prisma wave
#

indeed

prisma wave
#

thats a weasel actually

crude cloud
#

@bardy

prisma wave
#

oh yeah lmao

half harness
#

wait what

quiet depot
#

yes, you can do whatever you want

ebon grotto
#

thanks!

#

even using vscode for java mouhahahaa

distant sun
#

I guess we can't stop you

half harness
#

🛑

ebon grotto
ocean quartz
#

Or is this a paper's forum problem? thonk

half harness
#

oh wait nvm

#

ignore me

#

😃

#

i clicked open the image in new tab and saw "jsdelivr.net" and my brain thought that was like a username or smth

ionic gust
crude cloud
#

1.5
150

#

how are you calculating that lmfao

ionic gust
#

major*100+minor*10+patch

half harness
#

what does ur api use this value for

ionic gust
half harness
#

oh are you using nms?

#

👀

ionic gust
#

no

half harness
#

oh

ionic gust
#

but i remember seeing somewhere that reflection is expensive or something

half harness
#

only the search part

#

i think

#

if you cache it then it should be fine

ionic gust
#

ye i do

#

but i mean

#

might as well check when caching

half harness
#

tru

ionic gust
#

and i might end up using it for more stuff in the future

#

cause im also using it to give ppl using 1.13-1.13.1 a warning that i dont care about them

half harness
#

btw

#

what api was added in 1.11

ionic gust
crude cloud
#

not really what i asked

ionic gust
ionic gust
crude cloud
#

i seriously doubt 150 servers are running 1.5 and using your plugins lmao

ionic gust
#

its just a numerical value for versions

half harness
#

🥲

crude cloud
#

oh that's how you discern versions i see

#

what if mojang decides to release Minecraft 2 blurryeyes

ionic gust
#

it'll still work

crude cloud
#

2.3 = 1.13

ionic gust
#

wait

#

😭

crude cloud
ionic gust
#

fr

#

i could change it to square them maybe

half harness
#

just do
major * 100000 + minor * 100 + patch

#

ez

ionic gust
crude cloud
#

no?

half harness
#

no reason to have a small number

ionic gust
crude cloud
#

oh i didn't read what you replied to OMEGALUL

ionic gust
#

oh lol

#

i almost just freaked out thinking i couldve made the version into a double but luckily patch exists

ionic gust
half harness
#

>:)

ionic gust
ocean quartz
#

If you're doing a way to get an unique number for a version you can do what I do for versioning my lib
1.8 -> 180
1.13 -> 1130
1.16.3 -> 1163
..
(in the middle of typing this I realized that it can be easily broken if Mojang decides to to do .xx, like .10)
((this also includes 1.7.10 for example, but who uses that version anyways omegaLUL))

ocean quartz
#

1200

#

That one doesn't break it

ionic gust
#

o u mean x.x.xx?

ocean quartz
#

Yeah

#

I guess you can use a float omegaLUL
1.7.10 -> 17.10
1.16.4 -> 116.04
1.20.20 -> 120.20

ionic gust
half harness
crude cloud
#

but what if~

ionic gust
cinder flare
#

why not just compare the three individual numbers in series?

ionic gust
#

takes longer fr

ocean quartz
#

Star, don't give reasonable solutions okay

crude cloud
#

star stop being helpful

cinder flare
#

lmao

ocean quartz
#

Exactly

ionic gust
#

u rn: ⭐
what u need to be doing: 🌠

cinder flare
#

i need to be shooting?

crude cloud
#

oh no

ionic gust
#

uhm

#

is the star shooting or the star being shot

cinder flare
#

well you generally call it a "shooting star"

ionic gust
#

u need to be shot

cinder flare
#

well generally it doesn't land for millions of years

#

but i guess if it does, it's just like a crashed meteor?

cinder flare
#

me fr fr

ionic gust
#

they like grew extra arms

cinder flare
#

that was their guts

#

they were shot

crude cloud
half harness
ionic gust
#

r u mojang?!

half harness
#

yes

ionic gust
#

wow

#

can u add me to minecraft

half harness
#

no thanks!

ionic gust
ionic gust
half harness
#

wdym

ionic gust
crude cloud
#

i deleted kotlin

ionic gust
#

good

half harness
#

yeah :(

graceful light
#

Kotlin is best

hard dagger
#

No

rotund egret
#

I rather like it

#

Makes up for a lot of the shortcomings of java whilst being interoperable with it

hard dagger
#

And it does make up for some but not well

#

And modern java is fine imo

#

Once java 21 is released and we get patterb matching for switxh and record oatterns 😍

rotund egret
#

I haven't touched it much since 8, I've been told it's come along better.
Kotlin works just fine for me and is far less boilerplate, which I hate

ebon grotto
ebon grotto
hard dagger
#

just | the 2 numbers so the minor takes up the first 32 bits of a the result and the patch takes up the last 32

obtuse gale
crude cloud
#

In case that the laws of physics do not apply in the future, God help you.

obtuse gale
ionic gust
half harness
#

Or make it an object

#

As star said

cinder flare
half harness
#

I wonder how language models work
Like how does it actually predict text it hadn't seen before (ex keyboard spam??)

crude cloud
#

how do you know it hasn't?

cinder flare
#

it's basically just a big math expression, it just weights a billion things together and spits out whatever

crude cloud
#

for it to be of any use, you need a MASSIVE data set

cinder flare
#

yeah to be fair, it probably has seen that before lol

crude cloud
#

chatgpt already spews random nonsense as it is, it only gets worse with small sets

cinder flare
#

hey they're working on that in GPT 4.0!

#

trying to give it some semblance of objective truth

half harness
#

4 is out already, no?
Or is it 3.5

cinder flare
#

4 is out for paying customers

half harness
#

Oh

cinder flare
#

your chatgpt is 3.5

crude cloud
#

our chatgpt

ionic gust
crude cloud
#

yes it does that a lot

half harness
#

Try bard

cinder flare
ionic gust
#

"both versions have the same integer value"

half harness
#

Bard seemed to be worse in my experience but

cinder flare
#

it isn't a truth generator lmao

half harness
#

¯_(ツ)_/¯

crude cloud
#

bruh bard is garbage OMEGALUL

half harness
rotund egret
cinder flare
#

you really gotta turn off the embed metadata for your custom image host man

rotund egret
#

5 head

rotund egret
#

more like no its not

crude cloud
#

real

half harness
ionic gust
ionic gust
half harness
#

Remember that chatgpt doesn't think

#

It only predicts

crude cloud
#

base64?

#

lol

half harness
#

Oops

cinder flare
#

true base64 doesn't think

crude cloud
#

i wanna be base64

rotund egret
#

base64 predicts

graceful light
#

seems based

pastel imp
#

Bing is already using GPT 4 and is free lol

cinder flare
#

Bing is a paying customer of OpenAI

wind patio
#

Or use copilot chat with gpt4 🤓

ruby dew
#

ok

drifting aspen
outer rose
#

is it possible to covert a tebex template to craftingstore?

wintry plinth
outer rose
#

it was the price but, next month going back just couldn't afford a month which meant i had to look for an alternative rather than not have a store up

wintry plinth
distant sun
#

You can not use themes on the free plan

#

😛

outer rose
wintry plinth
#

Ah thanks for clarifying, I wasn’t sure what it was in particular that held you back

#

Could you not hold off and use the free plan until your server makes enough, then move to Plus? The seller protection + the perks you get with Tebex is unmatched

pastel imp
#

you sound like a salesman desperate to not lose a costumer xd

half harness
#

💀

surreal garnet
half harness
#

ye at least he said that

surreal garnet
#

Knowing him he means well with it.

wintry plinth
pastel imp
#

yeah, I am aware charlie, it just looked like it for someone from the outside without any intel on it

#

could look like it*

wintry plinth
#

I’m not too fussed haha, like I say I get no gain or incentive - only trying to help people here. I’ve been a tebex customer personally since 2014, so bias aside there’s no platform better - and I can comfortably say that

pastel imp
#

totally agree with you

rotund egret
#

Bias aside (works with them, was a customer since 2014, no mention of ever trying other platform)
Yeah I'd think it was the best too

outer rose
static holly
#

Does anybody know how to host a Minecraft server on a spare pc? Vps are too expensive in the long term so I’m thinking of getting a good pc on the side for my server. I know how to set up a Minecraft server, port forward, domain etc but how do I set it up so my IP is 100% hidden and can’t have any ddos attacks or anything harmful linked to me?

half harness
#

used to be unlimited but it got too popular 🥴

static holly
half harness
#

yeah only the bungee

static holly
#

Ok thank you

#

How would I set it up

half harness
static holly
#

Ok thank you so much

quiet sierra
#

@nocturne apex looking at your latest #showcase post I'm slightly concerned about the packet reading logic

#

having a huge switch statement and reading like that will become problematic

#

A possible solution I'm thinking is some sort of registry so you can do like

#

registry.add(HANDSHAKE, 0x00, HandshakePacket::read)

#

and also hardcoding your json stuff is a bit icky

oblique heath
#

i dont think there's tooooo much wrong with using a switch statement there

#

since the logic is separated out

#

the string literal for json is pretty sus though

#

but that's probably just a temporary thing

quiet sierra
#

if the project ever scales, it'll be a pain to actually wire them up individually

#

I've seen projects have like a json thing

#

that link the packet ids to each class

#

and different client versions have different json files

oblique heath
#

don't get me wrong i agree that a switch case isn't the cleanest solution

#

but you need code somewhere that lists out all of the possible branches of flow, whether it's declaring them in the switch case or adding them to a registry

quiet sierra
#

True

#

Just that this is the first approach that comes to mind

#

and speaking from experience

#

The first approach is usually the worst

nocturne apex
#

This is just a project that I do for fun. There's no plans to release it. Wanna get some new experience around netty and overall networking area

quiet sierra
#

Quality comes first

#

But good job overall

nocturne apex
prisma wave
dense dew
prisma wave
#

NO

dense dew
#

yee

#

in crab we trust

median yacht
#

NO 😏

#

Kotlin is better 😏

prisma wave
#

well

#

maybe

#

what's important is the norust

median yacht
#

🚫🦀🚫

prisma wave
#

real

dense dew
distant sun
median yacht
#

||Absolute dumb ass teacher||

distant sun
#

🤣

drifting yoke
#

Do you believe editing yml async is redundant?

distant sun
#

IO operations should be done async, yes

drifting yoke
#

Default spigot configuration doesnt provide that right

prisma wave
#

default spigot config has nothing to do with it

#

it's your responsibility

crude cloud
#

in other words, it's your fault if you don't

#

😃

distant sun
#

If by edit you mean "FileConfiguration#setString", that doesn't do any IO operation

prisma wave
#

true

#

it isn't thread-safe though afaik

distant sun
#

probably not

drifting yoke
#

I'm talking about reading/writing in files

prisma wave
#

yeah same thing

drifting yoke
#

So I need to make my own async functions?

prisma wave
#

not really

#

scheduler.runAsync(() -> yaml.save())

#

bam

#

pseudocode obviously

drifting yoke
#

That works fine with zipping unzipping and copying directories as well right?

prisma wave
#

uh

#

depends basically

drifting yoke
#

Lets say I want to create a world when a player joins the server and then zip it and place it somewhere when the player leaves

prisma wave
#

ok

#

you want to do that

#

so

#

do it

#

just async

#

ez

drifting yoke
#

So I dont bother with any async java functions i just mess with the scheduler of spigot correct?

prisma wave
#

what "async java functions" do you mean

#

you can use like futures and executors if you want

#

scheduler is just easier

drifting yoke
#

AsynchronousFileChannel e.g.

prisma wave
#

that seems like overkill

#

that's more for multiple threads operating on a file at the same time

#

afaik

#

could use it if you really want though

drifting yoke
#

I believe that this could go wrong as if the plugin disables that will keep running if im right?

prisma wave
#

what is "this" referring to

drifting yoke
#

Running the operations through AFC

#

That async operation wont terminate if the plugin happens to disable

#

right?

prisma wave
#

frankly im not sure

#

but probably not, yeah

#

since the thread pool is unrelated

#

im not actually 100% sure if bukkit async tasks get awaited if the plugin disables

drifting yoke
#

I think they do

crude cloud
#

that's why you usually keep references to uncompleted tasks/executors/futures etc and shutdown/await for them inside onDisable

#

I think bukkit awaits for your async tasks to finish when disabling the plugin since they go through the scheduler; if you don't do things via the scheduler then you need to make sure of waiting for tasks yourself

#

but in any case, AsyncFileChannel isn't really what you're looking for -- Files.copy(Path src, Path dst) is more than enough to copy a file from A to B

drifting yoke
crude cloud
#

most likely

distant sun
#

smth like that involves more than copy and paste

#

isnt there some project for worlds that is using sql for saving the data, or was it slimeworld?

drifting yoke
#

I mean, I'll just have the world I want to copy paste and do that. Then I just teleport the player and done

crude cloud
#

slime worlds are for something else

distant sun
#

yeah ik it is, but I don't remember if there's another thing that uses sql

quiet sierra
#

Doesn't save their entirety, it's more for minigames

vast tiger
#

can anyone help me 1 key problem? That I don't have a answer....pls
How can I setup that when ever a Player reaches a certain y level of a certain region they instantly die,...

distant sun
#

Java - Are there other ways of reading the content of a pdf created programmatically (not from scanned images, but with a js library), other than OCR? I know that browsers render pdf with html tags, so I wonder if there's a way to use css/xpath selecters to do so.

agile galleon
#

what

#

do you want to read the content of a PDF file?

distant sun
#

It doesn't matter anymore.

agile galleon
#

ah yes

distant sun
#

What I said regarding html tags might apply only to some PDFs, or my memory is failing me. Anyways

drifting yoke
naive ingot
#

Question, so im using the CraftItemEvent to get when a player crafts an item, but i need to get how many they craft. I tried getting the recipe etc. However when they shift click im not too sure to count how many they just crafted. any ideas?

unborn tree
feral notch
#
        UUID playerId = player.getUniqueId();

        if (flightTimeMap.containsKey(playerId)) {
            long flightTime = flightTimeMap.get(playerId);
            if (flightTime > 0) {
                plugin.getServer().getScheduler().runTaskLater(plugin, () -> {
                    long newFlightTime = flightTimeMap.getOrDefault(playerId, 0L) - 1;
                    flightTimeMap.put(playerId, newFlightTime);

                    if (player.isFlying() && newFlightTime > 0) {
                        if (newFlightTime <= 10) {
                            player.sendMessage(ChatColor.YELLOW + "Your flight time will expire in " + newFlightTime + " seconds.");
                        }
                        startFlightTimeCountdown(player);
                    } else if (!player.isFlying() && newFlightTime <= 0) {
                        player.setAllowFlight(false);
                        player.setFlying(false);
                        player.sendMessage(ChatColor.RED + "Flight mode disabled.");
                    }
                }, 20L); // Decrease flight time every second (20 ticks)
            } else if (player.isFlying()) {
                player.setFlying(false);
                player.sendMessage(ChatColor.RED + "Your flight time has expired.");
            }
        }
    }```
#

It doesn't disable the flight after the time runs out

#

I fixed it with removing the person from the hashmap

brittle leaf
#

i found it on a thread about that exact question

naive ingot
#

ok thank you i’ll take a look at that

golden sun
#

I doubt but is there anyway to do 3D armor?

wind patio
#

What

golden sun
#

So you can make 3D "hats"/helmets with a resource pack because you put a 3D item on your head. Is there a way to do this for the rest of the armor?

#

*not modded

wind patio
#

Well if you can somehow force the item in other armor slots and if it actually properly renders it then maybe, my best guess

golden sun
#

hm... I doubt because it would need to be animated with your legs & arms

#

rip

wind patio
#

Yes, very unlikely

brittle leaf
#

ive seen people have 3d armor by just having an armorstand stuck inside of you i think

#

but other then that nah

stone linden
#

That sounds awful ngl

#

No way to make it look good while moving

pastel imp
#

is it worth doing my own SQL(ite) library? (java)

hard dagger
#

like making ur own one?

pastel imp
#

haven't found a good one that also isn't too intrusive like JOOQ is for example

#

more like, framework/wrapper

#

overall making the process with SQL easier yeah

prisma wave
#

ORMLite / Hibernate is a thing if you’re into ORMs

pastel imp
#

will check them out, thanks. otherwise I will just make my own lol

hard dagger
#

if jooq's too intrusive...

#

yeah jpa with hibernate is nice ish

#

dk what its like doing plain hibernate tho

#

like without spring data or whatever

prisma wave
#

Hibernate is fucking huge in plugins anyway

#

adds like 50MB

#

almost definitely want ormlite instead

pastel imp
#

or my own

crude cloud
#

🥴

prisma wave
#

making an ORM is not a particularly trivial task

agile galleon
#

Yeah right

wind patio
prisma wave
#

man it either wasnt obvious or afonso is very confident

#

😭

pastel imp
#

I liked ormlite a lot, but now I wanna see if what I had in mind would work

#

it wouldn't be orm but it would def. make sql a lot easier

#

wanna do something like this, for instance, creating a table:

new SQLTable("table", "id")
    .addField("id", DataType.INTEGER, true, true, true)
    .addField("data", DataType.TEXT)
    .create();
#

kinda the idea behind it

#

the 3 trues being isNotNull, isUnique and isPrimaryKey respectively

crude cloud
#

true, true, true

#

boolean parameters are a mistake

pastel imp
#

how else would you do it?

#

maybe with some setters that return the Field object?

distant sun
#

an enum for properties maybe

pastel imp
#

confusion

#

so have a list of properties?

#

... new SQLField("id", DataType.INTEGER).notNull().isUnique()... or smt?

#

this would look fine tbh

crude cloud
#

yeah that or enum varargs, both are okay

#

basically: give it a name, boolean parameters are not obvious what they mean when you are reading the code that calls the function

pastel imp
#

so either what I sent above or smt like public SQLField(String name, DataType type, FieldPropriety ... proprieties)

cinder flare
#

I mean, all the cool libraries use like class definitions and annotations to define table schemas and DTOs

obtuse gale
#

Please if you understand in essential DM me ASAP!!!!

pastel imp
cinder flare
#

in Java that's not actually that hard to do lol

#

basic reflection and just using an annotation processing library

agile galleon
#

I mean why create a new one xD

pastel imp
#

why not? xD

crude cloud
#

xD

pastel imp
#

TBH even if there are better alternatives out there, creating your own gives you the insight on how it works. Besides, it gives you flexibility to work on your own way and code/structure however you prefer. It's also a training and an alternative for whoever dislikes orm for example.

prisma wave
#

annotation processing = codegen

crude cloud
#

yeah you don't really need reflection

#

exhibit a: exposed

cinder flare
#

ah i figured finding class members was reflection

#

the more ya know

potent nest
#

at runtime, yes

half harness
#

welp
my settings got messed up due to settings sync and now it's back to the small icons 🥲
anyone know the setting

rose wing
#

what this error means?

half harness
rose wing
half harness
rose wing
#

yep

half harness
#

in plugin.yml do you have depend

#

for PlaceholderAPI

rose wing
#

hard depend

half harness
#

can u show me ur plugin.yml?

rose wing
#

but with softdepend appears the same error

rose wing
half harness
#

just depend

#

and then it should work

rose wing
#

same 😦

half harness
#

show me plugin.yml?
maven or gradle?

rose wing
#
    private void initPlaceholders() {
        if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
            getLogger().info("PlaceholderAPI found! Using placeholders...");
            new KumaExpansion(this).register();
        } else {
            getLogger().warning("PlaceholderAPI not found! Please install it to use placeholders!");
        }
    }```
this is how i register the placeholders
#

maven

half harness
#

ah hmm

rose wing
half harness
#

looks right

rose wing
#
package com.xodesito.kumastaff.placeholders;

import com.xodesito.kumastaff.KumaStaff;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;

public class KumaExpansion extends PlaceholderExpansion {

    private final KumaStaff plugin;

    public KumaExpansion(KumaStaff plugin) {
        this.plugin = plugin;
    }

    @Override
    public @NotNull String getIdentifier() {
        return "kumastaff";
    }

    @Override
    public @NotNull String getAuthor() {
        return "xodesito";
    }

    @Override
    public @NotNull String getVersion() {
        return plugin.getPluginMeta().getVersion();
    }

    @Override
    public String onRequest(OfflinePlayer player, @NotNull String params) {
        switch (params) {
            case "isInStaffmode":
                return plugin.getStaffUtils().isStaffMode((Player) player)
                        ? plugin.getStaffConfig().getString("placeholders.isInStaffmode.true") : plugin.getStaffConfig().getString("placeholders.isInStaffmode.false");
            case "isFrozen":
                return plugin.getStaffUtils().isFrozen((Player) player)
                        ? plugin.getStaffConfig().getString("placeholders.isFrozen.true") : plugin.getStaffConfig().getString("placeholders.isFrozen.false");
            case "isVanished":
                return plugin.getStaffUtils().isVanished((Player) player)
                        ? plugin.getStaffConfig().getString("placeholders.isVanished.true") : plugin.getStaffConfig().getString("placeholders.isVanished.false");
            case "isInStaffChat":
                return plugin.getStaffUtils().isInStaffChat((Player) player)
                        ? plugin.getStaffConfig().getString("placeholders.isInStaffChat.true") : plugin.getStaffConfig().getString("placeholders.isInStaffChat.false");
        }
        return null;
    }

}
half harness
#

can u show pom.xml

#

?paste

compact perchBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

rose wing
half harness
#

hmmm

#

I'm not sure :/

#

it all looks right

rose wing
#

:/

hallow crane
#

Could use some guidance on embedded IoT. I am trying to develop IoT devices (small devices with a touchscreen), and I need some help deciding how to develop the firmware. Should I write my own linux distribution that is "locked in" to my IoT platform, or should I use some kind of lightweight existing distribution, write regular software for it, and automatically start that software upon the OSes start? Or is there another way that's more efficient?

oblique heath
#

i am not in embedded at all but i dont see a pressing reason to make a custom distro

hallow crane
#

Security is the main reason

#

If I develop it myself, there are less attack points for a potential malicious actor to be able to exploit

oblique heath
#

idk about that ngl

hallow crane
#

I'd also consider speed as a reason. The more barebones I can get without using an existing distro that has overhead, the faster I can do computations

oblique heath
#

whenever someone says 'if i develop it myself there are less attack points' red flags go off

#

speed might be a valid reason, if the hardware cant support existing distros

hallow crane
#

It's not about "developing myself makes it more secure," it's that if I use an existing distro, there is lots of bloated features that can expose attack vectors. When I develop it myself, it's only what I need and nothing else, so I'm not exposing myself as much.

oblique heath
#

i'm sure there are already distros out there for very similar purposes that will have covered a lot of the same bloat you are going to

hallow crane
#

Any suggestions?

oblique heath
#

no clue 🤷‍♂️

#

i just have faith that in the hundreds of thousands of IoT vendors there's at least one reasonable distro open sourced

hallow crane
#

Would you suggest that I don't use linux at all?

oblique heath
#

i mean that probably depends on what your device does

hallow crane
#

It needs general access to network, bluetooth, display drivers, and external sensor inputs.

#

The external sensors don't have linux drivers, I'd have to write the drivers myself for whatever platform I choose. So I'm not locked into linux.

oblique heath
#

again if security is that much of a concern i would rely on other peoples' work as much as possible to avoid any oversights that come from me being a single person

#

but like, how secure do you need it to be really? are you dealing with passwords or other important data

hallow crane
#

That's a fair point

#

The device transmits sensitive utility data

oblique heath
#

how sensitive

hallow crane
#

Sensitive enough where I need it to be only accessible by me

#

It doesn't stay on the device though, it only acts as a transmitter

oblique heath
#

do you need the device to be resistant to people hijacking it and trying to scrape the data from inside it

hallow crane
#

Yes

oblique heath
#

i'd probably go with the linux distro if possible

#

but im imagining that you're gonna have like an RSA key or something stored on the device to transmit your utility data, and at that point it would be more important to get some sort of hardware secure key thing

#

rather than leave it to software to protect

hallow crane
#

Thanks for the help

prisma wave
#

popular things will almost always be more secure because they’ve actually been battle tested

#

especially with Linux where actual security experts are regularly submitting fixes

#

and with all due respect, I’d trust actual security experts far more than just a guy

rose wing
half harness
inner umbra
#

Created a multi-class option for ease of use.
Example usage;

Object playOutSpawnNamed = Class.fromName(<PacketPlayOutNamedEntitySpawn>).newInstance();
ReflectObject reflectSpawnNamed = new ReflectObject(playOutSpawnNamed);

reflectSpawnNamed.setField("a", entityId);
reflectSpawnNamed.setField("b", uuid);
reflectSpawnNamed.setField("c", location.getX())
reflectSpawnNamed.setField("d", location.getY())
reflectSpawnNamed.setField("e", location.getZ())

https://github.com/TheCrappiest/ReflectionLibrary

GitHub

Simple reflection library. Contribute to TheCrappiest/ReflectionLibrary development by creating an account on GitHub.

hallow crane
#

Its running on very bare bones hardware

prisma wave
#

same thing applies

#

plenty of linux distros are specifically made to run on basic hardware

#

with years of effort going into them

humble prism
#

stuff like pi zero w2

#

or just pi zero

hallow crane
#

Is a pi stable enough?

#

Plus cost. It’s expensive for a bulk order - it goes up in price per unit the bigger the order rather than down.

#

I need hundreds to start

distant sun
#

i mean, it depends what you want to do

prisma wave
distant sun
#

I'm not an expert, but for a startup, I would personally focus more on the product itself than making my own OS for the product shrug

hallow crane
#

As bare bones as possible, low power less than 5MB of RAM in a sleeping state

#

The product is finished

distant sun
#

ah nice

hallow crane
#

It’s already deployed using Pi Zero W

#

It’s a project I’m picking up from a company I purchased so I’m using their infrastructure and everything

#

I just need some embedded IoT suggestions and advice

distant sun
#

out of curiosity, what do you need an OS for?

#

like, what does the device do that requires an OS?

rose wing
#

anyone knows an discord api for java?

#

I was going to use JDA but that makes my plugin weigh 20 mb xd

mild tapir
#

hello there i was wondering is there is a placeholder for chose a custom font like {"text":"TEST","font":"namespace:path/to/file"}

static zealot
distant sun
inner umbra
distant sun
#

4 or 4.5

mild tapir
static zealot
#

well that's on spigot. but they didn't mention anything about it. which is why I asked

distant sun
#

no jangyga

mild tapir
#

thanks

rose wing
static zealot
#

you were saying that jda is 20mb and I was wondering why that would be a problem

pastel imp
#

tbh, if size is a concern, you can always minimize it. I haven't had any issues with it

distant sun
#

yeah well, unless they already have some big dependencies already, jda is < 10MB

JDA-5.0.0-beta.9-withDependencies-no-opus.jar
9.92 MB

pastel imp
#

he probably implemented something extra lol

#

although, minimizing usually doesn't help much, but my jar is never above 10mb lol

crude cloud
#

minimizing can lead to issues, depending on what your plugin or your dependencies do, but it isn't uncommon

ocean quartz
#

What's hangar's size limit?

crude cloud
#

You see, you'd think that I of all people would know

ocean quartz
#

Actually I wasn't expecting anyone to know straight away but would go check ;p

#

I would but I'm on my phone and I don't wanna

ocean quartz
#

Probably not

ocean quartz
#

Not bad tbh

crude cloud
#

Still can't fit all of LuckPerms kekw

#

Can fit WorldEdit tho

#

WE is chonkers

distant sun
crude cloud
#

No, LuckPerms downloads its dependencies on startup

distant sun
#

oh, true

ocean quartz
#

LuckPerms is 13MB total right?

crude cloud
#

It's like 15 MB or something

#

Although

ocean quartz
#

Maybe it got bigger omegaLUL

distant sun
#

chonky

crude cloud
#

Technically ackshually it depends on your settings

#

e.g. if you use MariaDB for storage with redis messaging it'll be larger than, like, just sqlite storage

ocean quartz
#

Oh yeah it only adds h2 if you select right

crude cloud
#

all of LuckPerms would be massive

ocean quartz
#

Imagine if plugin size mattered

distant sun
wind patio
#

not 10 megabytes!! my storage wont handle!!

wintry plinth
distant sun
#

I would assume you didn't read the discussion lol

half harness
#

Can Linux even run on 5mb

median yacht
half harness
#

Ohhh nvm they said 5mb in sleeping state

#

Or actually

#

While in sleep, memory doesn't clear or anything

#

So Linux wouldn't work for this, I think?

#

¯_(ツ)_/¯

median yacht
#

OK, 4 MB is enough

half harness
#

5mb memory is still an extremely low limit

I think

median yacht
#

yeah, it IS

#

But if you look at the image size, there won't be much inside 😄

wind patio
#

in this day and age worrying about whether is something 10 or 20mb is goofy ahh

hallow crane
#

Not if a company is worrying about size/cost/performance of each unit to minimize spending.

#

I think a lot of you are still in the mindset of unlimited resource technology like AWS EC2 servers and forget there are lots of restrictions and constraints in the professional world with embedded hardware.

distant sun
#

You should ask these very specific questions in a specific place though

wind patio
#

ACHTUALLY ☝️ 🤓

wind patio
#

we're not in floppy disk era

inner umbra
wind patio
#

how come

inner umbra
#

He's talking about someone wanting their own OS. I think you were referring to running JDA with 10mb

#

Maybe I'm wrong though.

wind patio
#

I wasn't talking about running a vm with 10mb, I was talking about size in terms of storage

wind patio
hallow crane
#

I am talking about very small, efficient, devices. Not large scale servers doing a heavy workload.

cinder flare
#

isn't that when you use like an FPGA or something?

#

or if you want real small, one of the BSDs is a really good choice

#

super secure, small, and optimized

distant sun
#

tbf he just asked for an OS, without any other details kek

distant sun
#

read like 3-4 messages above

inner umbra
#

I wish JDA was modules so you can say like private messages only etc...

humble prism
distant sun
#

Question about CF workers, could it be used for an app that pings various services to get data from them? Would each ping count as a request, or only incoming requests count?

hallow crane
#

Only incoming requests count towards limits and billing, not outgoing requests made by the worker script.

#

As the pings are initiated from within your worker script and not as a direct result of an incoming request, they won't count against your request limits or affect your billing.

distant sun
#

I see

inner umbra
#

incoming requests count towards limits and billing,
Ouch lol

agile galleon
#

?

dusty quartz
#

I have a problem with deluxemenus, and it is that it does not recognize these requirements. even if you have permission "deluxemenus.protection" Keep running right click commands

agile galleon
#

op? * permission?

pastel imp
#

does sending an unneeded header with a request increase the delay?

#

aka the header isn't used, does it affect the time it takes to get a response? Is it noticeable?

oblique heath
#

probably not

#

the header would be mere bytes in size

wind patio
#

it is sending more data than if not adding any headers at all, but there shouldn't really be any real noticeable difference between 5 and 30 headers

crude cloud
#

I mean if you're hosting the http server in a 8086 sure it might be noticeable

rotund egret
#

What's wrong with my 8086k

ionic gust
#

example of what one of them looks like (the integer [10120] is the minimum mc version that the thing exists on):

public class NamespacedKey {
    /**
     * 1.12+ org.bukkit.NamespacedKey
     */
    @Nullable public static final Class<?> NAMESPACED_KEY_CLASS = ReflectionUtility.getClass(10120, "org.bukkit.NamespacedKey");

    /**
     * 1.12+ org.bukkit.NamespacedKey#constructor(org.bukkit.plugin.Plugin, String)
     */
    @Nullable public static final Constructor<?> NAMESPACED_KEY_CONSTRUCTOR = ReflectionUtility.getConstructor(10120, NAMESPACED_KEY_CLASS, Plugin.class, String.class);
}
#

only annoying thing is stuff like this:

public class ItemMeta {
    /**
     * 1.11+ org.bukkit.inventory.meta.ItemMeta#setUnbreakable(boolean)
     */
    @Nullable public static final Method ITEM_META_SET_UNBREAKABLE = ReflectionUtility.getMethod(10110, org.bukkit.inventory.meta.ItemMeta.class, "setUnbreakable", boolean.class);
}
```where i have to put `org.bukkit.inventory.meta.ItemMeta.class` instead of just `ItemMeta.class`, but oh well 🤷‍♂️
ionic gust
ionic gust
distant sun
#

Does anyone know an alternative for this library? https://github.com/DevNatan/inventory-framework
Ideally one that is built in a similar way, at least with the context part where you can pass variables from a GUI to another. I've looked at Interfaces but I don't like it very much.

wintry plinth
#

Matt’s GUI library?

pastel imp
distant sun
wintry plinth
#

Out of interest, what's lacking in it? Looking to utilise GUIs myself for the Tebex v2 plugin. Been unsure which one is most robust, lightweight and isn't open to dupes

pastel imp
#

good question

#

regarding the second part of your message, I have been using triumphguis (aka mf-gui) and never had any issues

lavish notch
#

same here

#

mf-gui is used in my epic SellGUI addon for ShopGUIPlus- over 400+ active instances.

distant sun
#

I mean, it doesn't lack anything, I need a replacement for that lib because I have to update a plugin that has 20 something GUIs made using it.

remote goblet
#

Php makes. me want to carve my brains out

#

thank you for listening to my ted talk

wind patio
#

why

wintry plinth
#

Love php, what you struggling with?

distant sun
#

Php

remote goblet
#

i am mostly just bored out of my mind

wintry plinth
#

Try laravel

#

Makes it more pleasant

#

php on its own is iffy

remote goblet
#

i have no choice but to use php on its own CB_strong HatDab

wintry plinth
#

o..

#

what you building 😂

remote goblet
#

work placement, trying to do data comparison is the task i have but i am incredibly limited on the resources i have because i'm not at my pc

#

so trying to do a language i don't like with a keyboard that misses like every other letter using a barebones sublime text on their dev environment

wintry plinth
#

LOL

#

gotta use sublime too?!

remote goblet
#

slowly losing it

#

yes

wintry plinth
#

o god

#

I tried sublime for php was a no no, I had to go back to phpstorm

remote goblet
#

other option is adobe dreamweaver CS6

wintry plinth
#

not to motivate you more

remote goblet
#

which i'm sure is ancient

wintry plinth
#

LOL anything is better than dreamweaver

remote goblet
#

yep

#

pain and suffering for the next 3 hours

wintry plinth
#

What type of job are you doing placement for

remote goblet
#

i have like unpaid internships right now and this company focuses primarily on accounting software that uses php primarily

wintry plinth
#

Ah wow, nice placement tbh getting to deal with money and such

remote goblet
#

but i am very much

#

losing it

wintry plinth
#

I'm sure a lot of nice tech going on, I find it interesting with how companies deal with money

#

what data comparison do you have to do

remote goblet
#

currently i'm just set to try out shit for the sake of trying to figure out what type of job i actually want to do

#

but methinks the end goal is comparing two csv files

wind patio
#

Pretty nice too

#

PHP on it's own is kinda meh

#

And for the love of god use a decent IDE such as, before mentioned, phpstorm 😩

wintry plinth
#

Yeah I think PHP by itself is terrible, but with a framework it's easier to use. ANd yes, phpstorm is dope

remote goblet
#

i have no choice but to use sublime

distant sun
#

F

remote goblet
#

can't just install phpstorm on a company pc i use once a week

distant sun
#

What about VSC?

remote goblet
#

not on here either

distant sun
#

Very dumb

remote goblet
#

i generally just don't wanna go installing shit without asking

#

and i don't wanna ask

distant sun
#

Why though?

remote goblet
#

i like safely assuming the answer is no

#

even if i just become a whiny little bitch over it

distant sun
#

Well you can't know if you don't try. You can simply say you are more used to VSC and that it is a better editor than Sublime

remote goblet
#

but i won't try so EmiCool

distant sun
#

Ok

wintry plinth
#

rekt

wind patio
#

pussy

#

company gave me ubuntu machine with root access, no need to ask to install a simple program 😎

distant sun
median yacht
#

No password set for BIOS on computers at school, wondering if we should boot Linux there and set password for BIOS

surreal garnet
static zealot
humble prism
#

my school didnt care ;D!

humble prism
#

told them about most of the "administration" only accounts had passwords in plaintext on microsoft active directory

#

like the exam accounts

#

our gym hall computer

#

the full names of the people they outsource microsft AD management to

ocean quartz
# distant sun Any ideas? <:pikaoh:582004604875571211>

Ideally one that is built in a similar way, at least with the context part where you can pass variables from a GUI to another.
That's just dependency injection, I don't see how you can't do this with all gui libs already

distant sun
#

I know that Matt, that's the last option if I can't find anything like it

#

And well, a library where GUIs extend a class and override methods would also be good

ocean quartz
distant sun
#

Uh

#

Kotlin and I don't really like it X.X (the lib)

ocean quartz
#

Smh

distant sun
#

I guess I will give IF a try

jovial iris
distant sun
#

Yeah

jovial iris
#

I use this and it’s pretty nice

#

Ok

distant sun
#

Great

wind patio
#

just make your own library

#

🥱

distant sun
#

Yeah thanks for the idea M0dii

wind patio
#

no problem

#

glad I could help

distant sun
#

"It was me all this time"

rose wing
#

in worldguard

#

how i can deny the entry from player to specific region?

wintry plinth
#

Hey @ocean quartz with your GUI lib, what versions are supported? And what’s the file size when shaded?

ocean quartz
crude cloud
#

MB? OMEGALUL

inner umbra
ocean quartz
#

Fukcing hell kb

crude cloud
wintry plinth
#

Was gonna say what the fuck I’m defo making my own if it’s that big 😂😂

crude cloud
#

kchat moment

wintry plinth
#

That’s dope then, thank you - looking for a nice GUI library to add into the Tebex v2.0 plugin

#

Looking forward to trying your GUI Lib

ocean quartz
#

Uh, if you're looking for a nice one I'd suggest something else omegaLUL
My lib is pretty .. meh, it's old at this point and only really suitable for very simple things

wintry plinth
#

Oh really 😂 I only need it for listing packages and such, otherwise what others would you recommend? Needs to be 1.8+ and ideally lightweight

ocean quartz
#

1.8+ it's probably the best one, most of the more modern good ones like Incendo/interfaces are for newer versions,

wintry plinth
#

Ah dope then, thank you - will give it a try, it’s just for /buy really - and making the GUI customisable

#

Shame to need to support 1.8 but we move

eternal compass
#

If you have local access to the computer, I think they just trust you to not do stupid stuff

rotund egret
#

Hacker alert

hazy cape
#

Ho how ho save an inventory ?

#

I tried to save the items in the player inventory in an arraylist but it dosent work

#
ArrayList<ItemStack> items = new ArrayList<ItemStack>();

if (args.length == 0) {
  if(sender instanceof Player) {
    Player p = (Player) sender;
      if (p.hasPermission("moderator")) {
        if (isMod(p)) {
          mod.remove(p);
            p.getInventory().clear();
            p.updateInventory();
            p.sendMessage(ModOffMessage);
            p.getInventory().setItemInHand(items.get(1));
            items.clear();
            p.updateInventory();
        }else {
          mod.put(p, p);                        
          Bukkit.broadcastMessage(p.getItemInHand().getItemMeta().getDisplayName());
          items.add(p.getItemInHand());
          Bukkit.broadcastMessage(""+items.get(1));
          p.getInventory().setItem(0, FreezeItem);
          p.updateInventory();
          p.sendMessage(ModOnMessage);
      return false;
      }    
}
#

Here i just tried to save 1 item (the item on hand) but it doesn’t work

obtuse gale
#

try changing the 1 to 0

#

p.getInventory().setItemInHand(items.get(0));

hazy cape
#

I tried but same problem

#

Is this supposed to work like this to save an inventory or am I doing it the wrong way?

cloud lintel
median yacht
half harness
#

Or else the code just gets too long

hazy cape
#

Hi, i have multiple HashMap in my plugin and everything work perfectly

#

but i created a new one and i can add value in, but can't remove why ?

#

I have a first Hashmap Where i add frozen player that work correctly

#

public HashMap<String, Location> freeze = new HashMap<String, Location>();

freeze.put(clicked.getName(), clicked.getLocation());
freeze.remove(clicked.getName());
#

This work with not problems

#

but same with an other name doesn't work :

#
public HashMap<Player, Player> security = new HashMap<Player, Player>();

security.put(p, p); ======> WORK PERFECTLY
security.remove(p); ======> DOESN'T WROK

#

eveything is in the same class

ocean quartz
#

What about it doesn't work?

hazy cape
#

i can't remove value

#

only in the hashmap named security

#

but i can put value in

ocean quartz
#

Player is generally not a good object to use as a map key, because it can change, I'd recommend using their UUID instead
Try with UUID and see what happens, but that should definitely work
If it doesn't you'll need to provide a bit more code of your actual use case

cinder flare
#

also why is this a map of a player to the same player object

hazy cape
#

ok thx

hazy cape
cinder flare
#

what lol

ocean quartz
#

If the name is all you want in there, then a Map<UUID, String> would make more sense

hazy cape
#

yeah it's true thx

#

My server is in crack so i can't use UUID

#

I juste need the player name saved in a hashmap when he's disconnected

#

I tried to remove the player from the hashmpa on blockplace but it doesn't work

#
@EventHandler
    public void onPlace(BlockPlaceEvent event){
       Player p = event.getPlayer();       
       if (isInSecurity(p)){
          p.sendMessage(securityMessageMod);
          security.remove(p);
          Bukkit.broadcastMessage(security+"");
          }
      }
cinder flare
#

what are you mapping it to? would a Set not suffice?

hazy cape
#

mmh i don't think, i need a variable where i can save player's name when disconnected and delete from the hashmap when connected back

cinder flare
#

yeah a Set would allow you to do that

hazy cape
#

How can i do that ?

cinder flare
#

you put them in the set when they disconnect, and remove them when they reconnect

#

a Set is basically a Map with just keys

hazy cape
#

hooo ok

cinder flare
#

so you'd just have a Set<String>

#

and then put player names in there I guess

hazy cape
#

Ok i'll try thx

#

It worked perfectly thank you @cinder flare

cinder flare
#

nice

prisma wave
half harness
#

the UUID still works, although since it's in offline mode, if a player changes their username, it will not keep the data

#

im 99% sure

median yacht
#

^^^

ocean quartz
half harness
#

my dev server uses offline mode and it works with all the plugins I've tested so far

#

and I just put skinsrestorer to keep skins

hazy cape
ocean quartz
#

Pretty sure skinsrestorer is what is making you keep your UUID, but I could be wrong

hazy cape
#

Does anyone know how to cancel dropped loot recovery ?

distant sun
ocean quartz
#

Right

distant sun
#

AuthMe will stop people from joining with the same name but different capitalisation

#

so like Matt and MATT

cinder flare
#

damn AuthMe is doing the discord name change restriction

#

that's wild lmao

distant sun
#

lol Star

brittle leaf
#

for some reason offline mode uuids can change afaik

#

even tho it makes no sense to do so it can

half harness
distant sun
#

they only change if you join with a different username / the same username but different letters case

median yacht
#

Still different name 😉

sweet cipher
#

Does anyone know of a library to read chunk data using ProtocolLib?

hazy cape
#

Hi i have errors when im not clicking on a player

#

how do i remove that ?

#

here is my code:

#
public void onPlayerInteractEntity(final PlayerInteractAtEntityEvent e) {
        Player p = e.getPlayer();
        if (e.getRightClicked() instanceof Player) {
            
        }
    }
brittle leaf
compact perchBOT
hazy cape
half harness
#

the error is coming from that method

brittle leaf
hazy cape
#

okk

#
public void onInteract(PlayerInteractEvent event){
        Player p = event.getPlayer();
        Action action = event.getAction();            
        
        if (action== Action.LEFT_CLICK_AIR || action == Action.LEFT_CLICK_BLOCK) {
            if (!estCps(p)) {
                joueurscpslist.put(p, 1);
            }
            else if(estCps(p)){
                joueurscpslist.put(p, joueurscpslist.get(p)+1);
            }
        }
hazy cape
#

i forgot something

#
public void onInteract(PlayerInteractEvent event){
        Player p = event.getPlayer();
        Action action = event.getAction();
        
        if (action== Action.RIGHT_CLICK_AIR || action == Action.RIGHT_CLICK_BLOCK) {
            if (p.getInventory().getItemInHand().getItemMeta().getDisplayName().equals("§a§lRandom Tp")){
                if (p.hasPermission("oasia.mod")) {
                    Player cible = Bukkit.getOnlinePlayers().stream().skip((int) (Bukkit.getOnlinePlayers().size() * Math.random())).findFirst().orElse(null);
                    for (int i = 0; i < 50; i++) {
                        if (cible.getName().equals(p.getName())) {
                            cible = Bukkit.getOnlinePlayers().stream().skip((int) (Bukkit.getOnlinePlayers().size() * Math.random())).findFirst().orElse(null);
                            break;
                        }                    
                    }
                    p.sendMessage("§e§lOasiaMod ↝ §7Vous avez été téléporté au joueur " + cible.getName());
                    Location loc = cible.getLocation();
                    p.teleport(loc);
                }else {
                    p.sendMessage("Permission");
                }
                
            }
        }            
        
        if (action== Action.LEFT_CLICK_AIR || action == Action.LEFT_CLICK_BLOCK) {
            if (!estCps(p)) {
                joueurscpslist.put(p, 1);
            }
            else if(estCps(p)){
                joueurscpslist.put(p, joueurscpslist.get(p)+1);
            }
        }
    }
#

its

#

if (p.getInventory().getItemInHand().getItemMeta().getDisplayName().equals("§a§lRandom Tp")){

#

at line 23

half harness
#

air doesn't have an item meta

brittle leaf
half harness
#

so it will error if you're right clicking with air

brittle leaf
#

either itemmeta is null or displayname is null

half harness
#

apparently

#

i dont get it

#

theres hasDisplayName but its annotated with @NotNull

hazy cape
#

so

brittle leaf
#

check if the item in hand is not air

hazy cape
#

i need to do: if (p.getInventory().getItemInHand().getItemMeta() != null && p.getInventory().getItemInHand().getItemMeta().getDisplayName().equals("§a§lRandom Tp")){

#

I have problem when im clicking on a block

#

no probleme with air

hazy cape
#

even if its a block ?

brittle leaf
half harness
#

since u can hold it

brittle leaf
#

with this code it cannot just error if you click a single type

half harness
#

or are there non holdable ones

hazy cape
#

I have this line that i think remove the AIR error :if (action== Action.LEFT_CLICK_AIR || action == Action.LEFT_CLICK_BLOCK)

half harness
#

try this

#

i think

hazy cape
brittle leaf
#

good

hazy cape
#

thx @half harness @brittle leaf

distant sun
prisma wave
#

what the hell lol

wind patio
#

¯_(ツ)_/¯

#

Commit history aint enough

hazy cape
#

Hi, how to cancel damage when a player is the attacker on an other player ?

half harness
#

and then you can use EntityDamageByEntityEvent#getDamager to get the attacker and EntityDamageByEntityEvent#getEntity to get the player being attacked

#

and then setCancelled(true) if you want to cancel the damage (this will also cancel the knockback, etc though)

brittle leaf
#

so if you want to stop damage but not knockback then just set damage to 0 afaik

knotty basin
#

@hazy cape Make sure to check if attacker is player like so: if (event.getEntity() instanceof Player) && (event.getDamager() instanceof Player) {
event.setCancelled(true);
}

wind patio
#

?codeblocks

compact perchBOT
#
FAQ Answer:

Use codeblocks for formatting code or configuration files:
```<language name>
<your code here>
```

For example:
```yaml
test:

  • “hi”
  • “there”
    ```

Produces:

test:
- “hi”
- “there”```
forest pecan
#

Can somebody help me with plotsquared v6.

half harness
cold crag
#

Hello, I would like to request help about EzRanksPro. I would like to make prestiges, could you help me???

pastel imp
#

wouldn't it be a good idea to migrate #1103027380685115473 to an automated system using forms? Could be a lot clearer to the user on what's needed, etc.

distant sun
#

With JDA is possible to add an empty, dummy field to an embed? I need to arrange the fields like this ( 🟦 represent a field with data)
🟦 ⬜ ⬜
🟦 ⬜ ⬜
🟦 🟦 ⬜
🟦 🟦 ⬜
I can arrange the first 4 fields just fine, but if the 5th is inlined, it will go on the 3rd row =/

wintry plinth
#

Nice bar chart

crude cloud
#

what

agile galleon
#

The question is; is that possible with discord?

distant sun
#

I do remember it was possible, but I can't remember if discord.js was just doing some hackery (e.g. use empty characters in the title and value of the field)

agile galleon
#

Yeah try thar

pastel imp
#

yeah

#

its exactly that

#

I can send you how I do it in a min if you wish

#

Here it is:

#

it's there, just hard to notice

rotund egret
#

\ ‎

pastel imp
#

uhm...

#

so I just created a git repo (already deleted but yeah) that had a token of one of my test bots from discord...

#

and got this from discord literally seconds after lol

#

First time I ever saw this

frail glade
#

Yeah they have scanners

pastel imp
#

that's quite pog ngl, didn't expect that

static zealot
crude cloud
#

xd

static zealot
pastel imp
#

if you have it empty and only fill it out on your machine, should be fine

#

?

static zealot
pastel imp
#

that will be published to the github repo

#

then on the hosting machine, you just change that field

#

but it shouldn't have anything to do with git at that point

queen saffron
#

I'm attempted to log into my old account.

#

and discord fucked up

#

I need to do this stuff

#

But their request gets a 400 back

nimble stirrup
#

@nocturne apex stop putting us to shame with your awesome designs!

nocturne apex
#

lmao

#

thank you very much

agile galleon
#

You put it in, commit a fix and boom, uploaded

pastel imp
#

confusion

gilded granite
#

https://www.youtube.com/watch?v=tzcToDPAa2g&t=6s
Would any spigot devs be willing to tell me what ya'll think of this?

If this video helped you, please like and subscribe, it helps a lot. If you need help with anything, feel free to join my Discord server where I can help you! https://discord.gg/UFs6SWWD48

Links:
PaperMC: https://papermc.io/
Java: https://www.oracle.com/java/technologies/downloads/#jdk17-windows
IntelliJ: https://www.jetbrains.com/idea/download...

▶ Play video
quiet depot
#

oracle java link 👎

gilded granite
quartz lake
#

the video quality is horible

#

well, I mean

queen saffron
quartz lake
#

xD