#dev-general

1 messages · Page 607 of 1

prisma wave
#

and i think i had like 2 messages there so

distant sun
#

I can kick you out from mine, np

obtuse gale
#

Mits will never be as fake as Emily

obtuse gale
#

I’m talking about the other Emily excuse you

#

Sure right

#

Absolutely

#

She’s just scared to talk around the other Emily

#

Just following protocol

#

Mhm

exotic stream
#

Hello, not sure if this is the right place, but I'm looking for some help on setting up my own minecraft server. I have the server up and running, but I can't find any resources on how to properly manage the server past that. I am a software developer, and want to build similar deployment pipelines to what I am used to, but can't find anything explaining the process. Thanks and sorry if this is the wrong place, just trying to get my bearings still.

ocean quartz
#

@frail glade You'll be happy! Multicatch and union types won the Kotlin survey!

#

Poor Bardy

agile galleon
distant sun
#

nice

ocean quartz
#

Will have*

#

But yeah really nice

agile galleon
#

Yeah

onyx loom
#

no collection literals Sadge

ocean quartz
#

Collection literals (KT-43871) have not made it into our current public roadmap but we’ve actually started some early prototyping to see what design approaches will play out well.

#

Multiple receivers (KT-10468) are really close to becoming available for preview. Soon, you’ll be able to play with them using a pre-release compiler switch. Stay tuned!

#

Multicatch and Union types (KT-13108) are the most popular potential addition to the language, but this is also the most complex one to integrate into the language. Its implementation will require the combined work of many experts on the core compiler team, so don’t expect us to make a lot of progress while the team is busy getting the K2 compiler frontend to production. But once that has been released, we’ll start actively working on union types.

#

Having “public” and ”private” property types (KT-14663) turned out to be relatively easy to implement in the architecture of the new K2 compiler frontend and will be available for preview with the new compiler.

distant sun
#

what's 2nd?

ocean quartz
#

I thought the public and private property would be pretty easy, I mean it's just altering the generated getter

distant sun
#

ah, nice

obtuse gale
#

couldn't be scala 😌

ocean quartz
#

"proper"

obtuse gale
#

yes

#

proper

#

type T = A | B

ocean quartz
#

That implies Kotlin's not yet implemented implementation won't proper lol

obtuse gale
#

that's the point, it's not even implemented

#

they took "so much" inspiration from scala but left the best things out

ocean quartz
#

Scala had about 10 years more to implement those features lol
Sure it doesn't have it yet but that's the point of it being updated frequently

obtuse gale
#

which is why scala is better fingerguns

pastel imp
#

which blocks can hold persistent data?

tranquil crane
eternal compass
#

to kotlin from java

steel heart
#

Scala

obtuse gale
#

TRUE

static zealot
#

Holy shit. x1.75 speed on youtube is OP. I always was so confused when I heard people say they do watch stuff on higher speeds but now I understand them

wintry plinth
#

Ayyyy @quiet depot just copped the fingerprint version of that key we discussed ages ago. Have you considered buying one yet?

#

Annoying phone format

static zealot
#

no.

#

I haven't

quiet depot
#

I feel like the only thing I really talked about during that convo was how I didn’t see the point

static zealot
#

LMAO

wintry plinth
#

You saw the perk after

quiet depot
#

so no I haven’t considered getting one lol

wintry plinth
#

Security >

static zealot
#

but don't you have a fingerprint sensor on your phone?

#

I'm confused

quiet depot
#

yeah I’m not worried about my passwords getting cracked or anything

wintry plinth
#

It’s for logging onto websites with the fingerprint

#

Like from laptop

static zealot
wintry plinth
#

Oh see I’m anal with security I don’t chance being hacked

#

Everything is under 2fa

#

Mc, twitter, domains, etc

oblique heath
#

||anal is good||

sly sonnet
#

ight bet

hot hull
#

God do I fucking hate python

#

Forced to use it cause the robots movement software only supports that

wintry plinth
wintry plinth
marble plaza
#

Hey! Is there Bukkit (or Java) function that modifies string to match Minecraft username requirements?
Replaces spaces, removes additional characters, matches length etc?
I know I could create easily my own, but why bother if there is built-in one.

hot hull
#

Just simple regex

marble plaza
#

Aight, thought so

wintry plinth
marble plaza
#

Thanks! Though I thought 3 is min length?

hot hull
#

Yup

#

Well there is some accounts who have lower, but those are rare

wintry plinth
#

Yeah the mc limit I believe is 3 now, Regex is prob old but as Frosty said, you can get 1 char but so rare these days

obtuse gale
potent nest
#

I did the AoC challenges with scala and it was epic!

brittle leaf
#

my old idea for how to handle modification to the item drops wouldve been this

         v- ToolsModifier
BLOCKBREAK -^
     |
     v
    give items

when actually what i shouldve been doing is this

                           EnchantModifier -> give items 
            ToolsModifier -^
BLOCKBREAK -^
brittle leaf
# agile galleon yess

ive only just realized that the old system was a really bad implementation even if it was possible to make it

agile galleon
brittle leaf
#

my confusion was based on my not knowing how certain things actually worked. it wasnt your fault

brittle leaf
#

now to figure out how i wanna implement this

#

the code, not the idea

brittle leaf
#
@EventHandler
    public void blockBreak(BlockBreakEvent e) {
        if (e.isCancelled()) {return;}
        if (e.getPlayer().getInventory().getItemInMainHand().getType() != Material.AIR) {
            new ToolModifier().toolModifier(e);
        }
    }

my listener is so empty

#
public void toolModifier(BlockBreakEvent e) {
        Player p = e.getPlayer();
        Block block = e.getBlock();
        ItemStack tool = p.getInventory().getItemInMainHand();

        int expDrop = enchantDrops.calculateXP(e.getExpToDrop(), tool);
        Collection<ItemStack> drops = enchantDrops.calculateBreakDrops(block, tool, ItemDrops.calculateDrops(tool,block));

        e.setDropItems(false);
        e.setExpToDrop(0);
        new EnchantModifier().enchantModifier(p,p.getItemInUse(),expDrop, (List<ItemStack>) drops,block,enchantMethods);
    }
#
public void enchantModifier(Player p, ItemStack tool, int xp, List<ItemStack> drops, Block block, EnchantMethods em) {
        Set<String> enchantments = em.getItemCustomEnchants(tool);

        if (enchantments.contains("telekinesis")) {
            for (ItemStack item : drops) {
                em.safeBreakBlockEventAddItem(p,item,block);
            }
            p.giveExp(xp);
        } else {
            for (ItemStack items : drops) {
                block.getWorld().dropItemNaturally(block.getLocation(), items);

            }
            block.getWorld().spawn(block.getLocation(), ExperienceOrb.class).setExperience(xp);
        }
    }
#

its still in early stages but damn this is so much better

#

i will change the method names at some point aswell

#

aand refactor stuff that are in the wrong places

#

such as enchantmethods, the majority of the methods should be seperated

timber oak
#

Looking for suggestions to build a portfolio - as in plugin suggestions, any recommendations?

oblique heath
#

make a minigame plugin

hot hull
#

World generation

pastel imp
#

is it worth adding MySQL support to a public plugin? 🤔

#

like, statistically, not many rlly use it.

#

And I suppose it depends on the case and plugin

steel heart
wintry plinth
pastel imp
wintry plinth
pastel imp
#

the thing is, rn I was thinking on using gson and hashmaps

#

aka loading the gson into a hashmap onenable

#

and hashmap into json file ondisable

#

using gson*

#

