#help-development

1 messages · Page 2139 of 1

eternal oxide
#

yes it can

trail oriole
#

if (damager.getItemInHand() == null) return;

eternal oxide
#

then your meta is null

trail oriole
#

so i'd do if (w.getItemMeta() == null) return ?

eternal oxide
#

yes

hybrid spoke
#

or check if the item is air

trail oriole
#

if (damager.getItemInHand() == null) return;

#

what's the point of this line ?

#

If i gotta check air too

eternal oxide
#

of check hasItemMeta()

trail oriole
#

oh okay

#

if (!(w.hasItemMeta())) return; ?

hybrid spoke
#

basically but you dont need the parentheses around w.hasItemMeta()

eternal oxide
#

yes, but lose one of the () if (!w.hasItemMeta()) is more readable

trail oriole
#

oh okay

#

sorry didn't know

#

also why did my config reset when I uploaded the plugin on the server ?

eternal oxide
#

depends when you are saving yoru config

#

and how

hybrid spoke
trail oriole
#

no

#

I saved into onEnable()

#

Do i need to save in the onDisable() too ?

eternal oxide
#

depends, if you make changes

trail oriole
#

well i have a kill counter

#

i suppose that yes then ?

eternal oxide
#

if you have other settings in your config I'd suggest creating a data.yml for your player data

trail oriole
#

I have player's kill and levels

#

Should I make a data.yml ?

#

idk saved it all in the config

eternal oxide
#

a plugin config shoudl be for settings which rarely, if ever change. Data shoudl be kept in its own file

trail oriole
#

ah shit

eternal oxide
#

Its just a learning process. You get better the longer you do it.

trail oriole
#

yes !

#

why am I doing 4 hearts when hitting with my fist

#

this is so confusing

eternal oxide
#

My guess is you are applying damage yourself

trail oriole
#

i've never modified the damage in my plugin

#

apparently i'm not the only one having this issue but no one found the fix on spigot forums

#

nevermind it does it with all items

#

just applying 4 hearts with bare hand and 6 with crits

crude loom
#

?paste

undone axleBOT
crude loom
#

I'm having this really weird bug, where my scoreboard keeps flickering and displaying only a small amount of the values I set, this is my code: https://paste.md-5.net/ewagajoziv.java
I would love some help because I really have no idea at this point😅

fringe hemlock
#

It is flickering because you continuously are setting a scoreboard everytime you call “updateScoreboard” which removes the old one and sets a new one

crude loom
#

It wasn't flickering when I was setting the same amount of entrys every time, but for some reason every second it sets only 2 entrys for a short time and sets its back again

vocal cloud
#

Try reusing the old scoreboard and see if it works

trail oriole
#

how can I make an event repeat every 15 min ?

safe notch
#

bukkit runnable

trail oriole
#

do i put that in a listener ?

safe notch
#

Wdym event

#

Or just a piece of code run every 15min

trail oriole
#

a piece of code

safe notch
#

Use bukkit runnable

trail oriole
#

I need to tp players to a certain location every 15 min

safe notch
#

?runnable

#

Nvm

trail oriole
#

i know how to use bukkit runnable

#

but which class do i put it on ?

safe notch
#

Do you want to tp player the moment they join ?

trail oriole
#

no

safe notch
#

You can do it in onEnable if you want to do it for everyone at a same time

trail oriole
#

so in the main class into the onEnable ?

#

alright

#

thanks

safe notch
#

yea

hybrid spoke
undone axleBOT
crude loom
chilly fox
#

how to compile a plugin with source code? f youtube

eternal night
#

did you use maven or gradle ?

prime kraken
#

Hello, is it possible to make that ? : When i click on a diamond block with a feather, save the loc of the block clicked and the name of the player who click in the meta of the item. It can be possible with what ? HashMap ? Set ? or PersistentDataContainer ?

eternal oxide
#

all of the above

prime kraken
#

Is there a better way ?

eternal oxide
#

They are all viable methods

river oracle
#

Idk I'd just go for it and optimize later if it's crucial

#

Lol

prime kraken
#

Nice, thanks for your help 🙂

#

If i use PDC, what is the DataType for the block cliked ? And the Player ? For the player maybe a DT String ? But idk for the block

eternal oxide
#

which PDC are you looking to use?

dark arrow
#

how can i use nms packages in eclpise?

eternal oxide
#

depend on spigot not spigot-api

#

and run buildtools

river oracle
tender shard
#

my intellij is once again broken lol

#

why are the suggestions only at the top

hybrid spoke
tender shard
#

ok

prime kraken
tender shard
#

then store it in the item's PDC, where's the problem?

eternal oxide
#

so an Items PDC. Ok you would create a custom DataType

#

look at teh javadoc to see the example of writing a custom data type

tender shard
prime kraken
prime kraken
#

Thanks @eternal oxide and @tender shard i will check both solutions, thanks for your help

mortal hare
#

what does player.getInventory() return if the player suddendly gets offline

eternal oxide
#

there is no Player object for Offline players

tender shard
#

but you still can have a reference to the player object

eternal oxide
#

yes, but if they go offline it is invalid and can no longer be trusted

chilly fox
tender shard
tardy delta
#

I Cant type on my phone i give up

chilly fox
mortal hare
#

there is OfflinePlayer interface tho

eternal oxide
#

Eclipse is the simplest to use

mortal hare
#

