#help-archived

1 messages Β· Page 122 of 1

strange grove
#

is that it does not describe any lines

#

which is weird ....

#

😦

keen compass
#

@gleaming helm well I can understand supporting legacy hardware, but for SSH makes no sense to use something that supports legacy hardware if what you are using isn't legacy

gleaming helm
#

Try printing out the custom name attribute

#

Before you check the if statement to see if it matches something else

grim lake
#

legacy pickles are the best

strange grove
#

how do i do that

#

do i do

gleaming helm
#

That's not what I mean

tiny dagger
#

sometimes the custom name can be null i think

gleaming helm
#

@keen compass

keen compass
#

Yes custom name can be null if it isn't set

strange grove
#

soo set it to not null

#

or

#

well

gleaming helm
#

Are you getting an NPE?

strange grove
#

i'm using imgname

#

to get

keen compass
#

they are getting an unhandled exception

strange grove
#

the custom name

#

and put it into an array

#

but

gleaming helm
#

If you're getting an NPE the easiest way is to check if imgname is equal to the custom name

#

because then you know that the first param is non-null and you won't get an NPE

strange grove
#

well it says equal to null

#

so yes

#

i think

#

if my money tells me the right things

#

says in headcrab

#

hmm

keen compass
#

Your unhandled exception is this line here

ItemFrame itemFrame = (ItemFrame) entity;
#

you are making the assumption the entity you have is an itemframe

strange grove
#

so

#

delete it?

#

because i want to get the itemframes custom name

gleaming helm
#

Wait no it's not

strange grove
#

cause i am using an if statement

gleaming helm
#
org.bukkit.command.CommandException: Unhandled exception executing 'imgname' in org.inventivetalent.pluginannotations.command.AnnotatedCommand$BukkitCommand(ImgName)```
#

It's not even in that class I don't think

keen compass
#

Oh, no its not

strange grove
#

yes

#

your right

#

i'm trying to get it from another

#

and i might have done it the wrong way

gleaming helm
#

Can we get the full exception?

#

I want the full stack tracce

strange grove
#

ok

keen compass
#

I know the problem, you are not handling if too few arguments were used or too many

gleaming helm
#

no

#

Stop guessing

frigid ember
#

^^

gleaming helm
#

That's also probably not the problem

keen compass
#

Well we will have to see once we see the command class πŸ˜›

frigid ember
#

how do i get the Jobs Reborn plugin to not pay out insane amounts of money?

#

doesnt matter if it has args or not really

#

the config is incredibly complicated..

tiny dagger
#

delete it πŸ‘€

strange grove
#

dang it's too long

frigid ember
#

then how can i have people make cash?

keen compass
#

?paste

worldly heathBOT
gleaming helm
frigid ember
#

https://.com

tiny dagger
#

well using a shop plugin instead?

gleaming helm
#

That looks disgusting

frigid ember
#

i have chestshops but jobs are nice to have

gleaming helm
#

Imagine not storing your configuration in a database and replicating it dynamically

#

Couldn't be me

strange grove
#

now how do i paste it?

gleaming helm
#

Ctrl + V

#

Save button

#

Paste link here

#

😐

strange grove
#

should do it

gleaming helm
#
    at org.inventivetalent.animatedframes.Commands.ImgCommand(Commands.java:92) ~[?:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_252]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_252]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_252]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_252]
    at org.inventivetalent.pluginannotations.command.AnnotatedCommand.onCommand(AnnotatedCommand.java:161) ~[?:?]
    at org.inventivetalent.pluginannotations.command.AnnotatedCommand$BukkitCommand.execute(AnnotatedCommand.java:401) ~[?:?]
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[spigot.jar:git-Spigot-2040c4c-a1a705e]
    ... 16 more
strange grove
#

well

gleaming helm
#

This is the relevant part of the stack trace

strange grove
#

ok

keen compass
#
Caused by: java.lang.NullPointerException
#

you have an NPE

gleaming helm
#

Your issue is in Commands.java on line 92

#

You're calling a method or accessing a field of a null object

keen compass
#

could you show your command class?

gleaming helm
#

Also point out where line 92 is

strange grove
#

oh frik

#

im an idiot

gleaming helm
#

You should learn to read a stack trace

strange grove
#

i forgot to delte that old peice of crab

keen compass
#

lol

gleaming helm
#

If you want any hope as a developer to solve your own problems, get good at reading stack traces.

keen compass
#

at least these stack traces are easier to read

#

The harder ones are when you cause the JVM to crash though depending on what you did to cause it πŸ˜›

tiny dagger
#

oh

gleaming helm
#

You're talking about a thread dump

keen compass
#

More like a core dump

tiny dagger
#

the adress as errors i think

gleaming helm
#

That's a different thing (It does contain stack traces but you have to understand how to read a thread dump and how threading works)

keen compass
#

Yep

gleaming helm
#

A core dump you can't even read without tools

keen compass
#

You can from the JVM

gleaming helm
#

a core dump is just like when a process crashes and then dumps its memory.

keen compass
#

its harder but there is tools to help pick out some of the relevant stuff

gleaming helm
#

I'm saying you can't effectively read it without tools

strange grove
#

well

keen compass
#

The one you can't read without any tools is a Heap dump

strange grove
#

yeah

#

i get confused sry

gleaming helm
#

When you say core dump you're talking about when the JVM spits out a core file

keen compass
#

yes

gleaming helm
#

That core file is a memory dump

strange grove
#

how would i still be able to link imgname array to the seperate command class

keen compass
#

Sometimes it is, not always the case. Depends if the JVM had time to do its things

strange grove
#

cause it's still in commands

#

the array

gleaming helm
#

no... the core file... is always a memory dump

strange grove
#

but it's not in my personal command

keen compass
#

Heap dumps in the JVM are memory dumps. Core dumps are human readable from the JVM sometimes. Very rarely do I need a tool to convert a core dump from the JVM

strange grove
#

yello?

frigid ember
#

ok. what's a good econ plugin?

keen compass
#

Going to need to show some code so we can probably better help in what you are trying to accomplish

strange grove
#

ok

keen compass
#

I mean accessing arrays or using them in other places in general is non-trivial

strange grove
#
ArrayList<String> imgname = new ArrayList<String>();``
#

dang thing

#

does not showcolor :('

keen compass
#

have to use 3 back ticks ` and then on the first line with the backtick you specify the language you want it to be marked up as

