#help-development

1 messages ยท Page 79 of 1

alpine urchin
#

dms

#

nvm im blind

wet breach
#

it does as those are the official math functions supported by sqlite

#

if you want to add, then do the addition before the query

tender shard
#

BLOB

tender shard
#

haha

#

scnr

tender shard
#

"my life with 600 pounds" or sth?

wet breach
tender shard
#

I only once watched one episode and this perosn was like "the doctor prohibited everything I Love to eat D: Only thing Im still allowed to eat is bacon and rib eye steak :'(" and then she started drying

#

crying*

wet breach
#

lol

tender shard
#

so either the doctor is a bit stupid, or there was a huge misunderstanding lmao

wet breach
tender shard
#

but yeah, funny series

ancient plank
#

drying

tender shard
#

your mom is drying my clothes, after I

#

ehm

#

only cuddled with her

#

idk that's all I could come up with rn

olive drum
#

Is it possible to cast a mob to a TamableAnimal?

tender shard
#

sure

#

if the mob actually is a tamableanimal

#

you should check beforehand

olive drum
tender shard
#

then, ofc not

olive drum
#

than i can not use .wantsToAttack

tender shard
#
if(entity instanceof TamableAnimal) {
  TamableAnimal animal = (TamatableAnimal) entity);
  entity.wantsToAttack(...);
} else {
  // It's not a tamable animal
}
#

^

ancient plank
#

entity

tender shard
ancient plank
#

animal

tender shard
#

adele is drunk again

#

cant blame her

#

mob

#

YOU MAKE ME WANNA CALL YOU IN THE MIDDLE OF THE NIGHT

ancient plank
#

entity doesn't have want to attack

#

Dummy

tender shard
#

I KNOW THIS IS A FEELING THAT I JUST CANT FIGHT

tender shard
eternal night
tender shard
#

ignore us

ancient plank
#

I will smother you with barbeque sauce

tender shard
#

@eternal night

eternal night
#

lol xD

tender shard
#

it's true

#

fun fact

#

Double.NaN == Double.NaN is false

#

@quaint mantle Weren't you able to add discord commands?

#

I'm tired of explaining this every day again

#

"Yo guys I added spigot remapped but now EntityPlayer is gone, fuck mojang mappings, wtf wtf wtf"

#

then we could just do ?learnyourmappings

quaint mantle
#

?switchmappings

tender shard
#

damn

#

awesome bruh

#

Imma add that to the spigot wiki's "Discord commands" list rn

quaint mantle
#

what happened to light mode

tender shard
#

people kept complaining about it

quaint mantle
#

bruh

tender shard
#

then they complained about the dark mode, since it was "too dark"

#

so yeah I now adjusted everything a bit

quaint mantle
#

just make it toggleable

tender shard
#

haha

#

yeah

#

if it only was that easy

quaint mantle
#

it is

tender shard
#

it's wordpress, yk

sterile token
#

Can someone do a simple visual example about diff getKeys(false) and getKeys(true) ?

quaint mantle
tender shard
#

yeah but it's a full featured wordpress theme that I bought for 70โ‚ฌ

#

I am already happy that I managed to get the "code blocks" look half way decent

quaint mantle
#

that is totally not worth it

tender shard
#

I wont touch this again for the next 2 years lmao

quaint mantle
#

i couldve made this website

tender shard
quaint mantle
#

besides your main page

tender shard
#

I dont even have ads on my site, I gain nothing from people visiting it ๐Ÿ˜„

sterile token
#

Imajin do you code templates?

quaint mantle
#

this looks good

tender shard
ornate patio
#

bump again

tender shard
#

that theme costed me 250โ‚ฌ

quaint mantle
#

damn i couldve made this

dim bronze
#

what

#

250

#

wow

quaint mantle
#

for like

#

$70 dollars

tender shard
eternal night
#

getKeys false returns top1 and top2

quaint mantle
sterile token
eternal night
#

getKeys(true) also throws you top1.second

dim bronze
#

I think if you are a developer, you should be expected to make your own website.

eternal night
#

wat

tender shard
eternal night
#

reinvent the wheel ๐Ÿ™

ornate patio
#

ui design is its own thing

tender shard
#

I do java stuff. I have no idea about websites and stuff

river oracle
#

it sucks

#

legitametally its awful

tender shard
#

I could have made the website myself but that would take me like 30 hours. and in 30 hours I could earn more than 250.โ‚ฌ

sterile token
#

I mostly code mc plugins and also javascript backend

ornate patio
#

i have lots of experience in web development but i hate it

dim bronze
#

I mean get someone to design your website, but web is so important nowadays that I think everyone should have some idea how to create a website

#

I seem to have caused a riot over my personal opinion

tender shard
sterile token
dim bronze
#

yeah I'm awful at design

sterile token
tender shard
#

I'd rather pay someone 250โ‚ฌ and have a nice theme immediately then spend 30 hours myself only to have a half-assed version

#

some people are just better at webdesign than me

#

I mean

dim bronze
#

nice

river oracle
#

I mean when i get a chance I'm going to make my own website, but like I hate web development it sucks

tender shard
#

I was a lawyer once, and I got sued for 200kโ‚ฌ

#

I also took a lawyer

sterile token
tender shard
#

so if lawyers dont even defend themselves, why should developers do their own website

sterile token
tender shard
#

is this some kind of idiom I dont know yet?

river oracle
sterile token
ornate patio
#

b u m p

tender shard
sterile token
ornate patio
#

yes but im bumping again