unsure if it would be easy to migrate to MySQL if I ever updated it in the future

brittle leaf
#

java.lang.StackOverflowError: null when you make a hashmap loop

cinder flare
#

what does "make a hashmap loop" mean lol

wintry plinth
#

I wondered that lol

#

Unless he is trying to iterate over the hashmap

cinder flare
#

like, the stack overflow gives me recursion vibes, but in a hashmap?

wintry plinth
#

😂

brittle leaf
#

my wording was not great

wintry plinth
brittle leaf
#

it wasnt a hashmap

#

i made a class loop if anything

cinder flare
#

huh lol

wintry plinth
#

what?

cinder flare
#

were you creating new instances of classes in each others' constructor

#

that's a classic stack overflow

brittle leaf
#

yes

#

thats exactly what i did

cinder flare
#

ah, nice nice

brittle leaf
#

at me.lunaiskey.ferncore.customitems.FernToolItemStack.<init>(FernToolItemStack.java:15) ~[customenchantments-0.1-SNAPSHOT.jar:?]
at me.lunaiskey.ferncore.customitems.axes.PlankAxe.<init>(PlankAxe.java:16) ~[customenchantments-0.1-SNAPSHOT.jar:?]
-> at me.lunaiskey.ferncore.customitems.RegisterCustomItems.registerItems(RegisterCustomItems.java:22) ~[customenchantments-0.1-SNAPSHOT.jar:?]
at me.lunaiskey.ferncore.customitems.RegisterCustomItems.<init>(RegisterCustomItems.java:18) ~[customenchantments-0.1-SNAPSHOT.jar:?]
at me.lunaiskey.ferncore.customitems.groups.Netherrite.registerItems(Netherrite.java:24) ~[customenchantments-0.1-SNAPSHOT.jar:?]
at me.lunaiskey.ferncore.customitems.groups.Netherrite.<init>(Netherrite.java:14) ~[customenchantments-0.1-SNAPSHOT.jar:?]
at me.lunaiskey.ferncore.customitems.RegisterCustomItems.registerItems(RegisterCustomItems.java:25) ~[customenchantments-0.1-SNAPSHOT.jar:?]

#

looping forever

#

i fixed the issue

timber oak
steel heart
#

Sure just make sure it’s not too big if you’re doing it solo, such that you perhaps burn out yourself.

brittle leaf
#

i just made a very simple system for checking if a block is naturally placed or not

sweet cipher
#

Does it work with blocks before the plugin is added to the server?

brittle leaf
agile galleon
#

Ou nice

#

Naturally means by hand or by generator

brittle leaf
#

by hand?

#

its just a hashmap of <location,boolean>

#

ill probably shrink it to a hashset<location> and change the updateBlock() to remove if its false

agile galleon
#

When do you add stuff

#

BlockPlaceEvent?

#

And what happens on restart?

brittle leaf
#

the system updates the set if BlockBreakEvent,BlockPlaceEvent,BlockFromToEvent,BlockPistonExtendEvent and BlockPistonRetractEvent

#

it doesnt save to file yet

#

tho imma use sqlite to store the data

#

its built into my core so that i can keep track of certain things that arent just related to if a block was placed naturally or not

#

also the map for storing the data is static for now as a test to see if it would work

#

ill change it to not static cus its probably static abuse if i left it as is

#

@agile galleon is it static abuse?

#

im guessing yes but wanted your opinion

agile galleon
#

Yes

#

It is

#

Keep in mind that everything you add and remove stuff from, that is static, is technically static abuse

brittle leaf
#

so nuke the static. will do.

#

i dont even really need to create the set, could just read and write the sqlite data directly since its a very small load

agile galleon
#

Not a good idea

#

You can, but as long as you do it sync, the server will lag

sweet cipher
sweet cipher
agile galleon
#

Yeah

wind patio
#

if I have a code fragment

int a = n;
while(a > 0) {
  a /= 2;
}

Big O would be log(n) right?

brittle leaf
#

for that one it would be square root i think

#

im not sure how int casting works but i dont believe that a could ever be smaller then 0

#

if a is odd

obtuse gale
#

not to do with even/odd
if a is negative, the entire thing will be skipped
if it isn't, it'll run forever, lol

wintry plinth
#

Honestly, I’d just say.. don’t be negative

Ha.. ha..

brittle leaf
#

you cant divide a positive by a positive and result a negative

#

which is what that statement would require to ever be false

obtuse gale
#

yeah exactly

wintry plinth
#

!false

It’s funny because it’s true

distant sun
brittle leaf
#

i seem to have forgotten how to keep this hashmap from resetting itself

void vapor
#

hmm

oblique heath
#

are you setting the hashmap equal to a new hashmap more than once

#

that would do it

brittle leaf
#

i am

#

sorta

#

idk

#

i wanna do it just once

#

actually i have a great idea

#

ill make the new hashmap on enable since that only gets run the once

oblique heath
#

is your hashmap stored in one of your other classes

#

or do you have it straight up in your JavaPlugin class

brittle leaf
#

ill just stick it in on enablee

#

fornow

oblique heath
#

if i may be so bold as to recommend something

#

while you can put the map in your onenable and it would definitely probably work

#

it might be nicer if you instead made your new container class (assuming you have one) in your onenable

#

and then made the hashmap inside that

#

basically i'm saying dont give up on making it better the moment it works

#

idk what your code looks like so i cant really suggest anything beyond this

brittle leaf
#

I have a class called Recorder, it needs Set, i want to call that class whenever i need it in whatever class through new, i dont want a new hashset i want the original hashset

#

so imma give it a new hashset in onenable

#

so i will hope for best

oblique heath
#

i want to call that class whenever i need it in whatever class through new
are you making a "new" Recorder each time you want to use it?

brittle leaf
#

yes

#

i am

oblique heath
#

that is why your set is empty

brittle leaf
#

i already know

oblique heath
#

okay

brittle leaf
#

passing through a hashset is not my specialty

#

i usually just make every set and map static

#

which is apparently not a good practice

oblique heath
#

correct

#

regular instance variables will do just fine

#

like what hashset is inside your Recorder (i hope)

brittle leaf
#

currently there is no hashset, just a uninitalized one

oblique heath
#

like how you have your

public class Recorder {
 private Set mySet; // <-
 public Recorder() {
  mySet = new HashSet();
 }
}
#

here mySet is an instance variable of Recorder, which means every Recorder will have it's own individual set

#

you can take this same idea and use it for Recorder

#

by making a Recorder instance variable inside your JavaPlugin

#

that way you won't need to make a new Recorder() each time but instead use the same one

brittle leaf
#

which overwrites itself with the same set every time its made

#

i think

oblique heath
#

well if you have it be an instance variable then it will never overwrite itself because you will only make it one time

#

you will make your Recorder object in your onenable just one time, and afterwards never remake it again

brittle leaf
#
private final Set<Location> breakSet;

    public Recorder() {
        breakSet = new HashSet<>();
    }

    private Set<Location> getSet() {
        return breakSet;
    }
oblique heath
#

looks good

brittle leaf
#

i will be using it in another class tho

oblique heath
#

yes

#

so you'll store a Recorder object as an instance variable in your main class

#

just like you store your set in the recorder class

#

and then you can use your one recorder object however you want, and it won't reset because you never redeclare it

agile galleon
#

Ouu instance stuff going on

brittle leaf
#

i have confused myself again

agile galleon
#

Just imagine a dog

#

new Dog()

brittle leaf
#

i got it working for my registercustomitems and have confused myself

agile galleon
#

Now, lets say you have a vet class