strange grove
#
ArrayList<String> imgname = new ArrayList<String>();
#

there we are

#

that was confusing

keen compass
#

wooo all that for one color πŸ˜‰

strange grove
#

yeah

#

lol

#

πŸ™‚

keen compass
#

Alright so you have this array

strange grove
#

you know it's useless just for one but ya still gotta do it lol

keen compass
#

What does this array do?

strange grove
#

it stores the img name

#

but it is not linked to main class

#

would that make it public if I did that?'

keen compass
#

but you need to use it in the main class?

strange grove
#

and i could use it in any class?

#

no

keen compass
#

oh so you want it available to all classes?

strange grove
#

yeah

#

so i can use it as I please

#

so plz help this necrotic out πŸ™‚

#

lol

keen compass
#
private ArrayList<String> imgname = new ArrayList<String>();

public ArrayList<String> getIMGName() {
return this.imgname;
}
#

just put that in your main class, and then from any other class you can get the array

strange grove
#

put it in main?

#

or just in that class

#

?

keen compass
#

recommend putting in the main, I mean you can put in the command class but then it wouldn't really make sense to have it there though

#

up to you however

strange grove
#

I think i'll put this little fella in main

#

hey @keen compass

#

u play hl1 or hl2?

keen compass
#

I have almost all of the HL series

strange grove
#

nice

unborn igloo
#

When i downgraded from paper to spigot (1.14.4) console errors/warns werent orange/red

strange grove
#

hey do you have opposing force?

unborn igloo
#

They were the same color as regualr console chat

keen compass
#

yes

strange grove
#

nice

#

hey

#

do you know

#

counter strike has a campaign?

unborn igloo
#

bruh wrong place

strange grove
#

sry sry

keen compass
#

depends what console you are using @unborn igloo

unborn igloo
#

uh just regular windows console?

keen compass
#

that is why

unborn igloo
#

is there another one?

keen compass
#

yes there is others πŸ˜›

unborn igloo
#

Which ones?

#

cuz I want to see my warns again

keen compass
#

well if you have git for windows you have git bash

unborn igloo
#

ah

keen compass
#

then there is also uh the other console thing windows has

unborn igloo
#

Yeah terminal

remote socket
#

Is it possible to remove the spawner conditions for mobs?

keen compass
#

no not terminal

unborn igloo
#

whats the .bat file alternative for git

remote socket
#

.sh

unborn igloo
#

for git?

remote socket
#

Perhaps

keen compass
#

for bash its anything really. file ending doesn't dictate it being executable

#

it just matters what is at the beginning of the file

remote socket
#

Is it possible to remove the spawner conditions for mobs?
In other words, how would I go about doing it, I know that PvPWars do it

unborn igloo
#

what im confused

keen compass
#

Powershell

#

is the other console

strange grove
#

hmm

unborn igloo
#

So how can I execute git bash commands using a file?

strange grove
#

imgname hates me

#

ddo I put it in on enable

#

I'm gonna try that brb

torn robin
#

how can you not

strange grove
#

no

torn robin
#

can’t you just rename it with .bat

strange grove
#

does nto work

torn robin
#

Assuming you’ve setup the environment correctly it should

keen compass
#

in a file, just put

#!/bin/bash

at the beginning of the file. In the rest of the file put your bash stuff. File name and file extension doesn't matter.

torn robin
#

ie you should be able to type git in command prompt normally and it should work

keen compass
#

the other way you could do it, is typing bash (script name)

unborn igloo
#

Wait so how do I use git bash / powershell as the console

keen compass
#

well if you have git for windows, it is just a matter of right clicking and selecting git bash

unborn igloo
#

the .bat file?

#

sorry if im dumb

keen compass
#

you can run bat files in git bash

#

powershell is in the windows start menu

#

under the W's for windows powershell

unborn igloo
#

im confused

keen compass
#

it can also run bat files as well

#

Anyways, before all this I was going to explain why your colors disappeared

small swift
#

So is this the place to ask questions regarding a spigot server issue?

keen compass
#

So, with spigot JANSI sometimes has a problem running under command prompt. Paper has a fix/hack to fix JANSI not picking up command prompt appropriately. So because JANIS thinks your console IE Windows command prompt isn't a supported console colors are disabled. So you either have to trick JANSI which I doubt you will want to try to do as that is a bit more involved. Or switch the console you are using to one JANSI supports easily.

#

@small swift yes

unborn igloo
#

My question was how can i switch consoles?

keen compass
#

download git for windows and install it

unborn igloo
#

I did

#

I already had it

keen compass
#

then its just a matter of right clicking in the directory that contains your bat file

#

and select git bash

unborn igloo
#

Ok

keen compass
#

a git bash window opens up

unborn igloo
#

yeah ik

keen compass
#

then just type your bat file name and it should execute it

unborn igloo
#

ok

keen compass
#

if all goes well, your colors should come back πŸ˜„

unborn igloo
#

why doenst spigot have that fix build inside?

keen compass
#

because it isn't a problem with spigot itself. For some reason JANSI randomly thinks the console isn't supported

unborn igloo
#

Why does paper do it

chrome lark
#

spigot uses a really old version of jansi

small swift
#

I'm trying to figure out why server messages like advancements and death messages don't have a space between the user prefix and their name. It shows up like "Userbob died from falling" where it should be like "User bob"

keen compass
#

you need to add the space in your prefixes config

unborn igloo
#

Im getting a chunk error? is this the place to ask

chrome lark
#

We ended up updating our terminal implementation, because it was the only way to get it to work across the board properly, especially with windows being a persistent pain in the ass

remote socket
#

Again, does anyone know how I can make ALL mobs spawn in the air like IG's do

keen compass
#

How are you trying to spawn them @remote socket

small swift
#

I'm using LuckPerms, there is a space in the prefixes but lemee try agian

#

again**

unborn igloo
#

i think it has to do with that I downloded the map. I originaly thought it was a paper issue (thats why i downgraded) but it wasnt

remote socket
#

