#help-development

1 messages · Page 589 of 1

eternal oxide
#

BEFORE trying to access the file

spare hazel
#

wdym?

tender shard
#

I thought you read the javadocs of ConfigurationSeriazable

quiet ice
#

The ClassPath thing seems like it is doing exactly that

spare hazel
#

all the clases that i eant them to be saved are serializable

spare hazel
#

both having a serialize method and a deserialize method

young dome
eternal oxide
#

Serializable or ConfigurationSerializable?

spare hazel
#

not gonna type that

quiet ice
young dome
#

bump

eternal oxide
#

then read the javadoc, you have to register them

quaint mantle
#

okay but then how do i add it to my List<MyClass>

quiet ice
quaint mantle
#

cus i got this:

List<ClassPath.ClassInfo> classInfoList = ClassUtils.classesFromPackage("org.joe.testplugin.Abilities");
        for (ClassPath.ClassInfo classInfo : classInfoList) {
            if(classInfo.load().isAssignableFrom(Ability.class)) {
                abilities.add(classInfo.getClass());
            }
#

but that aint working

#

not how it works

spare hazel
quiet ice
#

Also, do you know what a PACKAGE is in java?

remote swallow
spare hazel
#

okay leme try that

quaint mantle
#

this?

spare hazel
#

i hope it works

quaint mantle
spare hazel
#

i spend 8+ hours infront of my laptop dying to fix this

quiet ice
#

A package should be all lower case, so it is alarming that your "package" is formatted like a class

quaint mantle
quiet ice
# quaint mantle this?

Yep, so

          for (ClassPath.ClassInfo classInfo : classInfoList) {
            if(classInfo.load().isAssignableFrom(Ability.class)) {
                abilities.add((Ability) classInfo.load().getConstructors()[0].newInstance());
            }
quaint mantle
#

yea so that doesnt work

quiet ice
quaint mantle
#

?paste

undone axleBOT
quaint mantle
spare hazel
#

ConfigurationSerialization.registerClass(HypixelPlayer); Expression expected

quiet ice
#

Oooof, I mixed up the order of the isAssignableFrom call

#

it should be Ability.class.isAssignableFrom(classInfo.load())

spare hazel
quaint mantle
tender shard
#

HypixelPlayer.class

quaint mantle
#

cus there error is in that it has arguments for the constructor

quiet ice
#

Also - are you sure that every subclass of Ability in that package ONLY has a no-args constructor?

quaint mantle
#

oh they do not

#

they have args

#

thats the problem i know

quiet ice
#

Otherwise you'd need to get rid of the other constructors, only obtain the no-args ctor or use the sun Unsafe (i.e. maximum carnage)

spare hazel
young knoll
#

What

eternal oxide
#

I was late

quaint mantle
quiet ice
quaint mantle
#

how do i get only the no args constructors

quiet ice
#

So MyClass.class.getConstructor().newInstance();

#

Or in your case classInfo.load().getConstructor().newInstance()

quaint mantle
#

wich database do you recommend for this

remote swallow
#

what is this

quaint mantle
#

bro said this

quiet ice
#

that is also doable

young knoll
#

You can use getDeclaredConstructor with arguments to get your constructor

quiet ice
#

Either getConstructor().newInstance() or getDeclaredConstructor().newInstance(). Either will do the job

young knoll
#

It takes the class of each arg

quaint mantle
#

i usually use mongodb

quiet ice
#

I don't know what the difference is anyways

remote swallow
quaint mantle
#
List<ClassPath.ClassInfo> classInfoList = ClassUtils.classesFromPackage("org.joe.testplugin.Abilities");
        for (ClassPath.ClassInfo classInfo : classInfoList) {
            if(Ability.class.isAssignableFrom(classInfo.load())) {
                abilities.add((Ability) classInfo.load().newInstance());

                if(Listener.class.isAssignableFrom(classInfo.load())) {
                    Bukkit.getPluginManager().registerEvents((Listener) classInfo.load().getDeclaredConstructor().newInstance(), TestPlugin.plugin);
                }
            }
        }
#

?

zenith gate
#

so i would have to make a new instance of that class inorder for it to be seperate ?

noble lantern
quiet ice
spare hazel
remote swallow
quiet ice
#

not only reserved, it is a keyword

noble lantern
#

heaven forbid you need 2 clazz's ins the same scope

quiet ice
#

A reserved keyword would be goto and _

young knoll
#

clasz

noble lantern
#

how do yall do it? i normally just add an extra z CH_Kek

#

ooo clasz is a good one

young knoll
#

clazzzzzzzzzzzz

remote swallow
#

do you like it

quaint mantle
quaint mantle
quiet ice
#

You basically alluded that you register these event listeners twice or more

#

Else they wouldn't have an args constructor

young knoll
#

You don’t have listeners that take your plugin as an arg?

quiet ice
#

Dynamic registration and args constructors are always iffy anyways

spare hazel
#

i fixed an error, came back with 20 more...

quaint mantle
quiet ice
#

Well that is great, you just squashed a fatal syntax error. Now to solve the non-fatal syntax errors

quaint mantle
#

so like uhhh

#

how do i fixx it

quiet ice
#

CNFEs usually hint at packaging errors

spare hazel
#

in which file is the PDC data stored????????

chrome beacon
#

player data

quiet ice
#

Try to nuke all caches

eternal oxide
#

depends

quaint mantle
quaint mantle
quiet ice
#

Uh, are you explicitly calling loadClass?

quaint mantle
#

dont think so

quiet ice
#

Eclipse has no notable caches so you are clean in that regard

terse bough
#

Quick question how can I in the 1.20 this code:
Dispenser dispenser = (Dispenser) block.getState;
with an anvil, because "Anvil anvil" does not exist

young knoll
#

Anvil doesn’t have a state

#

It doesn’t store any special data

spare hazel
#

b;m���K> �+IK�V)�y`�.Ht~2x��M*�["Z��P!ŀ�8��3ƙ����f�I�&v�]ow��v>�6V(�ze�إ_�}e���Fb��4�}��ׂՈ�K����<�|��X���M. ���{��Q��M%dh��<.B�4g��^��^s>�x�A�,@*6#�=tUX#�S7P��|���%��y���V�" y��J{>�+��c�������EI]Ҋ�l���Yfa�t��X�D�P�wn�����~���;�z��6pn�kR���L�p�(���Z>�"h(�K����H�1�Q�~=#8&9�} �a6���.'��W]Gz���hl��ρ;����
is someone able to translate this into human language?

quaint mantle
terse bough
remote swallow
#

are you trying to browse a .dat file

quiet ice
#

rebuild the application

quaint mantle
#

oh but i have a outputDirectory in my maven plugins so it doesnt build there

quiet ice
#

Though it wont be too readable even if you do that

quaint mantle
#

actually

tender shard
quaint mantle
#

dif error

remote swallow
quiet ice
#

If you need to do that more often, yes.

pseudo hazel
#

is there any point in making a getter for a final variable?

#

like a public final

quiet ice
#

But decompressing it with my archive manager of choice and opening that with my editor of my choice is a thing of seconds.
You generally only want to verify whether something exists or not so eh

#

A getter for a public final is only really appropriate if you need to use it for Steams and like the short lambda things

#

The other usecase is if you want to make the field private later on

pseudo hazel
#

well I mean

#

if I have a final variable

#

isnt it just easier to make it public

#

since it cant be changed anyways

quiet ice
#

that is a coding style question

pseudo hazel
#

okay

quaint mantle
pseudo hazel
#

right

#

just making sure there is no functional difference

quiet ice
#

I wouldn't do it if you get graded on it, but privately - sure.

pseudo hazel
#

lol

#

ironic

#

well I am past the days of getting graded for my java code

#

but yeah im just using a ton of pubic final for my config class

quiet ice
#

Me neither. But I am giving tips to my peers where they sometimes get grounded for it

pseudo hazel
#

because I didnt want to bother making the getters

quiet ice
quaint mantle
#

i dont know either

spare hazel
#

fixed 20 error. now theres one left

pseudo hazel
#

noclassdeffound usually means it wasnt build correctly

quiet ice
#

Could you give us your built jar?

spare hazel
pseudo hazel
#

unless you are using class metadata witchcraft ig

quaint mantle
pseudo hazel
#

whats in PlayerJoin line 17?

#

@spare hazel

quiet ice
spare hazel
eternal oxide
spare hazel
#

leme check

quiet ice
#

But I do not know how one can nuke the IJ caches

eternal oxide
#

you only need register the class once

spare hazel
#

i forgot to call my methond in onEnable

quaint mantle
#

another time: java.lang.NoClassDefFoundError: com/mongodb/MongoException someone knows how to fix it?

tender shard
young knoll
#

Did you shade mongo

tender shard
#

String.class is a class

#

nope

quaint mantle
#

just used maven drivers

eternal oxide
#

did you add it to the libraries section of your plugin.yml as you were told?

quaint mantle
quiet ice
eternal oxide
#

?paste code where you are trying to use mongo

undone axleBOT
tender shard
tender shard
#

i can't promise, I'll do it when I feel like it 😛 currently I'm playing MC

eternal oxide
eternal oxide
#

before you try to access any mongo

spare hazel
quaint mantle
#

should i swap to eclipse? my github student is running out soon and i am no longer a student

#

this is the pom.xml

#

AHHH LIGHTMODE

tender shard
#

in the meantime, why don't you try to write the first part, that takes in 2 colors, and one number (length) that returns an array of "length" colors where the first one is color1, the last one is color2, and everything inbetween are the inbetween colors? because that's like 50% of the work that needs to be done

tender shard
undone axleBOT
quaint mantle
tender shard
quaint mantle
spare hazel
#

im too tired but i have to test my plugin one mre time before watching spigot plugin making series by kody simpson

quiet ice
eternal oxide
eternal oxide
quaint mantle
#

in the docs never used new

quaint mantle
tender shard
#

okay colors are just vectors with 3 components (r,g,b). let's imagine we only have one component.

color1 = 50
color2 = 150

difference is 100.

if the length is 5, then the difference per char is (150-50) / 4 = 25 (for length 5, we divide through 4, because we already got the first color as starting point)

so first char has color 50, second char has color 75, then 100, 125, 150.

#

you do that for each component (r,g,b)

tender shard
#

that looks correct except that the length should be length - 1

quiet ice
tender shard
#

in each red, green, blue calculation

#

for(int i = 0; i < length is correct

tender shard
#

but where it does the math, it should be red = start.getRed() + (redDiff / (length-1)) * i

quaint mantle
#

ill just use intellij community :/

tender shard
#

I might be wrong though lol. you gotta try it out.

quaint mantle
#

try <=

tender shard
#

hmm maybe try it without length - 1

#

maybe I was wrong

#

oh wait

eternal oxide
tender shard
#

in the for loop, check for length -1
and then the last color you just set to the end color

wet breach
#

how is the last one off?

tender shard
#

yeah, and then see if it even compiles

wet breach
#

r is 3 and b is 252 for a total of 255 🙂

#

seems you counted incorrectly then

young knoll
#

And then you realize half the methods you use need a newer api version

#

Lel

wet breach
#

are you trying to shift from red to blue in increments?

young knoll
#

Revision is basically always 0.1

wet breach
#

or you trying to make all possible red-blue combinations?

#

if you want to optimize this

#

you only need half the numbers

#

because the other half is just the inverse

spare hazel
#

came back with another error
again...
so tired
ill just create a thread.
its 12:22 AM and i started work 1PM. 11 hours of pure coding
any help appreciated
will look at it the nex day

wet breach
#

0-255 there is a middle point, the first half of the number can get you the second half of the numbers

tender shard
#

it's always <version>-R0.1-SNAPSHOT

wet breach
#

so that means somewhere there is a middle

tender shard
#

so 1.17 is 1.17-R0.1-SNAPSHOT

wet breach
#

to give an example of only needing half the numbers

#

lets take the numbers 0-100

#

1+99 = 100, 2+98=100

quiet ice
#

You going color interpolation?

wet breach
#

you would only need get to 50 to have used up all the numbers 🙂

spare hazel
#

Error(the PlayerQuitEvent Included)

wet breach
#

so this means you only need half the numbers

quiet ice
#

HSV is generally preferable over RGB for that

quaint mantle
wet breach
#

shade the mongo driver in

quaint mantle
#

how

eternal oxide
quaint mantle
#

yes I did

eternal oxide
#

oh you did inside

tender shard
quaint mantle
#

I was having dinner sorry, where is it

undone axleBOT
tender shard
#

yeah that's good. now use only half the length, then fill the rest of the array in reverse going back to the original color

quaint mantle
tender shard
#

e,g. 0 5 10 15 20 15 10 5 0

wet breach
#

Ironically I have a 32/16 bit color compressor 😛

eternal oxide
tender shard
quaint mantle
wet breach
#

in case you ever want to look at it, this compresses colors into 8 bit colors

eternal oxide
remote swallow
#

mongo wouldnt add docs just for spigot

quaint mantle
quiet ice
#

You likely need both

remote swallow
#

unless you want to shade the driver, use plugin.yml libraries

#

it means you dont have to shade it and loads it from the server

quaint mantle
#

okey

quiet ice
#

pom.xml to give the dependency to the IDE and library thing in plugin.yml for spigot

quaint mantle
#

now I have to search what exacly line I have to use

eternal oxide
#

You were told there ^

#

add to your plugin.yml

spare hazel
#

please check the latest thread.

spare hazel
eternal oxide
#

?paste yoru current plugin.yml

undone axleBOT
quaint mantle
#

im dumb i think

eternal oxide
#

looks fine

#

?paste now your servers latest.log

undone axleBOT
quaint mantle
#

oki

spare hazel
#

can someone please check the latest thread created in discord?

quaint mantle
eternal oxide
#

oh my 1.8? serously

quaint mantle
eternal oxide
#

pretty sure yesterday you said you were on a much newer version

glad prawn
#

average minigame server

spare hazel
quaint mantle
eternal oxide
#

else no one would have recomended libraries

quaint mantle
#

emm

remote swallow
# spare hazel pleaseeeeeeeeeeee

im pretty sure the more you beg for someone to look at it the lower chance you have of people actually reading it, ask again in half an hour to an hour or tomorrow

#

not every minute

eternal oxide
#

perahps I/we mis read somewhere

spare hazel
#

okay imma go bye

eternal oxide
#

then do as booboo said yesterday and mfnalex said today. use teh maven shade plugin

quaint mantle
#

how i do that 😓

tender shard
tender shard
#

Is 199 the second color?

tender shard
#

You gotta shade it

#

Then it looks good

quaint mantle
#

can you send me again please?

wet breach
#

let me know if its useful or if you want me to add more features 😉

#

I don't mind implementing more into it, I made it for someone who needed to compress to 8bit for console

spare hazel
#

alex can you look at the latest thread created?

#

i cant go
this is so serious for me

marble forum
#

Hello, is it possible to set the light level of a block type using a plugin? ie. the torchflower

Thanks

tender shard
#

now you'd need a method that "shifts" the array, e.g.
1 2 3 2 1 -> 2 3 2 1 2 -> 3 2 1 2 3 -> 2 1 2 3 2 -> 1 2 3 2 1

#

first and last element should always be the same, otherwise it'll look weird I guess

#

and yeah then you're basically done with the logic, then all you gotta do is translate those colors back into &x&r&r&g&g&b&b stuff, apply them to every character, and run it through ChatColor.transate...

#

nooo, then you'd have a hard "border" in the gradient

#

you shoud never have 1 2 3 4 5, but rather 1 3 5 3 1

#

unless you want to have that hard color change

quaint mantle
zenith gate
#

Do these do the same thing?

if(mana.get(uuid) + value < 0) {
                mana.put(uuid, 0);
            } else {
                mana.put(uuid, mana.get(uuid) + value);
            }
// ------------------------- //
            mana.put(uuid, Math.max(mana.get(uuid) + value, 0));
tender shard
#

^

#

looks good, but idk lol

high pewter
#

I'm making a plugin which randomises block drops, but I want containers to still drop their original contents. However, I'm finding that if I do InventoryHolder.getContents() on an InventoryHolder from BlockDropItemEvent.getBlockState() then the slots with items show as a stack of 0 air and the empty slots show as a stack of 1 air (so I can see which slots had items, but not what those items are). How can I get the contents from a BlockDropItemEvent?

calm robin
#

what is the sound effect called for when you get hit while wearing iron armor?

river oracle
#

is Gson safe to run async

#

wdym &x thing

#

just do ChatColor.of("&#FFFFFF")
bungeechat

high pewter
#

They mean buckit colors, don't use that when coding use stuff like ChatColor

river oracle
#

show code

#

?paste

undone axleBOT
river oracle
#

so yuo want to shift colors over?

#

just use hexadecimal its way easier to do math with

#

don't worry about &x&f&f&f&f&f&f&f

#

then you can run ChatColor#of on the hex

young dome
#

Do you know how to fix the YamlConfiguration#set problem which, for a String containing a quote, does this: 'a: b n''avez c' ? (With initial String : "a: b n'avez c"

midnight talon
#

Where can I find the src for this World.java function?

public RayTraceResult rayTraceBlocks(@NotNull Location start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks);
chrome beacon
#

?stash

undone axleBOT
hazy parrot
#

U usually search for Craft + interface name

midnight talon
#

Oh, so it's in the CraftBukkit src not Bukkit?

midnight talon
#

I see. Thank you for the help

high pewter
#

Don't. Just do with Y2K_ said, which doesn't require any formatting or &x stuff

zenith gate
#

Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.getType()" because "item" is null

This is on a PlayerInteractEvent, The event works and everything, but it gives an error when a player is holding nothing. I've asserted that the held item cant be null and if its Air it should return. My thought process means, there should be no errors. at least no Null errors. I'm still getting it.
So my question is, how can you stop a PlayerInteractEvent when the player isn't holding the correct item?

high pewter
#

Yes, but you can still use ChatColor#of for each color

orchid gazelle
#

e

zenith gate
#

?paste

undone axleBOT
zenith gate
chrome beacon
#

Check if item is null

young knoll
#

And not with assert

chrome beacon
#

^^

young knoll
#

Just use an if statement

orchid gazelle
#

Does anybody here use asserts?

zenith gate
#

isn't assert suppose to be better?

chrome beacon
#

No

#

It has a different use

river oracle
#

pattern matching?

zenith gate
#

so use

if(item == null) return;

instead of

assert item != null;
zenith gate
river oracle
#

I gave you a good solution you just ignored the formatting advice I gave

#

don't bother doing it raw

#

use ChatColor#of with hexes

#

and use pattern matching to replace them

high pewter
# zenith gate isn't assert suppose to be better?

Assert is for debugging. The whole point is that it opens your debugger if the expected statement isn't true (well, depends on IDE and Java implementation, I think there's also a Java flag that causes it to throw an exception if it isn't true). It doesn't actually do anything if you're not debugging

chrome beacon
#

One color per letter

#

for loop

#

anyways I sent you fully working gradient code earlier

#

No

#

Mods only

#

Well that doesn't matter

#

Who cares if it's a component or no

#

t

#

The gradient code calculation is the same

zenith gate
kind hatch
#

Looks like you're passing in hash function. lol

#

Are you using ChatColor#of() for the hex codes?

young knoll
#

The format for hex colors is &x&r&r&g&g&b&b

river oracle
#

as I said earlier no clue why you are avoiding the easy way but ^

young knoll
#

Much easier to just use ChatColor.of with a Color

river oracle
terse bough
orchid gazelle
#

truth of moment

#

:)

young knoll
#

Yeah sadly colour characters kind of kill your length

hasty prawn
#

Especially hex

young knoll
#

Wait for that choco PR to get merged

#

:p

river oracle
#

the component one?

orchid gazelle
#

What does it do

#

Tell us

river oracle
#

I wish MD_5 would atleast look at the Component PR its done

orchid gazelle
#

Thats's how life is

river oracle
#

legacy chat moment

young knoll
#

I don’t know if components solve this issue but I think they do

#

I also don’t know if scoreboards support them but again I think they do

hasty prawn
#

Wouldn't team prefix/suffixes be the current workaround?

#

I think all 3 get 128 characters

young knoll
#

Not for the title of the scoreboard

hasty prawn
#

I did not read the context Im ngl

young knoll
#

You could try NMS components for now

#

¯_(ツ)_/¯

river oracle
#

hopefully one day MD5 sees it :*(

#

for the time NMS / adventure ftw

remote swallow
#

components is pain

young knoll
#

MD has been busy lately

#

So PRs are a bit of a standstill :p

orchid gazelle
#

I did it :)

young knoll
#

Well I assume he’s busy, either that or the Austrian wildlife got him

orchid gazelle
#

Australian*

young knoll
#

Shh

#

He’s Austrian now

cedar pine
#

How do I make a Text Display entity type not be seeable from just 1 side?

kind hatch
#

Make it centered instead of fixed.

young knoll
#

Display#setBillboard

cedar pine
#

Oh oh, tyvm

river oracle
#

I need to serialize a shit load of item stacks to base64 what'd be a good way to do this

#

or bytes it really doesn't matter as long as its fast

young knoll
#

BukkitObjectOutputStream

#

It should be able to take an array

river oracle
#

alright

cedar pine
#

Like so @kind hatch ?

            Entity entity = block.getLocation().getWorld().spawnEntity(block.getLocation(), EntityType.TEXT_DISPLAY);
            
            ((TextDisplay) entity).setText(ChatColor.GOLD + "+ " + blockExperience + " XP");
            ((TextDisplay) entity).setSeeThrough(true);
            ((TextDisplay) entity).setAlignment(TextAlignment.CENTER);
            entity.teleport(block.getLocation().add(0.5, 1, 2));
river oracle
# young knoll BukkitObjectOutputStream
    private static void savePlayerInventory(Player player) {
        try (var fos = new FileOutputStream(filePath(player.getUniqueId()).toFile())) {
            try (var boobs = new BukkitObjectOutputStream(fos)) {
                boobs.writeObject(player.getInventory().getContents());
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }```
hehe boobs
undone axleBOT
zenith gate
#

can I use both Spigot and Paper API? ( Paper has a PlayerArmorChangeEvent event )

remote swallow
kind hatch
#

Not if you want to support spigot servers.

young knoll
#

Spigot api works on paper

#

Paper api no work on spigot

zenith gate
#

okay, So can i just add a depend for paper or do i have to create a paper project?

kind hatch
#

If you want to support spigot servers, depend on the spigot API. (As spigot plugins can run on paper no issue.)
If you want to only support paper servers, depend on the paper API.

primal ermine
#

Hey. Showing item from players hand info in chat with Chat component API. Is there any way to do this without NMS? Is there any way to convert itemstack to json, that hover event would take as SHOW_ITEM? Hours of googling and still no good solution :/

young knoll
#

Yes

#

Hold on

tender shard
zenith gate
#

I'll still have spigot support if I use that?

young knoll
#

#general message

primal ermine
#

Yeah, i know that. Problem is that I can't find a way to use item from players hand as a hover. Every answer i've found uses CraftItemStack.asNMSCopy(stack).

#

Yeah. All my tries for now either showed minecraft:air or items without enchants/lore etc

#

Gonna try that tomorrow. Thanks 🙂

river oracle
#

Hello, Spigotmc today I ask you all mods and very simple question?

How async my file IO actions I give eaxemple below

        try (var fos = new FileOutputStream(filePath(player.getUniqueId()).toFile())) {
            try (var boobs = new BukkitObjectOutputStream(fos)) {
                boobs.writeObject(player.getInventory().getContents());
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
``` I want write this to file! H owever, how do I do this ASYNC? I run this while many players on and load and save these every so often hwo do I do async I don't want to lag main thread
remote swallow
#

fos boobs

kind hatch
#

BukkitScheduler
ExecutorService
ForkJoinPool

Any of those should do it.

river oracle
#

I can do the streams async?

#

I thought you couldn't do any IO streams asynchronously

#

in that case :}
CompleteableFutre#supplyAsync can do everything

hazy parrot
#

You sure can

cedar pine
river oracle
#

nope

zenith gate
#
int current = playerData.get(new NamespacedKey(ToastsRPG.getPlugin(), "manaPerSec"), PersistentDataType.INTEGER);
                                               ^^^^^^^^^^^^^^^^^^^^^

When creating a name spaced key. is it unique to that plugin? You have to pass your plugin, and the actual key. If i want to access that datatype from another plugin, do I have to use the instance of the plugin that created it or does it not matter?

I'm asking because im getting an error that says "manaPerSec" doesn't exist. but it does, cause my mana goes up by 1 ever sec.

remote swallow
young knoll
#

You don’t technically need your plugin instance to make it

#

There’s fromString now

zenith gate
zenith gate
young knoll
#

Mhm

zenith gate
#

Ima use that lol

young knoll
#

Why you skullin me boi @river oracle

remote swallow
#

get double skulled

young knoll
#

Fuckin nitro users and their cringe super reactions

zenith gate
#

Lmao

remote swallow
#

ur cringe

river oracle
#

I use them all right away cuz its funny

#

to super react the stupidest shit

#
    @Override
    public CompletableFuture<? extends ItemStack[]> asyncLoad(UUID key, Executor executor) throws Exception {
        if (Files.isRegularFile(PlayerInventoryCache.filePath(key))) {
            return PlayerInventoryCache.retrievePlayerInventory(Bukkit.getPlayer(key));
        }
        
        return CompletableFuture.completedFuture(Bukkit.getPlayer(key).getInventory().getContents());
    }

guys how can I improve this code

hazy parrot
#

Why ? Extends itemstack

young knoll
river oracle
#

though it'll just always be ItemStack[] so I can just remove that

remote swallow
#

dafrick is caffiene

#

in that context

hazy parrot
river oracle
#

its THEE cache library

remote swallow
#

can i have a link

onyx fjord
#

Mine is better

#

Just saying

river oracle
#

shut

river oracle
remote swallow
#

gimme an example

onyx fjord
#

Mine is as performant as normal hashmap

river oracle
#

make sure you don't miss any features

onyx fjord
#

I don't want bloat

river oracle
remote swallow
onyx fjord
#

Doubt you can beat a hashmap

river oracle
onyx fjord
#

Caching library should let you cache stuff

#

That's it

river oracle
#

💀 that's what this does

onyx fjord
#

How big is caffeine in lines of code

remote swallow
#

smh

onyx fjord
#

I know guava is bloat

young knoll
#

Why does that matter

#

Guava is in spigot already

river oracle
#

kacper hates all things convience

#

it seems

onyx fjord
#

No i just like simplicity

zenith gate
#

plus what are extra features going to do to your performance? i doubt itll affect it drasticly.

river oracle
split lichen
#

Can anyone help me out with modifying chat tab completions? I'm trying to prompt fake player names when using tab, both in commands and in chat for a minigame I'm developing. It works fine when executing a command, but if I were to just press tab in chat to display all online players, including the fake ones, I get a random selection of numbers and letters. When utilizing tab in commands it works fine. Anyone got any idea what the issue is?

split lichen
#

I don't have the option to call it, as if it doesn't exist

river oracle
#

what version

kind hatch
split lichen
remote swallow
#

who solte it off paper

young knoll
remote swallow
#

smh choco

#

wait

#

im not meant to use this?

young knoll
#

Why do you use it

remote swallow
#

to update an item i modify inthere inv

young knoll
#

Why would you need to do that

remote swallow
#

without making it disappear and appear

young knoll
#

What

worldly ingot
#

Yeah you definitely don't need to call that like ever

#

It's a last resort method

young knoll
#

Getting an item from a players inv should give you a mirror

river oracle
#

you only really need to call it if you do shit with packets or some crazy other shit

young knoll
#

Which will automatically reflect changes

worldly ingot
#

My favourite part about mirrors aPES3_PrayHalo

young knoll
#

Epic = 🥄

remote swallow
#

isnt the best part you can see ur uskies

split lichen
#

can I just ask, is there a way to remove those letters and numbers as well? because I'm getting the custom tab completions properly, but alongside those sequences of numbers and letters

#

it seems to be done automatically

#

this is what I mean

remote swallow
#

try using set instead

split lichen
#

as in Set<String>, in contrast to a collection?

remote swallow
#

setCustomChatCompletions

split lichen
#

still the same issue unfortunately

#

the problem is I don't understand what those number represent, or are supposed to represent

#

if the correct player name is being added as well

echo basalt
#

The player is always online

#

There's no point in spinning up another thread to call a getter

worldly ingot
split lichen
#

do you know any way to remove them from the chat completions?

worldly ingot
#

I don't think you can. At least not as far as I'm aware

split lichen
#

Would the result be the same if I modified the tablist to display fake player instances through packet manipulation? I would mitigate having to utilize npcs that way

#

if the NPCs are the issue here

quaint mantle
#

bro via version translates text display's so weird like \n doesn't make new lines for users on versions with text display's

young knoll
#

What

quaint mantle
#

Why don’t you report the issue in ViaVersion discord server?

#

ion know what their cord is

young knoll
#

\n doesn’t make new lines on versions with text displays?

young knoll
#

So you meant without

quaint mantle
#

.

#

Im saying when playe4rs on 1.18 join via version translates them to holograms but the \n don't make no new lines

young knoll
#

Ah

#

Yeah that’s pretty expected

#

Other entities don’t support \n in their names

#

Via version would have to spawn an armor stand per line I guess

quaint mantle
#

Text display's do so I would figure via version would translate them using multiple entities

#

I would hope

young knoll
#

Backwards compatibly isn’t really meant to be a thing

#

The fact that it works at all is a miracle sometimes

quaint mantle
#

thats what via version adds does it not

#

1.20.1 -> 1.19

#

ect

kind hatch
#

ViaVersion is forwards compatible.

#

You're thinking of ViaBackwards

young knoll
#

Well yeah

quaint mantle
#

Ah shit

young knoll
#

Either way it’s a massive hack

quaint mantle
#

True. I really cannot think about a way to translate blockdisplay and item display in <1.19.4

young knoll
#

And display entities are basically impossible to translate properly

quaint mantle
#

well when I cut off versions less player's play

quaint mantle
young knoll
#

But they can’t be scaled or rotated certain ways

#

Or interpolated at all

river oracle
# echo basalt There's no point in spinning up another thread to call a getter

It could be calling from a file I have the inventory serialized to a file for redundancy
I highly doubt reading files from main thread while the server is running is a good idea.

Generally I feel like doing FileIO, and Database calls Sync is not a great idea.
This method just ensures none of that occurs.

Personally don't see the issue with this method.
If The player's inventory has a cached file load that.
Otherwise just grab their current inventory (not asynchronously) using CompleteableFuture#completedFuture

Why is this sytem necessary? I'm clearing player's inventories for a minigame in the same world. You don't want inventories being lost on crashes etc. Which is the reason why something like this would be necessary. Yes the inventory is stored in memory, but a backup is necessary given all hell breaks loose and a crash occurs. Players losing items really isn't ideal especially on an SMP like server. I'd be happy to take advise on a better implementation of such a system with the same redundancies i'm including

I mean i myself just thuoght of a slightly better model to implement my idea, but still holds that I'm storing player inventory and need some form of redundancy to ensure data isn't loss on server crash etc. Still open to recommendations though

zenith gate
#

I need some help with thinking. I am trying to determine when a player is wearing a full 4 piece set of my armor. When they are wearing all pieces they get a special unique buff geared towards that armor. Now, I have already checked and got working, How to get their armor contents and to know when they are wearing a full 4 piece set. The 1 thing I need to figure out how to is, to determine when they are wearing it and not.
When the ArmorEquipEvent goes of, it checks armor contents and armorSetValue = 0; hasHelm? -> armorSetValue++; ... etc when armor piece on add +1 to counter. if counter = 4 give set bonus. The thing is, a player can spam the take off and put on and double their bonuses. to infinite levels. What kind of approach should I be taking here?

eternal oxide
#

Spigot has no ArmorEquipEvent. You are using a fork

zenith gate
#

Yeah

#

Jeff

#

thats him

#

all i do is work on things. i have nothing to do lol. so i have a lot of questions and errors. 😆

quaint tapir
#

do bukkitrunnables cause server lag

ivory sleet
#

A lot

#

If used incorrectly

#

Like everything else

quaint tapir
#

how do I use it incorrectly

ivory sleet
#

Else no issues

young knoll
#

Schedule 5000 of them per tick

zenith gate
quaint tapir
#

is it that bad xd

ivory sleet
#

I mean use BukkitRunnable if you have to

young knoll
#

Have a repeating runnable that runs every tick and loops over every block in every loaded chunk

ivory sleet
#

Its a tool in ur arsenal

#

Not to be abused, but to be used appropriately

quaint tapir
#

how many is considered too many

ivory sleet
#

Depends

#

Im quite sure you won’t run into that issue tho

#

Where you have too many that is

zenith gate
#

I just hate how it looks.

#

indents are terrible

ivory sleet
#

That’s easy to fix

quaint tapir
#

idc about indents lol
just want to know if it will cause lag

zenith gate
#

I minimize them yeah..

quaint tapir
#

so what would be the best alternative to runTaskTimer?

ivory sleet
#

?scheduling goes over it briefly, I didn’t wanna dig in too deeply about the differences but yeah

undone axleBOT
ivory sleet
#

Might have to write that in sooner or later tho

young knoll
#

If ur really worried about performance grab spark and do some profiling

#

I guarantee anything you are doing with schedulers tho is probably a fraction of what the server itself is doing every tick

ivory sleet
#

^

#

The main issue with creating too many bukkit runnables, or using bukkit scheduler to allocate new tasks is that the id task incrementer eventually will run out of ids and go negative probably lol

young knoll
#

True, I forgot there is a counter

ivory sleet
#

Should’ve been a long >:(

young knoll
#

I never use task ids

ivory sleet
#

Same tbh, BukkitTask just too good

young knoll
ivory sleet
#

Dk if it could

#

Cuz I mean, int auto promotes to long but not the other way around necessarily

young knoll
#

Ah right the return type

ivory sleet
#

Yea right, sadge :(

#

Probably wanna look at the command api, then yeah as pvbble said iterate thru and add them to a team

quaint tapir
#

say I wanted to launch a player then detect if they collide with another player in th next 5 seconds
how would I do this without using runTaskTimer

ivory sleet
#

Just compare time stamps based on some epoch (Java has an Instant and Duration class made for ur convenience here)

young knoll
#

Isn’t there an event for that

#

Hmm maybe not

quaint tapir
#

wdym by duration class

ivory sleet
#

Its a class that just represents a duration quite verbatim

#

And Instant represents a time stamp respectively

young knoll
#

Yeah if there isn’t an event for collision all you can really do is every tick check if their bounding box intersects another players bounding box

#

Via a scheduler

#

I guess you could also use the move event for the same purpose

quaint tapir
#

can you dumb it down so a 50 IQ person can understand

ivory sleet
#

Yea, I was gonna say reflection proxy and nms but don’t listen to me

quaint tapir
#

the duration thing

ivory sleet
#

Do you know what the english word duration means?

quaint tapir
#

well I'll look into it
thanks

#

yeah

#

not what a quite verbatim is tho

ivory sleet
#

There is a class in java, provided by java just like HashMap, List and String

#

Oh i just meant quite literally

quaint tapir
#

ah

ivory sleet
#

It represents a duration, yeah that’s it

#

Duration duration = Duration.ofMinutes(5);

#

This would represent 5 minutes

quaint tapir
#

I it think I understand

ivory sleet
#

Now have you heard of the method System.currentTimeMillis() ?

ivory sleet
#

Poggers

#

So basically there’s a better variant

high pewter
#

I know this is quite late, but turns out this doesn't work for all entities. There is a Material.SNOW_GOLEM_SPAWN_EGG but not an EntityType.SNOW_GOLEM because it's called EntityType.SNOWMAN. I'm guessing there's probs other exceptions I haven't encountered yet. Any other ideas?

ivory sleet
#

Instant instant = Instant.now();

#

This is like that currentTimeMillis method

#

But it returns an instant instead

#

(Consider it to be a time stamp representation)

#

Now with these two, you can easily manage timestamps and durations, that is compare them, create them and so on

tidal anchor
#

is there a way i can set a tag to a item?

ivory sleet
#

Nbt tag?

young knoll
#

What will we do after 2038

ivory sleet
#

Random or not?

tidal anchor
ivory sleet
#

Yikes bud

#

Metadata is kinda trolling if u use that nowadays

tidal anchor
#

how do i use it

ivory sleet
#

There’s this magical api called persistent data container instead

tidal anchor
#

nope

ivory sleet
#

Wdym nope?

tidal anchor
#

no api\

ivory sleet
#

Yes api/

tidal anchor
#

no api\

ivory sleet
#

?pdc

wet breach
ivory sleet
#

Ah, myes maybe yeah

wet breach
#

But that is why java is more superior

ivory sleet
#

Indeed

tidal anchor
#

no i'm trying to set the metadata tag in JAVA

wet breach
#

There is itemmeta

#

In the api

#

I mean for some people skript has a use. It was designed for people like server owners who were not devs

#

It was never designed as a replacement for plugins

zenith gate
#
@EventHandler
    public void onArmorEquip(ArmorEquipEvent event) {
        Player player = event.getPlayer();
        PersistentDataContainer playerData = player.getPersistentDataContainer();
        int currentMana = playerData.get(new NamespacedKey(Mana.getPlugin(), "maxMana"), PersistentDataType.INTEGER);

        Inventory playerInv = player.getInventory();
        ItemStack[] armorContents = playerInv.getContents();

        PersistentDataContainer helmetData = armorContents[39].getItemMeta().getPersistentDataContainer();
        PersistentDataContainer chestplateData = armorContents[38].getItemMeta().getPersistentDataContainer();
        PersistentDataContainer leggingsData = armorContents[37].getItemMeta().getPersistentDataContainer();
        PersistentDataContainer bootsData = armorContents[36].getItemMeta().getPersistentDataContainer();

    }

How can i determine when to give the player a set bonus without it stacking. i have been playing around and i don't know what to do. I am using Jeffs Fork for the event.

cloud tusk
#
package org.o555.bonemealer;

import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;

public final class Apply implements Listener {

    private final Bonemealer plugin;

    public Apply(Bonemealer plugin) {
        this.plugin = plugin;
    }
    @EventHandler
    public void onPlayerInteract(PlayerInteractEvent event) {
        if (event.getAction() != Action.RIGHT_CLICK_BLOCK) {
            return;
        }

        ItemStack item = event.getItem();
        if (item == null || item.getType() != Material.BONE) {
            return;
        }

        ItemMeta itemMeta = item.getItemMeta();
        if (itemMeta == null || !itemMeta.hasDisplayName() || !itemMeta.getDisplayName().equals("Magical Bonemeal")) {
            return;
        }

        Block clickedBlock = event.getClickedBlock();
        if (clickedBlock == null) {
            return;
        }

        boolean bonemealed = applyBoneMeal(clickedBlock, event.getBlockFace());
    }

    private boolean applyBoneMeal(Block block, BlockFace face) {
        Material blockType = block.getType();
        if (blockType == Material.OAK_SAPLING ||
                blockType == Material.BIRCH_SAPLING ||
                blockType == Material.SPRUCE_SAPLING ||
                blockType == Material.JUNGLE_SAPLING ||
                blockType == Material.ACACIA_SAPLING ||
                blockType == Material.DARK_OAK_SAPLING ||
                blockType == Material.WHEAT ||
                blockType == Material.CARROTS ||
                blockType == Material.POTATOES ||
                blockType == Material.BEETROOTS ||
                blockType == Material.MELON_STEM ||```
#

                blockType == Material.PUMPKIN_STEM) {

            // Simulate bone meal application
            boolean success = block.applyBoneMeal(face);
            return success;
        }

        return false;
    }


}
#

