#help-development

1 messages · Page 368 of 1

quiet ice
#

I didn't say that

dry yacht
#

.

#

Not using x in conjunction with y means using x without y in my brain

quiet ice
#

"Not using X with Y" means not using X at all

#

Not not using Y

dry yacht
#

:-:

smoky oak
#

give up mate

#

getting a straight answer from geol thats not code related is impossible

dry yacht
#

I'm sorry for starting this, xDD. I misinterpreted the order of operations, as I wasn't thinking mathematically, my brain feels like a mashed potato today.

dry yacht
#

Had no idea you were that specific with your statements, xD

quiet ice
#

To be fair most of this is caused by the english language not using commas aggressively

dry yacht
#

Let's just settle on: (not using <li>) in conjunction with ol. xDD

#

I had no idea there were people out there who would do that, which is why I completely discarded this case of interpreting your sentence.

tender shard
#

Compared to eg german or latin at least

river oracle
#

english is amazingb

quiet ice
#

It actually was intended to be "not using <li>, in conjuction with <ol>"

tender shard
smoky oak
#

wtf

#

how in the world is that explicit

#

whoevers responsible for clyde ur bots broken

dry yacht
quiet ice
smoky oak
#

its still correct

river oracle
#

why is there so many "the"s in german

quiet ice
#

Implicitly, it is false

tender shard
smoky oak
#

oh right alex is german

tender shard
#

And the gender

#

And singular/plural

river oracle
#

this just reminds me of trying to learn the difference between por and para in spanish and it makes my brain hurt

smoky oak
#

iirc finnish is worse with like 13 cases

tender shard
#

Para is like ablative in latin, por is dative and accusative

tender shard
river oracle
#

that'd help a lot if I knew any latin whatsoever

tender shard
#

Latin got 6 cases but one is basically useless

quiet ice
#

It also implicitly states that german has no plural form - but it does. Singular forms are der (masculine), die (feminine), das (neutral), where as the pular form is die (regardless of grammatical gender)

tender shard
river oracle
tender shard
#

It could also be „den“ or whatever

tender shard
smoky oak
quiet ice
tender shard
#

The alternative would have been french - ofc i chose latin

quiet ice
#

Oh, why not spanish?

smoky oak
#

i believe they also have like spanish, greek and french

river oracle
#

that is so strange

quiet ice
#

Many people picked latin at my school - almost everyone rued it

tender shard
smoky oak
#

well germany goes 'require german 1-10, english 4-8, one of 2 choices third'

river oracle
#

I find it confusing that they prioritize a dead language over something like Spanish etc

smoky oak
#

had a friend who told me they had greek

#

ye olde greek btw

tender shard
quiet ice
dry yacht
tender shard
quiet ice
#

Ah right lol

smoky oak
river oracle
quiet ice
#

English classes start with grade 3

tender shard
#

It depends on the country i guess. My class in NRW was the first to start in grade 3

smoky oak
quiet ice
#

Although to be fair it only really starts at grade 5. Grade 3 & 4 english is nonsense

tender shard
#

But hey, gotta start somewhere lol

river oracle
#

I started spanish in 2nd grade american schools must just be shit at teaching language

quiet ice
#

It's even worse: "Apple.", "Pencil.", "Book."

tender shard
#

I mean, in latin we also didnt start off with ACI Constructions or plusquamperfekt lol

smoky oak
#

i mean

#

better than how they started latin with us

#

'heres a speech. translate.'

#

wtf

tardy delta
quiet ice
tardy delta
#

well actually i got 49.x% and they gave me 50

river oracle
quiet ice
#

You do need to know latin if you want to be a history prof in german though

river oracle
#

I can't imagine my doctor needing to know latin

tender shard
#

Lol

lost matrix
#

Heiliges Römisches Reich

smoky oak
#

latin started dying out in like 16th 17th century

#

also you dont need to speak english to teach the history of the english empire i dont think?!

#

why would you need to know the language spoken to teach history about that thing

quiet ice
#

Well you only need to have your "latinitium" (or however it is written out), which is basically a blank sheet of paper proofing that you did learn latin at some point.

tender shard
#

At least in law, many basic rules are still in latin. In dubio pro reo, actio libera in causa, etc etc

lost matrix
#

Holy Roman Empire was the predecessor of the first german empire.

quiet ice
#

Whether you still know it is something else entirely

smoky oak
tender shard
smoky oak
#

dont

tender shard
#

Ok

quiet ice
lost matrix
#

Sad that we didnt really learn about the history before Around 1890.
It was 1 year WWI and from then on only the horrible things we did in WWII with
the following economic miracle, cold war until the fall of the berlin wall.
Everything before that is not really tought.

quiet ice
#

Which country?

#

Ah you're german iirc.

smoky oak
#

a lot of this chat is german

lost matrix
smoky oak
#

for some reason

quiet ice
#

A bit strange though, usually we exclude everything happening past 1945

smoky oak
#

i mean

#

60 years of not doing much

#

hooray?

#

whats there to teach besides the stupidity of russia

quiet ice
lost matrix
#

I think it we had 1 year 1900 - 1918 then a ton of years 1933-45 and maybe one year for 1945-1980

tender shard
smoky oak
hazy parrot
#

my country had quite an history in 90's, so we teach about that alot 😄

tender shard
lost matrix
hazy parrot
#

Balkans

lost matrix
#

Ah... Yes

#

Forgot the iron curtain

smoky oak
#

we did like a school project and in walks this middle aged lady

#

everything about her was grayscale

#

like everything everything

#

clothes, make up eyes

#

and i was just looking at her confused if my eyes were working or not

tender shard
#

Lol

tawny bear
#

Hey everyone,
Has anyone every tried to spawn a command block with a command in it? I tried but the command is not actually updated in-game. Here is the code snippet:

Block block = Bukkit.getWorld(world).getBlockAt(100, 100, 100);
block.setType(XMaterial.COMMAND_BLOCK.parseMaterial());
CommandBlock commandBlock = (CommandBlock) block.getState();
commandBlock.setCommand(command.toString());

The block spawns without the command in it, and I guess the block state is not linked but I don't see how I can set the state on that block again

smoky oak
#

block.setBlockState(commandBlock) or smth?

#

idk

tender shard
eternal oxide
#

commandBlock.update()

tender shard
tawny bear
tender shard
#

I only discovered this 10 minutes ago