lime moat
#
                Map<Integer, String> inheritedPrefixes = user.getCachedData().getMetaData(QueryOptions.nonContextual()).getPrefixes();
                int priority = inheritedPrefixes.keySet().stream().mapToInt(i -> i).max().orElse(10);``` This is more of a Java than an API question, so I'm going to ask here. How would I get the prefix's string of the highest `priority`. I'm not sure what to change in the `int priority` variable to do this. I of course need it to be a `string`, but yeah.
tender shard
#

(still looking for webdesigners for a website for free for my charity - check the pinned post in #general )

sterile token
lime moat
#

Could you elaborate on that, please?

tender shard
#

i dont really understand your question, tbh

#

oooh wait

#

I'd stream the map's entries, then sort them by priority.

#

no need for a comparator bruh

#

the key already is an integer

sterile token
#

I didnt know

#

Im just trying to help...

lime moat
#

I'm not entirely sure how I would get the string of it though, that's my main issue.

#

I get the max priority, just not the string ๐Ÿ˜…

tender shard
#

do you wanna get the "lowest" or "highest" prefix?

sterile token
#
map.entrySet().stream().sorted(Map.Entry.<String, Integer>comparingByValue().reversed()) .forEach(System.out::println)
sterile token
#

Something like that mfalex?

tender shard
lime moat
#

Well, two variables, one with lowest and one with highest.

sterile token
#

Idk

#

Just taken from google

#

๐Ÿ˜‚

tender shard
#

well just a basic example

#
       Map<Integer, String> inheritedPrefixes = new HashMap<>();
       String highestWhatever =  inheritedPrefixes.entrySet().stream().sorted(Map.Entry.comparingByKey()).findFirst().get().getValue();
#

this will get your the lowest string

sterile token
tender shard
lime moat
#

Let me try it!

sterile token
tender shard
#

I am extremely drunk, but here's my suggestions for both, highest and lowest:

       // Get the "lowest" value sorted by the key
       Map<Integer, String> inheritedPrefixes = new HashMap<>();
       String highestWhatever =  inheritedPrefixes.entrySet().stream().sorted(Map.Entry.comparingByKey()).findFirst().get().getValue();


       // Get the "highest" value sorted by the key
       Map<Integer, String> inheritedPrefixes2 = new HashMap<>();
       String lowestWhatever =  inheritedPrefixes2.entrySet().stream().sorted((o1, o2) -> -o1.getKey().compareTo(o2.getKey())).findFirst().get().getValue();
#

theare are probably way better methods. But I always think

  1. get it working
  2. improve it if the current version is causing problems, just let it as it is
#

or do you need both, the highest and lowest thing at the same time?

#

if so, of course you shuoldnt stream over the map twice

lime moat
#

I need them separately, however, I am getting an error. Wouldn't I need to use the previous map (Map<Integer, String> inheritedPrefixes = user.getCachedData().getMetaData(QueryOptions.nonContextual()).getPrefixes();)

#

To get the prefix?

tender shard
#

what's the error you got?

#

huh

lime moat
#

I should be needing to get the prefix.

tender shard
#

one of your values is null, as it seems, right?

#

then you gotta filter it first

lime moat
#

I'm assuming it's java Map<Integer, String> inheritedPrefixes = new HashMap<>();

tender shard
#

after stream(), filter it by adding this .filter(entry -> !(entry.getValue() != null))

#

that'll get rid of all null values

#

so just toss that inbetween stream() and .sorted(...)

lime moat
#

This is the exact map I need, yes? Map<Integer, String> inheritedPrefixes = new HashMap<>();

tender shard
#

your key, e.g. the Integer, will never be null though, right?

lime moat
#

Ah, I see

tender shard
#

have you used streams before?

lime moat
#

Never ๐Ÿ˜…

glossy venture
#

is there a good guide on how to create npcs in 1.19

tender shard
#

they are awesome! a bit confusing at first, but once you understand what they do, you'll learn to love them

lime moat
#

Yeah, they seem very confusing haha

glossy venture
#

im trying to make a ServerPlayer using nms but i need a ProfilePublicKey no fucking clue what that is

marble copper
#

Ok

glossy venture
#

oh wait is the ProfilePublicKey for chat signing?

marble copper
#

Do ProfilePrivateKey

#

Not public

#

It will show for whole server

#

ProfilePrivateKey

glossy venture
#
public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, @Nullable ProfilePublicKey publicKey)
#

oh wait i can pass null

#

ill try that

tender shard
# lime moat Yeah, they seem very confusing haha

just a tiny example

       List<String> names = Arrays.asList("peter","mfnalex","john","obama");
       List<String> sortedNames = names.stream().sorted().collect(Collectors.toList());
       String nameFirstInAlphabeticalOrder = names.stream().sorted().findFirst().get();
       String nameFirstWithoutEInIt = names.stream().filter(name -> !name.contains("e")).findFirst().get();
#

we use "findFirst()" because we dont know whether any of those things actually "survive" the stream

#

e.g. the last one, "first name without an E" might be null if we don't have a name without an E in it

river oracle
#

yea once your done with findFirst you have to use an optional ๐Ÿ˜ญ

tender shard
#

that's why findFirst() or findAny() returns an Optional

tender shard
lime moat
#
                Map<Integer, String> inheritedPrefixes2 = user.getCachedData().getMetaData(QueryOptions.nonContextual()).getPrefixes();
                String highestPrefix =  inheritedPrefixes2.entrySet().stream().filter(entry -> !(entry.getValue() != null)).sorted((o1, o2) -> -o1.getKey().compareTo(o2.getKey())).findFirst().get().getValue();``` This one still doesn't work. The first one does though! https://fwoostyhub.com/๐Ÿ›ท๐Ÿ›ซ๐Ÿคน๐Ÿผ
agile anvil
river oracle
#

its so much faster

glossy venture
tender shard
#

so instead of just doing get(), you should do orElse(null)

lime moat
#

I have multiple prefixes, though?

tender shard
#

it seems like you don't

#

print out the map before "streaming" over it

tender shard
#

print out the whole map

#

e.g. toss your map into sth like this

    public static void print(final Map<?, ?> map) {
        for (final Map.Entry<?, ?> entry : map.entrySet()) {
            System.out.println(entry.getKey() + " -> " + entry.getValue());
        }
    }
