#help-archived

1 messages Β· Page 51 of 1

frigid ember
#

then your classes

#

?paste

worldly heathBOT
flint palm
#

i need to import the classes?

#

how do i do that?

frigid ember
flint palm
#

mmm

bronze marten
#

Oof

frigid ember
#

You're using eclipse, you can type it out and then hover over and import, no need to write out the imports yourself

keen compass
#

my IDE does it for me without typing πŸ˜„

#

I just tell it to fix the imports lol

frigid ember
#

Haven't made a plugin since like 2018 so it's a fat rip

subtle blade
#

Ctrl + Shift + O

frigid ember
#

Oh shit I completely forgot about that

#

rip me

flint palm
#

im not understanding it

#

in onEnabled i hook the events, so that the server knows what events that plugin will use or something like that

frigid ember
#

Yep

flint palm
#

then i have to include the class files in main, right? or do i have to import just the functions? i dont get it

frigid ember
#
Bukkit.getPluginManager().registerEvents(new PlayerLogin(), this);
#

PlayerLogin() is the class

dusty topaz
#

OVERRIDE EVERYTHING
yup make interfaces for every method you implement

#

heh

frigid ember
#

that class looks like this ^^ which listens for players logging in

flint palm
#

ahh, i have to import the class

#

got it

frigid ember
#

All I'm doing in my Main class is saying to the server "Hey! This class is listening for events!"

flint palm
#

i got it now, i thought i had to hook specific events and that PlayerLogin was an event

frigid ember
#

Commands are registered via the following:

this.getCommand("balance").setExecutor(new balance());
#

which also needs to go in the onEnable

#

this.getCommand("balance") <-- tells the server what you would like the command to be, in this example, /balance

setExecutor(new balance()); <-- points to the class that handles this command.

flint palm
#

great

#

how do i know if the player that executes the command is op?

frigid ember
#

Anyone have any experience with controlling entitites using WASD? Please DM me, I'm going crazy lol. MC version 1.15.2

#

That's dealt with in the onCommand

#

I can write up an example one if you want?

#

Won't take long

flint palm
#

yes, in onCommand and all that

#

if you want it would be great

frigid ember
#

On it now πŸ™‚

minor spruce
#

before i get too deep into it, is it possible to set final fields using reflection?

granite cedar
#

what do you mean by fields

fluid egret
#

@minor spruce It was possible but I think they removed that option in the latest java version

#

You could access a modifiers field and remove the final modifier from the list

minor spruce
#

ok thanks

#

i think i'll just experiment with it, just didn't want to get too invested if it wasn't possible at all lol

frigid ember
dusty topaz
#

that indentation

#

and capitalization

frigid ember
#

πŸ˜‰

dusty topaz
#

this is java not C#

#
        //Check if our boolean is currently true or false and toggle is respectively.
        if(Enabled == false) {
            
            Enabled = true;
            
        }else {
            
            Enabled = false;
            
            
        }
#

change that to

#

Enabled = !Enabled;

frigid ember
#

true

dusty topaz
#

or false

#

depending on if Enabled was true

#

:p

frigid ember
#

Didn't think of that actually

#

it's been a while lmao

#

When it comes to using it prior to removing the item, you simply have to

         if(EnableDisable.Enabled) {
            
            //Remove item here
            
        }
        
hearty trellis
#

so im trying to make my own external library to use in my plugins, but when i mention the main library class in plugin code, the server throws a NoClassDefFoundError

#

at compile time everything is fine though

#

is anyone here familiar with this issue?

frigid ember
#

Library is being defined as a plugin right

#

?

#

Plugin.yml etc

hearty trellis
#

no it's not

frigid ember
#

Idk, that's how I've always done my private libraries

hearty trellis
#

hmm

#

i figured it probably wouldnt be necessary since it isnt a plugin

frigid ember
#

set it up like a basic plugin, call the methods

#

Not too sure, never done it without though

keen compass
#

if it is a library, it should extend PluginBase

#

instead of JavaPlugin

#

but you could make your library extend JavaPlugin if you want, just have to create it like you do with any other plugin if you do that.

#

or if its just a library for specifically your plugin, shade it in

hearty trellis
#

currently it doesnt extend from anything

#

i tried adding a plugin.yml, that didnt work

dusty topaz
#

@hearty trellis you need to shade it in

hearty trellis
#

how do i do that?

frigid ember
#

Gotta extend javaplugin if you're gonna add a plugin.yml lmao

dusty topaz
#

if you don't want to have to put a library jar on your server

#

just shade in the files

sage flame
#

Theyre asking how to do that

hearty trellis
#

or i guess my real question is: what is "shading in"?

dusty topaz
#

google it

#

plenty of resources

#

not here to hold your hand :p

hearty trellis
#

fair

keen compass
#

?lmgtfy Maven shade plugin

#

oh guess it doesn't work here >>

#

.lmgtfy maven shade plugin

sage flame
#

Just want to make sure that there's no replacement for the deprecated damage modifiers

subtle blade
#

Not really, no. It's just unmaintainable and is subject to removal in the future

#

When? Not sure.

#

You're fine to use it for the time being but don't expect it to stay forever

sage flame
#

Yeah, I'm just making sure because I don't really want to rely on it if I know that it's (probably) going to be removed

keen compass
#

just fyi not everything that is deprecated will get removed

sage flame
#

Also given the reason for the deprecation, I don't think it's a good idea to use :)

keen compass
#

some of it is deprecated due to "magic"

dusty topaz
#

Some things are deprecated but not going anywhere

#

(likely)

sage flame
#

What does that mean lol

dusty topaz
#

Such as getPlayer(string);

#

not likely to go, was just deprecated to encourage use of UUIDs

sage flame
#

The "magic" thing I mean

dusty topaz
#

(regurgitating information shared a couple hours ago :D)

keen compass
#

oh magic numbers

sage flame
#

Wha?

keen compass
#

should google magic numbers

sage flame
#

Oh okay

keen compass
#

and then you will understand better

subtle blade
#

Basically arbitrary hard coded numbers

sage flame
#

Oh I see

#

Yeah just like block ids

subtle blade
#

Though that's not why damage modifiers were deprecated. It was deprecated due to its unmaintainability. If you've ever seen its implementation patch, it's horrendous

#

Correct. Data values and whatnot were considered magic values

keen compass
#

Damage values as well if I am not mistaken?

subtle blade
#

Those coincided with data values

#

It's NBT now though

dusty topaz
#

I was more referring to the comment

Also given the reason for the deprecation, I don't think it's a good idea to use πŸ™‚

#

not always the case :p

sage flame
#

