#help-development

1 messages · Page 1544 of 1

vagrant stratus
#

🤔

digital plinth
#

did you talk a Machine learning colledge cource or somethin

#

take*

vagrant stratus
dusty estuary
#

nope/

vagrant stratus
#

here we go :p

dusty estuary
#

wtf

digital plinth
dusty estuary
#

why it made a anni character into

#

wut

digital plinth
vagrant stratus
dusty estuary
#

ewwwww

digital plinth
#

best pic ever

whole stag
#

It is not handling the proportions correctly

digital plinth
#

girl to guy

dusty estuary
#

-_

digital plinth
#

nuice

dusty estuary
#

jupyter notebook or?

whole stag
#

Somebody needs to look into their loss calculations lol

dusty estuary
#

no

dusty estuary
#

cuz the model is not intended to do that

#

thats why stuff is failing

#

AI is only good at what they do

digital plinth
digital plinth
#

is designed

#

for minecraft

#

and pixel-ish things

#

hah what why delete the msg

#

lol

dusty estuary
#

idk if i am allowed to say that

digital plinth
#

lol

dusty estuary
#

cuz its nsfw

digital plinth
#

no rules for nsfw

dusty estuary
#

i wish i got a parterner that is IT/Data Science major , UG or PG

digital plinth
#

ayyy

digital plinth
#

Procter & Gamble

dusty estuary
#

undergraduate

#

postgraduate

digital plinth
#

oh

#

thats like colledge stuff

dusty estuary
#

yes

digital plinth
#

ahh yes colledge

#

scary

dusty estuary
#

like i need a mle

#

*Machine Learning Engineer

digital plinth
#

get a professor to help you?

dusty estuary
#

i major in mechanical engineering

#

how i get a professor

digital plinth
#

uhh i dunno

#

im not in colledge

#

maybe its a good time to learn about colledge tho

dusty estuary
#

getting a professor is hard asf

digital plinth
#

more knowledge = good

digital plinth
dusty estuary
#

not money

digital plinth
dusty estuary
#

is that if its not academic stuff

#

professor wont help you do it

digital plinth
#

Rip

#

get a friend?

#

to help?

dusty estuary
#

even if academic stuff you need to write a shit ton of stuff explaining why you cant do it yourself and need a professor

#

and why cant you go take a billion course to learn it but to find a professor

digital plinth
#

colledge seems hard

dusty estuary
#

unless the professor help you in his free time

#

and hes willing to do that

digital plinth
#

college*

dusty estuary
#

without OT allowance and meeting a quota with that

#

even if that

digital plinth
#

somethings

#

you just cant find it on google

dusty estuary
#

you will need to write a fking thesis after the product is done

digital plinth
#

like its passed down from ppl to ppl

dusty estuary
#

so that you fufill the responsibility of *sharing the knowledge

digital plinth
#

aka, its wayyyy easier

dusty estuary
#

and then if you write a shit thesis , then the professor wont approve it cuz his name is written on it too

#

*like if you do it the proper way

digital plinth
#

wait since you are doing Machine learning cant your like change the thing called Major?

#

xd

dusty estuary
#

and then you need to stand on the stage and get a billion queries with a bunch of professor for your stuff

#

i can't cuz my gpa is shit

#

and its third year already

digital plinth
digital plinth
dusty estuary
#

amc?

#

like my gpa is.... shit total shit

digital plinth
#

its a math competition

dusty estuary
#

oh i did that in high school too

#

like my gpa is 2.6

digital plinth
dusty estuary
#

i dont like in united states

digital plinth
#

the test is really hard

#

i failed my first chance

dusty estuary
#

not really if you good at calculus and matrix

digital plinth
#

if i dont get this one right

#

im gonna in trouble

dusty estuary
#

brute force it

#

even if you fail amc whats the problem , just you cant get a award

digital plinth
#

its pretty good

dusty estuary
#

i dont LIVE in usa

#

typo

digital plinth
#

just trying to make getting work easier

#

:/

dusty estuary
#

so you want to go to harvard and mit

digital plinth
#

im not a genious

#

genius*

dusty estuary
#

like i am those type of people that knows a little about everything

#

but not a lot of something

digital plinth
#

its mostly because im from China, that im trying AMC

#

competition in China is like 1000 times fiercer than US

dusty estuary
#

i know

digital plinth
#

and its even worse in India

dusty estuary
#

but in china you can go to tsing hua

#

or fu dan

#

i heard my friends say its not that hard

digital plinth
#

what?

#

those are like

#

the best schools

dusty estuary
#

i know

#

but like cuz my friends are like ...

digital plinth
#

so you are from china?

dusty estuary
#

top in some

#

chemistry stuff

#

taiwan

digital plinth
#

i see

#

theres like prodigies back in my Chinese schools

#

one of them i think

#

passed AMC8 or 10 at like 4th grade

#

or so they say

dusty estuary
#

those are like crazy

#

everyday memorizing math stuff and carry a math textbook in their backpack

digital plinth
#

yea

#

they leave school early for additional studies

dusty estuary
#

but those "genious" are very hard to social with

digital plinth
#

Theres also a forenign language prodigy

dusty estuary
#

cuz they have that pride

digital plinth
#

they are kind of normal ppl

dusty estuary
#

depends

digital plinth
#

they like to gossip

#

like normal ppl 🤷

dusty estuary
#

btw i coded an AI to finish my final exam

digital plinth
#

she managed to know the name of every single ppl in the whole school year

digital plinth
dusty estuary
#

good at memorizing

#

ofc