#

That takes your dog as a parameter

#

Im sure you wouldnt want the vet to just check a new dog

#

You want them to check your dog

#

So you have to give it to them

#

Imagine:
var dog = new Dog();
var vet = new Vet(dog);

#

And you can lets say, do a kindergarten for dogs, or what its called in english lol

oblique heath
#

daycare 😎 🐕 🐕 🐕

agile galleon
#

now add there:
var amusementPark = new AmuesementParkForDogs(dog);

#

And agaib

#

You use your, the exact same dog

#

On everything

#

Not every time a different one

#

Your dog instance

#

Now we can translate this to the hashset

#

We have our hashset

#

And now we want to give this exact set to another class

#

Somewhat understandable?

oblique heath
#

maybe what we need to do is cover OOP concepts

#

specifically what a Class is, vs what an instance of a class is

brittle leaf
#

i get the concept of oop

#

its just the implementing myself which i get a little confused with

#

ive already done this once

oblique heath
#

okay

#

well for implementing it, a good rule of thumb for now may be that you should only create a 'new' object for as many objects as you expect to have

#

that's actually pretty misleading in a lot of cases depending on how you look at it but it might work here specifically

#

you only want one hashset, so you should only create a new hashset once

#

and you only want one Recorder, so you should only create a new recorder once

agile galleon
#

You want one dog think_smart

brittle leaf
#

onEnable() calls RegisterCustomItems, RegisterCustomitems() calls Init() which calls CustomItem() which uses itemmap in its constructor.

#

round robin

#

RegisterCustomItems has itemMap = new Hashmap

oblique heath
#

what is your goal

#

i cant really tell, shoulda asked earlier

brittle leaf
#

I want to store a set in recorder, which has location data in it

#

and then beable to call recorder in another class such as my blockevent class

#

but i dont want to reset that set

oblique heath
#

what does Recorder represent for you

agile galleon
brittle leaf
#

i call recorder in the other class because its being used elsewhere

#

lowerCamelCase for class names?

oblique heath
#

lowerCamelCase for method names

#

methods are what have parentheses after them so it's a fair assumption that what you mentioned were methods

brittle leaf
#

other then init() the rest are class names

oblique heath
#

gotcha so they're constructors

brittle leaf
#

yes thats what i ment

#

in the end up itemMap is stored inside FernItemStack because CustomItem extends FernToolItemStack which extends FernItemStack

oblique heath
#

i see

brittle leaf
#

itemMap inside FernItemStack is never modified directly

oblique heath
#

FernItemStack never modifies itemMap you mean

brittle leaf
#

yes

oblique heath
#

okay

oblique heath
#

which is passing objects around as method / constructor parameters

#

and storing them as instance variables

brittle leaf
#

which is what FernItemStack is the endpoint of

oblique heath
#

yes

#

well FermItemStack stores the itemMap yes

#

but you will want to pass around other objects too

#

like your recorder, since you want to use it in other classes

#

hopefully that makes sense, i still don't know if i'm imagining what you want the same way you are

brittle leaf
#

im guess without making atleast 2 classes i cant store the map

oblique heath
#

hm?

#

i don't think you need to make any new classes

brittle leaf
#

in each class that i needed to get the itemMap i would do new RegisterCustomItems

oblique heath
#

no

#

your RegisterCustomItems is what stores your itemMap

#

so making a new one would mean it doesn't have the itemMap you want

brittle leaf
#

im just overwriting the map with the same values as before

oblique heath
#

wdym

brittle leaf
#
private void init() {
        new CustomItem("PLANK_AXE",null, Material.IRON_AXE, Rarity.UNCOMMON,false, itemMap);
        new CustomItem("APPLE_AXE",null,Material.IRON_AXE, Rarity.UNCOMMON,false,itemMap);
        new CustomItem("THE_DOUBLER",new ArrayList<>(List.of("&7Doubles the drops from","&7every block mined.")),Material.DIAMOND_PICKAXE, Rarity.RARE,false,itemMap);
        new CustomItem("NETHERITE_HELMET", null,Material.NETHERITE_HELMET, Rarity.UNCOMMON, false, itemMap);
        new CustomItem("NETHERITE_CHESTPLATE", null,Material.NETHERITE_CHESTPLATE,Rarity.UNCOMMON, false, itemMap);
        new CustomItem("NETHERITE_LEGGINGS", null,Material.NETHERITE_LEGGINGS,Rarity.UNCOMMON, false, itemMap);
        new CustomItem("NETHERITE_BOOTS", null,Material.NETHERITE_BOOTS,Rarity.UNCOMMON, false, itemMap);
        new CustomItem("NETHERITE_SWORD", null,Material.NETHERITE_SWORD,Rarity.UNCOMMON, false, itemMap);
        new CustomItem("NETHERITE_PICKAXE", null,Material.NETHERITE_PICKAXE,Rarity.UNCOMMON, false, itemMap);
        new CustomItem("NETHERITE_AXE", null,Material.NETHERITE_AXE,Rarity.UNCOMMON, false, itemMap);
        new CustomItem("NETHERITE_SHOVEL", null,Material.NETHERITE_SHOVEL,Rarity.UNCOMMON, false, itemMap);
        new CustomItem("NETHERITE_HOE", null,Material.NETHERITE_HOE,Rarity.UNCOMMON, false, itemMap);
    }
#

init() is ran when i do the constructor

oblique heath
#

can you show me what the constructor for CustomItem looks like

brittle leaf
#
public class CustomItem extends FernItemStack{
    public CustomItem(String id, List<String> description, Material material, Rarity rarity, boolean isStackable, Map<String, FernItemStack> hashMap) {
        super(id, description, material, rarity, isStackable, hashMap);
    }
}
oblique heath
#

or any of the things that it extends that are relevant

#

can i see FernItemStack's constructor

brittle leaf
#
public FernItemStack(String id, List<String> description, Material material, Rarity rarity, boolean isStackable, Map<String,FernItemStack> hashMap) {
        this.id = id;
        this.description = description;
        this.material = material;
        this.rarity = rarity;
        this.isStackable = isStackable;

        hashMap.put(id,this);
        this.FernItemMap = hashMap;
    }
oblique heath
#

so i don't understand what your goal with the hashMap is

#

is it meant to store all of these CustomItems that you are making

brittle leaf
#

private final Map<String,FernItemStack> FernItemMap;

oblique heath
#

and then all of the items can access it from themselves

brittle leaf
#

yes

oblique heath
#

okay

#

are you sure you need / want access to the map of all items from within each item

#

if you do that's fine but are you realllyyy sure you do

#

because that seems a little strange to want to do

#

like there might be a valid reason but idk if you have one

brittle leaf
#

fernItemMap never gets called other then in this class

#

i wanted to get the map so i could query certain details based on the item i wanted

oblique heath
#

that part makes perfect sense

#

i understand what your end goal is

brittle leaf
#

a vanilla itemstack has an nbt string called id which is how i identify a custom item

#

i originally just used static and then queried that map and got the object relating to the items id if it existed

#

because it was easier

oblique heath
#

before anything i'll say that i actually think in this case using a static map would actually be fine

#

but

#

since we've gotten this far why not learn how to do it in a non-static way correctly

#

and now that i know what you actually want to do let's come up with a simplified version of what you want

#

we'll use dogs since sky seems to love dogs

#

lets say we have custom dogs instead of custom items

#

like a new CustomDog("GOLDEN_RETRIEVER", DogSize.BIG, DogColor.GOLD);

#

it doesn't make sense to give the dog itself my map of all dogs

