#help-development

1 messages · Page 210 of 1

round finch
#

😅

#

i know i should know more of it

#

but i mostly just liked doing some basic coding

fluid river
#

anyways lists(array or linked) are mostly enough for your purposes

#

same as HashMap

round finch
#

could be fun!

#

to learn the more technical side to things

fluid river
#

alr homework

#

write own array realization on c

round finch
#

computer science 😵‍💫

#

is rust good?

fluid river
#

yes

#

but it has no gc same as c++

round finch
tardy delta
#

rust if painful when you see lifetimes

#

reason i quit

round finch
#

i wanna improve as a self-learning hobby "programmer" or what you say

fluid river
#

gc

round finch
#

just systems speaks to me

fluid river
#

jvm program

round finch
#

I'm crippling autism

fluid river
#

loops through memory parts and erases everything which has no pointers

round finch
fluid river
#

basically works by itself

#

but can be called with System.gc()

sterile token
#

🤡

fluid river
#

i told you

#

your list is null

sterile token
#

HJMN

#

No bruh

fluid river
#

ABCD

#

?

sterile token
#
{
  "_id": ObjectId("63655dee415c19460105e4d8"), 
  "name" : "test", 
  "cuboid" : { 
    "x1" : 0, 
    "y1" : 0, 
    "z1" : 0, 
    "x2" : 0, 
    "y2" : 0, 
    "z2" : 0 }, 
  "users" : [
    "fe7abd91-bf6d-3e87-b1fd-b1f4156ed180" 
   ] 
}```
#

Where is null?

#

OH SHIT

#

I realize im an idiot

fluid river
#

where you get it

#

there is null

sterile token
#

Im trying to get as uuid

fluid river
#

tho it's users

sterile token
#

Not as "users"

fluid river
#

not uuid

#

yeah

sterile token
#

I just realize

#

My bad

round finch
#

relatable

fallow violet
#

Guys i have a prublem (:

I created a scoreboard, then i set the setting Team#setCanSeeFriendlyInvisibles() to true.
I added the player to the teams with Team#addEntry(Player#GetName())

BUT

i cant see my invisible frienz :< pls help me

https://paste.md-5.net/taveqokuzi.java

#

?paste

undone axleBOT
hasty prawn
#

You have to add your friends to the team as well.

#

Otherwise they're not seen as "Friendly"

fallow violet
#

My Debug: Logger#info(Team#getEntries().toString());

safe hatch
#

Hi, how can you make an enderman aggressive right when it spawns?

fallow violet
fallow violet
fallow violet
dire salmon
#

im having some error when trying to do a gui with command, can i send the error and source code here ?

fallow violet
#

you can send it with

#

?paste

undone axleBOT
fallow violet
#

click on the link, paste your code and send us the link back

dire salmon
#

the error or the code? bc the code is 9 files

fallow violet
#

if you have a photo of your error you can send it here of course

dire salmon
fallow violet
#

some parts of the errors are missing

#

doesnt look right

dire salmon
#

ye wait

hasty prawn
hasty prawn
#

Should be working. Maybe check the vanilla /team command to see if everything is right.

fallow violet
#

idk if its a bug or not

hasty prawn
#

It's not, it's because you're creating the teams on a getNewScoreboard and not getMainScoreboard

#

Maybe see if you change it to getMainScoreboard if it works

fallow violet
#

I WILL TRY OMG THX

#

IT WORKED OMFG

#

i love you @hasty prawn

wind aurora
#

I'm very new to Spigot and Java, could someone help me out with this?
No errors, just doesn't broadcast the "Test" message at all when joining. Not sure what to do.

hasty prawn
#

Did you register the listener

wind aurora
#

yes

hazy parrot
#

Also your plugin is null, you never initialized it

wind aurora
#

How would I do that?

quaint mantle
#

?di

undone axleBOT
hasty prawn
#

Like that ^

quaint mantle
#

pretty much anything you need to make a plugin is written about on the wiki

dire salmon
#

i would say it was something like plugin = this in onEnable but yeh

quaint mantle
#
private final BossFights plugin;

public DamageListenerXP(BossFights plugin) {
    this.plugin = plugin;
}
#

and when you register the listener new DamageListenerXP(this)

#

^ has to be in the main class, the one that extends JavaPlugin

wind aurora
#

yeah i got that

#

the private final part?

quaint mantle
#

just good java programming practice

wind aurora
#

just throws an error

quaint mantle
#

?

#

where

hazy parrot
#

If you didn't make constructor yet, it will be red

#

Because final must be initialized in constructir

wind aurora
wind aurora
#

I can't figure out where to put it

hasty prawn
#

In the class

quaint mantle
#

did you not read what i sent

#

?di

undone axleBOT
vivid skiff
#

What is causing this error:

org.bukkit.command.CommandException: Unhandled exception executing command 'company' in plugin CompanyCore v1.0
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[patched_1.12.2.jar:git-Paper-1620]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:152) ~[patched_1.12.2.jar:git-Paper-1620]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:685) ~[patched_1.12.2.jar:git-Paper-1620]
        at net.minecraft.server.v1_12_R1.PlayerConnection.handleCommand(PlayerConnection.java:1492) ~[patched_1.12.2.jar:git-Paper-1620]
        at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1297) ~[patched_1.12.2.jar:git-Paper-1620]
        at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:45) ~[patched_1.12.2.jar:git-Paper-1620]
        at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:5) ~[patched_1.12.2.jar:git-Paper-1620]
        at net.minecraft.server.v1_12_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:14) ~[patched_1.12.2.jar:git-Paper-1620]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) ~[patched_1.12.2.jar:git-Paper-1620]
        at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:850) ~[patched_1.12.2.jar:git-Paper-1620]
        at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:423) ~[patched_1.12.2.jar:git-Paper-1620]
        at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:774) ~[patched_1.12.2.jar:git-Paper-1620]```