sorry if its too long

#

but i have this class which applies bonemeal to the rightclicked block

#

is there a way i can make this work inside a dispenser

young knoll
#

There’s an event

#

DispenseItemEvent I think

cloud tusk
#

so i get the block infront of the dispenser and apply the same stuff to bonemeal it?

young knoll
#

BlockDispenseEvent

#

I was close

river oracle
#

is there anyway to send a fake block with the API

young knoll
#

Sure

#

Player.sendBlockChange

river oracle
#

does the packet fail when its interacted with?

young knoll
#

Yes

#

You’d need to resend it

echo basalt
#

well

#

The server sends a block change packet to correct for ghost blocks

#

what I've done in the past is just.. cancel that second packet

#

and then things work

river oracle
#

do I need NMS if I do I'll just find another way I really don't feel like keeping up NMS for a commission

echo basalt
#

sendBlockChange is a bit too icky for me to use in its current state if all it allows for is fake-ish blocks that disappear when you click

echo basalt
#

But it used protocollib

#

And it was a bit braindead

#

And we had our custom blockstate system

river oracle
#

meh not worth it I'll just make the server owner put wool around the zone if he wants it :P

echo basalt
#

I should probably clean it up and post a gist or something

young knoll
#

The real sigma move is to inject new blocks into the game