#

i'd rather store the map wherever i'm going to make my queries

#

like my main class

#

so let's make a Map<String, CustomDog> allCustomDogs = new HashMap<>();

#

and then just

initAllDogs() {
allCustomDogs.add(new CustomDog("GOLDEN_RETRIEVER", DogSize.BIG, DogColor.GOLD) );
...
...
...
}
#

i didn't have to use static anywhere

#

and i have a map of all the custom dogs that i can query by id and get their attributes

#

if i want a class besides my main class to have access to this map, i will probably pass the map in as a constructor to those other classes

#

and they will hold a reference to it as one of their instance variables

brittle leaf
#

i saw and was told to not have stuff in the main class unless absolutely necessary

oblique heath
#

well how are you going to accomplish anything if you don't have anything in the main class

#

i believe this qualifies as necessary

#

and even if it wasn't don't stress about it too much 😉

#

anyways i hope you got something out of my lengthy example

brittle leaf
#

now how do i get the Set from my main class?

#

since i cant instance it

oblique heath
#

when you say set

#

do you mean your itemMap

#

or something else

brittle leaf
#

i was talking about the recorder set

#

but itemmap works the same

oblique heath
#

well they will both be instance variables within your main class

#

and then you can use a very common trick called dependency injection which sounds a lot more complicated than it is

#

it involves two parts:

#
  1. you have a getSet() method in your main class that returns your recorder set
#
  1. you will pass your instance of your main class as a parameter to whatever objects need access to the set
#

then those objects can store a reference to the main class as an instance variable, and later do mainClass.getSet() whenever they need access to the set

#

you could instead skip the middleman and just pass the set to the objects rather than the main class, but that becomes painful the more things you want access to; it's easier to pass one main class object and call a method on it instead of passing 2+ objects that you may want access to

oblique heath
brittle leaf
#

you cant do Ferncore core = new FernCore()

#

which is what ive been doing to get access to methods from another class

oblique heath
#

is FernCore the name of your plugin

brittle leaf
#

yes

oblique heath
#

when your plugin runs

#

and the code in your onenable and whatever else runs

#

it's running because an instance of FernCore was made

#

anything that is not static needs an instance in order to run

#

in your plugin's case you can get access to the instance by using the this keyword inside the main class

brittle leaf
#

i dont want an instance of ferncore, i just want to get the methods from it and their results when im using it in another class atleast for most stuff

oblique heath
#

well you have to call ferncore's methods on an instance of ferncore

brittle leaf
#

so i do want an instance but not a new instance ig

oblique heath
#

there is no other way

oblique heath
#

exactly right

brittle leaf
#

like some methods require an instance of the plugin, which is what

public static FernCore getInstance() {
    return instance;
}
``` is for
#

instance is uninitalized at startup, on enable does instance=this

oblique heath
#

wait

#

is instance a static variable

brittle leaf
#

yes

distant sun
#

it can only be a static variable

oblique heath
#

exactly

brittle leaf
#

exactly

oblique heath
#

oh i see

#

for a second i thought it was being set to this at the same time as it was being declared

#

which wouldnt make sense

#

anyways that's an example of static abuse

#

you don't need to do that, you can pass FernCore to whatever needs it through their respective constructor instead

brittle leaf
#

the majority of my classes dont have constructors thinking about it

oblique heath
#

get used to making constructors that accepts your main class as the only parameter

brittle leaf
#

some are just full of methods that dont depend on anything but the paramaters

#

doSomething(param)
return parambutmodifed

oblique heath
#

that's not necessarily bad but OOP is all about being stateful

#

so to take full advantage of the OOP paradigm you want to try to use instance variables and structure class relationships in a meaningful way when possible

#

not that what you are doing now is bad, it's just not very oop

brittle leaf
#

you should see the project files, it is just a spagetti that works

oblique heath
#

and a lot of people here will say that having methods and no state like you are is better than doing things the OOP way

brittle leaf
#

is using static in an enum class for a method ok?

oblique heath
#

sure since enums are essentially static anyways

#

i dont know if it's considered best practice or not though

brittle leaf
#

i currently have a class thats 377 lines long and i reference the class everywhere cause of what its used for

#

cause its got a bunch of util classes in it

oblique heath
#

i wouldnt worry about it too much

#

especially since you're still learning

#

static is fine for util classes though, since like you said it's just a method that modifies the parameters it takes in

brittle leaf
#

ive recoded the same thing about 4 times now, each better then the last

#

like i resolved an issue with telling if an inventory is one of my inventories and which one without using something like the inventory holder

#

customenchantments-0.1-SNAPSHOT.jar, sqlite-jdbc-3.36.0.3.jar define 1 overlapping resource:

  • META-INF/MANIFEST.MF
    using maven and the sqlite dependency, should i ignore it?
#

looks like recorder is working correctly with the set being in the main class

#

now to repair the registering of my custom items

brittle leaf
#

i dont know where the jar exists

#

cause i cant find it

obtuse gale
#

you can't relocate sqlite

#

I mean there's nothing stopping you from doing so

#

but it will break lol

#

you can just ignore that warning

#

also just so you know, the server already bundles sqlite

marble plaza
#

Hey! Anyone knows what are plugin.yml variables are available in IntelliJ
I see this:
version: '${project.version}'

I would like this to be (date+time):
version: 22.01.11.1234

half harness
marble plaza
#

I guess it's maven yes, I'll go with that. Thanks!

dim arch
#

sup guys

#

hows it goin

static zealot
#

yo someone recommend an app to reformat a USB Stick please.

#

I've got windows or something installed on it at the moment

#

I'm on linux rn

#

bcz its not found

#

ah got it

sly sonnet
#

delete the partition lol

#

and create a new one

hot hull
#

@wintry plinth Because fuck python, decided to control it using an arduino, meaning C#

static zealot
#

hell yeah

wintry plinth
hot hull
#

Mate I run the project, what I say goes lmao

ocean quartz
#

Nice

static zealot
#

what project do you run?

wintry plinth
hot hull
#

Well I mean it is for school in collaboration with another company, however our hands aren't tied to using specific things

hot hull
static zealot
#

ok. cool. no idea what that is

hot hull
#

Stuped

static zealot
#

yo @hot hull u worked with Toasts right? what's the difference between a Challange, Goal and Task toast?

distant sun
#

Probably just the title from what I see on the lang file

hot hull
#

The title ye

distant sun
#
{
  "advancements.toast.task": "Advancement Made!",
  "advancements.toast.challenge": "Challenge Complete!",
  "advancements.toast.goal": "Goal Reached!"
}```
static zealot
#

Ic. thanks

obtuse gale
#

blockquests have mysql support?

dim arch
#

is everbody good

static zealot
#

\

#

@dim arch I'm afraid this is not the server for that

dim arch
#

pls donate

agile galleon
#

no

#

just dont

static zealot
#

as I've said. this is not the server for that. please stop sharing those links. thank you

leaden sparrow
#

any1 familiar with Angular and can tell me how to connect to a Socket (Kryonet Java library) as a Client?

ocean quartz
#

Angular 😖

leaden sparrow
#

I know Matt, its just for one Project

wintry plinth
#

Hey, if it works use whatever you want :P

leaden sparrow
rancid gazelle
#

Hello

#

Can I report someone?

onyx loom
#

dm @compact perch

rancid gazelle
obtuse gale
leaden sparrow
obtuse gale
#

Dude your question is stupid wdym

#

How do I connect to a socket

#

Just look up how you do the same shit you’d do with any other library.

leaden sparrow
#

