#help-development

1 messages ยท Page 2113 of 1

grim ice
#

chocolate java

#

xD

ember estuary
#

x'D

grim ice
#

blame

#

JVM warm ups and code optimizations

#

anyways use JMH

ember estuary
#

Gonna look into it

grim ice
#

Why do you wanna benchmark btw

ember estuary
#

Its a shame that for a little performance test you gotta take minutes installing thousands of things

#

in js u can just Time.now() and Time.end() or something like that, and boom, performance test

grim ice
#

cuz js is pretty shit

ember estuary
#

xD

grim ice
#

ive heard js is always slow

grand perch
ember estuary
#

not rlly

grim ice
#

it doesnt matter ur skills

ember estuary
#

JS is super fast compared to Python

grim ice
#

dunno tho im not a js dev

grand perch
#

js is pretty easy to learn

grim ice
#

its still very unorganized

ember estuary
#

true that

grim ice
#

very messy i would puke

grand perch
#

go get typescript idk

ember estuary
#

xD

grim ice
#

ts isnt that much better

ember estuary
#

it is

grim ice
#

just null safety

ember estuary
#

but i h ate it

grim ice
#

and some other stuff

grand perch
#

have you used ts to its full potential?

grim ice
#

no

#

I dont need to

#

Java is already too powerful for most stuff tbf

ember estuary
# grim ice Why do you wanna benchmark btw

I wanted to test if its faster to count the duplicates of an int-array

  • by creating a set, filling it with the items of the array, and then comparing the length of the set to the length of the array
  • by sorting the array and then simply looping over the items, increasing a counter everytime two equal items follow each other
#

cuz someone said Set is better cuz its O(n)

#

and i said that below 100k items, the sorting is probably faster, although its just O(n*log(n)). Cuz no overhead for creating a set.

#

so yeah, i wanted to quickly test that

#

but i dont wanna install a thousand tools and librarys for testing that lol

#

that sucks

red sedge
#

is there anyway i can use org.reflection without having my jar size start at 1mb

zinc mist
#

Does anyone have any good resources to explain how to create a custom dimension?
I know that you can do it with datapacks now, but I can't seem to find anything for spigot other then a few mentions of it being possible

tall dragon
zinc mist
#

I will take a look there then.
I am not wanting too complicated of a world, just might have it be filled with stone or something.

midnight shore
#

Hello! I have a problem.

Build tool exit code: 0
Looking for pom.xml in build directory and ~/.m2
Found artifact: org.example:TheAlternativeAPI:1.0-SNAPSHOT
Exit code: 0

โš ๏ธ ERROR: No build artifacts found
Expected artifacts in: $HOME/.m2/repository/org/example/TheAlternativeAPI/1.0-SNAPSHOT

I get this error on Jitpack when i try to access my api on github.
https://github.com/Will0mane/TheAlternativeAPI this is the github page. I don't understand why do i get this error

zinc mist
tall dragon
#

do you have access to nms?

zinc mist
#

I am not sure

tall dragon
#

there classes are not normally in the api

zinc mist
#

Ah, that could be why

tall dragon
#

what version ru developing for

zinc mist
#

1.18.2

tall dragon
#

?bootstrap

undone axleBOT
#

Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.

Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163

tall dragon
#

read this then

zinc mist
#

Will do XD

mystic vale
#

Hello, does anyone know how to import a dependency idea in intellij idea?

tall dragon
#

depends

#

are you using maven or gradle?

#

or neither.

mystic vale
#

maven

kindred valley
#

what event do i need to use if i want to control player right clicked a block

#

i used interact

#
if(e.getClickedBlock().getType().equals(bank.getBank())){
            p.sendMessage("ilk ife giriyor");
            if(p.getInventory().getItemInMainHand().isSimilar(cash.getCash())) {
                p.sendMessage("2. ife giriyor");
                int amount = cash.getCash().getAmount();
                Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "money give " + p + " " + amount);
            }
        }
tall dragon
#

well idk what dependency you want. but most for most public things you will be able to find a repository and dependency which u can place inside ur pom.xml

mystic vale
#

Could you help me with one thing?

tall dragon
tall dragon
mystic vale
#

And I import it from this button (I think I've seen it in videos)

kindred valley
#

it does not enter this

mystic vale
tall dragon
#

which you simply add to your pom.xml and that will do it

tall dragon
#

one of the if statements returned false if it does not enter that

mystic vale
#

It gives me an error

tall dragon
#

which error

kindred valley
#
if(p.getInventory().getItemInMainHand().isSimilar(cash.getCash())) {
                int amount = cash.getCash().getAmount();
                Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "money give " + p + " " + amount);
            }
mystic vale
tall dragon
#

did you reload maven?

kindred valley
#

its not executing the command why can it be

mystic vale
tall dragon
#

on the right of your ide

#

should say maven

#

open t hat

#

then click the reload button

mystic vale
tall dragon
#

the left button right under maven

tall dragon
#

the circle thingy

kindred valley
#

its entering if, but not dispatching command

tall dragon
#

okay

#

what is p?

#

a String?

kindred valley
#

player

tall dragon
#

a Player object?

kindred valley
#

oh

kindred valley
#

sorry the f*ck

#

my bad

tall dragon
#

yep @mystic vale

#

thats the one

steel swan
#

hey so i have this code

System.out.println("1");
                    ItemStack itemToModify = Objects.requireNonNull(coldInv.getItem(15)).clone();
                    ItemMeta meta = itemToModify.getItemMeta();

                    List<String> lore = new ArrayList<String>();
                    lore.add("test");
                    meta.setLore(lore);
                    itemToModify.setItemMeta(meta);
                    inv.setItem(15, itemToModify);
                    setintMethod(block, getintMethod(block) + 100);
                    player.updateInventory();

and it just...doesnt work. Idk why, donc ask me why i just dont know !
the item isnt modified
(ps this is the 15th item)

tall dragon
#

hit that baby

kindred valley
tall dragon
#

did you add the repository?

steel swan
tall dragon
#

no talking to arthur now

steel swan
#

oh k

mystic vale
tall dragon
mystic vale
#

oops, no

tall dragon
#

ya need that

mystic vale
#

error

tall dragon
#

uhuh

#

remove the <repositories> tag

#

its alrdy there

#

only need 1 pair

mystic vale
tall dragon
#

hover ur mouse over it and it might give you some more info

kindred valley
#