digital plinth
dusty estuary
#

you know online exam

digital plinth
dusty estuary
#

i used network control

#

to control all the data in and out of my home

#

to uni server

digital plinth
dusty estuary
#

like how the great firewall of china did

digital plinth
#

might try it sometime

digital plinth
dusty estuary
#

its really hard to setup

#

and you need someone to help you control the firewall

digital plinth
#

really?

dusty estuary
#

ofc

#

cuz the rubbish website have a lot of anti bad packet system

digital plinth
#

like anti-cheat?

dusty estuary
#

yes but like

#

you need to get the security protocol of the software

#

so basically you need to pay a employee of the anti cheat software

#

to let them leak the protocol to you

digital plinth
#

you bribed someone?

#

WHAT?

dusty estuary
#

like just treat it as a password

digital plinth
#

i just hit 50

dusty estuary
#

gg

digital plinth
#

woahhh

dusty estuary
#

i didnt bribe technically

#

cuz he has the right to leak it

digital plinth
#

XD

#

here listen to this

#

do you think she is born in america

dusty estuary
#

i dont

#

i think hes chinese

digital plinth
dusty estuary
#

yea

digital plinth
#

thats so much better than mine

dusty estuary
#

cuz chinese accent is easy to tell

#

like unless you are educated from western country when your small

#

you will have that accent

digital plinth
#

she's like the top 10% with little accent

dusty estuary
#

in china yes

#

but like those foreign language pridogy in china and taiwan is just average in britan/usa

digital plinth
digital plinth
dusty estuary
#

accent is not a problem

digital plinth
#

im wayy better at supressing accent then that

digital plinth
#

but

dusty estuary
#

the problem is the organizing ability

digital plinth
#

my class an envied for like no accent :/

#

cuz its cool?

#

i guess?

dusty estuary
#

yes its cool

#

but in uni no one care

digital plinth
dusty estuary
#

if you hav accent or not

#

yes that ability

digital plinth
#

XD

dusty estuary
#

not really

#

cuz your accident is not like those indian people , westerns still can clearly understand what you say

digital plinth
dusty estuary
#

like chinese education on english is corrupted

digital plinth
#

im bad at english :<

dusty estuary
#

i mean they force you to memorize a billion vocab

digital plinth
dusty estuary
#

but you dont learn how to use them

digital plinth
dusty estuary
#

i rather you know 3000 words and use them good

#

than memorize 10000 words and dont know how to use them

digital plinth
#

you memorize words by knowing their meaning

#

and how to use them

#

uhh thats what i was taught :/

digital plinth
#

english*

#

you have to like

#

come up with things in Chinese

dusty estuary
#

not really

digital plinth
#

and translate them in english

dusty estuary
#

not really

#

after you go into uni

#

every thing is english

digital plinth
dusty estuary
#

and in academic discussion

#

you do in reverse

#

cuz all the technical terms are english

digital plinth
#

when i try to memorize words usually i can do it with other words

#

but sometimes a chinese definition is very helpful

dusty estuary
#

ofc

digital plinth
#

i still have more chinese vocabs than english

#

i think

#

its not a bad thing

dusty estuary
#

btw what does that verify thing do

#

is it required or what

digital plinth
#

not required

#

but it gives you uhh the

#

perk to upload emojies

dusty estuary
#

....

#

that i dont care

#

lol

digital plinth
#

and screenshots and stuff

dusty estuary
#

pictures i need

digital plinth
#

uplaod files genrally

#

generally*

#

upload*

#

dxghfsajbek

dusty estuary
#

basically this?

digital plinth
dusty estuary
#

oh ok

digital plinth
dusty estuary
#

re-coding part of zoom

#

cuz it doesnt have the cheating stuff i need

digital plinth
#

make it send funny emojis to the teachers

dusty estuary
#

no

#

cuz it will send the stuff on your acc

digital plinth
#

but zoom should have anti-virus measures installed

digital plinth
dusty estuary
#

and the teacher will know

#

you cant

digital plinth
dusty estuary
#

thats server side stuff

digital plinth
#

oh you cant?

digital plinth
dusty estuary
#

you need to hack into zoom server

digital plinth
#

change computer id

dusty estuary
#

for that to work

digital plinth
#

lol

dusty estuary
#

no

#

not everything is that simple

digital plinth
digital plinth
dusty estuary
#

techically what i am doing rn is a crime too

#

but no one knows

digital plinth
#

modding minecraft

dusty estuary
#

no its not

digital plinth
#

changing the client input

dusty estuary
#

cuz you are counterfeiting proof

#

no

digital plinth
#

how is it not

dusty estuary
#

its illegal

#

but no one knows

#

like cuz your are counterfeiting proof of you not cheating

digital plinth
#

XD

digital plinth
#

GL

#

dont get caught

dusty estuary
#

modding mc is techinically piracy

#

but mojang dont really do much on it

digital plinth
#

you still need 2 pay

#

unless you are referring to

#

tlaucher

dusty estuary
#

idk

#

but i know that bukkit is legal

#

i found one thing annoying tho

#

like you get much video on bukkit stuff

proud basin
#

?tryandsee

dusty estuary
#

but like when you want to integrate other stuff

proud basin
#

aw no command

dusty estuary
#

into your plugins

#

you dont find much doc on that

#

and you spend hours figuring out how stuff work

nova notch
#

oh

#

shit

#

there we go

digital plinth
dusty estuary
#

you try find doc on NMS

#

or docs on zoom internal api

digital plinth
#

well you dont look for docs

#

you use ProtocalLib

dusty estuary
#