How are you trying to spawn them @remote socket
I'd like spawners to basically ignore spawn conditions

chrome lark
#

your world is inconsistent

unborn igloo
#

wdym

karmic torrent
#

Wondering if anyone could help me with Crackshot custom crafting recipes?

chrome lark
#

Basically, go find that block and break it

#

Something modified your world in an improper manner

unborn igloo
#

The map was build on forge

#

thats why my console is being spammed with Ignoring unkown attribute 'forge.swimspeed'

chrome lark
#

Basically, just set that block that it's screaming about to something else

unborn igloo
#

what happens if i just ignore it

#

because its hundreds of blocks

chrome lark
#

you'll "just" keep getting the warning if it doesn't delete them

#

I don't think it does, something that's on my own todo list

keen compass
#

@remote socket You can modify the spawn conditions with metadata or NBT tags using a command. The only condition you can't modify and will require a plugin is to force the spawner to spawn even if there is no available ground for it to spawn

unborn igloo
#

Should I switch to paper? Whats the main difference / drawbacks

#

because i heard it's just spigot but better

keen compass
#

probably not the best place to talk about other forks here XD

remote socket
#

Can I not modify the conditions of every spawner in general in an event or something, and how so?

keen compass
#

yes you can do so in an event

unborn igloo
#

I mean i guess but is there any drawbacks?

remote socket
#

Please can you tell me which

unborn igloo
#

like errors or un supported plugins?

#

Imma take that as a no im switching lol

chrome lark
#

No, the events are too late

#

the mob already has it's position, etc

remote socket
#

Surely you can modify it

#

Thats the whole point of events

chrome lark
#

You can teleport a newly spawned entity, sure

remote socket
#

Like you can cancel them and such

#

You cant cancel something that already happened

chrome lark
#

But that's going to do fuck all to the spawn condition requirements

remote socket
#

How would I get the cause of EntityCombustEvent ?

chrome lark
#

There are two sub events

remote socket
#

Which are?

#

In other words, what event do I need to cancel to prevent mobs dying from the sun

#
    @EventHandler
    public void onFoodLevelChange(EntityCombustEvent e) {

        if (e instanceof EntityCombustByEntityEvent || e instanceof EntityCombustByBlockEvent) {
            return;
        } else {
            e.setCancelled(true);
        }
    }
#

That should work fine shouldn't it

#

And is this not the one

strange grove
#

hey @keen compass

#

it's not letting me use it

#

the array list

#

around

#

in my command

#

😦

#

anyway

#

the array list is not working yet it's in the main class

#

but I cannot access it everywhere

#

which is confusing

#

@anyone?

#

😦

keen compass
#

pass a reference of your main class to the other classes @strange grove

#

then you can do plugin.getIMGName()

strange grove
#

ok

remote socket
#

So nobody knows how to modify spawn conditions?

dusty topaz
#

https://hastebin.com/rusokeluti.json is the json
(ignore the name mismatch, that was from some testing - they are equal)

somehow solved it, no idea what was wrong but got it now! :D

tawdry venture
#

what category the armorstand belongs to in entity-tracking-distance? misc or other?

wind dock
#

hey guys so im having a bit of aproblem

#

I unforwarded my ports, then reinstalled windows

#

I transfered my server over

#

however, I reforwarded my ports yesterday and it says its not forwarded

#

the port isnt open

sturdy oar
#

ohohoh

#

Windows firewall is big fun

wind dock
#

I let java through private and public

#

waiiitttt

frigid ember
#

hii

#

i would need some help

opal bay
#

ask your questions

frigid ember
#

i want to make an array list per world

#

if that makes sense

#

but idk how to make it or if it is possible

#

