#help-development
1 messages · Page 1870 of 1
you need to be hella creative for making good anticheats
How does a plugin loader work?
you mean like the (craft)bukkit one?
No
Well some cheats are just easy to detect, like reach since minecraft has info on like how much distance it takes for a player to hit a entity
I've asked this before but what are you trying to do
Not that easy. You will have to account for lag and ping or the experience will be bad
what kind of plugin loader? like injecting a jar into another?
True but for a personal project I don't need to, as its just for my own experience and not to defend real cheaters
It loads another plugin without the plugin being in the plugins folder
Idk if that makes sense
so like your plugins loads a module
but then does it matter to use a reach hack if it gives you no advantage
which is in the folder of your plugin
3.1 good for combos
What do you mean
no it loads an entire other plugins that's is stored in a web server or something
so download and activate it or what
How do you combo though :/ you mean autoclick kind of combo?
okay okay
like really fast
like how pvp gods do
You know how some premium plugins have a loader
a loader for submodules of their plugin
Use the update folder
f.e. rpg plugin has a loader for their custom skills
what
He's trying to make his plugin update itself
I am gonna just continue xD to learn more.
Yikes don't do that
okay look so the loader loads another jar that is stored somewhere but the loader doesn't have the plugin inside of it
no olivo
just find the file in "plugins" and rewrite the data in that file with the update source O.o on the next reload it will automatically load
Then what?
If not auto updating then what you're trying to do is even more of a security risk
And a really bad idea
how come?
Loading jars is fine but don't do it from the internet
You know what I mean though right?
not really
we can just guess
for now we understood you want to download a plugin from web and load it
it loads the jar without the jar being downloaded to the plugin folder
it just loads the files
he dont want the jar to be there
^
he want its functions without the source
just the loader
why?
what "loader" if there isnt even anything to load
Are you working on your client again
you would have to go over an api or some stuff
All I can think of what you're trying to do is backdoor someone
no
lemme guess, your plugins uses something from another jar what you dont want to be in your customers hand
Or open a security risk
so you want to load it but not be existent
no
Then what just tell us ;/
I just don't wanna obfuscate
so yes
my jar
People will grab that jar regardless of what you do
to load the jar it needs to be there
If the code is running on their system they can and will grab it. What you'te trying to do is a security risk. Loading and running things from the internet directly is unsecure
^
obfuscate properly or just dont
there are a bunch of premium plugins that dont obfuscate
some are even os
Freemium model is nice :)
open source everything
Oh yeah i've seen plugins only able to run on linux and not windows
Open source premium plugins are the norm these days from what I've seen
Sounds like bad design and nothing to with what you want
Which is really nice
no im not wanting to do that
is still calling if (looking.get(player) == entity) {
but dont rotate to my direction 🤨
what did you change and any errors in log ?
nothing errrors
is it not turning around at all or only after a few time ?
haha URLClassLoader go brrrr
Yeah
does this mean that it will be imported in the api soon ?
how can I register a command with the command name from a config file? (pretty much register it in onEnable)
Depends on who approved it
If it’s not md_5, the review means almost nothimg
isnt "Yannick Lamprecht" someone who is a helper for md_5 ? ...
Olivio where is the update folder
that is the WorldCreator?
no its about the Enums stuff
What is the best way to get the inv of a chest from the block itself? my method isn't working
ahh this... its a big PR then xd
not rly 😄 just want the Biome to be non-enum anymore
yeah but this PR has many changes... for me is a big for this xd
just some changes in materials and some stuff like that ... not important ^^
Can't remember try finding it online
Cast blockdata to Chest and use getInventory or getBlockInventory depending on what your goal is
Is there a big difference?
getBlockInventory gets the inventory of just that chest. getInventory gets the combined inventory if it's a double chest
@chrome beacon
if (!(block1.getBlockData() instanceof Chest)) return;
Chest chest = (Chest) block1.getBlockData();
Would this work?
y is gradle so slowwww 😩
it should
Yea, 'cuz it ain't working like I want it to
And what's that
Elaborate
Also make sure to cast to the right Chest
I want the chest to be despawned and drop it's contents
this is the right chest
lemme log the data and see what comes out
Then what's the problem
It's returning at the statement, and it needs to continue bcs it is a chest
Print the blockdata object
See what class it is
Ah wait my bad
Use BlockState not BlockData
it despawns it but doesn't drop the items, because when I log the inv, it is all "null"
org.bukkit.block right?
Yeah
I loop through the contents and the ItemStacks are null
Ah okay that's just empty slots
I figured but still, there are no items in there, while there should be
Show the entire code
It's a mess and a lot
Oh well can't help you then
I heard reflections are slow in Spigot, is this true?
about 450 lines of code 😳
no
spigot has nothing to do with reflections, this statement makes no sense
thought so
@tender shard Can you review some code?
this is the first class
it's just the last scheduler that doesn't work
The rest works
so what is it supposed to do?
work on formatting your code better
what's wrong with the formatting?
Despawn the chest, and drop it's contents
i agree
look at the method despawnChest
Yea, that is a mess
USe dropitemnaturally
what do you mean how
looks fine to me?!
how is that hard to read lol
You forgot to change BlockData to BlockState
it would just be easier to read something that has spaces
way too cluttered imo
imho it's totally fine
Line 230
@Override
public ItemStack getItem(){
Material material = Material.getMaterial(plugin.getConfig().getString("items.enderbutt.item"));
ItemStack item = new ItemStack(material);
ItemMeta itemMeta = item.getItemMeta();
itemMeta.setDisplayName(Colorer.colorize(this.getName()));
itemMeta.setLore(this.getLore().stream().map(Colorer::colorize).collect(Collectors.toList()));
item.setItemMeta(itemMeta);
return item;
}```
ig, but it would be EASIER to read if there were more lines
this is how i format my code
I do it like this too
hot
I dont see any problem there
dum
this is the messages I am getting, all of the contents are null
27
no you dum lol
then add an is null check
when writing if statements i would space it out 1 line from the line above
I can't paste images here
how can i rotate the entity relatively? I mean, if the armorstand on the right turns, the one on the left turns behind it, and it will be at the same distance and with the same angle. They will still be in the same position.
link ur spigot account dawg
Did you fix what I told you? Line 230
gotta do that indeed
yes
there is no nested if though
ohhh, i had to do this a while back
block1.getState it is now
Location.setDirection
armorstand.teleport(location)
leme find it
regardless if its nested or not
i still do it
wtf are you talking about
@left swift you can get the vector of the armor stand and use that
this is the method for dropping, there is a null check
vector of location, direction?
otherwise I would get errors, because it can't drop null for obvious reasons
your code looks fine to me, don't listen to those "your code is a mess" people
you can get it of the direction without the location, im trying to find what i did with it
it kinda is, I find it hard to read myself sometimes, may also be because I haven't slept in about 30 hours lmao
go read this book
but anyways, why th are all of the contents null
what contents are null?
@left swift
Nvm had nothing to do with vectors lol
stand.setRotation(plr.getLocation().getYaw(), plr.getLocation().getPitch());
everything in the chest
what line?
you can probably set the location to a modified location where you change the pitch and yaw
I am getting the inventory, looping through it and sending the itemstack, all null
cause i was working with an armorstand
235-240
so it would be....
because you create a new itemstack array, of couirse it's empty: line 235
I do not know if this is what I am looking for, I wish that if the first turns, the second turns similarly, but changes its location relative to that, it will still be behind it
ItemStack[] items = new ItemStack[chest.getInventory().getContents().length];
You create an empty array, then loop over it. Of course it's empty
ohhh
smh. If this works now, I'm a very smol brained man
are you looking for the event?
It will fix it
for when a player or entity looks somewhere?
Just loop getContents
yea ok, it did, I'm actually dum. Thanks all
np 😄
You would want to get the vector of where the player is looking -Y, and then just teleport the entity like a black backwards from it
Not sure how I missed that
@left swift
I am not looking for an event for a player, but for an entity, and I am not sure if there is such an event for entity insetient / living
Im sure protocollib has something for that
Leme check
@left swift
Id recomend looking up how to work with protocollib, its kinda confusing at first
https://www.spigotmc.org/threads/rotating-particle-effects.166854/ and it cannot be used in any way? I tried but I failed, maybe someone else has an idea?
wdym?
Particle effects arent entities
At least i dont think so 😳
i mean vectors, for example
private Vector rotateAroundAxisY(Vector v, double cos, double sin) {
double x = v.getX() * cos + v.getZ() * sin;
double z = v.getX() * -sin + v.getZ() * cos;
return v.setX(x).setZ(z);
}```
I dont do math very well. lol
I would legit just do this, hold up
Use protocollib to grab the EntityRotation packet, and then steal the yaw, and pitch of entity1. Then calculate one block behind because you now have its yaw and pitch you can use to create a vector, and use that location to set entity2
@left swift the position can be given by r*cos(yaw) and r*sin(yaw) where yaw is in radians
The armorstands will always be facing in the same direction too
when r is radius or what?
Correct
Any way to use hex colors in TextComponents? Whenever I do, it just uses the minecraft color code of the last digit in the hex code (e.g. #123456 turns into &6).
Currently using Spigot's ChatColor.of(<hexcode>). Works great in normal messages, just not in text components.
ChatColor.of(Color)
Color.of() in string format?
Like I said, I'm using ChatColor.of(), but when that's used in TextComponents, it's turning into whatever Minecraft color corresponds to the last value of the hex code
wait how will i get a location out of this? i mean x y and z relative to the first entity.
cos is dX, sin is dZ
I use the same api and dont run into issues. What version or spigot?
1.17.1
How do you use it in components?
I'm trying to create a skull with a specific player as an owner, but when I create SkullMeta it says i need a new statement. But when i put it there, it says its abstract and cannot be instantiated
TextComponent example = new TextComponent(Color.parse("𞉀Example message here"));```where `Color.parse()` is using a regex pattern to replace any matches for `&<hexcode>` with the returned value of `ChatColor.of(<hexcode>)`
You have to get the item meta of the itemstack
And cast it to skullmeta
maybe this helps https://github.com/JEFF-Media-GbR/JeffLib/blob/master/core/src/main/java/de/jeff_media/jefflib/SkullUtils.java
that helped, thx
That wouldnt work. Set the color explicitly on component using setColor.
I don't need to convert hex to RGB. I already have stuff for that, but that's not the issue.
md_5's dirty hack doesnt seem to work on components
So I'll have to have individual components for each color? Great...
yes. Thats how modern minecraft works.
Correct, the whole idea behind text components was to make them serializable
And to do that it’s best not to merge formatting into one string
Gotcha
i'll recommend you taking a look on adventure - it had much nicer api, and minimessage - with those you will have power of chat components with easy format
gradient:#69ff33:red<click:run_command:'/say hello'>Click here to say hello!
Adventure?
where you fou
nd those methods?
just when get close
Yes, a minecraft text library called adventure
ah ok
A librabry
Gotcha, I'll take a look
Hello Im trying to use color codes in my server but they dont work. im using spigot 1.8.8.
(freshly downloaded one)
Downloaded from where
bukkit's website
What has spigot development become, people trying to create computers in minecraft and armor stand stuff
You must use buildtools
Me being proud of myself when making an item drop from a mob 😄
Ok
have u maybe any example of using that? it does not work for me
you gotta show some code
Location loc = getBukkitEntity().getLocation();//first entity
Vector vector = new Vector(Math.cos(-loc.getYaw()), 0, Math.sin(-loc.getYaw()));
front.setPosition(loc.add(vector).getX(), loc.add(vector).getY(), loc.add(vector).getZ());//second entity```and it is in bukkit runnable
second entity
is it an entity?
armorstand
what spigot version are you using? setPosition isn't a valid method
looks like you're using nms?
1.17.1, yeah it is nms
does it have to be?
yes i am registering my own entity for this using nms
Hey! i'm new in bungeecord plugins, and i would like to know the way to check if player has a permission, i have done something like this:
but then how do they asing that perm?
your yaw is negative, and it's in degrees
i dont understand why it's negative and it should be in radians
secondly, when you use location.add(vector), you add the vector 3 times
you only need to add it once
eh it might actually need to be negative anyways, but we can solve that later
why 3 times?
your code adds it 3 times
do you see that?
you add it once for X, add it again for Y, and add it again for Z
you only need to add it once for all of them
loc.add(vector);
front.setPosition(loc.getX(), loc.getY(), loc.getZ());```
will be ok?
yes
i also gave you the wrong sin/cos too
minecraft treats angles differently
your dX will be -sin(yaw) and you dZ will be cos(yaw)
(multiplied by the radius still)
ok, I think it works, but the second entity is still to the left of entity, how can I change it?
can you show a screenshot?
which one are you setting the position of
left
so its not moving?
it moves, but the entity for which to set the position is always to the left of the main entity.
can you show your code again?
Location loc = getBukkitEntity().getLocation();
Vector vector = new Vector(1 * Math.cos(Math.toRadians(-loc.getYaw())), 0, 1 * Math.sin(Math.toRadians(loc.getYaw())));
loc.add(vector);
front.setPosition(loc.getX(), loc.getY(), loc.getZ());```
can I run My Spigot Plugins on Paper Server?
yes
ok
it's still on the side, plus it turns the opposite side to the main entity's yaw
if i send actionbar via player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(text));, how would i change the time it is shown?
what are you using to change the position of the main entity?
how to get all active async tasks within the plugin?
Or ones that are scheduled to execute code later
is it a bukkit or spigot thing?
pathfinders
i will send u a video how it works now, give me a sec
this is not possible
can i here send a link to video?
should be able to
what is your mission there O.o
oh im overcomplicating things
just use entity.getDirection() and subtract
meaning
use the main entity's location
subtract its direction
and you have it behind
if he is trying to set specific yaw/pitch he should use Locatioin-setDirecton ^^
in general, it is setting the position of the second entity relative to the first entity taking into account rotation etc. Currently working, but it is always on the left side
dir = entity1.getLocation.getDirection
entity2.teleport(entity1.location.add(dir))
?
🥄
😄
🥄
ok, it works with add(vec) when i want to set it in front of the main entity, and substract(vec) when i will set it one the back, but what if i want to set it on the left or right side?
where is the builded jar?
build/libs
aha, thank you
your solution dont even answer his question
how would i schedule a repeating task that will only run of certain time (count), without declaring some variable, incrementing it in each run and canceling it when the count reached?
thats how you build a gradle project, independently from IDE.
https://i.imgur.com/OaDGRmD.png
you need to have a variable
whats wrong with using a variable?
ok, i already did that way, i was wondering if there is a shorter way
and i dont think there is another way
unfortunately not, i wish for the same functionality haha
i just wondered that scheduler may provide some ready method for that
@glossy scroll
you would need to swap x and z values
ok vector i is new Vector(0, 1, 0)
LEFT is i cross direction
RIGHT is direction cross i
or just negative left
yea i guess that works for 2D
dont do that for 3D 😅
So i am creating a plugin that is suppose to do stuff when you throw a snowball with specific name and i have that part working. But i ran to an issue of the playerinteractevent triggering twice whenever i right click with a snowball. Thought at first it was because it triggers both on main and off hand, but with a quick check, it triggers it twice with main hand. How can I stop that?
cross product is less confusing ???
i think multiply and add/subtract stuff is way more complex then just swap 2 values 😄
considering you have a method to do the cross product
and is generally widely accepted in mathematics
id say its a lot less confusing
swapping the values is technically faster, but harder to read
comments ^^
Works, thx!
i want to when someone that has my custom item when he right click at mob it will strike them with lighting
And it triggers twice with main hand only if i right clicked air
bro did you still not manage to do this?
learn basic java
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
if you won't do that you will still be asking this question in 2 years
?jd
Yes
I want to make a premium plugin, but i dont wanna do forum posts 😩
premium plugins overrated
do an opensource plugin instead
Listen to an event for right click and then send out a (idk what its called, a ray maybe?) and get the entity it collides with, and then summon lightning on that entities location
If you cant do that, then ?learnjava
if you use google you would get 100 different answers to that too
open source premium plugin 😏
check if right click is with main hand, or off-hand
return if its in the hand you dont want
usually off-hand
he did that ^^
without code we wont know 😄
wdym, arent we all-knowing?
idk if ur joking or not but this is the best way to do a premium plugin
oh yes ... how could i not know that
open source
ik
you couldnt
i mean his quirk is right
i have observed multiple interact event calls when right clicking the air
i forget why it happens
maybe when holding down, and releasing?
One for each hand.
I confirmed the check is correct, but both calls are from the main hand
we already ruled that out
does Inventory#getContents() return armor slots too or only the inventory?
yes
i mean you can just add a cooldown
¯_(ツ)_/¯
it does get armor slots
thanks
a 0.5 sec cooldown
if you're trying to detect the launch of a snowball
just use ProjectileLaunchEvent
I need to detect if the item had a certain name
is it weird that i like working with events, and other non-command stuff more than commands
commands are annoying to me
hmm
i forget if the event is called before or after the item is removed from inventory
after
does it even matter if it's called twice?
thats why i said just do a cooldown of like 0.5 secs
hey! could someone tell me why is this happening?
at me.fragment.globalmessage.sql.MySQL.<init>(MySQL.java:11)
at me.fragment.globalmessage.GlobalMessage.onEnable(GlobalMessage.java:35)
at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:265)
at net.md_5.bungee.BungeeCord.start(BungeeCord.java:285)
at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:67)
at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)```
that feels hacky tho
not enough information
and learn to read stacktraces
Technically atm, no. But preferably i would like to get it only fire once to avoid problems in future
it's the only thing that appears in the console while enabling my plugin
well you should still learn to read the stacktraces
it says i have a problem here
^^
But don't know why
likely one of those things is null
@acoustic pendant send the full stacktrace (error)
3 things could be null there. Either the instance itself, the configuration, or the section it’s trying to grab.
java.lang.NullPointerException
at me.fragment.globalmessage.sql.MySQL.<init>(MySQL.java:11)
at me.fragment.globalmessage.GlobalMessage.onEnable(GlobalMessage.java:35)
at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:265)
at net.md_5.bungee.BungeeCord.start(BungeeCord.java:285)
at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:67)
at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)``` this is the full error
so you lied to me? lol
ill tell you exactly what is null
hold up
well the first one is null
im betting configuration is null
(the rest are probably null too)
same
i don't think so
What is GlobalMessage
well have you tried to debug it?
my plugin
that'd be the next step
So your trying to statically grab your plugin?
it is, its just disabling itself right after right?
what class is this in
More like it’s not finishing its startup process.
show us the method where you instantiate this class
samme thing
Can you please share more of the class?
@Override
public void onEnable() {
// Plugin startup logic
instance = this;
file = new File(ProxyServer.getInstance().getPluginsFolder() + "/config.yml");
this.SQL = new MySQL();
this.data = new SQLGetter(this);
try {
if (!file.exists()) {
file.createNewFile();
}
configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(new File(getDataFolder(), "config.yml"));
configuration.set("host", "localhost");
configuration.set("port", "3306");
configuration.set("database", "example");
configuration.set("username", "root");
configuration.set("password", "");
ConfigurationProvider.getProvider(YamlConfiguration.class).save(configuration, new File(getDataFolder(), "config.yml"));
} catch (IOException e) {
e.printStackTrace();
}
ProxyServer.getInstance().getPluginManager().registerCommand(this, new create());
ProxyServer.getInstance().getPluginManager().registerCommand(this, new change());
ProxyServer.getInstance().getPluginManager().registerCommand(this, new announce());
}```
this is the onenable method
is onEnable in GlobalMessage?
instance is probably null
im assuming your using getInstance to pass in the instance
But it looks like your getting it statically
Whoa, what is ProxyServer? @acoustic pendant
public static GlobalMessage instance;
you instaniate configuration AFTER you call new MySQL
So instance = this wouldnt run right?
yea thats probably it
so its going to be null
ignore me then
oooh
That’s the very first line, it’s instantiated. The rest of the code is where the problems lie
that's dumb lol
let me try
its really not
how else do you expect code to run?
completes things one step at a time
anyoen know why this bug occurs? i pickup the water and it doesnt let me pick it up as intended, but it also removes the water for some reason. Heres the code https://paste.lucko.me/heG6quWb45
idk how static works tbh
static means it belongs to a class
not an instance of the class
very simple explanation
the same problem
show us onEnable again
is it because of the
event.getBlockClicked().getRelative(event.getBlockFace())
and
event.getBlockClicked();
Yea, so if instance is == to this wouldnt it be null if gotten statically?
@Override
public void onEnable() {
// Plugin startup logic
instance = this;
file = new File(ProxyServer.getInstance().getPluginsFolder() + "/config.yml");
try {
if (!file.exists()) {
file.createNewFile();
}
configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(new File(getDataFolder(), "config.yml"));
configuration.set("host", "localhost");
configuration.set("port", "3306");
configuration.set("database", "example");
configuration.set("username", "root");
configuration.set("password", "");
ConfigurationProvider.getProvider(YamlConfiguration.class).save(configuration, new File(getDataFolder(), "config.yml"));
} catch (IOException e) {
e.printStackTrace();
}
this.SQL = new MySQL();
this.data = new SQLGetter(this);
ProxyServer.getInstance().getPluginManager().registerCommand(this, new create());
ProxyServer.getInstance().getPluginManager().registerCommand(this, new change());
ProxyServer.getInstance().getPluginManager().registerCommand(this, new announce());
}```
show us the error
Static is a little weird, but it still follows the basic rules. You need to declare something and then initialize it. Even if it is static.
It belongs to the class itself.
java.lang.NullPointerException
at me.fragment.globalmessage.sql.MySQL.<init>(MySQL.java:11)
at me.fragment.globalmessage.GlobalMessage.onEnable(GlobalMessage.java:51)
at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:265)
at net.md_5.bungee.BungeeCord.start(BungeeCord.java:285)
at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:67)
at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)```
now you debug
What is line 11 in your MySQL class?
System.out.println
getting a string from console
private String host = GlobalMessage.getInstance().configuration.getString("host");
Your configuration is likely null.
what type is configuration?
if configuration was null it'd error out in onEnable
I don’t see where you initialize configuration in your onEnable.
now im starting to doubt you even copied the plugin correctly
No it wouldn’t.
could be lol
if (!file.exists()) {
file.createNewFile();
}
configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(new File(getDataFolder(), "config.yml"));
configuration.set("host", "localhost");
configuration.set("port", "3306");
configuration.set("database", "example");
configuration.set("username", "root");
configuration.set("password", "");
ConfigurationProvider.getProvider(YamlConfiguration.class).save(configuration, new File(getDataFolder(), "config.yml"));
} catch (IOException e) {
e.printStackTrace();
}```
i'm debuging anyways
At least not with how this is setup.
right here
That’s your declaration. You need to initialize it.
i do it here?
do you not see that it's initialized? lol?
...
show us getInstance
My bad. I didn’t see it.
is Configuration your own class?
if so can you show us getString
if not i want to know what library that belongs to so i can see the jd
found it
declaration: package: org.bukkit.configuration, interface: Configuration
i don't have any class called configuration
disregard
what does that mean
the only other option is that getInstance is null
"nevermind" ig
@acoustic pendant is there any reason why you’re not just using FileConfiguration?
i'm in bungee
lets not deviate from the problem here
Ah
wait
i did debug
strange thing
check this
18:41:22 [INFO] 2
18:41:22 [INFO] 3
18:41:22 [INFO] 4
18:41:22 [INFO] 4.1
18:41:22 [INFO] 4.2
18:41:22 [INFO] 5
18:41:22 [SEVERE] java.io.FileNotFoundException: plugins/GlobalMessage/config.yml (No such file or directory)
18:41:22 [SEVERE] at java.io.FileInputStream.open0(Native Method)
18:41:22 [SEVERE] at java.io.FileInputStream.open(FileInputStream.java:195)
18:41:22 [SEVERE] at java.io.FileInputStream.<init>(FileInputStream.java:138)
18:41:22 [SEVERE] at net.md_5.bungee.config.YamlConfiguration.load(YamlConfiguration.java:77)
18:41:22 [SEVERE] at net.md_5.bungee.config.YamlConfiguration.load(YamlConfiguration.java:71)
18:41:22 [SEVERE] at me.fragment.globalmessage.GlobalMessage.onEnable(GlobalMessage.java:45)
18:41:22 [SEVERE] at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:265)
18:41:22 [SEVERE] at net.md_5.bungee.BungeeCord.start(BungeeCord.java:285)
18:41:22 [SEVERE] at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:67)
18:41:22 [SEVERE] at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)
18:41:22 [INFO] 9
18:41:22 [INFO] 10
18:41:22 [WARNING] Exception encountered when loading plugin: GlobalMessage
java.lang.NullPointerException
at me.fragment.globalmessage.sql.MySQL.<init>(MySQL.java:11)
at me.fragment.globalmessage.GlobalMessage.onEnable(GlobalMessage.java:60)
at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:265)
at net.md_5.bungee.BungeeCord.start(BungeeCord.java:285)
at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:67)
at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)```
@Override
public void onEnable() {
// Plugin startup logic
System.out.println("1");
instance = this;
System.out.println("2");
System.out.println("3");
try {
System.out.println("4");
if (!file.exists()) {
System.out.println("4.1");
file.createNewFile();
System.out.println("4.2");
}
System.out.println("5");
Configuration configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(new File(getDataFolder(), "config.yml"));
System.out.println("6");
configuration.set("host", "localhost");
configuration.set("port", "3306");
configuration.set("database", "example");
configuration.set("username", "root");
configuration.set("password", "");
System.out.println("7");
ConfigurationProvider.getProvider(YamlConfiguration.class).save(configuration, new File(getDataFolder(), "config.yml"));
System.out.println("8");
} catch (IOException e) {
e.printStackTrace();
System.out.println("9");
}
System.out.println("10");
this.SQL = new MySQL();
this.data = new SQLGetter(this);
ProxyServer.getInstance().getPluginManager().registerCommand(this, new create());
ProxyServer.getInstance().getPluginManager().registerCommand(this, new change());
ProxyServer.getInstance().getPluginManager().registerCommand(this, new announce());
}```
ok so why
do you have two different files
new File(ProxyServer.getInstance().getPluginsFolder() + "/config.yml")
new File(getDataFolder(), "config.yml")
you should just be using one of them
why do you do configuration.set
idk about bungeecord so i'm following guides xD
also i advice instantiating two different file objects with the same contents
i edited the message, would be like that?
because i need two types this is looking like this :/
just make a variable of File file = new File(getDataFolder(), "config.yml")
i dont have an object to load if i'm loading it, sounds obvious
well now your file is null
everything was right
you just needed to change new File(ProxyServer.getInstance().getPluginsFolder() + "/config.yml") to new File(getDataFolder(), "config.yml")
let me try
Bungee doesn't use YamlConfiguration and the other things from spigot?
Obviously its fine lol if it compiles
what am i looking at
Configuration configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(new File(getDataFolder(), "config.yml"));
yea yea i changed that
the plugin loads its default config file when requesting it for the first time
but yea you changed it 😄
does the lava tick go lower after a certain period of time?
I'd like to know if there is a list of plugins lookin for contributions
Don't know of a list but maybe check open source plugins
Should i use the bukkit permission system through my plugin.yml, or should i just hardcode it into my plugin with if (plr.hasPermission())
I would have to learn how to bukkit system works
setDisplayName deprecated, what should I use instead?
setDisplayName of what
If I want to support Minecraft 1.13 ... which java compiler target should I set?
I'm currently using jdk 17 and should I compile for ? jdk-8?
8
8 8 8 8
has always been 8?
setting permissions in plugin.yml is the intended way
what do you mean?
If I want to support even older edition, how do I check what is the required target?
just use java 8
noone is using older versions
20% are on java 8, everyone else uses newer versions
Java 7: 0.0% 💀 💀
3 people in total lol
is that a bug or what
also how tf are there servers on java 18
hasn't java 17 just released
but what i dont is how do i turn it into a json object
Thanks a lot, where I can find this?
new JsonObject or stuff like that, then pass the string
bstats.org, global stats
look on google how to get json response from a website
1 minute of searching
also i suggest using this extension if you use google chrome https://github.com/callumlocke/json-formatter, an overall must have extension for anyone probably
where can i learn customizable world generation for chunks? like i wanna learn how to make a method for creating chunks of world generation, and then make like sliders in game for stuff like size, how smooth the terrain is and other cool stuff
for the world generation stuff look into the sc of Terra
for the sliders in game thing, impossible i think, maybe something with the player's hotbar
its not in the spigot api ^^
is there any standard library to avoid the hassle to write boilerplate code for registering commands?
I was looking at WorldEdit implementation and they use PistonFramework an internal library
but you can find it here(1.18.1 mostly) https://www.spigotmc.org/resources/advancedworldcreatorapi.89100/
there are multiple things you can do:
create your own registerhandler for cmds
use PlayerCommandPreprocessEvent
use nms to use miencraft ones
https://www.spigotmc.org/threads/tutorial-how-to-register-unregister-custom-commands-at-runtime.493956/ or follow this tutorial
bstats is very cool ^^
also interesting that many ppl support 1.8.8 just for 7% of the servers^^
where can i read tera's source code? im tryin to find it in their github and in struggling
if your talking about that:
https://github.com/PolyhedralDev/Terra
im in their github, i just dont know what im searchin for
im not very good at spigot and java
yeah lol. I only support 1.16.3+
Thanks a lot for your time, really interesting
i support nothing older then the newest version ... i use too much nms and dont want to make sure that everything works backwards too
How can i test my plugin on a 1.12 server? Because to get a 1.12 server from BuildTools, i need Java 8, which i don't have. I can't make me an account on oracle because i don't have business phone number and stuff like that.
just enter any phone number lol. or download some other jdk
you can find java 8 without oracle ^^
if you're on linux just apt-get it
Which other jdk's are there?
I am on Windows
but i cant find some directorys
check the link I sent, they have java 8, 11 and 16
ok thanks man
which ones?
do you have a webserver installed? if so, which one?
let's move to #help-server
What is temurin?
no idea
im in terras source code and this is not really what im used to, im used to having bigger classes that have like everything relating to that class in it, not this many short classes that just link to other classes
Ok because i had to download it
tbh it doesn't matter at all what JDK you use
ok thanks
should all plugins start at v0.0.1?
noone cares
I start with 1.0.0-SNAPSHOT and rename it to 1.0.0 once it's released the first time
what about custom plugins?
there's no official "release" for custom plugins
adoptium is your friend
thanks
for what ?
?
noone cares
you can use "MyNameIsJeff" as version string
what do you search there and what do you want to do with it
or "1337.420.69"
^^^
and i already answered to that too
and how to learn is not the way your going -> you should understand the spigot api and not copy paste everything
i wanna make my own thing doe, i don't wanna use a worldgen api
you want to create a custom world without using the spigot api ? thats litterly the funniest idea today ^^
Worldgen API != Spigot API
no, i dont want to use a worldgen api, not the spigot api
you dont have to use a worldgen api.... but the spigot api is limited too
guy
you neither want to use a world gen api nor spigot?
s
I'm pretty sure he just wants to use Spigot.
i want to use spigot
you would need to use nms for this... and i dont think you know enought about the spigot api to create a fully custom world ...
not terra or advancedworldgen though
public static ItemStack item(Material material, String name, List<String> lore) {
ItemStack item = new ItemStack(material);
ItemMeta meta = item.getItemMeta();
meta.displayName(Component.text(name));
meta.lore(lore);
item.setItemMeta(meta);
return item;
}
how?
lore
ItemBuilder 
declaration: package: org.bukkit.generator, class: ChunkGenerator
i dont wanna make a custom world, i wanna make a custom chunk
SchinkenBuilder
NEIN
me?
idk what im suppoed to do with this
just a single chunk ?
maybe instead of that static thing
Do you know how to use the WorldCreator ?
Use setLore
lore is just a List<String> ?
deprecated
No it's not
i wanna be able to make chunks like they were taken from the overworld and then customize them, and make more than 1 chunk
then use setLore
public static ItemStack item(Material material, String name, List<String> lore) {
ItemStack item = new ItemStack(material);
ItemMeta meta = item.getItemMeta();
meta.displayName(Component.text(name));
meta.lore(lore);
item.setItemMeta(meta);
return item;
}
Use setLore anyways
lore
Are you using Paper?
Yeah ignore the deprecation.
so you want to create a custom world ... and for that you will need the
WorldCreator of bukkit/spigot
then set the generator to a new ChunkGenerator and there you can implement the design of your custom chunk
it works with DisplayName
if you just wanne create some small structures as addon you should look for BlockPopulator
i dont want to make a full custom world, only chunks
Yeah because you're passing a Component like Paper wants. If you want support for the Paper method you need to go to Paper's Discord.
Otherwise, use the "deprecated" Spigot method. 
@glossy scroll Hey, sorry for the ping, but I have a question for these armorstands, why if they have no gravity or are markers, at the beginning they completely diverge for some time, and only after about a minute / 30 seconds do they set themselves in the correct position? I am attaching a video of what it looks like. https://www.youtube.com/watch?v=HpEv8v2wVqk&ab_channel=Tuso
yes... but you should know that the world is full of Chunks ^^
okay
if you wanne create your chunks completly new you have to use the WorldCreator
so i cant make only custom chunks?
you can modify it with BlockPopulators ... but lag
will i have to make a whole world?
likely has nothing to do with the math
just creating chunks wont work ^^
but otherwise i dont know
is there a getEyeLocation in Armorstands ?
i think this can have a different Direction then just getLocation
wait so what does chunkgenertor do
well sadly i dont know any tutorial for the new chunkgenerator ... but i hope you use 1.18 ?
i use 1.18.1
btw... what do you do ?
looks like you check for collision or smth ?
Custom entities with custom models (using resourcepacks). Armorstands will hold models but i need more than one armorstand for this so i want to move them together somehow.
it works normally, at the end of the video you can see what it should look like. This only happens when I disable gravity for side armorstands or when they are markers
op has every permission including plugin permissions?
Does anyone know a place where it is explained how craftbukkit is made and implemented? i'd love to know more about this.
basically you create a world with a
WorldCreator creator = new WorldCreator....
then you apply seed or name and other stuff but for chunks you need to use:
creator.generator(new ChunkGenerator()....)
you can either create a class and extend chunkgenerator (you should do this) or implement the methods directly there...
then you can use the methods of the ChunkGenerator to modify the Chunks... you can set if the chunks will have bedrock and other stuff... also the Height of each x/z cord.
Unless those plugin permissions have default: false
wym?
What part of that is confusing?
wym default: false
When you create a permission
You can specify the default to either true, op, or false
Plugin.yml
ah ok
Can you create a command in bungeecord wich not overrides spigot commands?
Dont use taken names?
Yeah I mean like it’s just listens to /afk to register if a player is afk or not
i still dont really know what to do, is there a tutorial for this, and also i dont want to make a world, i want to make chunks
you said now 10 times that you want to make chunks
and i said now 10 times that chunks only exist in worlds
and if you dont want to create a world but still want to modify chunks you should use BlockPopulator for this.
But they are not good for creating complete chunks
https://bukkit.fandom.com/wiki/Developing_a_World_Generator_Plugin
its quite otdated since "generateChunkData" is replaced with more specific methods to call different stages of generation -> server is faster
wait, what do you mean by "chunks only exist in worlds"
do you think i dont know that you have to have a world to place blocks in?
what would be the best way to create a bunch of runnables for certain players, and then cancel one of them after a condition is met
yes exactly. it rly sounds like this since dont want to create a world but want to create chunks
the canceling part is what idk what to do
do you need the runnables to run more then 1 time or just a delay ?
more than once
i meant that i dont want to make a full world with custom terrain, only individual chunks with custom terrain
Store the task into a variable so you can cancel it later
but there could be infinite number of them depending on what happens in the server
and for every player you can use HashMap or create a small class to save more data too
help please, i am trying to use my project via jitpack but jitpack gives the following error in log (i am using NMS)
- What went wrong:
Execution failed for task ':v1_13_R1:compileJava'.
Task :v1_13_R1:compileJava FAILED
Could not resolve all files for configuration ':v1_13_R1:compileClasspath'.
Could not find org.spigotmc1.13-R0.1-SNAPSHOT.
Searched in the following locations:
- file:/home/jitpack/.m2/repository/org/spigotmc/spigot/1.13-R0.1-SNAPSHOT/maven-metadata.xml
- file:/home/jitpack/.m2/repository/org/spigotmc/spigot/1.13-R0.1-SNAPSHOT/spigot-1.13-R0.1-SNAPSHOT.pom
- https://repo.maven.apache.org/maven2/org/spigotmc/spigot/1.13-R0.1-SNAPSHOT/maven-metadata.xml
- https://repo.maven.apache.org/maven2/org/spigotmc/spigot/1.13-R0.1-SNAPSHOT/spigot-1.13-R0.1-SNAPSHOT.pom
Required by:
project :v1_13_R1
You can cancel them from within
ig i could try hashmap
tried that doesnt seem to work
like i have pdc for someone and when the pdc changes it will cancel the runnable
because im using the pdc anyways
on local machine it compiles successfully, and i built 1.13 with buildtools
If i set two entities' locations to the same location instance will they always be teleported to each other
no
dammit
but location.add changes the entitiy's location that uses it
so would it work for multiple
if(player.getPersistentDataContainer().get(new NamespacedKey(Main.plugin, "test"), PersistentDataType.INTEGER) == 0) {
this.cancel();
}
that doesnt work
?????
not rly ... if you use getLocation() from the entity you get a copy
they are??
They arent
But ^
does setLocation set a copy
setLocation is not existing?
you can use teleport ^^
but this also only copy the data of the location
plz
When i try to run BuildTools in 1.8, i become this error after a bit of time.
Attempting to build Minecraft with details: VersionInfo(minecraftVersion=1.8, accessTransforms=bukkit-1.8.at, classMappings=bukkit-1.8-cl.csrg, memberMappings=bukkit-1.8-members.csrg, packageMappings=package.srg, minecraftHash=null, classMapCommand=null, memberMapCommand=null, finalMapCommand=null, decompileCommand=null, serverUrl=null, mappingsUrl=null, spigotVersion=null, toolsVersion=0)
Exception in thread "main" java.io.FileNotFoundException: work\minecraft_server.1.8.jar (Das System kann die angegebene Datei nicht finden)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:228)
at java.util.zip.ZipFile.<init>(ZipFile.java:157)
at java.util.jar.JarFile.<init>(JarFile.java:171)
at java.util.jar.JarFile.<init>(JarFile.java:135)
at org.spigotmc.builder.Builder.main(Builder.java:411)
at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27)
What should i do?
stop using 1.8 is a good idea
^
ppl use it for pvp
lol
you dont even have to use 1.8 for pvp
1.9 pvp is better anyway
you can never perfectly replicate 1.8 pvp tho
you probably have more errors before so your jar does not created
🌞
Yes you can
also are shapeless recipes supposed to appear in recipe book
of course you can
do the packets sent literally equal packets sent in 1.8?
Wat
welp i broke something lol
also is there a way to keep someone in a crawling position sending block changes isnt workign
please help
oopsies i set it to 1
thats why it wouldnt cancel
what the heck is wrong with you
why would anyone try to run BuildTools for 1.8?
or did you forget a 1 in the version string?
@spiral light so maybe have u got any idea?
No i mean 1.8. Because i want to test my plugin on a 1.8 spigot server
There are people who use 1.8 and i would test it before release it
dont know how your code looks like but my gues was the direciton of the entity.getLocation() and entity.getEyeLocation() can be different... but dont know if armorstands have this ...
if you still need help tomorrow you can dm me or ping me ... maybe i will not find your ping but dm always should work
any other ideas on how to force crawl
there's also people using windows 98
Really?
main entity (on the middle) is normal entity, entity insetient / living. Its my own entity type with armorstand model, so i can use pathfinders on it etc. SO it has normal entity methods
1.8 is the most popular pvp version
do anyone worked with jitpack???
1.8 is the most outdated version that some cave people are still using
What are you trying to do
jitpack is the like the MC 1.8 of all the repos
like: it sucks
jitpack easily is the worst repo out there
i am trying to use my repo with jitpack, but it gives the error:
Execution failed for task ':v1_13_R1:compileJava'.
Task :v1_13_R1:compileJava FAILED
Could not resolve all files for configuration ':v1_13_R1:compileClasspath'.
Could not find org.spigotmc1.13-R0.1-SNAPSHOT.
Searched in the following locations:
- file:/home/jitpack/.m2/repository/org/spigotmc/spigot/1.13-R0.1-SNAPSHOT/maven-metadata.xml
- file:/home/jitpack/.m2/repository/org/spigotmc/spigot/1.13-R0.1-SNAPSHOT/spigot-1.13-R0.1-SNAPSHOT.pom
- https://repo.maven.apache.org/maven2/org/spigotmc/spigot/1.13-R0.1-SNAPSHOT/maven-metadata.xml
- https://repo.maven.apache.org/maven2/org/spigotmc/spigot/1.13-R0.1-SNAPSHOT/spigot-1.13-R0.1-SNAPSHOT.pom
Required by:
project :v1_13_R1
alternatives?
host your own
Send your pom
e.g. nexus https://hub.jeff-media.com/nexus/
Nexus Repository Manager
Why have I never thought of that 
So is there a way to get the 1.8?
if you need spigot, you have to compile it yourself on jitpack's build server
check archive.org
yeah, i use NMS, how would i do that?
I can show you my gitlab ci file but it probably won't help you
so how to force crawl
nvm I changed how it works
import kr.entree.spigradle.kotlin.spigotAll
plugins {
java
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
group = "com.aregcraft.delta"
version = "1.0-SNAPSHOT"
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
compileOnly(project(":shared"))
compileOnly(spigotAll("1.13"))
compileOnly("org.projectlombok:lombok:1.18.22")
annotationProcessor("org.projectlombok:lombok:1.18.22")
}
if you just wanna publish sth I can give you an account for my public community repo if you like
everything is better than jitpack
I mean, if spigot has the 1.8 with BuildTools on the website, it mzst be there
I normally do not help people who still think that 1.8 should be used but
why don't you just try at least one of the actually still-in-use versions?
1.8.8
like I can promise you that NOONE runs 1.8.0
if people are so stupid to still use 1.8, at least they use 1.8.8
@vale ember
Or 1.8.9
yep, i'd like
I think it's the same on the server side, 1.8.8 and 1.8.9 only have client changes irrc
oki i'll create an account
Oh, no idea
do you know how to setup the authorization in your settings.xm?
It was like 7 years ago so who knows at this point LMAO
honestly, no, also i use gradle
oh yeah sorry, I forgot
okay you'll have to google that yourself then, I'll dm you the account details in 2 minutes
ok, thanks
if I need externals deps I still need to shade them, right?
I am aware of "libraries" options but seems a preview feature
Ok i just wanted to test it because you can say on spigot when you release a plugin you can say if you tested it on a few versions. Also 1.8 and 1.7
Should still work perfectly fine as long as the libraries are from maven central
but should I use it? What are the implications if someone is running an older spigot version?
Probably wouldn't work then. If you're supporting multiple versions then you need to shade or require them to install other plugins.
Oh okay, thanks a lot
?
does buildtools no longer build the patched server jar?
btw you should use toolchain instead of sourceCompatability/targetCompatability
does anyone else want upload access to my community maven repo? i
patched? wdym?
like the jar with all the api changes in it so that i can add it to my buildpath
It does
When I add it I get redlines all underneath my code and errors that org.bukkit doesnt exist
if you are offering
Are you using maven/gradle?
huh thats new
I have a gradle project ready with this inside of it: repositories { maven { url = uri("https://papermc.io/repo/repository/maven-public/") } } dependencies { compileOnly("io.papermc.paper:paper-api:1.18.1-R0.1-SNAPSHOT") } java { toolchain.languageVersion.set(JavaLanguageVersion.of(17)) } but not sure how to get the ide to understand these dependencies
sure, I can give you wcredentials in 30ß minutes or sth
When is it appropriate to be using custom events? e.g. If I were to have a Player who wants to join a Game, should this be a new PlayerRequestsJoinGameEvent() the the game manager can listen for, or should it be something like plugin.getGameManager().getGame().tryAdd(player)