Please don't answer if you don't have an actual useful Answer thanks

obtuse gale
#

Just chose a library simple enough

leaden sparrow
#

yes picking a library for Angular is super simple 👌

obtuse gale
#

Considering your client is using kryonet too. That example is useful

#

Shitty question and worded horribly yw

leaden sparrow
leaden sparrow
#

yes use angular to connect as a client

obtuse gale
#

Yes worded very bad.

leaden sparrow
#

no you just can't read

obtuse gale
#

Are you dumb bro. You say how to connect to a socket as a client

#

Remove the parenthesis

#

Then you throw them in with Leto

#

Kryo

leaden sparrow
#

Please just stop, this is a Dev general not a chit chat

#

Kryo is a Java library, Angular is js

obtuse gale
#

And your question just sounds more idiotic

#

Obv

#

Your question is saying with kryo as a client. So fix your wording before you’re a cuck

#

Don’t deserve help prolly

leaden sparrow
#

no it says to a socket (Kryonet Java library) you know what those brackets are for? so people know what Socket Server I use

#

you are the only one who doesn't get it

obtuse gale
#

Looks like nobody gave you an answer

leaden sparrow
#

so please stop talking about it if you aren't helping this is a dev chat not a talk channel

leaden sparrow
obtuse gale
#

Ah they must love answering shitty worded questions for grinch like personality people

plain flume
#

help

plain flume
#

Today talk about Pokémon I don't know too. And repot me too.

tepid sedge
#

Can someone help me make a loop that counts every args after arg[1] and stores it in text variable? (I have no idea how to do that)

plain flume
#

no

tepid sedge
#

Already solved it

#
                        String message = " ";
                        for(int i = 1; i < args.length; i++)
                            message += " " + args[i];
#

Thanks anyways

#

what's that?

#

yeah

sweet cipher
#

That’s what they are doing

sweet cipher
tepid sedge
mystic cradle
#

Because..

