#help-development

1 messages · Page 651 of 1

unkempt peak
#

I wonder if they made spigot in netbeans

quaint mantle
#

Unfortunately, yes

#

I say unfortunately, because most people use the wildcard as it is

#

Just '*'

#

Which is, in terms of security, lamentable

#

Is more powerfull than having OP

#

You can still limit OP permissions, but you can't limit single * wildcard permission

ocean hollow
#

why i have it?

quiet ice
#

Cancels mom?

ocean hollow
#

menu))

quiet ice
#

In layman's terms I got no clue what your issue is

tall dragon
#

"doesnt work" isnt very informative

compact haven
#

you send 3 screenshots of code

unkempt peak
#

Maybe the issue is their mom

compact haven
#

with like 5 words

unkempt peak
#

I don't even bother looking at screenshots anymore

#

Like is it really that much work to click a link and ctrl c ctrl v

quiet ice
shadow night
#

can a plugin know the players language?

quiet ice
#

Yes

shadow night
#

like, the language set in the client

quiet ice
#

#local in paper

ocean hollow
quiet ice
#

Under spigot idk

shadow night
#

hmm

ocean hollow
# ocean hollow

when it closes, the menu continues its work, if you hide it, the menu closes

quiet ice
shadow night
#

or I'm dumb

unkempt peak
#

?paste@ocean hollow

#

?paste

undone axleBOT
quiet ice
#

I'd still use the paper method if possible though as idk what the spigot method returns

eternal night
#

A string

#

so I guess parse a local from there ?

quiet ice
#

Well it returns a string but idk the format of it

shadow night
#

a string, probably en_us format

quiet ice
#

Yeah probably that one

shadow night
#

ru_ru, en_us, de_de

#

en_gb

quiet ice
#

But how will it represent the conlangs?

shadow night
#

conlangs?

ocean hollow
mortal hare
#

ah, the internet

ocean hollow
#

?

quiet ice
shadow night
quiet ice
#

Or the pirate thing

mortal hare
lost matrix
#

Woops wrong ping

lost matrix
# ocean hollow ?

Static abuse of the absolute highest order.
This leads to inevitable chaos.

quiet ice
ocean hollow
#

what will happen

tall dragon
#

sounds like smile is judging for some crime here 😂

quiet ice
shadow night
quiet ice
#

Although HM<Player, V> is enough bad already

shadow night
#

HashMap

#

I have 5 utility classes, all fully static

quiet ice
#

Always use Map instead of HM if possible heh

shadow night
ocean hollow
#

does it matter where they are placed? I could make a DataManager with these values ​​stored

quiet ice
#

You can swap out the map impl while conserving ABI

#

Just in case you need a CHM

tall dragon
quiet ice
#

Yeah these aren't really mem leaks

ocean hollow
#

the problem is that I'm not accessing the players via UUID?

tall dragon
spare hazel
#

how can i check if the players inventory is full

lost matrix
shadow night
#

Bukkit.getPlayer(uuid) be like (or what was it?)

quiet ice
#

You are not storing data via UUIDs to be more precise

lost matrix
quiet ice
spare hazel
quiet ice
#

Then do not use static

#

Don't use what you do not understand

spare hazel
quiet ice
#

It isn't accessible per-se, it just means you do not need an instance of the class to invoke it on

ocean hollow
#

Well, it seems to me that this is more convenient than creating a Data class and passing it to others

tall dragon
#

that does not mean its a good idea

lost matrix
quiet ice
spare hazel
quiet ice
#

I don't think there is

tall dragon
#

there is but that does not support any present items of the same type

#

which most people want

lost matrix
lost matrix
spare hazel
#

does .isEmpty() return true when there is empty space on the inventory?

tall dragon
#

PlayerInventory#getFirstEmpty() != -1 would always check if the player has at least one empty slot

quiet ice
#

With streams that is a one-liner!

tall dragon
#

idk if thats even still present in the api

quiet ice
#

If it wasn't deprecated at any point: why would it get removed?

tall dragon
#

idk, i never programmed much on higher than 1.12 so i woulnt know

spare hazel
#

i believe essentialsx has a good implementation for this. leme go check their code

tall dragon
#

essentials has bassically the same thing smile sent you

quiet ice
#

?jd-s

undone axleBOT
quiet ice
#

You are defo overcomplicating the problem

spare hazel
vocal cloud
remote swallow
#

just call get getFirstEmpty() on the inv and check if its -1

#

its not hard

tall dragon
lost matrix
#
  public boolean hasFullInventory(Player player) {
    return player.getInventory().firstEmpty() == -1;
  }

  public boolean hasFullInventory(Player player) {
    ItemStack[] content = player.getInventory().getContents();
    for(ItemStack item : content) {
      if(item == null || item.getType().isAir()) {
        return false;
      }
    }
    return true;
  }

Both of those are viable

vocal cloud
#

isn't the item supposed to never be air? I think I looked at stash and it was always set to null. Spigot is very weird with this

lost matrix
#

Hand item is air

vocal cloud
#

Why REEE

#

I wish they'd remove null and replace with air

tall dragon
#

which one

#

cave_air or air ?

#

xD

lost matrix
#

if(inventory.isAir())

remote swallow
#

cave air

tall dragon
#

like why have 2 seperate airs

quiet ice
spare hazel
tall dragon
#

and surely there was no better way to do that right

quiet ice
tall dragon
#

yep im waiting for it

shadow night
#

because breaking changes

tall dragon
quiet ice
lost matrix
shadow night
quiet ice
tall dragon
quiet ice
#

And thought you referred to phantoms

lost matrix
#

Imagine needing little mouse traps so mice dont eat all your grain...
I could cook up so many annoying things in mc

smoky oak
#

like yggdrasil?

tall dragon
#

i found it so funny whena gamerule was added to disable phantoms

#

like even minecraft knows it was a shit idea

lost matrix
#

"You got a headache and cant mine because its too loud"

spare hazel
#

kinda a dumb question but how would i register a command executor for a command?

#

i forgor

lost matrix
smoky oak
#

theres a bukkit method where you put in the command name as in your config and then the class that extends the executor

lost matrix
spare hazel
smoky oak
#

wym?

lost matrix
smoky oak
#

no idea

#

i dont care much for marvel anyways

lost matrix
#

wdym. Why did you name yourself after this cringe vampire marvel movie with Jared Leto then...

smoky oak
#

OH FOR FUCKS SAKE

#

my name is older than the damn movie

#

every time urgh

lost matrix
#

Im just fking with you aPES_Laugh

smoky oak
#

fair

#

any idea how to get rid of yggdrasil tho?

wet breach
lost matrix
#

chop it with a giant axe

smoky oak
#

well yea but how

#

oh wait do u know what i even mean

quiet ice
#

Just use a Firewall

smoky oak
#

hm thats an idea

#

can i just block all outgoing connections of a folder or smth

#

im under windows

quiet ice
#

echo "yggdrasil-server 127.0.0.1" > dev/hosts or something like that

spare hazel
#

was excited to test my new plugin but then i remembered that i didnt register the listeners 😐

smoky oak
#

ah well that'd solve the yggdrasil one but not the potential others there are

#

i really need a general solution

