#help-archived

1 messages · Page 26 of 1

silk gate
#

why does no one in MC use postgres

meager lantern
#

It puts more overhead on the server for sure, but having the ability to scale to show your information on a website or share it between servers at any given time should outweigh the overhead. Especially because the overhead should be handled on a separate thread, which should cause minimal issues to the server itself

dusky herald
#

Even then, if you have a network large enough you can just dedicate an entire server by itself to run the MySQL Database

#

and just remove the overhead

keen moth
#

You can cache the information needed as well, to reduce any overhead

dusky herald
#

But, like @keen moth said as well, you should do whatever it takes to remove any overhead as possible

#

It just takes smart choices, that's all.

#

Plan out your development, and implement.

#

For most people, you dont even need MySQL

hot lodge
#

@wanton delta the globaltablist isnt depreciated

wanton delta
#

i meant in bungee config

dusky herald
#

I'm personally only using MySQL because I plan to link a lot of server-data together

hot lodge
#

oh yeah i am using a plugin that says it does the same thing

meager lantern
#

Well that was what I was getting at, even though you don't need a SQL server now doesn't mean you don't need it in the future. Using a SQL server for storage can be a good idea, even though it's not needed at the given time

dusky herald
#

Yeah, if you have plans or you think you may eventually need to access data from multiple servers then definitely invest the time into implementing it.

#

Or develop solutions to use MySQL and/or files

silk gate
#

To Be Honest your database will reply fast enough to not need a local cache

meager lantern
#

Yes and no

#

If you're running a connection on the main thread of a Minecraft server, then it's definitely not fast enough

silk gate
#

only exception would be if you need to sync stuff like cancel an event

dusky herald
#

In terms of efficiency, you should cache whatever is going to be fixed and not change over the duration of the runtime.

silk gate
#

but in that case you need to really load a load of data from the database when the player first joins

#

so it's available on demand

keen moth
#

Well the idea is to cache info that should be changed as well. Then update the database as necessary.

dusky herald
#

Most player data that gets loaded when they join is very insignificant.

#

You could load their data in as they join, and then update it as the plugin runs using Async methods.

meager lantern
#

There's an async login even you can use

dusky herald
#

Well, it should pretty much be Async the entire time

#

The only time you should vouch (in my opinion at least) for synchronized MySQL loading is when the server starts and caches the data

meager lantern
#

Yes, but for loading data on join, you'll be able to use the login event as it's being run on a different thread

#

Allowing you to ensure your user has their data loaded before joining the server

keen moth
#

Well you shouldn't cache ALL data, only necessary data 😛

meager lantern
#

Yup

dusky herald
#

Yeah, by no means should you cache player data, if they're offline.

meager lantern
#

It really depends on the situation

silk gate
#

that's where ur weak references come in

meager lantern
#

I mean, sure

dusky herald
#

I just mean player data by itself, load it as they join.

#

But it can of course get more in depth, if you need some data as you go

#

I can't think of a reason that I would personally need to cache offline player data.

boreal tiger
#

maybe a top players scoreboard? but that would be very little data

dusky herald
#

Yeah but even then, you would have cached the top players, not the actual player's data.

boreal tiger
#

yeah

dusky herald
#

and you wouldn't have even cached their data, you would have just ran a query to the server to get the Top 10 players with the score value + their names

#

and then cached top players for score board with their score+names, or whatever you see fit

frigid ember
#

Ping or dm if you can help
I’m trying to load schematic on my server but the schematic is so large that it crashes the server. Any solution? I’m not installing fawe because that plugin doesn’t even work.

meager lantern
#

Hey, I've worked on a little one day project. It's just a tool for one of my plugins to help people create in-game text based animations. I'd appreciate if someone of y'all would give me some feedback on the UI/UX, it all looks nice and makes sense to me, but I'd like to know what outsiders think, here's the link: https://tarkan.dev/tmgenerator

dusky herald
#

@meager lantern I think it looks good, it appears to function well and do what it says it does. I dont know if you plan to make this a public resource, or for what purpose. However, if you do, you could possibly include some JavaScript hover-over tip messages describing what the fields do.

#

But, mainly for people who may not necessarily know what they mean.

meager lantern
#

Ah yeah I could do that, thanks

dusky herald
#

The design is good, it looks very clean.

#

Navigation is very easy, it's very appealing to the eyes.

#

You could also instead turn the color code field as a Drop-Down List

#

Since they're going to all be fixed values anyways.

meager lantern
#

I mean TitleManager is already a public resource, but people seem to have issues creating more advanced animations for it as well as utilizing the inbuilt animations, so this is just a helping hand for those that are struggling

#

Ah yeah, I thought about that

#

But then some people might want a combination of colors and formatting

dusky herald
#

I was only saying that because I wasnt sure if you planned on adding combinations of colors.

meager lantern
#

Or heck, even text that scrolls by in the shine animation

dusky herald
#

I'm just giving feedback by what I see is all.

meager lantern
#

Yeah and that's exactly what I asked for

#

And thanks for that!

#

What about the color cycle page? Is it clear enough?

#

Seeing as it only says in small that you can re-order the colors by drag and dropping them

dusky herald
#

I saw that as well. I didnt really have any feedback for it because it seems to have a pretty intuitive layout already.

meager lantern
#

Perfect!

dusky herald
#

If there's anything you could change to it, it would be to add more color options.

#

But the drag+drop is pretty straight forward.

meager lantern
#

All of the colors are available in the "Choose colors" button

dusky herald
#

I just meant more like, available.

#

Like, if I wanted to remove colors from the cycle

#

or add more

#

Sorry that I wasnt really specifying that.

#

Actually, hold up

meager lantern
#

Oh so like multiples of the same color?

dusky herald
#

Nevermind you're good

meager lantern
#

Hahah

dusky herald
#

It does actually do that.

#

But, that is a good point.

#

Maybe adding functionality of multiples of the same color would be a good implementation.

meager lantern
#

Yeah, I could see that being useful

frigid ember
#

Hi there

#

for bungeecord, it doesnt let me connect to the hub

radiant pollen
#

@meager lantern When you try to add your own color codes to the Animation input it breaks.

frigid ember
#

however, if i connect thru direct connect it lets me thrun the hub

#

anyone knows why?

radiant pollen
meager lantern
#

o_o

dusky herald
#

:0

frigid ember
#

its making me mad tbh

dusky herald
#

Hey hey, good thing people have different ideas

#

😄

meager lantern
#

Yeah, that's exactly why I asked for help in here, because I've been developing this in a vacuum

keen moth
#

@frigid ember Are you getting any message?

dense rampart
#

oh hey 20 hours of waiting later. Why isn't my forced host working? It's configured properly in the config (I hope), but when I connect to my.server.com, it leads to the default server and not the one I forced hosted.

dusky herald
#

Actually, it does show

#

when you add your own color codes

meager lantern
#

Just not in Word type

frigid ember
#

io.netty.channel.connecttimeoutexception

dusky herald
#

I typed &c into the Animation input, and

#

The text will appear and dissapear

#

and it will show the color I provided

#

@ the c character

keen moth
#

Make sure you've configured the IP and port correctly

meager lantern
#

Oh wait, it actually seems to break for everything except the shine and color cycle page

dense rampart
#

It's weird, ServerListPlus picks up on the custom host and shows me my unique MOTD, but when I join just goes straight to default

dusky herald
#

yeah, i'm referring to the Shine page

#

It appears and disappears.

frigid ember
#

Hm

meager lantern
#