#
Arrays.stream(args).skip(1).collect(Collectors.joining(" "));```
sudden tree
#

@chilly zenith

#

Hello

#

Sir

#

@quiet depot hello

quiet depot
#

WHO DARE'TH TAG ME

sudden tree
#

Sir

quiet depot
#

explain yourself boy

sudden tree
#

I need your help

#

I have a problem in my dc

#

Account

quiet depot
#

this explanation is unsatisfactory, as the problem has not been defined

sudden tree
#

Sir actually I am not getting any role mention and everyone mention in my recent mention tab from 3 days unexpectedly they are stopped

#

In my another account

#

Sir

#

Pls help

quiet depot
#

this is a minecraft support server

sudden tree
#

But sir u can help me as u know discord from many time

sudden tree
#

@quiet depot

#

@quiet depot

#

@quiet depot

quiet depot
#

@sudden tree

#

@sudden tree

#

@sudden tree

#

@sudden tree

#

@sudden tree

#

@sudden tree

#

@sudden tree

#

yeah 2 secs

sudden tree
#

@quiet depot but sir

#

Here how to ask my problem

#

@quiet depot

#

@quiet depot

quiet depot
sudden tree
#

How to ask my problem here

#

I don't know

quiet depot
#

you can't

sudden tree
#

I am asking for

quiet depot
#

it's a knowledgebase, look for an article to help you

sudden tree
#

@quiet depot

sudden tree
quiet depot
#

no

sudden tree
#

As u ask for me pls sir

#

@quiet depot

quiet depot
#

@sudden tree no

pallid gale
#

This is not support for discord

sudden tree
#

Is there any server for that?@pallid gale @quiet depot

quiet depot
#

no

pallid gale
sudden tree
#

Any number for that?

pallid gale
#

Could try this

hot hull
#

Uninstalling also works

remote goblet
#

lets see how quick people notice the real issuedoroSmile

potent nest
#

you mean the font?

remote goblet
#

absolutely

hot hull
#

When the player spawns?

remote goblet
#

the comic sans

distant sun
#

Thanks...

pallid gale
#

seems legit lol

distant sun
#

+5 other emails

hot hull
static zealot
#

ugh. no.

static zealot
#

gonna respond with this and close the issue lol

#

oh wait. this is the quit event issue

#

just gonna copy your response from the other issue

hot hull
#

:kek:

static zealot
#

how the fuck did they even load the plugin in 1.16.5?

hot hull
#

old version I'd assume?

static zealot
#

is setting the api-version to 1.17 not meant to stop the plugin from loading?

static zealot
#

and that's what they say they use

hot hull
#

Nah it'll still load

#

tbf, I think it should still pretty much function properly on 1.16

static zealot
outer dune
#

how do I update a plugin, without deleting the settings?

static zealot
hot hull
#

yea don't add support for it, just tell em that it's no longer supported and close the issue

static zealot
#

some plugins add the missing settings for you, some plugins just don't add the settings but will work

hot hull
#

effort

static zealot
#

also what caching system for placeholders did you have in mind?

#

or was that just an answer so you can close the issue?

hot hull
#

Can you check if all placeholders get fucked when a player leaves, or just ess ones

static zealot
#

ugh. well I believe %player_name% works. bcz I tested it the other day. but can do again. give me like 2 minutes

#

@hot hull

hot hull
#

So just ess as I thought yea

#

doubt they work for any other plugin then as well

static zealot
#

yeah. probably not.

static zealot
#

maybe a caching system like TAB has?

#

we let them declare placeholders and the time in ms.

cached_placeholders:
  "%essentials_nickname%": 600
hot hull
#

If you have an idea on how to approach that, sure

static zealot
#

hmm. but that'd be hard

#

maybe just cache time for all placeholders. not per placeholder (only cache the placeholders they list tho)

hot hull
#
cached-placeholders:
  - "%essentials_nickname%"
  - "%ur_mom%"
  - "%etc%"
static zealot
#

yeah. but what if the caching thing happens exactly when the leave event happens? there's still a chance they'll be broken is there not?

hot hull
#

most likely yea, but still probably a rare occasion

static zealot
#

well. I'll do it at some point. not rn tho. kinda busy

hot hull
#

Mate even if it's next year, no rush kek

static zealot
#

tho it will probably take a few minutes to implement

#

just have a map [key=placeholder, value=parsed-placeholder] and a runnable

#

hmm. well

#

we need to have them be per player

hot hull
#

map in a map but yea

static zealot
#

so [key=player-uuid, [key=placeholder, value=parsed-placeholder]]

hot hull
#

nah, have placeholder first, then player

static zealot
#

oh. is there really any difference?

hot hull
#

doubt

static zealot
#

but if you think that placeholder first makes more sense sure

#

should I Just copy this link and put it in the issue to remember about this?

hot hull
#

shore

sly sonnet
#

Is it possible to get vcl.h used in Embarcadero in CLion?

neat stirrup
#

I need help

compact perchBOT
#

There is no time to wait! Ask your question @neat stirrup!

neat stirrup
#

My discord has been locked

#

and i need a phone number

#

Anyone got a phone number I can use?

#

I need help 😭

#

i need help

compact perchBOT
#

There is no time to wait! Ask your question @neat stirrup!

agile galleon
#

F

neat stirrup
#

I give nitro for who help

agile galleon
#

why dont you have a number?

neat stirrup
#

i on pc

#

and my mom havent gave phone yet

agile galleon
#

but there are many trash numbers out there

neat stirrup
#

Can you help me?

agile galleon
#

Just get a trash number

neat stirrup
#

how

agile galleon
#

google it

frail glade
#

This is not the place for this topic.

neat stirrup
#

put then need to get the verification code from it

agile galleon
#

yes?

neat stirrup
#

there is ?

#

there no verification code for it tho

frail glade
#

Again, not the place for this topic.

neat stirrup
#

bro

#

br

#

bro

#

HELPCHAT

agile galleon
#

-> Minecraft/Dev

compact perchBOT
#
FAQ Answer:

Looking for discord support?
HelpChat is a Minecraft plugin and development support server and is not affiliated with discord in any way.
If you require support from discord, we recommend you to visit their official support website at https://support.discord.com
On this website, you can read their FAQs, or open a support ticket if necessary.

agile galleon
#

he just dmed me asking if he could use mine Wtf

neat stirrup
#

@agile galleon sr

eternal compass
#

So I am writing a 3D game almost from scratch, with just a 3D rendering library, and I've come to a wierd issue;

I don't know what to design my map in.
I need to be able to export to something blender can read (so I can make a more detailed version for rendering only),
and I need to be able to export something super simple (either just a json array of rectangles, or something similar)

#

anyone have any suggestions for what sort of editor I should use to do this?

humble silo
#

Wow, Java 17 is wack... Feels like they literally just dropped in a bunch of kotlin features lol, im good with it, just kinda weird

#

sealed classes, record, new switch statements...

cinder flare
#

17 only added sealed, the other two were from before

#

but yeah, it's pretty good

#

pattern matching switches are gonna be so fucking cool

humble silo
#

Im still sticking with kotlin, dont see myself switching back anytime soon, but i love all the new stuff... I really never wanna touch 8 ever again

cinder flare
#

oh yeah, kotlin gang 4 lyfe

#

i recently tried clojure and it is actually pretty cool

#

just gotta figure out enough to use it in my classes and flex on my teacher lol

obtuse gale
#

you should try scala 👀

cinder flare
#

i looked at it for a bit, but I don't see what it has to offer

#

it's just a halfway between functional and OOP

#

if i want good OOP ill use Kotlin, and if I want functional ill use Clojure

sweet cipher
#

But have you heard of Skript?

cinder flare
#

🥶

sweet cipher
#

Frozen in awe?

cinder flare
#

bro imagine if Skript was functional

#

that would be so trippy

sweet cipher
#

It does function

cinder flare
#

hahah

#

hahahhahahahahha

obtuse gale
cinder flare
#

AHHHAHA

cinder flare
obtuse gale
#

the standard library is oriented a tad differently

cinder flare
#

i guess besides type system lmao

obtuse gale
sweet cipher
#

Eww

obtuse gale
#

also clojure higher kinded types? 👀

cinder flare
#

i mean eh

obtuse gale
#

oh yeah implicits

cinder flare
#

if i want really functional ill go haskell or something

obtuse gale
#

those are great

cinder flare
#

scala as a halfsie JVM lang doesn't really fit anywhere for me

sweet cipher
cinder flare
#

he sleebs

cinder flare
#

half way between OOP and functional

obtuse gale
#

it's fully OO with functional feats

cinder flare
cinder flare
obtuse gale
#

I know

cinder flare
#

it's much more towards the middle than Kotlin

#

hence my saying

obtuse gale
#

🤨

cinder flare
#

what are you confused about

#

OOP <-----------------------------------------------> Functional

obtuse gale
#

yeah, and it's fully OO with functional feats

cinder flare
#

----------Kotlin ^ Scala ^

obtuse gale
#

eeh

sweet cipher
#

Switch to JavaScript

obtuse gale
#

but you should try it fr

cinder flare
#

i did

obtuse gale
#

it's big brain stuff

cinder flare
#

eh

#

not my cup of tea

obtuse gale
#

sad

cinder flare
#

on the other hand: have you tried F#

obtuse gale
#

I have not

cinder flare
#

it is very cool

#

|> is my favorite operator

obtuse gale
#

I would if i had something to work on with it

humble silo
#

Star

#

Just gotta be honest

#

actually

#

Emilly this is more for you tbh

#

Ive been using the module loading stuff

#

And its freaking awesome

obtuse gale
#

lol

#

ik

cinder flare
#

that was... not how i thought that interjection was going to go lmao

humble silo
#

Ive designed my whole system around it, and its just so eas

#

lol

cinder flare
#

i thought you were going to tell me i was adopted or something

obtuse gale
#

HAHAHAH

humble silo
#

Well that too

#

But also

#

modules

obtuse gale
#

yeah it's a pretty cool system

cinder flare
humble silo
#

When i was using them in java 9 it didnt feel fully incubated and gradle really didnt support it

#

but in java 11 and 17

#

omg

#

i love it

cinder flare
#

and that's on LTS babyyyy

humble silo
#

star

obtuse gale
#

i mean the architecture itself hasn't changed since then lol

humble silo
#

comon star

obtuse gale
#

gradle support is a bit iffy in general with it

humble silo
#

you literally have been dissing LTS this entire time

obtuse gale
#

but it's doable

cinder flare
humble silo
humble silo
cinder flare
#

i guess?

humble silo
#

^

#

^

cinder flare
#

i presume i said that i hate when people use lts versions cause they're out of date

#

then when you choice is between an lts and a non, especially when a latest is lts, that's an obvious choice lmao

humble silo
#

lol

#

wait

#

why didnt the others

#

do the reply thing

#

ok wahtever

cinder flare
#

i still stand by that case

humble silo
#

lol

obtuse gale
#

Also modules are MUCH MORE than just "expose this jar and don't expose this other jar but add it to the runtime"

obtuse gale
#

jlink, jmods

humble silo
#

keep going emilyy

cinder flare
#

lmao

humble silo
#

you are appreciated unlike someone here

obtuse gale
potent nest
#

Also, sealed interfaces can be used more flexible with modules

humble silo
#

The only thing i find hard

cinder flare
#

on a serious note, i don't really see much of the point of modules

humble silo
#

about modules

#

Is designing how modules should be loaded and then how the class loader heirarchy should look

#

since class loaders are tree based and modules are more, well, modular

obtuse gale
# cinder flare on a serious note, i don't really see much of the point of modules

Two major reasons:

  1. The actual primary reason was to modularize the jdk, rt.jar at the time was almost 70 MB, shipping that much extra, the majority unneeded with your application is… yeah
  2. Fail fast, the dependency graph is known way before the application actually runs, and if a module depends on another or uses a service, it will check everything is present on bootloading stage
cinder flare
#

oh I see, I always heard about it as a security thing

#

and I was like, "security from what? you have your entire java app probably lmao"

obtuse gale
#

For libraries you can not expose internals both during compile time and at runtime, protect from reflection etc but those two things were actually the main reasons

cinder flare
#

Doesn't Java 16 and above protect against reflection though?

obtuse gale
#

Since 9 it yielded a warning saying "this shit will break"

#

And, well, it did :^)

potent nest
#

Time to use the TrustFinalNonStaticFields flag yeecool

obtuse gale
#

Oh also yeah reflection changed quite a bit conceptually

#

Things like final don't "actually exist" if you have reflective access

#

It's pretty weird

#

And reflective accessibility depends on what module wants to reflect on what other module as well

#

MethodHandles pog

potent nest
#

MethodHandles are nice

#

Still waiting for local Variable support though

obtuse gale
#

Reflection will use MH as the backing system since 18 partyparrot

#

Less stuff to maintain as things move forward

potent nest
#

18 is kinda boring tbh

obtuse gale
#

The http server is… cool ig?

#

But why lmao

potent nest
#

Lot of other languages have something comparable too, so I guess that’s why

potent nest
obtuse gale
potent nest
#

Uh

obtuse gale
#

That would be sick

#

I mean not like I have any use for it

#

But still lmao

potent nest
#

javadocs are painful to work with, they aren’t really specified properly

#

And there are many broken javadoc comments in the jdk

obtuse gale
potent nest
#

lol someone told me about exactly that video yesterday

obtuse gale
#

Lmao

ocean quartz
#

Celeron best CPU for Minecraft server confirmed? kek

old wyvern
#

How does one turn on amoled dark on discord mobile?

static zealot
#

you press the dark button like 10 times

old wyvern
#

Ahhh

#

Oh wow, this looks neat

#

But for some reason discord is laggy on this phone

#

Like very laggy

obtuse gale
#

Discord mobile is laggy everywhere, it's complete trash

static zealot
#

yeah. been like this for a few weeks now. well its always been laggy but lately its been very very bad

sly sonnet
#

sounds like yall problem

#

ive had no problems like ever on discord mobile

wind patio
#

how long does spigot take to approve a premium resource?

static zealot
old wyvern
#

Seems to be an issues on an update

stray depot
#

How to get player name by uuid ?

static zealot
#

d;spigot Bukkit#getOfflinePlayer

ruby craterBOT
#
@NotNull
public static OfflinePlayer getOfflinePlayer(@NotNull UUID id)```
Description:

