#help-archived
1 messages Β· Page 122 of 1
@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
Try printing out the custom name attribute
Before you check the if statement to see if it matches something else
legacy pickles are the best
That's not what I mean
sometimes the custom name can be null i think
@keen compass
Yes custom name can be null if it isn't set
Are you getting an NPE?
they are getting an unhandled exception
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
well it says equal to null
so yes
i think
if my money tells me the right things
says in headcrab
hmm
Your unhandled exception is this line here
ItemFrame itemFrame = (ItemFrame) entity;
you are making the assumption the entity you have is an itemframe
Wait no it's not
cause i am using an if statement
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
Oh, no its not
yes
your right
i'm trying to get it from another
and i might have done it the wrong way
ok
I know the problem, you are not handling if too few arguments were used or too many
^^
That's also probably not the problem
Well we will have to see once we see the command class π
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..
delete it π
dang it's too long
then how can i have people make cash?
?paste
well using a shop plugin instead?
That looks disgusting
i have chestshops but jobs are nice to have
Imagine not storing your configuration in a database and replicating it dynamically
Couldn't be me
now how do i paste it?
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
well
This is the relevant part of the stack trace
ok
Your issue is in Commands.java on line 92
You're calling a method or accessing a field of a null object
could you show your command class?
Also point out where line 92 is
You should learn to read a stack trace
i forgot to delte that old peice of crab
lol
If you want any hope as a developer to solve your own problems, get good at reading stack traces.
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 π
oh
You're talking about a thread dump
More like a core dump
the adress as errors i think
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)
Yep
A core dump you can't even read without tools
You can from the JVM
a core dump is just like when a process crashes and then dumps its memory.
its harder but there is tools to help pick out some of the relevant stuff
I'm saying you can't effectively read it without tools
well
The one you can't read without any tools is a Heap dump
When you say core dump you're talking about when the JVM spits out a core file
yes
That core file is a memory dump
how would i still be able to link imgname array to the seperate command class
Sometimes it is, not always the case. Depends if the JVM had time to do its things
no... the core file... is always a memory dump
but it's not in my personal command
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
yello?
ok. what's a good econ plugin?
Going to need to show some code so we can probably better help in what you are trying to accomplish
ok
I mean accessing arrays or using them in other places in general is non-trivial
ArrayList<String> imgname = new ArrayList<String>();``
dang thing
does not showcolor :('
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
ArrayList<String> imgname = new ArrayList<String>();
there we are
that was confusing
wooo all that for one color π
Alright so you have this array
you know it's useless just for one but ya still gotta do it lol
What does this array do?
it stores the img name
but it is not linked to main class
would that make it public if I did that?'
but you need to use it in the main class?
oh so you want it available to all classes?
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
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
I have almost all of the HL series
nice
When i downgraded from paper to spigot (1.14.4) console errors/warns werent orange/red
hey do you have opposing force?
They were the same color as regualr console chat
yes
bruh wrong place
sry sry
depends what console you are using @unborn igloo
uh just regular windows console?
that is why
is there another one?
yes there is others π
well if you have git for windows you have git bash
ah
then there is also uh the other console thing windows has
Yeah terminal
Is it possible to remove the spawner conditions for mobs?
no not terminal
whats the .bat file alternative for git
.sh
for git?
Perhaps
for bash its anything really. file ending doesn't dictate it being executable
it just matters what is at the beginning of the file
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
what im confused
hmm
So how can I execute git bash commands using a file?
how can you not
no
canβt you just rename it with .bat
does nto work
Assuming youβve setup the environment correctly it should
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.
ie you should be able to type git in command prompt normally and it should work
the other way you could do it, is typing bash (script name)
Wait so how do I use git bash / powershell as the console
well if you have git for windows, it is just a matter of right clicking and selecting git bash
you can run bat files in git bash
powershell is in the windows start menu
under the W's for windows powershell
im confused
it can also run bat files as well
Anyways, before all this I was going to explain why your colors disappeared
So is this the place to ask questions regarding a spigot server issue?
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
My question was how can i switch consoles?
download git for windows and install it
then its just a matter of right clicking in the directory that contains your bat file
and select git bash
Ok
a git bash window opens up
yeah ik
then just type your bat file name and it should execute it
ok
if all goes well, your colors should come back π
why doenst spigot have that fix build inside?
because it isn't a problem with spigot itself. For some reason JANSI randomly thinks the console isn't supported
Why does paper do it
spigot uses a really old version of jansi
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"
you need to add the space in your prefixes config
Im getting a chunk error? is this the place to ask
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
Again, does anyone know how I can make ALL mobs spawn in the air like IG's do
How are you trying to spawn them @remote socket
Keep getting this error: https://hastebin.com/yewoyopopo.md
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
How are you trying to spawn them @remote socket
I'd like spawners to basically ignore spawn conditions
your world is inconsistent
wdym
Wondering if anyone could help me with Crackshot custom crafting recipes?
Basically, go find that block and break it
Something modified your world in an improper manner
The map was build on forge
thats why my console is being spammed with Ignoring unkown attribute 'forge.swimspeed'
Basically, just set that block that it's screaming about to something else
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
@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
Should I switch to paper? Whats the main difference / drawbacks
because i heard it's just spigot but better
probably not the best place to talk about other forks here XD
Can I not modify the conditions of every spawner in general in an event or something, and how so?
yes you can do so in an event
I mean i guess but is there any drawbacks?
Please can you tell me which
You can teleport a newly spawned entity, sure
But that's going to do fuck all to the spawn condition requirements
How would I get the cause of EntityCombustEvent ?
There are two sub events
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
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/CreatureSpawnEvent.html
@remote socket
How would I modify the spawn conditions in here?
And is this not the one
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?
π¦
pass a reference of your main class to the other classes @strange grove
then you can do plugin.getIMGName()
ok
So nobody knows how to modify spawn conditions?
https://hastebin.com/asaqasafek.java does anyone know why this doesn't serialize credentials properly?
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
what category the armorstand belongs to in entity-tracking-distance? misc or other?
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
ask your questions
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)
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;
}
What exactly do you mean per world? Please describe it more what you want todo/
iHusker where are my finals
how would i make like aimbot check for anticheat, i have no clue π¦
@keen compass would you refernce it like this? ```java
AnimatedFramesPlugin plugin;
public ImgNameCommand(AnimatedFramesPlugin plugin){
this.plugin = plugin;
}```
π€
ok
good to know
@naive goblet no it's more of a list of kits in /kits
per world
each world has different kits
@strange grove yes like that
THANK YOU @naive goblet I LOVE YOU
https://hastebin.com/ivayagacaf.json
can someone help me
- "enchants": Section. A list of enchants with their level to be applied for the item.
how to add this to my config
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
can you make example or edit this for me
that have option
"enchants": "ALL_DAMAGE:1"?
{
"chance": 0,
"items": [
{
"type": "IRON_INGOT",
"name": "&7Steal Ingot",
"chance": 0,
"min": 1,
"max": 3,
"looting": true,
"enchants": [
{
"name": "DAMAGE",
"lvl": 2
}
]
}
]
}
ok dusan make it an array if you want to
well
You should really watch a yt tutorial on how json works
thats in only one case
i need just this
{
"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?
Oh that's a plugin?
dusan no idea if that any enchants would work then
Does anyone know how to modify spawn conditions for spawners
It depends on the plugin
My Server is crashing
Doesn't sound nice
Does anyone know how to modify spawn conditions for spawners
@remote socket
Yes its pretty simple afaik but well it depends on what you want to accomplish
How does one make spigot messages aligned?
wdym?'
let me explain better:
@strange grove learn to read a stack trace
Actually i'll provide a picture
Itβll help you
How does 1.16 look on the test server?
Better then other pre-releases / though update?
How would i make so the values are always at the same place on the msg
the number goes weird with shorter names
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.
There's a centering API I think
Youβre going to end up with a lot of errors like that
As you do more software development
I mean i could technically use a string builder, and add spaces depending on the username length
The search terms you want to use are βhow do I read a stack traceβ
Add βin javaβ if you canβt find anything java related
thx @gleaming helm
@strange grove the error tells you exactly where the problem is.
StringUtils#center or StringUtils#leftpad @sturdy oar ?
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
@strange grove whilst I agree with Kevin that you should learn stack traces, lines 22-26 are what you're looking for I think
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) ~[?:
No
Yes
Lol
Essentially you look for the error and then it'll have the package name followed by (Class.java:line)
@strange grove
got it
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
got it
That means itβs sorta separated into different modules is an easy way to look at it
It's basically a lot of reading but it's easy to understand
The top one is the MC code, middle is some lib, and the bottom one is the one that usually matters
ah
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β
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
π
but it saying if the event does'nt equal null
yeah event is marked as @NotNull
ok
The right clicked parameter INSIDE the event may be null
But the event itself will never be null
Wait krabs
but
Wait
this is not my code
Thatβs not the command class
oof
that's the problem
Do you call that method in onCommand?
Is that command.java?!
yes
Oh man this code is a mess if it is
Why the fuck are you calling an event from a command
Thatβs probably the wrong class
i'm customizing it for personal use
Thatβs not Commands.java
They probably construct it with null?
That's why they have the if
it get angry
No Just don't touch it
yeah
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;
}```
On mobile so it's super hard to read the code no use putting more
Sure but I can't really read on mobile
ok
Maybe try removing final from the parameters?
ok
And is it called from onCommand
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
onCommand
It'll have to be called that cause it's in the commandexecutor interface
Find classes that implement CommandExecutor
And find the method called onCommand
This plugins kind of a meme
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?
Looks terrible on mobile sorry, you're gonna have to wait for someone else
looks terrible on discord too
i was going to say that but im a bit nicer
Out of curiosity, who wrote it and why do you have it lol
well i have if for a diffrent command
no command checking how do you know its the right one, that in theory shouldnt work at all
* 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?
only Type.IP and Type.NAME exist
so you can find the
author thru github
I think her names or his is inventivetalent
Not much talent but certainly inventing new ways to do things :/
same goes for me
π
i had to use player chat
to make my own replace commadn
to make the player type out stuff
My favourite part is putting all of it in sender instanceof player
to make one singular command lol
And then when it's not, just not having an error
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
I'd suggest you reask your question concisely for the next person to help
Explain "this"
this is this code
what are you trying to do exactly?
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
what is it outputting?
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
need to check if the entity has a custom name set before doing an equals check because the custom name can be null
no you can't @everyone
thank goodness
how is that error at all related to the original code you have
you're not doing anything with URL/links/arguments in the original code
I can't tell if i'm stupid or not but there are currently no spigot snapshot builds right
who
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
Caused by: java.lang.NullPointerException
at org.inventivetalent.animatedframes.Commands.frameCreate(Commands.java:153) ~[?:?]
@naive goblet It was just an example, up to him to know when final should or shouldn't be used.
[Server thread/INFO]: Yodeling_Goat issued server command: /afcreate sharingan https://vignette.wikia.nocookie.net/narutofanmakers/images/3/3a/Three_Tomoe_Sharingan.jpg/revision/latest/scale-to-width-down/340?cb=20100405011535
[16:25:40] [Server thread/ERROR]: null
what is the code for /afcreate
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
yikes
yeah
public void call(PlayerInteractEntityEvent event) {
yeah idk
but it also could be this
that's some wack code right there
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;
}
how could it be multiple lines lmfao
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;
}```
public void frameCreate(final Player sender, final String name, final String image) {```
this top part
embedded listeners is quite a concept
error list
nah
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
i'd just rework the whole thing
I think
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
yeah
maybe
probably img
beacause
i was having a problem just creating an img
and it's not even part of it
How can I get the enchant results from enchantment table?
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
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
so do that?
@frigid ember
well I was gonna
so iguess i actually will
i'll lingeer in chat and look in forums
Can somebody help me?
....
Can somebody help me?
No
:/
you have to define your problem
basically
if you want help
@balmy sorrel
and for me that was hard
good luck
...
moans in headcrab
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.
if(itemFrame.getCustomName() == null);
if(itemFrame.getCustomName() != null){
if(itemFrame.getCustomName() != null){
//run this code
either way, just need to do a null check
instead of assuming the custom name is set
yeah
@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
why is it called a yoda comparision?
Because it's in reverse order
is yoda gay?
oh lol
π
the Objects.equals tho would be better
No it really wouldn't
testing
Nobody uses Objects.equals
in about a minute
well you can have it in any order and it will be fine
And plus, if you know the first parameter is never null
well
if it gave me null
well only then
doesn't that mean
but still could be useful
it will give me null?
um
But calling equals on null is NOT defined
so still do this?
Do this plugin.getIMGName().equals(itemFrame.getCustomName())
And you avoid the null check
You don't need the null check if you use the correct, smart order
ok
because equals() does a null check
You can call equals with a null parameter, but you CANNOT call equals ON a null parameter
Can, but way less clean
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
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
yo can you give me a screenshot of the error?
i think that was the same error
maybe i can help you identify the error better
@tiny dagger Teach a man to fish...
oh you're right
I'm always right
it's talking about an annotated command
how do i get a plugins folder-
and it's on line 169
i'm gonna check that
most likely in commands.java folder
it's rejecting the right click event
ping me if you can answer hehe
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?
getDataFolder()
@idle garden
how do i get a plugins folder-
@idle garden
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
where do i put the code thing
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
I was watching a tutorial on how to make plugins and it's ok for what I want to do in my plugin
can't use tabs in yaml
I am making the plugin as he does, then I will make my original plugin, and he told me to put it there
who is this person
yaml doesn't accept tabs. Not sure how else to tell you
so @keen compass get's a jist of what you're doing
use spaces instead of tabs
i don't get how to make a plugin folder- π
getPluginFolder().mkdirs();
Most times it is created for you when you run the server, and for plugins, they generally make their own
A need help from a Resource Manager!
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
Well I have no idea what is you are doing. Are you making a plugin or trying to setup a server?
i have an aternos server, and i don't have a plugin folder to add a plugin to
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
ok
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
What version of minecraft are you on?
Oh nvm I think I figured it out, I'm on 1.8
Yes xD
Yeah just looking at that
should really use the search function on the javadocs
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
assuming it gives you the results you are looking for instead of trying to think it knows what you are looking for
To be an amazing developer you need to know the best way to google
^
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
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 π
90% it doesn't yield the results I want
@keen compass is there a getOffersβ() for 1.8? I can' find it
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
Check the docs @frigid ember
Or just type βe.β And let it autocomplete some possible suggestions
Yeah I couldn't find anything, is there something else I could use?
the function exists I think you may be using the wrong version?
The prepare item enchantment event is what you want for sure
Yeah I'm using 1.8
Once I switched to 1.8
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.
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
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
My discord has spoken
Why do you need to support 1.8? Is it for someone or something?
Oh
that answers my question
Your discord is probably very biased
And not representative of the community as a whole
Be careful drawing statistical conclusions like that
Make the feature newer version exclusive to incentivize upgrading
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
idk even though my community is small I still want to do what they say
A fan community
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
A bad but possible option is replacing the enchant gui with your own
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
Oh I see
You could rewrite the enchant system but I think that's what your trying to avoid here lol
@keen compass in the newest update is the pvp being changed back to 1.8?
Yeah, not 1.16
βYou can keep pressing the attack button to continuously attackβ
= anticheat ban
.<
@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
Anyone ever tried using docker on a dedi for micro instances of a server
Yes, everyone who uses pterodactyl
It works fine assuming you setup networking correctly
minimal overhead
Honestly you should just set up a Pterodactyl panel
I use docker
Best ever
I can auto deploy and clone and take down servers in my cluster at will itβs awesome
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
https://hastebin.com/ozulaxafiz.cs
could anyone help?
@whole plume what's your problem? no point just sending code and asking us to help lol
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
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;
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;
}
}
}
}````
What is plugin.target
it seems like that should be a method that returns an Entity not void
this is from this forum
What are you trying to do