so the impl for offline player should exist

eternal oxide
#

OfflinePlayer exists, which has no getInventory method

chilly fox
mortal hare
#

but the player object gets flagged

eternal oxide
mortal hare
#

before it gets stale

#

right

#

there's player.isOnline() method

chilly fox
#

Actually i complied 2 project which are created by me but unable to compile other open source plugins 😅

#

Can anyone compile a plugin for me 👉👈

tender shard
eternal oxide
#

I think its easier because it's basic

mortal hare
#

eclipse's extension support

#

is trash

eternal oxide
#

I disagree

mortal hare
#

dead links inside their main repo

#

are everywhere

eternal oxide
#

Well, thats true

river oracle
#

Vscode is simple asf but people like there intellij so I'd go with that

eternal oxide
#

the extensions are fine. theyr repo is shit

river oracle
#

You'd get the most support using something like intellij since its so popular

eternal oxide
#

However, Maven comes bundled in Eclipse, so no extensions needed

tender shard
#

huh. Why does it throw warnings for some classes, and errors for others lol

[WARNING] Class 'org.yaml.snakeyaml.representer.Representer' cannot be found.
[WARNING] Class 'me.clip.placeholderapi.expansion.PlaceholderExpansion' cannot be found.
[WARNING] Some classes weren't found. It may result in weaker obfuscation. Add needed jars to the 'classpath' element of the configuration file.
[ERROR] CLASS NOT FOUND: com.sk89q.worldguard.protection.flags.StateFlag
[ERROR]   ADD NEEDED JAR TO THE 'classpath' ELEMENT OF THE CONFIGURATION FILE.
[INFO] Obfuscation completed. Writing log file...
chilly fox
river oracle
chilly fox
river oracle
#

Maven can compile lol

#

Idk wtf u doing tho

chilly fox
river oracle
#

mvn install makw sure you have the shade plugin if you have dependencies that need it

#

Just use maven or gradle

eternal night
#

^^ please do not rely on your IDE to compile your projects

chilly fox
#

Do you have any video tutorial?

river oracle
#

Uhm mvn install in the directory should do the job lol

eternal night
tender shard
#

I suggest you to simply buy the plugin if you can't even compile it yourself

eternal night
#

do they have a pom.xml ?

chilly fox
eternal night
#

wait what plugin are we talking about xD

#

sounds like a citizens

river oracle
#

Idfk

chilly fox
eternal night
#

so you do have it in the plugin you want to compile

chilly fox
#

I just wanted 1.18.2 support in that

river oracle
#

Huh do you knownhow to code?

chilly fox
#

The developer is kinda rude even tho someone already added pull request

chilly fox
eternal night
#

it is open source ? 🤔

chilly fox
river oracle
#

Did you fix the plugin? To support 1.18

eternal night
#

can you send me a link

#

xD

chilly fox
river oracle
#

Ok

chilly fox
eternal night
chilly fox
#

Yes

eternal night
#

yea a mvn package should suffice then

#

tho they are using NMS

#

so

chilly fox
#

So....?

eternal night
#

well NMS usage in plugins usually means you have to install the NMS dependency on your machine

chilly fox
#

Hyy if you free can you compile it i don't want to install all stuff in my pc as i don't an full time developer 😅👉👈

eternal night
#

lol

chilly fox
#

Also all this make my pc lag alot

#

I remember when last time i tried development omg there were so many packages

harsh totem
#

What index is the off hand slot in a player's inventory?

harsh totem
#

that's not possible

chilly fox
#

Hehe i don't know

tardy delta
#

Google it

harsh totem
#

indexes can't be lower than 0

tardy delta
#

First image that comes up

eternal oxide
#

offhand depends. you can switch hands now

harsh totem
eternal night
#

oh

#

you actually do not need to install things

#

they use the very legal kappa maven repo that provides the entire spigot server

eternal oxide
#

Why do you want an index for the off hand? Just use teh correct API methods

#

and set

eternal night
#

Okay short explanation

river oracle
#

Not legal

chilly fox
#

Ohh

eternal night
#

NMS is shorthand for net,minecraft.server and using it basically means that plugins use classes that mojang coded, not spigot. To be able to do so however, you need to have these mojang owned classes on the machine you are building the project on.

#

obviously distributing software from mojang that you do not know is not particularly legal

hybrid spoke
#

just delete them

#

not the message

eternal night
#

literally just run mvn package after you cloned it ?

river oracle
#

git clone repo
mvn package

chilly fox
eternal night
#
git clone git@github.com:Krakenied/BedWars1058.git bedwars
cd bedwars
mvn package
eternal night
#

hm ?

river oracle
#

Hm

chilly fox
#

I didn't got what you said 😅 can you do it for me 👉👈

river oracle
#

No

eternal night
#

wat

mortal hare
eternal night
#

lol I already spoon fed you

river oracle
#

He just wants you to do it for him

eternal night
#

DMCA won't help here anyway

chilly fox
eternal night
#

yes

#
git clone git@github.com:Krakenied/BedWars1058.git bedwars
cd bedwars
mvn package
river oracle
#

Compile it

#

Just do it

#

Com on fammy

#

Just compile it

chilly fox
eternal night
#

yes, in your terminal

#

(I presume you have maven and git installed for this)

chilly fox
chilly fox
#

My java classes will start in 2nd semester

eternal night
#

Well, install maven and git for windows