Thanks for all the info :)

marsh hawk
#

Is it possible to check if a player clicked an item with an item already in the cursor. For example if i have a sword in my inventory and i click on it with a slimeball it does something

keen compass
#

well the something usually is a swap of the items

#

should be able to detect that

subtle blade
#

Yep. InventoryClickEvent's getCursor() will get the item on the player's cursor

marsh hawk
#

Easy, thanks

subtle blade
#

(will be null if none)

dusty topaz
#

out of paranoia i always check

#
if (event.getCursor() == null || event.getCursor().getType() == Material.AIR)
frigid ember
#

Same

#

I've never known why I check both, but I always have

dapper coral
#

Anyone know the code or a link for help with a way to verify a spigot user on spigotmc.org with javascript from a discord bot

frigid ember
#

It's xenforo

#

api documentation is public

#

don't know if they allow public use of the API on spigotmc tho

subtle blade
#

We do πŸ™‚

#

Can get identities from it now, including Discord handle

frigid ember
#

Ah, so it's there but will only work if they've linked on this server?

subtle blade
#

No no, that's public API

#

You can put your Discord handle on your SpigotMC profile

frigid ember
#

Ah, fair enough

#

I was thinking of the actual REST api xenforo ships with :p

subtle blade
#

Nah. Spigot's been working on its own

#

Written mostly by simple overseen by md

frigid ember
#

Can someone help me pls
how do I make it so I turn like the whole world into lucky blocks

keen compass
#

o.O

subtle blade
#

Bukkit doesn't support modded servers

keen compass
#

so. how do you see a resources id

#

@subtle blade

#

is it the numbers after the resource name in the url? o.O

#

nvm

#

found my answer XD

fleet crane
#

I was thinking of the actual REST api xenforo ships with :p
@frigid ember xenforo 1 has no api

dapper coral
#

Is there any free way to verify a spigot user, preferably using javascript through a Discord bot?

subtle blade
#

It is, yea. Numbers after the resource name

#

Same for user IDs

#

omg how many times will I edit that before I'm right lol

frigid ember
#

@frigid ember xenforo 1 has no api
@fleet crane
yeah didn't realize you were on XF 1, they didn't add it till 2.1 looking at the documentation

granite cedar
#

yooo

#

my peeps

#

i need someone to make a color enum for me

#

all the minecraft colors with the color codes for each as their parameter

#

like GREEN("&a"), RED("&c") etc

frigid ember
#

Anyone know how i would make it where people spawn in the lobby everytime they join?

#

@frigid ember teleport them there on playerjoin event?

#

Yes

#

I cant seem to find it i in the bungee config

keen compass
#

There already is an Enum for the chat colors @granite cedar

frigid ember
#

Ah bungee

#

Should be force_default_server in the config @frigid ember

#

Set that to true

#

It should then send the players to the server with the highest priority on join

granite cedar
#

@keen compass already coded my own

#

@keen compass

#

any idea to represent a color in a gui

#

i was thinking to use glass panes or concrete but theres no dark red/lightred versions

small gorge
#

Can anyone help our group figure out how to use plugins? weve never done it before and are trying to use shopgui+, mcmmo, and silk spawners. We have essentialsx vault and shopgui+ but we don't know how to use them correctly

marsh hawk
#

@small gorge there shoudl be plenty of tutorials on youtube for each plugin; if not the plugin page usually has an extensive usage guide

small gorge
#

We've been trying to follow them but we don't understand what we are doing

#

The jar file for shopgui+ isn't doing anything @marsh hawk

marsh hawk
#

@small gorge are there any errors in your console when your turn the server on?

small gorge
#

this build is outdated, first message we get

#

we are using the shopgui+ that says it works for 1.15 and the newest version of vault

knotty karma
#

did you use buildTools to get your spigot jar, or did you download it from somewhere?

small gorge
#

from the spigot website

knotty karma
#

spigot does not distribute server jars from their website, they must be built using BuildTools. Where did you get your jar?

#

like what site specifically

small gorge
#

i don't know, he wont let remote in so im having to do this through him

#

its working now though

knotty karma
#

okay. LMK if you need anything else.

small gorge
#

we can't get mcmmo at all if you know how that one works.

#

we just see the commands in the server but never can use them

knotty karma
#

usually it's as simple as dropping the MCMMO jar in the plugins folder. If you can't use the commands, that's prob a permissions issue. Are you using a permissions plugin?

small gorge
#

nope

knotty karma
#

ah. that's why

small gorge
#

and we can't use the commands oped either

knotty karma
#

i'd recommend luckperms.

#

basically download this, and drop it in your plugins folder.

small gorge
#

he just yelled at me and said nevermind on mcmmo, he does want silk spawners though

keen compass
#

@granite cedar could use wool

knotty karma
#

alright, is silkspawners having the same issue, where it is installed but will not work?

small gorge
#

yea

knotty karma
#

if so, then thats most likely a perms issue as well

keen compass
#

@granite cedar or use colored leather armor as it gives you even more colors to play with

knotty karma
#

you're gonna need a permission plugin if you want to use most of the plugins you install

#

you could use permissions.yml, but that is certainly the worst way to go about that

small gorge
#

how do we use luck perms?

keen compass
#

there is documentation for it

frigid ember
#

morning all, how do i fix that verify user issue, i haven't mc original account[using TLauncher ]

#

@frigid ember what verify user issue?

lusty escarp
#

it's 4am for me, I don't know if I have to say "Good Morning" x)

frigid ember
#

3am gang

static pecan
#

@keen compass are there any special settings for " jar arguments " ?

frigid ember
#

am based in Asia sorry 😦

bronze horizon
#

there a way to prevent someone with an armor stand as their passenger from hitting the armorstand?

static pecan
#

@keen compass I already set the Java arguments

keen compass
#

you mean arguments after the -jar ?

#

you could toss in -nogui generally not required

lusty escarp
#

@bronze horizon cancel the damage event

frigid ember
#

@frigid ember where did you get the account if you don't have access to it?

granite cedar
#

@frigid ember is that a cracked launcher?

static pecan
#

the -nogui is default.. anything else?

radiant pollen
#

@frigid ember Buy the game.

frigid ember
#

@granite cedar yep TLauncher

radiant pollen
#

It can't verify the user because you aren't actually a user.

bronze horizon
#

@lusty escarp sorry, should have specified. also want them to be able to interact with things in front of them like normal

frigid ember
#

@radiant pollen no other options?

radiant pollen
#

BUY THE GAME

frigid ember
#

TLauncher is a cracked launcher, no assistance here

#

ops

keen compass
#