#
        at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:666) ~[patched_1.12.2.jar:git-Paper-1620]
        at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.lang.NullPointerException
        at me.companycore.CompanyCore.checkIfCompanyExist(CompanyCore.java:73) ~[?:?]
        at me.companycore.commands.CCGCommands.onCommand(CCGCommands.java:25) ~[?:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[patched_1.12.2.jar:git-Paper-1620]
        ... 15 more```

Here is the line 73

```public boolean checkIfCompanyExist(String companyName) {
        if (getCompanyData().isSet(".Aziende." + companyName)) {
            return true;
        }
        return false;
    }```
hasty prawn
#

checkIfCompanyExists is throwing a NPE

quaint mantle
#

whats on line 73

hasty prawn
#

So getCompanyData() is probs null

quaint mantle
#
return getCompanyData().isSet(".Aziende." + companyName);
wind blaze
#

Does anyone know how to make armor durability way better?

delicate lynx
#

expand on that?

round finch
#

short -32,768 to 32,767

#

idk if spigot has a cap on it

echo granite
#

How can I suggest something to be added to the API?

round finch
#

limt

wind aurora
#

Still can't figure out why this isn't working. No errors, nothing is being broadcasted.

round finch
#

does event trigger?

#

like do the event work you made?

wind aurora
#

it doesn't

#

did i not register it?

round finch
#

you have

#

i saw wrong

#

but did you compile it correctly?

wind blaze
round finch
#

fx a config

wind blaze
#

How tho lol

#

How can I change vanilla dura

round finch
#

you don't

#

it is java

#

type short

#

but you can setDurablity

wind aurora
#

I guess it didn't compile correctly? I just now realized that nothing else is working.

#

I do the same process I did before and it worked fine

round finch
#

what your ide? if it is ecplise i can guide you

#

else idk how to use intilj

wind aurora
#

its intellij

round finch
#

sadly idk the propper way of doing it!

#

@wind blaze

you could just display your custom Durablity

wind blaze
#

Ahhh there has to be a more simple way

round finch
#

Storing Durability
Every time it goes down you go -1

lofty junco
#

hey, does someone know how to get the nearest stronghold location based on the players location?

round finch
#

java short is max at 32,767

wind blaze
#

Bro

#

Then dura will be fucked

#

I want the basic system to work I just want it to lose less in total

#

It is set it to -1 per loss then I can spam click you down to armor break within seconds

#

I wabt basic dura to work just more strong

#

And that’s so god damn difficult for some reason

round finch
#

ye right

#

i meant to take you take the damage

#

attract it

#

in your own custom system

#

either you do this or you change spigotmc code smh more pain and more pain

wind blaze
#

Im too noob to add that custom system. I’ve tried a ton of times and spent hours before. I don’t just come here whenever I want code like Fr

round finch
#

because Minecraft has java short durablity

wind blaze
#

I come here whenever I’m completely lost

#

I tried to make some chance to lose dura at like

round finch
#

Custom System i recommend

wind blaze
#

Hit charge + damage x percentage or smth

#

but it broke too

wind blaze
round finch
#

making one?

#

pay some dev?

#

you're free to ask here

#

about any help

#

?jd

round finch
#

spigot documentation

wind blaze
round finch
#

@wind blaze

wind blaze
#

I know bro I’ve tried for hours

#

It’s not like I came here instantly after wanting to do it as I said

round finch
#

what you need help fixing?

wind blaze
#

I really appreciate your help bro but I already seen all of that

wind blaze
#

But everything always was cheesable or didn’t work in the end

round finch
#

sounds like a developing issue

#

dont give up buddy

fallow violet
#

u got this :>

round finch
#

don't lose hope l_chickheart

wind blaze
#

That’s why I asked

#

Ive seen server w sets tanking s50 for hours

#

Or s30 I forgot

round finch
#

my suggestion was to

Store Costume number in a Config and then attrach
getDamage()

hoary wing
#

how do i make a daya.yml? playerlisteners

round finch
#

if it goes below short max then setDurablity

smoky widget
#

Why I have a ClassNotFoundException with a maven dependency when I did everything right in the pom.xml I put in shaded and everything

round finch
#

or Display damage

wind blaze
round finch
#

same input sure..!

#

it takes the incomming damage

#

on the item

wind blaze
#

My system was: get a random then do „if random <= damagerhitcd*% u want“

#

But that was weird too

round finch
#

do you want to make it less chance for breaking?

#

with random?

wind blaze
#

Well yeah the armor has to have less chance to break I want it be tanky so sharpness 30 works against it etc Yk

round finch
#

so certein items have more chance..

#

to do more damage?

#

Damager Item and Damaged Item?

#

ah

#

why not make it do less damage then

#

exactly

#

it bascially minecraft damage

#

denying minecraft itself

#

you can't blindly guess a non incoming damage source

#

pain

#

similer to how do i connect to facebook without wifi?

#

exactly

#

more perfect phrase

#

the person needs to take the input people are saying

#

or it won't go anywhere

little panther
#

hello, is there an event to check if an entity gets angered at player?

eternal oxide
#

I think there is a target event

#

?jd-s and search target

undone axleBOT
mighty pier
#
  arena:
    permission: box.arena
    permission-message: §cYou cannot do that.
    usage: 
      - "§c/arena pos1-2"
      - "§c/arena create <name> <resetseconds>"
      - "§c/arena remove <name>"``` good?
#

thats how i add lines to usage yes

sterile token
#

LMAO i received a comission from a client, which his project/custom plugin done by another developer is like 5gb weight

hazy parrot
#

I assume 5gb jar file

quaint mantle
#

includes every spigot jar to ever be compiled

tranquil viper
#

Anyone know the "event" that is fired through the tebex api when someone makes a purchase?

boreal python
#

How can I set an items durability using ItemMeta? I'm having trouble figuring it out.

#

(specifically I want to subtract one from its durability every time the event is called)

round finch
#

@boreal python
you get ItemMeta From the Item

set the ItemMeta on the Item done

#

this

#
ItemMeta ItemMeta = Youritem...getItemMeta();

ItemMeta.setDurability

Youritem.setItemMeta(ItemMeta);
keen basin
#

Guys why when i use Block Action packets to send open Chest Animation its work fine but close Animation don't work There is no errors ):
using (ProtocolLib)

undone axleBOT
mighty pier
#
    protected void addArena(Arena arena) {
        arenaList.add(arena);
        try (PreparedStatement ps = c.prepareStatement("INSERT INTO arenas VALUES (?, ?, ?, ?, ?);")) {
            ps.setString(1, arena.getName());
            ps.setString(2, arena.getWorld().toString());
            ps.setString(3, arena.getCube().toString());
            ps.setString(4, arena.getMaterial().toString());
            ps.setInt(5, arena.getSeconds());
            ps.executeQuery();
        } catch (SQLException e){
            Bukkit.getLogger().info(e.getClass().getName() + ": " + e.getMessage());
        }
    }``` error: `java.sql.SQLException: Query does not return results`
chrome beacon
mighty pier
#

ok

#

bruh i should have googled first

#

just found the anwser

round finch
#

magic

chrome beacon
#

Also what's the point of casting an int to a byte and then back to an int again

#

also also you should stop that static abuse

keen basin
keen basin
chrome beacon
#

What's 54 in this packet?

keen basin
chrome beacon
#

Number ids aren't used anymore

round finch
#

what recommend for sql software for developement on private desktop?

keen basin
chrome beacon
#

So I believe you're sending it as the action param

#

Which is the amount of viewers

#

You're telling it that there's always 54 viewers in the chest

chrome beacon
keen basin
chrome beacon
#

Again Minecraft doesn't use item ids anymore

smoky widget
#

there is a way to create a skull with custom texture more easier and faster than gameprofile etc ?

eternal oxide
#

no

smoky widget
#

okay

eternal oxide
#

textures lookups come from Microsoft/Mojang

chrome beacon
#

Spigot has Player Profile API

#

That's easier than NMS

keen basin
eternal oxide
#

He said "faster"

chrome beacon
#

Depends on what "faster" means

#

Faster to write or faster to run

smoky widget
#

run

eternal oxide
#

I assume he's annoyed by the couple of seconds to lookup the texture

smoky widget
#

and write

chrome beacon
eternal oxide
#

yes

#

link sent from server, client requests texture from MS>

chrome beacon
#

Yeah

eternal oxide
#

are you trying to do an animated skull texture or something?

smoky widget
#

no

#

I will just make a function to create the heads it will be easier

round finch
vocal cloud
#

I just install SQL server onto my computer

#

OracleSQL is cancer

round finch
#

really ?MRVN_Sad

#

why?

#

quick study

boreal python
round finch
#

oh no

boreal python
#

ik

#

Im crying too. My condolences

round finch
#

you could specify that in the check

raw prairie
#

how might I set explosive damage to certain players or groups

#

from a certain weapon

#

for example I explode tnt

#

but it doesn't damage you, or your teammates

#

but only the other team

wind aurora
#

This displays your health with a .0 at the end of your health value. How could I get rid of that?

tall dragon
wind aurora
tall dragon
#

umm yes

#

as i said?

raw prairie
#

can ya help me with smth?

tall dragon
#

ask away

drowsy helm
sterile token
undone axleBOT
#

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

raw prairie
#

how might I set explosive damage to certain players or groups
from a certain weapon
for example I explode tnt
but it doesn't damage you, or your teammates
but only the other team

#

@tall dragon

sterile token
raw prairie
#

he said ask away

sterile token
#

Oh my bad

raw prairie
sterile token
#

I dont really know sorry tho

raw prairie
sterile token
#

I was going to tell him to use PDC but i wasnt sure if tnt allow it

raw prairie
#

nah

#

could I have a code exampel?

#

didnt understand that

sterile token
#

?pdc

raw prairie
#

the pdc part

grave plover
sterile token
#

@echo basalt how was named the thread we were talking? Weeks/months ago - About menus/inventories

fluid river
#

i wanna teach somebody

#

anything

subtle folio
#

How do I set how fast an arrow flies from #launchProjectile?

vital sandal
#

i get why pp use remapped for 1.17+ 🙂

dapper sapphire
#

Why does this keep erroring?

                                    if (shopData.get("general.npcIdentifier") instanceof Integer) {
                                        npc = CitizensAPI.getNPCRegistry().getById((Integer) shopData.get("general.npcIdentifier"));
                                    } else  if (args.length >= 2) {
                                            npc = CitizensAPI.getNPCRegistry().createNPC(EntityType.PLAYER, args[2]);
                                    } else {
                                            ErrorHandler.npcMissing(player, "shops." + args[1] + ".yml");
                                    }
#

java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 2

#

Its making me feel rlly stupid lmao

eternal oxide
#

array index start at 0

dapper sapphire
eternal oxide
#

length 2 = array[0] and array[1]

dapper sapphire
#

/mp setNpc <region <npc name>

#

Ohh

#

thats weird

#

ty

eternal oxide
#

gets everyone at the start

dapper sapphire
dim palm
quaint mantle
#

Help: Falling blocks(chest) doesn't appear in my eye
If I see it transform into a block when it falls on the floor, it is true that a falling block has been spawned, but the falling block is not visible to me.

#

this is my code

#
    @EventHandler
    public void onDrop(PlayerDropItemEvent event) {
        new BukkitRunnable() {
            public void run() {
                item.getWorld().spawnFallingBlock(item.getLocation().add(0, 2, 0), Material.CHEST.createBlockData());
                item.remove();
            }
        }.runTaskLater(Main.getInstance(), 10);
    }
gritty brook
#

how can I create a sign gui to get player's input

gritty brook
#
    public void onDrop(PlayerDropItemEvent event) {
       item.getWorld().spawnFallingBlock(item.getLocation().add(0, 2, 0), Material.CHEST.createBlockData());
        new BukkitRunnable() {
            public void run() {
                item.remove();
            }
        }.runTaskLater(Main.getInstance(), 10);
    }```
#

Sign Gui

fading hamlet
#

Error: Could not find or load main class net.md_5.specialsource.SpecialSource

Has any one found a fix for this?

drowsy helm
#

and in what context

fading hamlet
#
java -cp C:/users/jeremy/.m2/repository/net/md-5/SpecialSource/1.11.0/SpecialSource-1.11.0-shaded.jar:C:/users/jeremy/.m2/repository/org/spigotmc/spigot/1.18-R0.1-SNAPSHOT/spigot-1.18-R0.1-SNAPSHOT-remapped-mojang.jar net.md_5.specialsource.SpecialSource --live -i testmobs2.jar -o testmobs2-obf.jar -m C:/users/jeremy/.m2/repository/org/spigotmc/minecraft-server/1.18-R0.1-SNAPSHOT/minecraft-server-1.18-R0.1-SNAPSHOT-maps-mojang.txt --reverse```
#

ran in powershell cmd and git bash same result

drowsy helm
#

are you using maven?

fading hamlet
#

I am

drowsy helm
#

show your pom then

#

you shouldnt need ot run any java cmds

fading hamlet
#

I don't use md5's plugin

#

the one time i did it asked me to use sdk of 1.5... I run 17

drowsy helm
#

huh

#

it works fine on 17

fading hamlet
#

There is always a chance I set up the pom wrong

drowsy helm
#

show it bruh

fading hamlet
#

dont have a current pom with the plugin

#

give me a minute

#

the porn you requested

topaz cape
#

does anybody know how to get a DimensionType off of a ServerLevel? (nms with Mojang mappings)

eternal oxide
#

nmsLevel.dimensionTypeId()

quaint mantle
quaint mantle
fading hamlet
#

(I no longer need help)

analog fractal
vivid skiff
#

How can i check if a argument of a command equals to a string in a yaml file?

for example

Clans:
TestClan: <- This should be the argument
Leader: UserUUID

remote swallow
#

if (arg[1].equals(config.get("path")

vivid skiff
#

I already tried it

remote swallow
#

are you using the correct arg number

#

starts at 0

earnest forum
#

that wont work

remote swallow
#

you just made my brain realise it wont lol

earnest forum
#

u should check if the configuration section contains the path

tall dragon
#

can't u just check if the file contains the path?

earnest forum
#

yes

#

and then you can call get() on it

#

?jd-s

undone axleBOT
earnest forum
#
if (config.contains(arg[1])){
  ConfigurationSection section = config.getConfigurationSection(arg[1]);
  //get ur data
}
kindred valley
#

Hello elgar

fallow violet
#

how can i remove this little icon that tells me that i edited the message?

eternal night
#

you'd have to use the preview to edit the message

fallow violet
#

what is a preview

eternal night
fallow violet
#

did i miss somethnig

eternal night
#

presumably

#

allows servers to modify a message without breaking signatures

fallow violet
#

why is it deprecated

eternal night
#

that is spigots fun way of saying "this is draft API and might change"

fallow violet
#

xd

kind hatch
#

Snapshot 22w42a actually removed chat preview altogether, so who knows if it'll actually come back in later snapshots.

fallow violet
#

bruh

#

but microsoft is trash they actually made a report function, like wtf?

kind hatch
#

True, but they also made some decent changes to the chat system over these last three snapshots.

eternal night
#

true that

#

tho not much to say before 1.19.3 releases

fallow violet
#

microsofts brain in a nutshell: 🗑️

next plume
fallow violet
#

what is that lol

kind hatch
#

Or you can wait for 1.20. lol

fallow violet
next plume
#

It works great.

fallow violet
#

i think i will program it myself but great idea

next plume
#

If you don't do it right, you'll break your chat plugin.

fallow violet
#

i take the risk because i program everything by myself

eternal night
next plume
#

FreedomChat reconstructs player chat as if it were coming from the server itself, which is never signed

kind hatch
# eternal night that would be in 1.19.3 iirc

Idk, they've been going back and forth about what features are going to come in what version, so I'm still assuming that everything will come in 1.20 and they will do more minor revisions like they said.

fallow violet
#

this feels illegal but i do this LMFAO

lusty forum
#

Helmets without armor propeties

eternal night
#

yea their development is a bit of a mess with what is in what version

remote swallow
#

iirc the new blocks, entities and that type of stuff will ship with 1.19.3 in the datapack but will release in 1.20 the rest is all coming in 1.19.3

eternal night
#

Yea that is my current understanding too

#

mostly because all of the network changes are not behind a flag

#

so you cannot really enable/disable them

kind hatch
#

So more or less, early release that can be toggled with datapacks? Kinda like the oldschool hidden textures or the bundle. (1.17)

remote swallow
#

in the snapshots and 1.19.3 will have a datapack for 1.20 stuff and another datapack for the bundle

eternal night
#

Yea, release 1.19.3 and have camels and signs and shit hidden behind a datapack flag

lusty forum
#

Hey guys! I have a plugin with helmets. but you shouldn't be able to put them on. so no longer have the property of armor. how do I do that?

kind hatch
halcyon mica
#

How do I make a dolphin target a different block as its treasure when giving it a fish?

#

Changing the Treasure Position does not work

onyx fjord
eternal night
#

yes as discussed like five messages above lol

onyx fjord
#

is there a reason why

eternal night
#

Nothing listed in the changelogs

#

presumably rn adoption is just low ( that at least is my take)

#

as the preview system (while powerful) had some drawbacks

onyx fjord
#

nobody rly knows its a thing

#

apart from some devs

eternal night
#

Well, it has its issues in regards to usage

#

1.19.3 looks rather promising

#

as modification seems to be more encouraged

#

(the gui message tag is grey instead of yellow, the icons are not there unless you hover the message)

onyx fjord
#

chat links are also gone

#

rip

eternal night
#

well spigot trashed them in there

onyx fjord
#

why bruh

eternal night
#

because they break signatures ?

onyx fjord
#

ehh

#

gotta reimplement that somehow ig

eternal night
#

I mean yea, you'd have to use preview

#

or you just wait for 1.19.3

onyx fjord
#

i can regex the links and format the message

eternal night
#

actually nah 1.19.3 would not fix that

#

yes

#

which is so trivial, I am surprised there is no plugin for it

onyx fjord
#

there is

eternal night
#

thank god

onyx fjord
#

not popular (150 downloads) but it exists

eternal night
#

who maintains it

onyx fjord
#

idk

#

also idk regex in java rip

eternal night
#

its just regex xD

#

Pattern.compile(regexHere)

#

No Chat Reports apparently reintroduces it

onyx fjord
#

oh?

#

since when

eternal night
onyx fjord
#

oh that one

#

i thought u mean the mod

eternal night
#

it doesn't have a source linked kekw

onyx fjord
#

it is open src tho

eternal night
#

is it ?

onyx fjord
#

yk what else has src linked

#

AntiPopup hehe

eternal night
#

isn't that the project that has emojis in its commit messages ?

onyx fjord
#

i use that to automate releases yes

eternal night
#

lol xD

onyx fjord
#

super handy, i just have to click publish

eternal night
#

seems to not work to well ?

onyx fjord
#

its meant to be like that, i had to publish it because otherwise testers couldnt download

#

there u go fixed XD

rough basin
#

What is it?

eternal night
#

blocks your ray should pass through

earnest forum
#

like liquids

eternal night
#

or glass if you wanna ignore glass blocks for example

rough basin
#

oh i was thought reverse

#

Thanks

heady spruce
#

Weird Bug when adding Points to a player

grim ice
#

its funny how

#

26 humans

#

own half of the human population's networth

molten hearth
#

anyone know if protocollib supports listening to any packet sent

#

without specifying PacketType nothin happpens

echo basalt
#

you can just specify all packets

molten hearth
#

bruh

#

I dont want to make an array containing all packets existing in minecraft

echo basalt
#

PacketType.values();

raw prairie
#

how might I cancel knockback for the player who swung the axe to create the explosion? Also cancel damage for the player and his team

lofty junco
#

hello does anyone know how to get the nearest stronghold pased on players location

sacred mountain
#

ﻣॢ뤧馰

#

oops

sacred mountain
kindred valley
#

Do you guys know how to handle big threads

mighty pier
#

does anyone know a scoreboard library for 1.19?

mighty pier
#

just do if () return;

mighty pier
#

when the

tall dragon
#

would anyone here have a suggestion of how i would best find a safe location?, like i have a spawnpoint. buy say that point has been blocked off with blocks. what would be the most efficient way of finding a location as closest as possible to the original point that is safe

sacred mountain
#

remove the blocks

tall dragon
#

thats not an option -,-

sacred mountain
#

or just pick a random location and check until theres a safe onme

tall dragon
#

seems very inefficient

sacred mountain
#

its just respawning

#

ur not running it every tick

opal sluice
#

Hi, how do you guys deal with custom config reloads? I don't want to disable/enable the plugin every time to reload the files :/

sacred mountain
#

set the values in the plugin?

#

have a variable that is assigned to the config path

#

and update that variable with a commando r osmething

tall dragon
sacred mountain
tall dragon
#

that is safe yea

sacred mountain
#

the only way is to iterate through every block around the location like thats the most efficinet ur gonna get it

tall dragon
#

another idea is to just get the top block. but that might bring issues

opal sluice
# sacred mountain set the values in the plugin?

I've made a little map that track the configs, tried to reload the config and update the map, the map does get updated, but if I were to use the map value in a variable, the variable is not getting updated, I though that the variable would point to the references of the map value :/

tall dragon
#

for locations in a cave for example

sacred mountain
#

why is ur spawnpoint in a cave

tall dragon
#

because we have game maps that are caves

#

so spawn points would be in a cave

sacred mountain
#

doesnt the default minecraft respawn stuff have that sorta feature

tall dragon
#

not rlly

#

Essentials does have it

sacred mountain
#

ight

#

just iterate every block thats the only way tbh

tall dragon
#

i guess i could also just go in 4 directions and get the the closest safe point or somethging

#

and if it cannot find just disband the spawn

tall dragon
sacred mountain
#

honestly if the player died in a spot it's extremely likely that spot was air

#

if it wasn't, your server isn't going to combust with a hundred block iterations

tall dragon
#

its just that im working on a "minigame" plugin. and each team has a set of spawns

#

and players could block those off

sacred mountain
#

some of my physics plugins do hundreds of block checks and raycasts per second

#

with negligible performance change

tall dragon
#

yea i will check how performant it is. im very often over optimizing haha

#

im always afraid stuff will lagg like shit

sacred mountain
tall dragon
#

that would be an option as well

sacred mountain
#

it's much simpler. If the other team block off your spawn and you just spawn outside the blockage theres a bit a of a flaw there

#

there would be no gain in doing the blocking in the first place

tall dragon
#

yea might just do that tbh

sacred mountain
#

👍

molten hearth
#

is there any way to register an event within scheduleSyncDelayedTask

sacred mountain
#

why would you want to do that

molten hearth
#

idk because this legay code does it so im doing it too

sacred mountain
#

just have a check in the listener that updates as a variable in your runnable

tardy delta
#

why not runTaskLater

molten hearth
#

idfk

sacred mountain
#

or that

molten hearth
#
Bukkit.getScheduler().scheduleSyncDelayedTask(UltraPrisonCore.getInstance(), new Runnable() {
  public void run() {
    Events.subscribe(PlayerJoinEvent.class)
      .handler(e -> {
        if (UltraPrisonCore.getInstance().getPluginDatabase().getPlayerLanguage(e.getPlayer()) != null) {
          if (!(playerLanguages.containsKey(e.getPlayer())) || !(playerLanguages.get(e.getPlayer()).equals(getPluginDatabase().getPlayerLanguage(e.getPlayer())))) {
            playerLanguages.put(e.getPlayer(), String.valueOf(addonsAPI.getPlayerLanguage(e.getPlayer())));
          }
        }

      }).bindWith(UltraPrisonCore.getInstance());
    return;
  }
}, 0 L);```
dreamy tendon
#

any dev thats wants to make a simple plugin, and il pay for your time?:)