river oracle
#

They don't teach you jack in school hate to break it to you lol

#

I went through 2 courses and didn't learn shit

chilly fox
#

Btw thanks alot for your time on me 😄

mortal hare
#

I've learned more off the net than from the school itself

chilly fox
river oracle
#

I did learn how to use sysout tho very useful 👌 👍

mortal hare
#

basic knowledge would suffice you how the language works

river oracle
#

After you finish 2 years of college classes maybe you can make a basic calculator

mortal hare
#

and not "if you input this, you're gonna get this"

chilly fox
chilly fox
river oracle
#

That's a bit of an overexaguration but if you expect to go to college don't expect to learn proficiency or how the language works

#

They teach you input output of basic level functions that aren't actually applicable

eternal night
#

yes that is the right git

tender shard
#

I have studied tax law for 4 years and I still cannot do my tax declaration on my own. so yeah, that's how universities work

chilly fox
#

😦 i am gonna to start BCA (Bachler in Computer Application)

river oracle
#

Wtf is that

chilly fox
#

degree

worldly ingot
#

Universities are basically 4 year paper factories

tender shard
chilly fox
#

an undergraducate course

eternal night
#

[16:22] LynxPlay: yes that is the right git

river oracle
#

Everything you've been told about how useful college is is a lie lol

worldly ingot
#

I dropped out of university and took a colleges certificate because uni was a scam

static hollow
#

Hi, why this removes items only if i have exact number of them?

ItemStack itemStack = new ItemStack(itemMaterial, Integer.parseInt(itemSplit[0]));
p.getInventory().remove(itemStack);

itemStack has amount 32, but when i have 64 it does nothing. How to make it to remove 32 from 64?

worldly ingot
#

Took me one year

hybrid spoke
eternal night
#

wow

worldly ingot
#

Use removeItem() instead, Notro

tender shard
#

I'm still enrolled. officially this is my 18th semester lol

chilly fox
#

which one should i install?

static hollow
tender shard
eternal night
#

bin zip

static hollow
#

i'll try, thanks

worldly ingot
#

Will do what you’re expecting

#

remove() removes the exact item, removeItem() removes the amount

chilly fox
#

Link Checksums Signature

static hollow
#

Okay, works, thanks !

eternal night
#

link

chilly fox
#

oki

river oracle
#

I'm tryna get out of college as fast as possible my parents are making me go lol

#

Get the quick bachelor's in cs and dip

chilly fox
#

lol

eternal night
#

and here I am suffering through a master degree

river oracle
#

I'll have most gen Eds done and all cs classes done by the time I actually have to start paying vs my highschool paying

chilly fox
#

i downloaded and extracted in a drive is it oki with maven?

eternal night
#

you will have to add it to your path

tender shard
#

why didn't you just use an IDE to run maven?

#

Intellij -> File -> New Project from Version Control -> Enter Github link -> clone -> double click on "install" -> done

river oracle
tender shard
river oracle
#

*uses eclipse

chilly fox
hybrid spoke
river oracle
hybrid spoke
#

if so, i did an mistake in the beginning

#

but what if i use notepad

river oracle
#

You have issues

#

I use the glorified text editor vscode

hybrid spoke
#

no i cant see them

#

because they are not highlighted a_COOL

tender shard
#

I'll install netbeans now

river oracle
#

NetBeans? Nah use the best glorified text editor on earth vscode

tender shard
#

why on earth

#

would I do that

river oracle
#

Because I use it therefore it's good by proxi

tender shard
#

I am glad over everything that's NOT made by microsoft

hybrid spoke
#

but you use windows

tender shard
#

because I have to

hybrid spoke
#

linux

#

apple system

river oracle
#

Lonux

tender shard
#

won't run MSFS2020 or anno 1800

#

and other stuff

hybrid spoke
#

linux is open source

#

make it run

tender shard
#

I can't

river oracle
#

Get gud

quiet ice
#

You can run anno 1800 on linux, just without mp as far as I know

hybrid spoke
#

noob

river oracle
#

Make linux run windows executables

tender shard
chilly fox
#

done with maven

hybrid spoke
#

that was fast

tender shard
quiet ice
#

Either way, if everything were to be on steam it would be much easier

river oracle
#

Gross monopoly fail

hybrid spoke
#

but isnt steam then in a monopoly position

#

which is not allowed

river oracle
#

I love steam I just don't like monopoly

quiet ice
#

But alas, Ubisoft is stupid

chilly fox
river oracle
#

Listen I have no issues of other companies making their own shops just make it not ass please god damn

quiet ice
#

Noone forces you to exclusively release something on steam

hybrid spoke
river oracle
#

Epic is the closest thing to not awful

hybrid spoke
#

everything else on steam is shit

tender shard
#

wow netbeans is the slowest IDE ever

hybrid spoke
#

the shop and lib is great

#

friend system is okay

#

profiles are okay

#

but everything else is shit

river oracle
chilly fox
tender shard
river oracle
#

No

#

Vscode

tender shard
#

a saturn V?

river oracle
#

The greatest glorifies text editor

tender shard
hybrid spoke
#

bet notepad is faster

river oracle
#

I'm about to get flamed for it being ass

hybrid spoke
#

and already installed

tender shard
quiet ice
#

Sublime text is amazingly fast from my experience

river oracle
# tender shard probably

U seem like the type of guy to not install the java language pack by redhat which contains all Java support