quiet ice
smoky oak
#

unfortunately it isnt

tender shard
smoky oak
#

germany is that one land with far too much paperwork

#

you get a certificate for everything and also need one for doing anything

quiet ice
quiet ice
#

However the summaries of these standards do match up with each other and the rest of the document, so it cannot be outright considered to be a definite scam

tender shard
#

I just ordered some dude to my house, me showed some materials, i chose some that looked nice, then 6 weeks later he brought the finished curtains. He didnt mention this „acoustic stuff“ even once lol

eager jacinth
#

Hello everyone! I have a question about databases. Is it a good idea to load users from a database (on plugin start-up) if I only have 20-30 of them there? Or is it better to load them on login and delete them on disconnect?

tender shard
#

If its only 20-30, id just load everything on startup lol

quiet ice
smoky oak
#

id do login

tender shard
tender shard
#

I also dont really care

quiet ice
tender shard
#

The curtains look nice

quiet ice
#

Wirecard completely showed that germany is completely incompetent at being serious

tender shard
quiet ice
#

Never heard of them.

tender shard
#

Spigot plugin with a crypto miner or sth similar

#

I dont remember it 100%

#

About a year ago

quiet ice
smoky oak
#

also on unload

quiet ice
#

that is obvious, so was omitted

smoky oak
#

people are stupid me included

tardy delta
#

ig that works lol, i probably want ||

tardy delta
#

damn discord made a bigger images preview

tender shard
#

they did?

#

where

tardy delta
#

i better hope thats right

tardy delta
lost matrix
#

No? Where is that from?

smoky oak
#

no

#

we have to click the message

tender shard
tardy delta
#

new update ig

smoky oak
tender shard
#

why

dry yacht
smoky oak
tardy delta
#

images also fit next to e/o

#

lemme paste smth

tender shard
#

that's an lgbtq discord lol

#

unicornia

smoky oak
#

i have so many questions about that screenshot lol

tardy delta
smoky oak
#

how the fuck

tardy delta
#

ahaha

lost matrix
#

No they are

tender shard
#

for me it's next to each other

smoky oak
#

imma reload

chrome beacon
tardy delta
#

i better dont spam this channel with cats

smoky oak
#

why not

tender shard
#

why not? it's basically general

#

no questions = this is general

tardy delta
#

heehee

smoky oak
#

oh i have a good one

#

1sec

tardy delta
#

uhh anyways, are there other boolean operators than or, and, xor and not?

smoky oak
tardy delta
#

got these ones already

#

lmao

tender shard
smoky oak
#

like the thing with the t f t t table

tardy delta
#

the what table

#

xnor sounds goofy lol

dry yacht
tender shard
#

only if someone asked a question

dry yacht
#

Oh, I thought general was general and help-development was not general

smoky oak
#

md5 isnt online

dry yacht
#

Bc somebody once got agitated, xD

lost matrix
tender shard
tardy delta
#

its years ago since i watched it

#

im more into family guy now

tender shard
#

im watching the simpsons right now

#

the episode where homer becomes a krusty imitator

lost matrix
tardy delta
#

damn chatgpt very useful

#

i might aswell allow 1 == 2 as valid syntax

#

and add boolean operators

lost matrix
#

Yes

#

This is done with custom fonts for example

#

Im not sure i understand that sentence...

tardy delta
#

you become chinese 🤡

lost matrix
#

9x<>
What does that even mean?

#

Why do you have a height of 200?

#

For 16x16 images the font should look like this

#

Then you need to play around with the properties

visual lodge
#

Hello dev community
I found this plugin called RasberryJuice thats basically an API that connects Python to your spigot server and you can do basic cool tingz, may've heard of it
but like the latest version that i could find of it was 1.16.5 which I cant apply it to my own server (thats on 1.19)
Any idea what i can do? Does anyone know any similar plugin thats on 1.19 or is there a way to somehow tweak the plugin file so that its recognized as 1.19?

tender shard
#

looking at the source code, it should work fine using 1.19

#

however why not just use java? that'd be so much easier

tardy delta
#

average python enjoyer

tender shard
#

beautiful

tardy delta
#

lol

remote swallow
#

sus

tardy delta
#

imagine not having it like this

tender shard
#

nah it's supposed to look like this

tardy delta
#

macos 🥺

#

check your pms

hushed spindle
#

💅

#

does anyone elses intellij like to have a stroke and hit 100% cpu usage in the matter of seconds because you double clicked something to select it

tender shard
#

on windows, this indeed does happen to me like once a week

#

on mac this never happened

#

just like 2-3 hours ago it crashed because of this

tardy delta
#

nah only minecraft makes my cpu hit 100%

tender shard
#

well not sure whether it was because of selecting sth, I just tried to click somewhere to select sth and then "IJ has stopped responding..."

hushed spindle
#

i gotta shut it down thru task manager or my fans are gonna go zoom

tardy delta
#

fans go zoom zoom

hushed spindle
#

i cant catch my pc once it starts taking off

#

it becomes like an aircraft

tender shard
#

oh and this does only seem to happen when having the shitty "minecraft development" plugin enabled

hushed spindle
#

oh that might be it

tender shard
#

without it, this never happened to me

hushed spindle
#

it only really started happening to me about a month ago

#

maybe i can just use an older version and itll be ight

tender shard
#

do you actually need that plugin? I mean, it doesnt even do anything for spigot

#

(except displaying chat colors)

hushed spindle
#

its nice when making a new project and you're lazy

#

but once you got it going you dont need it

tender shard
#

the first link is just a GUI for it

hushed spindle
#

oh thats sick

tender shard
#

I made that to avoid having to copy/paste the same and the same dependency information every time again (ACF, MockBukkit. etc bla bla)

hushed spindle
#

very nice

#

think ill be using that for sure

tender shard
#

:3

#

if you're missing a dependency that you regularly use, you can just pull request it to the archetype repo, the GUI automatically updates itself

lost matrix
#

McDev plugin for the poor?

tender shard
#

for the poor? it can do way more

#

(for spigot, at least)

#

the mc dev plugin just creates the same lame pom everytime

#

cannot remap, or create an exportToServer profile, doesnt allow to include any other dependencies, etc

lost matrix
mighty pier
#

how check if string contains letters not from ascii table

tender shard
#

Just like always

lost matrix
#

Same as you would check with letters from the ascii table

tender shard
#