nope that is pretty much it @static pecan what I posted in that link is all you really need. There is tons more arguments but at the moment they are above your level currently

granite cedar
#

my network will support cracked players no worries

keen compass
#

the other arguments require you using a profiler along with GC profiling to tune properly lol

#

but the ones you have now will do you good for a while

static pecan
#

LOL,, well, I am a Windows/Solaris/Cray/RedHat/CentOS and I guess now a MineOS admin by trade... so, not totally above my head, I just have ZERO minecraft experience.

keen compass
#

Ah ok

#

then my bad on that part

granite cedar
#

@static pecan for hire?

static pecan
#

you can't afford me.. besides, I'm just an admin.... nothing special and definitely not a coder. You guys are way smarter than me...

#

but alas, thanks very much for the help... I'll be back.

frigid ember
#

its working thanks all πŸ™‚

dapper coral
#

ok, I got the data response, but I cant figure out how to grab the "discord": variable from d

#
res.on('data', d => {

  if(d.identities.discord == message.author.tag) {}

});
#

I dont know how to get it...

#

@subtle blade Do you know how to get it? I cant find out how.

keen compass
#

have no idea what you are using o.O

dapper coral
#

The getAuthor method

frigid ember
#

Hello! Is Player's healthScale change when server join? on 1.12.2

radiant pollen
#

@frigid ember Not unless something actually changes it, AFAIK

dapper coral
#

Can someone help?

limber marlin
radiant pollen
#

"Try reducing View Distance if it is above 4."

#

Have you done that?

#

It's world loading, not a plugin or anything.

#

There's an issue with something in the world, or your view distance is too high.

flint palm
#

@flint palm https://hasteb.in/abonadev.java that's how I'd do it
@frigid ember thanks, its strange for me to do everythin in classes, but i guess ill get used to it
btw, i dont understand the need for whats from line 53

lusty vortex
#

@flint palm Toggle boolean's with with bool = !bool

flint palm
#

i guss it should be the same, can a cmd be run as something other than a player or console?

#

i guss it should be the same, can a cmd be run as something other than a player or console?

frigid ember
#

@flint palm nah player and console are the only ones you'll run into

dapper coral
#

Can someone tell me how to get "discord": with

https.get(`https://api.spigotmc.org/simple/0.1/index.php?action=getAuthor&id=${args[0]}`, async res => {
  res.on('data', d => {

    if(d.identities.discord == message.author.tag) {

      message.member.roles.add(message.guild.roles.cache.find(r => r.name.toLowerCase() == 'verified').id);
      message.reply('Successfully verified your account!');
    
    } else message.reply('Invalid Discord!\nMake sure to put your Discord Tag under your profile!');

  });
});

d = {"id":"642407","username":"SpokenWig620933","resource_count":"0","identities":{"discord":"RedstoneGamer#4122","youtube":"Redstone Gamer123"},"avatar":{"info":"1557348459","hash":""}}

Im using https://github.com/SpigotMC/XenforoResourceManagerAPI with the getAuthor method.

marsh hawk
#

if I setCancelled InventoryClickEvent it replaces the item in cursor with the item clicked, does anyone know a workaround?

subtle blade
#

AFAIK, just a client-sided visual glitch

pallid panther
#

How do you detect when an armor piece breaks??

#

PlayerItemBreak event doesn’t work for armor?!? Any ideas?!?

#

Plz @ me or dm me

flint palm
#

how can i create a timer that, for example, every 1 second, obtain the inventory of all connected players?

hot girder
#

Scheduler#runTaskTimer(Plugin, Runnable, long, long)

#

or runTaskTimerAsynchronously

flint palm
#

how can i block a command?

nimble solar
frigid ember
#

@flint palm listen for a CommandPreProcessEvent, check the label, if it's one you want to block, set the event to cancelled @flint palm

flint palm
#

makes sense, thanks

frigid ember
#

@flint palm the event is "PlayerCommandPreprocessEvent"

frigid ember
#

Anyone knows how to fix the issue

#

with first time join spawn point

#

it spawns first on wrong location than on the right

#

there is deley 2sec

knotty karma
rugged void
#

mob wise

ornate mountain
#

I might be stupid but I don’t know how to make players deal more damage... I’m making an RPG plugin and I’ve made items which you click to add a prefix to your name. How do I make it so somebody with a β€œ[Wa]” prefix deals .75 times normal damage? And how do I make them take that much?

nova mural
#

@knotty karma would have to be done with nms afaik

#

creating a new ender dragon entity and set it's spawning sequence

knotty karma
#

so basically i have to rewrite the entire resummoning sequence?

rugged void
#

damn and i was doing so well before hat thing showed up

quiet cedar
#

Is mob spawning less on servers? I have a mob farm that is increasingly slower than the same exact design in single player. I looked it up and people said to either increase the mob spawn rate or the mob cap in the bukkit.yml file, but I don't wanna do that for the entire server, because then mobs will be everywhere. any suggestions?

rugged void
#

kill off some animals?

#

you probably have an animal farm nearby?

quiet cedar
#

like 200 blocks away

#

i'm 150 in the air and like 100 blocks on the ground from my base, in a mesa, because more water less ground mobs

#

during day and night it's significantly lower

buoyant path
#

I cannot tell

frigid ember
#

I have a big problem. I have a minecraft server based on Spigot and I host it at home, and if anyone connects to it, It will crash

lusty vortex
#

Ur sending invalid packets to them

#

Just check their crash exception

cold wharf
#

Can we ask help about MongoDB?

frigid ember
#

Provided it's to do with spigot or bungee

cold wharf
#

Well it is a database for plugin

#

To store variable values

frigid ember
#

Not an issue then, no guarantee you'll get a response too quick though, I've never dealt with mongo and idk who else is here

cold wharf
#

Hmm

#

Do you use database?

frigid ember
#

Haven't for a while to be honest

cold wharf
#

hmm oki

keen moth
#

what about mongo?

frigid ember
#

Hello, I'm working on a custom terrain generator, and for biomes I'm currently using a system with simplex noise for temperature and simplex noise for downfall, like the way it used to be done in Minecraft. However, this doesn't allow for much variety in biomes. Can anyone help me figure out how to start trying to make something like what Minecraft currently does? I can't really find much information about how it works, so I don't know where to start.

frigid ember
#

Why do I have to use atomic or final for a forEach loop but not something like (int i : theints)?
for example this gives a compiler error

          Guild found = null;
            Guild.baseDir.forEach(f -> {
                YamlConfiguration ym = YamlConfiguration.loadConfiguration(f);
                if (ym.isSet("id") && ym.getInt("id") == id) {
                    found.set(new Guild(ym.getString("name"), BaseUser.ofUUID(ym.getString("owner"))));
                }
            });

