#help-development

1 messages · Page 1 of 1 (latest)

drowsy harness
#

((Directional) currentBlock.getState().getData()).getFacing()

This should work, right?

hoary perch
#
ServerPlayer npc = new ServerPlayer(nmsServer, nmsWorld, gameProfile, ...);```
At ... I should add a ProfilePublicKey. What should I enter there?
eternal oxide
#

just pass null

earnest forum
#

read

#

v

#

Specified enchantment cannot be applied to this itemstack

eternal night
#

presumably because the enchantment cannot be applied to the item stack

#

e.g. infinity cannot be applied to a sword

earnest forum
#

sharpness can't be applied to a pickaxe

#

etc

#

well give us some context

hoary perch
earnest forum
#

what enchant are you trying to apply to which itemstack

hoary perch
earnest forum
#

im pretty sure if you use addUnsafeEnchantment it doesnt give that error

eternal oxide
earnest forum
#

and with the /enchant command no

hoary perch
#

but with plugins

#

i guess

eternal oxide
#

player.getWorld IS the Bukkit World

hoary perch
#

any idea how to fix this?

eternal oxide
#

cast to CraftWorld and getHandle

strong thistle
#

Could anyone give me a hint how i get from player to players target entity

hoary perch
eternal oxide
#

((CraftWorld) player.getWorld()).getHandle()

#

and its a ServerLevel not a WorldServer

earnest forum
#

thats the same as doing Bukkit.getPlayer(player.getName())

hoary perch
eternal oxide
#

Nope its all guesswork. I'm throwing words at the page

tender shard
#

Isnt ServerLevel a subclass of WorldServer?

#

Pretty sure that it is

#

Its like List -> ArrayList

eternal night
#

two complete different mappings

#

idk what you are doing there

#

but it is cursed af

tender shard
#

Do they have remapped AND spigot mappings in one project?!?!

solemn igloo
#

Pls help, how do i set when i crouch i get launched 10 blocks in the air

tender shard
#

Then apply velocity

hybrid spoke
#

PlayerToggleSneakEvent

#

or Sneaking

#

idk

tender shard
eternal oxide
#

Using https://paste.md-5.net/ifogihevus.java You can do the following...java DedicatedServer nmsServer = (DedicatedServer) NMSUtils.getDedicatedServer(); ServerLevel nmsWorld = (ServerLevel) NMSUtils.getServerLevel(location.getWorld());

hoary perch
#

its working now

#

i had two librarys 😭

solemn igloo
tender shard
#

Idfk

#

Use java

eternal oxide
#

Love me!

solemn igloo
hybrid spoke
#

i will darling

#

i will

tender shard
solemn igloo
eternal oxide
#

I'm devastated

tender shard
#

Youll get over it some day

hoary perch
#

any way to let the npc lie on the ground like it is dead?

tender shard
hybrid spoke
eternal oxide
#

At least I still have God

tender shard
#

But probably not in visual bukkit

#

VisualBukkit probably only does API, no NMS

hybrid spoke
#

lets make a VisualCraftBukkit

tender shard
#

Lmao

#

Why not just go full VisualJava

buoyant viper
#

VisualVM

tender shard
#

Like normal java but you drag and drop the letters into the IDE

hybrid spoke
#

oh and then make api packages

#

so they can drop in spigot package

#

nms package etc. which we provide

buoyant viper
#

petition to name Spigot to Spukkit

tender shard
hybrid spoke
#

Bigot

buoyant viper
hybrid spoke
tender shard
#

When even is pride month

#

Hasnt it just ended or sth

hybrid spoke
#

yeah i think so

tender shard
#

Now we can all go homophobic again

hybrid spoke
#

fuck you alex

tender shard
#

„Fuck ppl like me“

charred blaze
#

how to get current directory? i dont want to use getDataFolder().toString() because it gives me only plugins/pluginname
i tried to use this System.getProperty("user.dir") but it gives me nothing

hybrid spoke
#

where the jar is running?

charred blaze
#

its plugin..

hybrid spoke
#

and a plugin obv. isnt a jar

eternal oxide
#

getDataFolder() gives you a File object,. you can use canonical path from that

tender shard
#

What path do you need?

#

Server folder?

lost matrix
charred blaze
eternal oxide
#

if he wants the root just new File()

lost matrix
charred blaze
tender shard
#

getDataFolder().getAbsolutePath()

tender shard
eternal oxide
#

absolute is correct

lost matrix
eternal oxide
#

just getPath() seems fine

charred blaze
hybrid spoke
charred blaze
#

i have another question

hybrid spoke
#

?ask

undone axleBOT
#

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

lost matrix
#

How about we all start using unix timestamps for now

charred blaze
#

ivseen someone was running his plugin in code editor

#

how?

hybrid spoke
#

they probably set up a profile in their IDE which runs a server on build

charred blaze
#

i mean eclipse or something

eternal oxide
#

I've seen it done. never bothered myself

charred blaze
#

is there any tutorial on eclipse?

eternal oxide
lost matrix
#

Well... there are several ways. If you are using gradle then you can use the jpenilla gradle plugin to add a "run-paper" goal.

hot wolf
#

Hey! I have an Economy plugin (H2 DB), which is a dependency of my CaveEssentials plugin. And when I try to call the function, which gets the balance of a player (from the Economy plugin) it says, that connection is null. Do I have to get a separate connection URL for my second plugin?

hoary perch
#

Why cant I use Material.WHITE_CANDLE?

hot wolf
hoary perch
#
        inv.setItem(13, new ItemBuilder(Material.WHITE_CANDLE, 1).setName("...").setLore("...").create());
                                                ^
  symbol:   variable WHITE_CANDLE
  location: class Material```
eternal oxide
#

no api version in your plugin.yml?

hoary perch
#

im on paper 1.19