chilly fox
tender shard
#

sublime sucks, it always asks for donations lol

quiet ice
#

Best text editor I know. Handles large file sizes flawlessly and does not take years to start up

eternal night
#

you don't have ssh setup

#

git clone https://github.com/Krakenied/BedWars1058.git bedwards

#

instead

tender shard
#

the best text editor is vim or emacs

river oracle
#

I only use nano

eternal night
#

I only use tee

river oracle
#

Cuz I'm too lazy to learn vim

quiet ice
hybrid spoke
chilly fox
quiet ice
#

It can get annoying though if you are a Ctrl + S maniac like I am but eh

river oracle
#

I am a ctrl s maniac lol

#

I do it on Google docs

#

Lol

#

Type a few sentences then ctrl s realize I didn't need to do that and get pissed off and repeat

quiet ice
#

I'd honestly buy sublime text if it wasn't so overly expensive

chilly fox
eternal night
#

did it ?

teal flower
#

how can i get this numbers?

quiet ice
#

?jd-s

undone axleBOT
chilly fox
river oracle
#

Idk prob somewhere in meta or item stacks

tender shard
#

why the heck is vscode using those weird colors on the left side

eternal night
#

well cd bedwars into there

quiet ice
teal flower
river oracle
chilly fox
eternal night
#

registry is a thing since like

#

1.14

chilly fox
#

😦

eternal night
#

bedwards

tender shard
# opal juniper you mean git?

no, I mean the package names. commands, config, data is red, debug and enchantments is yellow, enums events is red again, exceptions is white, etc

eternal night
#

lol

#

I cannot spell 😂

quiet ice
#

Huh, pretty useless either way I assume

river oracle
chilly fox
#

oki done

#

lol bedwards

eternal night
#

and then just mvn package

tender shard
#

i literally cloned it 3 minutes ago

eternal night
#

maybe some auto format

eternal night
#

what does git status say

river oracle
#

If so it's all added to the empty repo

tender shard
#

I simply did "git clone https://..." and then opened that folder

#

also it doesn't support lombok?

river oracle
#

Ir does

eternal night
#

you just need an extension 🙂

river oracle
#

Grab the Lombok plguin and restart

chilly fox
#

it working 😄

eternal night
#

the lombok lifestyle

river oracle
#

Same as eclipse and intellij

eternal night
#

non compiling java code because records are too new

eternal night
#

might take its time

river oracle
#

I've yet to use a record despite having data classes

chilly fox
#

hyy btw lynx do this works on all open source plugin??

river oracle
#

Lol

tender shard
eternal night
#

depends on build tool the open source plugin uses

#

I mean

tender shard
#

and even then, everyone uses maven or gradle to compile, so it even compiles with a shitty ide

chilly fox
#

😮 how can i find if this process will work

eternal night
#

my spacevim does not like it

#

generally if the project has a pom.xml this process should work

chilly fox
#

😮

#

aa stuck here

river oracle
eternal night
#

not really stuck xD

#

just 32MB from a not fast repo

#

takes its time

chilly fox
#

😮

#

still on 17 ahh

eternal night
#

I mean, when I compiled the repo it took like 4-5 mins

tender shard
#

noone can tell me that vscode is nice

eternal night
#

it isn't

river oracle
#

I can

#

It's nice

tender shard
#

it doesn't even autocomplete the closing > when you type <

eternal night
#

I had to switch because my goland licence ran out

#

and it has been pain

chilly fox
tender shard
#

I type Class<? and then it wants me to manually type the closing > too? why?

eternal night
#

yea I wanted to make sure that it does compile

quiet ice
eternal night
#

so you don't get stuck on it

opal juniper
chilly fox
#

then why you making me do all this 😩

eternal night
#

learning experience

opal juniper
#

i used to like vscode before i tried the jetbrains ones

tender shard
river oracle
#

I tried idea and I hated it

chilly fox
river oracle
#

It's so abrasive and it pissed me off

opal juniper
eternal night
#

what was it, give a man a fish and they won't be hungry tonight, teach them how to fish and they will never be hungry again

#

something like that

chilly fox
#

but it stuck on 12 😦

tender shard
#

vscode is like intellij on crack with funny colors

eternal night
#

the colours are soo much

#

there is an intellij theme extension tho xD

river oracle
hybrid spoke
#

many colours are great

river oracle
#

Hotkeys

hybrid spoke
#

but without any structure its weird

tender shard
chilly fox
#

its first time when a developer is so nice to me and teaching me something

eternal night
#

hear that alex ?

#

:>

tender shard
eternal night
#

your attempt didn't count as a first time :>

hybrid spoke
chilly fox
#

normally all plugins developers reply so rudly 😦

hybrid spoke
#

normally with something like that you get jumped on

#

but most of them dont even know it theirself

quiet ice
chilly fox
#

but lynx is so nice he should be staff

hybrid spoke
opal juniper
#

nicer than imajin

chilly fox
#

still on 17 sigh

#

lol

eternal night
#

is your internet ok o.O ?

hybrid spoke
quaint mantle
#

guys someone reply my question for java ?

eternal night
#

conclure is bae

opal juniper
hybrid spoke
#

nah

#

got banned for nothing

quiet ice
chilly fox
opal juniper
quiet ice
#

Then we can answer it

eternal night
#

I mean, you can stop it and try again

#