tardy delta
#

brr

molten hearth
#

this is the old code and I need to replace it with @EventListener

undone axleBOT
sacred mountain
#

thats not a bukkit event

molten hearth
#

not sure how to

#

its a bukkit event library

#

im trying to convert it to @EventHandler but idk how

sacred mountain
#

events.subscribe will add the player to that event map i presume

#

the event will only affect players in that map

molten hearth
#

ehm no

sacred mountain
#

when what

molten hearth
#

Events.subscribe is the equivalent of @EventListener

tall dragon
#

prolly just an easy way to listen to events

sacred mountain
#

it's literally running the code immediately i just realised

molten hearth
#

instead of java @EventHandler public void useless(EventType e) its just Events.subscribe(EventType.class)

sacred mountain
#

why is it a delayed task with delay 0

molten hearth
#

yeah idk why its doing that tbh lol

#

oh wait maybe I can just register listeners in there

#

smort

sacred mountain
#

or just register the listener after?

#

getServer().getpluginManager blah blah .registerEvents() after ur code is done

#

the Events.register internal code i'm 80% sure just registers the listener

vivid skiff
#

How can i add permissions to a player?

#

I'm trying with the VaultAPI but it isn't working i don't know why

tacit sierra
#

How would I make a plugin that adds a new placeholder called %player_enderdragon_kills%? I want the placeholder to show how many times a player has killed the ender dragon and I would like to use it with a leaderboard plugin so that it displays the top 10 ender dragon kills for each top player.