custom events are mostly used if you want other plugins to be able to interact with your plugin
its just useless to use it within the same plugin
They would basically be part of your API
Noted, thanks
i mean, it can be handy
is possible to run the spigot server without ui?
add -nogui to startup args
lovve ya, thanks a lot
ok now that I have combated my computer in shutting down I can finish what I was going to say
I recently got rid of my Dedi, so it will be nice to have a new home for some repo's lol
can i get item stack in PlayerInteractEntityEvent?
Get the hand then get the equipment from the player and use getItem
wdym?
Get the hand from the event then use this https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/EntityEquipment.html#getItem(org.bukkit.inventory.EquipmentSlot)
declaration: package: org.bukkit.inventory, interface: EntityEquipment
Issue: The event isn't working but everything works fine, no errors or anything
https://paste.md-5.net/oqapaxabor.java
How can i check if entity is exist? I dont mean isAlive or is Valid, because after entity death it still exist for about 1 sec
sure, one sec
nvm, i have this, isRemoved()
Should I use permissions via plugin.yml or hard coded by checking a players permissions?
Such is better
Idc intended way, what’s the better way
🥄
what?
👨🍼
Anyone?
Elaborate a bit more
what would happen if you were to do player.setAI(true);
Right so, the /stats command works fine and does what it should but when you actually destroy dirt it doesn't do the if statement therefore not working the event
Probably an error
1.13-R0.1-SNAPSHOT.