if it is stuck there for an unnatural amount of time

chilly fox
tender shard
hybrid spoke
eternal night
#

no no, just Ctrl + c

#

and then mvn package again

chilly fox
quaint mantle
#

my english not my main language

#

i think how can i tell u 😄

eternal night
#

wait Ctrl + c closes the entire CMD on windows ?

opal juniper
#

no lol

eternal night
#

Yea didn't think so 😅

chilly fox
#

na i just closed manually

eternal night
#

oh

opal juniper
#

that would be terrible hahaha

eternal night
#

lol

chilly fox
#

😅

quaint mantle
eternal night
#

I mean it is windows :>

quiet ice
#

No matter the language you use, you never ask to ask something on the internet

hybrid spoke
eternal night
#

terrible is kind of its main selling point

opal juniper
#

back off

hybrid spoke
#

they improved it

quiet ice
tender shard
#

I'll watch BTTF3 now

quaint mantle
hybrid spoke
chilly fox
#

wooo chat become fast

quiet ice
#

German <-> English for example is good. Chinese <-> English not so much

hybrid spoke
#

at least en -> ger, ger -> en improved a lot

tender shard
#

for german<>english it works very nice, for latin<>english, it doesn't work at all lol

chilly fox
#

aa btw lynx now what should i do? do i have to close again?

eternal night
#

no

#

just reopen cmd

hybrid spoke
#

german <> english is even better than deepL now

eternal night
#

cd back into it

#

and run mvn package

chilly fox
#

oki

quaint mantle
#

i'm learning java but i can't understand some things
example i was need a take some strings 4th letter with charAt
What will this do for me?

opal juniper
# eternal night cd back into it

you know on windows you can type "cmd" into the address bar you are trying to open and then cmd wil automatically open in that folder

#

the more you know

tender shard
#

btw on my discord I have a dude who always opens tickets and then simply writes "hi". After 2-3 days I think it's weird and I reply to him "hi, can I help you" and then he immediately asks his question. but first he always waits until I've written "hi" too, that's so useless lol

hybrid spoke
#

how the dir changes

chilly fox
#

oki it was something bug i gusses

eternal night
#

I mean, who uses the windows explorer tho 🤔

tender shard
#

in debian testing, they renamed cd to dvd

chilly fox
#

now it processing further

hybrid spoke
quiet ice
hybrid spoke
#

i've once worked for a really large network

#

and either they dont even say hi

opal juniper
hybrid spoke
#

or they just say hi and wait for your response

eternal night
#

I mean, my distro has a file explorer

#

and I cd ls everywhere

quaint mantle
opal juniper
tender shard
#

well saying "hi" or similar is of corse better than only asking the question, but it's useless to wait with asking the question until someone has replied to your greeting lol

chilly fox
#

bruh now it stuck in next process 😑

quaint mantle
#

What will this do for my programming?

chilly fox
#

hmm what ctrl+c do btw?

tender shard
eternal night
#

attempts to kill the current command/process

quiet ice
hybrid spoke
chilly fox
#

i pressed and it started processing further XD

eternal night
#

lol

quaint mantle
#

i know but
Where will I use it in program development?

tender shard
quaint mantle
#

:DDDd

tender shard
#

exactly lol

hybrid spoke
#

thats what i meant

chilly fox
hybrid spoke
#

hi, <question or whatever>

chilly fox
#

aaa is it succesfull?

quaint mantle
#

ok nvm maybe if i learn java can understand

quiet ice
chilly fox
hybrid spoke
eternal night
#

Hmmmm interesting error

#

it compiled just fine in my attempt

quiet ice
#

Might be some packet spoofing

eternal night
#

Probably the fact your pressed Ctrl + CxD

quiet ice
#

Either way, somethign is strange with the webserver

eternal night
#

try again

chilly fox
tender shard
#

ugh I just realized I had an open ticket I never answered since... SEPTEMBER

chilly fox
quiet ice
#

Better than the PR that converted all extranous tabs to spaces that was left unresolved since last mid-last year

tender shard
quiet ice
tender shard
#

no

#

don't close it

#

but ask questions about it

quiet ice
#

Because someone is going to Copy and paste this code

tender shard
#

e.g. "thanks for this PR, did you test whether everything works" etc, then ask him to create unit tests etc

tender shard
#

after half a year, you can actually merge it and mention him in big letters as CONTRIBUTOR on the readme page

#

also thank him, his parents, and his children personally

quiet ice
#

I am the person that created it

tender shard
#

then it's even better

quiet ice
#

I should get off of discord, the heat is starting to fry my internals

chilly fox
#

what ctrl+r do on cmd?

tender shard
#

you can thank yourself in the pull request comments

chilly fox
#

i am so fked up with my life i have paper tommorow and i am compiling a plugin

quiet ice
#

I also made a PR to slimefun a while back so I can finally add some support for it in my CE plugin, but that one didn't get merged yet but heh, it means less work for me

tender shard
quiet ice
#

Bruh alex

chilly fox
tender shard
#

btw I just noticed

#

purpur is just the "funny sounding" version of paper

quiet ice
#

But hey, it's gone now

tender shard
chilly fox
#

first time when i heard purpur it sounded me so wrong

#

but then its my fav jar

quiet ice
tardy delta
#

purpur

chilly fox
tender shard
eternal night
#

does it 🤔

chilly fox
#

🤣

tender shard
#