if(e.getClickedBlock().getType().equals(bank.getBank()))this is not working again @tall dragon

#

is there any wrong on method?

tall dragon
#

@kindred valley to check if an item is your custom item you should use PersistentDataContainer to add a custom tag to the item

tall dragon
#

using this ^

tall dragon
mystic vale
#

Thank you very much for helping me @tall dragon
I'm new to Spigot plugin programming and would like to make some :3

tall dragon
#

๐Ÿ‘

next fossil
#

Did the NMS change for 1.18.2?
[ERROR] symbol: method send(net.minecraft.network.protocol.game.PacketPlayOutSpawnEntity)
[ERROR] location: variable connection of type net.minecraft.server.network.PlayerConnection

tall dragon
#

to check if its your custom item.

zinc mist
#

I am not sure what I need to do in order to get this NMS thing to work.
I copied the mentioned configs over to a new project however, it is telling me that 1.18-R0.1-SNAPSHOT doesnt exist

        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.18-R0.1-SNAPSHOT</version>
            <classifier>remapped-mojang</classifier>
            <scope>provided</scope>
        </dependency>
kindred valley
tall dragon
#

uhh BlockState contains some data about the specific block. like for example a chest contains data about whats inside it.

kindred valley
tall dragon
#

uhhh nothin

kindred valley
#

so getState returns null

tall dragon
#

no

#

its marked NotNull. but i don't know what it would return

eternal oxide
#

it always returns a State snapshot of teh Block at that time

tall dragon
#

what would it return on a cobblestone block tho

eternal oxide
#

A BlockState of the cobblestone. You can uise that to fetch teh states BlockData

#

you can have multiple States stored at teh same time, but they are snapshots and only one will represent teh actual Block in game

tall dragon
eternal oxide
#

No, its not an Abstract Interface so it can return just itself

golden kelp
#

Which sound should I play to show the player that they did a mistake (Which one would you pick?)

tall dragon
#

villager no ๐Ÿ˜„

golden kelp
golden kelp
quaint mantle
#

do it with resource pack

#

fairly easy

golden kelp
#

Wdym

#

I am using Player#playSound

tall dragon
#

Villager_no

golden kelp
#

Oh okay

#

What should I keep the volume and pitch as? 1 and 1?

tall dragon
#

just play with that a little. find something you like

golden kelp
#

Ill just keep it one ig

ivory sleet
#

well volume refers to the reach the sound you play has

#

1 == 16 blocks iirc

golden kelp
#

oh

ivory sleet
#

and 2 would be 32 etc

brave goblet
#

would world.getName work for multiverse worlds?

ivory sleet
#

pitch is the pace

golden kelp
#

I just want the player to listen it

#

no one else

ivory sleet
#

mye iirc player.playSound would allow that

golden kelp
#

Ohh, I just need to pass the Player as an Entity

ivory sleet
#

ye

golden kelp
#

It sitll wants sound and pitch

#

volume and pitch*

ivory sleet
#

just pass 1 as the volume

#

shouldnt matter

#

pitch also 1 if you wanna play it as is

golden kelp
#

Aight

kindred valley
#

@tall dragon im using 1.12.2 spigot

#

i couldnt find tilestate

golden kelp
#

What if I ear-rape the player with the highest pitch

tall dragon
#

yikes

ivory sleet
#

I mean pitch wont "ear rape"

golden kelp
#

frick

ivory sleet
#

the client kinda limits it

golden kelp
#