lime moat
#

One moment

#

Huh, now the lowestPrefix doesn't work either.

mighty bane
#
        int size = plugin.getConfig().getInt("size");
        System.out.println(loc);
        new BukkitRunnable() {

            @Override
            public void run() {
                loc.getBlock().setType(Material.AIR);
                System.out.println(loc);
            }
        }.runTaskLater(plugin, ((5 * size) + 20));
    }```
So I'm trying to delete a specific string of blocks after a set amount of time however whenever I call this method. It only ever deletes the latest block placed. Any reason why that happens?
tender shard
lime moat
#

Will do

patent fox
#

is there a villager trade event?

ornate patio
#

bumpity bump

patent fox
tender shard
patent fox
#

bruh

tender shard
#

you gotta use the InventoryClickEvent

tender shard
#

?stash

undone axleBOT
lime moat
#
                Map<Integer, String> inheritedPrefixes = user.getCachedData().getMetaData(QueryOptions.nonContextual()).getPrefixes();
                String highestWhatever =  inheritedPrefixes.entrySet().stream().filter(entry -> !(entry.getValue() != null)).sorted(Map.Entry.comparingByKey()).findFirst().get().getValue();``` Current code
sterile token
#

So you have done it

#

Or what do you need?

lime moat
#

I'm pretty sure it still gives me the empty list error.

#

I'll try it again

sterile token
#

Mayb you are using the wrong api method

lime moat
#

I swear it worked a little while ago

#

I'm quite lost now lol

tame kite
#

Hello! I have a little question to ask. Is there a way to get the positions of end towers when the dragon is defeated? For example while respawning the ender dragon, the tower crystals are created again. Can I calculate where those crystals should spawn without actually respawning the ender dragon?

lime moat
#

The map is 57

#

The stream is 58

tender shard
#

print out the map

#

oh

lime moat
tender shard
#

you did

lime moat
#

Yep

tender shard
#

ugh

#

mb

#

in the stream, replace != with ==

agile anvil
opal juniper
#

!(entry.getValue() != null)

tender shard
tame kite
tender shard
worldly ingot
tender shard
#

i sent this code

agile anvil
opal juniper
#

cause the pfp

tender shard
#

?switchmappings

tender shard
#

damn nice

worldly ingot
#

Yeah the profile picture lol

#

I was very confused seeing it not be under your username but having your pfp

vagrant stratus
#

lmao

#

Not even mine ๐Ÿ˜‚

#

close, but no

vagrant stratus
lime moat
#

lol

patent fox
#

is there a zombie villager cure event?

opal juniper
#

mfw capital package names and Main.java

lime moat
#

Well, the system works, thank you so much, @tender shard!

vagrant stratus
opal juniper
#

thats what i meant... whatever kek

vagrant stratus
#

mine's #Good

lime moat
#

This is my first ever plugin, so I feel like it's eh

vagrant stratus
#

I'm however improving the Anti-Malware code as I work on the paper fork, so there's that at least lol

opal juniper
vagrant stratus
#

yea.... as much as I dislike paper I'm not stupid enough to do a public fork using base Spigot ๐Ÿ˜‚

opal juniper
#

rtfm

sterile token
#

Lmao i having lot of troubles using Jackson to save and load a map

tender shard
patent fox
tender shard
vocal cloud
#

My friend capitalizes package names and it kills me inside

opal juniper
#

unfriend them

tender shard
#

luyten is too stupid to show this

agile anvil
ornate patio
#

boomp

sterile token
echo basalt
sterile token
#

Yo have say 3 times

#

Lmao

echo basalt
sterile token
#

If you wont be pacient, this is no the ideal place to ak for help...

ornate patio
#

no ones gonna scroll up 24 hours

sterile token
#

๐Ÿ˜‚

ornate patio
#

no ones checks threads too

sterile token
#

Okay so dont fuck

#

Be pacient

#

Open a thread and wait

#

That the answer

ornate patio
#

im not pushing for anyone to answer rn bruh

sterile token
#

You have make mad

ornate patio
#

just making sure the message is not lost

final monolith
#

How to get a BlockState from a Material guys? is it possible? ๐Ÿค”

sterile token
#

Lmao what an impacient society we have

agile anvil
ornate patio
#

mmm

#

i wont argue

sterile token
#

its better

#

Just stop spamming

#

You are being really ash**

agile anvil
sterile token
#

if you didn't get an answer yet, it's because noone knows the answer or noone had time to answer yet.

#

๐Ÿ˜ก

ornate patio
#

listen listen

#

first of all chill

#

not tryna cause beef here

sterile token
#

No bruh you are being really ash** spamming a message every 30m

ornate patio
#

and again im not pushing anyone to answer right right now, like i said just making sure the message isnt lost. ill make a thread whatever

sterile token
#

So if you wont open a thread and wait for answer your best option is to solve it yourself

ornate patio
#

i would love to have custom emojis rn ๐Ÿ˜”

sterile token
#

Lmao what an impatient society we have created...

ornate patio
#

MystBin - IncomeIctTalks

tender shard
#

wtf happened here lol

ornate patio
#

๐Ÿฎ

agile anvil
ornate patio
#

true

sterile token
ornate patio
#

mans gotta chill out

sterile token
tender shard
#

is it possible

#

that there is a "The Office" gif for literally everything

sterile token
#

Yes

#

Discord have improveed a lot

tender shard
#

no matter what happens - the office always has a gif for it, lol

sterile token
#

I wish discord responsive design was that great as gif

#

Because cellphone design is ๐Ÿคข

tender shard
#

YO GUYS

#

IM PREGNANT

agile anvil
#

Bro, drink less

#

Really

#

๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚

tender shard
#

yeah ok

#

lol

tender shard
#

is that leslie from P&R?!?!

quaint mantle
#