i thought it's bruh = bro

#

and bro = brother

#

and yeah

eternal night
#

well it is derived from it

chilly fox
#

where this conversation is going

eternal night
#

but does that imply it kept its meaning

chilly fox
#

🤣

tender shard
#

I've never seen someone say "bruh" to their girlfriend lol

eternal night
#

deep philosophical questions with lynx and alex

quiet ice
#

Either way, the intention wasn't that

eternal night
tender shard
chilly fox
eternal night
#

it could be pepe_hand_heart

tender shard
#

😗

chilly fox
quiet ice
#

But it isn't 2021 anymore, so I am free to assume gender either way

chilly fox
#

hehe...

tender shard
#

oh man bttf3 definitely is the best part of the series

chilly fox
#

i loved this place this should be renamed as general

#

🤣

eternal night
#

did it compile btw ?

tender shard
#

and then rename general to help-development, or what? 😄

quiet ice
chilly fox
#

processing

#

this time i am pressing ctrl+R

quiet ice
#

Not sure if I use it however

chilly fox
#

wait btw is it using net?

tender shard
rocky bolt
#

guys can someone help me i get everytime strange symbols and -Dfile.encoding=UTF-8 before -jar dont working
is there a way to fix it?

tender shard
#

why

#

do they really do that or is that just someone who suggested it?

quiet ice
#

Alternatives exist

chilly fox
#

just put 69 in ''

quiet ice
#

It is a suggestion, but it makes sense to some degree

tender shard
tender shard
chilly fox
quiet ice
#

If it is discussed at that level it might get deprecated in a few releases

rocky bolt
quiet ice
#

Either way, just a thing to keep in the mind

rocky bolt
#

cmn dont be to salty buddy

midnight glen
#

I'm looking for a way to save & load player teams and player tags given using /tag

chilly fox
#

btw did anyone here made a real public plugin which can be usefull for a smp?

tender shard
#

Hm

No skilled java programmer uses the legacy classes in new applications
except when integrating with legacy APIs.
Well I use the Calender often to simply get the current year or similar and I don't see any reason why using it would make anyone less or more skilled than others. I think the whole post is pretty bullshit

tender shard
chilly fox
rocky bolt
midnight glen
tender shard
sand orchid
#

hey anyone know if there is a cap when using persistent data storage
just wondering cause there are caps on things like attribute max health etx

chilly fox
chilly fox
midnight glen
chilly fox
tender shard
sand orchid
#

lmfao ok

chilly fox
sand orchid
#

also anyone here using intellij

tender shard
sand orchid
#

so like

#

im not sure if its a bug

#

but i use the minecraft development plugin in intellij

tender shard
#

then it's a bug

tardy delta
#

noob

tender shard
#

that plugin is bugged as hell

midnight glen
#

Anyways I'm looking for a way to save & load player teams and player tags given using /tag.

rocky bolt
#

this is code and it dosnt working

sand orchid
#

and when i transfer a plugin file from one comp to the other it just stops working

midnight glen
quiet ice
tender shard
rocky bolt
rocky bolt
sand orchid
#

like the whole plugin folder ig

quiet ice
#

(Either way, specifing the default file encoding is dangerous)

chilly fox
#

mfn you got some really intresting plugins

tender shard
#

you probably have added the dependencies manually and so you're fucked. you should use maven or gradle or a similar dependency manager. maven, gradle, ant, ...

tender shard
sand orchid
#

i judt move it onto a mac cause i went away for a bit

#

and even after installing the plugin and restarting everything the plugin doesnt work

#

but when i create a new file then it works

midnight glen
#

can someone help me

chilly fox
#

btw i am looking for a backup or extra storage type plugin

#

like an extra enderchest

sand orchid
#

essentially when i transfer a file to another device it stops working

midnight glen
#

ohh

sand orchid
chilly fox
#

yes

#

stores items

midnight glen
quiet ice
sand orchid
#

the minecraft development plugin in intellij

hybrid spoke
#

so guys

tender shard
hybrid spoke
#

how do i get the player

midnight glen
#

can someone tell me what methods do I use for saving & loading player tags & teams?

tender shard
chilly fox
tender shard
hybrid spoke
chilly fox
hybrid spoke
#

what if its a woman

#

sexist

quiet ice
tender shard
tender shard
tardy delta
#

we are all objects

#

what are women btw

#

jk

hybrid spoke
#

we live in a simulation

midnight glen
chilly fox
#

i can't belive how much helpful is this community today 🤣

eternal night
#

oh they crossposted

midnight glen
tardy delta
#

autocorrection changes uhh in and lol

eternal night
#

sadge

hybrid spoke
chilly fox
midnight glen
eternal night
#

the methods for what o.O

midnight glen
#

saving and loading teams & tags

eternal night
#

I mean I linked you the method to get a players tags in paper

tardy delta
#

what tags?

eternal night
#

scoreboard tags

midnight glen
#

thanks

tardy delta
#

i forgot

eternal night
#

teams, you will have to query the main scoreboard for

midnight glen
chilly fox
#

just for curiosity is it possible to code a mc plugin with python?

eternal night
#

scoreboards are server wide

quaint mantle
#

?paste

undone axleBOT
midnight glen
#

Skript exists tho

eternal night
#

not world wide

chilly fox
quiet ice
#

a plugin

midnight glen
quiet ice
#

Do not use

#

If you know java that is