i use bkcommonlib

#

so idk

lucid jacinth
#

are there methods to tell whether or not a player is right and/or left clicking with a certain item in hand

eternal oxide
#

PlayerInteractEvent

lucid jacinth
#

tysm

digital plinth
lucid jacinth
#

sounds good thanks!

digital plinth
#

oh and a tip from my experience

#

to check what item the player is holding

#

use .getType and check the material

#

if you check the itemStack sometimes it dont work for some reason

#

maybe its a typo on my side

#

you can also specify the details of the idea by getting a reference of them item and itemMeta

#

@lucid jacinth

digital plinth
#

/packets

#

bkcommonlib seems to be less specilized

lucid jacinth
digital plinth
#

np

mystic tundra
#

I need help. I came back after retiring from my plugin development times and notice that the method to get the player’s command has changed. I used to do if(label.equalsIgnoreCase(“”)) but now that doesnt work, anyone know how I should do it?

digital plinth
#

it doesn't?

#

i use

#

cmd.getName.equaslIgnorecase

mystic tundra
#

idk if it's that tho

#

hold on ima just copy paste my other problem and send you the link to a pastebin

#

I tried instlaling spigot with BuildTools and I got this message, but no install:

Loading BuildTools version: git-BuildTools-e03adic-130 (#130)
Java version: Java 16
Current Path: (the path to the folder)
Please do not run BuildTools in a Dropbox, OneDrive, or similar. You can always copy the completed jars there later
opal juniper
#

Assuming you use the class that implements commandExecutor

mystic tundra
#

hold on

#

here's my whole code

#

I don't use commandexecutor...

digital plinth
#

Guys is 1.8 api worse than 1.16 api, also what to do when your server is on 1.8

#

you can use the ViaRewind to allow 1.8 ppl to join

digital plinth
mystic tundra
#

oh just onCommand?

#

yeah then I did

#

when I do /plugins none of them show up

#
name: MLGrushQueue
version: 1.0
author: Simo
main: me.Simo.MLGrushQueue.Main
description: An addon for the AdvancedMLGrush plugin, allows for game joining with a command
depend: [MLGrush]

commands:
  cmlg-joinqueue: attempts to join the MLGrush queue
#

that's my lpugin.yml

digital plinth
#

no plugin showed up?

mystic tundra
#

none

mystic tundra
#

yep

#

my brother loves mlgrush worlds

#

servers*

#

I have an error

#

hold on

hybrid spoke
#

you are trying to cast String to Map

mystic tundra
#

where?

#

in the if(label,equalsIgnorecase)?

hybrid spoke
#

"commands are of wrong type"

mystic tundra
#

I know

#

how do I fix it? this used to work fine for me

hybrid spoke
#

most likely the - in your plugin.yml

#

nah nvm

#

commands: cmlg-joinqueue: attempts to join the MLGrush queue

#

this is a no no

mystic tundra
#

I think that usually works

hybrid spoke
#

you aren't setting the descrpition here

mystic tundra
#

but I'll try removingit

#

oh

#

oh right it should be

#

hold on

hybrid spoke
#

description: "hellooouuw, its me"

mystic tundra
#
commands:
  cmlg-joinqueue: 
    description: attempts to join the MLGrush queue
#

ok

#

and the dash is fine?

hybrid spoke
#

not sure if the - works, but if you get bullied by exceptions its most likely the -

mystic tundra
#

ok

#

i'll give it a go with it

#

ok now with it

#

without*

hybrid spoke
#

the command in the plugin.yml have to match the command you declare with getCommand

mystic tundra
#

ywh

#

IT DOES

#

sorry caps

#

another error

#

the depend section is just for the user to know, right? even if I dont have that plugin installed it should still load?

eternal oxide
#

no

#

depend means if that plugin is not on the server your plugin will not load

mystic tundra
#

oh

#

this is the plugin

#

what should I write in there?

#

AdvancedMLGRush?

hybrid spoke
#

the name of the plugin

#

like what its named ingame

#

if you do /plugin

mystic tundra
#

ok

#

ok it show up now

#

good to know that all along that was the problem

#

and the whole plugin works

#

nice

#

who would've guessed that such a small plugin would make me happy

quaint mantle
#

Hello!
I am trying to use yaw and pitch to get the targeted location (at a distance of x blocks). Do you have any idea?

eternal oxide
#

using the players direction they are looking?

quaint mantle
#

yeah that's the yaw and pitch @eternal oxide

eternal oxide
#

and what are you trying to get? just a location, a block, an entity?

quaint mantle
#

just a location

eternal oxide
#

always at a set distance?

quaint mantle
#

yeah

eternal oxide
#

player.getlocation().clone().add(player.getDirection().multiply(distance))

quaint mantle
#

okay thank you!

eternal oxide
#

somethgin close. Have to get location before you getDirection

quaint mantle
#

and how would you do for an entity?

eternal oxide
#

and you may want to use getEyeLocation for the direction component

#

if you want to find the first entity along the line of sight you use rayTrace

quaint mantle
#

Okay!

#

what is rayTrace?

quaint mantle
eternal oxide
#

no

#

well depends

#

if you want to move the player to teh location you are looking you use the players location and add teh direction of the eyeLocation

#

if you want to raytrace you use teh EyeLocation for both

quaint mantle
#

okay, thank you very much!

split egret
#

So, I think I'm a bit dense,

// At the start of the file
@Command(name="test", desc = "Refer another player!")

// Near the end
@Override
public void onEnable() {
    getCommand("test").setExecutor(new IGReferCommand(config));
}

For some reason getCommand returns a null value?

#
java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "com.a_logan.IGRefer.IGReferMain.getCommand(String)" is null
        at com.a_logan.IGRefer.IGReferMain.onEnable(IGReferMain.java:40) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[spigot.jar:3096-Spigot-9fb885e-296df56]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[spigot.jar:3096-Spigot-9fb885e-296df56]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot.jar:3096-Spigot-9fb885e-296df56]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:492) ~[spigot.jar:3096-Spigot-9fb885e-296df56]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:406) ~[spigot.jar:3096-Spigot-9fb885e-296df56]
        at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:554) ~[spigot.jar:3096-Spigot-9fb885e-296df56]
        at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:257) ~[spigot.jar:3096-Spigot-9fb885e-296df56]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:928) ~[spigot.jar:3096-Spigot-9fb885e-296df56]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:273) ~[spigot.jar:3096-Spigot-9fb885e-296df56]
        at java.lang.Thread.run(Thread.java:831) [?:?]