vivid skiff
#

perms.playerAdd(newViceDir, "test.permission");

undone axleBOT
vivid skiff
#

public static Permission perms = null;

#

It's in a different class

#

It's VaultAPI

tardy delta
fluid river
tacit sierra
#

How would I make a plugin that adds a new placeholder called %player_enderdragon_kills%? I want the placeholder to show how many times a player has killed the ender dragon and I would like to use it with a leaderboard plugin so that it displays the top 10 ender dragon kills for each top player.

tardy delta
#

nice naming smh

fluid river
tardy delta
#

baeldung looks outdated asf

fluid river
#

and pass saved data for player

#

when requested

#

save to PDC or to config

tardy delta
#

this site seems to fuck with me too

#

ok artifact id is different

#

isnt this the dependency?

tardy delta
#

can anyone help me with the right dependency for mongodb? also when trying to do MongoClients.create("mongodb://localhost:27017") i get some exception which leads to java.net.ConnectException: Connection refused: no further information

mellow pebble
#

hi guys im trying to recreate this and i have made gui but im not sure how to do this when player adds item it changes gui

undone axleBOT
mellow pebble
#

i tried InventoryDragEvent but it doesnt really work as i tought it should

tardy delta
mellow pebble
tardy delta
#

just trying to do some basic stuff