echo basalt
#

Because there was quite a bunch of work

river oracle
#

FakeBlock's sound fun

#

god I need to escape this commission

echo basalt
#

I made FakeBlockWrapper as uhh

river oracle
#

I just need to finish this dumb minigame

echo basalt
river oracle
#

I should've asked for more than $250 😭

echo basalt
#

What you doin? minigame?

#

I should really finish my minigame utils honestly

river oracle
#

some simple thing, I just get distracted

river oracle
young knoll
#

Isn’t this why we don’t want to make things tightly coupled

#

:p

echo basalt
#

it's so much yet so little

river oracle
echo basalt
#

adapter

river oracle
#

go adapt something already

echo basalt
#

I'm about to adapt my sexual preferences towards your mom

river oracle
echo basalt
#

sun tzu been real quiet since I dropped that one

cloud tusk
#

one more question, i found some code online and it has getFacing() in it but for me it shows red in intellij, how do i fix it? BlockFace dispenserFacing = dispenser.getFacing();

cloud tusk
ancient plank
#

do you have the correct class imported
org.bukkit.block.data.type.Dispenser (correct) vs org.bukkit.block.Dispenser (wrong)

zenith gate
#

do basic items have a PDC key by default?

young knoll
#

Items have no pdc by default

zenith gate
#