#

also that'd probably screw the servers that i want to connect to the net

#

locality's an issue here

quiet ice
#

Install a security manager :blobsecurity:

hollow sundial
#

In the HopperInventorySearchEvent, how can I tell if this was triggered by a hopper or a minecart? How should I get this hopper minecart?

smoky oak
#

i think you can get the inventory it came from and check what that inventory belongs to

lost matrix
hollow sundial
#

I think the inventory provided by the event is the container's inventory not the hopper's

lost matrix
#

Ah makes sense. Let me check the event again

lost matrix
primal goblet
#

Hello, i'm making a hologram armorstands using nms packets
showing the armorstand to the player and make it visible bla bla bla
and everything is working perfect, and the issue is when i go too far and the chunk that includes the armorstand made in packets unload and then i go back to the armorstand and the chunk loads again the armorstand will not be visible again, so what's the issue is?
and i can provide a code if needed.

lost matrix
hollow sundial
lost matrix
primal goblet
# lost matrix Are you sure that its a virtual armorstand? Do you hide the hologram if a chunk ...

i'm 100% sure the armorstand is made using packets.

this.armorStand = new EntityArmorStand(((CraftWorld) loc.getWorld()).getHandle()); // that's the armorstand.
// ========
PacketPlayOutSpawnEntityLiving spawn = new PacketPlayOutSpawnEntityLiving(this.armorStand);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(spawn); // and that's how i show the armorstand to the player.
``` hopefully this helps, btw the armorstand and the player 100% is a true value and nothing wrong with the code
#

there's a more code for titles.. etc

sterile breach
#

hello i have a probleme in inventory.

if(event.getCurrentItem().equals(new ItemStack(Material.SPAWNER))) {

i click on a spawner but no. This condition return false every times. i did a mistake?

hollow sundial
shadow night
#

nobody ever forgets schnitzel schnitzel

lost matrix
primal goblet
hollow sundial
primal goblet
sullen marlin
#

Lol

lost matrix
#

Ask someone else for help then

wet breach
primal goblet
sullen marlin
#

?1.8

undone axleBOT
lost matrix
#

^

primal goblet
sullen marlin
#

Maybe there's a new event, maybe it's fixed, but who knows because you're living 8 years in the past

lavish hemlock
#

Use ViaVersion.

#

Or ProtocolSupport.
Or a 1.8 combat restoration plugin.

lost matrix
smoky oak
#

isnt there old versions of the api online

primal goblet
#

*sad hypixel noises*

smoky oak
shadow night
lost matrix
#

What do you mean low? Its on par with 1.8
And apearantly this is the biggest community in mc 🙂

pseudo hazel
#

well 1.20 is clearly just normies so yeah

smoky oak
#

honestly unless its 1.12 or 1.8 your mc version equals the power of your computer

shadow night
#

I remember my friend would play 1.15 and 1.12.2- because his computer was shit

smoky oak
#

couldnt be me
coughs in 2 GB ubuntu

#

yes i have 2 2 GB 128 Drive ubuntu computers why do u ask

simple schooner
#

Damn

vocal cloud
#

It's always "Hypixel uses it so it must be good"

smoky oak
#

nah it's '1.9+ is shit'

shadow night
#

Because pvp

#

I like 1.7.10

#

Modding

vocal cloud
#

I just wish people would stop trying to be Hypixel and make something new and unique

smoky oak
#

im not trying to copy hypixel but im not doing minigames much either

vocal cloud
#

Like, yes with 1.20 you can't perfectly replicate 1.8 PvP. However, there is just so much more you can do with 1.20 that makes 1.8 look like a cheap knockoff.

smoky oak
#

well u cant have stable UPS with 1.20

vocal cloud
#

UPS?

lost matrix
#

Not viable with 1.20

vocal cloud
#

Apparently not. Well back to the true best version beta 1.2

smoky oak
#

eh i prefere 1.5.2

lost matrix
#

Does he mean tps maybe?

smoky oak
#

maybe

onyx fjord
sullen marlin
#

1.7.3 beta was pretty sick

smoky oak
#

cant remember what the right name was

vocal cloud
#

Buy a better CPU & RAM™️

lost matrix
#

In that case: You can optimize a lot in 1.20
The heaviest things are vanilla features like giant chunks
with a ton of tickables in them. If you have minigames
then that does literally not matter. Just learn how to optimize
the game for your needs.

lilac dagger
#

oh nvm, you're most likely trolling haha

sullen marlin
#

It added pistons

lilac dagger
#

oh

#

i don't know much about the beta, i just remembered playing uhm 1.4

#

the version potatos and carrots were added

chrome beacon
#

I started playing Minecraft in 1.5

livid dove
#

People always forget hypixel is hypixel because they did a load of cool shit slowly.

Then everyone and their mum tries to recreate it from scratch and it ends up unoriginal as you cannot realistically create something that vast without the cheat of copying

shadow night
#

I personally never tried recreating hypixel

#

Because that is the most unnecessary shit ever

spare hazel
#

Method invocation 'getAttributeModifiers' may produce 'NullPointerException'
how can i prevent this? it does produce NullPointerException but i want the MultiMap for attribute modifiers

lavish hemlock
#

That is an IntelliJ warning telling you that invoking that method can cause a NullPointerException to occur
Check that the instance you're invoking the method on isn't null

spare hazel
#
ItemStack item = new ItemStack(material);
        ItemMeta itemMeta = item.getItemMeta();
        Multimap<Attribute, AttributeModifier> modifiers = itemMeta.getAttributeModifiers();
        ArrayList<String> lore = new ArrayList<>();

        if(stats.size() != 0){
            for (Stat key : stats.keySet()) {
                lore.add(ChatColor.RED + key.getName() + ": " + ChatColor.GRAY + stats.get(key));
                modifiers.put(key.getAttribute(), new AttributeModifier(key.getName(), stats.get(key) * key.getMultiplier(), AttributeModifier.Operation.ADD_NUMBER));
            }
        }
        lore.add(ChatColor.GRAY + additionalLore);
        lore.add("");
        lore.add(rarity.getColor() + "" + ChatColor.BOLD + rarity.getName() + " Item");

spare hazel
#

and i cant just do new AttributeModifiers()

remote swallow
#

do you get an npe

lavish hemlock
#

I gave you the answer, man :p

shadow night
#

It says that because ItemMeta could be null I think

spare hazel
spare hazel
shadow night
#

I always just put a if(itemMeta == null) return; just to remove the warning

remote swallow
#

?paste the error and the full class of where the error occured

undone axleBOT
shadow night
#

Or assert itemMeta != null

remote swallow
#

in seperate pastes

spare hazel
#

alr

#

nvm theres a more serious problem than this

#

i may only be able to paste the full class. is that alright?

remote swallow
#

if you dont have the error we cant fix it

spare hazel
remote swallow
#

how do you know there was an npe without the npe on ur screen

spare hazel
#
try{
                p.getInventory().addItem(HypixelCustomItems.getPlugin().getItem(args[0]).build());
                p.sendMessage("SUCCES!");
            }catch (Throwable e){
                try {
                    p.sendMessage(e.toString());
                }catch (Throwable e2){
                    p.sendMessage("error");
                }
            }

with this

remote swallow
#

wtf

#

that just hurts

#

why are you try catching a sendMessage

#

you should be using e.printStackTrace()

spare hazel
#

i thought e.toString() would not work

wet breach
#

Lol catching throwable

spare hazel
#

im new to java

lost matrix
#

Amusing piece of code right there

spare hazel
#

why am i unable to save the code in ?paste

remote swallow
#

let me guess, its all 1 class and 2 thousand lines long

spare hazel
#

119 lines long

remote swallow
#

and the error?

spare hazel
#

leme just rebuild the plugin with e.printStackTrace and i will tell you

livid dove
#

See convos like this make me wanna do a unit testing guide 😅

spare hazel
median berry
#

Hi, I want to ban one nbt tag when setting up a stand! At first I found information about Persistent Data Container, but it does not work with nbt tags from minecraft. I've also seen nbtcompound, but I don't have it. I tried the netapi and powernbt libraries, but each did not want to work in its own way, I did as they have on the wiki. How can I remove the "Pos" tag from Armor stand in the playerinteractevent event? Below is the nbtapi error who is interested (2.11.2)
https://i.ibb.co/X29py7t/18.png
https://i.ibb.co/RHqSP0J/20.png

remote swallow
# spare hazel https://paste.md-5.net/anuxaqevev.md

change the code to ```java