anyone know why when i set a block type to a bed it only shows the bottom of the bed and not the front

tender shard
quaint mantle
tender shard
#

yeah, you have to do this:

#

set both blocks to bed, then cast the head part to "bed" blockstate (NOT bed materialdata) ->

#

then you can use setPart(Bed.Part.HEAD)

quaint mantle
#

ic

#

thanks

quiet ice
#

Is there any API for applying a ChunkSnapshot to a chunk?

tender shard
quaint mantle
tender shard
#

oki

tender shard
#

a ChunkSnapshot is basically a thread-safe copy of a live chunk. It's not meant be "set back" or anything

quiet ice
#

Whyyyyy bukkit

tender shard
#

you'd literally have to iterate over all blocks and set them back, if you really need that

#

I wonder, what are you trying to do?

quaint mantle
tender shard
#

sth like this

Bed bed = (Bed) block.getState();
bed.setPart(Bed.Part.FOOT);
bed.update();
#

oh wait

#

my bad

#

Bed is not a BlockState, but BlockData

ancient plank
#

beb

tender shard
#

there is no need to update it again

quaint mantle
#

Ohhh okk

#

so ill cast the blockdata instead of blockstate

tender shard
#

Bed bed = (Bed) block.getBlockData();
// change it to FOOT or whatever

#

thats all you need

quaint mantle
#

Thanks

tender shard
#

np

quiet ice
#

If it was a block that isn't air I'd have a few hacks in store, but with air it is a bit difficult

tender shard
#

set them to air

#

thats it

#

ChunkSnapshots are really, as the name suggests, just a snapshot

#

setting a whole chunk to air should be possible very quickly though. just be sure to toss in "false" for setType()

quiet ice
#

Myes, but generally snapshots are kinda like backups - something that can be restored if needed

tender shard
#

easy, lemme show you an example. gimme a minute pls

quiet ice
#

But in this case it isn't I guess

glossy venture
#

you can even map them using an array

#

as chars are shorts so not too many values to map

#

especially not if you limit it to like 256 hars

#

chars

quiet ice
#

chars are not short

#

well they have the same size, but chars are unsigned

glossy venture
#

true

quiet ice
#

No, two bytes in java world

glossy venture
#

nah theyre wide

#

its like a wchar in c++

#

supports unicode

quiet ice
#

And kindof getting deprecated

glossy venture
#

?

#

but you should be able to easily convert chars to ints or shorts

#

and map them in an array

quiet ice
#

Like, it's not something that will happen overnight, but I fully expect chars to be deprecated in a few years to decades

glossy venture
#

which is much faster than a hashmap

glossy venture
#

l

#

yeah

#

but array is possibly even faster

#

than a switch

#

idk

#

no

urban kernel
#

can i register 2 playermoveevents in one plugin

#

alr

#

is there actually a limit

tender shard
#

?paste

undone axleBOT
urban kernel
#

noice

tender shard
#

like this

#

no

#

switch case would be faster

#

but this is not something you should worry about

glossy venture
#
enum Tile {
  // array map thing
  private static Tile[] map = new Tile[256];
  
  // constructor
  Tile(char c, ...) {
    map[(int) c] = this;
  }
  
  public static Tile getByChar(char c) {
    return map[(int) c];
  }
}
tender shard
#

unless you have like 124751 enum constants

#

that you dont have to expand it manually when you add a new enum

#

np

agile anvil
tender shard
glossy venture
tender shard
#

stop worrying about memory or "which is faster"

#

just do whatever is more convenient

glossy venture
#

thats like 256 * 8 bytes

chrome beacon
#

That array doesn't take that much memory

glossy venture
#

thats nothing

tender shard
#

and only worry about performance if you actually have performance problems

#

premature optimization is like getting condoms to jerk off

#

whut

chrome beacon
#

It's nothing close to Minecraft storing millions of blocks in ram

quiet ice
agile anvil
agile anvil
tender shard
quiet ice
#

Allocations are very expensive, but memory that is left to "rot" (but still is getting accessed frequently) is very cheap

tender shard
#

who cares about 256*8 bytes

agile anvil
#

Sorry I'm always reaching the perfection

tender shard
quiet ice
tender shard
#

get your job done, and then later, when something goes wrong, then you can look into optimizing it

agile anvil
tender shard
#

i'd rather add 5 new features within a day than worrying about doing 1 thing perfectly

#

because you will never get shit done if you worry about stuff like this

agile anvil
sterile token
#

Doen git has an option to replace variable string to another thing?

tender shard
#

its just not worth it to worry about tiny improvements

tender shard
#

but maven has

agile anvil
tender shard
agile anvil
#

But for mc

#

Of course it's not

sterile token
#

Hmn ok i ask because im doing som js test and i have a file which contains some credentials, so the file should be uploaded but need to get credentials stripped out

tender shard
#

noone cares if your enum lookup takes 0.0000001 seconds or 0.0000002 seconds

#

if it takes 0.01 seconds, then you can start worrying about it

agile anvil
quiet ice
#

Depends on the frequency

tender shard
#

for real, premature optimization is only worth it if you really got nothing else to do

ancient plank
#

hmm

tender shard
#

generally you should do it like this:

  1. get something that works
  2. see if it causes trouble
  3. if yes, optimize it. if no, go to step 1 again
vocal cloud
#

Make a product first. Optimize later

little whale
#

how do i change my nickname on spigotmc?

quiet ice
#

Unless you are doing IO

tender shard
undone axleBOT
#

Name changes on the forums are granted to those who have donated to the project. Donations are processed manually and generally take up to 24 hours. The donation widget can be found on the home page of SpigotMC at: https://www.spigotmc.org/.

tender shard
#

TL;DR: 10$ and you can change your name

quiet ice
#

If you do IO, optimise instantly - delaying it is very dangerous

tender shard
#

yeah ofc IO should be done async

