#help-development

1 messages ยท Page 26 of 1

vocal cloud
#

Gradle makes life a lot easier

echo basalt
#

maven looks like html and I hate it

earnest socket
#

I use maven

river oracle
#

mojang mappings are pretty easy

echo basalt
#

it's a markup language

ivory sleet
#

Then use special source plugin

echo basalt
#

well I can barely look ahead without my eyes fogging up

#

imma try to slep

#

probably gon wake up at 6pm

compact haven
earnest socket
#

It did not work

compact haven
#

โ™ฅ๏ธ happy to share

river oracle
#

not explanatory enogh

echo basalt
#

website written in java when

river oracle
#

cba to help

#

?notworking

undone axleBOT
#

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

vocal cloud
echo basalt
earnest socket
#

It's just like I didn't change anything

#

No errors or anything

#

It just did nothing

river oracle
#

did you add the maven dependency :)

earnest socket
#

Think so

vocal cloud
#

Send pom moment

river oracle
#

Thissssss

earnest socket
#

One sec

river oracle
#

slayyyyyyy

vocal cloud
#

And paste it

boreal seal
#

Good guide on dependency injection

#

Not spigot one

oblique vigil
#

yo how to i remove all of a specific itemstack, remove# doesnt work and removeItem# doesnt work

chrome beacon
boreal seal
#

And set air

vestal dome
#

Sorry for interrupting but I would like to ask if somebody could help on my thread.

boreal seal
#

What u are trying to remove

river oracle
#

I'll write you one

#

give me 2 minutes

vocal cloud
oblique vigil
ivory sleet
#

Depends on how

#

Sometimes youโ€™re given a direct proxy delegate that reflects onto nms

#

And sometimes its just a normal context object, in which manipulating it will have no effects

river oracle
# boreal seal Good guide on dependency injection

public class MyPlugin extends JavaPlugin {
  
  public void onEnable(){
    Bukkit.getPluginManager().registerEvents(new MyEvent(this), this);
  }
}

public class MyEvent implements Listener {
  private final MyPlugin plugin;
  public MyEvent(@NonNull final MyPlugin plugin){
    this.plugin = plugin;
  }

  @EventHandler
  public void onJoin(PlayerJoinEvent e){
    plugin.getLogger().info("Wow I used the plugin in this class crazy as fuck");
  }
}```
oblique vigil
#

damn i wish i got spoonfed like that all the time

#

shit is mint

#

๐Ÿ˜‹

earnest socket
#

my pom file is too large but I can't send a file in this channel

#

where should I send it?

river oracle
#

?paste

undone axleBOT
river oracle
#

:P

earnest socket
river oracle
#

by that logic all learning resources are simply spoonfeeding

ivory sleet
oblique vigil
#

well yeah but still better than someone just saying "use this method" and then continue to provide nothing else on what it does lmao

river oracle
#

when it comes to just using a method I'll just say yea use a method lol

#

its easy to apply it given the docs are used

river oracle
#

Dependency Injection is a fundamental concept not a method

boreal seal
#

Best out there and most easy to understand no ton of bullshit and libraryโ€™s

ivory sleet
river oracle
#

just remember to stick with lowest values like Plugin instead of MyPlugin etc

#

it makes your code more portible

ivory sleet
#

?di believe there is quite literally almost an identical example here tho evan

undone axleBOT
ivory sleet
earnest socket
#

is there maybe some website where I can see what each mapping is mapped to?

ivory sleet
#

Screamingsandals

carmine nacelle
#

I made a function to make a particle helix, I want it to flip directions and "come back down" once it hits a certain height. Any ideas? its currently just completely stopping at the top

    public static void createHelix(Location location, float radius) {
        new BukkitRunnable(){
            public void run() {
                new BukkitRunnable(){
                    double t = 0;
                    public void run(){
                        if (t < 100) {
                            float x = (float) (radius * Math.sin(t));
                            float z = (float) (radius * Math.cos(t));
                            float y;
                            if (t < 20) {
                                y = (float) (radius * (t / 10));
                                location.getWorld().spawnParticle(Particle.DRIPPING_HONEY, location.getX() + x, location.getY() + y, location.getZ() + z, 1);
                            } else {
                                y = (float) (radius * (t * 10));
                                location.getWorld().spawnParticle(Particle.DRIPPING_HONEY, location.getX() + x, location.getY() + y, location.getZ() + z, 1);
                            }
                            t += 0.1;
                        }
                    }
                }.runTaskTimer(cadiaBees, 0, 0);
            }
        }.runTaskTimer(cadiaBees, 0, 200);
    }

https://i.gyazo.com/933cf887122f2b54498daceec174e764.mp4

compact haven
#

we should teach Guice

ivory sleet
#

Why

river oracle
#

I don't like Guice depency Injection it makes it hard to adapt

compact haven
#

purely a joke but you got me before I could spell a word

#

itโ€™s ok for really large programs

ivory sleet
#

Oh, me just not getting the irony badum_tss

compact haven
#

anything small is just overworked if itโ€™s using Guice

compact haven
river oracle
#

I don't get it like usually I always pass around 1 main thing, but what if I want to pass in other values too

#

with guice that becomes impossible

ivory sleet
#

Thats kinda not good tho

#

Or well, it isnt that much better than a singleton

#

(Little bit)

river oracle
#

whats wrong with passing needed values into a constructor

ivory sleet
#

But Ive seen some fairly big projects doing that in practice also like LuckPerms

#

So wouldnt blame ya

#

My point is a lot of people just pass their main instance everywhere

river oracle
#

what would be the alternative for moving stuff around that you'd reccomend just curious if constructor passing is bad

#

oh I don't do that

#

I only pass what i need

ivory sleet
#

Yeah thats better

#

Thought you did the opposite, but then youโ€™re good

river oracle
#

My sonar lint is extremely strict lol Its usually just like bruh

ivory sleet
river oracle
#

the only thing I don't follow is the complexity practices sometimes I just need one more if statement to make my method work lol

ivory sleet
#

Ah

carmine nacelle
#

pls

river oracle
#

its very rare I set them off but if I do its super annoying because Its not worth it to split up that method usually

ivory sleet
#

Mye

#

I hate using style guides but it can be quite helpful

cunning canopy
#

should coordinate arguments in commands be parsed as floats?

ivory sleet
#

you can probably go for doubles

#

Since thats how theyโ€™re afaik stored (Through Location and Vector for instance)

cunning canopy
#

thanks

river oracle
ivory sleet
#

Ah, I usually only add final if the function becomes impolitely big for readers to keep track of eventual mutations, but it is actually good as it can reduce the amount of bc instructions when compiling (not that it matters a lot but still Ig)

river oracle
#

I'm actually surprised I was able to land a job at a server with only a year of programming experience I'm glad someone thinks My code is good enough for that lol

ivory sleet
tender shard
river oracle
#

every time I look at my code I go oh lord what the fuck is this get this away from me

#

beat them up

ivory sleet
#

Hehe, I used (and still do to some degree) just hide everything behind interfaces so I cant see the ugly implementation

river oracle
#

if i look at my implementation I cringe so we just make some neat tighty interfaces

ivory sleet
#

Myeah, altho there are some benefits with it Ig like decoupling and mockability

compact haven
#

It is called abstraction ๐Ÿ˜

cunning canopy
#

any tips on iterating through all blocks between a selection of two coordinates?

river oracle
#

adding

carmine nacelle
#

So uhhh...is there a way to use world#spawnParticle without the particle spazzing out? i.e. Dragon_breath spreads out

#

I want it to stay still

#

the only way ive found that works is packets.

ivory sleet
#

If its a really large volume, split the iteration up into multiple tasks running on individual ticks and add necessary synchronization (necessarily not anything with multithreading)

cunning canopy
#

thanks

#

but for iterating

#

like

#

how would I go about going through all the locations

ivory sleet
#

A nested 3 level for loop

#

for each x, for each y, for each z

cunning canopy
#

what would be the time efficiency?

#

complexity sorry

brave sparrow
#

O(xyz)

ivory sleet
#

Not the most efficient time complexity, but you cant get any better, you just have to come up with tricks to make it scalable enough

compact haven
#

O(n^3)

brave sparrow
compact haven
#

wot

#

Not how that works

brave sparrow
#

Lol

cunning canopy
#

so should I just schedule a new task with my for loop inside?

ivory sleet
#

One way to do it

brave sparrow
ivory sleet
#

?workdistro

ivory sleet
#

Might wanna peek at that

cunning canopy
#

thanks

compact haven
#

so to say itโ€™s O(xyz) is not technically wrong but no one would give that as the time complexity, too situationally dependent

cunning canopy
#

o

#

your functions cant use more then 50ms?

ivory sleet
#

Its not good if that happens

#

But for sth to take 50ms you have to do something quite expensive such as IO or large computations

brave sparrow
#

It depends how they construct the shape

cunning canopy
#

so should I use additions for distrubuting the workload on this?

oblique vigil
#

anyone know why player.getInventory().removeItem(item) would only remove one of the itemstack and not all of them even though it respects item sizes

#

i made a completely different class and it still wont remove all of the stack

#
    protected void onCommand() {
        Player player = (Player) sender;
        ItemStack item = new ItemStack(Material.CALCITE);
        ItemMeta meta = item.getItemMeta();
        meta.setDisplayName("hi");
        item.setItemMeta(meta);

        PlayerInventory inventory = player.getInventory();
        if (args.length == 1) {
            if (args[0].equalsIgnoreCase("give")) {
                inventory.addItem(item);
            } else if (args[0].equalsIgnoreCase("remove")) {
                inventory.removeItem(item);
                player.updateInventory();
            }
        }
    }```