hoary perch
quaint mantle
#
java.lang.IllegalArgumentException: `The found tag instance cannot store String as it is a NBTTagLong

What does this error mean?

eternal oxide
#

Test on Spigot and if it still errors we'll take a look

buoyant viper
hot wolf
hoary perch
#

i guess i cannot switch that easily

charred blaze
lost matrix
#

Like HikariCP

tender shard
hot wolf
#

Sure, I'll look into that. Thanks! Though for educational purposes, why does that happen?

lost matrix
#

Could be anything

hot wolf
#

Fair enough lol

hot wolf
lost matrix
#

The dependency is transitive

hot wolf
#

lol thats odd

hot wolf
#

idk why it still says .class, I actually changed it to .java in the title but yeah

tardy delta
#

looks like stuff codedred would do

lost matrix
#

Databases support UUIDs. Use them instead of Strings.

charred blaze
tardy delta
hot wolf
#

not problem though, at least I don't think it is... getting the conenction just returns null when I use it in my other plugin

lost matrix
charred blaze
tardy delta
#

your plugin wont work for linux users otherwise

#

its just a habit

hot wolf
wet breach
lost matrix
charred blaze
#

for jdbc

tardy delta
#

meanwhile me shading the h2 driver

#

🙏

hot wolf
lost matrix
charred blaze
#

i need timestamps

#

and sqlite has an option for it

lost matrix
wet breach
#

timestamps are a programmable thing

charred blaze
wet breach
#

and you can use more then one yml file

lost matrix
charred blaze
#

sqlite looks more trustable

#

HM

#

can i store timestamps on yml?

wet breach
#

yes

#

timestamp is just a string of numbers to represent an arbitrary time

lost matrix
wet breach
#

in other words a string of numbers

charred blaze
#

uh

#

also

#

i need to check

#

every value

#

on plugin start

#

can i do it in yml?

tardy delta
#

sure lol

charred blaze
#

every line*

charred blaze
lost matrix
#

I think the id is not exposed in the api. So nms it is.

tardy delta
#

i have no idea how your yaml file looks but probably smth with iterating over a config.getSection

charred blaze
tardy delta
#

iterating over a config section, i recommend you take a look at the config docs

lost matrix
#

You dont need the window id for that. Listen for outgoing item packets and change the lore in the packet

tardy delta
lost matrix
tardy delta
#

what kind of plugin btw

lost matrix
#

Every packet that sends ItemStacks to a player

charred blaze
#

stop telling me same thing 21931823x times.

lost matrix
charred blaze
#

No

charred blaze
#

i dont even know what you mean in implied math

visual tide
#

learning about the thing you are trying to do is in your own interest

lost matrix
# charred blaze No

In easy words: You will be faster if you learn java now and then finish the plugin instead of trying to finish the plugin with your current knowledge.

tardy delta
#

instead of watching tutorials*

lost matrix
#

given you have the cognitive capacity for that

wet breach
# charred blaze stop telling me same thing 21931823x times.

while you may not like that people are telling to learn something first, this is not a place to be spoonfed or a place where you get your hand held and show you around java and the sorts. You need to put some effort into yourself as well which includes learning and teaching yourself whatever you are trying to use.

hot wolf
wet breach
#

experience

#

also, knowing maven

lost matrix
hot wolf
#

Noice, I don't have much experience with maven or java yet, but some day I'll be on the same level as in C#, hopefully

hot wolf
lost matrix
#

like com.some.path.DatabaseUtils
existed twice on the classpath and your plugin used the one "closest" to your other classes.
Its hard to describe.

#

And only one is initialized by your loaded plugin. The other one you shaded is just untouched.

drowsy harness
#

Is there a easy way to check if the player is looking somewhere in this area, if I know the coordinates for the area?

hot wolf
#

It's hard to understand, but I think I kind of know what you mean

#

Makes sense though

wet breach
#

typically the issue more or less arises when you have a transitive dependency and a hard dependency both being the same

#

but differing versions

lost matrix
hot wolf
#

yay

drowsy harness
#

yay, love math... not :(

wet breach
lost matrix
#

Thats all you have when working with packets.
Look at the protocol and look at the nms packet. Latter helps me personally more.

drowsy harness
#

i got an idea to solve this without math

lost matrix
drowsy harness
#

spawn an invisible slime, and check if player is looking at the slime

#

would that work?

lost matrix
#

Sure. Sounds expensive.

wet breach
#

depends on your context. Do they just need to be looking near it or must their cursor be at least in the box?

#

if you want near then you have no choice but to use math

drowsy harness
#

in the box

#

basically, im going to spawn some holograms there, and i want something to happen if the player is looking at those holograms, but since hologram names are not included in the armorstand hitbox, i can't just check the armorstand hitbox

wet breach
#

then your slime idea will work, however a bit more resources then necessary

noble forge
wet breach
drowsy harness
#

(art hasn't really been my career path)

wet breach
#

I might have something that actually might help you

#

but it might be too advanced for you to decipher some useful code from it. Anyways, this plugin allowed touch capabilities for holograms

#

its defunct mostly, but still might have something useful in it 😛

ocean lion
#

Anyone who knows a Coin/PlayerPoint API which works on 1.19

split yoke
#

so i'm trying to create a config file and allow the user to modify some values in it, but i don't know if what i've done is correct or not

#

someone to help me ?

split yoke
#

didn't tried

ocean lion
#

so then you dont know if its correct or not

tardy delta
#

conventions???

split yoke
#

yeah but that's for starters, do i need to create the config file in the plugin itself? or it will create later

vale ember
#

Lowercase class name 💀

delicate lynx
#

?main

tardy delta
#

then change it if its for starters lol

lost matrix
wet breach
#

if you want to get super fancy with letting the user modifying the config, you can make use of the conversation api and let them do it from in game 😄

split yoke
#

Actually i just want to modify the kind of kit command that spigot forums gives us and allow the user to modify the items given in the config file

tardy delta
#

whats even the point of the conversation api? like when is it used?

#

i didnt even know it exist a few months ago

wet breach
#

basiscally anything you can think of

drowsy harness
#

(but with packets)

tardy delta
#

ooh that sound great

split yoke
#

so i've recreated the whole "main" file with the plugin's name

#

no main anymore

tardy delta
#

i havent really found a tutorial on how to start with it but ye anways ill look at it :)

split yoke
wet breach
tardy delta
#

ye ig

wet breach
tardy delta
#

🤔 🤔

lost matrix
vapid thorn
#

bruh

#

thats a mess

tardy delta
#

lets not try to be rude 🥺

vapid thorn
#

lol

#

not trying to be, just being honest xD

wet breach
#

yep, for whatever reason spigot/bukkit didn't like it any other way

vapid thorn
#

i mean

#

if it didnt want to -shrugs-

wet breach
#

yeah it was dumb, I am sure now I could fix it whenever I get around to updating the plugin

vapid thorn
#

so on a side thing.. How do I get this to actually add the 2 to the existing damage of the sword, rather than replacing it as a bonus to none weapon damage? because thats what it does xD

meta.addAttributeModifier(Attribute.GENERIC_ATTACK_DAMAGE,
                new AttributeModifier(UUID.randomUUID(), "generic.attackDamage", 2.0, Operation.ADD_NUMBER, EquipmentSlot.HAND));```