okay so i can return if its null.

cloud tusk
exotic garnet
#

ChatColor is showing deprecated on 1.20.1 Spigot-API, is there an alternative we're supposed to use?

Edit: Paper deprecated ChatColor, nevermind...

worldly ingot
#

It's not deprecated in Spigot

#

Yep

#

beat me to it lol

exotic garnet
#

Lol

cloud tusk
#

my code is perfectly fine in the ide but it doesnt do what its supposed to do, it doesnt apply the bonemeal rather just spits the item out

exotic garnet
#

We need some more context or just send your code.

#

So ultimately we know it's not cancelling the event since its just dispensing the item

#

Which means your appleBoneMeal method is returning false for some reason

#

Do some debugging by logging your values into the console to see if you're getting the values you're looking for

cloud tusk
#

ok thanks

exotic garnet
#

I also suggest you perhaps add those materials into a list and asking if your block type is contained within that list instead of having a huge if statement

young knoll
#

Use a set for extra speeds

exotic garnet
#

True

#

Was literally thinking of correcting myself lol

echo basalt
#

config

torn shuttle
#

ah of course

#

yesterday I left off and had an issue where things were offset too high

#

today I boot and they are too low

#

I see the code gremlins have been chewing away at my code

orchid trout
#

why login event kick dont work