Yeah, but I think I'll keep that as is, as I don't see too much of a need to allow for color codes there

frigid ember
#

am i suppose to add an ip to query?

#
  • query_port: 23420
dusky herald
#

Well

#

Using custom color codes does still break the Shine page.

#

wait

#

not anymore

#

actually yes it does

#

Kind of

meager lantern
#

How?

dusky herald
#

I cant really explain it

#

Just go to Shine

meager lantern
#

Hahah, damn

dusky herald
#

and type &ctest

#

and you'll see what i'm talking about

meager lantern
#

I guess it's just that it shows the & and then the c as well

#

Right?

dusky herald
#

Temporarily

#

It appears to show it at the first cycle if I'm correct.

#

then it removes it.

meager lantern
#

Yeah, it's because it doesn't take color codes into consideration

#

The shine color code will at one point be inbetween the & and the c

#

Which is why it'll show &c at one point

dusky herald
#

Also, if you do something like, &ctest&9test&rtest

meager lantern
#

Again, there won't any need for color codes here, I should probably strip the text for color codes before generating it

dusky herald
#

It does change thecolors for those.

#

throughout the test texts

meager lantern
#

Yeah, I see

dusky herald
#

Except, the first one gets changed.

#

so &c is red, then it goes back to blue (which I set as default)

#

so it seems to replace the red with what I placed in the field, then the rest of the color codes that I added stay in place

#

Actually, I'm seeing a lot of weird things here now

meager lantern
#

I'll just strip the colors, that should fix all of the issues on the Shine page

dusky herald
#

My shine color is &9(blue) but the shine matches the color codes that I provided

#

yeah, that'll fix it

#

So it appears, you set the color in the field, then if I redefine it in the animation input, it will use that first color I set as the Shine

#

the shines primary color*

meager lantern
#

Huh?

#

You sure?

#

Ohhh, right well I know why that's happening

#

I just prepend the primary color to the front of the string

#

So if there's a color code in the way, then it'll be dominant as it's the last color code shown

dusky herald
#

yep, at least that's what I observed.

#

So if I changed it, it will reflect in the rest of the animation.

#

But either way, it wouldnt be an issue if you stripped the color tags.

#

and as the cycle continues, if I add another color tag, it will just change the "dominant" color as you put it

meager lantern
#

Exactly, I've just stripped the text on my local version of the code, I'm gonna fix the issues Zaxarner found as well and then it should be golden

frigid ember
#

Is 60$ a fair price for paying a developer to set up a core API for a new movecraft-like plugion?

#

I'm talking bare bascs

#

basics*

#

and i pay for other stuff alter

dusky herald
#

¯_(ツ)_/¯

#

It's only fair if they accepted the offer.

meager lantern
#

It really depends, I'd probably never buy something so crucial for that low and I'd certainly never take up a job for that amount of money

dusky herald
#

I'd personally never sell services, regardless of my skill because if I try to evaluate my skill level and try to place a dollar value onto it I will always overvalue myself.

meager lantern
#

That's a good thing

dusky herald
#

Needless to say, if a person is spending hours upon hours developing said API for you, is it worth it? It's probably not. Not if you compare it to how a lot of people tend to equate to a livable wage.

meager lantern
#

Exactly, it's just not worth it for someone if they spend much for than 3-4 hours to get that amount of money

#

And chances are if it's a 'Core' plugin whatever that's supposed to mean, then they'll probably have to spend quite a lot more

dusky herald
#

But, also since plugin development is volatile, and said person might not be very experienced (since most people who work with plugins generally are not very experienced), they could be using it as a learning experience to improve their skills.

#

So really, whatever they agree to, should be pretty viable. You would not get a professional at that price. So you likely do not have a professional developer. But, that does not mean they can't produce a quality product for you to use.

meager lantern
#

If the person developing the plugin is okay with receiving experience while lacking in payment, then it's fine. Though I do not think it's okay to exploit someone who's just starting out

dusky herald
#

I don't think it's okay to exploit people just starting out, but I also dont think they should be trying to asking for payment with inexperience either, so you have kind of a gray area.

#

So with that said, if they agree with it, then go with it.

#

If you think it's worth the dollar amount they place, and they are willing then so be it.

meager lantern
#

Yup, true

dusky herald
#

I just wouldn't pay until I got the service that I asked for.

#

Unless they asked for some kind of deposit price before they initially start, then you might pay before you start (a portion of the cost), but it would be up to you to require them to provide some kind of portfolio or list of projects they produced to verify their experience.

vagrant walrus
#

Is there a way to disable the 1.15 "click on bed to set spawn point"

dusky herald
#

Get a plugin to do it or use command blocks.

vagrant walrus
#

I am writing a plugin

subtle blade
#