;( my plans of damaging someone's ears

ivory sleet
#

so you cant play it too low nor too high

fair hamlet
#

Does anyone know why spawning holograms with packets turn into floating horses for 1.7 clients on a 1.8 spigot

tall dragon
#

probably some funny business by viarewind / viaversion ?

fair hamlet
#

Possibly seems to work fine though when using holographics displays

tall dragon
#

ye but hd doesnt use packets im pretty sure

brave goblet
fair hamlet
cursive loom
#

Hey someone have alibrary or api for link a java plugin to a discord bot ?

chrome beacon
#

Armor stands were added in 1.8

#

HD has slimes iirc

tall dragon
#

not actually sure how HD does it

fair hamlet
#

I'm talking about 1.7 clients

brave goblet
#

or ?

#

what do u need exactly

cursive loom
#

I want to try to do a plugin linked on discord for rank,chat,...

fair hamlet
tall dragon
#

yea thought so

brave goblet
fair hamlet
cursive loom
#

a discord bot can add a rank on minecraft ?

brave goblet
#

nor a plugin \

cursive loom
#

so I don"t want make a discord bot

brave goblet
#

ok ur so confusing

#

u mean make rank or add it to user?

cursive loom
#

I don't how thats work, i just want learn

brave goblet
cursive loom
#

if the player be MVP on minecraft that automatically put him mvp on discord

brave goblet
#

oh ye that ok

cursive loom
brave goblet
crimson terrace
#

?paste

undone axleBOT
brave goblet
crimson terrace
brave goblet
# cursive loom no problem, it for that I want a docs or library
GitHub

Java wrapper for the popular chat & VOIP service: Discord https://discord.com - GitHub - DV8FromTheWorld/JDA: Java wrapper for the popular chat & VOIP service: Discord https://discord.com

brave goblet
#

np and gl!

steel swan
#

hey, how do i create an Inventory variable like this :
Inventory name;
But i want it so that the name of the inventory is the name of the player. How do i do that?

kindred valley
#

hello when i provide console to dispatch a command it always dispatch it twice why can it be

brave goblet
kindred valley
steel swan
tall dragon
#

for your main hand and you second hand

brave goblet
steel swan
#

there is no special code all i want is create an inventory with the name of a player

kindred valley
tall dragon
#

check if the event is fired on the main hand

steel swan
#

for instance like that

@EventHandler
    public void onBlockPlace (BlockPlaceEvent event){
        Block block = event.getBlock();
        Player player = event.getPlayer();
        Inventory name;
}
brave goblet
#

name = player.getName

steel swan
#

doesnt work like that

#

player.getDisplayeName is a string

#

and my variable is an Inventory

brave goblet
left swift
#

Can I somehow deploy jar to multiple folders using sftp? (intellij deploy tool)

brave goblet
#

@steel swan do u know how to create an inv?

steel swan
#

bro

#

ik how to do that

#

my only question is how to create an inventory with a specific name

brave goblet
steel swan
#

.NO

#

THE

#

name

#

of

#

the

#

variable

brave goblet
#

why would u want that tho?

steel swan
#

long story

brave goblet
#

that is 100000% impossible for java

brave goblet
steel swan
#

ok so

#

the thing i m trying to create is the folowing

#

ok nvm i found an other way

brave goblet
#

ok good

#

gl with the rest of ur project!

quiet ice
#

sftp is just ftp via ssh, should be easily doable

left swift
#

Probably I have it! I created a group of servers

quiet ice
#

Just read the manpage of sftp and create some batch file for it

kindred valley
#

@tall dragon how can i reach TileState on 1.12 spigot

quiet ice
#

Alternatively use scp, it does a similar thing but is even easier to understand and use through scripts

zinc mist
#

I ended up finding WorldCreators but I am having a slight issue trying to understand how to set the generator settings. The post that I had found has this: wc.generatorSettings("2;0;1;"); but from what it says in my IDE the parameter for it needs to be a JSON format with valid biomes, structures, etc.

steel swan
#

Is there a way to give each block an inventory

#

like i already did the whole "when right click it opens"

red sedge
#

Can I cahnge the variables of an enum at runtime

#

so anywhere accesing that enum's variable will get that value

#

instead of the hard coded one

quiet ice
#

The variables of an enum instance yes, create enum instances - yes - with a catch (the compiler will not allow it unless you trick it into thinking that it isn't an enum)

#

But generally if you have control over an enum and want to arbitrarily create instances of it, you might as well use a registry

zenith saddle
#

What is the best way to check the length of args

eternal oxide
#

args.length

crimson terrace
#

you mean how long the string inside the arg is?

grim ice
#

or wait

#

nvm i forgot the at runtime part

#

wait actually

kindred valley
#

How can i reach tilestate in 1.12.2 spigot?

grim ice
#

nvm

#

he can do that

crimson terrace
quiet ice
#

If you want to edit something at runtime, you should absolutely choose registries over enums or abandon the idea of editing at runtime

crimson terrace
#

actually nvm just found it. it is however giving me a weird "Invalid name or UUID" error. and no information with that

quiet ice
#

If someone knows how to trick the compiler to do stupid stuff, they wouldn't be asking this question in the first place, so I believe that my advice is justified

grim ice
#

cant he just have a variable in the enum

quiet ice
#

Yes that is possible, but I am afraid that that person is not asking that

#

They probably want to edit the internal values array

grim ice
#

how to do it tho

#

that compiler fuckery

kindred valley
#

what version persistentdata came with

quiet ice
#

If you play around with ASM too much stuff like that will get natural

fallen sandal
#

how to update a plugin version?

quiet ice
#

Right now it is too ambiguous to answer

fallen sandal
#

no like

#

my plugin version is 1.18.1

#

so i want to upgrade it to 1.18.2

#

i had changed my pom.xml <version>1.18.1-R0.1-SNAPSHOT</version>

#

this to <version>1.18.2-R0.1-SNAPSHOT</version> this

#

but still its not working .-.

quiet ice
#

Not working as in?

grim ice
#

why cant u use reflection tho

quiet ice
#

And do you mean plugin version as in the version declared by the plugin.yml or the version of spigot-api?

grim ice
#

im pretty sure enums did have an array of values in it didnt it

zenith saddle
#

when you crash your server with a loop...

quiet ice
grim ice
#

cant u change that

#

with reflection

quiet ice
#

Either way, it isn't of good use if you cannot obtain an instance in the first place

quiet ice
#

Think or know?

fallen sandal
#

lemme change it

grim ice
#

its possible

#

ig

quiet ice
#

It's possible in Java 7

ivory sleet
#

yeah pretty sure the module system strongly encapsulates the enum class

grim ice
#

modules came with java 9 tho

#

how about java 8

quiet ice
#

Compiler does not allow it

grim ice
#

fuck

quiet ice
#

That is extending enum directly

ivory sleet
#

technically altering bytecode could allow some bizarre stuff but thats a nono

quiet ice
#

Which would get rid of the enum flag and thus allow to extend the enum to thus create instances of the enum

#

That is as soon as you use ASM to get rid of the enum access flag, you can use that hack

ivory sleet
#

ye

quiet ice
#

I use this actively when modding other games written in java

grim ice
#

asm looks cool

#

but i dont get anything about it and it seems that i have to be some type of genius with a degree to learn its basics lmfao

fallen sandal
#

oo lol plugin.yml ones is my plugin version

#

i was telling about spigot version of plugin

#

i had this in my maven

#
           <groupId>org.spigotmc</groupId>
           <artifactId>spigot-api</artifactId>
           <version>1.18.2-R0.1-SNAPSHOT</version>
           <scope>provided</scope>
    </dependency>```
#

but it 1.18.2 server its telling that my plugin is up to date

quiet ice
#

Are you sure that you need to do what you want to do?

fallen sandal
#

yeah

quiet ice
#

And what is it for?

#

Updating the version of the spigot-api you bind into has only moderate effects unless you need some shiny new API

fallen sandal
#

i just want to update it

opal juniper
#

anyone got a "preferred" heuristic for A*

zenith saddle
#

I know that in 1.8 you can edit the nbt of an item. In 1.17 is this possible / how?

quiet ice
quiet ice
fallen sandal
#

i am explaining you

#

my spigot server version is 1.18.2

midnight shore
steel swan
#

hey, so i have a hashmap to apply an inventory to a block, but idk how to create AN inventory FOR the block. Like i know how to create an inv but idk how to do it for the block

fallen sandal
#

and plugin supported the server version is 1.18.1

#

so i want to update it to 1.18.2 for my server

#

thats it

carmine mica
#

How would I send a message to the chat? (Not via command, just send a message)

midnight shore
#

Bukkit.broadcastMessage();

#

this will send the message to everyone

#

if you wish to send it only to few players, use Player.sendMessage();

midnight shore
tender shard
carmine mica
tender shard
carmine mica
grim ice
#

mfnalex do you see any problem

#

to having every void method return an int

tender shard
midnight shore
tender shard
#

you didn't even enter Bukkit

carmine mica
#

ah

grim ice
#

0/1/-1 (as a way to show SWI)

tender shard
carmine mica
#

nvm then

grim ice
#

if it succeeded or not

carmine mica
#

how do I color text again?

tender shard
midnight shore
tender shard
tender shard
midnight shore
grim ice
#

idk what to call it so i called it what i heard in an ASM tutorial

tender shard
#

or maybe also late 1.18.1

#

before that, there's only GameProfile from mojang's authlib

midnight shore
#

yeah but i'm wondering for 1.17

tender shard
#

com.mojang.authlib

midnight shore
#

yes so where is any detail about the skin stored in craftbukkit?

zenith saddle
#

I heard that .getItemInHand is bad, what is the best way to get the item in a players hands?

grim ice
#

like -1 for example

#

so i'd stick with short

tender shard
midnight shore
grim ice
#

u dont need a i32 for stuff between -1 and stuff eitherway

midnight shore
#

like EnumReturns

tender shard
#

yeah, use enums instead of weird numbers ๐Ÿ˜„

zenith saddle
grim ice
tender shard
grim ice
#

but i wouldnt say

#

theyre weird

#

anyone would understand them

#

its like saying u dunno what 404 means

tender shard
#

well it's weird to say "-1 is this, 0 is that, and 1 is something else" if it doesn't actually have something to do with numbers

grim ice
#

i mean it makes sense that 0 means success, 1 means fail, -1 meaning invalid input or some type of unexpected error that should not happen

tender shard
#

hm not really, that's basically what enums are for

#

1 could as well mean invalid input and -1 could mean fail

grim ice
#

Not imo

tender shard
#

then go for it

grim ice
#

Im sure java used that system in some methods

#

but its documented

#

in fact many methods

tender shard
#

probably because enums were added pretty late

grim ice
#

eh

#

pretty sure ive seen new methods

#

that are definitely past java 5

#

that use it

tender shard
#

I don't know any tbh ๐Ÿ˜„

grim ice
#

ive seen some though i cant get one of the top of my head

midnight shore
tender shard
#

CraftPlayer has a field "profile"

#

that holds a GameProfile

midnight shore
#

so if I change it I can technically change the player skin e name?

tender shard
#

you can only change the skin if you also have a valid signature for it

midnight shore
#

Yeah yeah

#

Thank you

tender shard
#

oh wait, I think I'm mistaken about the "profile" field

#

one sec

midnight shore
#

Ok

tender shard
#

CraftPlayer has a public method getProfile()

zenith saddle
#

Can someone tell me how to do the delay?

#

what is wrong?

fallen sandal
midnight shore
earnest forum
#

scheduleSyncDelayedTask(plugin, new BukkitRunnable() {}, delay);

#

code inside the {}

#

you can expand it into multiple lines like a method

river oracle
fallen sandal
#

so how other plugin dev update their plugins .-.

#

from 1.17 to 1.18

crisp steeple
river oracle
#

Sometimes you don't have to do anything all depends if your using nms or not

glossy scroll
#

this doc is poorly written, don't really know the difference between them

river oracle
#

Cuz technically if you use 1.8 you can automatically support up to the latest without changing anything granted you don't use nms

red sedge
#

Anyone got a better way of doing this? this was the best way i could think of

rain grove
#

How can I convert a chunk to a location?

tardy delta
#

a chunk covers a lot of locations

maiden thicket
#

oh nvm

#

i see u have a thing

tardy delta
#

make an AbilityManager

rain grove
tardy delta
#

check the docs

rain grove
tardy delta
#

wha- what are you doing?

zenith saddle
#

This code only produces Check 0, I assume It is because of the first If statement. How would I be able to check it correctly?

tardy delta
#

if you want to get a Location object from a x y and z, use the location constructor

red sedge
grim ice
tardy delta
#

what is that Ability class even supposed to do?

rain grove
red sedge
#

Uh to execute abilities

tardy delta
#

dont use BukkitScheduler::scheduleblablabla methods

#

use the runblablba instead

red sedge
grim ice
#
  1. Your "customConfig" class shouldnt be named like that.
  2. You only use L For Long literals
  3. Your class name should be more descriptive
  4. Your event name should be more descriptive
  5. you dont compare blocks with ==
  6. you're static abusing
#

it took me a moment to realize customConfig is a actually a class u made

#

and get() is a static method

tardy delta
#

theres no difference between 1 and 1L only a few bytes more space used on your disk

grim ice
#

and its 1 byte

red sedge
#

its 1byte?

grim ice
#

also

red sedge
#

Isnt that 8 byte difference

tardy delta
#

why would it make difference

grim ice
#

if u write 1 in

#

ok e.g

#

void o(long x)

#

o(1); would error

#

o(1L); would not

zenith saddle
#

Look at my newest code I dont even have an L there anymore?

grim ice
#

the compiler will read o(1); as o((int) 1);

#

by adding L it reads it as a long

red sedge
#

i should make a abilitymanager but idk if i should

grim ice
#

a letter is only one byte

red sedge
red sedge
grim ice
#

and 8 bits

tardy delta
zenith saddle
#

What are you on about with the L?

red sedge
#

fourteenbrush i dont really see a point in making a separate abilitymanager since well it will only have like 2 functions

grim ice
#

Oh my bad

#

@tardy deltaadd a dozen zeroes

#

to the 1

tardy delta
#

lol if you dont need the zeros dont add them

grim ice
#

i meant

tardy delta
grim ice
#

void o(long x) {}
o(9223372036854775807);

#

this will error

#

However

#

o(9223372036854775807L);

#

will not

red sedge
grim ice
#

since as i said the compiler's gonna read it as (int) 9223372036854775807

#

without the L

tardy delta
#

working with an object array kinda hurts

red sedge
#
@EventHandler
    public void onJoin(PlayerInteractEvent e) {
        Ability.call("test_ability", e.getPlayer());
    }
#

ah yes

#

on join and player interact event

#

im amazing

grim ice
tardy delta
#

kinda statis abuse

ivory sleet
#

methods are functions tho

tardy delta
#

function pointer where ๐Ÿ‘€

grim ice
red sedge
ivory sleet
#

depends

#

I mean

#

methods are just syntactic functions where first argument is the object itself

tardy delta
#

so thats why i would make an ability manager

grim ice
ivory sleet
#

java isnt only oop

grim ice
#

it has functional style as well ik

compact haven
#

you what

#

java is only OOP

red sedge
ivory sleet
#

well you have static

#

which is not oop at all

compact haven
#

oh well that's true

tardy delta
red sedge
#

can you tell me about the static aboose part?

compact haven
#

hadn't really thought about that

tardy delta
#

?static

#

wasnt there a thing for that

#

?staticabuse

compact haven
#

we have tags on this discord?

tardy delta
#

mm

#

?tag list

#

?list

red sedge
#

I mean not using statics seem like a waste to me

#

since abilities will only be loaded once

crisp steeple
#

technically everything only gets loaded once

#

that doesnโ€™t mean you should use static for everything though

compact haven
#

it's not about that, it's about design

tardy delta
#

lets code the whole plugin static then

compact haven
#

ideally only utilities are static, because they have no state

crisp steeple
#

yea

compact haven
#

a bunch of abilities is state, you don't want that static

red sedge
#

So do i just need to make it not static and find a way to get an instance from somewhere

ivory sleet
#

ye

tardy delta
#

make an abilitymanager and instantiate it

ivory sleet
#

pretty much

red sedge
#

Is there anything else?

tardy delta
#

i wanted to code but i forgot my disk was full and i counldnt install intellij smh

ivory sleet
#

eclipse

#

perhaps :#

zenith saddle
tardy delta
tardy delta
#

vscode isnt properly highlighting my errors

red sedge
#

i think you need to save for it to update

crisp steeple
#

notepad ide on top

red sedge
#

btw so i should try to not use statics as much as possible right?

tardy delta
#

yes

red sedge
#

and when is it acceptable..?

tardy delta
#

if you want behaviour that works for the whole class instead of a single object

#

or a variable thats shared with all instances

kindred valley
#

How to equal the block on interact event and a custom item block

red sedge
#

Okay so um I have a debug class that is just a easy way to log debug info, it needs a logger instance without being tied to an object so do i just make a static logger and initialize it at the start?

zenith saddle
#

How do you compare them?

crisp steeple
#

you probably want to use == for enum types

zenith saddle
#

someone just said not to

#

I am confused

crisp steeple
#

enum types should be compared with ==

tardy delta
#

people are saying not to use equals because the Material enum might be changed to a class

crisp steeple
#

like in a later version?

tardy delta
#

i heard that ye

zenith saddle
#

so this should work right? if (event.getBlockPlaced().getType() == (ItemManager.disappearingBlock.getType())){

tardy delta
crisp steeple
#

well in the case that happens use .equals() i guess but i sort of doubt itโ€™ll happen

#

besides it would break a ton of other things of that did happen

red sedge
tardy delta
#

templates?

red sedge
#

like idk

#

Debug.filePath() would change the . to -> so i dont need to

#

random example

tardy delta
#

lol

#

i tried something related but its just easier to use the logger instead

red sedge
#

yeah but im lazy

#

and that would be so much harder to change later

grim ice
#

u werent doing that

#

at the start

#

u compared two objects with ==

#

but with getType() its two enums

red sedge
grim ice
#

@red sedgewat u wanna do

sacred mountain
#

hey why is this throwing a nullpointer exception?

            User user = essentials.getUserMap().getUser(player.getUniqueId());
            String nickname = user.getNickname();
            if (nickname.equalsIgnoreCase(player.getName())) {
                return "None";
            } else {
                return nickname;
            }```
essentials api
red sedge
#

it needs a logger

grim ice
#

pass one to it then

tardy delta
#

null check it

grim ice
#

"without being tied to an object so do i just make a static logger and initialize it at the start?"

#

wat

tardy delta
#

i would create my own logger class and let it override the getLogger method in JavaPlugin

chrome beacon
#

Use your plugin logger

tardy delta
#

thats what im trying to say but he doesnt want to listen

chrome beacon
#

Ugh

visual tide
tardy delta
midnight shore
#

Is CraftPlayer.getProfile(); returning a clone or the actual profile?

left swift
#

What will be better way to communicate between proxy and servers, plugin message channels or sockets?

eternal oxide
#

depends

#

PMC requires a player on the server to receive any messages

quaint mantle
#
@EventHandler
    void hoeLand(PlayerInteractEvent e){
        Player player = e.getPlayer();
        if(
                player.getInventory().getItemInMainHand().getType() == Material.WOODEN_HOE ||
                        player.getInventory().getItemInMainHand().getType() == Material.IRON_HOE
                || player.getInventory().getItemInMainHand().getType() == Material.GOLDEN_HOE ||
                        player.getInventory().getItemInMainHand().getType() == Material.DIAMOND_HOE
                || player.getInventory().getItemInMainHand().getType() == Material.NETHERITE_HOE
        ){
            if(e.getClickedBlock() instanceof Farmland){
                Farmland land = (Farmland) e.getClickedBlock().getState();
                land.setMoisture(7);
            }
        }
    }```
#

Why doesn't this make my farmland wet so I can plant crops ?

prime kraken
#

Hello everyone, I come to ask for your help because I am stuck. I need to use NMS for my server under 1.17.1. I work with intellij idea. I have run Buildtools to get the 1.17.1 version as well as the remapped version. When I ask intellij idea to run the compilation of my plugin, it tells me this : Unresolved dependency: 'org.spigotmcspigotjar:1.17.1-R0.1-SNAPSHOT' (I modified the name of the files before to see if it came from that but no) I used the remapped mojang classifier but nothing to do. Help me please ๐Ÿ˜ฆ

tardy delta
earnest forum
#

or switch it

tardy delta
#

or enumset

#

lotta cleaner

grim ice
#

instead of what the heck ur doing

quaint mantle
#

_HOE

#

just for safety

#

dont take that out of context

grim ice
#

doesnt matter

eternal oxide
#

it matters for future compat

#

imagine they add a _SHOE later

quaint mantle
#

lol

grim ice
#

LMAO

#

Alright

#

it would break as well if they add hoecake

#

wait

#

nvm

carmine mica
#

Hi, how would I define plugin ? I get this error. currently I am just doing Plugin plugin; because I don't know as what I would define it

eternal oxide
#

?di

undone axleBOT
tall dragon
#

you would define it... as your plugin?

carmine mica
#

you mean something like Plugin plugin = this.plugin? or this.plugin = plugin?

eternal oxide
#

read the wiki link

river oracle
earnest forum
sinful tundra
#

Where can I configure the maven build target folder? ( where it'll output the .jar file )

sinful tundra
#

Will this work?

#

Just found it

tall dragon
#
<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <classpathPrefix>lib/</classpathPrefix>
                            <mainClass>Start</mainClass>
                        </manifest>
                    </archive>

                    <outputDirectory>../out</outputDirectory>
                </configuration>
            </plugin>

this is what i got

sinful tundra
#

Ok I'll try thanks

#

It puts the class files there not the jar itself

#

Trying to see why

#

Nope, still doesn't put the .jar

#

Ahh now it works, it was in the wrong plugin

quaint mantle
sinful tundra
#

Wow seems like you helped him a lot :/

quaint mantle
chrome beacon
#

You need to update the blockstate

quaint mantle
#

Okay I figured it out.

quaint mantle
#

I use this

@EventHandler
    void moistureChange(MoistureChangeEvent e) {
        Farmland land = (Farmland) e.getBlock();
        if (land.getMoisture() != 7) {
            land.setMoisture(7);
            e.getBlock().setBlockData(land);
        } else {
            e.setCancelled(true);
        }
    }```
And it won't set the moisture.
grim ice
#

well

#

Farmalnd land = (Farmland) e.getBlock().getBlockData();
land.setMoisture(7);
e.getBlock().setBlockData(land);
e.setCancelled(true);

sinful tundra
#

Is there a way to check if an inventory can actually have space for specific item ( it includes amounts, stacked items non stacked items all of that )

smoky adder
#

Hi I was trying to send a title to a player since on the jar I use there is no player.sendTitle ("") I saw that packages are used but it gives me an error. https://paste.md-5.net/etahamotux.cs

grim ice
distant fern
#

Hi,
I need help with my BukkitRunnable(). If someone want to help just dm me and I will tell you what is the problem.
I don't want to spam here ๐Ÿ˜„

delicate lynx
#

just ask here

distant fern
#

What is the problem?

tardy delta
#

lol

distant fern
#

I changed to LongValueOf. Thats correct. But the plugin is still underlined

tardy delta
#

hover over it

#

why would you ever need a Long object instead of a primitive?

distant fern
#

idk. Its what was written in BukkitRunnable examples

#

so what is the problem with "plugin?"

delicate lynx
#

you never set your plugin instance

distant fern
#

so what i should do instead of instance

#

like me..... Main?

#

or what?

#

i kinda dont understand runnables

quaint mantle
#

@grim ice

distant fern
quaint mantle
#
@EventHandler
    void replantCrop(BlockBreakEvent e) {
        e.getPlayer().sendMessage(e.getBlock().getType() + "");
        if (e.getBlock() instanceof Ageable) {
            Player player = e.getPlayer();
            player.sendMessage(e.getBlock().getType() + "");
            Ageable blockAge = (Ageable) e.getBlock().getBlockData();
            if (BetterFarming.crops.contains(e.getBlock().getType())) {
                if (blockAge.getAge() == 3) {
                    if (
                            e.getBlock().getType() != Material.NETHER_WART
                                    ||
                                    e.getBlock().getType() != Material.BEETROOT_SEEDS) {
                        if (!player.isSneaking()) {
                            e.setCancelled(true);
                            player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent("You cannot break this baby crop!"));
                        }
                    }
                } else {
                    if (!player.isSneaking()) {
                        e.setCancelled(true);
                        player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent("You cannot break this baby crop!"));
                    }
                }
            }
        }
    }```
#

It never stops you from breaking baby crops, why ?

sacred mountain
#

how would i calculate a kdr from 2 integers?

#

i want something that looks like 4.02 or 1.57

#

do i just kill/Math.max(1, death)

#

for some reason that gives 'integer division in floating point context' and outputs 0.0

grim ice
zenith saddle
#

If I have a blockname as a string, how do I compare that to a block

eternal oxide
#

block name as in?

zenith saddle
#

A string that is for example "STONE" how do I compare to a block

#

I know how to do with material

eternal oxide
#

there is a method in Material to find them by name

zenith saddle
#

you can do Block.getType()

sacred mountain
#

could you tell me why i cant divide integers

#

from a base level

#

whats the difference between

8/2 and 8.0D/2

chrome beacon
#

First one won't have any decimals

sacred mountain
#

yeah but instead of 4 it returns 0 when dividing non factors

#

like 7/3

#

nvm i ge ti tnow

zenith saddle
#

Do I have to import all the methods

tardy delta
#

bruh why

chrome beacon
#

You shouldn't do that

tardy delta
#

use a constructor or a method of some kind to get a block

delicate lynx
#

wtf is that

tardy delta
#

World#getBlockAt#setType might be something?

spring minnow
#

how do i get drops of a mob without actually having the mob class?

#

Like i only have the EntityType, is there a way to get the default drops of that mob?

worldly ingot
#

Not with just the type, no

spring minnow
#

D:

zenith saddle
#

returns false

#

Why??

arctic moth
#

what event should i use for when a falling block dies because i need something that triggers before it removes the entity, and EntityDropItemEvent is after

delicate lynx
#

please use variables holy

zenith saddle
#

But the same thing would happen

delicate lynx
#

it would be easier to read what is going on

zenith saddle
#

ok

arctic moth
zenith saddle
tardy delta
#

using java 8 or higher? than use lambda

#

much cleaner :p

worldly ingot
#

At least more often than not it will not be referentially comparable

#

.equals() check it

#

Though I'd advise just doing ItemStack#isSimilar() instead so you're not cloning the ItemMeta each time

tardy delta
#

does the equals method clones it?

worldly ingot
#

No, but getItemMeta() clones the meta

#

ItemStack#isSimilar() does not

tardy delta
#

owh that

arctic moth
#

how would i check if something is on the perfect positioning that a block would be on

zenith saddle
#

Ok so that fixed that but now...

#

Caused by: java.lang.UnsupportedOperationException: Use BukkitRunnable#runTaskLater(Plugin, long)
at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftScheduler.scheduleSyncDelayedTask(CraftScheduler.java:517) ~[server.1.17.1.jar:3284a-Spigot-3892929-0ab8487]
at me.oakswingzzz.customItems.Events.RemoveBlocks.removeBlock(RemoveBlocks.java:45) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[server.1.17.1.jar:3284a-Spigot-3892929-0ab8487]
... 21 more

tardy delta
#

it tells you what to do

quaint mantle
#
@EventHandler
    void moistureChange(MoistureChangeEvent e) {
        Block block = e.getBlock();
        Farmland land = (Farmland) block.getBlockData();
        if(land.getMoisture() != land.getMaximumMoisture()) {
            land.setMoisture(land.getMaximumMoisture());
            block.setBlockData(land);
        } else {
            e.setCancelled(true);
        }
    }
#

For some reason, this is not working?

tardy delta
#

well add sysouts

quaint mantle
#

??

tardy delta
#

system.out.println on place where you want to check that the code did execute

eternal oxide
#

If you are tryign to keep it at max moisture you need to also cancel the event or you are being overwritten

worldly ingot
#

^

#

Beat me to the punch

#

Cancel the event regardless of your outcome here

quaint mantle
#

Ohh okay, cancel it it both cases.

#

Nope, still doesn't work.

tardy delta
#

show code

quaint mantle
#
@EventHandler
    void moistureChange(MoistureChangeEvent e) {
        Block block = e.getBlock();
        Farmland land = (Farmland) block.getBlockData();
        if(land.getMoisture() != land.getMaximumMoisture()) {
            System.out.println("Changed block's wetness.");
            land.setMoisture(land.getMaximumMoisture());
            block.setBlockData(land);
            e.setCancelled(true);
        } else {
            System.out.println("Didn't change the block's wetness.");
            e.setCancelled(true);
        }
    }```