earnest sonnet
#

What is config?

split egret
#

Pretty sure that's not the issue, since it's not getting to the setExecutor

eternal oxide
#

Commands need to be in the plugin.yml

split egret
eternal oxide
#

I never knew that even existed

split egret
#

Pretty cool ay

#

Would you get the same error if you didn't put it in plugin.yml?

eternal oxide
#

in which case you do have teh dependency in your pom?

split egret
#

Yep

#

Everything else works

#

Just the command

eternal oxide
#

yes you get the same error if its missing from the plugin.yml

split egret
#

oh, I must be using it wrong. Need to do more research on it

#

Cheers anyway

eternal oxide
#

Do you have the depend in your pom?

split egret
#

Yeah, like I said, it's only the command that has the issue

#
# Auto-generated plugin.yml, generated at 2021/06/30 17:23:42 by org.bukkit.plugin.java.annotation.PluginAnnotationProcessor

main: com.a_logan.IGRefer.IGReferMain
name: IGRefer
version: 1.0.0
description: Refer a friend!
author: Eclipse
depend:
- PlaceholderAPI
commands: {}
permissions: {}
eternal oxide
#

I think I'll have a play with that later

split egret
#

@eternal oxide

@Commands(value = {
        @Command(name="test", desc = "Refer another player!")
})
#

That's how you add a command >:C

#

Dumb part on my side

quaint mantle
#

@eternal oxide I have a little problem with rayTrace 😦

#
            RayTraceResult result = player.getWorld().rayTraceEntities(location, location.getDirection(), 1.02);```
#

Unfortunately result.getHitEntity() returns the player to me

#

May be should I do something like this:

#
            RayTraceResult result = player.getWorld().rayTraceEntities(location, location.getDirection(), 1.02,
                    (Entity target) -> !target.equals(event.getDamager()));```
eternal oxide
#

you could

quaint mantle
#

Hmm I am in front of a sheep but it fires a NPE

#

Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.util.RayTraceResult.getHitEntity()" because "result" is null

#

So it means my rayTrace didn't find the sheep

#

Oh I get it now! I forgot to specify the distance

#

in fact I specified the ray trace instead of the distance!

opal juniper
#

Anyone know how they make the buttons in inventories? is it some custom texture stuff?

earnest sonnet
opal juniper
#

Yeah - i just wondered how you implement it spigot side

summer scroll
#

Simply just modify the item custom model data.

stray halo
#

Hi, has Mc put a "limit" on items' name?

#

Cause I have a plugin that has some custom recipes with custom items

#

One of the item's name was "Bacchetta Magica del Fuoco" (quite a long name)

#

The plugin didn't give any error but when I tried the recipe the item didn't come out

summer scroll
stray halo
#

Then I reduced the name to "Bacchetta Magica" and it worked

stray halo
#

Cause in 1.16 it worked

#

I guess they should put an error for this

#

Cause I spent 2h trying to understand what was wrong

summer scroll
#

I don't really know much about character limit in spigot api.

#

If it's worked on 1.16.5 I don't see why it didn't work in 1.17

hybrid spoke
#

iirc there is no really item name length cap

stray halo
summer scroll
#

oh yea, i don't think there is character limit for item display name

hybrid spoke
#

typo? something other wrong in your code?

stray halo
#

Also in 1.16 it worked fine, and I didn't change anything since then

#

Just put the pl in a 1.17 server

hybrid spoke
#

are you maybe checking for the name so the recipe works?

noble spire
regal island
#

does anyone know in the skin restorer thingy what skins have capes?

hybrid spoke
noble spire
#

if you have it as a UUID, e.g.:
"8f82e9a4b37f45b5a05c1c89b4ed67a2"

summer scroll
stray halo
#

I'll send the code in a bit when I open my pc

noble spire
#