trim lake
tardy delta
#

this tutorial using old stuff too 🥺

remote swallow
trim lake
#

Why Im getting false from this method some time? I run this method in onInventoryClickEvnet after one tick.
prevThiefGUI is inventory saved onOpenInventoryEvent.
inv is event inventory.

        boolean output = false;
        for(int i = 0; i < 36; i++) {
            if ( InventoryEvent.prevThiefGUI.get(player).getItem(i) == null 
                    && inv.getItem(i) == null ) continue;            
            if ( InventoryEvent.prevThiefGUI.get(player).getItem(i) == null) {
                updateThiefedPinv(player, i, inv.getItem(i));
                output = true;
                continue;
            }
            else if ( inv.getItem(i) == null ) {
                updateThiefedPinv(player, i, null);
                output = true;
                continue;
            }
            else if ( !( InventoryEvent.prevThiefGUI.get(player).getItem(i).equals(inv.getItem(i) ) )) {
                updateThiefedPinv(player, i, inv.getItem(i));
                output = true;
                continue;
            }
            if ( InventoryEvent.prevThiefGUI.get(player).getItem(i).equals(inv.getItem(i))) continue;
            return false;
        }
        return output;
    }```
tardy delta
#

saw this so tried this one

#

only getting a timeout exception

#

im wondering why there seem to be two dependencies

tardy delta
#

ok same thing

#

and then timing out :/

dim bronze
#

I think sync is for atlas clusters

#

And the other one is for privately hosted?

tardy delta
#

ig

dim bronze
#

No I’m wrong

#

Sync is for synchronous applications. The other Java driver uses reactive streams. Heard them mentioned before but haven’t looked into them (because kotlin has its own implementation which is better:)))

tardy delta
#

dont really care about the dependency, as long as it works :)

dim bronze
#

Only other thing I can think of is make sure MongoDB is actually running.

#

Only thing that could cause that otherwise is a firewall issue but it’s localhost so that shouldn’t be a problem

tardy delta
#

am i supposed to download smth or what? i see people downloading the jar instead

#

just using maven and not shading or anything

misty current
#

to get entities in a radius, would it be more efficient to get the entities in a chunk and then check the distance between the entity and the starting point compared to using bukkit's method?

tardy delta
#

should i be downloading this or smth?

sterile token
sterile token
#

I had that exception yesterday and was cause because i was using wrong mongo address/mongo ip

tardy delta
#

its not wrong

#

just wondering if i need mongodb server running?

sterile token
#

Yes!

#

How will your plugin connect?

#

😂

tardy delta
#

wdym

sterile token
#

I mean mongo-java-driver cannot connect an offline mongo sever

river oracle
#

^ he's right you can't exactly connect to a non-existant mongo-db

sterile token
#

If that is what u are meaning

tardy delta
#

uh idk i thought that dependency would host the thing itself or smth

#

never used that stuff

river oracle
#

no the driver is just a driver

#

you need the actual db

tardy delta
#

and tuturials arent great either

#

ok

sterile token
#

mongo-java-driver is like mysql

#

Mysql has a connector, but then needs a db server

river oracle
#

💀 sql

sterile token
#

😂

river oracle
#

tread carefully

sterile token
#

sql is a fking mess

tardy delta
#

making a sql library smh

#

well progress kinda stopped

sterile token
#

fourten

#

If you are using a vps: apt install

tardy delta
#

im not

sterile token
#

what OS?

#

I will send u a tutorial

tardy delta
#

windows, found the installer anyways

sterile token
#

ok

#

perfect

tardy delta
torn badge
#

Yeah

sterile token
#

Compass is the mongo recreation of PhpMyAdmin from Mysql

tardy delta
#

idk it asked to install that too and i was silly to opt out

torn badge
#

It’s really nice to have

#

I just thought you only installed compass

sterile token
#

In my case most of that interfaces get broken

torn badge
sterile token
#

I would use just 1 word

#

oh ok

#

I understand im really bad with maths tho

#

Why dont take a look on others plugins, there is no need to reivent the wheel

torn badge
#

Creating and deleting worlds is very resource intensive

torn badge
#

So 1 world/island could be very overkill

sterile token
#

😬

torn badge
#

= continuous lag

#

That doesn’t need a lot of math

tardy delta
#

are you kiddin me

torn badge
#

Leave some space between them

tardy delta
#

got atleast smth different now

#

kinda stupid that there are two dependencies

torn badge
mighty pier
#

hypixel makes custom plugins

tardy delta
sterile token
tardy delta
#

dunno what youre talking about but anyways

#

just forgot smth

sterile token
#

I mean mongo only accept saving string, int, double, boolean, byte (primitive java types)

elfin atlas
#

Is there a way to spawn this head with Spigot plugin?

/setblock ~1 ~ ~ minecraft:player_head[rotation=0]{SkullOwner:{Id:[I;-812178264,1520781489,-2119637620,284666857],Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTcyNmQ5ZDA2MzJlNDBiZGE1YmNmNjU4MzliYTJjYzk4YTg3YmQ2MTljNTNhZGYwMDMxMGQ2ZmM3MWYwNDJiNSJ9fX0="}]}}} replace
```If yes how?
sterile token
elfin atlas
#