Gets the player by the given UUID, regardless if they are offline or online.

This will return an object even if the player does not exist. To this method, all players will exist.

Parameters:

id - the UUID of the player to retrieve

Returns:

an offline player

static zealot
# ruby crater

use this to get the OfflinePlayer and then use that to get the name

stray depot
#

If i want to teleport player to the location ,How can i to do it?

static zealot
#

d;spigot Player#teleport

ruby craterBOT
#
boolean teleport(@NotNull Location location, @NotNull PlayerTeleportEvent.TeleportCause cause)```
Description:

Teleports this entity to the given location. If this entity is riding a vehicle, it will be dismounted prior to teleportation.

Parameters:

location - New location to teleport this entity to
cause - The cause of this teleportation

Returns:

true if the teleport was successful

stray depot
#

Thank you.

obtuse gale
#

Returns: true if the teleport was successful
i wonder in what situation the teleportation would be unsuccessful thonk

static zealot
#

well it can be cancelled can it not? like cancelling the event cancels the teleport? or am I wrong about that one?

ocean quartz
#

Outside world border maybe?

static zealot
#

that is also a good reason

#

@cinder flare do you know of an alternative of Optional for C#? can't seem to find one. one that's built in if possible

#

oh. I guess I could just give the parameter a default value. since I personally don't care if it has a value or not. just don't want the user to be forced into giving a value.

steel heart
#

They got Nullable<T> iirc

obtuse gale
#

🥴

steel heart
#

Yeah probably not equivalen but well well duck duck

static zealot
ocean quartz
#

Apparently something like val test = nullable.value ?: "or this" is string test = nullable.Value() ?? "or this" in C#

steel heart
#

Yeeee blitz

obtuse gale
#

tf

static zealot
#

someone got a regex for math operations? lmao. I'm so sick of this. tried yesterday and today and this is what I ended up with:

Operators: ([\+\-\*\/\%\(\)])
Sin: (Math\.Sin\(\s*\-*\s*\d+\s*\))
Cos: (Math\.Cos\(\s*\-*\s*\d+\s*\))
Abs (Math\.Abs\(\s*\-*\s*\d+\s*\))
Min (Math\.Min\(\s*\-*\s*\d+\s*,\s*\-*\s*\d+\s*\))
Max (Math\.Max\(\s*\-*\s*\d+\s*,\s*\-*\s*\d+\s*\))
Pow (Math\.Pow\(\s*\-*\s*\d+\s*,\s*\-*\s*\d+\s*\))
Number ((-\s*)?\d+(\.\d+)?)```  but I've got a few problems with this. in this example `2 - -2424 (24-  2.4425)` it detects `2` as one group `-` as another `-2424` as another `(` as another `24` as another (so far so good) but then it detects `-2.4425` as an entire group. when I want `-` to be its own group.  this is the way I've put the regex together. And also I am aware doubles are not supported yet inside functions. forgot to update those. Also another problem is that if I add random characters like `azfasa` inside it, I want it to be considered invalid. now I believe I can just use `matches` on the entire string and it will return false if there's parts of it that doesn't match. (will add another group for spaces). I don't have to necesarely use regex but its the only thing that came to mind.
#

please before you start destroying me note that its my first time actually "understanding" regex. the few times I've used it I just copied the pattern from somewhere. this is mostly made by me. (gaby helped me with the negative numbers part yesterday.)

ocean quartz
#

You're insane sir

static zealot
#

why?

#

was regex not the way to go?

potent nest
#

valid brackets are not a regular language, therefore they can not be recognized by a regular expression

static zealot
#

that's not really a problem.

#

my problem is to tokenize the string. I use the sunting yard algoirthm to determin if its valid or not.

potent nest
#

write a proper lexer, it's easier and more readable than such a regex mess

#

and the unary minus should be an operator too

dense dew
#

" plugin that records a video "

alpine inlet
#

I saw something like that before. It was a vulcan anti cheat addon for "cheat proof videos" and apparently automated. Never got to try it tho

dense dew
#

it just replay stuff in mc

#

but he want video like video

alpine inlet
#

Oh yea, true

#

Hows that gonna work

dense dew
#

well I was thinking about making web replay for vulcan

#

and I came up to 2 solutions

#
  1. WebGL (ThreeJS or smth like that)
  2. WebAssembly (Unreal Engine)
    but none of them can be just video, its online replay thing where you can move w camera etc
tranquil crane
#

budget $5-15 KEKW
that's really just not something you can do with a plugin since only the client would be able to record anything

alpine inlet
#

Well

dense dew
#

@dim rampart as nicole said nobody will do that for $15

#

max ingame replay thing

alpine inlet
#

In all fairness, many people don't know much about java and how much work plugins actually are.

#

Let's not roast but rather educate

dense dew
#

modify replay mod

#

but webgl/webassembly is better option

#

or just compile Minecraft to webassembly 😈 (/s)

alpine inlet
#

I'd be interested for a time estimate on that ngl

dense dew
#

w threejs its not that hard

#

if you work w unreal engine & c++ its not hard too

tranquil crane
#

I feel like that would definitely require a client mod if you want to create a recording unless you want to lose your mind trying to recreate the scene from just the pure data available on the server

alpine inlet
dense dew
#

not hard = not much time ok

dense dew
old wyvern
#

T?

#

Compilesnto just Nullable<T> finally tho

sinful mason
#

<groupId>com.sk89q</groupId>
<artifactId>worldguard</artifactId>
<version>6.1.1-SNAPSHOT</version>

Means it is red

Dependecy 'com.sk89q:worldgaurd:6.1.1-snapshot not found

On
Intelij idea

sly sonnet
#

use gradle

sinful mason
#

i use maven?

#

for got to say

#

@sly sonnet ^^

onyx loom
#

have u added the repo

sly sonnet
#

no no

#

maven is the problem

onyx loom
#

blah blah blah maven bad gradle good who cares

sinful mason
karmic imp
#

Can anyone help me with my servers pvp it’s been so buggy for so long

dusky drum
#

i need algorithm pro:

you have program where you enter number size like 2
so number can be 01, 02, 03, 10...
and you enter what those numbers have to add up: 9 example
09
18
27
36
45
54
63
72
81
90