Theres nothing special about not-ascii

hushed spindle
#

boolean isAscii = CharMatcher.ascii().matchesAllOf(someString);

#

if you wanna test an entire string for ascii only

mighty pier
#

ok

hushed spindle
#

from com.google.guava

tender shard
#

Oh thats what you meant

mighty pier
#

guava caching

dry yacht
hushed spindle
#

this is jeff media we talking about here

#

only bangers

#

i saw that custom block data stuff of his and i shat myself

#

so very useful

tender shard
#

Now i also gotta advertise morepdc

smoky oak
#

feels like alex is the only one here writing javadoc

tender shard
#

?morepdc

undone axleBOT
tender shard
lost matrix
#

Wait let me in on the hype... But i always forget my commands PES2_SadGeRain

#

?workdistro

smoky oak
#

on that topic

#

does anyone know what asyncworldeditinjector does

mighty pier
#

poll

tender shard
#

maybe I'm confusing it with someone totally different

#

maybe, probably, ...

smoky oak
#

well its from a 1.8 server dump

#

soo

#

maybe

tender shard
#

This plugin has only one function: eliminate the lag caused by the WorldEdit! This is done by replacing the WorldEdits session with an special asynchronous one.

#

so yeah that's what it does

sterile token
#

Is the bungeecord-proxy the equipvalent of importing the full core?

#

Because maven is not currently resolving it

tender shard
#

bungeecord is not on the normal spigot repo

#

it's on the sonatype repo

sterile token
#

oh right

#

That why 🤦‍♂️

tender shard
#

you normally need to import bungeecord-api, not bungeecord-proxy

sterile token
tender shard
sterile token
#

Yeah

#

What i have said

#

spigot-api doesnt contain packet related and in bungeecord happen the same

tender shard
#

yeah then you probably need bungeecore-proxy, yeah

sterile token
#

yes, but so far maven was founding it that why i came here haha

#

That is something that i dont like about third party, why dont they put all in same self hosting

#

Instead of making us dev to add thousans of different repo, for dependencies made by the same author/company, its something really clown. But so far they are not my libraries i dont care about how they do it

tender shard
#

if at all, you should complain why not everything's on maven central

sterile token
#

oh wait md5 didnt do the proxy? I thought he did the proxy when he started with Spigot

#

I didnt know they where different authors

cunning canopy
#