Spigot Plugins

sterile token
#

Oh ok

tardy delta
#

makes sense as its just json

sterile token
#

You want to do that with spigot api

sterile token
#

So you cannot save Location obj, etc

elfin atlas
#

To spawn the
Player head from the command

sterile token
#

In my case i use smth like that

tardy delta
#

already regretting the many Document instances smh

#

couldnt they just give it another name

sterile token
#

rename document?

tardy delta
#

that class name just sounds stupid

sterile token
#

Document is not from Mongo tho, its from Bson

tardy delta
#

mye

sterile token
#

Its doesnt sound stupid

#

You because use shity sql

tardy delta
#

document is just a record and collection a table

tardy delta
#

dont dare to call it shitty

sterile token
#

yeah sql is shity

#

once you use mongo, you realize how shity is sql

glossy venture
#

true

sterile token
#

I used to be hours trying to link 2 tables togethers

glossy venture
#

you could also technically make an SQL implementation for mongoDB

#

with some limitations

tardy delta
#

me trying to write a pojo mapper for sql using reflections

#

its a pain in the ass

#

ill probably throw it away smh

sterile token
#

Fourten

#

Mongo also has a POJO system already

tardy delta
#

saw that

sterile token
#

But i never could use them successfully

tardy delta
#

but annotations brrr