split yoke
#

I'm trying to read values from the config file but it keeps telling me i can't?

ocean lion
#

why dont you have a getInstance

split yoke
#

where? Sorry i'm kinda new in this

ocean lion
#

in your main class

split yoke
#

well my main class is looking like this

ocean lion
#

why does it implement Listener

#

you need to make an instance of your Main class

vapid thorn
#

lets start with the instance stuff

ocean lion
#

and make a getInstance

sacred mountain
#

im semi confident not one living soul can understand one of the methods in my code

#

actually very confident

hot wolf
#

Calling an event from a plugin should be enough to actually use it with the eventhandler in another one right? (Besides having all the dependencies and stuff)

tardy delta
#

yes if i understand correctly

hot wolf
#

kk in that case i probably didn't call it correctly or smth

#

thx

split yoke
#

do I need to add this in my main class and after use it in my commands with a getInstance?LePluginABenlezouz instance = this;

tardy delta
#

?di

undone axleBOT
split yoke
#

LePluginABenlezouz instance = this; sorry

#

I added it in my onEnable

undone axleBOT
tardy delta
#

lmao

tardy delta
trim surge
#

yeah sorry 😂

#

just realised it wasn't material

#

its because its ItemStack Material 😂

tardy delta
#

i mean learn java man

trim surge
#

Yeah...

sterile token
#

@trim surge we straightlly recommend learning java before touching external apis...

trim surge
#

Why are you @ ing me? lol

sterile token
#

I never tag you

#

😂

hybrid spoke
#

@trim surge

sterile token
#

Lmao also are you english?

trim surge
#

ffs 😭

split yoke
#

Sorry, but can you guys explain me where do i put the Material.matchMaterial

trim surge
#

Yes im English

trim surge
sterile token
#

Oh ok I thought you werent

tardy delta
#

learn some java first instead of trying that stuff

#

?learnjava

undone axleBOT
sterile token
trim surge
#

For my job i've had to create a fucking Job Simulator 😂

#

Love being a software developer 👍

sterile token
#

DONT TOUCH APIS WITHOUT LEARNING THE BASICS FROM A LANG

#

Sorry i have capa on

trim surge
#

Please Press the Caps lock button on your keyboard

sterile token
#

Yeah my bad

#

I dont why people code without learning the basics from the lang

#

Its really annoying to answer or help

hardy swan
#

I think people kind of misunderstand the purpose of this channel at times

sterile token
#

Agree with you rabbit

#

Because if you ask for help is for specific things not because you didnt learn the bases in your own

#

😂

#

Not bulling noe one but its really annoyed and make angry when people want helps and they dont know the bases

tardy delta
#

🐰

split yoke
#

Like, i'm sorry but it's what I think

sterile token
#

Oh lmao now because someone said the truth its the bad boy.. What amazing society we have created

hardy swan
#

We are pretty mean, but it is indeed difficult to help someone without already some foundation

#

we give suggestions in a grander scheme of things

split yoke
tardy delta
#

lol didnt we do enough ?learnjava

split yoke
#

I don't want to be mean to anyone and I don't blame anyone but it would have been easier

hardy swan
#

I think struggle is what everyone went through, and it is pretty important skill to source for official documentation online.

sterile token
#

Also we never had the intention of shitting you or make you feel small. We were just trying to help

split yoke
#

Maybe one day I will have enough knowledge to create a real working plugin, and help people maybe. This will take months or years but please I don't want you guys to react like this

sterile token
#

Why? I cannot find the reason

split yoke
#

I'm not telling you guys are bad boys and shit, but try to be "kind" if I could say

sterile token
#

When I first started here React like that but all here are experience and like to help but in a point. Like you meanly know

#

Time will make you see that mostly all here are like that

#

Not much helps when someone doesnt know the bases from the lang. So we just tell them to learn java

split yoke
#

I mean surely i'm not the only who struggles to learn Java. But spigot never warns you about the fact that "if you don't know java then don't ask for help and go learn here..." and stuff

sterile token
#

I think its something more obviously

split yoke
sterile token
#

Oh if you will be in thst way I dont know what you will do

hardy swan
split yoke
#

Because people join with the "Oh I want to create a plugin, let's ask for help" but now that I know all this, it's obvious that if you don't know java, then go learn

sterile token
sterile token
#

😂

split yoke
#

I agree with you on this point

sterile token
#

Lmao i have things to do see you soon

split yoke
#

But when i joined, no one said go learn

#

well after a bit yes, but not directly and i kind of wasted time

sterile token
#

Solar dont worry bro do your things because this wont end

split yoke
#

Again, not blaming anyone here

split yoke
sterile token
#

Nice bro so dont lost your time and with that info and if need more look for it

#

There plesnty Information for learning if need more ask it

split yoke
sterile token
#

Rabbit what much you writing?

#

😂

hardy swan
#

not much

sterile token
#

I have seen you tyling for more than 10m

split yoke
#

He's writing the whole bible my man

sterile token
#

Yeah I can imagine

#

Either that nor an aunt

hardy swan
#

I was typing while recalling on how I learned java

sterile token
#

Oh that why

hardy swan
#

but I realised I was spoonfed

#

in college

split yoke
#

🤣

sterile token
#

I think the best way for actually learning is reading about the lang in general, itsfeatures, etc, etc and while doing that putting in practice the new things learned

tardy delta
#

🤓

hardy swan
#

it is just difficult to pick up your first language

sterile token
#

And then yes start reading about the spigot apis

split yoke
sterile token
#

O have a good url which talks about

#

O will look for it

split yoke
sterile token
#

There you can read about many lsngs

hardy swan
#

some find python easy, I find it hard. gg bro

sterile token
#

For my python is really tras because i dont like non highly typed lsngs

split yoke
#

here in France we start to learn Python in high school

#

soo, it's "easy" for us

#

depends on people

hardy swan
#

I just find it hard to accept python's syntax

split yoke
#

Yeah

sterile token
#

Really strange we here on 2 st of High school we start with Html and css. 3 st year javascript.

split yoke
#

Well we do Python, HTML and CSS

hardy swan
#

training you to be Web FE only

sterile token
#

Fe?

hardy swan
#

frontend

split yoke
#