Multimap<Attribute, AttributeModifier> modifiers;
if (itemMeta.hasAttributeModifiers()) {
modifiers = itemMeta.getAttributeModifiers();
} else {
modifiers = ArrayListMultimap.create();
}

wide dune
#

Anyone got a clue how I could go about making blast proof glass like in hypixel? I have adjusted the hardness of the glass very high, so when tnt is placed behind glass it works (like this https://i.imgur.com/WFWI2cW.png)
However when tnt is placed on an edge (like this https://i.imgur.com/GB6Ibkr.png) the wool breaks when the tnt blows up. Any suggestions?

livid dove
#

Is there a tnt blows the hell up event?

smoky oak
#

thats cuz a ray goes through that without hitting the glass

#

look up explosion rays

young knoll
#

Yeah there’s an event

#

But just removing the glass from the event won’t prevent it from destroying the wool behind the glass

wide dune
#

^^

native bramble
wide dune
#

Yeah its really puzzling me

#

I was going to ray trace it but the actual distance between the two doesnt seem to detect the glass because its on a corner

#

so there isnt technically a block inbetween them

smoky oak
#

you can just spawn a particle

native bramble
smoky oak
#

you dont need extra data unless its a particle that has variations

native bramble
smoky oak
#

thats still the same particle

#

just scaled and rotated

native bramble
#

i tried to getDataType

#

but its return me Void

native bramble
#

soul sand has brown souls and blue souls

smoky oak
#

im pretty sure thats a timing thing you cant affect

young knoll
#

It might be possible with packets

#

I think there’s a seed

native bramble
#

also my particles spawns in different locations

#

also in different y

#
@EventHandler
    public void onEntityDead(EntityDeathEvent e){
        LivingEntity entity = e.getEntity();
        if(entity.getType() != EntityType.DROWNED) return;
        Location loc = e.getEntity().getEyeLocation();
        System.out.println(loc);
        entity.getWorld().spawnParticle(Particle.SOUL, loc, 3, 0,0,0, 1);
    }
#

offset is 0

shadow night
#

The middle of a block is 0.5 iirc

native bramble
#

yeah i know this

#

but particles spawn in different locations

#

not in one

shadow night
#

That's how particles work ig

native bramble
#

also if i put count = 1 i dont see any particle

tranquil ferry
#

Is it allowed to add this in spigot page

If you want other payment method buy here (Polymart/ BBB)

Ping me imma busy irl

full holly
#

What's the difference between the profile field and the serializedProfile field?

lost matrix
full holly
lost matrix
#

Dont touch those fields

#

Why do you want to edit those fields?

full holly
#

Do you have any idea how to fix this?

full holly
lost matrix
#

Spigot has an api for that. No need to use reflections or nms.

full holly
#

is that new?

lost matrix
#

Not really. Has been here for at least a year

#

Probably longer now

full holly
#

ok thanks

lost matrix
#

Use PlayerProfiles

full holly
#

oh I see, thank you for your help

young knoll
#

Since 1.18.1

mortal hare
#

is there any way to make intellij add annotation not like this:

#

but like this instead

lost matrix
#

Sure, just edit your code style

spare hazel
#

how can i modify a block's drops

mortal hare
#

while autogenerating

#

i cant find

#

the setting for it

#

i've tried searching it in code style

lost matrix
spare hazel
opal juniper
# mortal hare

i mean this is arguably better because then you can do:

@NotNull List<@Nullable Object>

a bit easier

lost matrix
spare hazel
spare hazel
#

nvm i have to use BlockDropItemEvent

median berry
#

Have the new versions already removed nbtcompound? I just don't have it for some reason

young knoll
#

No

#
  1. Are you using full spigot (with NMS)
  2. Are you using mojmap
median berry
#

I am a newbie in coding and I do not know which version of spigot is in intellji

round finch
#

You don't register every event

#

Just YourEventClass

median berry
young knoll
#

?nms

smoky oak
#

thats the --remapped thing right?

median berry
# young knoll ?nms

I tried to find out what the problem was, I even added the spigot 1.18.2 kernel to the project, but there was nothing related to nms or nbt tags

spare hazel
#

e.getBlock().getWorld().dropItem(e.getBlock().getLocation(), new ItemStack(e.getBlock().getType()));

why isnt this working

#

no errors no nothing

chrome beacon
#

Show the entire method

#

?paste

undone axleBOT
spare hazel
#
@Override
    public void onBlockBreak(BlockBreakEvent e){
        if(!allowedBlocks.contains(e.getBlock().getType())){
            e.setCancelled(true);
            return;
        }
        e.getBlock().getWorld().dropItem(e.getBlock().getLocation(), new ItemStack(e.getBlock().getType()));
    }
#
@EventHandler(priority = EventPriority.HIGHEST)
    public void onBlockBreak(BlockBreakEvent e){
        if(e.isCancelled()) return;
        if(e.getPlayer().getInventory().getItemInMainHand().getType() == Material.AIR) return;

        if(e.getPlayer().getInventory().getItemInMainHand().getItemMeta().getPersistentDataContainer().has(HypixelCustomItems.getPlugin().getItemKey(), PersistentDataType.STRING)){
            HypixelCustomItems.getPlugin().getItem(e.getPlayer().getInventory().getItemInMainHand().getItemMeta().getPersistentDataContainer().get(HypixelCustomItems.getPlugin().getItemKey(), PersistentDataType.STRING)).onBlockBreak(e);
        }
    }
chrome beacon
#

💀

spare hazel
#

?

chrome beacon
#

Variables exist

spare hazel
#

yes i know

#

and im lazy

chrome beacon
#

That takes longer than creating variables though

spare hazel
#

ctrl+c ctrl+v

chrome beacon
#

Anyways make sure it passes your if statements

#

also what's the point of that code

spare hazel
#

doubling the drops of wood

chrome beacon
#

Don't cancel the event for that

spare hazel
#
public class DuperAxe extends CustomItem {
    private ArrayList<Material> allowedBlocks = new ArrayList<>();

    {
        setId("DUPER_AXE");
        setMaterial(Material.STONE_AXE);
        setName("Duper Axe");
        setRarity(Rarity.RARE);
        setAdditionalLore("Double Wood Drops!");

        addStat(Stat.SPEED, 10);
        addStat(Stat.HEALTH, 5);

        allowedBlocks.add(Material.OAK_LOG);
        allowedBlocks.add(Material.BIRCH_LOG);
        allowedBlocks.add(Material.DARK_OAK_LOG);
        allowedBlocks.add(Material.JUNGLE_LOG);
        allowedBlocks.add(Material.ACACIA_LOG);
        allowedBlocks.add(Material.SPRUCE_LOG);
    }

    @Override
    public void onBlockBreak(BlockBreakEvent e){
        if(!allowedBlocks.contains(e.getBlock().getType())){
            e.setCancelled(true);
            return;
        }
        e.getBlock().getWorld().dropItem(e.getBlock().getLocation(), new ItemStack(e.getBlock().getType()));
    }
}```
chrome beacon
#

You can just edit the drops directly

spare hazel
spare hazel
chrome beacon
#

Yeah

median berry
spare hazel
chrome beacon
#

They both exist

spare hazel
median berry
chrome beacon
#

you put spigot-api instead of spigot

median berry
chrome beacon
#

Did you run build tools like the guide told you to

median berry
#

wait

#

In terminal?

chrome beacon
#

Yes

#

so you skipped step 1 and complained that it isn't working 💀

median berry
#

The problem is that I don't really know English

#

Especially in the field of coding

spare hazel
#

how can i add block drops using BlockDropItemEvent Exactly?.

chrome beacon
flint coyote
#

wrong folder?

median berry
#

I just forgot to download XD

flint coyote
#

🥲

flint coyote
#

You can't directly. You'd have to manually drop items

chrome beacon
#

In this case you can

median berry
#

If i drop buildutils in external libs this can work?

spare hazel
chrome beacon
#

Since they want to double the existing drop

#

You can just get the existing drop and increase it's amount

flint coyote
#

Oh I did not read about that. Only the last question

spare hazel
flint coyote
#

Well it's an item and it has getItemStack.
ItemStack has a setAmount()

#

So it could work

chrome beacon
smoky oak
#

you may not remove itemstacks

#

the itemstacks can be mutated

#

*add

flint coyote
#

You can remove them. You aren't allowed to add any

smoky oak
#

yea i mistyped

spare hazel
flint coyote
#

no

median berry
#

So, I download buildutils

smoky oak
#

you have to mutate the itemstack i think

flint coyote
#

Get an item, get the item stack and set the amount

spare hazel
spare hazel
#

but the e.getItems() only accepts Item interfaces

flint coyote
#

You are not supposed to add anything to that list

spare hazel
#

wait im dumb

flint coyote
#

Take one from the list and go through the functions mentioned above

spare hazel
#

e.getItems.get(0).getItemStack().setAmount(2)

flint coyote
#

yes

spare hazel
#

thank you so much

flint coyote
#

Keep in mind that the list might be empty or have multiple items (breaking a chest). So you need additional checks. But basically that's what you do

#

And if you want to take fortune into account you should set the amount to getAmount()*2

spare hazel
#

that did absolutely nothing

#

e.getItems().get(0).getItemStack().setAmount(2);

#

lemme just spawn the item

#

its so hard to code with 6gb of ram and 2 cpu cores omg

chrome beacon
#

2 cores 👀

spare hazel
#

its a 10yo asuz laptop

shadow night
#

what was the cpu with 2 cores called

#

I forgot

spare hazel
#

and when i had to choose between a gen Z latop and an xbox...

simple schooner
shadow night
#

exactly what I want, thanks

simple schooner
#

8 year old 4 gb ddr3 200 gb HDD no gpu dusty motherboard shitty cpu

#

It can barely run intellij and google at the same time

chrome beacon
#

You can probably upgrade that

simple schooner
#

😭

chrome beacon
#

Add some more ram

simple schooner
chrome beacon
#

DDR3 is very cheap

#

Since it's so old

simple schooner
#

Yeah I know

#

Theres like 5 dollars 8 gb ddr3 ram

spare hazel
#

what is the difference of dropping an item vs droping an item natuaraly

flint coyote
worldly ingot
#

Yeah, naturally just gives it a random offset

#

Think more like what happens when you break a block. It kinda sputters off at a random offset

#

Should have been a boolean parameter tbh, but meh. Old Bukkit

flint coyote
#

Could add a third method with the boolean and deprecate the old ones

worldly ingot
#

Nah. Not at all worth it

#

It would be a trivial change with practically zero benefit

flint coyote
#

Well then add an offset parameter to it - there's your benefit :p

small iron
#

Can anyone teach me command encoding of more than 2 words? Like:
/kits create . . .
/gm setup

*command more than 2 words🗿. Yes, I don't know the term

quaint mantle
median berry
#

@chrome beacon Thx for help, now I have nbttagcompound

simple schooner
#

??

small iron
simple schooner
#

Try to use switch statements

#

Idk seems like it'll do the job

#

Check if the user gives an arguement

#

Then use switch statements to check if that argument is the thing u wanted

#

Like "create"

#

"Setup"

#

Tbh I don't really know if that works lol

#

I'm just a mere beginner

#

Seems like it'll do the job though

#

Sorry for the terrible explanation, my english isn't fluent.

#

Or idk maybe theres a better way? Ig so

smoky oak
#

better than if else chains

simple schooner
smoky oak
#

yea

#

switch is slightly bigger but has constant access time

#

if-else is done sequentially

#

switch just jumps

simple schooner
#

Holy shit I used my brain for the first time

primal goblet
#

i'm trying to spawn an entity armorstand w/ nms packets
everything works fine, but when i go far away like 100 blocks away or so
the armorstand disappeared for no reason
that's my code:

Location loc = this.location.toBukkitLocation();
        World worldServer = ((CraftWorld) loc.getWorld()).getHandle();
        this.armorStand = new EntityArmorStand(worldServer);
        this.armorStand.setLocation(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch());
        this.armorStand.setGravity(false);
        this.armorStand.setCustomNameVisible(true);
        this.armorStand.setCustomName(Major.C(this.text));
        this.armorStand.setInvisible(true);
        this.armorStand.setSmall(true);
        // this.rainbowCheck(hologram);
        ((CraftLivingEntity) this.armorStand.getBukkitEntity()).setRemoveWhenFarAway(false);
        worldServer.addEntity(this.armorStand);
``` and the line `worldServer.addEntity(this.armorStand);` when i add it the armorstand disappears so i put a comment behind it
smoky oak
#

isnt that entirely dependent on client entity distance when it does?

lilac dagger
#

you might wanna look into entity tracker

primal goblet
lilac dagger
#

all the entities are tracked by a class and when they're far away they get despawned from players

#

you must circumvent your problem in there

primal goblet
#

uhmm i can do something like check if the player go far away and comeback
but why the armorstand disappears when i go far? i tried to check the events or the chunks

small iron
lilac dagger
#

you need to edit the entity tracker

primal goblet
lilac dagger
#

onpe, it's in nms

primal goblet
inner mulch
#
    public Set getSet() {
        Set<Material> materials = new HashSet<>();
        materials.add(Material.OAK_LOG);
        materials.add(Material.BIRCH_LOG);
        materials.add(Material.SPRUCE_LOG);
        materials.add(Material.DARK_OAK_LOG);
        materials.add(Material.JUNGLE_LOG);
        materials.add(Material.ACACIA_LOG);
        materials.add(Material.MANGROVE_LOG);
        materials.add(Material.CHERRY_LOG);
        materials.add(Material.CRIMSON_STEM);
        materials.add(Material.WARPED_STEM);
        return materials;
    }
    public double getXPValue(Material material) {
        double xp;
        switch (material) {
            case OAK_LOG:
                xp = 3;
                return xp;
            case BIRCH_LOG:
                xp = 3;
                return xp;
            case SPRUCE_LOG:
                xp = 3;
                return xp;
            case DARK_OAK_WOOD:
                xp = 2.5;
                return xp;
            case JUNGLE_LOG:
                xp = 2;
                return xp;
            case ACACIA_LOG:
                xp = 3;
                return xp;
            case CHERRY_LOG:
                xp = 5;
                return xp;
            case MANGROVE_LOG:
                xp = 5;
                return xp;
            case CRIMSON_STEM:
                xp = 4;
                return xp;
            case WARPED_STEM:
                xp = 4;
                return xp;
            default:
                return 0;
        }
    }
}```

Is there a way that I could improve on this? Making it more efficient?
iron crow
#

Use a map.

lilac dagger
inner mulch
#

whats that?

lilac dagger
#

it's a map specially designed for enums

iron crow
lilac dagger
#

it stores elements more efficiently

inner mulch
#

Like this?

#
public class ForagingSet {
    private Map<Material, Double> xpValues = new HashMap<>();

    public ForagingSet() {
        xpValues.put(Material.OAK_LOG, 3.0);
        xpValues.put(Material.BIRCH_LOG, 3.0);
        xpValues.put(Material.SPRUCE_LOG, 3.0);
        xpValues.put(Material.DARK_OAK_LOG, 2.5);
        xpValues.put(Material.JUNGLE_LOG, 2.0);
        xpValues.put(Material.ACACIA_LOG, 3.0);
        xpValues.put(Material.MANGROVE_LOG, 5.0);
        xpValues.put(Material.CHERRY_LOG, 5.0);
        xpValues.put(Material.CRIMSON_STEM, 4.0);
        xpValues.put(Material.WARPED_STEM, 4.0);
    }

    public Set<Material> getSet() {
        return xpValues.keySet();
    }

    public double getXPValue(Material material) {
        return xpValues.getOrDefault(material, 0.0);
    }
}```
iron crow
#

Basically, yes.

inner mulch
lilac dagger
#

EnumMap.noneOf(Material.class); instead of new HashMap();

iron crow
#

^^

ivory sleet
#

or IdentityHashMap

#

since Material might be dodoing

inner mulch
#

why are these maps better than a hashmap?

#

is there a reason

lilac dagger
#

it is in term of what the implementation is

iron crow
#

Each map has it's own features, like sorting, etc.

lilac dagger
#

for enums you don't have to compute hashes

#

it just uses ordinal

#

and an array of values

inner mulch
#
    OAK_LOG(3.0),
    BIRCH_LOG(3.0),
    SPRUCE_LOG(3.0),
    DARK_OAK_LOG(2.5),
    JUNGLE_LOG(2.0),
    ACACIA_LOG(3.0),
    MANGROVE_LOG(5.0),
    CHERRY_LOG(5.0),
    CRIMSON_STEM(4.0),
    WARPED_STEM(4.0);

    private double xpValue;

    private Material(double xpValue) {
        this.xpValue = xpValue;
    }

    public double getXPValue() {
        return xpValue;
    }
}```
you mean like this?
lilac dagger
#

this is even better

iron crow
#

xD

lilac dagger
#

but you can't use the material properties

inner mulch
#

idk, you might laugh but i asked chatgpt to convert my code to an enum

#

i dont really understand any of it

iron crow
#

A map is like key-value store, but each instance does it's things, mostly sorting, optimization, specific tasks, general purposes and so on.

inner mulch
#

okay, but why are enums prefered over normal classes?

iron crow
#

Well, enums are static, classes are not.

#

They have different purposes as well, like, a class can do much more.

simple schooner
#

Just register the kh command

#

And I think you should ask for advice on others because I've only been coding in java for like 4 days

#

I still have alot of stuff to learn

simple schooner
#

Tbh I don't really know lol

#

I'm just relying on common s3nse rn

river oracle
river oracle
#

No just don't use an EnumMap with material

inner mulch
river oracle
#

Oh if you're making an enum you can keep it I'd use a map personally but to each their own

river oracle
#

Just avoid the use of EnumMap

#

Which extends map

#

Using hashmap will be just fine

inner mulch
#

okay, i was told that it isnt as good, because enums are static and classes are not

river oracle
#

Just make your class final singleton if you're worried about multiple instances

lilac dagger
#

as far as i know material isn't deprecated

river oracle
#

But it'd be better if you just didn't force commodore to do anything to your code

lilac dagger
#

uh?

river oracle
#

I'd have to look at exactly what they do to material in the pr again

#

Are you not aware of the registry pr on the experimental branch?

small iron
lilac dagger
lilac dagger
#

but i'm sure materials aren't gonna be gone anytime soon

#

so you're talking about materials or enummap?

simple schooner
river oracle
tender shard
#

everything that implements Keyed will soon(TM) not be an enum anymore

river oracle
#

hopefully its merged in 1.21

tender shard
#

so you should not use an EnumMap for Material

simple schooner
lilac dagger
#

i see

river oracle
#

if you have stash access

#

if you don't ^

lilac dagger
#

but that means goodbye to switches too

#

hmm

tender shard
#

this should work

shadow night
#

what is that

tender shard
#

it gets you an enummap of amterial in versions where material is an enum

#

and a normal map in versions where material is not an enum anymore

shadow night
#

also wth is a @UtilityClass annotation?

river oracle
#

its lombok

shadow night
#

hm

river oracle
#

unless jetbrains adds one too

shadow night
#

makes sense

tender shard
#

it's a pretty useless annotation and probably won't go into stable

shadow night
#

I don't use lomkob anyways

river oracle
#

I wish @ExtensionMethod was actually useful

#

there are some edge cases where ExtensionMethods would be nice if you add something to a type with NMS

#

but you have to copy paste @ExtensionMethod around literally everywhere you use it right now

#

and no IDE autocomplete for exntension methods too

#

Manifold definitely does it better atm

remote swallow
#

reminds me of kotlin

final monolith
#

Can someone explain me the basic concept of changing a nametag with NMS packets and scoreboard?

#

just the basic, so i could done it with a way to follow

river oracle
#

check what they do

remote swallow
river oracle
#

i believe it has a full set of IDE features

#

they have an IJ plugin

final monolith
#

i have a base, but i wanna get what exactly i was supposed to do

remote swallow
final monolith
#

I need to create a new EntityPlayer with the same UUID of the player, with scoreboard prefixes?

#

Spawn it using PlayerInfo? or with NamedEntitySpawn too?

#

thats what i'm trying to mean

river oracle
#

idk a ton about scoreboards which is why I sent you that API that's a really well executed one with packets

final monolith
#

don't wanna an external API

river oracle
#

look at their code?

#

i'm not telling you to use it

#

I'm saying look how this API does it because they executed their API very well

final monolith
#

I know how to create the prefixes, the packets, etc...

#

the scoreboards

inner mulch
#

?paste

undone axleBOT
final monolith
#

i just need to know which steps i need to follow

  • Remove the player with REMOVE_PLAYER from the PlayerInfoPacket
  • Create a new EntityPlayer with same UUID of the player
  • Spawn this new EntityPlayer with ADD_PLAYER info packet
  • Add name and tags with NMS scoreboard and send the packets

??

inner mulch
final monolith
river oracle
#

also what about it doesn't work

inner mulch
#

one works but the other one is not

river oracle
#

error?

inner mulch
#

even though they seem the same

final monolith
#

private Map<Material, Double> xpValues = new HashMap<>();

#

you are creating a new variable

#

at ForagingSet

#

class

#

why just not extends SkillSetBuilder

#

?

river oracle
inner mulch
final monolith
#

Set() -> set()

inner mulch
#

why small?

final monolith
#

it's the java pattern for methods

inner mulch
#

ok

final monolith
#

ClassName
methodName
fieldName

remote swallow
#

Classes are UpperCamelCase, methods and fields are lowerCamelCase

inner mulch
#

so, the problem with the two being, is that in the lower oen the set is empty

#

in the upper one, the set is like it should be

river oracle
#

why are we just ignoring the set method is aboslutely useless and shouldn't exist

#

ofc its empty are you even calling the Set method

inner mulch
#

yes im calling it in a blockbreakevent

river oracle
#

its crappy design just put it in the Constructor

#

why are you calling it every BlockBreakEvent

#

that's terrible overhead that's not needed

inner mulch
#

how should i know when the block is in the set if i dont call it ???

river oracle
#

you don't need to fill the map literally every single block break is my point

#

why would you ever ever ever do that

#
@Override
public void Set() {
    xpValues.put(Material.OAK_LOG, 3.0);
    xpValues.put(Material.BIRCH_LOG, 3.0);
    xpValues.put(Material.SPRUCE_LOG, 3.0);
    xpValues.put(Material.DARK_OAK_LOG, 2.5);
    xpValues.put(Material.JUNGLE_LOG, 2.0);
    xpValues.put(Material.ACACIA_LOG, 3.0);
    xpValues.put(Material.MANGROVE_LOG, 5.0);
    xpValues.put(Material.CHERRY_LOG, 5.0);
    xpValues.put(Material.CRIMSON_STEM, 4.0);
    xpValues.put(Material.WARPED_STEM, 4.0);
}

this method just plain sucks it provides 0 value and a lot of confusion

#

move these put calls into a constructor

inner mulch
#

wdym constuctor

river oracle
#

?learnjava

undone axleBOT
inner mulch
#

no

inner mulch
#

i dont know why there should be a constructor

river oracle
inner mulch
#

no

river oracle
#

you're refusing to learn I'm done helping

#

simple as that

inner mulch
#

thats not even the problem

#

i asked why the set is empty

#

not why its poor design

remote swallow
#

im gonna guess ur Set method is never called

river oracle
#

which is just a bad copy of what a constructor should do

inner mulch
#

i define the materials in the hashmap and then create a set through hashmap.keyset?

#

it worked before, but once i made an abstract class it didnt work anymore

quiet ice
#

Do you know what abstract does?

inner mulch
#

its something like a building plan for classes

#

for similar classes

quiet ice
#

Yeah...

#

Then remove abstract. It makes the class not instantiable

#

As in to get instances of the class you need to extend the class - or more specifically all instances of the abstract class are direct instances of another class unrelated to the abstracts class' hierarchy.

smoky oak
#

you dont need a class to be instantiable to extend it? wym geol?

stuck imp
#

Hello, I would like to create a spigot plugin but I have a lot of trouble. To start, what is the best software to make your plugin? Do you absolutely have to use Maven? If yes, why ?

inner mulch
distant wave
#

im remaking a plugin which uses databases for saving player data, i need to store an array of itemstacks, how would you recommend me to do it?

inner mulch
#

if so, i would use maven and intelliJ

smoky oak
quiet ice
stuck imp
#

I also have a problem, I don't understand why when I import a spigot library (server version), I don't have access when I create a class to "Java Plugin" (the essential class to create a plugin)

tender shard
inner mulch
#

maven + intelliJ is the best combo

#

believe me

distant wave
livid dove
# inner mulch wdym constuctor

Okay so long story short the biggest benefit of java, and indeed why ive pushed you towards abstract classes, is that it is object orientated.

What Y2K is trying to explain is that Java is a lot like telling a story.

"Once upon a time there was a prince, who wore a yellow crown, blue robes and a nice pair of shoes. The prince (who wore a yellow crown , blue robes and a nice pair of shoes) lived in a castle that had white bricks and a moat. When the prince (who wore a yellow crown , blue robes and a nice pair of shoes) walked around his castle* (Which had white bricks and a moat)** they realized there was a stray cat **with orange fur *walking around. The prince (who wore a yellow crown , blue robes and a nice pair of shoes) chased the cat (who had orange fur) around his castle (Which had white bricks and a moat) all day long"

*"Once upon a time there was a prince, who wore a yellow crown, blue robes and a nice pair of shoes. The prince lived in a castle that had white bricks and a moat. When the prince walked around his castle, they realized there was a stray cat **with orange fur *walking around. The prince chased the cat around his castle all day long"

One of those stories is a lot easier to read than the other.

The reason?
Context

Once the things (the king, the castle, the cat) had been defined in context, there is 0 need to write all their details out again.

I imagine the reason Y2K has pushed so hard in terms of constructors and good practice is simply this: You are missing out on the greatest strength of the language you are trying to learn.

Its like having bread without butter.

Its like having fish without chips.

Bangers without mash.

Java allows you define "objects". This is what, in most cases, a class should actually be.

E.g:

Lets say you made a "King" class. You could give it 2 fields like this:

public class King {
    private String name;
    private String robeColor;
    private boolean hasNiceShoes;

    public King(String name, String robeColor, boolean hasNiceShoes) {
        this.name = name;
        this.robeColor = robeColor;
        this.hasNiceShoes = hasNiceShoes;
    }

    public String getName() {
        return name;
    }

    public String getRobeColor() {
        return robeColor;
    }

    public boolean hasNiceShoes() {
        return hasNiceShoes;
    }
    // You can add other methods and behaviors here if needed.
}```