kind hatch
#

Cause the Login event is fired before the Join event. If you want to prevent them from joining using the Login event, use PlayerLoginEvent#disallow()

#

The player can't be kicked during Login since they haven't even joined the server yet.

orchid trout
#

im pretty sure i tried disallow

#

i dont even remember

orchid trout
#

i dont understand

#

ohh

#

async

#

nvm

crude charm
#

In a project I'm planning there are going to be alot of "select" menus? How should I go about storing and interpreting the players choice? Is there an api to make stuff like this easy? e.g selecting a chat colour or prefix or a "theme" for their plot. Should this be saved on internal memory or on a db?

kind hatch
#

Depending on your input, you could do GUIs if the player doesn't have to type anything out. Interpreting is up to you, but you should store that information in a database. Then load the information when the player joins and unload the information when they leave.

crude charm
echo basalt
#

Depends on your menu system

#

For example at work we have a "PaginationLayer" that lets you add elements easily

#

We also have layers for selection (SingleSelectionLayer)

crude charm
echo basalt
#

I just use my own so

#

closest one to it is probably IF or triumph

crimson scarab
#

how can i "hit" a non entity programmatically for example causing an end crystal to explode, a boat to shake, a itemframe to break

crude charm
kind hatch
#

InventoryFramework

crude charm
#