#

also geol will you marry me?

little whale
#

how do i delete my account then?

vocal cloud
#

๐Ÿ‘€

tender shard
#

because creating a new acc is not allowed

quiet ice
tender shard
#

so thank you, mr geol โค๏ธ

tender shard
#

spigotmc allows it for people who donated

quiet ice
#

Well the larger ones do

tender shard
#

perfectly fine logic to me

waxen plinth
#

People will always complain about monetization no matter how benign it is

tender shard
quiet ice
#

In fact I know few on top of my brain that do not allow to change names

tender shard
#

people would still complain "why don't i get 4 redempts for 10$"

waxen plinth
quiet ice
waxen plinth
#

I'm worth much more than $10

tender shard
waxen plinth
#

Probably closer to $15

tender shard
#

well redempt

#

you have to think about the fact that once someone bought you, they also have to feed you

#

and pay for your internet

#

and stuff

waxen plinth
#

Still worth

sterile token
#

Is to posible to have a ServerSocket listening and responding at the same time?

tender shard
#

do you at least do the dishes etc?

tender shard
#

not at the exact same time ๐Ÿ˜›

waxen plinth
#

Not the most efficient use of a redempt but yes

#

You could always just get a dishwasher if that's what you need

sterile token
#

They use NIO i suppouse

tender shard
#

and it has both, a dishwasher and a washing machine โค๏ธ

tender shard
#

I am so happy

tender shard
little whale
#

ah wow

tender shard
#

i dont see anything wrong with it

#

you probably used spigot for free since years

#

how is it so bad if you just donate 10$ now

waxen plinth
#

Do you need a redempt

little whale
#

and whats the point on "those website"

quiet ice
#

Database does not allow for name changes

tender shard
#

it's not something we decided

agile anvil
waxen plinth
#

My services are available for the low price of $120k/year

tender shard
#

change your name, keep it, create a new account, we don't care

vocal cloud
#

Honestly it's $10 to support the project. They give you the code for free so it's the least you can do

tender shard
tender shard
#

if you offer something for free, people are upset and demanding all the time

#

if you sell something, everyone is friendly

waxen plinth
tender shard
#

making people pay a tiny bit of $$$ makes all those weird kids go away

alpine urchin
#

sadly kind of true

tender shard
#

yeah it's frustrating

sterile token
alpine urchin
#

no support = ez fix

#

i saw a project that said no we donโ€™t accept donations cause they donโ€™t want to have the feeling of owing people which to me is an interesting concept

#

and i can relate

tender shard
#

even worse - imagine being md_5. he spends like half of his whole free time to maintain spigot. then someone complains "why can I not change my name?!?!?!" and is upset about it. instead of being happy that spigot exists and is free, in the first place

#

really makes me angry

#

not good for my blood pressure

agile anvil
#

That's how internet works

#

Or a queue in fact

alpine urchin
#

what is he trying to do

#

i wont scroll all up

#

cope but whats up

candid shoal
#

How do I save data to a file

sterile token
#

I mean i have done a simple api for using ServerSocket and Socket, but it doesnt seems to be able to this:

client -> server "hi, im a client"
server -> client "hi, im a server"

opal juniper
alpine urchin
#

uh what is the problem

tender shard
alpine urchin
#

what errors or fails @sterile token

#

specifically

agile anvil
#

You have an inputstream and an outputstream

sterile token
#

I have something weird

tender shard
#

you ARE something weird

alpine urchin
#

you are being very vague not allowing us to help

sterile token
#

No no

alpine urchin
#

its like sayinf my plugin doesnt work

sterile token
#

I mean i uwill explain and send code

alpine urchin
#

i have something weird

tender shard
#

I remember when I once was in voice chat with verano

sterile token
#

oh bruh dont start shitying me

tender shard
#

and then he was like "oh wait, I gotta call the police, someone outside is shooting with a gun"

#

and when he came back, he talked about "kitchen roosted" the whole time

alpine urchin
#

this is america

tender shard
#

nah hes from uruguay

ornate patio
#

@tender shard check DMs whenever you can pls

vocal cloud
#

When someone DMs you asking for help

ornate patio
#

im not asking for help

vocal cloud
sterile token
#

Retropper i have this structure:

Connection object which has inside a getAddress(), getPublisher() and getSubscriber()
Publisher and subscriber implements runnable
Im doing mainly that

#

I think the problem is caused because the publisher is not well designed

#

Let me sen code

#

I ask for help because i never could make ServerSocket and Socket work

agile anvil
#

Did you follow a tutorial on these before ?

sterile token
#

No i just readed about ServerSocket and Socket

agile anvil
#

They're quite simple to use. The serversocket only accept new connections (it's like the creator of the end of the socket). So the ServerSocket create a Socket, so Create a thread for each new socket. Listen to it and send through it

#

It's the same from each side, you have the input and the output

sterile token
#

yeah

#

Im doing that i think

agile anvil
#

Well I'll wait to see your code

dry forum
#

how can i make it so my plugin doesnt need to be installed to work? its just a library and i want people to be able to use it without having to install the plugin, ive seen plugins with this

eternal night
#

plugins that depend on your library have to shade it

agile anvil
dry forum
tender shard
#
  1. make people shade it, or
  2. get it approved for maven central and make people use the plugin.yml's libraries feature (kinda unrealistic though)
tender shard
#

jitpack would work ofc

#

but jitpack sucks ass and not in the good way

dry forum
#

ah

tender shard
#

sorry I always have to add the "and not in the good way" part

dry forum
#

lmao

tender shard
#

i'm infamously known for saying this all the time

agile anvil
tender shard
dry forum
#

its free so

#

good for small projects

tender shard
#

yeah but you gotta make it compile on their servers too

#

so good luck if you're using NMS

#

it's tedious to make this work

#

if you only depend on spigot-api, then sure, it'll work without problems I guess

dry forum
#