but this doesnt

            AtomicReference<Guild> found = new AtomicReference<>(null);
            Guild.baseDir.forEach(f -> {
                YamlConfiguration ym = YamlConfiguration.loadConfiguration(f);
                if (ym.isSet("id") && ym.getInt("id") == id) {
                    found.set(new Guild(ym.getString("name"), BaseUser.ofUUID(ym.getString("owner"))));
                }
            });

?

dusky roost
#

I mostly use postgres

#

and mysql

#

and sqlite

#

and redis or memcached for caching

knotty karma
#

Is there a way to get the default Minecraft generator? Basically I want my custom generator to handle some chunks, but pass other chunks to the default generator. I have a funtioning way to pass certain chunks to different generators, but I can't seem to find the default vanilla generators

sturdy oar
#

NMS

knotty karma
#

eeeeeeeeeeeee the whole reason i was doing that was to avoid NMS. i guess there's no escaping it...

sturdy oar
#

yeah basically yes. working with terrain generators will always make you use NMS unless there are some obscure API i don't know of

knotty karma
#

alright. Where do I even get started with that... I might as well go back to the original problem I was trying to get around, which is modifying how the obsidian pillars in the End regenerate when the dragon is respawned - Where do I find the documentation for that? I looked, and couldn't find anything. Does any official documentation even exist?

sturdy oar
#

documentation?

#

for NMS

#

nice joke

knotty karma
#

i figured

sturdy oar
#

I've found some user made documentation in the past

#

or in other projects

#

but none from Mojang of course

heady jolt
#

I believed NMS only documented for their partner only, like mineplex, cubecraft

knotty karma
#

probably doesnt go as specific as i need... I found a bit, but the most i found was simple stuff like making NPCs, getting ping, etc

sturdy oar
#

the best way is probably to look at some terrain generator plugin code

#

and hope you understand it

#

TerrainControl and OpenTerrainGenerator are both good i'd say

knotty karma
#

i was unable to find anything that does something remotely close to what i need

#

i basically need to override the pillar regeneration. I'll take a look at those, but I doubt they handle that.

sturdy oar
#

obsidian pillars?

#

what are those

#

like I've never played didn't even know they were a thing in 1.15.2

knotty karma
#

these bois

#

the things in the end with the crystals

#

i generate my own just fine, but they get all screwed up when the dragon is resummoned

sturdy oar
#

oooooh those pillars

knotty karma
#

thats what happens after resummoning

#

so basically i was originally gonna override the pillar regeneration phase of the dragon resummoning

#

but i'd need to use NMS for that and NMS is scary

#

so i thought i could just hand off main island generation to the vanilla generator

#

but nope

#

this happens too

frigid ember
#

dragon stuff pog

#

are you trying to override the way mojang generates them?

#

hmm

#

will have to do nms but it shouldn't be that bad depending on some things

hoary parcel
#

Is there a way to get the default Minecraft generator? Basically I want my custom generator to handle some chunks, but pass other chunks to the default generator. I have a funtioning way to pass certain chunks to different generators, but I can't seem to find the default vanilla generators

#

That's exactly what I implemented last night, lmao

knotty karma
#

nice. Mind sharing how you did it?

hoary parcel
#

Sure, grabbing the link

knotty karma
#

thanks!

hoary parcel
#

See PM

coral bramble
keen compass
#

extend

#

not expand

coral bramble
#

How can I do this?

keen compass
#

lol

#

public class lobby extends JavaPlugin

coral bramble
#

okay

frigid ember
#
public class lobby extends JavaPlugin{
coral bramble
#

Thanks πŸ˜„

cold wharf
#

Hey, how can I get a random location in a world?

coral bramble
cold wharf
#

Name of your Main class

#

lobby

coral bramble
#

with .java?

#

okay

cold wharf
#

no

#

only name

coral bramble
#

without

#

k

lofty tartan
#

Sigh. im looking to see if anyone wants to offer me help on maybe something offtopic.

#

Anyone super good at Rankup3 with Luckperms

#

if so DM me, just struggling here

bronze marten
#

use gradle

celest garden
#

Hello, i have question about item despawn rate.

sturdy oar
#

Hey, how can I get a random location in a world?
@cold wharf I mean you use Random

#

I usually use ThreadLocalRandom for random coordinates

cold wharf
#

Oh I never knew that was a thing

#

Thank you fendi

sturdy oar
#

be sure

#

to put a bound

#

with the world's border tho

cold wharf
#

Oh?

#

Can you give me an eg if possible?

sturdy oar
#

should be 3*10E+7

celest garden
#

If i set item despawn rate to 3000 (2,5m), if someone drops items it clear these always after 2,5 minutes?

cold wharf
#

I am new to coding hehe

sturdy oar
#

you know the world default border

#

30_000_000

#

you don't want to generate a random coordinate out of there

cold wharf
#

Yes

#

it is 600M or something

sturdy oar
#

ye idk about your server

#

the default one is 3*10e7

cold wharf
#

ah oki

sturdy oar
#

you could also make a dynamic one

#

World has a getBorder method

#

or something like that

cold wharf
#

Then

#

I will set a var to the worldborder size

#

And use it

sturdy oar
#

var?

#

oh variable

cold wharf
#

yes

celest garden
#

If i set item despawn rate to 3000 (2,5m), if someone drops items it clear these after 2,5 minutes? Or there is that moment, when all items are clearing every two minutes?

sturdy oar
#

if you plan to have a fixed border you can do

private int randomSafeCoordinate(final ThreadLocalRandom random, final int bound) {
        return random.nextInt(-bound, bound);
    } 
    
        // define the ThreadLocalRandom somewhere ->
        private static final ThreadLocalRandom random = ThreadLocalRandom.current();