ah

#

thanks, I'll look into both and see if they fit my needs

quaint mantle
#

I've been trying to use NMS with my paper plugin and I got the dependency added to my project, but im not able to use the classes or anything with spigot

buoyant viper
#

Paper? expandssia

#

?whereami

opal carbon
opal carbon
#

paper doesnt have their own nms dependency system or anything

buoyant viper
#

depends on if theyre using paperweight-userdev or md5 specialsource i think

opal carbon
#

never heard of paperweight userdev ngl

buoyant viper
opal carbon
#

still gonna be the spigot dependency though

#

seems like thats just a plugin

#

correct me if im wrong though

sturdy reef
#

guys i want to make interactive boards and i want a starting clue to help me start the project

fervent robin
#

Does PlayerItemDamageEvent not work on swords?

vast ledge
#

should

fervent robin
#

Its not for me

sterile breach
#

Hi, question about playerCommandsendevent
because if I understand correctly it works as it is

when the list will be sent
on the edit
on the evening

So the default roster before being modified will not be sent to the player just the modified roster?

so the player never receives the first list?

placid moss
#

item#getItemMeta#getDisplayName

#

to get item use getCurrentItem off the inventoryclickevent

somber scarab
#

does anyone know what a timing command is?

#

I keep getting those errors that Im using timing commands and it's depricated