i am doing that and it works fine so far

opal juniper
#

at least, there used to be

tender shard
#

but do they at least also have the remapped ones?

#

what is this repo called again? never used it

eternal night
#

code-something

opal juniper
#

was it codemc or

eternal night
#

yea

tender shard
#

ah yeah

eternal night
#

I cannot wait for them to go down

#

because mojang one day decides to enforce their shit

tender shard
#

yeah well anyway, I dont like jitpack. I dont even have a reason not to like it

#

i just dont like it haha

#

setting up ones own repo is so easy

rough drift
#

Sorta help dev, how can I make a slot empty like the sides of an inv

#

like making a full item texture

#

forgot how

tender shard
#

sorry i dont really understand

agile anvil
#

Transparent?

rough drift
#

No

#

like, make an item model that fills the whole slot including the edges

#

wait

#

smt like that idk

agile anvil
#

You'll need a resource pack

rough drift
#

Yeah I know

#

I just forgot how to make the model, best place I know where to ask lmao

#

Like I got the pack working

#

I just need those like 2 pixels

agile anvil
#

Oh ๐Ÿ˜‚ Well I'll try to take the inv texture, cut it just to get the slot size, and full it in white

rough drift
#

oh no that's not what I mean

tender shard
#

well it's easy

rough drift
#

The white is like an item

tender shard
#
  1. you create a texture that fits perfectly into the GUI
#
  1. You make it work for some special item with custom model data
rough drift
#

I got both sort of

#

I just need the texture to expand a couple of pixels

#

and I forgot how to change the inv model

agile anvil
#

Isn't it a png file ?

rough drift
#

No the model is a json

#

the png is the image to put on the item

#

My issue is making a model big enough to fit the extra border pixels

agile anvil
#

Well I'll just expand the png, but I'm not a pro on this so that's maybe not the good way to go sorry ๐Ÿ˜‚

rough drift
#

expanding just makes it higher qualtiy

agile anvil
#

Can you show the model json ?

rough drift
#

This, you see how some slots are filled in? that's a texture with a model of full size

#

that's what I mean

rough drift
#

just using a default glass pane model rn

agile anvil
#

Oh no

#

The one I sent doesn't work like that

rough drift
#

Yeah just figured

agile anvil
#

It's actually a char that has a texture

#

Yeah it's strange

rough drift
#

Though I need the same effect with items

agile anvil
#

You could do the same exactly

#

But I'm not familiar with it

rough drift
#

I am scanning all images within the help development channel to find the place where it was again

agile anvil
#

This one is from Origin Realm

#

You should definitely have a look to see how resource packs are powerful

rough drift
#

yea

#

I know resource packs

#

just forgot how to make the full inv

agile anvil
#

But if you are interested in custom UI or have a project feel free to DM me ;)

tender shard
#

JSON derulo

winged anvil
#

thats funny asf

agile anvil
dry forum
#

how would i go about registering events in a library? i have a library and i want to register events but since it wont be installed on a server it has no main class

eternal night
#

like listeners ?

dry forum
#

yeah

agile anvil
eternal night
#

Most code I see that wants to do that requires the consuming plugin to call a method for that

tender shard
dry forum
#

so id get a plugin from the user and just use that to register?

tender shard
#

I always got at least 2 new jรคger bottles at home

agile anvil
tender shard
agile anvil
tender shard
#

most people hate it

agile anvil
tender shard
#

in france it's probably called Jรคgermeisteaux

agile anvil
#

We shouldn't have this conversation on here actually. Just pretend it never happened

tender shard
#

bullshit, help-development is the best offtopic channel ever

#

unless someone actually asks any question, then we gotta shut up with offtopic lol

alpine urchin
tender shard
#

Bibo Jaegermeisterus

#

latin for "I'm gonna drink this jรคgermeister"

agile anvil
#

Does it actually means something in German? I'm thinking about Schwarzkopf

tender shard
#

yeah

#

Jรคgermeister means "Master of hunting"

#

do you remember Gรถring? This nazi dude?

#

He was the Reichsjรคgermeister / "Federal master of hunting"

#

so yeah

agile anvil
#

That's even cooler

tender shard
#

like "minister for hunting / shooting animals"

#

hard to translate

agile anvil
#

That's why there is a stag on the logo

tender shard
#

nah nah dont get me wrong

#

jรคgermeister existed before the whole nazi stuff

#

I just mentioned it for fun because it's a funny coincidence

agile anvil
#

Yeah ofc ๐Ÿ˜‚

#

Indeed the bottle have their old school look

#

Like maybe 1800

#

Let me check

tender shard
#

yeah in the 90's or so, jรคgermeister was known as "drink for old people"

#

but then they heavily invested into marketing

agile anvil
#

1935 my bad

tender shard
#

and then it became popular among young people

agile anvil
tender shard
#

the jรคgermeister bottle even has a german poem written on it

agile anvil
#

Like the favorite mix is the jรคger bomb

#

Jagรซr + Rebull

agile anvil
tender shard
alpine urchin
#

thats large

#

as a mf

tender shard
#

here, the text inside the green "label" at the corners

alpine urchin
#

looks like an olive oil bottle

tender shard
#

it's some "peom" about hunting lol

tender shard
#

an @chrome beacon oil bottle

agile anvil
tender shard
#

the poem is shitty, but good luck ๐Ÿ˜„

tender shard
#

i'm tired

#

does anyone have some crack cocaine to keep me awake?

#

wtf olivo

#

that emoji is supposed to only be used by fourteenbrush

alpine urchin
#

#general guys

tender shard
#

nah

#

help-development

alpine urchin
#

Serious Spigot and BungeeCord programming/development help | Ask other questions here

tender shard
#

best place for offtopic

#

see? ask OTHER questions here

tender shard
alpine urchin
#

Serious Spigot and BungeeCord programming/development help | Ask other questions here