quaint mantle
tender shard
chilly fox
quiet ice
#

JPython 😎

tardy delta
#

spython

quaint mantle
chilly fox
#

py is dynamic but java is not

quiet ice
tender shard
quaint mantle
tardy delta
#

afaik it doesnt

midnight glen
crisp steeple
#

python is wonky

chilly fox
#

@eternal night its donw now?

midnight glen
#

the basics at least

quiet ice
chilly fox
midnight glen
midnight glen
#

that's why I don't know python

midnight glen
quiet ice
#

Neither language is particularly easy

chilly fox
quaint mantle
#

please help 😭

quiet ice
#

If you start out with the wrong tools any language can be quite hard

quiet ice
#

The python ecosystem is built in a way that if you pick the wrong tools you will not get hurt too much, but java has the biggest potential if you pick the right tools

eternal night
#

yes @chilly fox

chilly fox
eternal night
#

in bedwars-plugin/target

chilly fox
#

hmm...

eternal night
#

the jar without the original prefix

chilly fox
#

means where?

midnight glen
#

isn't building artifacts easier and faster than building the project?

chilly fox
#

in which drive?

eternal night
#

run start .

#

in your cmd

#

that should open the file explorer

chilly fox
#

oki got

quiet ice
#

If you mean that, then perhaps, but once you get non-trivial build logic it gets complicated

eternal night
#

IDE artefacts are pain

quiet ice
#

Especially if you want to use shading you are better off not using it

chilly fox
#

thanks alot lynx

eternal night
#

np

tender shard
#

imho jave is easier than python is because proper IDEs exist and because of strong typing

quiet ice
#

Myes, but that requires picking the right stack from the get-go

#

I started java with sublime text and a bash script, which is a lot worse than my current eclipse + maven stack I have these days

tender shard
#

wtf

#

why didn't you use an IDE in the beginning lol

#

even my school taught me to use eclipse like 12 years ago

#

but yeah then I switched to intelliJ because eclipse had problems with maven

chrome beacon
#

We use Netbeans

tender shard
chrome beacon
#

Agreed though it's JFrame and JPanel designer is better

quiet ice
#

My school teaches me to use the so called "JavaEditor", that being said I am straight up refusing to install it at home

#

And apparently it is quite a known IDE on the german market

tender shard
#

I have never heard of it

#

I started of in school with "HamsterSimulator" lmao

#

that basically is a "java learning IDE"

quiet ice
#

And "HamsterSimulator" is quite a name

#

Ach du scheiße

#

What the hell is that

tender shard
#

lol

white root
#

Hey, quick question that I hope someone here could help me with
How do I co about copying a folder (and everything within it) to my plugins data folder?