carmine nacelle
#

Whenever I use gson to save a string with these characters โ‹ฏใ€Œ it saves as weird characters and loads back in as ???

cunning canopy
#

u mean json?

carmine nacelle
#

gson saves to json files yes

ivory sleet
#

Make sure u use a consistent encoding and decoding

carmine nacelle
#

Well it saves as "๎œพ๎œ‰??๎œˆ๎œŒ๎œˆ?๎œพ๎œˆ??๎œŒ๎œŒ??๎œพ๎œ‡???๎œŒ?C๎œพ?๎œ‰??๎œŒ?a๎œพ?๎œŒ?๎œ‡๎œŒ?d๎œพ???๎œ‹๎œ‹๎œŠi๎œพ????๎œ‹๎œˆa ๎œพ????๎œ‹?H๎œพ?๎œ‡?๎œ‡๎œ‹?i๎œพ?๎œŠ?๎œ‹๎œ‹?v๎œพ????๎œ‹?e๎œพ????๎œŠ๎œŠ?๎œพ????๎œŠ๎œ‡?

ivory sleet
#

How do u save and load?

carmine nacelle
#

it should be #c35bfbโ‹ฏ#b65ff8ใ€Œ#a963f6C#9c67f3a#8f6af0d#826eedi#7572eba #6776e8H#5a7ae5i#4d7ee2v#4081e0e#3385ddใ€#2689daโ‹ฏ

#

gson

ivory sleet
#

No I mean code wise

#

You already mentioned gson

carmine nacelle
#
    public void saveHives() throws IOException {
        File file = new File(cadiaBees.getDataFolder().getAbsolutePath() + "/hives.json");
        file.getParentFile().mkdir();
        file.createNewFile();

        Writer writer = new FileWriter(file, false);

        Gson gson = new GsonBuilder()
                .registerTypeHierarchyAdapter(ItemStack.class, new ItemStackSerializer())
                .registerTypeHierarchyAdapter(Location.class, new LocationSerializer())
                .disableHtmlEscaping()
                .setPrettyPrinting()
                .create();

        gson.toJson(cadiaBees.hiveManager.getCustomHives(), writer);
        writer.close();
    }
#
    public void loadHives() {
        File file = new File(cadiaBees.getDataFolder().getAbsolutePath() + "/hives.json");

        if(file.exists()) {
            Reader reader = null;
            try {
                reader = new FileReader(file);
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }

            Gson gson = new GsonBuilder()
                    .registerTypeHierarchyAdapter(ItemStack.class, new ItemStackSerializer())
                    .registerTypeHierarchyAdapter(Location.class, new LocationSerializer())
                    .disableHtmlEscaping()
                    .setPrettyPrinting()
                    .create();

            List<CustomHive> hives = gson.fromJson(reader, new TypeToken<List<CustomHive>>() {}.getType());
            for(CustomHive hive : hives) {
                cadiaBees.hiveManager.addHive(hive);
                cadiaBees.hiveHoloManager.setupHiveHolos(hive);
                ParticleUtil.createHelix(hive.getHiveLocation().add(0.5, 0, 0.5), 1);
            }
        }
    }