I can then call this class like this:

```java
public class Main {
    public static void main(String[] args) {
        King king1 = new King("King Arthur", "purple", true);
        King king2 = new King("King Richard", "gold", false);

        if(king1.hasNiceShoes){
           System.out.println("The first king has nice shoes")
        }

    }
}

The trick is that code is now tiny. Its because king1 has been defined as an object.

Now imagine if i had to redefine what the king was every time i wanted to use it.

But lets say now you wanted a queen too... well a queen has robes, a name, nice shoes etc.

So now we would need to make a whole new class for queen! Waste of time and lots of code not needed.

So instead we could use an Abstract to make a "Monarch". And then have a king and queen class that extends monarch.

Part 2 incoming

smoky oak
#

i mean technically not, but it basically is

#

?pasate

tender shard
smoky oak
#

?paste

undone axleBOT
distant wave
#

bruh

quiet ice
#

You can use Gradle or manually fetch the dependcy from spigots maven lib

warm mica
#

Everyone who says maven is shit either hasn't worked with it or doesn't understand how it works

stuck imp
#

Intellij + Maven, and not Visual Studio Code + Maven? Because I code in python with it and I think it's great, but I'll listen to you ok ^^

quiet ice
tender shard
distant wave
smoky oak
#

uh minecraft plugins are java

#

im not sure you can compile python to spigot

quiet ice
distant wave
#

why the fuck would you use VSC

tender shard
smoky oak
#

it opens faster

quiet ice
#

I haven't seen the appeal yet

tender shard
#

however IntelliJ is probably much easier and doesn't require 100 plugins to make it work

#

in IntelliJ everything just works out of the box

smoky oak
#

mostly

#

you need to run buildtools once

#

but thats it

distant wave
stuck imp
#

I download IntelliJ, i watch so many tutorials but most of them are not updated ...

livid dove
# livid dove Okay so long story short the biggest benefit of java, and indeed why ive pushed ...
abstract class Monarch {
    private String name;
    private String robeColor;
    private boolean hasNiceShoes;

    public Monarch(String name, String robeColor, boolean hasNiceShoes) {
        this.name = name;
        this.robeColor = robeColor;
        this.hasNiceShoes = hasNiceShoes;
    }

    public String getName() {
        return name;
    }

    public String getRobeColor() {
        return robeColor;
    }

    public boolean hasNiceShoes() {
        return hasNiceShoes;
    }
    // Abstract method to be implemented by subclasses
    public abstract String getTitle();
}```