I have this plugin structure ```
src.main.resources
config.yml
parts
file1.yml
file2.yml
file3.yml

I tried looking into apache commons IOUtils and FileUtils but had no success
quiet ice
#

That is a tough one

tender shard
#

I think it's not that easy since it's in a .jar file. you could load your plugin .jar as ZipInputStream and loop over the entries

#

or you simply hardcode all the filenames, which obviously is the easiest

quiet ice
#

A hacky way would be to

        URL x = getClass().getProtectionDomain().getCodeSource().getLocation();
        try (JarInputStream jarIn = new JarInputStream(x.openStream())) {
            JarEntry e = jarIn.getNextJarEntry();
            while (e != null) {
                if (e.getName().endsWith(".yml")) {
                    // Copy entry
                }
                e = jarIn.getNextJarEntry();
            }
        }
#

That being said that will not absolutely always work

tender shard
quiet ice
#

The difference is nonexistent either way

quaint mantle
#
    @EventHandler
    public void chatFormat(AsyncPlayerChatEvent e){
        Player player = e.getPlayer();

        e.setFormat(ChatColor.GOLD.toString() + ChatColor.BOLD + "Havana" + ChatColor.DARK_GRAY + " >> " + ChatColor.GRAY + "%s" + ChatColor.DARK_GRAY + ": " + ChatColor.GRAY + "%s");



    }

Hello, so I have this. Everything works fine, but when I type in the chat, my name color is Red instead of Gray

#

How can I fix this?

quiet ice
#

That being said, there might be an easier solution, lemme check

tender shard
#

that's because %s is replaced with your name + red for OP

quaint mantle
#

I also tried p.getDisplayName()

#

still red

#

can I fix this even if the player has OP that the name will be gray?

quiet ice
tender shard
#

or, as said, hardcode the files to save

tender shard
#

then you also have to escape the % chars

quiet ice
#

I was thinking that you might be able to obtain the children of an URL, but you likely need a JarFileSystem for that

tender shard
#

otherwise it throws an exception when people type sth like "%s"

ancient plank
#

a URL*

tender shard
#

well sth like
setFormat(player.getName() + " > " + event.getMessage());

quiet ice
quaint mantle
#

but then its not gray

#

:/

tender shard
#

...

#

then insert the gray color too

quaint mantle
#

oke

#

ill try

quiet ice
#

Is U a consonant in this case?

tender shard
#

but as I said, you'll have to escape the percentage sign

ancient plank
#

A(AN) is determined based on the sound, not just because it's a vowel or not

quaint mantle
tender shard
quaint mantle
#

Okay

#

ty

ancient plank
quaint mantle
#

Yeah im new to Java so thats why

quiet ice
#

Well the U in URL is very much an U for me

quaint mantle
quiet ice
#

Also, Y needn't always be a consonant

tender shard
#

it's pronounced "you are ell" so it's "an url" but tbh who the fuck cares lol

quiet ice
#

Yeah

tender shard
#

i'm glad that in german, we don't need to differentiate between "a" and "an". All we have to remember is
der, die, das, den, dem, ein, eine
lol

quiet ice
#

Yes, but then you have a huge table to remember and to know whether a noun is an object, subject, dativ (or however it is written in english) or gentiv (whatever that is in english) as well as whether it is masc, neutral or fem.

#

This is far too complicated for one to remember

#

Also, then there are also the possessive pronouns, demonstrative (?) pronouns and whatever

#

And there is also einer, eines, etc. (e.g. Die Tochter einer Frau)

tender shard
white root
# quiet ice A hacky way would be to ```java URL x = getClass().getProtectionDomain(...

So, it probably would have been prudent to mention that I am using kotlin, but it was simple enough to translate it (totally didnt just let intellij do it for me)

But it works, with a small modification to have it only load things from the parts folder ```kotlin
val x: URL = javaClass.protectionDomain.codeSource.location
JarInputStream(x.openStream()).use { jarIn ->
var e: JarEntry? = jarIn.nextJarEntry
while (e != null) {
if (e.name.startsWith("parts/") && e.name.endsWith(".yml")) {
saveResource(e.name, false)
}
e = jarIn.nextJarEntry
}
}

quiet ice
#

tbh, spigot probably offers a better way to do it

tender shard
#

nope, afaik "saveResource" is everything that it offers

quiet ice
#

I mean to obtain the plugin jar

#

Relying on the code source is dangerous as it may not be present depending on the classloader

quiet ice
teal flower
#

Why for example attack speed in attribute of wooden sword is -2.4000000953674316 but in game shows. -2.4 in what time? ticks or what

quiet ice
#

-2.4? What attribute did you use?

#

?jd-s

undone axleBOT
teal flower
tender shard
teal flower
tender shard
#

btw I'll have to reread that book, it was actually quite funny

quiet ice
#

there is not just the ADD_NUMBER modifier

#

Do you have other modifiers?

#

But uh, that does not apply to itemstacks for some reason

daring lark
#

how could i get block that player look at?

safe notch
#

Player#getTargetBlock()

daring lark
#

that's all?

safe notch
#

yea

daring lark
#

i need to add some arguments

#

distance

safe notch
#

Yeah you can pass that in

quiet ice
#

You probably don't want to go over 5

daring lark
#

what about material?

#

should iset it to null?

safe notch
#

Read that

blissful pumice
#

is there a way to shut the plugin down?

safe notch
#

getPluginManager#disablePlugin() ?

blissful pumice
#

ty

tender shard
#

Does someone know a library for java to parse arguments?

tardy delta
tender shard
tender shard
#

@worldly ingot am I stupid or is the description of this channel very weird? It says this channel is for "Spigot / Bungee coding" but it also tells people to ask "other" questions here lol

tardy delta
#

i was thinking bout that too

worldly ingot
#

it was written two years ago ¯_(ツ)_/¯

tender shard
#

maybe "here" was supposed to be a link to the general or help-server channel?

#

because links don't work in channel descriptions

tender shard
#

except for the obvious thing that you put it into discord which will obviously not render custom HTML lol

tardy delta
#

i thought posting a spotify embed here would work

glossy venture
#

anyone know how to join with some sort of debug instance?

#

im getting a stupid client error

#

but idfk what is going on because it doesnt log it

#

it should as it disconnects me

#

but it doesnt

tender shard
pastel quiver
#

hello i ask you line 6

tardy delta
#

i guess

tardy delta
pastel quiver
tardy delta
#

uhm what?

glossy venture
#

is your file called skywars.java

#

also use camel case

tardy delta
#

also your class name should start with an uppercase character

glossy venture
#

skywars -> Skywars

tardy delta
#

ugh

glossy venture
#

yeah

pastel quiver
#

xd test wft

tardy delta
#

got ninja'd again

pastel quiver
#

change test by skywars?

glossy venture
#

what

tardy delta
#

sir we just told you to start your class name with an uppercase character

#

lol

pastel quiver
glossy venture
tender shard
#

Classes have UpperCamelCaseNames by default

#

andMethodsAndFieldsUseLowerCamelCase

glossy venture
#

it

glossy venture
# pastel quiver thx

thats because in java, public classes in files need to be the same name as the file itself

glossy venture
#

you cant have

public class Test {

}
``` in `NotTest.java`
#

it has to be called Test.java

tardy delta
#

the name of the file the class is stored in ^^

pastel quiver
tender shard
pastel quiver
tender shard
glossy venture
# pastel quiver ?

that means that instead of doing

skywars_plugin
skywarsplugin
skywarsPlugin
 // any of these
``` you use `SkywarsPlugin`
tender shard
#

do you even know how java works?

glossy venture
#

so every word

#

is capitalized

glossy venture
tender shard
#

it's learnjava

glossy venture
#

?learnjava

undone axleBOT
glossy venture
#

epic command fail

tender shard
#

I don't get why everyone is mocking them for the file name

#

in every screenshot they sent, the class name matches up with the file name

glossy venture
#

the first one didnt

#

im just teaching them how that works

tender shard
glossy venture
#

yeah

#

same