I think we'll do Javascript after

sterile token
#

Javascript is sweetier than java

split yoke
#

gotta leave you guys, was great to talk with you a bit. Have a great day 😄

sterile token
#

Because of async things in java you have more work around to do a just simple await of something

#

😂

#

Allr cya

hardy swan
#
const res = await fetch();
#

EZ

sterile token
#

Now you can do better:

const bla = await require('something');
#

😂

hardy swan
#

no, I'm all for ES6

#

only import

sterile token
#

Oh so ugly

hardy swan
#

eslint will whack me

#

React.lazy

sterile token
#

I dont like it because you cannot require a json file and get each param directly as a Objects values

hardy swan
#

right

sterile token
#

But the import looks better

#

But idk I dont care

#

I would use require

#

Also ts looks really sweeaty but didnt start with it

hardy swan
#

ts is a sexy mf

sterile token
#

Would be really simply having learned Java

#

ts is more like java generics

hardy swan
#

js is like spigot, after you use papermc you don't simply go back and use spigotmc

sterile token
#

Paper < spigot

#

PaperSpigot its better

peak depot
#

bro then it would be Paper>Spigot

fringe hemlock
#

?dmca

undone axleBOT
sterile token
#

I dont like it

#

I prefer spigot over paper

sterile token
fringe hemlock
#

Just looking at it

#

Someone asked why they couldn’t just download spigot

#

So I was getting them the link

sterile token
#

Oh ok

#

My bad bro

peak depot
sterile token
#

lol

#

isnt paperspigot = spigot+ paper?

#

Like a new one?

chrome beacon
chrome beacon
sterile token
#

hhaa that i was wanting to hearing olivo!

rotund ravine
eternal night
#

wtf is spigot + paper 😂

sterile token
#

😂

eternal night
#

paper is already a fork of spigot xD

rotund ravine
eternal night
#

paperspigot was an old old name for the project

#

like 1.8 old

sterile token
eternal night
#

?1.8

undone axleBOT
sterile token
#

You make me feel old

eternal night
#

close to 7 years xD

rotund ravine
#

Only ^

sterile token
#

why armor stands are so annoying on spigot

#

I have heard that paper one are not that annoying

#

😡

eternal night
#

how are armorstands different xD

#

like to move ?

sterile token
#

yeah

#

and not talking about NMS

#

spigot and its amazing NMS packages name and classes!

#

🤡

eternal night
#

I don't think paper has any additions in terms of moving armor stands yet o.O

#

API wise at least

marble copper
twilit fern
#

hey guys i've been going around the internet like EVERYWHERE but i cant find how to spawn/set blocks under a player, could anyone tell me the code so i can learn from it?

tardy delta
#

install driver

lost matrix
twilit fern
#

wow

#

thats complicated

rotund ravine
#

And find and answer in 5 seconds

#

What do i get

twilit fern
#

idk

#

i thought u were gonna hit me virtually or smth lol

rotund ravine
twilit fern
#

i know

tardy delta
#

its literally for () { for() { for() { block.getRelative(x, y, z).setType() } } }

twilit fern
#

but im stupid enough to not understand anything

#

im a newbie at the syntax

marble copper
lost matrix
twilit fern
#

ouch

lost matrix
twilit fern
#

oh well

marble copper
twilit fern
#

seems like im litterally doomed

waxen plinth
#

Why

twilit fern
#

weeeeeeeeeeeeee

waxen plinth
#

You just shouldn't be going straight into spigot before understanding the fundamentals of java

twilit fern
#

ok

#

well imma go destroy my eyes for the next 2 months

marble copper
twilit fern
#

and add some banging my head to the wall

quaint mantle
#

how would i display the amount of time left on a timer?

#

for boosters

lost matrix
# marble copper wdym

In newer versions you dont need to initialize the jdbc driver by touching the class.
This should be enough

final String username="YOUR DB USERNAME"; // Enter in your db username
final String password="YOUR DB PASSWORD"; // Enter your password for the db
final String url = "jdbc:mysql://db4free.net:3306/DataBaseName"; // Enter URL with db name
connection = DriverManager.getConnection(url, username, password);

But pls use a connection pool like HikariCP instead.

lost matrix
quaint mantle
#

never dealt with timers before

lost matrix
#

You save a timestamp and check how far it is in the past

waxen plinth
quaint mantle
#

okay thanks

waxen plinth
#

😭

marble copper
#

in config of that plugin

sterile token
#

Deleting local repo cache from git will clean all cache or only branch cahe?

quaint mantle
#

ohhh, i see now

lost matrix
quaint mantle
#

System.currentTimeMills() just use that

twilit fern
waxen plinth
#

I'm just saying, it's not unique to you and you don't have to exaggerate it

#

There's tons of online resources

twilit fern
#

ik

waxen plinth
#

2 months isn't a lot of time to pick up a new skill, and you could feasibly learn it much faster

sterile token
marble copper
waxen plinth
#

Books are a good resource

#

As much as it's a drag to read them

lost matrix
lost matrix
#

I would learn it online to be honest.

sterile token
waxen plinth
#

I would do a bit of both

sterile token
#

Most of paper books are non updated

waxen plinth
#

You tend to see a lot of bodged code online, especially in coding tutorials

quaint mantle
#

also is there a better way of doing chances? Because im using a random that is between 0 and 100

lost matrix
waxen plinth
#

Books tend to teach you good practice a bit more

lost matrix
waxen plinth
#

If you want a 33% chance

#

Math.random() < 0.33

quaint mantle
waxen plinth
#

Pretty easy

sterile token
#

Will delete all repo cache or only current branch cache?

#

😬

quaint mantle
#

now another question 💀. How would i display the timestamp as like 5 minutes and 2 seconds or 5m 2s.

lost matrix
sterile token
#

You can convert the timestamp into a date object using a specific format something like MM:hh:ss

#

Is it like that? - smile

lost matrix
sterile token
lost matrix
quaint mantle
#

and i do want the duration of it

#

since im doing Date date = new Date(System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(5));

lost matrix
sterile token
lost matrix
# quaint mantle okay 👍

Because then you can get the Duration like that

Duration left = Duration.between(Instant.now(), future);
quaint mantle
#

okay i c

#

thanks so much

lost matrix
# quaint mantle ooo

This would be a trivial approach to the formatting

    Duration left = Duration.between(Instant.now(), future);
    long seconds = left.getSeconds();
    long hh = seconds / 3600;
    long mm = (seconds % 3600) / 60;
    long ss = seconds % 60;
    String formatted = String.format("%02d:%02d:%02d", hh, mm, ss);