#

but i, not sure where im using it.. i dont even know what it is

buoyant viper
#

sounds like u might be using Paper, as i dont believe Spigot mentions timings command being deprecated

#

Paper on the other hand heavily recommends the Spark profiler iirc

timid hedge
#

What have i exactly messed up here?

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {

        if (sender instanceof Player) {
            Player player = (Player) sender;
            if (isPlayerInGroup(player, "testGroup1") || isPlayerInGroup(player, "testGroup2") || isPlayerInGroup(player, "testGroup3") || isPlayerInGroup(player, "testGroup4")) {
                if (player.getWorld().getName().equalsIgnoreCase("C")) {
                    new VagtshopC().open(player);
                } else {
                    if (player.getWorld().getName().equalsIgnoreCase("B")) {
                        new VagtshopB().open(player);
                    } else {
                        if (player.getWorld().getName().equalsIgnoreCase("A")) {
                            new VagtshopA().open(player);
            }else{
                sender.sendMessage("You dont have permission for this.");
                        } else {
                            sender.sendMessage("You cant do this in your world.");
                            }
        } else {
            if (sender instanceof ConsoleCommandSender) {
                sender.sendMessage("You need to be a player to do this");
                }
            }
                    return true;
                }
            }
        }
    }
}

At

                        } else {
                            sender.sendMessage("You cant do this in your world.");
                            }
        } else {
            if (sender instanceof ConsoleCommandSender) {
                sender.sendMessage("You need to be a player to do this");
                }
            }

It says: 'else' without 'if'

drowsy helm
#

also try and avoid all those nested if statements, you can just use a switch

timid hedge
drowsy helm
#

else if statements also exist

#

which one is it the first else or the instance of bit giving you the error?

quaint mantle
#

You can just do

if (!(sender instanceof Player)) return false;
drowsy helm
#

looks like your brackets are wrong

#

try and fix your indentation

timid hedge
drowsy helm
#

its more than just that

quaint mantle
# timid hedge So i just need to replace that with `if (sender instanceof ConsoleCommandSender)...
if (sender instanceof Player) {
            Player player = (Player) sender;
            if (isPlayerInGroup(player, "testGroup1") || isPlayerInGroup(player, "testGroup2") || isPlayerInGroup(player, "testGroup3") || isPlayerInGroup(player, "testGroup4")) {
                if (player.getWorld().getName().equalsIgnoreCase("C")) {
                    new VagtshopC().open(player);
                } else {
                    if (player.getWorld().getName().equalsIgnoreCase("B")) {
                        new VagtshopB().open(player);
                    } else {
                        if (player.getWorld().getName().equalsIgnoreCase("A")) {
                            new VagtshopA().open(player);
                        } else {
                            sender.sendMessage("You dont have permission for this.");
                        } else{
                            sender.sendMessage("You cant do this in your world.");
                        }

                    }
                }
            }else {
                        if (sender instanceof ConsoleCommandSender) {
                            sender.sendMessage("You need to be a player to do this");
                        }
                    }
                    return true;
                }
            }
timid hedge
#

Thanks
But im getting 1 error still
'else' without 'if'
} else{ sender.sendMessage("You cant do this in your world."); }

drowsy helm
#

like i said your indentaion is off

timid hedge
#

What do you mean with that?

drowsy helm
#

your brackets are everywhere

#

you have one too many aswell

#

and use else if statements instead of else { if{}}

timid hedge
#