compact haven
#

no his problem isnt gson

ivory sleet
#

use Stu like
try (var writer = Files.newBufferedWriter(file.toPath(),StandardCharsets.UTF_8){
//use the writer
}

#

btw

compact haven
#

It shows weirdly in notepad++ but when he uploaded the exact file onto discord it displayed fine in the file preview

#

But the encoding was right so no clue why

ivory sleet
#

Oh right, on phone

carmine nacelle
#

Everything loads fine ingame except for those characters i posted above

compact haven
#

Wdym by except

carmine nacelle
compact haven
#

Like in game it shows those weird colors instead of the hex?

carmine nacelle
#

heres a side by side

compact haven
#

ah wtf

carmine nacelle
#

Left is before saving

#

right is after

ivory sleet
#

Well FileWriter is ehmโ€ฆ

ivory sleet
#

Idk what java version you use

#

But older ones do not necessarily use a consistent default charset, might be os dependent etc

#

And some classes still havent migrated to a default of utf8

compact haven
#

Do you have .disableHtmlEscaping

#

when you build your gson

ivory sleet
#

They have

compact haven
#

Ah they sent it

ivory sleet
#

@carmine nacelle also use registerTypeAdapter just

#

For, for instance Location

carmine nacelle
#

im on java 17

#

So uh

#

LOL

#

this is with the buffered thing

#

its screaming

#

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

oblique vigil
#

it legit says in the api it should work but it just doesnt

charred blaze
#

Player told me that he spawned in a block

#

loc.setY(loc.getWorld().getHighestBlockAt(loc).getY());

heady zealot
#

i keep teleporting when walking to bamboos
anyone know how to fix it?

spare prism
#

Why is it null: data.getConfigurationSection("Quarries")
Config:

Quarries: []
cunning canopy
#

what is FAWE?

sullen marlin
#

Cause that's an array/list not a section

spare prism
# sullen marlin Cause that's an array/list not a section

Doesn't it work like that? Should I use a Map instead maybe?

    @Override
    public void initializeFields() {
        getFileConfiguration().addDefault("Quarries", new ConfigurationSection[0]);
        getFileConfiguration().options().copyDefaults(true);
        getFileConfiguration().options().copyHeader(true);
        saveConfigFile();
    }
sullen marlin
#

I don't think you can make an array of sections

#

But a section is analogous to a map

cunning canopy
#

does gpl3 allow me to hide source code?

spare prism
carmine nacelle
#

oooh big man is here

#

possibly my only hope of fixing this issue

#

first screenshot's text saves and reloads as the 2nd

#
    public void saveHives() throws IOException {
        File file = new File(cadiaBees.getDataFolder().getAbsolutePath() + "/hives.json");
        file.getParentFile().mkdir();
        file.createNewFile();

        Writer writer = new FileWriter(file, false);

        Gson gson = new GsonBuilder()
                .registerTypeHierarchyAdapter(ItemStack.class, new ItemStackSerializer())
                .registerTypeHierarchyAdapter(Location.class, new LocationSerializer())
                .disableHtmlEscaping()
                .setPrettyPrinting()
                .create();

        gson.toJson(cadiaBees.hiveManager.getCustomHives(), writer);
        writer.close();
    }
graceful oxide
#

the Team class only has addPlayer and addEntry, and cannot add entities... any idea how to?

oblique vigil
#

anyone know why player.getInventory().removeItem(item) only removes one of the items i specified even if i have multiple?

vivid cave
#

I want to fully track some type of entity (caching them)
EntitiesLoadEvent so when they load i know they are subject to be seen
EntitiesUnloadEvent so i can unload them from my cache too cuz they are no longer subject to be seen
is there any events that i might want to listen to? Like if they are removed by player / destroyed / moved, etc? Are there events for those?
I just need to track them (track them as in, always know their coordinates without sending some .getNearbyEntities all the time

tender shard
#

does anyone know the namespacedkey for "using a totem of undying"?

#

nvm I found it

#

minecraft:adventure/totem_of_undying

carmine nacelle
#

I figured it out

#

It was a pain

tender shard
#

lmao sorry copilot, but this isn't exactly what I meant lol

eternal oxide
#

Eclipse loves to do that on its own

tender shard
#

lmao

eternal oxide
#

every copy/paste

tender shard
#

they also cast it to (Player)

ashen quest
#

plugin idea plz smth related to board games or anything thats fun

tender shard
#

is there a better way to grant advancements except to loop over their criterias?

ashen quest
#

already there and you said it twice xd

tender shard
#

I'll repeat this suggestion everytime you ask lol

ashen quest
#

theres a command thothat would give u every advancement

tender shard
#

i only need to give one specific advancement

#

the "you used a totem of undying" one

ashen quest
#

/advancement give everything or smthing along those lines, i did see it in a yt vid two days ago

#

Postmortal

tender shard
#

yeah but using commands is a weird method

ashen quest
#

oh yea no other way than iteration

warm mica
#

EntityDeathEvent isn't being called with entity.remove(), meaning that you should also regularly check whether your cached entities still exist. You may do that on a separate thread

vivid cave
#

Or are those happening in different contexts

warm mica
#

Oh there's actually a EntitiesLoadEvent

#

I don't think that there will be a difference

#

Only make sure to go through all chunks that are already loaded with the start of your plugin

eternal night
#

Entities are loaded at a different time than chunks

#

Which is why these events exist

warm mica
#

They are being loaded before the chunk is being loafed

eternal night
#

During the chunk load event entities may not be in the chunks entity list yet

#

No

vivid cave
warm mica
#

"The provided chunk may or may not be loaded."

eternal night
#

They are specifically not loaded before the chunk

vivid cave
#

aha

eternal night
#

They are loaded individually

warm mica
#

That's what EntitiesLoadEvent says

eternal night
#

Either entities are there and chunk isn't

#

Or chunk is there and entities aren't

#

Two different threads doing two different things

vivid cave
tender shard
#

I think my method names are a bit verbose lol

warm mica
#

.getLocation() is thread safe, I believe

vivid cave
#

Many thanks!

tender shard
#

why on a different thread? loading entities is on the main thread anyway

#

oooh

vivid cave
tender shard
#

yeah ok

vivid cave
#

^^

tender shard
#

but tbh just doing isValid() on an entity is taking like half a nanosecond lol

vivid cave
desert loom
#

last time I checked I think just calling isDead is good enough for checking entity#remove

#

since I believe isDead checks if they have a remove reason or something and entity#remove sets a remove reason

#

something like that

vivid cave
#

ah yeah, interesting ๐Ÿ™‚

tender shard
#

entity.remove() sets a remove reason

vivid cave
#

Also I have a random question which is totally apart
I've managed quite impressive results with map art dithering algorithm (so it really feels like the map has the full spectrum of colors even tho technically minecraft maps can show only 143colors)
Because I'm a mad lad I'd want to do the same with audio&music, do you guys think it'd be possible to make an audio palette from all the sounds & pitches that noteblocks or any mobs can make, split the track/music in very small packets (a bit like what a pixel is to an image), and do some dithering (calculate best distance, apply quantization & correction at neighbors, etc)

#

My dream would be that we can input custom music in vanilla minecraft without going through data packs or texture packs or whatever, even if the quality is obviously nth near to the og quality i think it could be quite fun

#

I just fear about limitations due to how much sounds can be played at once or due to the small size of the palette i can make

compact cape
#

Was wondering if the Spigot API detects the whole second argument of /command arg1 "arg2 is long" arg3 or will return it in 3 arguments?

tender shard
#

3 different ones

compact cape
#

Dang it ๐Ÿฅฒ

tender shard
#

it'll be like this
args[0] = arg1
args[1] = "arg2
etc

compact cape
#

Now I have to fix it ๐Ÿ˜‚

tender shard
#

it just does String.split(" ") iirc

vivid cave
tender shard
#

you don't have to, unless you care whether you "instantly" get notified about the death

vivid cave
#

alright!

#

thanks^^

tender shard
#

np

compact cape
tender shard
#

sometimes I read my own code and I wonder "wtf was I trying to tell myself using this comment" lol

#

3 ds end? whut?

#

oh lmao

#

it was actually "Graveyards end" and I accidentally replaced it a minute ago lmao

compact cape
#

At least you add comments to your code ๐Ÿ˜‚

tender shard
#

I add a shit ton of comments everywhere lol

#

100+ matches... smh

#

it's like 800+

#

also wtf why does it say "12+ files"

#

I could understand 10+

#

but why is 12 the limit

#

lol

desert loom
#

could possibly be even more than 800 if was included

/*

*/

tender shard
#

weird thing

#

when checking for /* too, it only lists "11+" files

#

lmao

compact cape
#

If you search my code there will be less than 10 (If you don't count Todos ๐Ÿ˜‚ I use them a lot)

tender shard
#

oh yeah TODO comments are awesome

#

I love how intellij mocks you for pushing TODO comments

#

best kind of comment:
// TODO: Fix this

compact cape
#

Yep I just use them so I don't miss anything

#

I just searched in my project and 56 // was found ๐Ÿ˜ฏ

vocal cloud
#

You can add custom ones. I like adding notes

compact cape
#

But all of them were urls

#

๐Ÿ˜‚

desert loom
#

I need to get into the habit of commenting

compact cape
#

Same ๐Ÿคท

tender shard
desert loom
#

I don't remember the last time I pressed / twice

tender shard
compact cape
#

I was stuck for 3 days in a class I created last month figuring why I added two methods and what they do

#

The funny part is that I forget them... So it happened 4 times so far ๐Ÿ˜‚

desert loom
tender shard
#

I think I am doing a bit too much debugging lol

eternal night
#

Evil people say s debugger beats sysout

rotund pond
eternal night
#

But those are haters

tender shard
desert loom
tender shard
quaint berry
#

Getting item in hand doesn't work

tender shard
#

it's like this

desert loom
#

I can see how that could be useful then assuming an error occurs.

#

just needs pretty colors

tender shard
#

it generates a .zip file of everything needed to debug stuff

desert loom
#

very good

tender shard
#

why the fuck does IntelliJ only show the parameter names sometimes?! E.g. in the "track player positions", there's no label for "delay", but in the next line, there is. and the last parameter never has any label

#

it looks like it only shows labels when using primitives or keywoards (this, super, etc)

#

that's so fucked

ashen quest
#

plugin idea (alex, no chess plz

tender shard
#

DevilsChest

#

like angelchest but it spawns the chest in the nether in a lava lake

#

and you need a dragon head to open it

visual tide
#

oh and if you pass a variable it also wont show iirc

#

so only if you put an actual value in

exotic bay
#

Hi, does anyone here know how to make this kind of scoreboard? I see more and more of them but can't find anything on how to make them

drowsy helm
ashen quest
#

thats what she said

drowsy helm
#
{
    "providers": [
        {
            "ascent":19,
            "chars":[
                "\uF009"
            ],
            "file":"custom/ui/party/party-deco-1.png",
            "height":256,
            "type":"bitmap"
        }
    ]
}

use this to get started

exotic bay
drowsy helm
#

for your default.json

tender shard
#

it should just always show the parameter names :<

tardy delta
#

is executing a task within BukkitScheduler::runTask the same as executing it as a normal method?

tender shard
#

WHY IS COPILOT SO SMART

tardy delta
#

its not smart enough to use the logger ๐Ÿค“

visual tide
#

copilot is kinda scary
Like i once was creating items with lore and it took the pdc tags i put on the item before and displayed them on the lore

#

like even with color codes

#

like ยงaENABLED and ยงcDISABLED

ashen quest
#

it writes the basic stuff for me everytime

#

and automatically understands how i log and then logs that same way

tardy delta
#

me creating a completablefuture be like

visual tide
#

yay boilerplate

tardy delta
#

๐Ÿค“

jade roost
tender shard
#

I am dying. Trying to fix a bug since an hour now and I don't understand why it keeps happening lol

tardy delta
#

just like cf stuff but i need it to do sync execution too

eternal oxide
jade roost
#

i do

#

XD

tender shard
tardy delta
#

tired of writing my stuff like this

eternal oxide
#

Yeah, been there

jade roost
#

i have 100% on codecademy

visual tide
tardy delta
#

i have 100% on sololearn smh

eternal oxide
#

I can comment every line now just so when I come back to it I can understand it.

tender shard
#

?stacktrace

#

we definitely need a stacktrace command that explains how to read stacktraces

jade roost
#

ok

tardy delta
#

?exceptionhandling

eternal oxide
#

we probably have one, but the naming of some are silly

#

?error

tardy delta
#

?workloaddistribution

eternal oxide
#

?st

tardy delta
#

?workload-distribution

#

this sucks i know there is one

tender shard
opal juniper
#

?worklof

#

?workload

tardy delta
#

?workloads

visual tide
# tender shard ?stacktrace

handy guide for reading stacktraces:

  1. look through the stacktrace to find a plugin name
  2. bug the author of the plugin till they either fix it or ban you
tender shard
#

it's ?workdistributions

tardy delta
#

smh

visual tide
#

?workdistributions

drowsy helm
#

what do you guys interpret this button as meaning?

tender shard
#

?workdistribution

tardy delta
#

join the party

tender shard
visual tide
eternal oxide
#

or add friend

tardy delta
#

or invite friends

drowsy helm
#

hmm

#

good enough

#

im trying to make a button that means create party

tender shard
#

or "3 people going to hospital"

visual tide
#

give em party hats

drowsy helm
#

lmao

tender shard
#

yo

#

@ashen quest

#

plugin idea

#

when you die, you respawn at a hospital. then you can pay a doctor or show them your insurance card, if you like. Then you respawn with all your items. If you don't, you respawn and lose all your items

visual tide
#

and if the card declines you get un-respawned

tender shard
#

yeah

#

somePlayer.spigot().unrespawn()

#

another plugin idea

#

when someone enters /exception, it just throws an exception

tardy delta
#

throw new Error()

tender shard
#

wtf

#

I always tell people to not check the command name in the executor

drowsy helm
#

Final results. I think im happy

tender shard
#

damn

tardy delta
#

why not player selector?

drowsy helm
#

wym

#

like the title?

tender shard
#

he probably means a list of online players where you can just click on one

drowsy helm
#

this seemed fancier

#

and i feel its more scalable with alotta players

tender shard
#

I'd probably do both. Like, add player / add offline player

drowsy helm
#

its for a party they wont be offline

jade roost
tender shard
#

fair enough

#

yeah it looks good

drowsy helm
#

ty ty

tender shard
#

oh wtf

#

I still havent released my resource pack merger

#

why have I not uploaded it lol

drowsy helm
#

im surprised no one has made one yet

tender shard
drowsy helm
#

i was tihkning of making one but sounds like alotta work

tender shard
drowsy helm
#

so it merges all json files and stuff aswell?

tender shard
#

the code is horrible but it works

tender shard
drowsy helm
#

damn nice

tender shard
#

well

#

it tries to merge things

#

I have tested it with numerous resource packs and it always worked fine

#

but I don't promise that it's always able to merge json files

#

e.g. if there are overlapping things like, 2 resource packs overriding the same custom model data

drowsy helm
#

how about clash resolutions?

#

yeah

tender shard
#

but if they only use different model data, it should work fine

drowsy helm
#

oh wow much simpler than i thought

tender shard
#

yeah I'm just using a map and then call it recursively for nested things, IIRC

#

I was totally drunk when I made this so I dont really remember how exactly it works

jade roost
#

lol what

drowsy helm
#

lmao

wary harness
#

๐Ÿป

jade roost
#

i want be pro developer but me noob

tender shard
# jade roost lol what

yeah I also code a lot of stuff while asleep. for example my CustomBlockData library, I had the idea in a dream, then when I woke up I actually coded my idea from the dream

#

lol

tardy delta
#

same lol

#

when im laying in my bed

tender shard
#

my pathfinding idea was also made in a dream lol

tardy delta
#

๐Ÿ’€

jade roost
tender shard
#

the pathfinder thing works like this

#

so one can use it without any NMS

jade roost
zealous osprey
tender shard
#

I know that feel lmao

tender shard
jade roost
#

a

tender shard
#

actually path finding is the wrong word. it's more like complete entity AI

zealous osprey
#

And normally it's so early in the morning I don't go back to bed, just kinda... wait

tender shard
#

e.g. make pigs attack players, and stuff like that

jade roost
#

only thikng i can code is real simple commands

tender shard
ashen quest
ashen quest
#

oh them packs there

tender shard
#

yeah that's why I sent my resource pack merger earlier

#

lol

ashen quest
#

whats a resource pack merger

#

it merges two resources packs i think

tender shard
#

it merges different resource packs into one

drowsy helm
#

only resourcepacks

ashen quest
#

sheesh

tender shard
#

I guess I'll upload my merger on spigot now

#

only downside is, it has to get approved >.<

#

idk why but standalone applications need approval on spigot

ashen quest
#

imagine not getting your resource approved by yourself

#

can relate

tender shard
#

@vagrant stratus Standalone apps cannot be premium on spigot right? Like, if it's premium, it has to be a spigot plugin, right?

jade roost
tender shard
#

I FUCKING LOVE THIS

#

it's called "GoldenXYZ" and the text is in gold too

jade roost
#

xd

tender shard
#

looks good though, should work fine

#

well unless there is no player called BlindFrenetic

ashen quest
#

Id take a golden head anyday if she good

tender shard
#

How and why are there two onebytes

ashen quest
#

so u mean the color scheme of ?paste

jade roost
#
cannot find symbol
tender shard
ashen quest
#

oh well

jade roost
#

line 34 and 38

cunning canopy
#

would it be possible for multiple plugins to communicate with each other. Can I like call a function from a plugins main class from another plugin

tender shard
#

buuut

#

are you using maven?

#

you need to have the other plugin as dependency, otherwise the "other other" plugin won't compile

ashen quest
tender shard
ashen quest
#

eyo what

#

i mean they do exist

tender shard
#

because most tutorials "how to code your first spigot plugin" don't explain it

ashen quest
#

mos tof the newbies

tender shard
#

yeah that was the reason why I started my blog

ashen quest
#

fun fact, if spigot wasnt here, i wouldnt be making the bread i am making right now

jade roost
ashen quest
#

yea, i started programming with spigot (even tho they warned me)

tender shard
#

it's totally fine to start with spigot, as long as you still google actual java tutorials when you don't understand basic stuff

ashen quest
jade roost
#

oo

#

is that good

#

idk

tender shard
#

i dont even know what my prices are

jade roost
#

what are they

tender shard
#

25โ‚ฌ so basically same

#

but I had to open a ticket to check it myself lmao

tardy delta
#

nice profits lmao

jade roost
#

can you help me fix a error

#

idk how fix

tender shard
#

?notworking

undone axleBOT
#

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

jade roost
#

ok

tender shard
#

and also:

#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

tender shard
#

๐Ÿ˜›

#

?commands

#

?cc

#

shit, not added yet

jade roost
charred blaze
#

whats wrong with it?

#

someone bugged it i think

#

when i enter in

#

it spawns me in normal world

gray merlin
#

Is there any way to get the plugin data folder from a static context?

charred blaze
#

wrong channel sorry

tender shard
tender shard
#

do you know the plugin name?

charred blaze
gray merlin
#

Yeah

tender shard
#

you could just do it like this

#

Bukkit.getPluginManager().getPlugin("MyPlugin").getDataFolder()

ashen quest
gray merlin
#

That's fancy, thank you.

charred blaze
charred blaze
#

doesnt it have to tp you in endcity place?

tender shard
charred blaze
#

and trying teleport

#

to

#

end citys place

tender shard
#

ah okay. Then you'll have to get some end city location yourself, listen to PlayerTeleportEvent and change the destination

tender shard
gray merlin
# charred blaze

That's weird. There's an end portal instead of a gate portal there

ashen quest
tender shard
unreal quartz
tender shard
#

the "Does not working"? It's mispelled on purpose

ashen quest
#

but but guys

gray merlin
ashen quest
#

my plugin does not working

#

what me do now

tender shard
#

it's because most of the time, people just ask "Why my code non workings"

charred blaze
ashen quest
#

xd

tender shard
#

so I also included this "typo" into the command

gray merlin
gray merlin
charred blaze
#

hmm

charred blaze
#

or can i place it with AWE?

gray merlin
#

/setblock x y z minecraft:end_gateway

grim ice
#

if u do that

#

u will get instantly teleported

#

to the overworld

ashen quest
#

yes

grim ice
#

since itll spawn on you

gray merlin
#

You're right, I should've generalised it.

#

Apologies.

#

There we go.

ashen quest
#

you are so formal haha, we chill here ;)

quaint berry
#

Assigning information to players

gray merlin
ashen quest
#

yea xd

mystic sky
#

i lost all the commits fuck

gray merlin
mystic sky
#

What i exactly said

gray merlin
#

How would you even do that, did you delete your repo or something lol

mystic sky
ashen quest
#

indeed every ide is a dumbass EXCEPT notebooks, you can write your code with a pen, so good

ancient plank
#

user error

gray merlin
ashen quest
#

yesss thats even better

eternal oxide
#

punch cards were annoying but fun for a while

quaint berry
#

Is a player UUID the same on every server?

#

If so then what if you change your name?

tender shard
#

if you change the name, the UUID stays the same

#

that's why they exist

eternal oxide
#

always the same, so long as its online mode

quaint berry
#

Perfect

#

Thanks

tender shard
#

waiting for approval again ๐Ÿฅฒ

boreal seal
#

resourcepackmerger borders?

tender shard
#

borders?

boreal seal
#

i mean cloud you merge 1.18 to 1.8?

#

i mean limits

#

or 1.8 to 1.18

tender shard
#

it can merge any version's resource packs

boreal seal
#

models would merge?

tender shard
#

should work fine

boreal seal
#

since it bugs on different versions from what i know

tender shard
tender shard
hybrid spoke
#

swing or javafx

tender shard
#

let me check

#

I coded it while drunk a few months ago

#

I dont remember anything about it

boreal seal
tender shard
#

swing only, no javafx

hybrid spoke
#

you really used swing

tender shard
#

btw I hate creating GUIs in java

boreal seal
#

guys a bit wierd question

#

but when i do commits

#

it tells me buildtools did

tender shard
#

ah yeah

#

git --config

#
git config --global user.name "Your Name"
git config --global user.email "youremail@yourdomain.com"
#

you shouldnt use your real email address though

boreal seal
#

why?? i put the same address as i linked to github

tender shard
#

github has this feature where you can use an "anonymized" email address but it'll still work and link to your actual github account

boreal seal
#

oh thats decent

tender shard
boreal seal
#

it's fine i think i dont link my personal personal email anyway

#

the one which i use in paypal,bank..

#

but thanks alot!

tender shard
#

np ๐Ÿ™‚

#

I need a good icon for my resource pack merger, but they all suck lmao

gray merlin
#

How would I set a Player to be riding an entity?

tender shard
#

otherEntity.setPassenger(player)

gray merlin
#

I see, thank you.

grim ice
#

Long ago, I was what some would call (Editorโ€™s note: Who? Name names) a programming prodigy. I woke up every morning, cuddled with my pet Python, poured a cup of Java and ate an orange (to ++ the vitamin C). While doing my loops at my job I would attempt to take as many โ€˜breaksโ€™ as possible, until the day I was promptly fired for being too literal and/or having a lack of โ€œwork ethicโ€

tender shard
#

not sure rn

#

but one of those will definitely work

grim ice
#
  • Oskar Thysell
#

minecraft employee btw

gray merlin
# tender shard or addPassenger

That's alright, addPassenger is probably 1.12+, and I'm on 1.7.10, so it's alright. I would assume that addPassenger was added because boats starting having more than one passenger.

grim ice
#

LOL

grim ice
#

git commit -m "a crime"

tender shard
#

I don't talk to you anymore ๐Ÿ˜›

grim ice
#

lol it depends on the commissioner

gray merlin
#

And I don't blame you

#

You're right

tender shard
#

setPassenger is deprecated because in "normal" versions ( ๐Ÿ˜› ) multiple passengers can exist

grim ice
#

plus 1.7.10 is the most common for legacy support

#

so like

eternal night
#

wat

grim ice
#

its even more common than 1.8.9

tender shard
#

don't we even have a 1.8 command?

#

?1.8

undone axleBOT
eternal night
#

?1.7

#

awww

tender shard
#

Lynx, guess what

grim ice
#

lmao 1.7.10 is more common in pvp

tender shard
#

I made a list of available discord commands

eternal night
#

oh ?

tender shard
#

it doesnt have all commands, only the ones I found useful myself

hybrid spoke
tender shard
#

what's wrong with swing

hybrid spoke
#

use javafx with scenebuilder and custom less files

tender shard
#

hm

#

tbh I don't do GUI stuff very often

#

actually this is only the second GUI I ever made

#

so I have no idea about what you're talking about ๐Ÿ˜›

hybrid spoke
#

well i have to do it daily sadly

tender shard
#

F

hybrid spoke
#

and i can tell, a javafx gui with a mvvm design is pretty cool

tender shard
#

when I do GUIs, they typically look like this haha

#

(My latest adventure game)

#

@hybrid spoke aren't you german?

hybrid spoke
#

i am

hard socket
#

my bossbar isnt updating

#

what's wrong?

rose aspen
#

Is this the right way to filter Players?
ArrayList<Entity> nearby = (ArrayList <Entity>) sign.getWorld().getNearbyEntities(sign.getLocation(), 10D, 8D, 10D, Predicate.isEqual(Player.class));
Predicate.isEqual(Player.class)

near night
#

anyone got a api for making custom enites i hate nms

#

for 1.19

boreal seal
#

just learn nms

#

you have anything to lose?

#

either nms is not always needed to make custom entites

#

indeed

near night
#

when i try i get .a .e .b .s its hell

boreal seal
#

yeah

#

its because its obsfucatd

#

i typo

#

but u understand

near night
#

is there no mappings?

eternal oxide
#

yes there are

#

?1.17

undone axleBOT
eternal oxide
#

nope

#

read teh 1.17 and 1.18 posts about nms

#

?bootstrap

undone axleBOT
#

Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.

Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163

near night
#

thanks

boreal seal
#

hey anyone used here json?

#

i mean guice*

eternal night
#

guice has nothing to do with json ?

#

do you mean gson ?

#

or actually guice for dependency injection

gray merlin
#

Small question: We have to return true if the command succeeds, and false if the command breaks, right?

quaint mantle
#

I am planning on working on a Staff plugin. I want to be able to do /staff and come into a kind of 'staff mode' where i have items in my inventory to tp to players and punish them. But I don't know how to check if the staff mode is active or not, can someone tell me how i should check that?

boreal seal
#

no no just guice for dependecy injection

tall dragon
boreal seal
#

EpicGodMC what you explained me didnt went well

#

ill try to stick to the library which make things easier

tall dragon
boreal seal
#

ton of errors (stacktrace that i cant understand.)

fiery prairie
#

If I have a given place I want to teleport a player to, using the teleport method, how do I find the pitch which I am standing now on? Idk if I am on the right channel though

#

is that this thing under F3?

#

the -135, -0.0

mystic sky
#

Well, this is related to development i thing that you need to go #help-server

fiery prairie
#

Alright

eternal night
#

wat

#

Well, this is related to development i thing that you need to go help-server

#

am I having a stroke or does that make no sense at all

mystic sky
eternal night
#

Yes so they are planning on using the Player#teleport method

#

as they are developing a plugin

#

this is the absolutely right channel for that question ๐Ÿ˜‚

tardy delta
drifting halo
#

is the chat preview thing live yet?

kind hatch
#

As of 1.19.1, yes.

kindred valley
#

Can i specify an item by giving it a model number

kindred valley
drowsy helm
#

what

#

your question doesnt make sense

kindred valley
#

custom model data

tardy delta
#

custom model data?

#

ah

drowsy helm
#

meta.setCustomModelData(int);

drifting halo
eternal night
craggy drum
#

For the world.locateNearestStructure method in the api, how do I only search for structures in a small radius? I'm not sure what the radius argument does since it says this in the api ```radius is not a rigid square radius...

kindred valley
#

So how can i specify a block

drifting halo
#

just added and already deprecated kekw

eternal night
manic crown
#

deos someone know, how to generate a tree at a specific location?

worldly ingot
#

Deprecated because it's a draft

#

You can use it and suppress warnings. It'll be undeprecated later if changes don't occur to it

drifting halo
#

cheers

worldly ingot
#

Just use it with caution in case changes are made

drifting halo
#

if stuff breaks i'll know who to blame ๐Ÿ™‚

manic crown
#

okay

drifting halo
#

are there any plans for component support in spigot? kinda ass to have to work with strings if you're used to components hah

eternal night
#

what do you mean, the bungee chat api is perfection

drifting halo
#

well the event returns a string regardless lol

eternal oxide
#

I'm the opposite. I'm used to strings so components is ass to me.

eternal night
#

elgar probably having nightmares about a hover event and hex colours

eternal oxide
#

Cold sweats

drifting halo
#

guess i'll just shade adventure and get people asking me why my jar is 4MB again

eternal night
#

just library loader it

drifting halo
#

whomst?

eternal night
#

hm ?

#

spigot library loader ?

drifting halo
#

thats a thing?

eternal night
#

yea

drifting halo
#

idk what that means

eternal night
#

you can define libs from maven central

#

and spigot auto downloads them for you on server start

#

keeps your jar small and breaks maven central TOS in one go

drifting halo
#

surprisedpikachuface

eternal night
#

its the perfect fit

drifting halo
#

Spigot: must be able to run plugin offline at all times
also spigot: download libs from maven central lol

eternal night
#

check the Library Loader section

worldly ingot
#
  • you can provide a way to download those libraries manually for premium ones
#

That rule is mostly in place to prevent people from contacting their licensing servers that frequently go down and render a plugin useless

#

Which has happened before -,-

late sonnet
eternal night
#

@ApiStatus.Experimental ๐Ÿ‘€

drifting halo
#

does it work for repo's from other sources too or only maven central?

eternal night
#

only maven central

worldly ingot
#

Experimental annotation doesn't always give warnings in your IDE ๐Ÿ™‚

eternal night
#

any sane IDE would ๐Ÿ˜›

#

eclipse go brrr

worldly ingot
#

afaik neither NetBeans nor Eclipse do (yeah yeah, don't say it lol)

drifting halo
#

what about BlueJ though

eternal night
#

omg

#

imma get the pitchforks

alpine urchin
#

nvm i read on

drifting halo
#

non premium plugins? xD

alpine urchin
#

ok?

#

i dont make premium but

#

id atleast let a feature be supported on both

drifting halo
#

i think you're allowed to use them on both

#

just dont contact x server or something

#

since you can basically guarantee maven central will never be down? i suppose

#

ok this library thing is pretty epic

sterile token
drifting halo
#

well choco explained the reasoning behind it

#

makes sense to me

sterile token
#

Yes but still weird the rule

#

It should be modified

tall dragon
#

why not just make the rule "cant have license server thingy"

worldly ingot
#

Because that's too narrow

#

"It's not a license server. It's just checking if the plugin is valid"

sterile token
#

I have been told from lot of people that when they premium resources are leaks and spigot doesnt do something. Is it true?

worldly ingot
#

"It's not a license server. I'm checking for updates"

drifting halo
#

if text has colors in will it be returned with & or with the section char? don't have an easy way to test atm

tall dragon
#

then have a rule that you cannot have any checks that will make the plugin not work at all

worldly ingot
tall dragon
#

but u still cant download libraries for example

sterile token
#

As far I know spigot must depend on Internet Connection

drifting halo
#

i'll just use my small particle collider to determine if your license is still valid

worldly ingot
#

You can use the libraries feature, just state in your description "Hey! If things won't download, you can download them manually here and put them in this folder"

#

That's really all we require

drifting halo
#

or just have a "fat" jar

worldly ingot
#

Yeah or that

sterile token
worldly ingot
#

If possible, we're not against a fat jar. Just can't exceed the maximum

sterile token
#

Sorry For but im mad

worldly ingot
#

LuckPerms is free

alpine urchin
#

makes sense

#

i thought it was a straight out no

worldly ingot
#

If your stuff is free, you don't need to provide alternatives. You can depend on an internet connection if you want to

alpine urchin
#

yea yea

sterile token
worldly ingot
#

We only require it on premium ones so that people don't buy a plugin only to realize "wtf, why won't it start" and waste $20

alpine urchin
#

then i can tell my devs to use that for my libraries

alpine urchin
#

i find open source alternatives

worldly ingot
#

Spigot has its own terms and conditions

alpine urchin
#

sometimes theyโ€™re just better

drifting halo
#

someones got their panties in a twist lol

sterile token
#

Spigot should include mojang licenses so in teory you are keeping their rules + your own ruules

alpine urchin
#

they can have their own forum rules

sterile token
#

That why licenses exists

alpine urchin
#

but some things are a but contradicting

sterile token
#

๐Ÿ˜‚

sterile token
#

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

alpine urchin
#

like bukkit license GPL and spigot forums contradicting but idk what you mean by mojang stuff

#

why do you care

#

their forum and discord, let em do what they please

sterile token
#

Maybe I send an email ti Md5 to cimplish about that

worldly ingot
#

SpigotMC's terms of service have zero relation to Mojang's EULA

#

The platform is separate

alpine urchin
#

yes

worldly ingot
#

Spigot's development has to abide by Mojang's IP though

sterile token
#

I now it separete in fact you are using their code. M

worldly ingot
#

(e.g. we can't just redistribute their software)

sterile token
#

You are contrdation yiursle

worldly ingot
#

Those are IP laws, not EULA

#

Intellectual property

sterile token
#

As I far as I know if your product internally use another product you are indirectly vinculated to them

vast raven
#

@lost matrix

#

It finally works

sterile token
#

Ghost what whre you doing?

vast raven
vast raven
#

sorry

quaint mantle
#

Hello, I would like to upload the version of spigot 1.19 to my server that is hosted by a page and when uploading the version it gives me an error, how should I do it? Any moderator who can help me or let me contact you by md to explain my event in more detail

worldly ingot
#

Never heard of the word "vinculated" before, so TIL I guess lol

sterile token
vast raven
worldly ingot
#

But yeah, development of Spigot is bound by intellectual property laws (we can't redistribute the binaries nor host decompiled source of Mojang's proprietary code), but the SpigotMC platform where we dictate what is and is not allowed to be uploaded to our website is entirely up to us, free from Mojang's jurisdiction

#

Spigot != SpigotMC

#

SpigotMC is the company and maintains the Spigot software, but it's a forum platform as well

#

It can set whatever rules it wants free from Mojang but if we're working with Mojang's IP then we have to be careful when doing so

sterile token
worldly ingot
#

The word exists, I've just never seen it used. No competent English speaker would use it because it's too complex KEKW

sterile token
#

๐Ÿ˜‚

#

Chocรณ sorry bruh

#

I ck fuse spigot with spigotmc

#

Sh** corrector

worldly ingot
#

Don't worry ๐Ÿ˜… SpigotMC has lawyers (or a lawyer at least) where all of this stuff is sorted ahead of time. We're in the clear

alpine urchin
#

yes

#

i wanna hire your lawyer

sterile token
#

Hahaha

quaint mantle
#

Hello, I would like to upload the version of spigot 1.19 to my server that is hosted by a page and when uploading the version it gives me an error, how should I do it? Any moderator who can help me or let me contact you by md to explain my event in more detail @worldly ingot

sterile token
#

Manรบ don tag

#

Be patient

worldly ingot
#

You mean you're trying to upload a .jar file to your server?

sterile token
#

Lmao really hating i patient people

#

I wanna swear all to them but then I think im losting my own time

worldly ingot
#

Depending on what you're using for a web panel they might have a version selector built-in for you

sterile token
#

I think he means that

flint coyote
#

Not every hoster allows that

sterile token
#

Yes thst why

crude estuary
#

and we don't know anything about that Page