#

hh:mm:ss

sterile token
lost matrix
#

But you can just do

"%02d hours %02d minutes %02d seconds"

And leave some away if they are 0

lost matrix
sterile token
#

What?

lost matrix
#

%02d is completely different from %s

#

Same goes for %.3f

#

It does something completely different

sterile token
#

okay never heard about that formats

hardy swan
#

these are things you google

#

after years of programming experience, "how to format double to string 2 decimal places"

lost matrix
#

Well after doing an exam in C where we had to know this stuff without looking it up it kind of stuck. But before that: duckduckgo

quaint mantle
#
if(item == null) {continue;}
                    if(item.getItemMeta() == null) {continue;}
                    if(item.getItemMeta().getDisplayName() == null) {continue;}
                    ItemMeta meta = item.getItemMeta();
                    String ItemName = item.getItemMeta().getDisplayName();
                    if (ItemName.equals(ChatColor.RED + "Dctr's Space Helmet")) {
                        Random r = new Random();
                        int color = r.nextInt(colors.length);
                        Material material = colors.get[color];
                        item.setType(material);
                        item.setItemMeta(meta);
                    }
                }
            }
        }.runTaskTimer(this, 20, 20);
    }
}```
Cannot resolve symbol 'get'
how do I fix dis error?
lost matrix
quaint mantle
#

oh mb

#
new BukkitRunnable() {
            @Override
            public void run() {
                for (Player player : Bukkit.getOnlinePlayers()) {

                    ItemStack item = player.getInventory().getHelmet();

                    if(item == null) {continue;}
                    if(item.getItemMeta() == null) {continue;}
                    if(item.getItemMeta().getDisplayName() == null) {continue;}
                    ItemMeta meta = item.getItemMeta();
                    String ItemName = item.getItemMeta().getDisplayName();
                    if (ItemName.equals(ChatColor.RED + "Dctr's Space Helmet")) {
                        Random r = new Random();
                        int color = r.nextInt(colors.length);
                        Material material = colors.get[color];
                        item.setType(material);
                        item.setItemMeta(meta);
                    }
                }
            }
        }.runTaskTimer(this, 20, 20);
    }
}```
#

how about now?

sterile token
#

Format a bit more

#

Its really annoying to read it

hardy swan
#

is looks different

#

even code looks different after formatting

quaint mantle
#

public class SpaceHelm extends JavaPlugin {

    @Override
    public void onEnable() {

        getCommand("spacehelm").setExecutor(new SpaceHelmetCmd());
        getServer().getPluginManager().registerEvents(new SpaceHelmetListener(), this);

        byte[] colors = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
        ItemStack item = new ItemStack(Material.STAINED_GLASS, 1, (byte) 0);
        ItemStack item1 = new ItemStack(Material.STAINED_GLASS, 1, (byte) 1);
        ItemStack item2 = new ItemStack(Material.STAINED_GLASS, 1, (byte) 2);
        ItemStack item3 = new ItemStack(Material.STAINED_GLASS, 1, (byte) 3);
        ItemStack item4 = new ItemStack(Material.STAINED_GLASS, 1, (byte) 4);
        ItemStack item5 = new ItemStack(Material.STAINED_GLASS, 1, (byte) 5);
        ItemStack item6 = new ItemStack(Material.STAINED_GLASS, 1, (byte) 6);


        new BukkitRunnable() {
            @Override
            public void run() {
                for (Player player : Bukkit.getOnlinePlayers()) {

                    ItemStack item = player.getInventory().getHelmet();

                    if(item == null) {continue;}
                    if(item.getItemMeta() == null) {continue;}
                    if(item.getItemMeta().getDisplayName() == null) {continue;}
                    ItemMeta meta = item.getItemMeta();
                    String ItemName = item.getItemMeta().getDisplayName();
                    if (ItemName.equals(ChatColor.RED + "Dctr's Space Helmet")) {
                        Random r = new Random();
                        int color = r.nextInt(colors.length);
                        Material material = colors.get[color];
                        item.setType(material);
                        item.setItemMeta(meta);
                    }
                }
            }
        }.runTaskTimer(this, 20, 20);
    }
}```
#

omg now??

lost matrix
#

No comment on the formatting... You are accessing an array by using get. Thats not a thing. You simply do array[index]

quaint mantle
#

but when I try that

#

Incompatible types. Found: 'byte', required: 'org.bukkit.Material'

lost matrix
quaint mantle
#

hm

#

what I do?

lost matrix
#

Do you want to color a leather helmet?

quaint mantle
#

no

#

its a glass

#

stained glass as a helm

lost matrix
#

Which spigot version?

quaint mantle
#

dont ask whihc

#

pls

hardy swan
#

it is important for the answer is different for different versions

lost matrix
#

I cant help you then. The old api for colors is absolute garbage. Go search in old forum posts then.

quaint mantle
#

mans going to bully me

sterile token
quaint mantle
sterile token
#

Okay

#

I let you know that for that panel glass with colors you need an id that its type byte

dim palm
sterile token
dim palm
#

is depending to the version

sterile token
dim palm
#

o

sterile token
#

Because data byte is not used anymore since 1.13 i think

quaint mantle
sterile token
#

I understand what ahppening

#

You are trying to get Material object for stained glass panel only telling the data ID

#

that is not how it works

unborn kiln
#

How would I go about moving the enchantment lore down to where shown in this picture?

#

This is for 1.19 btw

lost matrix
unborn kiln
#

Is there a way to do it automatically when I use "/enchant"?

quaint mantle
sterile token
#

Smile i understand what he is doing wrong, he is trying to get a material object by a data id

lost matrix
sterile token
#

oh that why

#

I forgot you dont help on legacy versions

#

😂

lost matrix
sterile token
#

Isnt a TabComplete event?

unborn kiln
#

I tried this:

#

But it does nothing

proven ocean
#

I found a solution using NBT:

// horn types
        List<String> hornTypes = new ArrayList<>(Arrays.asList("ponder_goat_horn", "sing_goat_horn", "seek_goat_horn",
                "feel_goat_horn", "admire_goat_horn", "call_goat_horn", "yearn_goat_horn", "dream_goat_horn"));

        // item to nms
        net.minecraft.world.item.ItemStack nmsItemStack = CraftItemStack.asNMSCopy(itemStack);

        // create base tag
        NBTTagCompound tag = nmsItemStack.v();

        // set instrument for tag
        tag.a("instrument", "minecraft:" + hornTypes.get(new Random().nextInt(hornTypes.size())));
        System.out.println(tag);

        // add base tag to item
        nmsItemStack.b(tag);

        // update vars
        itemStack = CraftItemStack.asBukkitCopy(nmsItemStack);

This will give me a random goat_horn (Version 1.19)

quaint mantle
#

im not fully sure what they are and how to use them

eternal oxide
#

google java String.format

worldly ingot
naive bolt
#

what does cannot access com.sk89q.worldguard.WorldGuard mean when compiling

quiet ice
#

Do you compile with JPMS (java plattform module system)?

#

Also, are there other (possibly related) messages?

sterile token
#

i will look for it

reef lagoon
#
            while(event.getPlayer().isSneaking()) {
                BukkitScheduler scheduler = Bukkit.getScheduler();
                scheduler.runTaskTimer(getPlugin(), () -> Bukkit.broadcastMessage("Mooooo!"), 20L * 10L, 20L * 5L );
            }```