But i cant just use else if here

                        } else{
                            sender.sendMessage("§8[ §3§lEXON §f§lMC §8] §7Du kan ikke gøre dette i dit world.");
                        }
drowsy helm
#

in your world check you are doing

else{
  if (){
  } else{
    if (){

  }```
#

you can just do

if(){

} else if(){

} else if() {

}```
#

its much cleaner

#

or just use a switch

quaint mantle
# timid hedge But i cant just use `else if` here ``` } else{ ...
if (!(sender instanceof Player)) {
            sender.sendMessage("Only players execute.");
            return false;
        }
        if (!(isPlayerInGroup(player, "testGroup1") || isPlayerInGroup(player, "testGroup2") || isPlayerInGroup(player, "testGroup3") || isPlayerInGroup(player, "testGroup4"))) {
            sender.sendMessage("No perm");
            return false;
        }

        Player player = (Player) sender;

        switch (player.getWorld().getName()) {

            case "A" -> {}
            case "B" -> {}
            case "C" -> {}

            default -> {
                player.sendMessage("cannot do it on your world!");
            }
        }

        return true;
drowsy helm
#

stop spoonfeeding

quaint mantle
#

Im trying to help

drowsy helm
#

they wont learn if they just copy paste your code

quaint mantle
#

working on my prototype server idea in General 1. If there is anyone with some spare time, could you help me with some technical parts. @here

quaint mantle
#

sorry if this isnt the right channel, but it isnt jsut one question

drowsy helm
#

i doubt anyone will hop on vc so its probs easiest to ask here

quaint mantle
#

i am asking for someone to help me with the problems I am currently working on

#

to be honest, i want someone to hear my idea and jump on my team.

drowsy helm
#

yeah not the place to ask

quaint mantle
#

general chat?

drowsy helm
#

no where on spigot

#

?services

undone axleBOT
drowsy helm
#

this discord isnt for recruitment

quaint mantle
#

thank you for the link

livid dove
#

This is the bit where you call it a day and click it

#

Put the shovel down son

chrome beacon
livid dove
#

Just let him put the shovel down with dignity olivo lol

quaint mantle
#

what i really need is someone that has technical abilities and is able to grasp the concept i have for a server that could change how servers are created entirely

livid dove
chrome beacon
#

If you don't have enough patience to wait for an answer then you'll be a real bad person to work with

#

Big red flags my man

quaint mantle
#

that is why i am in vc,

livid dove
#

Stop typing...

#

Go to the link

#

Have a nice day and good luck

quaint mantle
flint coyote
livid dove
#

They need a chance to play the right cards lol

#

But they are still typing....

quaint mantle
#

I have a server idea that nobody has ever seen before

chrome beacon
#

X

livid dove
#

The talk about it in a forum post

quaint mantle
#

i aam looking everywhere for those who can see it the way i do

shadow night
#

sounds intriguing but definitely not something I'm interested in

flint coyote
#

well so do I and I'm already working on it for 3.5 months. It is however not a server concept but a plugin (and yes, it will be public) - still a lot to do though

#

It is working already but needs some more polish :)

drowsy helm
livid dove
shadow night
quaint mantle
#

the thing is, this idea to to valuabale to share

flint coyote
#

well it's a whole engine - even if I knew exactly what I had to type (codewise) I would not be done in 4 days since it's just too much code

#

when it's too valuable to share then why do you wanna share it? lol

chrome beacon
shadow night
#

ok @quaint mantle

quaint mantle
#

I am trying to look for people with the skills i need and the ability to understand the opportunity that i offer

#

thank you all

#

i will make my forum post in the appropriate location

livid dove
# quaint mantle the thing is, this idea to to valuabale to share

Dude I'll take the hit from the mods.

Shut the hell up my man. Your unique one of a kind super 3000 mega idea is not gonna Steve jobs you to spigot royalty.

Be open, honest excited about the concept and just do it.

And stop using this supercalifrajulisticexpialibullshit to try and sell the idea.

Its painful and makes folk less likely to listen

#

Make a forum post

#

Do it properly

quaint mantle
#

dude, this idea could be worth a big chunk of cash for those who assist me

#

i will!

livid dove
#

Dude shut up

#

This isn't the place

flint coyote
#

is it worth to join the VC or will I be bored when doing so?

shadow night
#

he is going to repeat what he is talking about

#

lol

flint coyote
#

to be fair, he got a decent story teller/youtuber voice

timid hedge
timid hedge
#

Okay thanks

livid dove
flint coyote
#

I'm just listening while working. Got a meeting in 7 mins anyway

livid dove
#

Charismatic entrepreneurs are cursed runes.

The dude came in, barged I to chats was told to stop but still got a decent sized discord call.

Dude is bad news 😂

flint coyote
#

I have way too much to do to join any server anyway

#

the funny thing is that he talks about a server that I imagined creating one day - well kind of

flint coyote
#

Not in the near future - maybe once I win the lottery

#

All I know is that the engine I'm working on would be pretty much the core of that concept

livid dove
#

He wants free labour as he can't be arsed to learn him self.

Do ?java, chuck him at it with a catapult and forget about him

flint coyote
#

I'll just go on with my day in 2 mins. Got a meeting.
Was nice to have some background noise

livid dove
#

That's how they trap ya

#

Cause moment ur I the call there's a shred of chance he reels u in

smoky anchor
#

guy tried to offer me $20 000 for this if I remember correctly
Don't fall for this

#

But now there is more stuff :D

livid dove
#

Lmao

flint coyote
#

it indeed was entertaining to listen to

smoky anchor
timid hedge
# quaint mantle Yup

Do you know why it isnt working with a but is with b and c?

       switch (player.getWorld().getName()) {

            case "A" -> {
                new VagtshopA().open(player);
            }

It says Enchanted 'switch' blocks are not supported at language level '8'

quaint mantle
flint coyote
#

You can't use the -> syntax for switch in java 8

livid dove
livid dove
#

Even so...

smoky anchor
#

understandable

livid dove
#

What happens if they install multiverse or something?

#

What if the end user wants shops in other worlds

flint coyote
#

🤷‍♂️

livid dove
#

Seems like the perfect spot for a hashset

#

Or perhaps a map of they need different info for each world

#

New spigot movement #DitchTheSwitch

#

I'm at work making actual monry

#

I need my IQ points lol

smoky anchor
livid dove
#

Lol no waiting for something to load

#

Ask the guy how many lines of code have been written for plugin needed for his idea

#

Demand an objective number

smoky anchor
livid dove
#

On my behalf , Ask him I want a number as a potential investor

smoky anchor
flint coyote
#

Raziel the rich investor

smoky anchor
#

guy claimed to know some C, I doubt it

livid dove
#

Ah C... so useless for minecraft

#

Brilliant

#

Now someone ask him

smoky anchor
livid dove
#

Get him to show you his portfolio 😂

#

I'm serious someone ask him

smoky anchor
#

I just did

#

oh right, you're not in the VC

livid dove
#

Someone tell him he is a 2nd rate duelist with a 3rd rate deck

#

Also someone explain his full idea here

#

Like

#

In full

#

Or in general and ping me

#

No the whole thing berbatim

#

Verbatim

smoky anchor
#

Just bunch of random shit put together

livid dove
#

I need the full thing.

#

There is a reason