It seems intellij aint a big fan of this: ```java
meta.displayName(ChatColor.YELLOW + "" + ChatColor.BOLD + "Lightning Stick");

sterile token
tender shard
#

SpigotMC says "BungeeCord is a useful software written in-house by the team at SpigotMC." but the bungee pom.xml says "Proxy component of the Elastic Portal Suite" lol

#

so no clue

#

maybe md did write it, i dont know

cunning canopy
sterile token
lost matrix
sterile token
tender shard
#

the proper spigot method is setDisplayName(String)

#

it's whereami

#

verano

sterile token
#

right i alays writte it wrongly

#

Yeah mfalex, the bungee description are diff i just realize that

cunning canopy
#

Welp. Sorry. It's a fork so alot of stuff is pretty much the same. Much bigger community here.

sterile token
smoky oak
#

i just build my shit for spigot

#

so it runs on paper too

tender shard
#

if you see any setters without "set" in the name, it's a paper method

#

spigot doesn't use weird "fluent" names

smoky oak
#

wait spigot has method to its madness?

#

since when?

sterile token
cunning canopy
#

Is paper plugins faster then spigot plugins?

sterile token
smoky oak
#

its usually the same speed

#

paper is just built with anti cheat in mind

cunning canopy
#

Alright, I guess I will just move back to spigot then

smoky oak
#

imo its better to build for spigot

#

so it also runs on paper

sterile token
tender shard
#

I always code for spigot, use spigot.jar to test my plugins, but for actual servers I use paper .jar

cunning canopy
#

Can I just change the gradle dependency or do I need to make a whole new project?

tender shard
#

you can just change the dependency

#

however

sterile token
tender shard
#

if you already used paper methods, you will now get compile errors you gotta fix

#

for example: PersistentDataContainer.has(NamespacedKey) is a paper only method

cunning canopy
tender shard
#

well if you use paperweight for NMS, you cannot just go back to spigot on gradle

cunning canopy
#

I havent actually implemented any nms stuff yet though

tender shard
#

for remapped NMS on spigot, there's only an official maven way to do

tender shard
#

then just get rid of the paperweight stuff and use "spigot" or "spigot-api" as dependency

#

(usually, you want to use modules for your NMS stuff anyway, then you could just use paperweight in the submodules, but keep the "core" module to spigot-api)

cunning canopy
#

ah paperweight has a lot of plugins and weird stuff in the gradle file so I think it will be faster for me to just create a new project

regal scaffold
#

Does API-version mean the minimum version required? Or a list of all versions

regal scaffold
#

ty

smoky oak
#

NMS often needs very specific versions

tender shard
#

Hm?

#

We are talking about plugin.yml

cunning canopy
#

What is groupid? Is it my domain?

smoky oak
#

*spigot

#

im dumb

#

i mean spigot

regal scaffold
#

The specific version stuff goes inside the plugin not in plugin.yml

tender shard
regal scaffold
#

Like the nms logic and such

remote swallow
tender shard
#

If you own a domain, use it in reverse

#

Otherwise, me.yourusername or whatever

cunning canopy
#

can I use io.github.miklath?

tender shard
#

Yes

cunning canopy
#

thanks

tender shard
#

Technically you can use almost anything

#

It just should be sth unique to you

smoky oak
#

im just using the github thing

#

problem solved

tawny remnant
#

Hello. I would like to ask you, how I can make an item in my plugin unplacable. Thank you.

tender shard
smoky oak
#

check on placement if it has it

#

if yes cancel

cunning canopy
#

Does everyone in the spigot community use maven

tawny remnant
#

Thank you dear man

smoky oak
#

most people use either maven or gradle

#

but not all

tender shard
#

I feel like roughly 50% use maven, 30% gradle and 20% nothing lol

cunning canopy
tender shard
#

Probably both lol

twilit roost
#

Hey! I just found some interesting bug.
Java can't run replaceAll when String contains $
I tried running my command, which sends message to player with $ as message.
I get this error:
https://paste.md-5.net/yebojadoho.bash

Pointing towards first .replaceAll mention in my code

cunning canopy
#

Isnt there like a lot of preformance benefits to gradle?

tender shard
#

Just use replace

#

It also replaces „all“ occurences but it uses plain strings, not regex

twilit roost
#

will it still replace all mentions of pattern given?

tender shard
#

Yes

twilit roost
#

oh great
tysm

tender shard
#

replaceAll is a poor name

#

It should be replaceAllRegex

twilit roost
#

or replaceRegex

tender shard
#

And replaceFirst should be replaceFirstRegex

twilit roost
#

would make a lot more sense

sterile token
#

yeah

#

Java designed of some things is pathethic

tender shard
#

„aaa“.replace(„a“,“b“) will be „bbb“

sterile token
#

hee? How?

tender shard
#

Hee?

#

Because it replaces a with b?

#

What else would it result into

sterile token
#

Hmnn

#

shouldnt just be: String#replace("pattern", "value") ?

tender shard
#

Its an instance method, not static

sterile token
#

ik

tender shard
#

If it would be String.replace(…), then what would be the string you call it on?

sterile token
#

because you sent something weird

#

Maybe my discord is broken and doesnt format it properly

tender shard
#

"Hello Verano".replace("Verano", "mfnalex")

#

Thatll result in „Hello mfnalex“

sterile token
#

oh you are using wrong "

#

that why i didnt udnerstand

tender shard
#

Yeah im on the phone

#

It automatically does it

sterile token
#

ohh my bad

tall dragon
#

frigging phones

sterile token
#

sorry for losting ur time

tender shard
#

„This is how quotes work in german“

cunning canopy
#

Command for building maven plugin from terminal?

tender shard
sterile token
tender shard
#

But i got sth better for you

tall dragon
tender shard
cunning canopy
tender shard
#

Oh wait thats just the gui

tall dragon
#

idk if you'll have it too but i can switch between keyboard languages when holding the spacebar. to my own and english.

tender shard
tender shard
cunning canopy
#

Oh no. I was talking about building artifacts

sterile token
sterile token
tender shard
cunning canopy
#

Sounds like you two disagree

tender shard
#

Package = compile and package into a jar

sterile token
cunning canopy
#

I guess it was

tender shard
#

clean package = clear caches, then package

#

You should run „mvn clean package“ when you changed your pom or resource files

#

Otherwise if you only changed code, normal „mvn package“ is enough

tall dragon
#

i always do mvn clean package by default tbh

#

or install if i want to use it

cunning canopy
#

I always make batch files for my projects

tender shard
cunning canopy
#

building pushing to the server and making the server restart automatically

tender shard
#

Sure, clean removes everything that was cached

tall dragon
#

i actually am working on quite the multi module project

#

gotta test that

sterile token
#

Does IJ have an option for having global configs sets for applications? So then i dont need to make mc server configuration on every IJ project

tall dragon
regal scaffold
tall dragon
#

so you are correct it seems 😮

regal scaffold
#

Why would Papi return null if it's set as a soft-depend

#

Oh wait I have my answer already

sterile token
tender shard
tall dragon
#

aperantly so

#

did not know that was such a big dif

tender shard
#

Jefflib is roughly 1:30 with clean and 30 seconds without

tall dragon
#

but i used to sometimes run into very odd issues when i did not clean

tender shard
tall dragon
#

i don't have enough braincells to remember that though

tender shard
#

If yes: you shaded it into your plugin

#

Dont do that

sterile token
regal scaffold
#

Thanks alex

sterile token
#

I never find how to sync spigot server with IJ only time for every IJ project

#

Because actually i havent find a way to dont configure the spigot server and IJ when i change from one IJ poroject to another

tender shard
sterile token
#

Do i explain?

tender shard
#

Uughm no clue what you mean

#

You mean the build configuration?

sterile token
#

1m i will take a picture

#

That thing for being specific, i want to know if there is a way for setting that globally so i dont need to configure it on every IJ project

tender shard
#

Ah yeah you can definitely store that globally, but tbh no clue how, im in the bathtub lol

sterile token
#

oh right

#

No problem

tender shard
flat yacht
#

hello. i want to do simple teleport plugin. when player stays on certain block from config it teleports him to a location and it have to work reverse too. i got many errors on player move event

#

pls help

hazy parrot
#

Show full stack trace pls

tawdry echo
#

^

flat yacht
tawdry echo
#

null bro

hazy parrot
#

Line 23 is throwing it

tawdry echo
#

plugin is null

#

use depency injection

hazy parrot
#

well lmao

#

you didnt init plugin variable

#

you just declared it

#

?di

undone axleBOT
hazy parrot
#

or use static getter

tawdry echo
#

di>

flat yacht
#

alr thanks

tender shard
hazy parrot
#

i bet there is no reason

tender shard
#

both have their advantages

#

I mean, for actual PROPER dependency injection, one would pass the location to the listener, instead of the plugin instance

#

if you just throw your plugin instance into everything, you could as well just directly use MyMainClass.getInstance()

#

DI means to pass in the required dependencies, and not just your main instance all the time

cunning canopy
#

Does maven delete the target folder for every build?

tender shard
#

no

#

thats what clean is for

cunning canopy
hazy parrot
#

why would you have git repo inside of target folder

onyx fjord
#

^

hazy parrot
#

seems like you are doing smth wrong tbh

cunning canopy
#

so I can push jars to my server?

hazy parrot
#

gh releases

cunning canopy
#

and no I wont build on the server

onyx fjord
#

what repo do u have in your target folder

cunning canopy
#

that automatically pulls new jar files

tender shard
#

to publish it to some repo

cunning canopy
#

please elaborate

tender shard
#

do you have a webserver or anything?

#

mvn publish will upload your stuff to a repository, e.g. nexus. but it can also just be some FTP(S) server or anything

cunning canopy
tender shard
#

ofc but I gotta go now

cunning canopy
#

alright thanks

hazy parrot
#

if ur using gh, you can utilize gh workflow

#

or actions, however they are called

#

which will for example build plugin on every pull request and upload it via (s)ftp

cunning canopy
#

Will it build on my machine or cloud?

hazy parrot
#

on cloud

cunning canopy
#

Wow thats fantastic!

#

Free?

hazy parrot
hazy parrot
#

but you have some amount of free hours

eager jacinth
#

Yo guys. This may seem like a very strange question, but anyway. Should I cache null-values when working with a database? 🤔

quaint mantle
#

Im not sure what I have done here, Im just switching from Eclipse to IntelliJ, and its chiming at me in console:

17.02 21:36:56 [Server] [INFO] java.lang.ClassNotFoundException: com.a113.discordtest.Main

Any advice would be wonderful

delicate lynx
#
  1. how are you compiling your plugin
  2. folder structure should be <root of project>/src/main/java/<your package>
desert tinsel
#

Does anyone know how can I make a plugin that everytime when you have more than 9 iron ore, transform 9 of them into an iron block (just an example). I don't think listening for BlockBreakEvent will be the best solution, thanks.

remote swallow
#

listening to block break event is probably the better option imo

desert tinsel
#

But when there are 100 players mining together?

remote swallow
#

check the block they mine

#

if its iron ore theres your answer

desert tinsel
#

Yes but this was an example, for a mining server every block needs to be calculated

dry yacht
cunning canopy
dry yacht
#

If you're doing it to learn something new it's great, otherwise it's just a complete overkill. Only because it's an enterprise doesn't mean that you have to look up to them and take every action they perform as the ultimate solution.

hazy parrot
#

what is the best way to get current cpu usage ?

cunning canopy
#

Why is it overkill though? I love automation

cunning canopy
hazy parrot
#

programically

cunning canopy
#

oh

dry yacht
dry yacht
worldly ingot
#

CPU stuff in Java is annoying

hazy parrot
cunning canopy
worldly ingot
#

It's not really something the JVM knows about so to speak. It has to call specifically to some implementation details

#

Reason it uses reflection is because there are different implementations of the OS depending on whether or not you're on OSX or Windows

hazy parrot
worldly ingot
#

Yeah, the details of it are hidden behind unexposed methods for some reason

#

(note that's an internal class)

dry yacht
# cunning canopy I dont test ony a local server I test on production 😎 😎 😎 😎 😎 😎 😎 (speak...

You can of course go the route of setting up GH actions, it will be a great learning experience for you, don't get me wrong. I don't want to discourage you from doing so. But the scp version most definitely gives you more for the time you have to invest. You can whip that up in a few minutes, while actions will take a bit for you to fully understand them and actually implement it properly.

If you're working on it alone, there's no need to test and deploy centrally. I'm just a big fan of letting the system grow with the demands in a natural fashion, instead of going all out on the beginning already.

dry yacht
cunning canopy
dry yacht
#

It's a command that should be available on all operating systems nowadays.

dry yacht
cunning canopy
#

ah. can it be automated?

dry yacht
#

You need to just make maven run a shell script after finishing the package phase, which then contains the invocation of that command. I'd recommend storing host, username and password in environment variables in a separate file which you add to .gitignore and source at the beginning of that script.

#

Just wanted to give you another simpler solution, you can research both and make up your mind afterwards, of course.

cunning canopy
dry yacht
#

Well, is your current build system a batch-file?

cunning canopy
dry yacht
worldly ingot
#

Yeah, like I said, it's not great lol. It's just the only way to get that information in the stdlib

dry yacht
# cunning canopy almost... ```bat call mvn clean package scp stuff here ```

Oh yeah, sure, that would work! mvn clean package blocks until the jar is built, then you could just invoke scp on the target folder's jar file. If you add that batch file to .gitignore, you might as well hard-code the credentials. No idea how you can run scp on windows tho, I haven't used that OS for many years.

cunning canopy
dry yacht
quiet ice
#

Doesn't minecraft shade in a library that supports such features?

dry yacht
worldly ingot
#

If it does, it wouldn't be on the server

quiet ice
#

OSHI should be able to get such functionalities

worldly ingot
#

Client only for the F3 menu

cunning canopy
worldly ingot
#

I'd be hesitant lol

quiet ice
#

I'd not invoke top

dry yacht
quiet ice
#

Especially since top is not meant to be parsable

cunning canopy
#

Oh. I forget that people are developing plugins that they are distrubuting.

cunning canopy
quiet ice
#

OSHI is a free JNA-based (native) Operating System and Hardware Information library for Java. It does not require the installation of any additional native libraries and aims to provide a cross-platform implementation to retrieve system information, such as OS version, processes, memory and CPU usage, disks and partitions, devices, sensors, etc.
I'd really just use OSHI

#

Since all roads lead to JNI anyways

#

Although with panama it might be a slightly different story

#

And I know that paper shades in OSHI for /timings - so you'd only need to shade in the library yourself for spigot users

cunning canopy
#

Ah. I love being a sysengineer in my own home

#

Especcialy when all the servers are laptops that somehow manages to unplug themselves

dry yacht
quiet ice
#

Yes

eternal oxide
#

I've used JNA but not OSHI

dry yacht
eternal oxide
#

used it to interface with FFMPEG

quiet ice
#

However there is OSHI-FFM which uses panama and henceforth works a bit differently since panama allows to write stuff with less C

#

But OSHI-FFM is still in dev for the forseeable future due to panama being very new

hazy parrot
#

looks like thingy from com.sun works

tall dragon
hazy parrot
#

ya

small hawk
#

Hi guys, i have a problem, I want to block a way for player to put items in offhand slot in their Inventory (I already blocked the F shortcut). I can't get right the checks in event. Can someone help me out? I will give you below what I have already got

    @EventHandler
    public static void withHeartInventoryOffHandClick(InventoryClickEvent event) {
        if (event.getCursor() != null) {
            System.out.println("bim");
            if (event.getCurrentItem().getItemMeta() != null) {
                if (event.getCurrentItem().getItemMeta().equals(ItemManager.life_heart.getItemMeta())) {
                    System.out.println("bam");
                    if (event.getRawSlot() == 45 && event.getClick() == ClickType.LEFT) {
                        event.setCancelled(true);
                    }
                }
            }
        }
    }
hazy parrot
#

?arrowcode

undone axleBOT
small hawk
wet breach
#

if you want cpu usage consumed by java you don't need reflection for it

hazy parrot
#

consumed by jvm

#

ended up doing

OperatingSystemMXBean operatingSystemMXBean = (OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean();
cpuUsage = operatingSystemMXBean.getProcessCpuLoad();
wet breach
# hazy parrot ended up doing ```java OperatingSystemMXBean operatingSystemMXBean = (Operating...
ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();

for(Long threadID : threadMXBean.getAllThreadIds()) {
    ThreadInfo info = threadMXBean.getThreadInfo(threadID);
    System.out.println("Thread name: " + info.getThreadName());
    System.out.println("Thread State: " + info.getThreadState());
    System.out.println(String.format("CPU time: %s ns", 
      threadMXBean.getThreadCpuTime(threadID)));
  }
#

gives you cpu time in ns for all threads being used by java

dry yacht
wet breach
#

could even add the cpu load thing too to it

wet breach
#

the other way you could do it, if you wanted the cpu load of the whole system would be to drop out of java and invoke the console

small hawk
dry yacht
small hawk
#

okay, so i removed it, now it allows me to put in offhand slot and every other move from offhand slot is cancelled

dry yacht
small hawk
dry yacht
neon badge
#

Anyone know why but when i restart my server the stats in the scoreboard resets ^^ i use hashmap

gloomy ruin
#

Im using PvPManager, does anyone know how i can make it so people with op can get into combat

hazy parrot
#

It only stores in memory, which is of course removed after restart

thorn crypt
#

Hi, I'm using ProtocolLib to send a fake block to a player but it doesn't want to work, I'm using this code :

PacketContainer packet = Main.getInstance().protocolManager.createPacket(PacketType.Play.Server.BLOCK_CHANGE);
        packet.getBlockPositionModifier().write(0, new BlockPosition(x, y, z));
        packet.getBlockData().write(0, Bukkit.createBlockData(block));

        // Envoi du packet au joueur dans le monde spécifié
        try {
            Main.getInstance().protocolManager.sendServerPacket(player, packet);
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        }

But on line 3 it doesn't accept Bukkit.createBlockData(block) and suggest me to Cast it as "WrappedBlockData" or "Wrap using WrappedBlockData.fromHandle()" but neither of them work, it get me a error in console saying :

Caused by: java.lang.IllegalArgumentException: handle (CraftBlockData{minecraft:gold_block}) is not a class net.minecraft.world.level.block.state.IBlockData, but class org.bukkit.craftbukkit.v1_19_R1.block.data.CraftBlockData
neon badge
thorn crypt
eternal oxide
neon badge
thorn crypt
thorn crypt
thorn crypt
thorn crypt
hazy parrot
#

?pdc

terse pumice
#

How can I get/edit the contents of a composter? By contents I mean the bonemeal output, not the levels

eternal oxide
terse pumice
#

yeahh, but how do I get that inventory aha

eternal oxide
#

good question

#

it seems to not have a block data type

terse pumice
#

yeahh- that's the road block I've hit haha

eternal oxide
#

ah it has BlockData type of Levelled

terse pumice
#

it does indeed

eternal oxide
#

so getBlockData() and cast

terse pumice
#

what am I casting it to? Levelled?

eternal oxide
#

yes

terse pumice
#

how do i get the contents from that?

#

from my understanding that only allows me to get/set the level of the composter

eternal oxide
#

um that gives you a levelled data you can change how much is in it

#

I guess how full

terse pumice
#

yeahh, i'm trying to change the actual item in it when it's full

eternal oxide
#

oh

#

you'd probably have to intercept the interact event to prevent it throwing things out when you click on it

remote swallow
#

might be on block drop item event

eternal oxide
#

^

#

could be

terse pumice
#

let me give it a shot!

terse pumice
#

I was going to "setCancelled" player interact but wasn't so keen

eternal oxide
#

that seems to indicate it only fies on a block break but you'll have to test and see

terse pumice
#

will do :)