This crashes my server.
How do I add delay correctly so it won't?
fiery prairie
quiet ice
#

And most importantly, change the while loop into an if-condition

reef lagoon
#

oh ok

sterile token
#

Wihy, while loop is used when you want to execute code all the time until the condition is false

torn badge
#

Need to do it the other way round

carmine hatch
#

bruh am I missing something or does CreeperPowerEvent actually not work

#

public class CreeperChargeListener implements Listener {

public void onCreeperCharge(CreeperPowerEvent event){
    event.setCancelled(true);

}

}

this does not cancel the event

torn badge
carmine hatch
#

10/10 times the creeper still gets powered

#

the listener is registered

#

I event tried to just output a "creeper charged" message to console and that won't work either

torn badge
#

How are you testing it?

carmine hatch
#

hitting them with lightning

torn badge
#

You are missing EventHandler

carmine hatch
#

LOL

#

thanks 😄

torn badge
#

np

carmine hatch
#

yeah that checks out, 5 minutes of frustratingly jumping between old listeners and this one and I still failed to notice the gaping hole where EventHandler should have been

torn badge
fiery prairie
#

nope, chat cooldown doesnt work, antibadword doesnt work

#

let me try antylink

hasty prawn
#

EventPriority does work, I think you might just have a misunderstanding of the order.

#

Lowest fires first

#

Highest fires last

fiery prairie
#

yea he told me that and i tried that

#

but imma reinstall the plugin because it didnt even create a config though it is inside /plugins/

#

ok now they work

#

but lets see if they are "compatible" with chat formatting cause they werent earlier

#

nope, for example when im on chat cooldown, then my chat formatting method still gets fired

reef lagoon
#

🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡

quiet ice
#

Makes sensor however

#

So, skill issue

reef lagoon
#

nerdass

fiery prairie
#

so umm is there a way to fix my problem?

fiery prairie
chrome beacon
#

Did you just share a screenshot of you breaking tos

#

How nice

reef lagoon
#

t w i c e

fiery prairie
#

so ur using it too

reef lagoon
#

clearly not

worldly ingot
#

Bukkit's fine. You shouldn't be calling synchronous events asynchronously. You're going to end up breaking something

fiery prairie
reef lagoon
#

let me teleport the fucking player

worldly ingot
#

You can teleport the player

#

Synchronously

#

Send relevant code

#

You're probably doing something async that doesn't even need to be async

reef lagoon
#

I am doing something async

visual tide
#

if you call an event async then its gonna be handled async which ends up fricking other plugins over