#

using acf but sshh

sterile token
#

he?

#

acf is really a mess and has nothing to do with mongo 🤔

tardy delta
#

i was talking bout annotations

sterile token
glossy venture
#
@DB
class Database {
  @Table(type = Amogus.class, name = "amogus")
  Table<Amogus> amoguses;
}

@Row
class Amogus {
  @Column
  String id;
}
``` i want to make smth like this
sterile token
#

for shity sql

river oracle
#

sql isn't that bad, but it definitly isn't the pinicle of human achievement

tardy delta
#

achieved to serialize/ deserialize this using reflections lol

#

🥲

river oracle
#

it is way to rigid imo json datastructure is much more appealing to me

tardy delta
sterile token
#

also they are called "Amongous"

tardy delta
#

ok i broke it

sterile token
#

?paste

undone axleBOT
tardy delta
#

probably cuz i added a try with resources around the client

sterile token
#

MongoClient client = MongoClients.create("Mongo.Uri");
MongoCollection<Document> test = client.getDatabase("test").getCollection("name");

tardy delta
#

ah ye ij being shitty

ivory sleet
tardy delta
#

i dont want to talk about that 🥲

glossy venture
tardy delta
#

^^

#
  • i can only add the stuff i want lol
glossy venture
#

also no struggles with libraries

#

and dependencies

#

yeah

tardy delta
#

you dont want to see my reflections code lol, its a mess

ivory sleet
#

Sure, but its easier and might be enforced to use sth like hibernate in the world of enterprise industrially speaking

glossy venture
#

yeah right

tardy delta
#

80 lines of horror to setup a table

glossy venture
#

cuz getField(String) is slow as fuck

tardy delta
#

ik

#

but i thought databases are already slow asf so why would it matter

glossy venture
#

when saving that doesnt matter

tardy delta
#

its so limited that ill probably abandon it

#

shouldve put in on gh just to see the reactions

sterile token
#

Fourten

#

I need your recommendations

#

ImIlussio have his own menu api, so im recreating from what he has show/some snippets of his code

#

So he has something like a MenuManager#getChain()

tardy delta
#

imilussio sounds like a spanish dictator

sterile token
#

Why!

#

Fourten, any idea how orks that ?

#

Because i was thinking about using smth like LinkedList<UUID, List<Menu>>

tardy delta
#

chain probably refers to the fact that the inventories are linked (think of a menu with pages)

sterile token
#

He told me that

#

But i dont know how to create it tho

#

😬

tardy delta
#

just write ur own code instead of copying from others

#

dunno how it works either

sterile token
#

I mean im copying it because i like the way the code is written

#

Mainly because the impl is pretty familiar

tardy delta
#

that chain thing just being a inv linked to another one ig

#

anyways can i change my gh account in ij cuz now im committing thro the wrong gh account?

#

ill totally blame college

remote swallow
#

Best thing you can do is @echo basalt

tardy delta
#

i mean would setting an author here help?

echo basalt
#

what you want

sterile token
tardy delta
#

he want to jank your code

sterile token
#

He alreayd knows tho

tardy delta
sterile token
#

I dm him like 20 messages sking about his menus

#

And he just ignored me

tardy delta
#

i would do the same

tardy delta
#

fuck

#

he definitly does not ignore me uwu

sterile token
echo basalt
gritty brook
#

what is the easiest way to create a Sign Gui to get a player's input?

tardy delta
#

ill probably create a new plugin with the content of my old, just to get rid of the whole mess i made lol

#

now my college gh account is fucking up with the one i use for other stuff 🐼

trim lake
#

Why Im getting false from this method some time? I run this method in onInventoryClickEvnet after one tick.
prevThiefGUI is inventory saved onOpenInventoryEvent.
inv is event inventory.

        boolean output = false;
        for(int i = 0; i < 36; i++) {
            if ( InventoryEvent.prevThiefGUI.get(player).getItem(i) == null 
                    && inv.getItem(i) == null ) continue;            
            if ( InventoryEvent.prevThiefGUI.get(player).getItem(i) == null) {
                updateThiefedPinv(player, i, inv.getItem(i));
                output = true;
                continue;
            }
            else if ( inv.getItem(i) == null ) {
                updateThiefedPinv(player, i, null);
                output = true;
                continue;
            }
            else if ( !( InventoryEvent.prevThiefGUI.get(player).getItem(i).equals(inv.getItem(i) ) )) {
                updateThiefedPinv(player, i, inv.getItem(i));
                output = true;
                continue;
            }
            if ( InventoryEvent.prevThiefGUI.get(player).getItem(i).equals(inv.getItem(i))) continue;
            return false;
        }
        return output;
    }```
dire salmon
#

how do i prevent a player from getting things from a GUI?

trim lake
#

I can paste here whole class but, It will be long message

sterile token
dire salmon
# sterile token Cancel click event
@EventHandler
    public void onClick(InventoryClickEvent e){
        PlayerData data = PlayerDataManager.getData((Player)e.getWhoClicked());

        if(data != null && data.getOpenGui() != null){
            if(e.getCurrentItem()!=null){
                data.getOpenGui().handleButton(e.getCurrentItem());

                e.setCancelled(true);
            }
        }
    }
#

like this? isnt working

tardy delta
#

registered it? otherwise your condition is false

glad prawn
#