dry forum
#

this might sound dumb is it possible to have per class listeners? kinda hard to explain but basically plugin im making you can make a gui variable and i want to make inventoryclick events for each individual gui since theyd all be different ex if someone wanted the gui to be locked but a 2nd one to not be locked

agile anvil
#

We just want people to feel it's a warm place

agile anvil
dry forum
#

what would be the best way to do something like that then?

agile anvil
#

I recommend having one listener class, and loop all inventories to check the name

#

Especially if you need the user of the API to register your listeners

dry forum
#

alright ill try it ty

agile anvil
#

Names or something else

#

Maybe inventory instance actually

dry forum
#

yeah i was probably gonna do that

agile anvil
#

What you can do to achieve like you wanted, is to create an interface

#

And in the listener, call that interface, or method or whatever

#

Maybe more abstract my bad

#

In your Item class having an abstract method like "onClick(some cool arguments here"

#

Which would be called from the only InventoryClickEvent handled

dry forum
#

alright thanks

agile anvil
#

Good luck, and feel free to present your work for advices ;)

dry forum
#

ty ๐Ÿ˜„

civic apex
#

how can I cancel knockback from an explosion?

#

(Im using EntityDamageByEntityEvent, cancelling it doesnt remove knockback, setting velocity to 0 stops them completely)

agile anvil
#

Listen to EntityDamageEvent, check the cause, if it's explosion, set the entity velocity to 0 1 tick after

civic apex
#

no

#

that stops em

agile anvil
#

Cancel the damage, and apply the damage yourself on the player health

civic apex
#

no, how to cancel the kb

agile anvil
#

That would cancel the kb

civic apex
#

how

#

setting velocity to 0 isnt an option

agile anvil
#

Cancel the event, apply the damage yourself on the player

civic apex
#

cancelling the event doesnt cancel the kb

agile anvil
#

Oh yeah you're right actually mb

civic apex
#

(EntityDamageByEntityEvent)

#

i have seen PlayerVelocityEvent, but i cant determine just from the data of that event if i want to cancel the kb or not

agile anvil
#

What's wrong with the set velocity to 0 after 1 tick actually? What do you mean by it stops it?

civic apex
#

it stops their velocity

#

if they were running

#

and recieve an explosion

#

they would suddenly stop moving

agile anvil
#

So

civic apex
#

wdym

agile anvil
#

Get rid of the explosion, cancel it, and apply a fake explosion at the same location

civic apex
#

does cancelling the explosion cancel the kb

final monolith
#

Hey guys, how to spawn a FallingBlock with packets? i have using the FallingBlockEntity's constructor and when i call the falling block didnt spawns.

sterile token
#

Rolyn where i can send the code? Its a big project that why

agile anvil
civic apex
#

yeah np

agile anvil
civic apex
#

i wanna set custom damages anyway

#

so thats great

agile anvil
sterile token
ornate patio
#

if someone knows whats going on in #1010666894338043965 and can help that'd be great, thanks ๐Ÿ˜„

final monolith
slate mortar
#

why are you using packets for that?

agile anvil
#

Have you tried searching for it? There are plenty of articles related to it. If you don't find tell me I'll search

final monolith
agile anvil
slate mortar
#

why can't you explain those? ._.

agile anvil
undone axleBOT
mighty aurora
#

Does anyone know why this doesn't work? In specific I have created the item to activate it but it isn't working(Also It was working originally but I tried to add additional code for cooldowns and logs and it stopped working even after trying to remove the new code).

            getLogger("TimeBoundItems").info("Right Click Detected");
            if (p.getInventory().getItemInMainHand().getItemMeta().getDisplayName().equals(ChatColor.BOLD.GRAY + "Ability: " + ChatColor.BOLD.DARK_PURPLE + "Dark Mist")) {
                getLogger("TimeBoundItems").info("Dark Mist Detected");
                if (!p.hasPermission("timebounditems.darkmist")) {
                    //plugin.msg(p, "You don't have this ability yet!");
                    p.sendMessage("You don't have this ability yet");
                    e.setCancelled(true);
                    return;
                }
//                final CooldownManager cooldownManager = new CooldownManager();
//                long timeLeft = System.currentTimeMillis() - cooldownManager.getCooldown(p.getUniqueId());
//                if(TimeUnit.MILLISECONDS.toSeconds(timeLeft) >= 60){
//                    log.info(p + "used Dark Mist");
//                    cooldownManager.setCooldown(p.getUniqueId(), System.currentTimeMillis());
                    p.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 800, 0, false, false));
                    p.getNearbyEntities(20,20,20).forEach(entity -> {
                        if(entity instanceof Player) {
                            Player target = (Player) entity;
                            target.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 600, 0, false, false));
                        }
                    });```
slate mortar
#

i see choco typing ๐Ÿ‘€

tender shard
#

i see your mom's BITCH typing smh

#

choco stopped typing

slate mortar
#

alex lmfao

#

still don't have your login creds it seems ._.

#

sad

tender shard
#

its a german company

#

and today is / or was sunday

grim ice
#

the heavens are calling for me

slate mortar
#

imagine forgetting your login creds

#

cringe

grim ice
slate mortar
#

rq... is choco typing a book or smt?

tender shard
#

yeah I bet you have a hashmap<Website,LoginCreds> in your head

grim ice
#

i use one password for all the websites i use

worldly ingot
#
BaseComponent[] message = new ComponentBuilder("[This is an item]")
    .event(new HoverEvent(HoverEvent.Action.SHOW_ITEM, new Item(
        itemStack.getType().getKey().toString(),
        itemStack.getAmount(),
        itemStack.hasItemMeta() ? ItemTag.ofNbt(itemStack.getItemMeta().getAsString()) : null
    )))
    .create();```
#

You can send it with Spigot, player.spigot().sendMessage(message);

tender shard
#

oh doesnt our cum bot have a similar thing @slate mortar ?