eternal oxide
#

looks fine

quaint mantle
#

When I hoe it.

#

It doesn't work.

#

till it*

tardy delta
#

put that cancelling outside of the if else rrr

eternal oxide
#

a hoe doesn't change the moisture level

quaint mantle
#

hmm

eternal oxide
#

hoe ground next to water, then remove the water. let the land dry out

#

a single block of water

zenith saddle
#

It tells me to Use BukkitRunnable#runTaskLater(Plugin, long). Can someone give me an example?

eternal oxide
#

?scheduling

undone axleBOT
zenith saddle
#

All of that uses runTaskLater(Plugin, BukkitRunnable, Long) not runTaskLater(Plugin, Long)

eternal oxide
#

same thing

tardy delta
#

use runTaskLater with a plugin, a lambda and your delay

zenith saddle
#

Caused by: java.lang.UnsupportedOperationException: Use BukkitRunnable#runTaskLater(Plugin, long)

eternal oxide
#

?xy

undone axleBOT
earnest forum
#

but since you already have a runnable and you are running the task off that instance you just input (Plugin, long)

arctic moth
#

github amazes me sometimes

flat olive
#

one time I had to commit a file that was never even changed, and it even said it wasn't even changed in my IDE. Smh.

tender shard
#

it's supposed to look like that if you remove the whitespace ๐Ÿ˜„