eternal oxide
#

I'd probably try harvest first

terse pumice
#

ooh good idea

#

neither appears to work unfortunately

eternal oxide
#

No clue then

terse pumice
#

might just have to cancel the event and handle it myself

#

not ideal

regal scaffold
#

Why does my plugin correctly hook into vault in my test enviorement but other people report that a no vault dependency is found?

#

Why would this be the case

eternal oxide
#

load order varies

#

only initialize your vault dependency 1 tick after your onEnable

regal scaffold
#

Ah

#

Didn't see that in their api

buoyant viper
#

not sure exactly how it could be utilized tho

regal scaffold
eternal oxide
#

just runTask no need for later

#

it will always try to run in the next tick

terse pumice
remote swallow
#

you can also format that l ike ```java
Bukkit.getScheduler().runTask(this, () -> {
run stuff
});

regal scaffold
#

How can I disable my entire plugin if it's not found tho

#

Cause obviously "this" is no longer valid

buoyant viper
regal scaffold
#

As a plugin instance

#

Do I just static get it?

remote swallow
#

if you do that on enable just use this

eternal oxide
#

if you want to disable add vault as a depend not a softdepend

regal scaffold
#

getServer().getPluginManager().disablePlugin(Bukkit.getPluginManager().getPlugin("BetterPrefix"));

remote swallow
#

just use this

regal scaffold
#

Vault is a depend

remote swallow
#

you will still have a plugin instance

regal scaffold
#

Oh

eternal oxide
#

then your plugin will nto enable if it's absent

regal scaffold
#

Ok ok

golden turret
#

sorry to annoy you but do you remember how you made the custom blocks?

regal scaffold
#

Still some users are reporting errors

eternal oxide
#

you can't be initializing correctly

regal scaffold
#

I'm checking the logs file and vault is actually loaded fully before too

eternal oxide
#

can't do more without seeing code

regal scaffold
#
        Bukkit.getScheduler().runTask(this, () -> {
            if (!setupEconomy() ) {
                log.severe(String.format("[%s] - Disabled due to no Vault dependency found!", getDescription().getName()));
                getServer().getPluginManager().disablePlugin(this);
                return;
            }
            setupPermissions();
            setupChat();
            log.info(String.format("[%s] - Plugin was enabled successfully!", getDescription().getName()));
        });
#

I copy pasted exactly what vault does

#

It works perfectly for me

#

Just not for a specific user

eternal oxide
#

get his server log. make sure he really has vault

regal scaffold
#

I do have it

#

I even got his timings report

#

I'm trying to understand why it works on my test setup but not for him. Nothing is different

#

I even see other plugins successfully getting vault

#
[07:39:06] [Server thread/INFO]: [Vault] Enabling Vault v1.7.3-b131
[07:39:06] [Server thread/INFO]: [Vault] [Permission] SuperPermissions loaded as backup permission system.
[07:39:06] [Server thread/INFO]: [Vault] Enabled Version 1.7.3-b131
[07:39:06] [Server thread/INFO]: [LuckPerms] Registered Vault permission & chat hook.
#

In their api. vault has

        if (getServer().getPluginManager().getPlugin("Vault") == null) {
            return false;
        }
#

Can't I just remove it since I have it as a depend in my plugin.yml

#

It won't even reach that part if it's not present

eternal oxide
#

not safe to

regal scaffold
#

What else could it be

#

I even got his vault jar checked if it was the same and it worked for me

eternal oxide
#

shwo your pom

#

?paste

undone axleBOT
regal scaffold
#

It's set to provided

eternal oxide
#

k

#

so long as it is a depend and not a softdepend then spigot will always load your plugin second

#

softdepend is not guaranteed

regal scaffold
#
depend: [Vault]
softdepend: [PlaceholderAPI]
#

Yes

eternal oxide
#

and as long a you hook vault 1 tick after onEnable there is no reason for any issues

regal scaffold
#
        Bukkit.getScheduler().runTask(this, () -> {
            if (!setupEconomy() ) {
                log.severe(String.format("[%s] - Disabled due to no Vault dependency found!", getDescription().getName()));
                getServer().getPluginManager().disablePlugin(this);
                return;
            }
            setupPermissions();
            setupChat();
            log.info(String.format("[%s] - Plugin was enabled successfully!", getDescription().getName()));
        });
#

Yet he still gets the same error

eternal oxide
#

his error is the output you do for no vault?

regal scaffold
#

Yup

#

[%s] - Disabled due to no Vault dependency found!

eternal oxide
#

makes no sense

remote swallow
#

if it works for you not him, get him to send you his vault jar

#

and test with that'

regal scaffold
#

I have his vault jar

#

And it works for me with his vault jar

eternal oxide
#

gremlins then

regal scaffold
#

I'm telling you it's the weirdest shit

#

lmao

eternal oxide
#

show us his startup log

sterile token
#

Does anyone the guy that once Sent me His storage libraur github link, i rememberit was written un kotlim, but i can find the repo

regal scaffold
#

Literally just repasted all his files to make sure

#

I'm getting him to zip his entire server and send it over

eternal oxide
regal scaffold
#

I'm gonna get to the bottom of this weird wuju

eternal oxide
#

I don;t see your vault error after that

remote swallow
#

is that vault custom compiled

regal scaffold
#

400-401\

remote swallow
#

im pretty sure the spigot version doesnt have the b131 on it

regal scaffold
#

Nope. latest of spigot

#

Yeah I thought that too so I asked for the jar

#

It's the same

eternal oxide
#

400 is before the server is loaded, before yoru onEnable has finished

regal scaffold
#

What does that mean then?

eternal oxide
#

thats not using the scheduled load yoru showed us

remote swallow
#

well line 404 says another plugin cant hook valt

eternal oxide
#

yep both attempting to hook too early

regal scaffold
#

It is, I have different logs it was a bit higher

#

You're saying all the way at the bottom of my onEnable then?

eternal oxide
#

you must be checking for vault twice

#

if it was being checked in your scheduled task it would error after line 419

regal scaffold
#

Ok wait I will change it

eternal oxide
#

unless, it's that wierd server distro he's using

regal scaffold
#

latest paper

remote swallow
#

pufferfish is a fork of purpur i think

regal scaffold
#

Checked that too

#

oh wait

#

wtf

#

It is pufferfish

eternal oxide
#

as line 405+ shows the scheduler running, but thats too early to be running tasks

remote swallow
#

its a fork of paper it turns out

regal scaffold
#

But why would some plugins correctly load vault and others not

#

Ok wait let me change something around and try again

eternal oxide
#

there are issues with that log

regal scaffold
#

Wait so elgarl

eternal oxide
#

No tasks shoudl be run before line 419

regal scaffold
#

I'm moving my scheduler inside the new runTask

eternal oxide
#

the scheduler doesn;t run any until the server is loaded

regal scaffold
#

And I moved runtask to the all bottom of onenable

#

So it will only check for vault and start the scheduler 1 tick after onenable

#

Compiling and testing on his setup

remote swallow
#

whats the scheduler for if you have run task

eternal oxide
#

actually no task should execute before line 423

regal scaffold
#

tasktimer

eternal oxide
#

that is a seriously messed up log

regal scaffold
#

Do you want me to increase the delay then?

#

Instead of 1L

eternal oxide
#

no, I want him to run a normal server and see if it works. None of those tasks shoudl run early

#

his server is broken

regal scaffold
#

xd

#

His uploading the zip

eternal oxide
#

his server runs its first task at line 390

#

WAY too early. scheduler is not started then

regal scaffold
#

Isn;t that stuff directly related to plugins tho?

eternal oxide
#

makes no difference

#

no scheduled task can be run before the server finishes loading

regal scaffold
#

His server jar has impact on that?

eternal oxide
#

the scheduler doesn;t allow it

regal scaffold
#

Yeah I understand what you mean

#

But that's a specific plugin that does that no?

eternal oxide
#

no

#

no plugin shoudl be able to start teh scheduler

regal scaffold
#
Features
Sentry Integration Easily track all errors coming from your server in excruciating detail
Better Entity Performance Reduces the performance impact of entities by skipping useless work and making barely-noticeable changes to behavior
Partial Asynchronous Processing Partially offloads some heavy work to other threads where possible without sacrificing stability
8x Faster Map Rendering Reduces or eliminates lag spikes caused by plugins like ImageOnMap or ImageMaps
30% faster hoppers over Paper (Airplane)
Reduced GC times & frequency from removing useless allocations, which also improves CPU performance (Airplane)
Fast raytracing which improves performance of any entity which utilizes line of sight, mainly Villagers (Airplane)
Built-in profiler which has 0 performance hit and easy to read metrics for both server owners and developers (Airplane)
Faster crafting, reduction in uselessly loaded chunks, faster entity ticking, faster block ticking, faster bat spawning, and more!
Complete compatibility with any plugin compatible with Paper
And more coming soon...
eternal oxide
#

you can queue up tasks in yoru plugins startup

#

but none shoudl run until the server is started

regal scaffold
#

I got the zip

#

Lets see

#

Maybe that's just how pufferfish works?

eternal oxide
#

its possible

#

in which case a LOT of plugins would break

regal scaffold
#

Who knows why people use these weird forks

#

Yeah no, not even with the changes

#

Running normal paper

#

Trying now

eternal oxide
#

Its an issue with pufferfish starting the scheduler too early

regal scaffold
#

I moved my scheduler

#

To after onEnable

#

And still didn't work

frank kettle
#

i noticed when i run something async it starts a thread number but it keeps always increasing. is this thread number the total or the number of active threads? like im afraid im supposed to "remove" them in some way to maybe decrease potential lag later on

eternal oxide
#

yep, it's not your codes fault

regal scaffold
#

Ok indeed it's pufferfish

#

Anything I can do to support it?

eternal oxide
#

complain to pufferfish they are starting the scheduler too early

regal scaffold
#

Oh oh nvm

#

Wait wait

#

Didn't work on paper either

eternal oxide
#

didn't?

regal scaffold
eternal oxide
#

scheduler starting too early? then it's one of his plughins causing it, via version perhaps

remote swallow
#

time to binary search the plugins if its not via ver

eternal oxide
#

yep 395 the scheduler starts, too early again

regal scaffold
#

Even for paper?

remote swallow
#

has to be a plugin causing it

regal scaffold
eternal oxide
#

yep

#

no task shoudl run before you see Done (15.268s)! For help, type "help"

#

line 428

regal scaffold
#

Well I see no plugin that would be doing that

#

I litearlly copied my paper jar

remote swallow
#

via ver might but ive never seen that happen with it

regal scaffold
#

Let me install viaversion on my terst

eternal oxide
#

whatever is giving this output is the likely culprit[22:12:06] [Server thread/INFO]: Successfully loaded using bukkit version: v1_19_R2 [22:12:06] [Server thread/INFO]: Found LuckPerms! Hooking in. [22:12:06] [Server thread/INFO]: Running delayed init tasks

regal scaffold
#

Hmmmm

#

I know what that is

#

But why

remote swallow
#

looks like that runs after BetterPrefix is enabled

regal scaffold
#

It should run before actually. But that doesn't require vault

#

Indeed now the error is in my test server too

eternal oxide
#

something there is doing naughty things and kicking off the scheduler early

regal scaffold
#

Ok the wierdest thing happened:

I copied his plugins folder to my test server. It worked with all loaded plugins. I copied all the plugins back to his test server

#

And now it worked

#

wtf?

eternal oxide
#

scheduler workign as it should?

regal scaffold
#

idk about that part but it's registering vault

#

And just started his pufferfish

#

jar

#

And it registered vault too

#

what tf

eternal oxide
#

I blame sunspots

sterile token
#

That're the resons i dont MC server hosting and just like using vms rather single Sever host

#

Cus they aleays internallh inject a custom plugin so they can limitur severs by diff ways

eternal oxide
#

Some of that was English 🙂

sterile token
#

??

neon badge
#

Anyone know what this is for? In the yt video im following it gives me an error

sterile token
#

Isn't that old from mongo?

rapid aspen
#

Is there a way to disable a event for just one player?

neon badge
#

Probably the vid is 4 years old xd

sterile token
#

If I'm not wrong

neon badge
#

Aight

sterile token
#

Cam haber some sintax issue I'm.currrnt on cellphoen

remote swallow
#

oh god

sterile token
#

You can ser how cursed Is written

#

Hahah

remote swallow
#

you still havent learnt java and your doing mongo

sterile token
remote swallow
#

9xx2 was here yesterday for basic java syntax issues

neon badge
#

i also had a string with "uri" and not sure that was for however i made a config to connect my mongo to

sterile token
#

Because most ppl learnt the lang where coding beforr uskng apis/libs 💀

remote swallow
#

they got told to learn java a lot and then left

sterile token
#

Righg

neon badge
sterile token
#

So same apply here, must learnt java

#

I wont help if not

neon badge
#

I watched a few tutorials about basic java that a few hours and none of them covered Mongo so im not sure thats basic java

regal scaffold
#

What's the players name displayed in console? Is it player#setDisplayName()

neon badge
#

Nvm solved it

frank kettle
#

how is the list Bukkit.getOfflinePlayers() made? like who are the first in this list? is it based on players joined, so 1st player ever joined will be first, 2nd is 2nd and so on... or is it different each time when server starts? or something different than this

lost matrix
lost matrix
frank kettle
#

so based on their uuid alphabetic order

lost matrix
#

Yeah probably

regal scaffold
remote swallow
#

do you modify the content

regal scaffold
#

Yeah placeholder stuff

#
            format = format.replace("{PREFIX}", getChat().getPlayerPrefix(player));
            format = format.replace("{NAME}", player.getName());
            format = format.replace("{SUFFIX}", getChat().getPlayerSuffix(player));
            format = format.replace("{MESSAGE}", message);
            format = colorize(translateHexColorCodes(this.getServer().getPluginManager().isPluginEnabled("PlaceholderAPI") ? PlaceholderAPI.setPlaceholders(player, format) : format));
            event.setFormat(format);
remote swallow
#

modify the format and use %2$s as the message

regal scaffold
#

Like to test? replace format with %2$s?

remote swallow
#

%2$s is the plaecholder for the message

#

make sure its on async chat event on high/highest priority too

#

console might be stuff relating to secure profile

regal scaffold
#

It was working before which is weird

#

Ummm

remote swallow
#

change priority

regal scaffold
#

Highest

#

Change to high instead?

remote swallow
#

highest should work

#

any errors?

regal scaffold
#

It has been on highest

#

Nope, nothing at all just no player displayed

#
    @EventHandler(priority = EventPriority.HIGHEST)
    public void onChat(AsyncPlayerChatEvent event) {

        if (CHAT_ENABLED) {
            String message = event.getMessage();
            Player player = event.getPlayer();
            event.setMessage(ChatColor.translateAlternateColorCodes('&', message));
            String format = "%2$s";
            format = format.replace("{PREFIX}", getChat().getPlayerPrefix(player));
            format = format.replace("{NAME}", player.getName());
            format = format.replace("{SUFFIX}", getChat().getPlayerSuffix(player));
            format = format.replace("{MESSAGE}", message);
            format = colorize(translateHexColorCodes(this.getServer().getPluginManager().isPluginEnabled("PlaceholderAPI") ? PlaceholderAPI.setPlaceholders(player, format) : format));
            event.setFormat(format);
        }

    }
remote swallow
#

format can stay as whatever you had before

#

just replace the message placeholder with %2$s

#

might be %s$2