:(

summer scroll
#

Oh, you need the - thing

noble spire
#

wdym?

eternal oxide
#

4-4-4-4

hybrid spoke
#

a uuid contains a -.
183hkjahsdkasd-kwahsdh1ih31

noble spire
#

okay

#

is it in the center or

eternal oxide
#

a UUID is comprised of 4 Longs, each represented in hex separated with a - for the UUID string representation

hybrid spoke
noble spire
#

yeah but it's deprecated and I've already made it do it

eternal oxide
#

so abff-b026-abcd-88ff

hybrid spoke
#

its also contacting the mojang api and returning an OfflinePlayer obj. with everything needed

hybrid spoke
#

nothing wrong with it

noble spire
hybrid spoke
#

2?

noble spire
#

I'm getting the username from user input

#

so I have to check if it exists before I get the object

hybrid spoke
#

#hasPlayedBefore or check if some fields are null

eternal oxide
#

if this is for players who exist on yoru server use the server cache

noble spire
#

it's not

eternal oxide
#

What I mean by "exist" is they have played on yoru server

stray halo
#

does anyone remember the ALT shortcut for the code formatting symbol in discord?

noble spire
#

yeah it's for whitelisting players

eternal oxide
#

but can be offline at the moment

#

ah ok

noble spire
#

I'm not on windows I can't try

stray halo
#

oh yes

#

thx

hybrid spoke
#

for whitelisting the player don't have to exist

#

you can just request the OfflinePlayer obj over the method and add it to the whitelist

noble spire
stray halo
#
    @Override
    public void onEnable() {
        this.getServer().getPluginManager().registerEvents(this, this);
        Bukkit.addRecipe(getRecipe());
    }
    
    public ShapedRecipe getRecipe() {
        ItemStack item = getItem();
        NamespacedKey key = new NamespacedKey(this,"test");
        ShapedRecipe recipe = new ShapedRecipe(key, item);
        recipe.shape("S","S","S");
        recipe.setIngredient('S', Material.STICK);
        return recipe;
    }
    
    public ItemStack getItem() {
        ItemStack item = new ItemStack(Material.STICK);
        ItemMeta meta = item.getItemMeta();
        meta.setDisplayName(ChatColor.AQUA + "Bacchetta Magica");
        List<String> lore = new ArrayList<>();
        lore.add("Test");
        meta.setLore(lore);
        item.setItemMeta(meta);
        return item;
    }
hybrid spoke
stray halo
hybrid spoke
#

so from where do you want to take it?

noble spire
#

Well I have it, just without the dash

hybrid spoke
#

doing your own thing and do a custom request to mojang isnt the way to go here

noble spire
#

... fine

#

I'll make 2 requests then

hybrid spoke
#

2??

#

why 2??

#

the only request you have to do is the #getOfflinePlayer(name) method

noble spire
#

To tell the user if it exists or not, because if it doesn't, then it's probably a typo

hybrid spoke
#

if the user doesn't exist the uuid field have to be null

#

just check for that

#

no need for a second request

noble spire
#

oh thanks

hybrid spoke
#

nvm uuid is never null

noble spire
stray halo
#

isn't there a method like user.hasPlayedBefore() or sth like that

noble spire
#

yeah, but they won't have

stray halo
#

what r u trying to do exactly?

noble spire
#

whitelist a player from user input, but only do it if the player exists (otherwise return an error to the user)

noble spire
stray halo
noble spire
#

exists as in is a minecraft account

stray halo
#

oh ok

hybrid spoke
# noble spire 2 requests ig

not sure if it works but you could check the uuid from the offlineplayer object with the other getOfflinePlayer(uuid) method

#

the name would be null

#
OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer("i don't exist");
if(Bukkit.getOfflinePlayer(offlinePlayer.getUniqueId).getName() == null) {System.out.println("yep, definitely don't");
noble spire
#

yeah, but that's still 2 requests

#

right?

hybrid spoke
#

no. just the one taking a string requests the mojang api.

#

but iirc getOfflinePlayer(uuid) just looks for the player in the playerdata folder

eternal oxide
hybrid spoke
#

oh yeah, check if it's this uuid: UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(Charsets.UTF_8)

eternal oxide
#

yep

#

if it matches, either the server IS offline or the player does not exist.

noble spire
#

hmmm

gusty gorge
#

I found no Entity.getHealth() how would i get the health?

eternal oxide
#

getAttribute

gusty gorge
#

ah ok thx

gilded ermine
#
        Document document = new Document("uuid", uuid.toString());
        document.append("name", name);

        mSkyblock.getInstance().getMongoHandler().collection.insertOne(document);


    }```

this code works but I can't find a way for the life of me to get a check as to whether a user is already in the db.. all the ways I've tried either just duplicate the entry every time i log in or do nothing at all

anyone know a way to check if there's already a db entry under the UUID
torn frost
#

Hi, i searched the forums for reloading plugin...and I found some suggested plugin.config.reloadConfig() and some suggested plugin.reloadConfig().

Which should I use?
plugin.config.reloadConfig() vs plugin.reloadConfig()

gilded ermine
#

plugin.reloadConfig() works

noble spire
weak mauve
#

any1 know how to make an arrow damage enderman

torn frost
weak mauve
#

i was researching for hours but don't know how to make arrow damage endermen

hybrid spoke
torn frost
#

And how to have plugin prefix or name in warn or info log?

[06:47:37 WARN]: Couldn't find world bedwars. Either it doesn't exist or is not valid.
#

I used this :

Bukkit.getLogger().warning("Couldn't find world "+ name + ". Either it doesn't exist or is not valid.");
gilded ermine
#

just put [PluginName] before "Couldn't"

hybrid spoke
#

Bukkit.getLogger().info("[AntiAC] Registered " + CheckManager.getChecks().size() + " Checks");

torn frost
#

ohh you mean in string ok

noble spire
#

?paste

undone axleBOT
hybrid spoke
#

you have to disconnect the connection in the finally clause

eternal oxide
hybrid spoke
#

otherwise there is a potentially memory leak

hybrid spoke
noble spire
#

yup it does that

hybrid spoke
noble spire
#

nah I was talking about the prefix

hybrid spoke
#

oh

#

my bad

noble spire
#

no worries lol

hybrid spoke
#

and since you're disconnecting the connection you don't need to close the inputStream anymore in.close();

#

it does that for you

noble spire
#

there's no harm in having it

#

right?

hybrid spoke
#

its redundant and could throw exceptions you don't need

tardy delta
#

is there something not deprecated for player.updateInventory() ?

eternal oxide
#

updateInventory is not deprecated

jagged monolith
tardy delta
#

but can someone help me? i made a few gui's and how can i check which gui the player is using?

eternal oxide
#

compare the instance of the Inventories

tardy delta
#

yea but how

jagged monolith
tardy delta
#

1.13

hybrid spoke
eternal oxide
#

You compare the clicked inventory to the inventory you created and opened for them

eternal oxide
tardy delta
#

something like this?

eternal oxide
#

yes

tardy delta
#

but in my GUI class i have different gui's defined

eternal oxide
#

you compare to whatever you need to

tardy delta
#

:/

eternal oxide
#

You shoudl also be using a singleton for yoru GUI class

#

so you are not constantly creating new objects

hybrid spoke
tardy delta
#

hmm

hybrid spoke
#

since the finally clause runs in every case

eternal oxide
#

what code is not guraranteed to run?

torn frost
#

incomplete msg sent sorry

tardy delta
#

but i really have to idea how to check inside an eventlistener which gui the player is using

summer scroll
#

InventoryHolder is very useful here.

torn frost
#

Hi i am adding some feature to the plugin I used to fit my needs and is open source.
I edited like below code but it uses global ones from config and returns true even when its set to false and config reloaded.

Code : https://paste.gg/p/anonymous/df82d0326a88436e8830eae76807b9c2
Config FIle : https://paste.gg/p/anonymous/004bd1f4c22f4720b7ab8c3fb6ebecc7
was in world : world
but in log :

[07:37:57 INFO]: [Unexpected Spawn] Used config: global. for on death and the values is true
[07:37:57 INFO]: [Unexpected Spawn] Used config: global. for bed respawn and the values is true
[07:37:57 INFO]: [Unexpected Spawn] Used config: global. for random respawn area and the values are (-399,399,-399,399)
[07:37:57 INFO]: [Unexpected Spawn] Used config: global. and the values are : [SWEET_BERRY_BUSH, MAGMA_BLOCK, CAMPFIRE, LAVA, CACTUS, FIRE, WATER]

Please help and thank you for you time.

eternal oxide
hybrid spoke
tardy delta
#

idk i just dont uderstand it

#

ah wait

#

?paste

undone axleBOT
tardy delta
#

i dont know how to check which one of the gui's i made the player is using

eternal oxide
#

no need for a finally then

earnest sonnet
tardy delta
#

so you mean in my gui class like a string with the name?

#

i tried that

eternal oxide
#

do NOT compare titles

#

very very bad

earnest sonnet
eternal oxide
#

anyone can name a chest the same

#

all of a sudden your code thinks they have your UI open when its a chest

#

Compare instances, or at the least check your inventories and see who is holding a handle to it.

reef wind
tardy delta
#

yea you say compare instances but idk how

summer scroll
#

What's your goal, Brush guy?

hybrid spoke
earnest sonnet
#

Yes, @eternal oxide you're right, I didn't think of that 😄

tardy delta
#

i've two inventories and i need to add different like actions for it when you click on a slot for example

eternal oxide
#

using the try method will attempt to close and dispose of all variables/handles used in it

earnest sonnet
tardy delta
#

yes

#

:/

summer scroll
hybrid spoke
earnest sonnet
#

What about what a singleton is @tardy delta ?

tardy delta
#

yes

#

i know

earnest sonnet
#

Then were did you stuck ?

hybrid spoke
eternal oxide
#

it calls every close method so if it fails a finally would too

tardy delta
#

they are all instances of the same class

eternal oxide
#

get the clicked inventory.equals(your inventory instance)

#

you must be storing yoru GUI instances

#

so compare to each and see if it is one of yours

tardy delta
#

and then assign different functions to the slots?

hybrid spoke
#

just check for the slot being clicked

#

after you compared the inventories

tardy delta
#

that overlaps

eternal oxide
#

overlaps?

tardy delta
#

or wait

#

something with this?

event.getInventory().getHolder()
earnest sonnet
#

the inventory A doesn't involve inventory B, how come they overlap? slot 6 for inventory A is the slot 6 of inventory A, slot 6 for inventory B is slot 6 for inventory B

tardy delta
#

nvm

#

kinda stuck

earnest sonnet
#

gui a = new gui();
gui b = new gui();

if (e.getInventory().equals(a)) {
// do stuff
} else if (e.getInventory().equals(b)) {
//do stuff
}

p.s: don't follow this naming convention

frosty tinsel
#

@tardy delta You should learn Java first

tardy delta
#

lmao

reef wind
#

what could cause my jar to be missing the plugin.yml, config.yml and me folder when building artifact but not when building it normally?

hardy swan
#

when you are not using vscode

eternal oxide
#

building using Artifacts does not use Maven

hoary knoll
#

anyone know anything about google gson?

ivory sleet
#

Yeah

hoary knoll
#

is there a way to add a generic property to a jsonobject

#

something like JsonObject#addProperty(String key, T value)

#

or another way to get the same thing

ivory sleet
#

Uh no JsonObject, JsonArray, JsonPrimitive and JsonElement don’t work with type awareness, it’s mostly for deserialization

hoary knoll
#

thats unfortunate

ivory sleet
#

It’s really not

#

It’s the model of json

#

But anyways what are you trying to do?

#

The chances are that you got yourself an xy problem

tardy delta
earnest sonnet
tardy delta
#

its not the same

#

thats my problem

earnest sonnet
#

how is that a problem ?

#

if () {
dance
run
sit
} else {
dance
run
watchTheStars
}

#

that's a very bad example and you shouldn't use it like that, but the code above does 2 identical things and 1 different from each other

hybrid spoke
#

if() {
dancerun()
sit()
}else{
dancerun()
watch(stars)
}

hoary knoll
#

@ivory sleet actually i can see why they wouldnt support it. However, the only types that T could be are any of the primitive data types or String

#

i can do it manually

hardy swan
#

hello

hybrid spoke
#

or even
dancerun()
if() {
sit()
}else{
watch(neighbourgirl)
}
dancerun()

earnest sonnet
#

yes, that's what I was gonna comment right now

tardy delta
#

?paste

undone axleBOT
earnest sonnet
#

WAIT! that was a trick xD didn't see what to watch

#

only saw the dancerun() outside of the if-else statement

tardy delta
thick tundra
#

Anyone here who can help me with quaternions

tardy delta
#

so the gui can look different depending which register...() method is used

hybrid spoke
#

why do you have a setInventory method

tardy delta
#

and in my listener i need to check which gui the player is actually looking at

hybrid spoke
#

you could just do INV = bukkit do my inventory

earnest sonnet
#

wrong naming convention, not sure what you want to do, but you're probably abusing the static, initialize your inventory inside the constructor

hardy swan
hybrid spoke
#

ohh and its not even in the constr

#

damn

tardy delta
#

because i have only one static inventory and the setinventory() sets the static one to the one i want to use

hybrid spoke
#

AND ITS STATIC

#

i am blind

#

af

ivory sleet
mystic tundra
#

So in this server, whenever I pvp someone its either that the hits are very delayed or that only one in a few even get registered. I ran tests and it’s not client sided. Anyone know if and how I can fix it by writing my own plugin?

tardy delta
#

/kill @e is a good one

hybrid spoke
#

there is a cooldown between each hit

#

in that cooldown you can't hit the player

hardy swan
#

then you must have been hitting real fast

#

ok maybe not that fast

earnest sonnet
tardy delta
#

its just bukkit related i guess

hybrid spoke
#

that sounds so harsh

hybrid spoke
hardy swan
#

oop

mystic tundra
#

Like were in godmode that gets disabled for a second every 5-10 seconds

tardy delta
#

well someone says i have to create one instance someone says multiple how can i now whats wrong then

hybrid spoke
#

maybe i will find it out if i scroll up, but, what is your goal?

earnest sonnet
earnest sonnet
hybrid spoke
#

there is not even a single instance needed

#

you just create your own inventoryholder which is from now on your inventory wrapper. on click you check, if the holder of the clicked inventory and your inventory are the same

earnest sonnet
hybrid spoke
#

confusing my confusion

earnest sonnet
#

4th edits, for real ^_^

quaint mantle
#

Small question, I'm making an hardcore mode like plugin, currently dead players are invisible with block place break and interact disabled. I would like to create an box around the player under the bedrock layer if possible. Anyone got a clue how to generate those things ?

tardy delta
#

so i have implements InventoryHolder?

quaint mantle
#

Correct

hardy swan
#

like, placing blocks in void?

hybrid spoke
quaint mantle
#

Yea just under the layer

tardy delta
hybrid spoke
#

your custom inventoryholder wraps himself around the inventory and represents it by the #getInventory method. also it manages the inventory

hardy swan
tardy delta
#

idk what wrapper means

#

:/

hardy swan
#

sth that HAS-A sth, and representative of that sth

hybrid spoke
#

f.e. Integer is a wrapper of an int

tardy delta
#

yes

quaint mantle
#

Hmm could always set them in invis boxes high In sky

hybrid spoke
#

so the Integer class HAS-A int to manage and represent and wraps it

earnest sonnet
hybrid spoke
#

so true horny

hardy swan
#

box has a ball, and representative of the ball

#

get it?

quaint mantle
#

Anyway the main thing I was asking is there documentation about generating custom structure?

hybrid spoke
#

its like a bottle full of water. you don't say "can you give me the water?" you say "can you give me the bottle of water?": the bottle wraps the water

hardy swan
#

ok this more accurate^

tardy delta
hardy swan
earnest sonnet
#

Yes

hybrid spoke
tardy delta
#

okay

earnest sonnet
#

as long as it implements the InventoryHolder

hybrid spoke
#

if it doesn't it still wraps the inventory

hardy swan
#

in plain english, inventoryholder.... holds an inventory

#

phew phew phew

hybrid spoke
#

well

#

i compared it with a bottle of water

#

and its just that simple

#

never thought of this "inventoryholder holds an inventory"

#

just like pullover pull-over

earnest sonnet
#

🤣 me neither

tardy delta
#

i have this to check it
if (event.getInventory().equals(trailsMenu)
where trailsMenu is an instance of my gui thing

hardy swan
#

your gui

#

instanceof inventory??

hybrid spoke
#

thats not how it works

#

you have to check if the HOLDER of the event inventory is instanceof your custom holder

tardy delta
#

ah

hybrid spoke
#

you have to set the holder to "this" since you wanna use your customholder

tardy delta
#

okay

hardy swan
mystic tundra
#

Or I hit him 10 times and he gets hit once

hybrid spoke
mystic tundra
#

Imagine having a terrible ping

#

You cant hit players

hybrid spoke
#

you can

mystic tundra
#

All your hits have massive delays

hybrid spoke
#

but the hits come delayed

#

all at once

mystic tundra
#

Yeah

hybrid spoke
#

like skr skr skr skr

mystic tundra
#

So its kinda like that

hybrid spoke
#

instead of skr click skr click

mystic tundra
#

Except with a high ping all your hits come at once

#

Here only one hit is done

tardy delta
#

if event.getInventory().getHolder().equals(tradeMenu.getInventory()

hybrid spoke
#

just ban players with a high ping

mystic tundra
#

No you dont get it its not about the ping

#

That was just to describe what the problem looks like

hardy swan
mystic tundra
#

Its a problem with the server

#

Everyone has it like that

hybrid spoke
#

you mean that in godmode no hit is being done because.. the player is in godmode..

#

ah

#

seems like a problem with the performance

#

like low tps or stuff

mystic tundra
#

Maybe

tardy delta
hybrid spoke
#

or any plugin blocking the hits

mystic tundra
#

Is there a way to fix it?

earnest sonnet
tardy delta
#

ah .getHolder()

hybrid spoke
twilit summit
#

Hello, can someone help me with this err: java.lang.IllegalStateException: Cannot get plugin for class com.zaxxer.hikari.util.DriverDataSource from a static initializer?

mystic tundra
#

Oh ok

mystic tundra
#

Well it might be the mlgrush plugin

hardy swan
#

?paste

undone axleBOT
mystic tundra
#

Ill ask the owner to remove it for a sec

hybrid spoke
hardy swan
#

getHolder().getInventory().getHolder().getInventory().getHolder()........;

hybrid spoke
#
if(eventInventory.getHolder() ------->**instanceof**<------- YourInventoryClass) {/*ah yes */}
proud basin
#

Can you bypass the 16 character limit?

hybrid spoke
proud basin
#

No I haven’t

hybrid spoke
twilit summit
tardy delta
#

so

if (!(event.getInventory().getHolder() instanceof GUI)) {
            return;
        }
hardy swan
#

this not shading

vital ridge
#

How can i count all columns in mysql?

earnest sonnet
#

that's not shading

vital ridge
#

Like every single column

hybrid spoke
#

how were you guys so fast

tardy delta
#

but ofcourse its instance of my class :/

twilit summit
hybrid spoke
tardy delta
#

and now i have to look which inventory specific the player has open and then assign slots where can be clicked on to it

hybrid spoke
tardy delta
#

🤡

hardy swan
#

query any row

earnest sonnet
tardy delta
#

the one i made myself?

twilit summit
hybrid spoke
#

with checking if the inventoryholder is the same

tardy delta
#

so if the holder is different its a different gui

hybrid spoke
hybrid spoke
vital ridge
hardy swan
earnest sonnet
#

The problem is with his class, is that he is creating 2 inventories, one named Trails and other Trade

tardy delta
#

i assign the same holder every time :/

#

yea

twilit summit
earnest sonnet
#

he needs to create 2 classes each for each inventory

tardy delta
#

hmmm

hybrid spoke
tardy delta
#

cannot be efficient if i have to create a different class for each inventory

tardy delta
#

finally someone who understands my problem 😂

earnest sonnet
#

Yes, I got so confused because I was mixing up things so badly 🤣

#

Sorry

hybrid spoke
#

we all understood that

#

just like i don't know what i'm typing

hardy swan
tardy delta
#

i dont know that bukkit things very well

hybrid spoke
#

thats java

#

inheritance

#

HAS-A

#

wrapping

tardy delta
#

i know what that is it just didnt know how to look which inventory of my class is open :/

earnest sonnet
#

to be fair, I probably confused him quite a bit in the beginning because I misunderstood a few things, but yes, he needs to revisit some some knowledge

tardy delta
#

and still dont..

hybrid spoke
#

i do that too for one of my plugins

vital ridge
hybrid spoke
#

i have like 10 different holders

vital ridge
#

i used something like this

hybrid spoke
#

to identify the inventories

tardy delta
dusk flicker
#

Multiple classes don't really effect performance

hardy swan
hybrid spoke
vital ridge
#

yep

#

a class

hybrid spoke
tardy delta
#

wauw

hardy swan
tardy delta
vital ridge
#

yea it does

earnest sonnet
#

every class implements the inventoryHolder

tardy delta
#

and then something like this?

hardy swan
vital ridge
#

that selects all the tables?

#

no?

hardy swan
#

and in this case I assume the table name is information_schema.tables

vital ridge
#

I need to get a specific table

#

nope

#

I just found it from google

hardy swan
#

ah ok you need to specify the table name

vital ridge
#

all_usertags is my table name

hardy swan
#

select * from all_usertags then

vital ridge
#
final ResultSet rs = MySQL.prepareStatement("SELECT * FROM all_usertags;").executeQuery();
hardy swan
#

you dont need the ;

#

maybe idk

#

but at least sqlite doesn't need that

earnest sonnet
#

It will run, but it's recommended to be there

hardy swan
#

oh

hoary knoll
#

mysql does need it

#

just in case the query is multiple lines

earnest sonnet
#

Yep, the JDBC is inserting it by itself if it's skipped and that's the reason they rec to add it (as mentioned above)

hardy swan
#

nvr heard of MySQL class, is that sth from MySQLConnection or sth

tardy delta
earnest sonnet
#

yes

hybrid spoke
#

yep

#

i could send you some examples but you won't understand them and the code is not clean at all

tardy delta
#

maybe i will

dusk flicker
#

I have a simple menu lib but it's not great for certain applications, I can send it aswell if you are interested