arctic moth
#

on intellij it shows no difference

worldly ingot
#

Your IDE (or local git) might ignore whitespace changes in the diff

#

Honestly, GitHub might have a toggle for whitespace

arctic moth
#

if your test server doesnt look like this then you're a certified chad

#

"cool worldgen plugin"

#

it even introduces blocks that will get you sent to the backrooms

#

lol is that like 7 minutes behind

#

3

#

same thing

arctic moth
#

theres also sussy ghost block holes

#

anyways can someone help me with "a little" debugging?

#

its not like a bug in my code but more a bug with falling blocks

#

and im not sure how to avoid it

#

basically, when i yeet a lot of falling blocks, they bug out

river oracle
#

What is the reccomended way to grab Materials. I'm just curious as I know with Entities I've been using Namespaced keys I'm wondering if a similar approach is good for materials

tender shard
river oracle
#

from a string I should preffis

#

okay thanks

tender shard
#

but that's supposed to change in the future, maybe soon

river oracle
#

What would it change too

#

just curious

tender shard
#

md_5 said it'll be bytecode compatible, so I guess it'll be static final fields

#

like the Enchantment class I guess

river oracle
#

anyway I can futureproof or nah

#

I guess not

#

now that I think about

tender shard
#

what are you trying to do?

river oracle
#