reef lagoon
#
new Thread(() -> {
            String name = event.getPlayer().getInventory().getBoots().getItemMeta().getDisplayName();
            if(name.contains("Jetpack")) {
                while(event.getPlayer().isSneaking()) {
                    Location location = event.getPlayer().getLocation().add(0, 0.2, 0);
                    event.getPlayer().teleport(location);


                    try {
                        Thread.sleep(10);
                    } catch (InterruptedException e) {
                        throw new RuntimeException(e);
                    }
                    if(!event.getPlayer().isSneaking()) {
                        stop();
                    }
                }
            }
        }).start();``` trying to do a delay in a while loop so my server doesn't kill itself
worldly ingot
#

Yeah, that's certainly not the way to do it

reef lagoon
#

ive tried a lot of different stuff

#

and this is the only thing that works

chrome beacon
#

So you write bad code and blame things on Spigot

reef lagoon
#

I said bukkit but sure

visual tide
#

dont
use
item
names
to check if its some sort of special item

worldly ingot
#

(1) That doesn't really need to be async
(2) Bukkit has a scheduler so you don't need to be using Java's Threads to be doing this

hasty prawn
chrome beacon
hot wolf
#

Hey I can't seem to find the problem, but I've got an economy plugin, in which I call my BalanceChangeEvent as soon as the balance of the player changes. I added that plugin as a dependency in my essentials plugin.
In my essentials plugin the scoreboard of a player is supposed to change as soon as that event is fired. For some reason in the essentials plugin, the event doesn't fire.

One of the commands, which fire the event: https://sourceb.in/r3lZUsiZYq
Event in essentials plugin: https://sourceb.in/WVmoJN8bUh

I did:
Add the economy plugin as a dependency with maven (both built with maven)

   <dependency>
            <groupId>me.probablydiary</groupId>
            <artifactId>caveeconomy</artifactId>
            <version>1.0-SNAPSHOT</version>
            <scope>provided</scope>
   </dependency>

And I registered the event, like all other events

visual tide
worldly ingot
chrome beacon
#

Yeah

visual tide
#

?scheduler

#

?scheduling

undone axleBOT
reef lagoon
#

ing

#

yes i've already seen it and tried it

hot wolf
#

players could rename items

visual tide
#

just dont, its bad practise and more often than not will bite you in the bum
cuz players can often rename items

hot wolf
#

persistent data containers are usually a good way too

visual tide
#

^

#

use pdc

#

i'm just saying it's bad practice and will cause problems more often than not

hot wolf
#

^^^^

visual tide
#

same thing with checking inventory names

reef lagoon
#

that's really not the issue and I'm checking for the name on purpose

worldly ingot
reef lagoon
#

so u can rename to get the item

worldly ingot
#

That's all you need, Wihy

#

Run that onEnable()

#

You need only one repeating task

reef lagoon
#

Isn't that laggy tho

visual tide
worldly ingot
#

No

visual tide
#

in what way

worldly ingot
#

Understand that Minecraft is doing a hell of a lot more than what you're doing in that task

#

It has to process entity AI for every single loaded entity every single tick

#

You're checking an item in a player's inventory and teleporting them every tick

reef lagoon
#

still sounds hella inefficient but I'll try ig

worldly ingot
#

Don't pre-optimize if you don't have to. Not to mention that async != faster

#

The way I wrote the player loop as well is significant. It doesn't even check their inventory if they're not sneaking

#

and again. To clarify. What I sent you is to be put in onEnable(), only created once. Not in whatever event you have your code currently

visual tide
#

for example if you have a stick blow something up/execute some command (e.g. in a badly written powertool plugin) every time you click with an item called something specific you can cause as many or more problems

reef lagoon
hot wolf
worldly ingot
#

You certainly could, yes. If you wanted to pre-cache the jetpack check

#

That way you're only checking once when they start sneaking

hot wolf
#

Lets just agree that in comp sci it always depends on the situation

visual tide
#

i'm saying in general both are bad (always depends on the situation)

hot wolf
#

well, almost

chrome beacon
hot wolf
#

I can, but I don't think that'll help me with my not working event

#

oh

#

sorry

#

i thought about pc threads xD

worldly ingot
#

Discord thread 😅

hot wolf
#

not discord ones, my bad

#

😂

#

the economy plugin works

#

i tested it

chrome beacon
#

It sounds like you forgot to register the listener ngl

hot wolf
#

getServer().getPluginManager().registerEvents(new BalanceChange(),this);

#

yep

chrome beacon
#

Could you show your event class

hot wolf
#

it has, because if it failed, it would cancel the whole thing, which wasn't the case

#

the event class

#

in which plugin?

#

You mean if it throws an error? Because if so, I can assure I that it doesn't, because when I use the command in game, it tells that it was successful, which only happens when it gets past the event call

#

Sorry, I'll be back in a min. I've got to feed my tortoise

#

back again, sry

hot wolf
#

Left on read 😃

cunning sentinel
#

I am having an issue. I bought a plugin on spigot but the plugin does not work for me I asked for support from the dev but he only gives support on the spigot, which I do not like. He removed me from talking to him and did not refund me, which he said he is happy to do.

chrome beacon
#

Why not get support where they want it

delicate lynx
#

I mean if he removed you from whatever website, you must of done something to annoy him

hot wolf
charred blaze
#

if i set string to null in config will it disappear?

tardy delta
#

yes

#

and then save it

#

setting anything to null in config will remove it

left isle
#

Hi, Does anyone know how to stop a player from buying a certain item from a villager?

cunning sentinel
grim ice
#

hm

hot wolf
#

Hex, sorry for interrupting the convo, but I have a short question. When I use an event from plugin A in plugin B and I only have to register it as a Listener and add a dependency, why tf doesn't it work 🥲

tardy delta
#

do you depend or soft depend on it?

#

config.yml stuff, google it

hot wolf
#

pom.xml maven dependency

tardy delta
#

so it loads whenever the other plugin is loaded

hot wolf
#

and depend in plugin

#

yes

tardy delta
#

ah

hot wolf
#

the other plugin is fully functional too

tardy delta
#

registered it?

hot wolf
#

yep in plugin B

tardy delta
#

and youre actually firing the event?

compact haven
#

do u have the annotation

hot wolf
#

yes, calling it

hot wolf
compact haven
#

the event handler annotation

tardy delta
#

@EventHandler

drowsy harness
#
        case WEST, EAST -> {
            return Math.abs(location.getZ()) - Math.abs(location.getBlockZ()) >= 0.500 ? MapAxis.SOUTH : MapAxis.NORTH;
        }
        case NORTH, SOUTH -> {
            return Math.abs(location.getX()) - Math.abs(location.getBlockX()) >= 0.500 ? MapAxis.EAST : MapAxis.WEST;
         }
        }```
I have this switch statement, which gives no errors in my IDE. However, when compiling the plugin, using maven, I get these four errors:
Anybody know why?
hot wolf
#

ofc

compact haven
#

you say ofc but you would not believe how many times I’ve forgotten it

vale ember
#

yield instead of return ?
edit: and return before switch

compact haven
#

U sure the method isn’t being called?

hot wolf
tardy delta
#

do return switch instead

drowsy harness
tardy delta
#

old java version then

drowsy harness
#

wauitv

#

nvmm

hot wolf
drowsy harness
#

im stupid

compact haven
#

Yes

hot wolf
#

that was an unfortunate moment to say yes

#

xD

compact haven
#

kekw, it is you diary

hot wolf
#

which method exactly?

drowsy harness
compact haven
#

The listener

tardy delta
#

fun fact, this is a thing:

if (yes || switch (state) {
  Some_state -> true;
  default -> false;
}) {}```
#

dont see errors lol

drowsy harness
#

problem with maven?

hot wolf
tardy delta
#

try compile?

drowsy harness
compact haven
#

what is the plug-in and event you’re listening to

drowsy harness
compact haven
#

because that shit ain’t firing

delicate lynx
#

<java.version>1.8</java.version>

#

isn't that fancy switch statement in later versions of java?

hot wolf
# compact haven what is the plug-in and event you’re listening to

Plugin is another plugin of mine. An economy plugin, this is the event in that plugin: https://srcb.in/TxfWciMBaV
And this is the same plugin (one of the many commands where I fire the event from https://sourceb.in/r3lZUsiZYq)
And thats plugin B, where I listen for the event: https://sourceb.in/WVmoJN8bUh

#

And I think the dependency is correct as well, because everything else works

delicate lynx
#

yeah your pom is using java 8, but your IDE is using a higher java version, you need to change your pom to match it since those switch statements are in java 14+ (from what I can tell)

drowsy harness
#

yup

#

solved it

#

im just stupid haha

compact haven
hot wolf
#

not some other Event

compact haven
#

and we're sure that no other listener is cancelling it right?

#

correct

#

org.bukkit....Event

hot wolf
hot wolf
#

I'll double check again

compact haven
#

also for better API I'd recommend allowing a UUID or OfflinePlayer in the event instead of a Player object and providing both the old and new balance

#

because doing a database call every time a listener wants to get the old balance, for what?

#

no need

hot wolf
compact haven
#

would you send me both jars of those plugins

#

because there has to be something going on

#

unless the event is cancelled

hot wolf
#

sure

#

sec

tardy delta
#

PlayerEvent has a Player field isnt it?

compact haven
#

indeed it does

#

though extending that isnt as important as Cancellable

cunning sentinel
#

how to make a ticket?

quaint mantle
#

?support

undone axleBOT
compact haven
#

woah is that an email address

#

never seen one before

tardy delta
quaint mantle
#

how would i loop all blocks in a spherical shape? i got this but its a square shape instead

#
if (random < 0.01) {
                Location loc = e.getBlock().getLocation();
                World world = e.getBlock().getWorld();
                int minX = loc.getBlockX() - 5;
                int minY = loc.getBlockY() - 5;
                int minZ = loc.getBlockZ() - 5;
                int maxX = loc.getBlockX() + 5;
                int maxY = loc.getBlockY() + 5;
                int maxZ = loc.getBlockZ() + 5;

                for (int x = minX; x <= maxX; x++) {
                    for (int y = minY; y <= maxY; y++) {
                        for (int z = minZ; z <= maxZ; z++) {
                            world.getBlockAt(x, y, z).setType(Material.AIR);
                        }
                    }
                }
            }```