my brain wont let me do it, i cant figure out the idea how i would do it

hot hull
#

Kva

dusky drum
hot hull
#

Ne stekam

dusky drum
#

pac ti vneses kak dolgo je stevilo idk 3 stevke
in potem kolk je kao vsota vseh teh stevk ko jih sesteje, in mores izpisat na kak vse mozne kombinacije lahk sesteva stevila

old wyvern
#

uh, do you just need to sum up n numbers?

dusky drum
#

okay so i enter how many digits there is in number
then you enter what those digits sum up to
and then i need to print out all possible ways to put number of digits up to sum up to that value

old wyvern
#

Ahhhh

dusky drum
#

and my brain doesnt know how to do it

#

i know its simple if its 2 digits.

#

but anything above lags my brain

dusky drum
#

c++

#

i mean i dont mind if its java i can go translate it to c++

#

as long as it doesnt use some wierd stuff that c++ doesnt, it should be as basic code as possible.

dense dew
#

so basically you want

#

program that print numbers from 0 to 99? and 0 & 9 should be 00 and 09?

dusky drum
#

no

dense dew
#

confusion

#

oh

dusky drum
#

i mean i found python solution

def get_tuples(length, total):
    if length == 1:
        yield (total,)
        return

    for i in xrange(total + 1):
        for t in get_tuples(length - 1, total - i):
            yield (i,) + t

but i have no idea how to convert that to c++

static zealot
#

@hot hull look. a good review xD

dense dew
#

xs´ddd

hot hull
#

He gon suck your d next?

static zealot
#

but clearly. the problem were you and Star all along. lmao

#

also frosty. I am not going to remove the <#aaFF00> format. gonna keep both.

ocean quartz
#

That's the best format

static zealot
#

well I personally like #aaFF00 format. but minimessages support might be planned in the future which means a bit just a bit less work for people lmao

sinful mason
#

how to downgrade maven

dawn hinge
#

why...?

sinful mason
#

@dawn hinge

<groupId>com.sk89q</groupId>
<artifactId>worldguard</artifactId>
<version>6.1.1-SNAPSHOT</version>

Means it is red

Dependecy 'com.sk89q:worldgaurd:6.1.1-snapshot not found

On
Intelij idea

versed ridge
#

- Check that Maven pom files not contain http repository http://maven.sk89q.com/repo/

#

@sinful mason

#

Change it to https

sinful mason
#

Like this

#

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

<groupId>nl.gamerjoep.bankoverval</groupId>
<artifactId>BankOverval</artifactId>
<version>1.0-SNAPSHOT</version>

<repositories>
    <!-- This adds the Spigot Maven repository to the build -->
    <repository>
        <id>spigot-repo</id>
        <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
    </repository>
    <repository>
        <id>sk89q-repo</id>
        <url>https://maven.sk89q.com/repo/</url>
    </repository>
</repositories>

<dependencies>
    <!--This adds the Spigot API artifact to the build -->
    <dependency>
        <groupId>org.spigotmc</groupId>
        <artifactId>spigot-api</artifactId>
        <version>1.12.2-R0.1-SNAPSHOT</version>
    </dependency>
    <dependency>
        <groupId>com.sk89q</groupId>
        <artifactId>worldguard-bukkit</artifactId>
        <version>6.1.1-SNAPSHOT</version>
        <scope>provided</scope>
        <type>jar</type>
    </dependency>
</dependencies>

<build>
    <directory>E:\Build\1.12.2\plugins</directory>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
                <encoding>UTF-8</encoding>
            </configuration>
        </plugin>
    </plugins>
</build>

</project>

versed ridge
#

yeah

sinful mason
#

notting changed

versed ridge
#

Does it say the same thing?

sinful mason
#

yeah

#

Since Maven 3.8.1 http repositories are blocked.

#

?

versed ridge
#

Did you reload the project after you changed it?

sinful mason
#

no

versed ridge
#

Well, you should probably do that

sinful mason
#

i will try

#

Under file i did reload all from disk notting chaned

#

My freind normaly helps me

versed ridge
#

Click the maven tab at the top right then click the reload button

sinful mason
#

Cannot resolve com.sk89q:worldguard-bukkit:6.1.1-SNAPSHOT

Clean up the broken artifacts data (.lastUpdated files) and reload the project.

#

Unresolved dependency: 'com.sk89q:worldguard-bukkit:jar:6.1.1-SNAPSHOT'

distant sun
#

worldguard-bukkit has only v7 and its group is com.sk89q.worldguard

sinful mason
#

So i have to remove -bukkit?

distant sun
#
  <groupId>com.sk89q</groupId>
  <artifactId>worldguard</artifactId>
  <version>6.1</version>```
sinful mason
#

[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for nl.gamerjoep.bankoverval:BankOverval:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 42, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ----------------< nl.gamerjoep.bankoverval:BankOverval >----------------
[INFO] Building BankOverval 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for com.sk89q.spigot:bukkit-classloader-check:jar:1.8-R0.1-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.318 s
[INFO] Finished at: 2022-01-14T09:56:08+01:00
[INFO] ------------------------------------------------------------------------

#

[ERROR] Failed to execute goal on project BankOverval: Could not resolve dependencies for project nl.gamerjoep.bankoverval:BankOverval:jar:1.0-SNAPSHOT: com.sk89q.spigot:bukkit-classloader-check:jar:1.8-R0.1-SNAPSHOT was not found in https://hub.spigotmc.org/nexus/content/repositories/snapshots/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spigot-repo has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

Process finished with exit code 1

sinful mason
#

@distant sun ?

wind patio
#

I make a 10K line plugin, shit load of calculations and stuff, put it for premium for 2 eur. - 0 downloads

This guy makes a "RePlant" plugin, which is like 30 lines of code, puts it up for 2.50 - 156 downloads

#

Spigot in a nutshell

old wyvern
#

Would you like some pepper to go along with it?

wind patio
#

salt is good enough

#

i cri

static zealot
wind patio
#

TRUE

sinful mason
#

[INFO]
[INFO] ----------------< nl.gamerjoep.bankoverval:BankOverval >----------------
[INFO] Building BankOverval 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for com.sk89q.spigot:bukkit-classloader-check:jar:1.8-R0.1-SNAPSHOT is missing, no dependency information available

How to fix this?

lone lion
#

When i get a player's x coordinate w/ player.getX() it will show the full coordinate (170.0613975...) how do i make it only get 170? without the additional .0613975

static zealot
#

cast it to integer?

#

or math.floor it if you want it to still be a double

lone lion
#

Math.floor(player.getX())?

static zealot
#

yes

empty flint
#

I wiped my PC and installed my OS fresh. Along with it IntelliJ as well.
Now when I try to build my Plugin projects, all of a sudden I can't load the minecraft dependencies anymore. Anybody have an idea on why that could be?
Surely I don't need to run BuildTools and build that particular MC version, right?

Any ideas?

distant sun
#

spigot is NMS, spigot-api is the api from their repo

empty flint
#

I know

#

This should work too though, it used to before

distant sun
#

well, your maven local repository might got removed if you have removed everything

static zealot
#

yes. you need to run buildtools or whatever it is nowdays for spigot since you said you cleared everything

empty flint
#

Hm alright I'll try that. I just thought that it should be able to get those dependencies from the repo.

#

Thanks guys

sweet cipher
#

Someone said that Java streams clone objects which makes it cause memory leaks, is that actually true?

potent nest
#

no that's dumb

#

nothing randomly clones objects (which might not even be clonable?), and even that would not cause memory leaks

sweet cipher
#

That’s what I thought