making a inventory lib for some personal use stuff and I don't want to come back in and have to change it later

tender shard
#

if you wanna get materials by their name, just use Material.valueOf. That will 100% work in future versions too

river oracle
#

okay

tender shard
#

or maybe Material#getMaterial

#

that's probably the better way

river oracle
#

hmm I wonder wat the difference is

tender shard
#

right now it's the same

river oracle
#

ahhk

#

I forget I can look at the source for this stuff

tender shard
#

yeah but Ctrl+B on the Material class takes a while ๐Ÿ˜„

#

my intellij crashed when I tried to decompile it

#

because of this fucking "minecraft dev plugin"

river oracle
#

I don't use intellij lol I just go on the website

tender shard
#

fair enough

river oracle
#

yea its the same atm it seems

    @Nullable
    public static Material getMaterial(@NotNull String name, boolean legacyName) {
        if (legacyName) {
            if (!name.startsWith(LEGACY_PREFIX)) {
                name = LEGACY_PREFIX + name;
            }

            Material match = BY_NAME.get(name);
            return Bukkit.getUnsafe().fromLegacy(match);
        }

        return BY_NAME.get(name);
    }```
tender shard
#

yep a normal lookup table

river oracle
#

neat

#

yea I'm not sure with this newer stuff because I recently switched from 1.12.2 from a while back so I got all this new crap too experiment with

tender shard
#

ugh

#

1.12

river oracle
#

pain

tender shard
#

my first public plugin was for 1.13 and that's already 5 years ago lol

river oracle
#

yea man server owners are wack

tender shard
#

I think I'll make my obfuscator add some rick roll links into the code

river oracle
#

that'd be funny

river oracle
#

like bruh I told you it was 1.12.2

#

lmao

#

no refunds hehe

limpid pebble
#

I was hoping someone could help me with a plugin... it's perfect and works, but the language it uses when executing commands is broken english at best... all I need is for someone to help me edit the plugin to have better grammar... could someone help?

tender shard
tender shard
river oracle
#

nah I was pretty explicit with the version requirements

tender shard
#

I mean sometimes people are just blind and forget they have to watch out for the version

river oracle
#

Its on them

limpid pebble
#

Hey Y2k or mfnalex

tender shard
#

yes of course but might as well be friendly and refund them. at least that's what I'd do ๐Ÿ˜„

limpid pebble
#

do you think either of you would have a moment to help me?

tender shard
#

?ask

undone axleBOT
#

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

river oracle
#

idk if anyone here would be willing tbh

limpid pebble
#

Where should I look? not really sure where to go.

river oracle
#

do you have no english friends?

limpid pebble
#

I figure it should only take a few mins, I just am not tryna learn and setup eclipse for a simple issue fix

tender shard
#

is that plugin open source?

limpid pebble
#

Yessir

tender shard
#

well you could probably pay someone a tiny amount to help you with this, but:

#

?services

undone axleBOT
limpid pebble
#

I'm also not trying to have it say MYSERVERNAMESPLUGIN IMADE IT
I just want it to not use "you paided PLAYER $100"

#

lol

tender shard
#

lol

#

you paided

#

awesome

limpid pebble
#

yeah the guy knew java...not basic grammar.

hexed hatch
#

paided

river oracle
#

hehe this is why I put everything in a config I suck at grammar

hexed hatch
#

that's going in my vocabulary

limpid pebble
#

Exactly, WHY IS IT NOT A CONFIG

#

Also, worse off

tender shard
#

yeah I have to add this to my "SpigotMC <> English" repo

limpid pebble
#

The idiot has permissions to make it work right?

#

Yeah all the permissions are not visible or listed. you gotta open the plugin to even view the code that adds the perms to find them out

#

I mean A+ genius programming but cmon why fall short on the simple stuff.

river oracle
#

ehh you might be better off tryna figure out a alternative then

limpid pebble
#

Sadly are none ๐Ÿ˜ฆ

tender shard
river oracle
#

what type of plugin is this?

limpid pebble
#

MultiWorldMoney seems to be a dead project/idea

tender shard
river oracle
#

or multi-world

limpid pebble
#

Multiworld

#

It's just to make worlds act like servers for the economy

river oracle
#

thats very easy? you can do it with things like essentials?

limpid pebble
#

Essentials doesn't support a perworld economy that I know of.

river oracle
#

oh a perworld economy

#

gross

limpid pebble
#

Yea I mean don't judge me... it's a long story.

river oracle
#

bungeecord?

limpid pebble
#

But it works for what I need it for... and it's the only option I can find.

noble lantern
#

if you want multiple servers get multiple servers

limpid pebble
#

Spigot

tender shard
#

@limpid pebble Do you have any IDE installed, like IntelliJ?

noble lantern
#

dont have 5 servers on one server

limpid pebble
#

nah, I don't work on java stuff I'm a SQL and webcode like CSS/HTML kinda guy

tender shard
#

go download IntelliJ

#

you should be easily able to change the messages yourself

limpid pebble
#

ok

tender shard
#

if you know basics of sql and css/html you are also able to change strings in java code ๐Ÿ™‚

limpid pebble
#

yah im not an idiot I just need a nudge or help something lmao

#

Man I can even see the text I need to edit when I open the jar as an archive, i just can't touch it w/o breaking things cus it's not the right kinda editor.

#

Downloading Intellij rn

tender shard
#
  1. Install IntelliJ
  2. Copy the URL of the github repository
  3. in IntelliJ click on File -> new Project -> from Version COntrol
  4. Insert the Github URL
  5. Go through the files, adjust the messages
  6. come back here to ask us on how to compile lol
limpid pebble
#

Issue w/ Step 2

#

no github provided

tender shard
tender shard
limpid pebble
#

All I got to work with is a jar, his "sourcecode" link is to a game he made.

tender shard
#

ugh

limpid pebble
#

Yeah, I guess he's switched source code link to his shitting 2d gameengine game advertisement.

tender shard
#

well if you only have a .jar file, it's way more complicated

limpid pebble
#

Fuck.

tender shard
#

you'll have to decompile it, then setup a proper classpath / environment stuff etc

#

then compile it again

#

not really complicated but quite annoying

limpid pebble
#

Yeah, that sounds fun.

tender shard
#

you got a link to that plugin?

limpid pebble
#

Yea man

tender shard
#

erm tbh

#

why don't you look for a proper multi world economy plugin instead?

limpid pebble
#

Like I said it works great, I just wanted to remove the "TheMultiWorldMoney - TMWM" tag on every message, and fix the grammar

#

Are there any? I have no clue what I'm lookig for so after 4 pages of google I concluded it was a lost cause and this was the only one

tender shard
#

hm well if you just wanna replace some strings - I today wrote a tool to replace strings inside .jar files

limpid pebble
#

you're kidding, really?

tender shard
#

yeah but

#

it's extremely basic

limpid pebble
#

Do I just enter my bank info and SSN and then click "run"?

tender shard
#

exactly

limpid pebble
#

Lmao I'll try it, I don't need anything fancy!

tender shard
#

yeah well let me have a look at the source of this plugin

limpid pebble
#

All you man. Thanks for your help alex.. really.

#

This is literally THE FINAL PIECE of my puzzle that has been the past 4 weeks of my life.

tender shard
#

wow

#

this is next level bad code

noble lantern
#

why is the grammar of that plugin page so horrible lmao

limpid pebble
#

Man, I have no clue. I think English is his fifthenth language judging by quality.

tender shard
#

they are even using bash color codes

limpid pebble
#

And he has a tag for EVERY MESSAGE THE DAMN PLUGIN SENDS

#

And it's a FOOTBALLFIELD LONG
"TheMultiWorldMoney - TMWM: you paided player $69"

tender shard
#

okay so you can easily replace the tags with my tiny .jar

#

one second

limpid pebble
#

Lit.

#

You're my hero.

#

if it means anything guys

#

This community has shocked me. Most of my programming discords are full of entitled assholes. myself included.

#

I appriciate the info and help

noble lantern
#

everyone in here is indeed an asshole

#

you just havent been here long enough

limpid pebble
#

if y'all weren't would you be good at programming? md_5

tender shard
#

You can use this and do the following with my tool:

java -jar JarStringReplacer-1.0-SNAPSHOT.jar nameOfThePlugin.jar output.jar '[TheMultiWorldMoney] " ""

this should get rid of all the "tags" / prefixes and save the file as output.jar

#

I am not allowed to send it here though because it has spigot shaded into it

#

I can DM it to you. do you have git bash installed?

limpid pebble
#

I friended u so u can dm it

#

no I don't

#

and can I fix the grammer with it at all?

tender shard
#

hm well

#

look at this

#

you'd have to enter exactly "Group<weird symbol>[0m" to replace that part, for example

#

so tbh

#

I'd just look for a proper multi world eco plugin instead

limpid pebble
#

Reading Java is like doing a line of crack and trying to do calculus with a 5th grader...