vocal cloud
pseudo cradle
#

some simple math

quaint mantle
#

Mr Clean

drowsy helm
#

but that may be a bit taxing there might be a better way

quaint mantle
#

this should work

#
                int cx = loc.getBlockX();
                int cy = loc.getBlockY();
                int cz = loc.getBlockZ();
                int r = 10;
                for (int x = cx - r; x <= cx + r; x++) {
                    for (int z = cz - r; z <= cz + r; z++) {
                        for (int y = cy - r; y < cy + r; y++) {
                            double dist = (cx - x) * (cx - x) + (cz - z) * (cz - z) + (cy - y) * (cy - y);
                            if (dist < r * r && !(dist < (r - 1) * (r - 1))) {
                                world.getBlockAt(x, y, z).setType(Material.AIR);
                            }
                        }
                    }
                }```
drowsy helm
#

oh didnt even think about just squaring the radius

ocean lion
#

Any good Coins plugin for 1.19?

vocal cloud
#

Name your variables or I'll fail your code

quaint mantle
#

is there a way to optimize this more? i mean its only taking 500ms but still.

#
                int cx = loc.getBlockX();
                int cy = loc.getBlockY();
                int cz = loc.getBlockZ();
                int r = 20;
                Double amount = 0.0;
                for (int x = cx - r; x <= cx + r; x++) {
                    for (int z = cz - r; z <= cz + r; z++) {
                        for (int y = cy - r; y < cy + r; y++) {
                            double dist = (cx - x) * (cx - x) + (cz - z) * (cz - z) + (cy - y) * (cy - y);
                            if (dist < r * r) {
                                if (EmbarkkCore.getBlocklist().containsKey(world.getBlockAt(x, y, z).getType())) {
                                    Location location = new Location(world, x, y, z);
                                    location.getBlock().setType(Material.AIR);
                                    amount += money;
                                    Random random1 = new Random();
                                    if (random1.nextDouble(1) < 0.01) {
                                        location.getWorld().spawnParticle(Particle.EXPLOSION_LARGE, location, 1);
                                    }
                                }
                            }
                        }
                    }
                }```
#

there has to be a better way of doing this

drowsy helm
#

md doesnt like it but there are some methods to set blocks much faster. Cant find the post but i saw some method which could do ~16m blocks per second

drowsy helm
#

amount could probably be calculated with a circle formula

ivory sleet
#

they're not cheap to create

#

also use primitive double over boxed Double

drowsy helm
#

yeah random is probs your biggest thing

quaint mantle
#

lmao

ivory sleet
#

you're creating an object

drowsy helm
#

Double takes a lot more data

ivory sleet
#

^

quaint mantle
#

okay

ivory sleet
#

int, double, long etc are not objects

drowsy helm
#

idk exactly but its probs something like 3 extra bytes

ivory sleet
#

(and they were added in java due to cheapness)

quaint mantle
ivory sleet
#

since whenever you do an operation java will convert your Double to a normal double again and then back and forth so on

drowsy helm
#

yeah primitives, however they dfont have any functions

ivory sleet
#

which also implies an unnecessary amount of method calls

sage patio
ivory sleet
#

I hoped people wouldve forgotten

#

🙃

drowsy helm
#

spigot doesnt forget

ivory sleet
#

🥲

last swift
#

How can I check if the block a player mined is a certain color? Ex. STAINED_CLAY vs STAINED_CLAY that’s red.

last swift
#

Sorry in 1.8

drowsy helm
quaint mantle
last swift
#

Or most compatible

drowsy helm
#

thats what they all say lol

#

block.getData i believe

#

returns the byte

quaint mantle
#

also i feel dumb but what's the difference between tps and tick duration. I've known this for awhile but i forgot :/

delicate lynx
#

1.8 :(

last swift
quaint mantle
#

^

drowsy helm
#

tps is how many ticks in 1s

#

each is a rough indicator of the other

quaint mantle
#

and the time for the operation to complete:

sterile token
#

Isnt that much

quaint mantle
#

less

#

but im just worried about the tick duration

sterile token
#

what the problem i dont understand

sterile token
#

still not understand

#

🤔

quaint mantle
#

well when the enchant happens i check the tps / tick duration after and it shoots up from 15

#

and i wanna know if i can fix this or not because that's only with 1 player online

sterile token
#

Oh i catch it, the way you are filling block is slower that why you have tps issue

quaint mantle
#

would that be better?

sterile token
#

I dont know your case

#

Start from begin what is that? And what is doing/will do?

quaint mantle
#

okay so, im setting blocks to air. And the tick duration is jumping from 15 to like 500-1250. And thats with 1 player on. I was wondering if there was a way for me to optimize this said code.

sterile token
#

Isnt better to use world edit api or fawe api?

quaint mantle
sterile token
#

Have you tried it?

quaint mantle
#

no, not yet

#

should've the first time tbh

sterile token
#

I would try it using FAWE api because world edit sometimes can crash the server

quaint mantle
#

ye

#

i never knew you could do countBlocks() in the api

#

but I'll try that

#

thanks

sterile token
#

Also i someone here sent a realy good way for blocks

#

Let me find the link

#

Also take a look at this url

dusk flicker
#

Not sure if thats what you are referring to VERANO

sterile token
#

Ok that