if(something != null { if (something != null {} }. Damn

dire salmon
#

ye i did

dire salmon
dire salmon
trim lake
# sterile token What the fuck!

hmm? Is something wrong or its not readable that code or I dont know what do you mean, Im sorry 😄 or can I somehow give link to full file?

torn badge
dire salmon
#

am i not already doing that?

torn badge
#

I mean check yourself

#

Using sout or debugger

dire salmon
#

ah

raw prairie
#

how might I run a runnable every 1 second?

#

would it be java Bukkit.getScheduler().runTaskTimer(plugin, () -> { if (event.getItem().getItemMeta().equals(ItemManager.GravHammer.getItemMeta())) { Player player = event.getPlayer(); Location loc = player.getLocation(); player.getWorld().createExplosion(loc.getX() + 2, loc.getY(), loc.getZ(), 20f); System.out.println("I work"); } }, 0, 1000);

tardy delta
#

both numbers are in ticks, there are 20 ticks in a second in the best situation

#

so 20 would do it

raw prairie
#

so 20, 20?

tardy delta
#

0 is the initial delay, tthat should stay 0 if you want to schedule it immediately

raw prairie
#

so 0, 20

tardy delta
#

ye

#

dunno if comparing itemmetas from an expired event would really work

raw prairie
#

player.addPotionEffect(PotionEffectType.ABSORPTION);

#

Im getting an error here

#

anything wrong?

tardy delta
#

player being null? what error?

gritty brook
#

can someone help me with Sign Gui

raw prairie
#

but I used potioneffecttype

alpine narwhal
#

So use position effect

tardy delta
#

ah compilation error, give it a new potioneffect

tardy delta
#

new PotionEffect

raw prairie
#

now it says

#

it needs a map

tardy delta
#

check what constructors there are lol

raw prairie
#

oh wait

#

🤦‍♂️

tardy delta
raw prairie
#

what are both the ints for?

#

the duration and level?

#

what abott he 3 booleans @tardy delta

tardy delta
#

check the docs

raw prairie
#

nvm

#

I got it

#

lol

coarse remnant
#

Boyz

#

why does buildtools not go from 1.12 onwards?

#

exit me this error:

Attempting to build Minecraft with details: VersionInfo(minecraftVersion=1.8, accessTransforms=bukkit-1.8.at, classMappings=bukkit-1.8-cl.csrg, memberMappings=bukkit-1.8-members.csrg, packageMappings=package.srg, minecraftHash=null, classMapCommand=null, memberMapCommand=null, finalMapCommand=null, decompileCommand=null, serverUrl=null, mappingsUrl=null, spigotVersion=null, toolsVersion=0)
Starting download of https://s3.amazonaws.com/Minecraft.Download/versions/1.8/minecraft_server.1.8.jar
Exception in thread "main" java.io.IOException: Server returned HTTP response code: 403 for URL: https://s3.amazonaws.com/Minecraft.Download/versions/1.8/minecraft_server.1.8.jar
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
        at java.net.URL.openStream(Unknown Source)
        at com.google.common.io.Resources$UrlByteSource.openStream(Resources.java:72)
        at com.google.common.io.ByteSource.read(ByteSource.java:296)
        at com.google.common.io.Resources.toByteArray(Resources.java:98)
        at org.spigotmc.builder.Builder.download(Builder.java:1083)
        at org.spigotmc.builder.Builder.main(Builder.java:416)
        at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27)

hazy parrot
#

Someone already confirmed that there is problem with 1.8

coarse remnant
#

when will it be fixed?

hazy parrot
#

¯_(ツ)_/¯

coarse remnant
#

i need nms for my plugin

#

how i can do?

#

hem...?

golden turret
#

guys

#

how can I make the diamond sword rotate exactly here?

raw prairie
#

how might I set an event to happen only after an axe has fully chargted up for an attack?

coarse remnant
#

i need 1.8, 1.9, 1.10, 1.11 nms for my plugin
how i can do without BuildTools?

dire salmon
#

since InventoryClickEvent is deprecated, what should i use instead?

dire salmon
#

patience, its been 1 min lol

elfin atlas
#

Is there a way to change the AI between two Entities?

tardy delta
#

brr what a mess

raw prairie
frail gale
#

hey guys

#

someone experienced with IntelliJ IDEA here?

tardy delta
raw prairie
tardy delta
#

isnt this supposed to be working lol

#

uh idk i have no context

raw prairie
#
public class Event implements Listener {

    @EventHandler
    public static void onRightClick(PlayerInteractEvent event) {
        if (event.getAction() == Action.LEFT_CLICK_AIR || event.getAction() == Action.LEFT_CLICK_BLOCK) {
            if (event.getItem() != null) {
                    if (event.getItem().getItemMeta().equals(ItemManager.GravHammer.getItemMeta())) {
                        Player player = event.getPlayer();
                        Location loc = player.getLocation();
                        player.getWorld().createExplosion(loc.getX() + 2, loc.getY(), loc.getZ(), 20f);
                        player.addPotionEffect(new PotionEffect(PotionEffectType.ABSORPTION, 1, 200, false, false, false));
                        System.out.println("I work");
                    }
            }
        }
    }
}```
#

this makes it every time you click

#

it makes an explosion

tardy delta
#

doesnt need to be static

#

idk check if the axe in the players mainhand is ready to attack in someway

trim creek
#
java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver

Why... WHY?! WILL YOU FUCKING WHY?!

tardy delta
#

will you fucking why

trim creek
#

absolutely

#

this crap made me mad

#

I mean

#

I used

#

the same fucking method

#

and now

#

it just doesn't works?!

tardy delta
#

average day of a developer

trim creek
#
    public static void LoadDriver() {
        try {
            Class.forName("com.mysql.cj.jdbc.Driver").newInstance();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

Honestly this code is correct, right? .-.

tardy delta
#

assuming spigot has that included ig

raw prairie
#

ill show you what happens rn

trim creek
#

-the game is over-

tardy delta
#

game has ended

#

oof

trim creek
#

like in my other plugin

raw prairie
#

dammit

trim creek
#

and still doesn't works

#

explain this 😹

tardy delta
#

fun fact: im doing mongodb and this shit is fucking up with me

trim creek
#

well my job here is done then

#

time to ditch Java

tardy delta
#

fuck forgot collection.insertOne

#

their whole class naming is a piece of shit lol

trim creek
#

is that a required line to register the driver?

tardy delta
trim creek
tardy delta
#

im feeling like im using gson

#

adding typeadapters everywhere

#

why isnt it using reflections under the hood

trim creek
#

this is the same as why isnt my plugin actually loading the driver

#

while the coding is the fucking correct one

#

D:

tardy delta
#

aah i hate frameworks where you need to have a default constructor for a pojo

frail gale
#

how I can disable when holding shift in IntelliJ IDEA and then placing one "{" it doesn't open the method it skips the brackets

trim creek
tardy delta
#

im wondering if Class::newInstance can be used when there no def constructor?

trim creek
#

thats a good question

tardy delta
#

thinking about Unsafe::allocateInstance now smh

trim creek
#

like mine

tardy delta
#

lets not get into unsafe

trim creek
#

unsafe...

#

is... not safe