Beat me to it :((

dusky herald
#

Event Listener | PlayerBedLeaveEvent | setSpawnLocation(false);

vagrant walrus
#

thanks

frigid ember
#

ok, apparently bufferedstream gives me errors.

meager lantern
#

There we go, it looks like I've fixed the issue caused by color codes now and I've stripped the colors from the Shine animation

dusky herald
#

seems to work better and not break now

frigid ember
#

why isnt InputStream and FileOutputStream not supported in java 8?

#
if (args[1].isEmpty()) {

is returning an ArrayIndexOutOfBoundsException when args[1] doesn't exist?

lusty vortex
#

@frigid ember You need to do a length check on the array

#

Make sure that it even contains that index

frigid ember
#

Well, I want to check whether args[1] is given...

#

So I guess args.length < 2 would work?

lusty vortex
#

No

#

That'd be "is the array LESS then two values in length"

wanton delta
#
  do something because there is no args[1]```
lusty vortex
#

You need to do (args.length > 1

#

Because index 1 would be the second position in the array

wanton delta
#

i would prefer < 2 so you dont have nested if statements

lusty vortex
#

That doesn't make sense

#

Oh, I read what u said

frigid ember
#

It functions the same. I just want to check whether argument 2 is set or not.

wanton delta
#
    return;```
lusty vortex
#

Yeah

wanton delta
#

ya :P

lusty vortex
#

@frigid ember If that [1] position doesn't exist, it will throw an exception.

#

Which is why we're telling you to check the length

dusky herald
#

1 will always exist if you use <2

lusty vortex
#

Exactly

kindred vector
#

Can i uh change my username i forgot why i set it to my irl name

#

o.o

dusky herald
#

But if you want 2 arguments then youd have to use <=2

#

And wym check the length? He already is

wanton delta
#

@kindred vector name changes are $10 on spigotmc

lusty vortex
#

No he isn't

#

He's doing "if (args[1].isEmpty()) {"

#

Without checking the length

#

You're reading the guy that is explaining it to him

dusky herald
#

Yep

kindred vector
#

oof

#

$10 just to hide my irl name

#

well its my own fault

#

small price to pay xD

dusky herald
#

What? Phoebe?

#

Who cares

nimble solar
#

^

kindred vector
#

you'd be suprised

wanton delta
#

meh i dont think ppl care here

frigid ember
#

I hate when people make their usernames their real name.

nimble solar
#

i got my IP leaked and nothing has happened to me

#

yet

dusky herald
#

Even if we wanted to we wouldnt find you with only a first name.

wanton delta
#

but by all means donate $10 if you are so inclined lol

frigid ember
#

Oh rude this discord changed my nickname

kindred vector
#

I had a creepy guy msg me from the forum on a social media :p

dusky herald
#

Block em

wanton delta
#

oh yea thats 😳

lusty vortex
#

Half the people here are creepy. Nothing new

wanton delta
#

report too

frigid ember
#

😟

wanton delta
#

when ur demographic is teens and young adults making minecraft servers lmao

dusky herald
#

You sure they didnt find you in another way?

kindred vector
#

Yes

dusky herald
#

The only other way I could think of is if you use social media with the same username.

kindred vector
#

they said they got my name from spigot when i asked who they were

#

bit creepy that's all

dusky herald
#

Eh, I'd just block.

#

It is what it is.

#

If you're really concerned, then you could change your name; maybe request a name change to the staff without charge for identity purposes.

wanton delta
#

doubtful

dusky herald
#

I know most people have to pay, but if its regarding your personal status IRL I think it would possibly be respected.

#

If you provide proof of harassment

wanton delta
#

mmm maybe it wouldnt hurt to try but 🤷

dusky herald
#

Not doubtful at all. Circumstances like that dont apply to most people.

#

I would personally respect it.

#

I just see more of a need to have people pay to name change because they are indecisive and it's a waste of time and effort. Personal/safety reasons are different.

lavish hornet
#

Guys does anyone know the Sound enum of the hit? (the one which sounds when a player hits another with e.g. the hand)

frigid ember
#

ok

#

@lavish hornet

lavish hornet
#

Thanks mate!!

#

Ghmm, just realized those enums don't exist on 1.8 :/ shm
edit: nvm the sound is HURT_FLESH

frigid ember
#

wait how am i supposed to use bufferedstream with bukkit?

#

legit google isnt any help

meager lantern
#

That's because your question doesn't make any sense

#

What are you trying to use a BufferedStream for?

frigid ember
#

writing the config.yml file

#

since InputStream only supports java 7 smh

meager lantern
#

I'm pretty sure InputStreams existed before Java 7 as well

vast fog
#

wait no dont take my advice

meager lantern
#

Is there a reason why you're trying to manually write to the config.yml instead of just letting it happen by itself?

frigid ember
#

wdym writing it itself?

meager lantern
#

Well currently you're trying to write a custom method to write contents to the config.yml file

#

There's already a save method

frigid ember
#

about that, im also adding a mysql.yml file so yeahhh. i really dunno

#

and saveResource doesnt function for me soo

meager lantern
#

It goes in-depth on both the default config.yml file and how to create your own config files

frigid ember
#

it only loads the config file not the mysql file.

meager lantern
#

There could be multiple reasons as to why that's happening, have you had a look at the link I sent?

river apex
#

can someone please help me setup votingplugin

buoyant path
#

How can I loop through the values from a primary key in a table on SQL

lusty vortex
#

ResultSet

tiny dagger
#

sellect * order by ''yourprimarykey'

buoyant path
#

yeah

#

i forgot a lot of stuff

#
    public List<Object> getSections(String primary) {
        List<Object> sections = new ArrayList<>();
        PreparedStatement pst;
        ResultSet rs;
        try {
            pst = this.getConnection().prepareStatement("SELECT * FROM PrisonsData WHERE " + primary + " = ?");
            rs = pst.executeQuery();
            while (rs.next()) {
                sections.add(rs.getString(1));
            }
        } catch (SQLException ex) {
            ex.getStackTrace();
        }
        return sections;
    }```
#

im trying to make it like config sections so my friend knows what hes doing

#

this should work correct?

tiny dagger
#

i guess

buoyant path
#

maybe i could change to list<string>

tiny dagger
#

i don't know what you want back

buoyant path
#

Its storing like faction names

#

and i want those so i can add them to my list of factions in the setup method

tiny dagger
#

so at primary i hope it's the sql column right?

buoyant path
#

yeah

#

Should work then?

tiny dagger
#

it should

#

wait no

#

not like this

#

no nvm

#

it's okay

buoyant path
#

So this doesnt work?

tiny dagger
#

i thought you missed result set

buoyant path
#

Oh

#

Ok thanks for the help, otherwise i was just gonna start my server up and pray lol

buoyant path
#

@tiny dagger if ur still around, is it worth saving serialized inventories in SQL database or should i just stick to files?

tiny dagger
#

it's gonna get ugly however sql would mean you can switch between sqlite/mysqlite easily

#

so yeah i recommend sql

buoyant path
#

I mean with my serialization an inventory can be up to like 26k characters

#

Idk if sql can handle that

#

plus each player that ever logs on the server will have something stored like that

#

may not ever reach 26k but it will be something

tiny dagger
#

sql can handle everything

#

the point is to do it async

#

however you're gonna need a sync return point

#

so depends on how hard you want it to get

buoyant path
#

@tiny dagger im doing everything in async, every 10 minutes

rocky knot
#

I need to remove a set of permission from player.

  Set<PermissionAttachmentInfo> efPerms = player.getEffectivePermissions();
        inner: for (String perm : perms) {
             for (PermissionAttachmentInfo efPerm : efPerms) {
                if (efPerm.getPermission().equalsIgnoreCase(perm)) {
                    player.removeAttachment(efPerm.getAttachment());
                    continue inner;
                }
            }
        }

is this correct way? feels overcomplicated

fleet crane
#

You could add a negative attachment?

tiny dagger
#

is it required on send metadata after spawning a client side entity on 1.14?

#

🤔

#

As it seems this is only required on 1.15

median wing
#

How would I target a player inorder to give them an itemStack?

#

Player target = Bukkit.getPlayerExact(args[1]) wouldn't work in that situation, right?

#

Any help is appreciated

tiny dagger
#

uuid?

dusky herald
#

target.getInventory().addItem(ItemStack);

#

But, to get the player, you would use: Bukkit.getPlayer(UUID);

median wing
#

I did that, but somehow it gives trhe sender the item and not the target

#

oh ok

dusky herald
#

Well then, you should send the full code you're sending.

#

and we can specify how you can reference to get the player you're asking for.

median wing
#

Okay sec

#

?

#

@dusky herald here's the code

                            Player target = Bukkit.getPlayer(args[1]);
                            if(target != null && args[0].equalsIgnoreCase("smelter")){
                               target.getInventory().addItem(smelter_pickaxe); ```
naive stratus
#

That's part of the code. Doesn't really show a whole lot :P

dusky herald
#

is smelter_pickaxe an ItemStack?

median wing
#

yep

dusky herald
#

does the code work?

median wing
#

everything works

#

except the targeting player part

dusky herald
#

what do you mean then

#

if everything works

median wing
#

everything works except the targeting player part

#

it does nothing

#

I even made a player.sendMessage("test");

#

to see if it even works when I try to give the target player the itemStack

dusky herald
#

send the full cod

#

code

naive stratus
#

Do you yet any errors in the add item call?

median wing
#

no

#

the code is big but ok

dusky herald
#

Send the entire class if you have to.

median wing
#

that's the full class

#

?

frigid ember
#

@zenith palm, @heady rampart is a troll.

velvet halo
#

You don't have to make those itemstack statics

#

Store them in a list or map if you need to access them again.

dusky herald
#

They dont even need to be static, nor a list or a map.

#

They could be Local.

velvet halo
#

Local as in a text file?

dusky herald
#

Local, as in; not any variable outside of the method.

naive stratus
#

I would create a method that creates them that you can just call from the command. Create it locally in a method and call that, is what the means.

velvet halo
#

Yeah true

naive stratus
#

It seems like that command needs to be run twice

#

Once to create the tool and once to give it

dusky herald
#

I am pretty confused looking at the command though, still looking at it though lol

velvet halo
#

Looks like he wants to give a player certain tools

naive stratus
#

Also just had a quick glance ok my phone :P No syntax highlighting haha

dusky herald
#
                            Player target = Bukkit.getPlayer(args[1]);
                            if (target != null && args[0].equalsIgnoreCase("smelter")) {
                                target.getInventory().addItem(smelter_pickaxe);


                        } else if (args[0].equalsIgnoreCase("explosive")) {```
#

Why not make the first instance an else if?

median wing
#
                            Player target = Bukkit.getPlayer(args[1]);
                            if (target != null && args[0].equalsIgnoreCase("smelter")) {
                                target.getInventory().addItem(smelter_pickaxe);```
#

this part?

dusky herald
#

Yes, the part that says ``` else {
Player target = Bukkit.getPlayer(args[1]);
if (target != null && args[0].equalsIgnoreCase("smelter")) {
target.getInventory().addItem(smelter_pickaxe);

                    } else if (args[0].equalsIgnoreCase("explosive")) {```
velvet halo
#
if(statement) {

} else if(anotherStatement) {

} else if(oneMoreStatement) {

}
dusky herald
#

If you use the if(statement), you should use it like this:

#

} else {
}
if(condition) {
} else {
}
...etc```
#

not like this

} else {
}
else if(condition) {
}
...etc```
#

Chances are, if you're using a command, you can just use return; when a command is supposed to be completed.

#

or return true; *

#

Rather than to keep cycling through ifs that dont need to be fulfilled.

median wing
#

Ah okay, makes sense, I'll fix my code and see if it works

zenith palm
#

?kick @heady rampart Trolling

worldly heathBOT
#

👢 Kicked 554677860523311105

dusky herald
#

and I dont see any viable reason that you would need to use else ifs

#

Not in the command you're using at least.

#

Just use if statements, and make sure they return true; whenever they reach the end of their checks.

median wing
#

Yah, I have a bad habit of using if statements

#

else if*

dusky herald
#

Just dont use them, unless you have a good reason to.

#

You can always just place a return true; statement inside of them, and that will end the entire method right there.

#

and it will stop running the rest of the code that follows.

median wing
#

It still gives me the item instead of the player

dusky herald
#

Which part

#

I read the command but I'm still not 100% sure what you're trying to do.

#

Like okay player, sends...

#

./command smelter

median wing
#

The plugin is simply an autosmelting pickaxe, a pickaxe that mines 3x3x1 , and one that does both.

dusky herald
#

What's the Player target = Bukkit.getPlayer(args[1]) supposed to do?

rich saffron
#

Hey sorry to interrupt y'alls conversation, but here https://www.spigotmc.org/threads/approved-obfuscators.420746/ it says Permission is not required to use the following obfuscators on any plugin with any settings. and ProGuard is in that list. so you can use any settings you want and any dictionary you want?

median wing
#

the command for example is /pickaxe smelter

#

give me the pickaxe

#

/pickaxe smelter <player> is supposed to give it to the specified player

tiny dagger
#

@rich saffron you can't use the long names

dusky herald
#

and only give the player name the pickaxe?

#

Alright, 1 sec

median wing
#

kk

rich saffron
#

can you elaborate a little more on that? like in the dictionary?

tiny dagger
#

like iiiIIIIIiiiiiiiIIIII

#

for every method name etc

rich saffron
#

what about random strings? 10 chars long?

tiny dagger
#

the point is to not be too long

#

but between a's and IIIiiiiIIIi

#

there is no difference

#

someone can just put proguard again and make them 1 char long

dusky herald
rich saffron
#

so would a dictionary full of stuff like Ig5Ka1qAgd be allowed?

#

or no?

dusky herald
#

Try something along the lines of that @median wing ?

tiny dagger
#

yeah it will as long as it's not too long @rich saffron

rich saffron
#

ok, sorry for all the questions lol, how long is to long :panic:

median wing
#

Alright one sec

dusky herald
#

@median wing and sorry, I wrote P2 in the arguments for Bukkit.getPlayer(P2), change that to args[1]

median wing
#

oh okay

fleet burrow
#

How can I check which operations can be run asynchronously?

dusky herald
#

It appears your command probably isnt working as intended because you are using an else { }

#

Instead of using { else { Player target ... etc }

#

just add another if statement in there after you created the ItemStack

#

like....

naive stratus
#

Thats what I mentioned before. Because of that statement, it would have to be fun twice. Once to set it in the global static var and once to give it to the player.

#

So remove the if statement, move the creation of the tool to a method and call that when giving it to the player.

dusky herald
#
player.getInventory().addItem(smelter_pickaxe);
player.sendMessage("message")
if(args.length >=1) {
Player target = Bukkit.getPlayer(args[1]);
target.getInventory().addItem(smelter_pickaxe);
}
pastel slate
#

[CIRCULAR REFERENCE:java.net.SocketException: Connection reset]
I was installing BuildTools.jar but this happens...

dusky herald
#

You can nest IF statements into other IFs, and then they will not affect other IF statements.

#

and you can also generate items in their own methods and create them that way vice-versa

median wing
#

Okay, I'm trying it and I'll see, thank you very much for your help I greatly appreciate it

#

I'll tell you what happens

dusky herald
#

But, the way the command works as you put it, if you type /pickaxe smelter

#

or you do /pickaxe smelter <player name>

#

It will never give the pickaxe to the player name.

#

Because, you have the argument set as an else condition to the "smelter" string.

#

So it will basically only trigger if you do /pickaxe <w/e> <playername>

#

But even then, it still wont work unless a player did /pickaxe smelter

#

Because it's using a static reference, and if it was never set in the first place then it would never be defined.

#

So it could work if you did commands ingame like...

#

./pickaxe smelter

#

and then followed with something like

#

./pickaxe whateveriwanttosay <Player Name>

#

in that order

median wing
#

Oh, so how would I alter my code to fix this?

dusky herald
#

You should nest the IF statements

median wing
#

So not using else ifs?

dusky herald
#
// add actions here
   if(!args[1].isEmpty()) {
     if(Bukkit.getPlayer(args[1]) != null) {
        Player player = Bukkit.getPlayer(args[1]);
        player.getInventory().addItem(ItemStack);
     }
   }
}```
median wing
#

Ohhh, it makes more sense now

#

thank you so much

dusky herald
#

Yeah, if you have arguments that follow only the smelter argument

#

then you need to nest more if statements

#

and check those as well.

median wing
#

okay

dusky herald
#

Using just else will lead to issues.

median wing
#

so should I nest this with the target if statement?

dusky herald
#

You could use what I send

#

sent*

#

and add in the actions that you had within the smelter

#

to create your itemstack with the lore @ the // add actions here

median wing
#

oh so basically just copying the smelter again in there?

dusky herald
#

Yes.

median wing
#

Ah alright

dusky herald
#

It doesn't even have to be a public static ItemStack

#

you could actually remove that

median wing
#

yah I was using that for something else but never got rid of it

dusky herald
#

I'll recreate it for you, if you would like.

median wing
#

I'll do so now

#

recreate the class?

dusky herald
#

Hold up

#

Want to go to private messages? We can leave the channel open.

median wing
#

Alright

naive stratus
#

Cleaned it up a bit, to show what I mean. I haven't tested it, but that's the basic idea anyway. You can still improve on that a lot, but the concept should work.


#

Thanks for all the help today in here. Really appreciate the community. Managed to get a good amount done today, but I am still unsure about a lot of things too. If someone could take some time and give me some feedback on this: https://pastecode.xyz/view/a130b6e4

The PersistentData method is a part I need to refactor. It's a bit messy. The basic idea of the plugin is that when you pick up a red mushrooms, it saves a record in the database, with the amount that was picked up, who picked it up, and when it was picked up. When it's dropped, the record is updated, dropped_by, dropped_at is added, and lore is created like "NAME dropped item on DATE". That's what I got so far. I've attempted to use runTaskAsynchronously, but I am not 100% sure that the implementation is correct. Any tips on this would be great.

I have a decent server running, but if I have a 64 stack I press Q to drop them individually, creating 64 records in the database, I feel it's really hard on the server and I get a warning like [Server] Server thread/WARN Can't keep up! Is the server overloaded? Running 10700ms or 214 ticks behind - So something is up 😛 The Database does seem super slow though. SHOW FULL PROCESSLIST took 11+ secs to run, so that might also be a bottleneck.
@naive stratus Just gonna bump this one from me, from last night, that got burried in a discussion 😄 Hope it's okay.

Just confirmed with my server host, that they do have DB issues. I will move to a temporary AWS instance and see if that makes any difference.

#

Sorry @dusky herald - I did not see that you were already editing the file for him. Just sat down at the desktop without reading the rest of the conversation, after he said "thank you so much" 😛

median wing
#

Haha it's alright, I'm reading it now to learn about what I can improve. I just wanna thank everyone that helped me, and that I appreciate you guys taking the time to help me.

dusky herald
#

@naive stratus Not a problem, just trying to help, everyone has their own input. 🙂

naive stratus
#

@median wing Maybe look into moving all the lore to a config or something. That would make the class a lot cleaner.

#

Then you could cut it down to 40-50 lines of code

dusky herald
#

Eh

#

I wouldn't personally do that if it's going to be fixed.

frigid ember
#

Someone know how to allow 1.8.9v to join 1.9 spigot server? Because im getting this screen

dusky herald
#

I would move all lore to config if I were for example willing to release to public and allow the downloaders to edit the values.

#

Other than that, there's no reason to.

bronze marten
#

Move it into some constants class then

dusky herald
frigid ember
#

i have it

#

and viarewind too

bronze marten
#

List<String> lores = Arrays.asList(
“Lore1”,
“Lore2”
);

dusky herald
#

Well then, I dont think you can let older versions connect to newer?

#

I would highly doubt the capability of old clients to connect to newer version servers. Too many risks.

#

It just makes more sense to be able to go back than forward.

brittle stone
#

Is there a way I can teleport players mounted to an entity?

#

without dismounting the riding entity

foggy mural
#

Hi
With a bungeecord server
Do I have to put ALL servers with connection-throttle -1 if they are hosted locally? even the lobby?

fleet burrow
#

What could make this send?

#

[Server thread/ERROR]: POI data mismatch: never registered at BlockPosition{x=-76, y=91, z=-319}

bronze marten
#

@brittle stone maybe teleport them both to the location, then just remount the player

naive stratus
#

Not sure if it helps, but could give you an idea of what's going on.

#

Go to the position and see if something looks odd

#
List<String> lore = new ArrayList<String>(4);
lore.set(0, "THIS IS A VERY SPECIAL EGG! PROTECT IT AS IF IT WAS YOUR OWN!");

Shouldn't that work? I get an Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 error

#

Oh nvm, needed to to lore.add

inland meteor
#

why not just lore.add("test");

#

yeah lol

naive stratus
#

😉

inland meteor
#

haha

tall pewter
#

does anyone know a plot plugin where non-opped players can put up a plot for sale using a sign for example where other plays have the abilty to buy them.

#

please dm me

timid basin
#

Hi does anyone here know a good method to capture player input?

frigid ember
#

Try-with-resources are not supported at language level '5'
what does that mean?

naive stratus
#

@timid basin What kind of input? Any presses or chat input?

frigid ember
#

im using language level 8

pale plaza
#

Who know any on screen Faction claim board

timid basin
#

@naive stratus oh sorry somehow i didn't mention it WASD / SHIFT / SPACE input

pale plaza
#

PLz

timid basin
#

@naive stratus I tried calculating vectors from playermoveevent it works quite well, but if i cancel the event for some reason the player gets teleported to 0x 0z 0y idk why

naive stratus
#

It says under setCancelled in the documentation: If a move or teleport event is cancelled, the player will be moved or teleported back to the Location as defined by getFrom(). This will not fire an event

#

That might be why

#

Idk why it from would be 0,0,0 though

tiny dagger
#

is there a way to get all the users id from spigot from a plugin buyer list? 🤔

icy cradle
#

Anyone got any ideas why the following code does not work?
https://prnt.sc/s28csp
Trying to check if a player has one perm then but not the other
Test account 100% does not have the perm and is not op, Any ideas?

#

nvm im dumb

fleet burrow
#

why not just lore.add("test");
@inland meteor hahaha why not use reflection and directly modify the lore!

naive goblet
#
List<String> lore = new ArrayList<String>(4);
lore.set(0, "THIS IS A VERY SPECIAL EGG! PROTECT IT AS IF IT WAS YOUR OWN!");

Shouldn't that work? I get an Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 error
@naive stratus When I make lores I often make something like this

public class LoreList extends ArrayList<String> {
public LoreList(String... lore) {
Arrays.stream(lore).map(Utils::color).forEach(line -> this.add(line));
}
}
/* then */
ItemStack item = new ItemStack(Material.DIRT);
ItemMeta meta = item.getItemMeta();
meta.setLore(new LoreList(“&aLine 1”, “&4Line 2”));
item.setItemMeta(lore);
#

You can also make a method in LoreList which returns LoreList but are liable of adding more lines

subtle blade
#

Dude. Just use Arrays.asList()

naive goblet
#

huh

subtle blade
#

The reason you’re getting an error is because that index doesn’t exist yet. It was never set

#

But yea... Arrays#asList() takes varargs and returns an immutable list

naive goblet
#

Arrays.stream(list).map(Utils::color).collect(Collectors.toList());

#

iirc that would give the list as colored

subtle blade
#

Or just use ChatColor constants in your list

#

Don’t translate hard coded strings. That method should be used for configurable values

naive goblet
#

Well if you want to make something configurable. Using the translate color is the way to go lol

frigid ember
#

help?

#

error server

naive goblet
#

It’s even better to use a StringBuilder rather than to concatenate strings with the ChatColor constants I’d say

#

Pls bin

frigid ember
#

bin?

naive goblet
chrome lark
#

use the latest version of essentialsx

frigid ember
#

really?

naive stratus
#

Thanks @naive goblet

frigid ember
#

I'll see if it works

naive goblet
#

(:

subtle blade
#

I don’t think a StringBuilder is necessary. You can concat just fine

naive goblet
#

Rip readability

naive stratus
#

Anyone know why I cannot get meta from an object spawned with block.breakNaturally(itemStack); ? I set meta on the stack, but when I check in ItemSpawnEvent it does not have the meta that I just set.

naive goblet
#

Send code ig

subtle blade
#

itemStack is the item used to break the block, not the item to be dropped by the block

idle tulip
naive goblet
#

What’s the name of your Main class

idle tulip
#

package io.github.pricamc;
public class pricamc extends JavaPlugin implements Listener {

naive goblet
#

Refactor it to a capital letter

#

All classes starts with uppercase letters

naive stratus
#

@subtle blade So there is no direct way of controlling the meta of what gets spawned?

subtle blade
#

Look at your package and look at what you’ve set in your plugin.yml

idle tulip
#

Ok thanks, troxx

subtle blade
#

It’s pretty clear

naive goblet
#

@idle tulip I’d recommend you to google Java name conventions

naive stratus
#

Actually.. I'll just spawn it myself.

subtle blade
#

io.github.matbcvo.pricamc.pricamc
vs.
io.github.pricamc.pricamc

naive goblet
#

main: package.name.MainClassName

subtle blade
#

Look at your package... then look at what you’ve specified in your plugin.yml

#

It’s very clearly wrong

idle tulip
#

Sorry, I just saw that package name wasn't correct, I renamed both package and class names, now it's all working, thanks.

frigid ember
#

@eletroniccat thank you bro

#

@chrome lark

naive stratus
#

Question... https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/scheduler/BukkitRunnable.html#runTaskTimerAsynchronously-org.bukkit.plugin.Plugin-long-long- mentions that Asynchronous tasks should never access any API in Bukkit. Great care should be taken to assure the thread-safety of asynchronous tasks., yet I see it happen all over the place, in examples I can find, such as: https://github.com/The-SourceCode/Advanced_Bukkit/blob/master/Episode_12/ParticleTrails/src/me/tsccoding/tutorial/TutorialMain.java

#

Can someone clarify a bit?

chrome lark
#

because that packet doesn't read world state

sour dock
#

I don't understand why you'd use an async task for sending particles though

#

is it good practice to make stuff async where possible, or is this overdoing it?

chrome lark
#

in this case it's dumb

sour dock
#

generally I'd only use it for disk IO, databases, etc

#

or any non minecraft related CPU intensive task

chrome lark
#

You have to remember that async tasks will need to have a thread to run in, if there ain't enough threads, it will have to create one; That task would potentially create a metric ton of threads in the worse case scenario

sour dock
#

right, this runs every tick :/

#

in any case, I'm pretty sure there's a proper particle API in spigot in 1.12, not sure why this uses packets and NMS

naive stratus
#

I see. Thanks for that. Now, another question 😛 I have a lot sorry. If I want to make the world indestructible in a radius around a specific location, for certain players, how would I go about doing that?

#

I place a block and only the person that placed the block, will be able to destroy the world in a radius around that block.

chrome lark
#

i mean, you basically wanna do what worldguard does

sour dock
#

divide this problem into components, and start by writing methods for each component. For example, start by figuring out how to calculate if a block is in a radius of some other block

#

also be careful not to reinvent the wheel

pale plaza
#

who can tell me some good custom scoreboards

pale plaza
#

BroNon work tho

boreal tiger
#

@naive stratus you can use the blockbreakevent and check if the distance squared from the center is less than your radius squared (from the circle equation)

naive stratus
#

True. I was just wondering if there already were some methods for doing this, but the block event will work for sure.

#

Thanks

sour dock
#

there is a distance method in Location

boreal tiger
#

yeah

sour dock
#

make sure to use the squared method so it doesn't need to calculate square roots

frigid ember
#

I have a schematic made that I want in my world but its so large that world edit crashes the server a FAWE doesn't even do anything. I just tried mcedit I followed all the steps and even that didn't show anything. I know the schematic works because I tested it with cubical.xyz (online schematic previewer). I literally can't access my schematic at all in game.

chrome lark
#

you can configure the watchdog in bukkit.yml iirc

#

set it stupidly high and paste it

#

either that or you'll have to use an offline map editor, or paste it in smaller chunks

pale plaza
#

Who know a java code for custom score board

naive goblet
#

Spigot has a guide for it

sour dock
#

see my message above

coarse shoal
#

I found a dupe bug with a plugin of md_5's

frigid ember
#

What do you mean watchdog

pale plaza
#

@naive goblet Idk what to put tho

sour dock
#

you say none of the scoreboard plugins work, you must be doing something very creative

coarse shoal
#

Do I have to test it against Spogit too?

#

I currently run paper

naive goblet
#

Send your code ?

boreal tiger
#

@coarse shoal yes

coarse shoal
#

ugggghhhhh

boreal tiger
#

paper != spigot

coarse shoal
#

no shit

#

it's better lmao

boreal tiger
#

then why did you ask lol

sour dock
#

if you're going to file a spigot bug report you'll have to reproduce it on spigot

light fjord
#

No SWEARING

pale plaza
#

@sour dock What ??? i just need 1 to show the server name your ingame bal thats all

coarse shoal
#

Nono, it's a plugin

boreal tiger
#

its a bug in a specific plugin?

sour dock
#

ok nvm

#

I'll leave

naive goblet
#

@pale plaza I bet you can find a plugin for it with little effort

pale plaza
#

nope

boreal tiger
#

if you're not the author submit the issue to the author

coarse shoal
#

Yeah, one of md_5's

pale plaza
#

i try for 2 hours now

light fjord
#

NO SWEARING CAMM

naive goblet
#

Time doesn’t matter

#

It’s how you spent the time

pale plaza
#

Yeh Looking

boreal tiger
#

his plugins are targeted at spigot servers iirc so you should still test it in spigot

pale plaza
#

and clicking every link

coarse shoal
#

@light fjord sh

light fjord
#

NO I AM A GOOD PERSON

boreal tiger
#

can you stop using caps lol

coarse shoal
#

you should repent

pale plaza
#

public void setScoreBoard(Player player) {
Scoreboard board = Bukkit.getScoreboardManager().getNewScoreboard();
Objective obj = board.registerNewObjective("ServerName", "dummy", "Test Server");
obj.setDisplaySlot(DisplaySlot.SIDEBAR);
} is that all i type in my codeing app

sour dock
#

codeing app

naive goblet
#

@light fjord Avoid off topic conversation. This channel is mainly for support and help.

boreal tiger
#

lmao

sour dock
#

are you a server owner or plugin developer @pale plaza

#

I doubt you are a plugin developer

#

so use an existing plugin

naive goblet
#

@pale plaza You should go and learn about PlaceholderAPI

pale plaza
#

@sour dock Server Owner

#

@naive goblet what dat

naive goblet
#

Go and find out

light fjord
#

Yeah

pale plaza
naive goblet
#

Yep

pale plaza
#

What it do

naive goblet
#

Read about it

sour dock
#

read the resource page

naive goblet
#

Jeez

pale plaza
#

But can it make the score board

sour dock
#

no

naive goblet
#

Okay I’m out now

sour dock
#

xd

pale plaza
#

I DONT UNDERSTAND IT

sour dock
#

if you are not willing to spend time to learn stuff and want others to walk you through everything you shouldn't be running a server

pale plaza
#

Well I Just need A Fucking Place holder

sour dock
#

okay then

pale plaza
#

Well score board

#

i just wanna know what it do

sour dock
#

@light fjord we need you to yell no swearing again

light fjord
#

NO SWEARING

pale plaza
#

WHY Or WHat XD

#

I just wanna know what PLaceHolderApi Do

silk gate
#

ill tell ur mum

pale plaza
#

Do That

silk gate
#

ok big man

wicked sage
#
    /**
     * Creates an empty {@link ConfigurationSection} at the specified path.
     * <p>
     * Any value that was previously set at this path will be overwritten. If
     * the previous value was itself a {@link ConfigurationSection}, it will
     * be orphaned.
     *
     * @param path Path to create the section at.
     * @return Newly created section
     */
    public ConfigurationSection createSection(String path);

what does it mean to be orphaned?

sour dock
#

the previous ConfigurationSection object may still exist but if you try to get/set stuff in it, changes will not make it to the config?

wicked sage
#

sorry, i don't understand

sour dock
#

so if you do

section = config.getConfigurationSection("example");
section2 = config.createSection("example");

now section is an orphan

wicked sage
#

oh, so it isn't linked?

sour dock
#

if you do section.set("something", "something") nothing will happen to the config

wicked sage
#

it doesn't erase the previous reference?

#

ah, alright

sour dock
#

it can't

wicked sage
#

i understand

#

thanks 😄

#

you can't control that via a plugin

#

afaik

#

because the plugin is a child process of the server

#

you need to make a program that controls the server

pale plaza
#

How do i make a score board with PlaceHolderApi

pale plaza
#

WELL#

naive stratus
#

@pale plaza I think you've already burned your bridges in here with your behaviour 😛 Best chance is to follow the links they send and figure out how to make it yourself. Or pay someone to do it.

frigid ember
#

Hey a question is anyone here?

silk bane
#

no

frigid ember
#

So i own an Minecraft server im using WinSCP (Putty) as console. I typed restart and i get this problem: (i should of typed stop and not restart)
https://prnt.sc/s29y8w

This is what a guy said but i dont know how to do it so is anyone able to help me out?
type htop in a normal putty console and then press F4 and then type java and then find the instance of your server running and hit F9 9 ENTER
PLEASE @ ME IF YOU RESPOND

silk bane
#

@frigid ember restarting the whole server will work

frigid ember
#

@silk bane Its weird because i typed restart and i ment to type stop

#

It broke something i cant start the network up because of that (you see in the prnt.sc)

silk bane
#

i mean not the minecraft server

#

the actual server

frigid ember
#

How?

sour dock
#

reboot

neat oxide
#

sudo reboot

silk bane
#

shutdown -r now

#

¯_(ツ)_/¯

neat oxide
#

or shutdown /r /t 0
if your windows

frigid ember
neat oxide
#

OOOOFFFF

silk gate
#

su -

#

to switch to root

#

then usermod -aG sudo westrarowdy

neat oxide
#

or he has no access to root

silk gate
#

why wouldnt he

frigid ember
#

Idk

silk gate
#

unless hes trying to run a server on a seedbox or something

neat oxide
#

TADA

frigid ember
#

I own the VPS

silk gate
#

do you not know your root password

neat oxide
#

Then you should have root access

frigid ember
#

I do ofc @silk gate

#

I type it then i get that

silk gate
#

you typed it wrong then

frigid ember
#

i typed it twice over

neat oxide
#

Then your box is broken because it means wrong code

frigid ember
#

wait lemme do it again

silk gate
#

more like he just forgot it

frigid ember
#

How can i forget it?

silk gate
#

humans tend to forget stuff

frigid ember
#

Alr lets reset it then to show its not me forgetting a password, anyone knows how to reset the root password?

silk gate
#

you dont

#

you need to be root to do it

#

if you're lucky, since it's a VPS, your host might provide a way for you to do it

frigid ember
#

I dont think so since its google @silk gate

#

Its an test server running everything

silk gate
#

why are you running it on gcp

neat oxide
#

Thats expensive af

frigid ember
#

So i can test everything

#

Iknow

silk gate
#

free credits style

frigid ember
#

I ran out of the credits alrdy

silk gate
#

...

neat oxide
#

😕

silk gate
#

why are you paying for gcp then

#

its crazy expensive and bad for minecraft

frigid ember
#

Because its really smooth tho

silk gate
#

run lscpu | grep -i model

#

see what cpu you have

frigid ember
silk gate
#

eek 2.2ghz

#

why are you paying for this

frigid ember
#

idk tbh

silk gate
#

seriously just swap

#

gcp do some weird login stuff

silk bane
#

at that point just move to a shared host

silk gate
#

you dont have access to root out of the box, your account is a sudoer

#

but it seems like you broke something

frigid ember
#

Ye

#

i typed restart

#

and not stop

silk gate
#

that wouldnt break it

frigid ember
#

Thats the only thing i did

silk gate
#

just switch hosts

#

youll do it down the line when you end up having 2 tps

frigid ember
#

Well i ran w/ 150 people on 20 tps

silk gate
#

on gcp?

frigid ember
#

Yea

#

Not even joking

silk gate
#

youre paying too much even then

frigid ember
#

Probally

#

Well

#

What vps is good then

#

Ovh?

silk gate
#

what are you looking for

frigid ember
#

Just good for a mc server

silk gate
#

how much ram

#

location

frigid ember
#

Germany

#

32

silk gate
#

not gonna lie

frigid ember
#

15/24 gb

silk gate
#

just get a dedicated server at that point

frigid ember
#

**

silk gate
#

oh

frigid ember
silk gate
#

budget?

frigid ember
#

@silk gate

#

When i use OVH be like ^

silk gate
#

thats like

#

their most expensive dedicated server

silk bane
#

there's no way GCP is cheaper for similar hardware

frigid ember
#

Its not cheap GCP

silk gate
#

what plan was that on ovh?

#

has to be like

#

FS-72T

#

about the same price

#

RISE-1 would probably be fine

frigid ember
silk gate
#

oh unless he was looking at public cloud

frigid ember
silk gate
#

might as well spend another 6 euros and get the rise-1

#

32gb ram

#

dedicated

frigid ember
#

Oh fr?

silk gate
#

yes

#

or look at hetzner

silk gate
#

hetzner big cheap

#

but uh

#

you cant get their ax line atm anyway

fleet burrow
#

I have this piece of code

public void removeMachineCoreLocation(Location location) {
        Bukkit.getScheduler().runTaskAsynchronously(machinery, () -> {
            Path file = location.getWorld().getWorldFolder().toPath().resolve("machines.dat");

            long longToFind = Utils.locationToLong(location);
            try (ByteChannel in = Files.newByteChannel(file, StandardOpenOption.WRITE, StandardOpenOption.READ)) {
                ByteBuffer buffer = ByteBuffer.allocate(128);
                in.read(buffer);
                buffer.flip();
                LongBuffer longBuffer = buffer.asLongBuffer();
                for (int i = 0; i < longBuffer.capacity(); i++) {
                    long position = buffer.getLong(i * 8);
                    if (position != longToFind) continue;
                    buffer.putLong(i * 8, 0);
                    in.write(buffer);
                    break;
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        });
    }```
It is supposed to get a location, find it in a file of longs and remove it/set it to 0, however, when I call ByteChanncel#write it appends the long of 0  as shown in the picture. It should overwrite the first 8 bytes
old barn
#

How do I cancel the drop of certain items when I kill the zombie?
I'm using the EntityDeathEvent event, I've tried some methods, but always drop the items I don't want

silver pollen
#

you can use event.getDrops() to get the drops as a list of itemstacks and then remove all from that list

arctic cloud
#

Gcp is definitely not cheaper but has better network usage tolerance

frigid ember
#

Hello, can I find a tutorial on installing a server on Linux?

#

preferably an updated on

iron nebula
#

Install Java,
Run the server

frigid ember
#

wow great advice lol....

neat oxide
#

Its that easy tbf

#

Put jar in seperate folder

#

install java

#

run java -jar Spigot.jar

arctic cloud
#

It doesn't take a genius to run software

old barn
#

@silver pollen I did it, it actually stopped dropping, but there are times when I "bug" and drop the item that I didn't cancel

arctic cloud
#

Maybe install screen too if this is on a vps

old barn
#

How do I cancel the drop of certain items when I kill the zombie?
I'm using the EntityDeathEvent event, I've tried some methods, but always drop the items I don't want

vernal spruce
#

Has anyone ever had problem with a plugin using another plugin rewards?

#

i have 2 separate plugins,both using same logic to handle rewards,each with theyr rewards.yml inside them

#

but somehow 1 is stealing from the other one

narrow crypt
#

How do i reset my custom data.yml file to its orginial state how i made it in eclipse

vernal spruce
#

delete it?

#

or if you want through code,you could delete everything on enable then recopy it

pale plaza
#

How do i download spigot jar ????

vernal spruce
#

tbh idk about 2nd one..

pale plaza
#

Well i gotta admit i am lazy but im tryna code idk were to look

vernal spruce
#

download 2nd one then..

silk gate
#

@vernal spruce remove the getbukkit link

pale plaza
#

Thanks

silk gate
#

getbukkit illegal btw

#

could be packaging malware btw

vernal spruce
#

then why is google marking it 1st search?

silk gate
#

wdym

#

doesn't make it not illegal

vernal spruce
#

type spigot download

#

and see yourself

#

all 10 links are getbukkit

silk gate
#

I'm sure if wolverness reported it to google they'd remove it

narrow crypt
#

@vernal spruce how do i delete everything but my main: Drops:

#

like clear the Drops

vernal spruce
#

like 1st page of that search is only getbukkit..

silk gate
#

ok and?

#

it's still illegal

vernal spruce
#

@narrow crypt set("Drops",null)

narrow crypt
#
Drops:
  '1':
    ==: org.bukkit.Location
    world: world
    x: 130.0
    y: 4.0
    z: -196.0
    pitch: 0.0
    yaw: 0.0
  '2':
    ==: org.bukkit.Location
    world: world
    x: 130.0
    y: 4.0
    z: -196.0
    pitch: 0.0
    yaw: 0.0
vernal spruce
#

would delete the section itself

narrow crypt
#

i got multiple tho

#

and then recreate the section?

vernal spruce
#

doesnt matter it deletes the section if it is

#

yes

silk gate
#

If you google 123movies it still comes up

#

doesn't make 123movies not illegal

vernal spruce
#

well havent seen anyone but you complain about it @silk gate

pale plaza
#

how do i download the spigot cus i have a server just needthe java file

vernal spruce
#

im gonna ask a staff member later

narrow crypt
#

or will it create it by itself if i do `data.set("drops." + blablab,blabal);

silk gate
#

guarantee they'll tell you the same thing

#

$5 if they don't

vernal spruce
#

@narrow crypt yeah that will create a entry in it

wanton delta
#

Isn’t getConfigurationSection().clear a thing

#

I’m not entirely sure but give it a try

vernal spruce
#

does same thing.. both works

silk gate
#

set to null to clear

pale plaza
#

How do i download the spigot 1,8 java file

#

1.8

silk gate
#

you don't

wanton delta
#

run build tools

silk gate
#

you download buildtools

wanton delta
#

?buildtools

silk gate
#

with the flag --rev 1.8.8

wanton delta
#

Darn

#

There is a spigot article on it

#

Google

narrow crypt
#

@wanton delta im not talking about the defaultconfig

hot girder
#

compile paperspigot

wanton delta
#

You still have to use YamlConfiguration right?

pale plaza
#

it will take me here but how download 1.8(top)
Code (version18 (Unknown Language)):
java -jar BuildTools.jar --rev 1.8
Will build a CraftBukkit and Spigot jar for 1.8
Change Log: Mojang | Stash | Jenkins

Issues and Common Concerns(top)

silk gate
#

you can't just download it

narrow crypt
#

yes i do martoph

pale plaza
#

@silk gate How Then

wanton delta
#

Google it

#

Spigot website

silk gate
#

build

#

tools

wanton delta
#

Download buildtools and run it with fit bash

silk gate
#

you are literally on the page that explains it

wanton delta
#

Git bash*

hot girder
#

Fit bash

wanton delta
#

:(

hot girder
#

💪

vernal spruce
#

yeah sucks a bit needing getbash to downloadi t..

narrow crypt
#

martoph it doenst suggest me data.clear

wicked sage
#

can editing config files and what not be done in an async thread?

hot girder
#

Every developer must have git

#

sorry for my bad english

wanton delta
#

sure but don’t access any bukkit api

wicked sage
#

it's for saving ::D

vernal spruce
#

hmm would the default config.yml go into bukkitapi?

wanton delta
#

I don’t see why not

wicked sage
#

alright

wanton delta
#

Nope

#

It’s snakeyaml

narrow crypt
#

FileConfiguration data = YamlConfiguration.loadConfiguration(new File(Main.plugin.getDataFolder(), "data.yml"));
this is how i created the file

hot girder
#

Fit bash haha

wanton delta
#

Sure you can use the bukkit api to access the file but it’s returning a YamlConfiguration

hot girder
#

I have a class for Configurations, creating is simple than new Configuration(plugin, "config.yml");

fair abyss
#

I checked bungee docs but couldn't found answer.
is ProxyServer#getPlayer(UUID) non null?

if its non null, can I sendMessage() or should check isConnected() before?

vernal spruce
#

doesnt it say what it can return?

wicked sage
#

would p.getUniqueId() break in async threaD?

vernal spruce
#

yes

narrow crypt
#

but how do i clear the Drops section in my FileConfiguration data = YamlConfiguration.loadConfiguration(new File(Main.plugin.getDataFolder(), "data.yml"));

wanton delta
#

@narrow crypt that is a YamlConfiguration that youre getting

fair abyss
#

set null @narrow crypt

wicked sage
#

hmm alright

hot girder
#

data.set("some.section", null)

silk gate
#

I mean @wicked sage since the uuid never changes it won't cause any issues, but it's bad practice

hot girder
#

Try not to use singletons

vernal spruce
#

it might throw asyncacces not sure though

wicked sage
#

im saving things based on the uuid. just means i need to get it as a final variable before going into my async therad vs claling the method asynchronously

hot girder
#

It's a antipattern

fair abyss
narrow crypt
#

doenst work @hot girder

hot girder
#

save it

#

data.save()

narrow crypt
#

ah

vernal spruce
#

i see save defaults

#

but never saveResource?

fair abyss
#

:?

#

if file doesnt exist it saves defaults

vernal spruce
#

nvm hes already calling

#

saveresource in savedefaults

narrow crypt
#

@hot girder data.save() didnt work since its configurationfile but using:

try {
               data.save(new File(plugin.getDataFolder(), "data.yml"));
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
#

worked

hot girder
#

Hm

#

It will be repeated

fair abyss
#

use my class @narrow crypt

hot girder
#

when you want to save it

#

bad english aaahhh

#

Create a class extending to YamlConfiguration

fair abyss
#

I sended

#

already

#

yushu

hot girder
#

Uh

fair abyss
narrow crypt
#

is this that bad?

#

what i have now

fair abyss
#

not bad

#

not good

hot girder
#

Just

#

DRY

fair abyss
#

actually same, but yours hard to use

hot girder
#

Dont Repeat Yourself

#

That code will be repeated

#

When you save it

#

bad english :(

#

You can put it on a method

narrow crypt
#

Dont Repeat Yourself
Wdym?

vernal spruce
#

boys how would you go about creating a persistent,custom entity with my own stuff

fair abyss
#

@vernal spruce version?

#

check LivingEntity#setPersist()

vernal spruce
#

rn im deleting them at ondisable,and at onenable replacing them while checking the location

#

its gonna have its own listener..

fair abyss
#

note: killing entity in on disable will result dropping entity's items.
and you cant block it

vernal spruce
#

dont care as location will be saved

#

in configs

#

and will later spawn again oneanble

hot girder
#

Wdym?
@narrow crypt what

fair abyss
#

"what do you mean"