(I'm very new)

velvet halo
#

It is possible

#

You store a string of the world name and declare a list in an encapsulation class.

#
public class WorldContainter {

  private String name; //World Name
  private List<Object> array;
}
frigid ember
#

okay

#

I'll try

#

but the list would be "per world"?

#

I'm not sure i understand

velvet halo
#

What exactly do you mean per world? Please describe it more what you want todo/

naive goblet
#

iHusker where are my finals

frigid ember
#

basicly i want to do kits per world

#

aka:inventory per world

#

but multiple of them

naive goblet
#

For each world each player has a set of inventories

#

?

frigid ember
#

how would i make like aimbot check for anticheat, i have no clue 😦

strange grove
#

@keen compass would you refernce it like this? ```java

AnimatedFramesPlugin plugin;

public ImgNameCommand(AnimatedFramesPlugin plugin){
    this.plugin = plugin;
}```
#

πŸ€”

#

ok

#

good to know

frigid ember
#

@naive goblet no it's more of a list of kits in /kits

#

per world

#

each world has different kits

naive goblet
#

Use a Multimap

#

It can store more values against a single key

keen compass
#

@strange grove yes like that

frigid ember
#

THANK YOU @naive goblet I LOVE YOU

strange grove
#

um frostalf

#

im getting an error

silk cape
naive goblet
#

add a JSON Object to the item which contains a key with a value of an enchantname and a key with a value of the lvl perhaps

silk cape
#

can you make example or edit this for me

#

that have option

#

"enchants": "ALL_DAMAGE:1"?

naive goblet
#
{
      "chance": 0,
      "items": [
        {
          "type": "IRON_INGOT",
          "name": "&7Steal Ingot",
          "chance": 0,
          "min": 1,
          "max": 3,
          "looting": true,
          "enchants": [
            {
              "name": "DAMAGE",
              "lvl": 2
            }
          ]
        }
      ]
    }
silk cape
#

it does not work?

#

@naive goblet

keen compass
#

@strange grove what error?

#

also I will brb in like 15 minutes as well

naive goblet
#

ok dusan make it an array if you want to

strange grove
#

well

silk cape
#

@naive goblet What do you mean

#

i dont understand

naive goblet
#

You should really watch a yt tutorial on how json works

silk cape
#

thats in only one case

strange grove
silk cape
#

i need just this

naive goblet
#
{
      "chance": 0,
      "items": [
        {
          "type": "IRON_INGOT",
          "name": "&7Steal Ingot",
          "chance": 0,
          "min": 1,
          "max": 3,
          "looting": true,
          "enchants": [
            {
              "name": "DAMAGE",
              "lvl": 2
            }
          ]
        }
      ]
    }

Why wouldn't this work?

silk cape
#

"enchants": [
{
"name": "DAMAGE",
"lvl": 2
}
]

#

when i remove this

#

plugin work fine

naive goblet
#

Oh that's a plugin?

silk cape
#

yeah

#

wildstacker

strange grove
#

there's the error @keen compass

naive goblet
#

dusan no idea if that any enchants would work then

remote socket
#

Does anyone know how to modify spawn conditions for spawners

naive goblet
#

It depends on the plugin

bitter oar
#

My Server is crashing

naive goblet
#

Doesn't sound nice

remote socket
#

Does anyone know how to modify spawn conditions for spawners
@remote socket

naive goblet
#

Yes its pretty simple afaik but well it depends on what you want to accomplish

strange grove
#

@keen compass did you read my error?

#

hello?

sturdy oar
#

How does one make spigot messages aligned?

strange grove
#

wdym?'

sturdy oar
#

let me explain better:

gleaming helm
#

@strange grove learn to read a stack trace

sturdy oar
#

Actually i'll provide a picture

gleaming helm
#

It’ll help you

hardy forge
#

How does 1.16 look on the test server?
Better then other pre-releases / though update?

sturdy oar
#

the number goes weird with shorter names

gleaming helm
#

I’m hesitant to tell you exactly where the error is because I want to teach you to fish instead of giving you food but it’s easy to find once you learn to read the stack trace.

stone rampart
#

There's a centering API I think

gleaming helm
#

You’re going to end up with a lot of errors like that

#

As you do more software development

strange grove
#

yeah

#

that's true

#

though i think i'm a victim of one of my own pranks

sturdy oar
#

I mean i could technically use a string builder, and add spaces depending on the username length

gleaming helm
#

The search terms you want to use are β€œhow do I read a stack trace”

strange grove
#

anywho

#

i think

#

I left something

#

let me figure out stuff

gleaming helm
#

Add β€œin java” if you can’t find anything java related

strange grove
#

thx @gleaming helm

gleaming helm
#

@strange grove the error tells you exactly where the problem is.

stone rampart
#

StringUtils#center or StringUtils#leftpad @sturdy oar ?

gleaming helm
#

Once you β€œdecode” the stack trace you’ll be able to find it easily

#

You’ll save a ton of time in the long run by learning how to read stack traces.

#

They exist solely to help you

sturdy oar
#

oh i love apache APIs

#

i didn't know they also did string alignment

stone rampart
#

@strange grove whilst I agree with Kevin that you should learn stack traces, lines 22-26 are what you're looking for I think

gleaming helm
#

Nope

#

Not that line

stone rampart
#

Correction line 27 and below

#

d by: java.lang.NullPointerException at org.inventivetalent.animatedframes.Commands.frameCreate(Commands.java:153) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:

gleaming helm
#

Also nope

#

Commands.java line 153

stone rampart
#

There's a null pointer exception in your command class at line 53 no?

#

153*

gleaming helm
#

No

stone rampart
#

Yes

gleaming helm
#

Yes

#

I didn’t see 153

stone rampart
#

Lol

#

Essentially you look for the error and then it'll have the package name followed by (Class.java:line)

#

@strange grove

strange grove
#

got it

gleaming helm
#

Really the right way is to understand how it’s processed

#

The functions all the way at the bottom call the next function on the way up to the top

#

So start at the bottom and work your way up to figure out what called what called what which called your code which had some problem

#

When you see caused by

strange grove
#

got it

gleaming helm
#

That means it’s sorta separated into different modules is an easy way to look at it

stone rampart
#

It's basically a lot of reading but it's easy to understand

gleaming helm
#

The top one is the MC code, middle is some lib, and the bottom one is the one that usually matters

strange grove
#

ah

gleaming helm
#

When you see caused by, the part that usually matters is the block that’s all the way at the bottom

#

That’s literally the β€œroot cause”

strange grove
#

it got pissed at this

#
public void call(PlayerInteractEntityEvent event) {
                if (event != null && event.getRightClicked().getType() == EntityType.ITEM_FRAME) {
                    final ItemFrame firstFrame = (ItemFrame) event.getRightClicked();
                    sender.sendMessage(MESSAGE_LOADER.getMessage("create.setup.set.first", "create.setup.set.first"));
                    sender.sendMessage("  ");```
#

ln 153 is

#

the public void

#

which is odd

#

not sure what I deleted that got it angry

#

or added

#

😐

gleaming helm
#

GetRightClicked is probably null

#

Also event will never be null

strange grove
#

but it saying if the event does'nt equal null

gleaming helm
#

You don’t need to check

#

If event is null

sturdy oar
#

yeah event is marked as @NotNull

strange grove
#

ok

gleaming helm
#

The right clicked parameter INSIDE the event may be null

#

But the event itself will never be null

stone rampart
#

Wait krabs

strange grove
#

but

gleaming helm
#

Wait

strange grove
#

this is not my code

gleaming helm
#

That’s not the command class

sturdy oar
#

oof

strange grove
#

that's the problem

stone rampart
#

Do you call that method in onCommand?

gleaming helm
#

Is that command.java?!

strange grove
#

yes

gleaming helm
#

Oh man this code is a mess if it is

strange grove
#

not commands

#

yeah

gleaming helm
#

Why the fuck are you calling an event from a command

strange grove
#

not mine as stated earlier

#

^

#

^^^^^

stone rampart
#

The problem is with frameCreate()

#

In Commands.java

gleaming helm
#

That’s probably the wrong class

strange grove
#

i'm customizing it for personal use

gleaming helm
#

That’s not Commands.java

stone rampart
#

Lol who tf calling an event in on command

#

That's pretty funny ngl

strange grove
#

the author of this plugin

#

and surprisingly it still works

#

so

#

🀣

stone rampart
#

They probably construct it with null?

strange grove
#

maybe

#

but if i delete !=

stone rampart
#

That's why they have the if

strange grove
#

it get angry

stone rampart
#

No Just don't touch it

strange grove
#

yeah

stone rampart
#

Go to Commands.java

#

Line 153

strange grove
#

I was thinking that

#

i'm in commands πŸ˜›

stone rampart
#

frameCreate()

#

The problem is the framecreate method

strange grove
#

so this little bugger? ```java

public void frameCreate(final Player sender, final String name, final String image) {
if (plugin.frameManager.doesFrameExist(name)) {
sender.sendMessage(MESSAGE_LOADER.getMessage("create.error.exists", "create.error.exists"));
return;
}```

stone rampart
#

Problem is with that ye

#

Cause that's what it says in the stack trace

strange grove
#

theres more code to it ya know

#

this is the top of it

#

so

stone rampart
#

On mobile so it's super hard to read the code no use putting more

strange grove
#

do you want me to make an md

#

to put it all in?

stone rampart
#

Sure but I can't really read on mobile

strange grove
#

ok

stone rampart
#

Maybe try removing final from the parameters?

strange grove
#

ok

stone rampart
#

And is it called from onCommand

strange grove
#
public void frameCreate(Player sender,String name, String image) {
        if (plugin.frameManager.doesFrameExist(name)) {
            sender.sendMessage(MESSAGE_LOADER.getMessage("create.error.exists", "create.error.exists"));
            return;
        }```
#

it looks like this

#

now

stone rampart
#

Sure

#

But is it called onCommand

strange grove
#

do you mean on enable

#

or

stone rampart
#

onCommand

strange grove
#

hm

#

@Command?

#

i mstupid

#

sry

#

for my low iq

stone rampart
#

It'll have to be called that cause it's in the commandexecutor interface

strange grove
#

πŸ™‚

#

oh

stone rampart
#

Find classes that implement CommandExecutor

#

And find the method called onCommand

#

This plugins kind of a meme

strange grove
#

AnimatedFramesPlugin plugin;

public ReplaceCommand(AnimatedFramesPlugin plugin) {
    this.plugin = plugin;
}
#

this is my replace command

#

i forgot why I linked the class like this

#

it pointed in it's direction

#

and also to this

#
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (sender instanceof Player) {

            for (Player player : Bukkit.getServer().getOnlinePlayers()) {
                for (Entity entity : player.getNearbyEntities(5, 5, 5)) {
                    World world = Bukkit.getServer().getWorld("world");
                    Location l = player.getLocation();
                    if (entity instanceof ItemFrame) {
                        ItemFrame itemFrame = (ItemFrame) entity;
                        if (itemFrame.getCustomName().equals(plugin.getIMGName())) {
                            player.chat(ChatColor.BLUE + "This is " + plugin.getIMGName() + ".");
                        }
                    }
                }
            }
            return true;
        }
    return  true;

    }
}```
#

this is the code

#

for it

#

onCommand

#

so it's pointing at my own thing

#

or that

#

@stone rampart

#

so

#

what would it be most likely?

#

i think it would be the 2nd

#

and if so

#

what should i do?

stone rampart
#

Looks terrible on mobile sorry, you're gonna have to wait for someone else

strange grove
#

fair enough

#

πŸ™‚

sturdy oar
#

looks terrible on discord too

frigid ember
#

i was going to say that but im a bit nicer

strange grove
#

terrribly huge

#

indeed

#

the author

#

and me

#

are bad lol

stone rampart
#

Out of curiosity, who wrote it and why do you have it lol

strange grove
#

well i have if for a diffrent command

frigid ember
#

no command checking how do you know its the right one, that in theory shouldnt work at all

strange grove
#

and the plugins name

#

is animated frames

torn robin
#
     * Bans by name are no longer supported and this method will return
     * null when trying to request them. The replacement is bans by UUID.

how would I get the banlist of player's UUIDs?

strange grove
#

so you can find the

#

author thru github

#

I think her names or his is inventivetalent

stone rampart
#

Not much talent but certainly inventing new ways to do things :/

strange grove
#

same goes for me

#

πŸ™‚

#

i had to use player chat

#

to make my own replace commadn

#

to make the player type out stuff

stone rampart
#

My favourite part is putting all of it in sender instanceof player

strange grove
#

to make one singular command lol

stone rampart
#

And then when it's not, just not having an error

strange grove
#

wait one minute

#

this is not my replace lot

#

command lol

#

it was the command

#

itself

#

the one i run

#

so

#

yeah lol

#

public class ImgNameCommand implements CommandExecutor {
    AnimatedFramesPlugin plugin;
    public ImgNameCommand(AnimatedFramesPlugin plugin){
        this.plugin = plugin;
    }
    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (sender instanceof Player) {

            for (Player player : Bukkit.getServer().getOnlinePlayers()) {
                for (Entity entity : player.getNearbyEntities(5, 5, 5)) {
                    World world = Bukkit.getServer().getWorld("world");
                    Location l = player.getLocation();
                    if (entity instanceof ItemFrame) {
                        ItemFrame itemFrame = (ItemFrame) entity;
                        if (itemFrame.getCustomName().equals(plugin.getIMGName())) {
                            player.chat(ChatColor.BLUE + "This is " + plugin.getIMGName() + ".");
                        }
                    }
                }
            }
            return true;
        }
    return  true;

    }
}```
#

the whole thing

stone rampart
#

I'd suggest you reask your question concisely for the next person to help

strange grove
#

ok

#

does anoyne

#

know how to fix this

#

it

stone rampart
#

Explain "this"

strange grove
#

this is this code

torn robin
#

what are you trying to do exactly?

strange grove
#

it is not running

#

and

#

i'm trying to get the imgs in a radius

#

and when it gets that specfic img

#

it will tell me

torn robin
#

great

#

how is it not working

strange grove
#

I can't seem to get the image name

#

and

torn robin
#

what is it outputting?

strange grove
#

just

#

a sec

remote socket
#

Yes its pretty simple afaik but well it depends on what you want to accomplish
I'd like to delete all conditions, so that everything spawns like an IG or such

strange grove
#

there @everyone

keen compass
#

need to check if the entity has a custom name set before doing an equals check because the custom name can be null

strange grove
#

there is my error

#

wait does that text everyone?

torn robin
#

no you can't @everyone

strange grove
#

thank goodness

torn robin
#

how is that error at all related to the original code you have

strange grove
#

i thought everyone was gonna come

#

well

torn robin
#

you're not doing anything with URL/links/arguments in the original code

strange grove
#

the code

#

it's a diffrent command

storm sparrow
#

I can't tell if i'm stupid or not but there are currently no spigot snapshot builds right

torn robin
#

why

#

...

#

why wou-

strange grove
#

who

torn robin
#

what are you having an issue with

#

the command

#

or the plugin

#

you're giving us contradictory information

#

you need to start with 1 problem at a time

strange grove
#

Caused by: java.lang.NullPointerException
at org.inventivetalent.animatedframes.Commands.frameCreate(Commands.java:153) ~[?:?]

velvet halo
#

@naive goblet It was just an example, up to him to know when final should or shouldn't be used.

strange grove
torn robin
#

what is the code for /afcreate

strange grove
#

just a sec

#

there ya are

#

@torn robin

#

and @everyone

#

if you one follow up

#

*wanna

#

and way

#

anyway

#

that's the code and that's that

torn robin
#

yikes

strange grove
#

yeah

torn robin
#

that's a lot of indentation

#

you should probably re-work that

strange grove
#

not my code

#

but probably should

torn robin
#

.frameCreate(Commands.java:153) ~[?:?]

#

there's no line 153

#

what's line 153

strange grove
#

public void call(PlayerInteractEntityEvent event) {

torn robin
#

yeah idk

strange grove
#

but it also could be this

torn robin
#

that's some wack code right there

strange grove
#

public void frameCreate(final Player sender, final String name, final String image) {
if (plugin.frameManager.doesFrameExist(name)) {
sender.sendMessage(MESSAGE_LOADER.getMessage("create.error.exists", "create.error.exists"));
return;
}

torn robin
#

how could it be multiple lines lmfao

strange grove
#
public void frameCreate(final Player sender, final String name, final String image) {
        if (plugin.frameManager.doesFrameExist(name)) {
            sender.sendMessage(MESSAGE_LOADER.getMessage("create.error.exists", "create.error.exists"));
            return;
        }```
torn robin
#

what's on line 153

#

it can't be two lines of code

#

153 is one line

strange grove
#
public void frameCreate(final Player sender, final String name, final String image) {```
#

this top part

torn robin
#

Β―_(ツ)_/Β―

#

i give up lmao

strange grove
#

or the others top part

#

i'm so freaking confused

#

i can die

torn robin
#

yeah

#

its some questionable code

strange grove
#

just with these weird errors

#

if you want i can send you

#

the whole

torn robin
#

embedded listeners is quite a concept

strange grove
#

error list

torn robin
#

nah

strange grove
#

yeah

#

this plugin

#

has been heck

#

for the past few weeks

#

and i'm gonna go mad!

#

with all this code

#

and not even a single

#

comment

#

nothing defining anything

#

the author only knows how to do this

#

@torn robin

#

I think i got a better way to do it

torn robin
#

i'd just rework the whole thing

strange grove
#

I think

keen compass
#

name or image is null in that method. I will suspect it is the name since you are assuming custom names are set

#

which you don't bother to check for

strange grove
#

yeah

#

maybe

#

probably img

#

beacause

#

i was having a problem just creating an img

#

and it's not even part of it

frigid ember
#

How can I get the enchant results from enchantment table?

strange grove
#

and @keen compass

#

how would yo ucheck for this

#

because

#

i did

#

that

#
public class ImgNameCommand implements CommandExecutor {
    AnimatedFramesPlugin plugin;
    public ImgNameCommand(AnimatedFramesPlugin plugin){
        this.plugin = plugin;
    }
    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (sender instanceof Player) {

            for (Player player : Bukkit.getServer().getOnlinePlayers()) {
                for (Entity entity : player.getNearbyEntities(5, 5, 5)) {
                    World world = Bukkit.getServer().getWorld("world");
                    Location l = player.getLocation();
                    if (entity instanceof ItemFrame) {
                        ItemFrame itemFrame = (ItemFrame) entity;
                        if (itemFrame.getCustomName().equals(plugin.getIMGName())) {
                            player.chat(ChatColor.BLUE + "This is " + plugin.getIMGName() + ".");
                        }
                    }
                }
            }
            return true;
        }
    return  true;

    }
}```
#

and

#

this thing here wan't checking?

#
if (itemFrame.getCustomName().equals(plugin.getIMGName())) {```
#

or was it

#

😐

#

I think what i should

#

do

#

is get what item frame the player is looking at

#

and

#

when they look at it

#

it will get the name

#

of the img and display it in their

#

chat if there an admin

#

so i think i'm just gonna try that

#

😦

#

bye for now

#

well

#

i'll stay in chat

#

but

frigid ember
#

I think what i should do is get what item frame the player is looking at and when they look at it it will get the name of the img and display it in their chat if there an admin so i think i'm just gonna try that.

Here you go

strange grove
#

so do that?

#

@frigid ember

#

well I was gonna

#

so iguess i actually will

#

i'll lingeer in chat and look in forums

balmy sorrel
#

Can somebody help me?

strange grove
#

....

frigid ember
#

Can somebody help me?

No

balmy sorrel
#

:/

strange grove
#

you have to define your problem

#

basically

#

if you want help

#

@balmy sorrel

#

and for me that was hard

#

good luck

#

...

#

moans in headcrab

keen compass
#
itemFrame.getCustomName().equals(plugin.getIMGName())

that does not check if the custom name is null since it can be null. Not the same thing as being empty.

strange grove
#

so

#

check if it equals null?

#

i could do that

keen compass
#
if(itemFrame.getCustomName() == null);
strange grove
#

if(itemFrame.getCustomName() != null){

#
if(itemFrame.getCustomName() != null){
#
//run this code
keen compass
#

either way, just need to do a null check

strange grove
#
}
#

ok

#

πŸ™‚

keen compass
#

instead of assuming the custom name is set

strange grove
#

yeah

gleaming helm
#

@keen compass Use yoda comparison

#

You can avoid a null check

#

Instead of
itemFrame.getCustomName().equals(plugin.getIMGName())

#

Use plugin.getIMGName().equals(itemFrame.getCustomName())

#

This is, of course, assuming getIMGName is always non-null

tiny dagger
#

why is it called a yoda comparision?

gleaming helm
#

Because it's in reverse order

tiny dagger
#

is yoda gay?

strange grove
#

cause yoda forsee's the future

#

no

tiny dagger
#

oh lol

strange grove
#

never

#

ever

#

i shall bleach my eyes

#

he was piggybacking luke

#

no no

#

Yoda!

gleaming helm
#

😐

strange grove
#

come bcak

#

yeah lol

#

haahhahaha

tiny dagger
#

the Objects.equals tho would be better

gleaming helm
#

No it really wouldn't

strange grove
#

testing

gleaming helm
#

Nobody uses Objects.equals

strange grove
#

in about a minute

tiny dagger
#

well you can have it in any order and it will be fine

gleaming helm
#

And plus, if you know the first parameter is never null

strange grove
#

well

gleaming helm
#

Then just it as the first parameter

#

And it solves all of your problems

strange grove
#

if it gave me null

tiny dagger
#

well only then

strange grove
#

doesn't that mean

tiny dagger
#

but still could be useful

strange grove
#

it will give me null?

gleaming helm
#

No

#

Passing null to equals is defined

#

(in most cases)

#

(in your case it is)

strange grove
#

um

gleaming helm
#

But calling equals on null is NOT defined

strange grove
#

so still do this?

gleaming helm
#

Do this plugin.getIMGName().equals(itemFrame.getCustomName())

strange grove
#
if(itemFrame.getCustomName() != null){
#

and wrap it around?

gleaming helm
#

And you avoid the null check

#

You don't need the null check if you use the correct, smart order

strange grove
#

ok

gleaming helm
#

because equals() does a null check

strange grove
#

ah

#

ok

#

thank goodness lol

gleaming helm
#

You can call equals with a null parameter, but you CANNOT call equals ON a null parameter

keen compass
#

yeah forgot about that @gleaming helm

#

can do it the way he said too

gleaming helm
#

Can, but way less clean

strange grove
#

well coming clean is'nt my style

#

guys

#

no one will ever know i ate all the Halloween candy

#

πŸ˜›

#

πŸ™‚

#

no no

#

my code does not work

#

i'm gonna go mad!!!!!

#

yeah

#

@gleaming helm

#

my code did it again

#

and

#

i think i'm gonan give up on this command

#

cause it's garbage like me

gleaming helm
#

Get better at reading exceptions

#

You're refusing to read and understand exceptions and stack traces

#

And unfortunately if you are refusing to do that I can't help you

tiny dagger
#

yo can you give me a screenshot of the error?

strange grove
#

i think that was the same error

tiny dagger
#

maybe i can help you identify the error better

gleaming helm
#

@tiny dagger Teach a man to fish...

tiny dagger
#

oh you're right

gleaming helm
#

I'm always right

strange grove
#

it's talking about an annotated command

idle garden
#

how do i get a plugins folder-

strange grove
#

and it's on line 169

#

i'm gonna check that

#

most likely in commands.java folder

#

it's rejecting the right click event

idle garden
#

ping me if you can answer hehe

strange grove
#

which is weird considering it has nothing to do with it at all

#

maybe ishould make a new clone

#

and try this again

#

because

#

I might've deleted something

#

from there that was essential to that specific class

#

and you never know

#

right?

keen compass
#

getDataFolder()
@idle garden

idle garden
#

wha

#

what do i do with that

keen compass
#

how do i get a plugins folder-
@idle garden

balmy sorrel
#

Hi guys, I have a problem in my plugin, the commands do not work, yesterday if they worked now they do not, I also have this error that gave me when I entered eclipse, if they do not understand something, I speak Spanish, if they do not understand something, tell me and I explain, are plugin.yml and config.yml

idle garden
#

where do i put the code thing

keen compass
#

well you have a semi colon at line 11, don't think that is suppose to be there @balmy sorrel

#

also don't use tabs

#

use spaces

#

@idle garden if you are making a plugin, the method comes from the plugin main class

balmy sorrel
#

I was watching a tutorial on how to make plugins and it's ok for what I want to do in my plugin

keen compass
#

can't use tabs in yaml

idle garden
#

im trying to get a plugin folder

#

to put plugins in

balmy sorrel
#

I am making the plugin as he does, then I will make my original plugin, and he told me to put it there

strange grove
#

who is this person

keen compass
#

yaml doesn't accept tabs. Not sure how else to tell you

strange grove
#

so @keen compass get's a jist of what you're doing

keen compass
#

use spaces instead of tabs

idle garden
#

i don't get how to make a plugin folder- 😭

tiny dagger
#

getPluginFolder().mkdirs();

keen compass
#

Most times it is created for you when you run the server, and for plugins, they generally make their own

fallen crater
#

A need help from a Resource Manager!

keen compass
#

so, if you are trying to make the directory to place the plugins it is simply just creating one in the same directory as the server named plugins

#

but as I said, if you run the server it will create it for you

idle garden
#

wha

#

run what server

#

im so confused lol

keen compass
#

Well I have no idea what is you are doing. Are you making a plugin or trying to setup a server?

idle garden
#

i have an aternos server, and i don't have a plugin folder to add a plugin to

keen compass
#

you have to request them to add plugins to their list if you want to add plugins of your choosing

#

otherwise you are stuck with what they offer

idle garden
#

ok

frigid ember
#

How do I get the possible enchants when an item is put into an enchantment table? The enchantments show up on the right side, but I'm not sure how to get what these enchants are

velvet halo
#

What version of minecraft are you on?

frigid ember
#

Oh nvm I think I figured it out, I'm on 1.8

velvet halo
#

Yes xD

frigid ember
#

Yeah just looking at that

keen compass
#

should really use the search function on the javadocs

gleaming helm
#

Or use google dorking

#

"spigotmc" "javadoc" <terms>

#

That's not real dorking but

#

It's more on the lines of effectively using google to find the specific info you want

keen compass
#

assuming it gives you the results you are looking for instead of trying to think it knows what you are looking for

velvet halo
#

To be an amazing developer you need to know the best way to google

gleaming helm
#

^

keen compass
#

yeah, but still annoying none the less to avoid googles prediction crap. I don't need it to always try to predict what I want XD

gleaming helm
#

Wtf

#

90% of the time it’s very very good at predicting correctly

#

And after 2-3 searches with slightly different terms it’ll narrow in on what exactly you want

#

And then in FUTURE searches it uses that past data to guess additional context

#

I know a few googlers πŸ˜‰

keen compass
#

90% it doesn't yield the results I want

frigid ember
#

@keen compass is there a getOffers​() for 1.8? I can' find it

velvet halo
#

I was writing a research paper and all the papers I got from random websites I found them on google scholar. It was pretty crazy

frigid ember
gleaming helm
#

Check the docs @frigid ember

#

Or just type β€œe.” And let it autocomplete some possible suggestions

frigid ember
#

Yeah I couldn't find anything, is there something else I could use?

velvet halo
gleaming helm
#

The prepare item enchantment event is what you want for sure

frigid ember
#

Yeah I'm using 1.8

velvet halo
gleaming helm
#

It may not be supported in 1.8. You probably won’t find a ton of support for 1.8 here. I know why you want to use 1.8, I used to use it too. Just... it’s 7 years old and you won’t get support for it. The api for it probably didn’t exist in 1.8.

keen compass
#

it didn't

#

it is relatively new

frigid ember
#

I want to support 1.8, 1.15, 1.16, and 1.12 on my plugin, so its important that I get this feature for 1.8 as well

keen compass
#

Well you are going to have to do a lot to support 1.8

#

but I recommend just dropping the 1.8 support. I mean 1.8 is only around 10% of the servers these days

frigid ember
velvet halo
#

Why do you need to support 1.8? Is it for someone or something?

#

Oh

#

that answers my question

gleaming helm
#

Your discord is probably very biased

#

And not representative of the community as a whole

#

Be careful drawing statistical conclusions like that

quartz trench
#

Make the feature newer version exclusive to incentivize upgrading

velvet halo
#

You honestly want to make sure that you have a community that is willing to be up to date with the latest versions.

#

It is going to be difficult for you in the long run.

#

They wanna see new features in a version no longer supported πŸ˜’

#

Or let your community know what you have to sacrifice if you want to stay in 1.8

frigid ember
#

idk even though my community is small I still want to do what they say

keen compass
#

do you run a server?

#

or is this just a fan community of your plugins?

frigid ember
#

A fan community

keen compass
#

yep good luck on backporting features

#

that is all I can say. If it was your server, I would just say backport the patches

#

Even if your community wants it, doesn't mean you should go over and beyond to implement features for old outdated versions. But that is up to you though lol.

#

1.8 is dying out, and eventually probably towards the end of this year it will probably be almost non-existent XD

quartz trench
#

A bad but possible option is replacing the enchant gui with your own

frigid ember
#

That was what I was trying to do, but I wanted to get the results from the enchantment table so I could place items in the fake table and get the results

quartz trench
#

Oh I see

#

You could rewrite the enchant system but I think that's what your trying to avoid here lol

frigid ember
#

@keen compass in the newest update is the pvp being changed back to 1.8?

velvet halo
#

There was an experimental java edition version

quartz trench
#

Yeah, not 1.16

gleaming helm
#

β€œYou can keep pressing the attack button to continuously attack”

#

= anticheat ban

velvet halo
#

.<

keen compass
#

@frigid ember doubt 1.8 pvp mechanics will come back, but not sure how that means 1.8 will be anymore relevant then what it is now

marsh hawk
#

Anyone ever tried using docker on a dedi for micro instances of a server

quartz trench
#

Yes, everyone who uses pterodactyl

#

It works fine assuming you setup networking correctly

#

minimal overhead

#

Honestly you should just set up a Pterodactyl panel

gleaming helm
#

I use docker

#

Best ever

#

I can auto deploy and clone and take down servers in my cluster at will it’s awesome

frigid ember
#

Imagine not being verified

#

πŸ€”

marsh hawk
#

currently using multicraft, no clue if they do the same

#

Because i want to have a main manager socket that my servers connect to and that can handle instantiating the servers, just no clue how i would do that with pterodactyl

whole plume
marsh hawk
#

@whole plume what's your problem? no point just sending code and asking us to help lol

whole plume
#

Everything is there

#

Its not just code

#

I basicly cant figure it out how to check if the block from the playerinteract event is same as the itemstack...

#

But. Idk how else. I tried casting to skull. Error

quartz trench
#

It says in the stacktrace java.lang.ClassCastException: org.bukkit.inventory.ItemStack cannot be cast to org.bukkit.block.Skull

#

and I see this: Skull skull = (Skull) block;

strange grove
#

where you would put this code if it was not a command?

#
void getTarget() {
        List<Entity> nearbyE = plugin.player.getNearbyEntities(plugin.range,
                plugin.range, plugin.range);
        ArrayList<LivingEntity> livingE = new ArrayList<LivingEntity>();
 
        for (Entity e : nearbyE) {
            if (e instanceof LivingEntity) {
                livingE.add((LivingEntity) e);
            }
        }
 
        plugin.target = null;
        BlockIterator bItr = new BlockIterator(plugin.player, plugin.range);
        Block block;
        Location loc;
        int bx, by, bz;
        double ex, ey, ez;
        // loop through player's line of sight
        while (bItr.hasNext()) {
                block = bItr.next();
                bx = block.getX();
                by = block.getY();
                bz = block.getZ();
                        // check for entities near this block in the line of sight
                        for (LivingEntity e : livingE) {
                                loc = e.getLocation();
                                ex = loc.getX();
                                ey = loc.getY();
                                ez = loc.getZ();
                                if ((bx-.75 <= ex && ex <= bx+1.75) && (bz-.75 <= ez && ez <= bz+1.75) && (by-1 <= ey && ey <= by+2.5)) {
                                        // entity is close enough, set target and stop
                                        plugin.target = e;
                                        break;
                                }
                        }
                }
 
            }````
quartz trench
#

What is plugin.target

#

it seems like that should be a method that returns an Entity not void

strange grove
#

the target entity

#

this is not my code

quartz trench
#

is it static in your main class?

#

oh

strange grove
#

this is from this forum

quartz trench
#

What are you trying to do

strange grove
#

get an instance of itemframe

#

and if so

#

get the name of the image

#

and put it in the players chat

#

like so