Now you have made a monarch abstract, look how tiny we can make king and queen! 

```java
class King extends Monarch {
    public King(String name, String robeColor, boolean hasNiceShoes) {
        super(name, robeColor, hasNiceShoes);
    }

    @Override
    public String getTitle() {
        return "King";
    }
}

class Queen extends Monarch {
    public Queen(String name, String robeColor, boolean hasNiceShoes) {
        super(name, robeColor, hasNiceShoes);
    }

    @Override
    public String getTitle() {
        return "Queen";
    }
}

So the reason everyone @inner mulch is ragging on at you isnt to be mean or push you to learn the new stuff. its because you are on the cusp of learning the greatest part of Java, and it'd help you a tonne! 😄

#

?paste

undone axleBOT
livid dove
#

before someone else does 😉

smoky oak
tender shard
livid dove
stuck imp
inner mulch
quiet ice
#

I don't think there is much use in overwhelming beginners with this BS

smoky oak
#

@stuck imp ur blocking DMS

quiet ice
#

Sadly I am on mobile so typing speed is massively reduced for me

livid dove
#

Object Orientated programming is a headache when you first start

#

but moment it clicks

paper cosmos
#

b.isPreferredTool(new ItemStack(Material.IRON_SHOVEL)) && !p.getInventory().getItemInMainHand().getType().toString().endsWith("SHOVEL")

why it gives true when I dig a grass block with a shovel?

livid dove
livid dove
# inner mulch i will try to rewrite the code, thank you for the explanation

Before you write anymore code i'd legit suggest watching this fully through (it has twists and turns and realisations that even I didnt realise until a few weeks into Java development https://youtu.be/drQK8ciCAjY?list=PLkeaG1zpPTHiMjczpmZ6ALd46VjjiQJ_8)

Learn all the essential basics of Java in one video in just 15 minutes. No programming experience required.
Complete Java Course: https://codingwithjohn.thinkific.com/courses/java-for-beginners

Variables, loops, methods, classes, objects, and more!

This is a Java beginner's lesson for the ultimate Java beginner, or just someone curious to know...

▶ Play video
tender shard
inner mulch
#

?paste

undone axleBOT
stuck flax
#

would using /summon trigger a spawn entity packet being sent?

warm mica
#

No, but the existence of the new entity would

stuck flax
#

how would you create a new entity?

remote swallow
#

World.spawn

quiet ice
#

You preferably use the shaded ones

quiet ice
# livid dove I beg your pardon?

Maven is superfluous overhead when beginning to learn a programming language. Even more so if one already is comfortable with an IDE like VSC there is little reason to make them switch

#

Maven is useful, but only once you have already nailed down the essentials

buoyant viper
#

just git gud

smoky oak
#

tbh if you explain it as 'copy this into that file and replace those two spots with your project name and minecraft version' its not that difficult lol

remote swallow
#

i saw some gluten free breaded chicken schnitzels in costco earlier

warm mica
smoky oak
#

NO

#

trust me you DO NOT want to add dependencies

warm mica
#

Especially as most beginner tutorials dont begin with maven, making it even more confusing

smoky oak
#

it will not work

#

i did maven specifically because dependencies were absolutely fucked for me

warm mica
smoky oak
#

i did

quiet ice
#

Hence I did the resolution for you by providing the direct link

smoky oak
#

i added the spigot dependency jar from the thing geol linked

#

no matter what i did it refused to recognize it

#

so eventually i said fuck it and just ran buildtools and cleaned out the project

warm mica
#

You can't add the spigot.jar that is your server jar with the newer versions, as the classes are packaged within other files within the jar, hence your IDE won't find it. You'd have to specifically import the Spigot API

quiet ice
#

Okay I think I know the problem

#

But I cannot be sure given that I am on mobile

smoky oak
#

i know that, and i did use the api

quiet ice
#

(you can check for yourself by checking for module-info.class files)

#

If those exist I'll have a stroke

smoky oak
#

i mean i have since switched computers and not used anything but maven

#

if i find my old drive sure

quiet ice
#

Because apparently everyone is too incompetent to shade stuff

warm mica
remote swallow
#

i used maven for 1 project then swapped to gradle

quiet ice
#

Meanwhile I used Gradle for 1 project and switched to maven lil

#

Although before I always used JDT

tender shard
#

I used both and maven is a lot more comfortable imho

smoky oak
#

im too lazy to learn gradle

rotund ravine
#

Gradle is comfortable when you have spend hours getting to know the annoying shit

#

It can be used pretty freely without though

buoyant viper
#

i used to just use the IDEs artifact builder

stuck imp
buoyant viper
#

but then i started actually needing dependencies

stuck imp
#

Ah i can't pos timage

#

wait

rotund ravine
tender shard
#

!img

#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

buoyant viper
#

used Gradle at first but debugging with it took foorrreeevvvveerrrr

stuck imp
buoyant viper
#

switched to Maven and never looked back

tender shard
buoyant viper
#

jk i actually just stopped having workflows that benefit from gradle over maven

tender shard
#

@stuck imp

stuck imp
#

How i reload Maven project ? Yeah didn't saw this step

tender shard
#

just continue reading...

#

there is a huge screenshot telling you how to reload maven

quaint mantle
#

am i stupid or is minecraft stupid

stuck imp
#

Ph

#

Oh*

tender shard
#

Just click on Maven in the top right corner, and then hit the Reload All Maven Projects button.

stuck imp
#

That was small icon but work

kind hatch
tender shard
#

it says "maven tab in the top right corner" and then shows a screenshot of th ebutton

remote swallow
buoyant viper
#

round it off or somethin

tender shard
stuck imp
#

In this part, i don't understand : The most important part in your plugin.yml is the main part. It tells Spigot where the Main class of your plugin is located. The most commonly used convention for choosing the name of your Main class is this:

<yourGroupId>.<yourPluginNameInLowerCase>.<YourPluginName>
tender shard
#

again, my suggestion is that you keep reading the next sentence

stuck imp
#

!img

kind hatch
#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

tender shard
stuck imp
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

stuck imp
#

!verify XDorgLuck

undone axleBOT
#

A private message has been sent to your SpigotMC.org account for verification!

stuck imp
kind hatch
#

Your main path should be org.xdorg.Main

tender shard
#

you seem to have problems in reading the post sentence for sentence, and following its precise and clear instructions

kind hatch
#

main in the plugin.yml refers to the path to your main class.

stuck imp
#

I'm not English and sometimes it's not detailed enough, I'm a complete beginner in java even though I know how to code in python

echo basalt
#

The post is aimed at beginners and uses simple language

stuck imp
tender shard
#

your main class should be called org.xdorg.partnership.Partnership

#

and the "main: " part in plugin.yml should have the same value

kind hatch
tender shard
stuck imp
#

So, what do i use ? org.xdorg.partnership.Partnership or org.xdorg.Main on plugin.yml ?

tender shard
#

you use org.xdorg.partnership.Partnership

#

both for your main class

stuck imp
#

alright

tender shard
#

and also for the "main" value in plugin.yml

remote swallow
#

you will need to refractor tho

stuck imp
tender shard
remote swallow
#

renaming stuff

#

you current have org.xdorg

#

you need org.xdorg.partnership

stuck imp
#

ok it's good

#

I have not finish, but i continue reading the tutorial, thanks ^^

remote swallow
#

thats just an exaple

#

example

#

its only getLogger().info("Partership of XDorgLuckUniverse Load");

stuck imp
#

Ohhh i understand, i shouldn't mark the msg in the line of code, right?

remote swallow
#

no

stuck imp
#

So how do you fix it ?

buoyant viper
#

bro what the fuck is zupimages expandssia

tender shard
#

I mean, it's pretty obvious, I included the copy/pastable source code literally in the post

remote swallow
#

that msg: is just a popup from the ide

stuck imp
#

Ok :), thanks for the info

vital ridge
#

?nms

stuck imp
#

There is any other tutorials for create commands, and give stuff (like armor) ?

simple schooner
#

💀

smoky oak
#

whats that in $

simple schooner
#

200$ monthly

smoky oak
#

bruh

simple schooner
#

💀

remote swallow
#

@sterile axle how much would you make

simple schooner
#

I'm gonna migrate

smoky oak
#

go to europe

#

healthcare in us is shit

river oracle
#

go to US software devs get payed the most here :P

simple schooner
smoky oak
#

well thats true but i would rather have a eh salary than sit on half a million in medical fees

river oracle
#

or bad insurance that's when that would happen

smoky oak
#

insurance in us doesnt work like you think it does

river oracle
#

I suppose I've never been in a severe enough medical situation to test out my insurance properly lol

remote swallow
#

go jump onto a car from 2nd floor

simple schooner
#

Good enough

remote swallow
#

you can most likely get more if you expand ur skillset

#

eg more than just java and lua

river oracle
simple schooner
#

Mhm

remote swallow
#

webdev stuff is normally useful, or some scripting lang

river oracle
smoky oak
#

well a computer scientist is something different than a bachlors degree

remote swallow
#

but mainly c or its children or anything sim

simple schooner
river oracle
#

oh true I didn't see the scientist part lol

tacit drift
#

that's a 3 year university

simple schooner
#

Its 4 years here

river oracle
#

software engineering is still only 54,705k a year

#

which isn't great

tacit drift
#

"only"

river oracle
#

maybe good for an internship

tacit drift
#

💀

river oracle
#

i mean if you go to be a teacher 54k a year is a ton

simple schooner
#

Man I hate how I spawned in a 3rd world country

tacit drift
#

in a lot of european countries, computer engineers and computer scientists are treated the same

remote swallow
#

who said you need a degree to get hired at hypixel

onyx fjord
#

for any money

remote swallow
#

or anywhere technically

hazy parrot
#

I just got denied for Microsoft dev center lol

onyx fjord
#

whats that

remote swallow
#

if you know enough i doubt some people would even care to hire you, you know more than they need

hazy parrot
wide coyote
#

hey, I am trying to get player's client version through protocollib but couldn't make it work properly for some reason, any idea why? (I have viaversion installed in spigot but trying to make it work even when viaversion is installed on proxy)

int version = ProtocolLibrary.getProtocolManager().getProtocolVersion(event.getPlayer());
```for some reason this returns the server's version and not client's version
any ideas?
onyx fjord
hazy parrot
#