        // generate the X & Z coordinates
        private static final int WORLD_BORDER = 29_999_984;
        private final int x = randomSafeCoordinate(random,WORLD_BORDER), z = randomSafeCoordinate(random,WORLD_BORDER);
#

correct me if you see something wrong

fading frost
#

just odd that you pass the thread local random as a parameter

#

should inline that

formal nimbus
#

hey πŸ™‚

#

does anyone know how I can reference this item stack?

#

Tried to do that - they're in the same class

#

but unfortunately it doesn't work

#

I'm not sure if I'm misunderstanding ItemStacks, but I put the ItemStack in the OnEnable() so the item is created as soon as the server starts

jaunty night
#

Does anyone have any good guides for creating custom entities in 1.15

#

or versions that are close to it.

formal nimbus
#

I don't sorry ):

#

somebody else might though

sturdy oar
#

you do ItemStack godBoots; in the class

#

then you initialize it on enable

unreal hedge
#

@formal nimbus new ItemStack(Material.valueOf("DIAMOND_BOOTS"));

sturdy oar
#

???

unreal hedge
#

Oh nvm lol

formal nimbus
#

@sturdy oar thanks! That makes sense πŸ™‚

sturdy oar
#

Also i don't know what that plugin looks like, but I usually avoid doing stuff directly into onEnable()

formal nimbus
#

How else could I do it?

#

Preferably I would have my items in another class

unreal hedge
#

JetCobblestone, you need to structure your project. When you make a variable, consider what classes/packages will be using it. You should also learn hierarchy's

formal nimbus
#

is there a way I can bring items in from another class like you do for commands?

sturdy oar
#

you pass them as an argument i guess

sturdy oar
#

there are many different ways to organize your plugin

formal nimbus
#

JetCobblestone, you need to structure your project. When you make a variable, consider what classes/packages will be using it. You should also learn hierarchy's
@unreal hedge Yeah, I've been trying πŸ™‚

#

atm it looks like this

sturdy oar
#

also (this is not an error) but why are you using your full package when calling your stuff

formal nimbus
#

also (this is not an error) but why are you using your full package when calling your stuff
@sturdy oar I'm not anymore, was just trying that to see if it changed anything lol

sturdy oar
#

I mean sometime there are reasons to use full name

#

if you'll end up looking at Spigot/Bukkit's code it's full of that

formal nimbus
#

_(..)/

#

oh

sturdy oar
#

wut

formal nimbus
#

ok that just messes up

#

_(..)/

keen compass
#

O.O

sturdy oar
#

you need to escape it

#

\\

formal nimbus
#

\(._.)/

sturdy oar
#

also the _ need to be escaped i think

unreal hedge
#

\\\_(._.)\_/

formal nimbus
#

\_(._.)_/

#

aiii I got it

unreal hedge
#

lol

formal nimbus
#

lol

unreal hedge
#

You only needed to escape 2 _'s xD

formal nimbus
#

lol I dunno

unreal hedge
#

;P

sturdy oar
#

also another thing

#

calling your main class Main is not the greatest idea tbh

formal nimbus
#

really? why not

unreal hedge
#

Bc it makes you look noob

formal nimbus
#

😒

sturdy oar
#

I usually see the Main class called like that when you ACTUALLY have the main method

formal nimbus
#

wdym

sturdy oar
#

like if you have public static void main(String[] args) you should call it Main

#

that is the main Java method

unreal hedge
#

It's convention to name the main class after your project

formal nimbus
#

o

unreal hedge
#

*conventional

#

I need sleeppp :I

formal nimbus
#

so I would have me.JetCobblestone.firstPlugin.FirstPlugin

sturdy oar
#

yeah

formal nimbus
#

aight

sturdy oar
#

also

formal nimbus
#

I'll keep that in mind for my next one πŸ˜„

sturdy oar
#

packages should follow the convention as well

#

im not entirely sure myself but I guess they should not contain UpperCase characters

formal nimbus
#

o. I thought packages were lower camel

fading frost
#

package names are all lower case

formal nimbus
#

πŸ‘Œ

sturdy oar
#

πŸ¦†

formal nimbus
#

of course discord has a duck emoji

unreal hedge
#

Classes = camel, packages = lowercase

keen compass
#

😬

heady jolt
#

camel🦢

formal nimbus
#

camel foot?

heady jolt
#

yes!

formal nimbus
#

🐫

#

πŸͺ

sturdy oar
#

Usually when one of my friends asks for help in his project and he's not following the conventions, I just tell him to fix them or I won't even help

formal nimbus
#

lol

sturdy oar
#

I've seen full uppercase packages

#

πŸ˜‚

unreal hedge
#

Me, a Lombok user 😱

sturdy oar
#

.lombok

formal nimbus
#

F

heady jolt
#

Anyone use white theme for their IDE

sturdy oar
#

m

#

e

unreal hedge
#

no wtf

frigid ember
#

He

#

Me

sturdy oar
#

i only use light theme for CLion

frigid ember
#

I use

heady jolt
#

Tbh. I'm actually enjoy using white theme in Intellj, but not a fan of visual studio code white theme

formal nimbus
#

I don't actually mind the white eclipse theme

#

but I'm using dark atm

#

people who use white theme don't care if you use dark theme, but people who use dark theme VERY MUCH CARE if you use light theme

#

therefore, I use the dark theme

sturdy oar
#

if you don't use intelliJ bruh

#

I would stop developing if I were to use Eclipse

formal nimbus
#

what's wrong with eclpise ):

#

lmao

sturdy oar
#

eclipse

#

is wrong

formal nimbus
#

calling a 16yr old a boomer

#

is wrong
@sturdy oar you didn't answer the question D-:<

sturdy oar
#

well you're missing many features

#

I don't even have time to list them all

#

they're way too many

formal nimbus
#

uh huh uh huh

#

name 1

sturdy oar
#

can you download JDKs from Eclipse?

formal nimbus
#

I dunno

sturdy oar
#

can you attach a profiler to your code?

formal nimbus
#

possibly?

sturdy oar
#

can you debug to a remote server?

formal nimbus
#

I've never tried

sturdy oar
formal nimbus
#

fuck

sturdy oar
#

πŸ˜‚

formal nimbus
#

fine you got me

#

time to uninstall eclipse smh

fading frost
#

weebs

rigid nacelle
#

Background wallpaper is a neat feature IMO
(as long as it's not at 100% obv)

heady jolt
#

jesus

keen compass
#

o.o

sturdy oar
#

what?

#

you don't like my background

#

😠

rigid nacelle
#

I like that you use final, most definitely, but not in method parameters. 😠

#

sr.3

sturdy oar
#

why shouldn't i use it

formal nimbus
#

does final make it a constant?

sturdy oar
#

in methods parameters is kinda different

rigid nacelle
#

Makes it not reassignable basically.

keen compass
#

it makes it unmodifiable

formal nimbus
#

huh

#

cool

sturdy oar
#

in my opinion everything should be final

frigid ember
#

no

sturdy oar
#

unless it NEEDS to not be

frigid ember
#

final abuse is bad

#

idk what convo u have

sturdy oar
#

??? wtf are you saying

frigid ember
#

but final abuse is bad

#

using final too much is bad

rigid nacelle
#

Hmmm

sturdy oar
#

there's no 'abuse'

frigid ember
#

I use final when it is only needed

#

lets say I wanna access a variable outside a runnable

#

final

sturdy oar
#

my convention is using final everywhere

frigid ember
#

or if im making an api and im sure people should NOT modify it

#

or if i know i wont ever modify it

#

dont use final everywhere

#

why?

sturdy oar
rigid nacelle
#

Same question as, why not?.

frigid ember
#

it doesnt look nice

heady jolt
#

I think final can save you some small performance, very little

frigid ember
#

if its too many

#

Lmao

#

yea actually

#

but it doesn#t do much in a method

#

in a class it can help

#

methods are storing stuff temporarily

#

it won't help

rigid nacelle
#

That's why I hate it in method parameters, unlees it's really needed.

#

bich is too long

frigid ember
#

method parameters its not needed, correct, it also makes the method look so long

#

method parameters there is nothing wrong using it

sturdy oar
#

It actually helps the JVM if I'm correct

frigid ember
#

Just it won't help much if you are thinking performance wise

frigid ember
#

like in a class, if you make a variavle final and initialize it, certain emmory is reserved for it, and it is certain how much memory that variable will take

#

in a method lets say its a small method

sturdy oar
#

final in classes has nothing to do

#

it just make it so it can't get extended

frigid ember
#

i said final variables in classes

#

..

#

that site never mentions final method arguments

#

@sturdy oar they don't make a large difference for methods

#

methods are just called

#

i dont think your method will run for long

#

using final can help if u are making a varaible in a class

#

u already have a defined value of memory it needs

#

and that class can be accessed as often as u want

sturdy oar
#

well i have everything final anyway so

frigid ember
#

why tho

#

if someone were to look through your code it would be annoying

formal nimbus
#

*were

frigid ember
#

thanks

formal nimbus
#

lol

frigid ember
#

like final everywhere

#

makes the method arguments sooo damn long

#

lmao

#

im just saying performance wise you are not gaining much

#

possibly nothing at all

#

you can lose clean readable code tho

formal nimbus
#

wait...

#

you're the guy who's name keeps changing back aren't you

frigid ember
#

yes

#

you recognize me?

formal nimbus
frigid ember
#

how nice

sturdy oar
#

yeah he the one banned from Paper

formal nimbus
#

Yeah I saw you bitching about it yesterday

#

....

frigid ember
#

nice you remember me as the one banned from paper

#

...

formal nimbus
#

I joined paper

#

left about 2hrs later

frigid ember
#

what did i even do

formal nimbus
#

it succed

frigid ember
#

someone was going off on me

#

i said mind their business

#

and stop

#

then i got banned

#

???

formal nimbus
#

lol

frigid ember
#

i pinged a staff actually

#

then he said stop

#

and goes off on me

#

i stopped

#

then he pings 6 other staff

#

hypocrite little guy

formal nimbus
#

LMAO

frigid ember
#

i say bruh ur pinging 5 other staff

#

about me

#

i did one ping

#

and then i get banned

#

?????????????

formal nimbus
#

I found that people there just weren't helpful

#

but also kind of nasty about it

frigid ember
#

about what

formal nimbus
#

just coding help

sturdy oar
#

180.d

bronze marten
#

why the point

#

180D is enough

#

180d

silk bane
#

180 is enough

bronze marten
#

You need to provide double?

sturdy oar
#

JVM automatically converts 180 to a double

bronze marten
#

Ah okay, but not for longs at least

silk bane
#

only if the constant is outside the range of int

#

you can pass 180 to a function that accepts long

bronze marten
#

Interesting, i had to provide a specific long and could not provide just the integer a while ago

#

ah ok this only holds for primitive values

bold sonnet
#

hello

#

i have a problem

#

my server crash

#

when a player join on server

sturdy oar
#

ban the player

#

ez

#

anyway we need more info

#

past the whole stacktrace on something like pastebin\hastebin

frigid ember
#

How do you check if a player is strafing

tiny dagger
#

i wouldn't help him if you knew him :p

granite cedar
#

lol "ban the player"

sturdy oar
#

@frigid ember

frigid ember
#

hello

frigid ember
#

thanks for ping

#

i said isStrafing

#

for god damn sak

#

ill find out myself pce

#

i already figured out

#

pce

granite cedar
#

check the players location

sturdy oar
#

what the heck is strafing

granite cedar
#

and compare it in a task

frigid ember
#

strafe

granite cedar
#

jumping around like an idiot

frigid ember
#

don i said i already figured out

#

what are u saying don

sturdy oar
#

oh yeah that retard pvp thing

granite cedar
#

yup

frigid ember
#

strafe is walking with w and d

#

at same time

#

or w and a

#

one goes slightly faster when strafing

sturdy oar
#

meh

frigid ember
#

@sturdy oar u thought isSneaking

#

like bruh

#

im not that dumb

sturdy oar
#

press X to doubt

frigid ember
#

A

#

wasnt x

#

lmao

cold wharf
#

Hey

#

I am getting a huge error can anyone can help me understand it pls?

chrome lark
#

whatever that plugin is didn't bundle a library properly

cold wharf
#

Oh, how do I check which one is causing the prob?

chrome lark
#

it tells you?

light geyser
#

Looking at it real quick, DiscordStats didnt shade JDA in correctly

chrome lark
#

Literally the top line of your paste

cold wharf
#

@light geyser I got the latest version of JDA

light geyser
#

You didnt shade it in, how do you compile your jar?

versed forge
cold wharf
#

Dutchy, ofc with console?

rigid nacelle
#

Dev.Cow, InventoryView is used IIRC.

cold wharf
#

I jut extract the jar and put it in plugins

light geyser
#

Is it your own plugin or someone else's?

chrome lark
#

The plugin is busted or something

cold wharf
#

My plugin πŸ˜›

chrome lark
#

You need to shade in the library, or add it to the classpath manually

light geyser
#

Ok, so do you use your IDE's export feature or Gradle/Maven?

cold wharf
#

Export feature

#

Eclipse

#

electronic should I show you the code?

chrome lark
#

code is irrelevant

cold wharf
#

oh?

light geyser
#

Ok, right, you'll probably want to switch to Gradle or maven, I can help you with Gradle, but nto with Maven

chrome lark
#

Your issue here is that you quite simply don't have the JDA classes available in the jar itself

cold wharf
#

elect but it is there?

versed forge
#

im getting the invenotry the correct way but its not get the Name

chrome lark
#

clearly not

cold wharf
chrome lark
#

You need to get the name from the inventory view, not the inventory

#

Yes, but that's referenced

cold wharf
#

Oh oki

light geyser
#

@cold wharf What you'll want to do,

  1. download Gradle
  2. In Eclipse, right click the project > configure > add gradle nature
chrome lark
#

You need to modify your compilation settings so that it will throw jda in there

#

Not 100%, but pretty sure that you can select what stuff to export with the jar

light geyser
#

Using eclipse works too, but I find Gradle more convenient, and its what I use πŸ™‚

#

Ill check real quick electronic

cold wharf
#

huh?

chrome lark
#

heavily recommend getting familiar with maven/gradle if you really wanna get into java dev

cold wharf
#

electroniccat I don't compile it, I extract it

light geyser
#

^^ second that

cold wharf
#

Hmm oki

#

So what do I do now?

chrome lark
#

in the export thing

#

add JDA to the export

sturdy oar
#

hi cat

#

owo

light geyser
#

Export, then at "select resources to export", select the JDA jar

frigid ember
#

🐈

light geyser
#

export JAR btw, not runnable JAR

cold wharf
light geyser
#

click on the arrow next to discord stats and select jda there

cold wharf
light geyser
#

in discord stats add a folder called e.g libs, put the jar in that

#

For future projects though, use Gradle

#

Makes it a tonne easier πŸ™‚

cold wharf
#

I can't add that jar to that folder

sturdy oar
#

why not using maven?

hidden glade
#

eclipse...had very bad experience with it

sturdy oar
#

i mean eclipse isn't that bad but one should use Maven

light geyser
cold wharf
#

I don't know what that is

hidden glade
#

i did but the view is the first thing taht huts me

light geyser
#

Maven / Gradle yeah, dont export using Eclipse πŸ™‚

sturdy oar
#

you need to learn Maven/Gradle in the future if you really plan to continue on plugin development

hidden glade
#

switching to intelij was satisfying

cold wharf
#

I can't tho Dutch

light geyser
#

did you make a package or folder?

cold wharf
#

DeadSpark but when I build in InteiiJ it can't find plugin.yml which is literally in there

#

Dutch folder

light geyser
#

Odd, try doing it through Explorer instead of Eclipse

hidden glade
#

a lot of thanks for editing that sentence and I suggest using minecraft development kit with intelij for best experience

cold wharf
#

There is no option for that in this folder Dutch

#

MDK?

light geyser
#

MDK is for Forge

cold wharf
#

lmao

hidden glade
#

the plugin is for every mod/plugin development...

light geyser
#

Though, IntelliJ might have a plugin called that

hidden glade
#

the plugin is waht i mean

light geyser
#

I thought you ment the MDK one can find on Forge's site πŸ˜„

#

mdk being Mod development kit there ^

cold wharf
#

What do I do?

light geyser
#

Anyways, @cold wharf , I suggest you use Gradle or Maven, and not Eclipse for exporting

cold wharf
#

How do I do that?

sturdy oar
#

Maven plugin for eclipse is avaiable

#

you can install Maven plugin on eclipse

light geyser
#

I can only help with Gradle, Maven I cannot unfortunately

sturdy oar
#

then you need to spend some time and study how maven works

cold wharf
#

WIll it work if I export it from Maven?

sturdy oar
#

it will definetively be easier

light geyser
#

yes, you can easily make a fat jar, thus with JDA shaded in, with Maven/Gradle

#

On Gradle all you need is the ShadowJar plugin, and add the JDA as dependency, then run gradlew shadowJar on windows, and ./gradlew shadowJar on linux

cold wharf
#

Uhmm

light geyser
#

With that, I'm also stuck on a little problem I havent been able to figure out

chrome lark
#

maven/gradle are basically build tools designed to take over dependency management and building the output

light geyser
#

with my plugin I need to delete a world (name known), but this doesn't really seem to work

cold wharf
#

So now I should download maven plugin and then export this with that and it will work?

chrome lark
#

So, you would need to actually create a maven/gradle project and throw your stuff into the way it expects

light geyser
#

First I unload the world, then use File.delete(), however it doesnt get deleted

chrome lark
#

Well, no, you'd need to actually create a maven project

#

File won't delete a folder if it's full

light geyser
#

huh, good point. How would you suggest doing it then?

chrome lark
#

You'd just recurse the directory structure

finite zealot
sturdy oar
#

or you make the system execute rm -rf world/

light geyser
#

dont think thatll work Fendi, since rm -rf world/ is linux only

sturdy oar
#

i know it was a meme

#

rm is from bash btw

light geyser
#

Cat: Ill give the recursing a go

cold wharf
#

other than doing that, this won't work?

light geyser
#

πŸ€” I can probably use Apache common IO

chrome lark
#

Yea, they have a util class for that stuff

light geyser
#

yep, and Im already using it anyways, so I might aswell here

hidden glade
#

@finite zealot The problem seems to be the world

finite zealot
#

yeah I was worried that might be the case 😦

cold wharf
#

Can anyone can help me install Maven on eclipse?

finite zealot
#

it is an old world

light geyser
#

@cold wharf easier to Google how to do so πŸ™‚

finite zealot
#

@hidden glade reckon I will need to nuke that world?

cold wharf
#

Stuffs are outdated there

#

I did and it is not working

hidden glade
#

you can try converting the world with help of single player

#

switch to inteilij

light geyser
#

Go to Maven's site on how to install maven

finite zealot
#

good idea. is there a guide on doing that DeadSpark? πŸ™‚

hidden glade
#

and the upload that world

finite zealot
#

happy to try that

hidden glade
#

just download the world play upload it to ur pc play it in single player using latest mc version

#

that must stabilize the chinks and then upload

finite zealot
#

okey doke

#

thanks πŸ™‚

#

will give that a bash, fingers crossed

hidden glade
#

np

cold wharf
#

switch to inteilij
@hidden glade talking to me?

hidden glade
#

maybe

light geyser
#

FileUtils.deleteDirectory(overworldFolder); doesnt seem to work sadly

cold wharf
#

If so then I gave you the reason for not using the IntelliJ above

chrome lark
#

converting with singleplayer might help, issue there is that processing the block updates basically went sideways and induced some chunk loading

cold wharf
#

i have added plugin.yml but intellij doesn't add it to the jar

light geyser
#

maven can do that too ^

chrome lark
#

100% boils down to how you set it up

cold wharf
#

So can eclipse

chrome lark
#

But I literally don't even remember the last time I used IJs built in compiler

dusty topaz
#

I don't think I ever have

light geyser
#

I never use IDE's build in compiler

#

well maybe except Visual Studio's compiler for C++

remote socket
#

How can i get a Block or Location from a ChunkSnapshot

cold wharf
#

@light geyser Will this work? ^

light geyser
#

should

cold wharf
#

gradle or maven?

light geyser
#

your choice πŸ™‚

#

I use gradle, others might use maven

cold wharf
#

plugin.yml is here but after I buid artifacts, it gives error on console saying plugin.yml not found

chrome lark
#

boils down to your build config

light geyser
#

cuz you need to tell Gradle/Maven to include it

#

and actually export using Maven/Gradle, and not the IDE πŸ™‚

cold wharf
#

In IntelliJ there is no way to export

#

There is build

light geyser
#

dont do it using IntelliJ, use Gradle/Maven..

#

For how to, Google "How to export fat jar with maven/gradle"

cold wharf
#

added maven

hidden glade
cold wharf
hidden glade
#

if u get the plugin just make new project and everything is ready there

#

recreate the project with plugin

cold wharf
#

I will do it if you guarantee me it will work

#

I am not adding anything I don't know

hidden glade
#

ok i do

cold wharf
#

What if it gives error?

hidden glade
#

dont ask me for nitro

#

just do it, ti will work

#

do it once u install plugin

cold wharf
#

xD

hidden glade
cold wharf
#

is that auto plugin.yml?

#

And is this plugin for intellij?

hidden glade
#

yes it is and the plugin is for intelij

#

i didnt use snipping tool

#

so how was my 4 frame tutorial?

hoary parcel
#

It's the Minecraft development plugin

hidden glade
#

^-^ mk

#

I wonder why he needed guarantee

#

@cold wharf did it work aight?

cold wharf
#

I didn't try it I am trying something else and if it doesn't work then I will try MDK

remote socket
#

I have the x and z of a block in relation to a chunk and the x and z of a chunk, get do I get the xy locatation if the block

fading frost
#

wdym "in relation to a chunk"

hidden glade
#

atleast u understand that lol i didnt get any of his sentence

fading frost
#

btw it is not possible to describe a chunk using only x and y

#

I assume you mean x and z

hidden glade
#

@remote socket give Player a vaiable lets assume its player use
player.getLocation.getX/Y/Z(); to get the players location in form of coordinates

#

aah idk if thats what he meant plz dont judge

fading frost
#

I don't think so

#

But I'd like clarification first

hidden glade
#

id like to edit this sentence into grammar rip episode

remote socket
#

Yes i meant x and z

wanton delta
#

I think they mean they have the x-z 0-15 of a block in a chunk?

remote socket
#

^ yes

wanton delta
#

And have the x z of the chunk

remote socket
#

correct

wanton delta
#

They want to do the math and get the coordinate of the block

#

Nonono all they have is numbers

remote socket
#

I do not have a player

hidden glade
#

yeah i got it

wanton delta
#

No bukkit variables

remote socket
#

^ yes thanks for understanding

fading frost
#

Then you should just be able to add those components

remote socket
#

Well no

#

Because the chunk is the x z of the chunk

fading frost
#

yes

#

and

remote socket
#

which is 16 blocks

wanton delta
#

So

#

You can use

#

β€˜World#getChunk’

remote socket
#

So 3,4 is actually 33-48,49-64

wanton delta
#

Then use Chunk#getBlock

#

And just set the y to 0

#

Or some arbitrary number

remote socket
#

or the y variable i have πŸ™‚

wanton delta
#

yea

#

That would be the easiest way

#

Its too early for me to figure out the mathematical way πŸ˜…

fading frost
#

...still just vector addition

#

unless I'm missing something or I still don't quite understand what's the problem

tiny dagger
#

blockX >> 4 == chuckX

wanton delta
#

true

remote socket
#

Well if you have chunk 1,3
and block 1,1
its 17, 49

#

i think

fading frost
#

ah ok, seems like I was not aware of what the chunk coordinates are exactly

#

yeah ok that makes sense

#

yeah then shift 4 / multiply/divide by 16

#

and then you can add

#

but if chunk already has a method for it, you should use that

wanton delta
#

If u have access to a world variable

#

I would recommend that route

pure pasture
#

Guys what is the name of the usual player inventory?

green epoch
#

elytra fly lets players load a lot of chunks within seconds, which can lead to the server files becoming really big/tps becoming low and crashing, is there a fix to this?

#

would rather not disable elytras, i saw somewhere that there was a plugin that stopped rendering chunks if the player was going faster than a certain amount of speed, is there a public plugin like this?

cold wharf
#

How do I get the location of top block? I want to get a random locaiton in a world but I also want it to be the top location so like it is not underground

remote socket
#

Does anybody know the possible outcomes of CreatureSpawner#getCreatureTypeName()

sacred wave
#

@cold wharf World#getHighestBlockAt(Location)

cold wharf
#

Thank you so much

remote socket
#

Does anybody know the possible outcomes of CreatureSpawner#getCreatureTypeName()
I really just want to know the format, like will it be Zombie ZOMBIE or zombie etc

sacred wave
#

@remote socket are you aware this function is deprecated?

#

@remote socket you should use CreatureSpawner#getSpawnedType(). This returns type... if you convert it toString you will get probably all lowercase zombie

median wing
#

Hey guys! So the plugin I'm working on works perfectly fine, however, I get this error in console and it points to this code here:

                    for (int z = -1; z <= 1; ++z) {
                        assert dirblock != null;
                        block.getLocation();
                        dirblock.getRelative(x, 0, z).breakNaturally(explosive_pickaxe);
                        player.playSound(player.getLocation(), Sound.ENTITY_GENERIC_EXPLODE, 30, 0);```
#

specifically this line is where the error is dirblock.getRelative(x, 0, z).breakNaturally(explosive_pickaxe);

sacred wave
#

and what error?

median wing
#

in console

sacred wave
#

I mean text of the error?

median wing
#

It points to my event class where the 3x3x1 break happens

trail dust
#

Hi can someone with knowledge of the WorldGuard API please dm me? πŸ™‚

median wing
#

@sacred wave What could it be?

sacred wave
#

@median wing are you sure explosive_pickaxe is not null?

median wing
#

no, exploive pickaxe is the itemstack at which I get the display name of

sacred wave
#

well if dirblock is not null, then explosive_pickaxe must be... nothing else can have null there imho

#

can you share code where explosive_pickaxe is obtained?

median wing
#

here

#

I used dirblock to access the rotation of player in the for loops

remote socket
#

@sacred wave Not in 1.8.8 but yes ill take ur recommendation ty

sacred wave
#

didn't you mix super_pickaxe and explosive_pickaxe<

median wing
#

I just changed it now

#

I have 2 items that do that

#

that's why

sacred wave
#

@median wing and you are sure that the dirblock.getRelative(x, 0, z).breakNaturally(explosive_pickaxe); line is on line 277?