slate mortar
#

uh

#

wdym

tender shard
#

like /showitem

#

or whatever its called

slate mortar
#

i dont think it's the bot that has that

tender shard
#

oh yeah I meant the simp plugin

agile anvil
slate mortar
#

yea

tender shard
#

lmao people will probably think we're weird

slate mortar
#

we are

worldly ingot
#

I plan on adding HoverEvent event = itemStack.spigot().asHoverEvent(), but I'm trying to get simpler stuff merged into Spigot first

grim ice
#

not really

#

all of us are weirdos

tender shard
#

"does the cum bot have this?" - "no, it's the simp plugin" - "ah yes"

mighty aurora
slate mortar
#

lol

#

they don't understand how important that smp is

grim ice
#

cum smp

slate mortar
#

and you apparently don't understand either, because you're not building the lobby

#

instead

tender shard
#

I DID BUILD THE LOBBY

slate mortar
#

you're forgetting your login credentials to some weird app

worldly ingot
tender shard
#

weird app?!

slate mortar
#

weird app

tender shard
#

it's visionaire studio, mah gurl

slate mortar
#

notepad for life

grim ice
hardy ether
#
  trigger:
    if arg-1 is not set:
      reply with "Please enter in a valid link code (You can do this in game by /link)!"
    else if {code::%arg-1%} is not set:
      reply with "Your link code is not set. Please link your account with /link ingame!"
    else if {code::%arg-1%} is set:
      if {discord::%discord id of event-member%::player} is not set:
        set {_p} to "%{code::%arg-1%}%" parsed as an offline player
        set {_u} to {_p}'s uuid
        if {linked::%{_u}%} is set:
          reply with "This account is already linked!"
          stop
        set {discord::%discord id of event-member%::player} to {code::%arg-1%}
        set {discord::%discord id of event-member%::uuid} to {uuid::%arg-1%}
        set {discord::%discord id of event-member%} to discord id of event-member
        reply with "%{code::%arg-1%}% has been linked to your Discord account!"
        execute console command "diamond block"
       add {_p} to {linked::*}
        set the discord nickname of event-member to "%{code::%arg-1%}%" with event-bot
        delete {code::%arg-1%}
        delete {uuid::%arg-1%}
      else:
        reply with "This account is already linked."

So i have this so far

slate mortar
#

see

#

2hex

grim ice
#

100% no ide

slate mortar
#

man of culture

grim ice
#

i only used cmd to build

#

with gradle

tender shard
slate mortar
#

lol

grim ice
#

lol

slate mortar
#

ugh

hardy ether
#

D:

slate mortar
#

that looks so ass

#

ngl

#

and i thought kotlin is the ugliest

mighty aurora
grim ice
#

its not a coding language

#

and kotlin istn the ugliest

#

python is

slate mortar
#

well

#

i currently have to modify a python script

#

it's not working

#

because i don't know shit in python lmfao

#

and i don't have code completion and shit

tender shard
#

do you have pyCharm?

grim ice
#

ew

#

python ide

slate mortar
#

no i use some random shit-ass plugin in ij

#

which sucks ass

#

in a bad way

grim ice
#

lmfaooo

tender shard
#

oh yeah

#

you need pyCharm

agile anvil
grim ice
#

coding python in intellij

slate mortar
#

"coding"

tender shard
grim ice
slate mortar
#

more like modifying 2-3 lines

#

and failing

#

oh wait, maybe spotify or discord fixed their shit

grim ice
#

jetbrains ide for python overkill imo

tender shard
#

im looking forward to this new jetbrains ide

ornate patio
#

is there a clean way to unregister an event listener

tender shard
#

its probably shit

ornate heart
#

Whatโ€™s it for?

slate mortar
#

no, they did not fix anything

#

fuck you discord

#

or spotify idk

grim ice
#

u can code in java with pycharm btw

tender shard
grim ice
#

it works for both java and python

#

LOL

ornate heart
#

Ah gotchu

grim ice
#

thats what google says

slate mortar
#

like why tf

#

doesnt it work

tender shard
#

oh btw @worldly ingot

slate mortar
#

so stupid

tender shard
#

I still have to nag you

#

to tell me everything you know about the former spigot ingame events

#

md_5 told me I could host future events because I complained that there are no events anymore

grim ice
#

tell him everything about rolling down in the deep

mighty aurora
#

Need help debugging code

grim ice
#

u promised to do some shit

#

7 months ago

tender shard
#

huh

grim ice
#

i think

tender shard
#

when

#

where

grim ice
#

im not sure if i remember correctly

tender shard
#

hm

grim ice
#

but either you or smile

tender shard
#

i promised to do an event on my discord

worldly ingot
grim ice
#

made some promise about some event or some thing

tender shard
tender shard
ornate patio
grim ice
#

ah it was frostalf

worldly ingot
#

I actually don't think I was around for this, Alex. May have even been well before me

tender shard
grim ice
#

frostalf said
"that gives me a great idea
I have a new competition for around this years christmas time ๐Ÿ˜‰
depending how things go, I will host the event ๐Ÿ™‚"

ornate patio
worldly ingot
#

That means they were last done before 2015 btw lol

grim ice
#

mfnalex failed to learn about rolling down in the deep

#

ok this is cringe sorry

tender shard
#

I fail doing a lot of things

worldly ingot
#

The last "event" I recall was the 1.9 update when the Spigotcraft server was created for in-dev builds of Spigot

tender shard
#

but I'm good at cutting bread into precise slices

agile anvil
worldly ingot
#

There were often 10+ players online

tender shard
grim ice
#

do u also know how to pour precisely even cups of juice

tender shard
#

my father always called himself the bread master

grim ice
#

if u do then please come to my house

tender shard
#

I usually buy crates of nice drinks, e.g. 24x0.33 liters of ice tea

#

so, no

grim ice
#

rip