Job

#

?

onyx fjord
#

thats why

#

maybe

river oracle
#

wtf just like none of my commits signed last night

#

so weird

wide coyote
smoky oak
#

actually how the fuck does one work as a freelancer

#

i looked around out of curiosity and couldnt find squat

chrome beacon
#

You'd usually have some company help you find work as far as I know

upbeat rampart
#

hi guy who know how to delete my resources?

river oracle
tender shard
upbeat rampart
upbeat rampart
tender shard
#

what?

remote swallow
#

you have to wait for it to be read

stuck flax
#

What packet does /summon send

lost matrix
tender shard
#

like any other command too

stuck flax
#

not the command

tender shard
#

ClientboundAddEntityPacket

#

like any other entity spawn too

lost matrix
#

ClientboundAddEntityPacket
ClientboundSetEntityDataPacket

#

Those two

stuck flax
#

Ty

lost matrix
#

Huh?

tender shard
#

they said thank you

stuck flax
#

Thank you

lost matrix
#

I got that. I was just buffled that this was his question.

tacit drift
#

i would like to add that, i wasn't serious

quaint mantle
#
    @EventHandler
    public void onJoin(LoginEvent e) throws SQLException {
        DatabaseSettings databaseSettings = new DatabaseSettings();
        FriendSettings playerInfo = databaseSettings.findPlayerByUUID(e.getConnection().getUniqueId().toString());

        if (playerInfo == null) {
            playerInfo = new FriendSettings(e.getConnection().getUniqueId().toString(), 0, e.getConnection().getName());
            databaseSettings.createPlayerStats(playerInfo);
        }
        else {
            playerInfo.setFriendrequests("online");
            databaseSettings.updatePlayerStats(playerInfo);
        }
    }``` someone have any idea for that ?
#

why login event not working ?