#help-development
1 messages ยท Page 852 of 1
Hello , what do you think is the best way to handle multi user structure?
like :
User [UUID]
UserStats [use User UUID if possible ,Kills,Deaths , etc]
UserCosmetics [use user uuid if possible , cosmetic id (integer)]
UserArena [use user uuid if possible, Arena , other data]
in a database for example :
sql
i was thinking about using ormlite, but i keep getting errors while creating a 3rd and 4th user
it doesn't work for them
foreign key the user (and possibly arena)
you mean the uuid in User right?
Does anyone knows if there's a difference between org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder and java.util.Base64 when encoding/decoding data?
I mean, just use the standard j.u.Base64
i've made the mistake of going with Base64Coder from snakeyaml and now it's causing problems..
yes they are different
snakeyaml base64 uses RFC 1521
and Java Util Base64 uses RFC 4648 and RFC 2045
did something changed with snakeyaml base64 recently?
i know spigot updated it.
not that I am aware, its always used that rfc
how i can delete existing custom recipe from my plugin - https://paste.md-5.net/eloqoqapex.coffeescript
if (item != null && item.getType() != Material.AIR)
try {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
BukkitObjectOutputStream dataOutput = new BukkitObjectOutputStream(outputStream);
dataOutput.writeObject(item.serialize());
return Base64Coder.encodeLines(outputStream.toByteArray());
} catch (IOException ex) {
this.plugin.getLogger().log(Level.WARNING, "Failed to encode item!", ex);
}
return "";
}
@SuppressWarnings("unchecked")
public ItemStack decodeItemStack(String data) {
if (data != null && !data.isEmpty())
try {
ByteArrayInputStream inputStream = new ByteArrayInputStream(Base64Coder.decodeLines(data));
BukkitObjectInputStream dataInput = new BukkitObjectInputStream(inputStream);
return ItemStack.deserialize((Map<String, Object>) dataInput.readObject());
} catch (IOException | ClassNotFoundException ex) {
this.plugin.getLogger().log(Level.WARNING, "Failed to decode item!", ex);
}
return null;
}```
this is what i'm doing with it
it just means that while both work similarily you can't expect to mix and match which base64 encoder/decoder you are using and expect to get the output/input you are expecting
but it's causing problems lately
I think I have a base64 encoder that I used
or update
looks like I was using snakeyamls encoder as well
heres a link to the code
feel free to copy if you want its MIT afterall
good ol' frosty always linking to the same project
iirc I've copy-pasted from spigot forums
its actually ironic for such a simple project, in just how useful it is to teach and demonstrate XD
speaking of, imma start a new open-source project
a quest plugin
as part of a trial plugin for a german server
they offering 30$/hr
good luck, we haven't had a decent quest plugin in a while
guess that's where the base64coder come
well, my code isn't from the forums
its just one of my defunct plugins XD
but the code is working code
so if you are having issues, could just look to see what you are doing differently or wrong ๐
A couple hours after I got a DM commissioning me a project for like 2-3k
I guess today's a good day
now you can pay off all them debts ๐
lol
Debt free 
I have like $3k of debt to snap-on
been living on money saving mode for a while
have like 30 bucks in my wallet and a solid 10 on paypal and I can last the month
gotta hit the barber tho
So itโs possible to work fully with plugins hmm?
always has been
just live in a poor country
Yes it is possible, just highly unreliable
I live in portugal, minimum wage is close to 4$/hr
30/hr is enough to live comfortably working 10h/week
if you're doing commissions you have a really unstable income
there is no job security in it unless you work for something like hypixel where its a full fledge business and everything
Sometimes people don't want to pay up
Sometimes you get fired for no reason
Or your customers just disappear from the face of the earth (happened to me a solid 8 times already)
I take it you were lucky with the office?
They'll come back 6 months later with some BS excuse and cancel the project entirely
but most people who are entering the plugin market really missed the peak time for selling plugins and joining servers etc
and it seems easier to become a backend developer than to write plugins lol
backend developers are very difficult to come by and require more skills then just some java and mc
In one hand you have the third-world-country plugin dev
from india, turkey, brazil type deal
charges 4$ an hour
is either 14 or 24, no in between
On another hand you have your german dev
usually 17-20, excellent math skills, charges like 35/hr
And then there's the rest
no math skills
I think itโs easier because there are no restrictions, and yet the main work is interacting with the database; writing code that even gpt chat can do
either a god or complete trash
most people are just glorified Sys Admin's or believe they are and not really a back end developer. Back end developers are developing stuff that doesn't necessarily have to touch any DB or anything.
do you find them on the stock exchange or something?
but for the most part it concerns the database. Especially when you do it for a website
like a back end developer could be developing tools to help manage the servers etc, which most people don't know how to do and I probably wouldn't really trust a plugin dev to randomly know how to make these things either, because security comes into play for a lot of this as well and your typical plugin dev has not a clue about security XD
no, that is more Systems Admin and DBA's in what you are describing, back end developers for the most part don't touch that stuff unless what they are making requires some kind of info from the DB
Doesn't Spring provide security?
yes XD
maybe? idk I don't use it, but you can't expect something to provide security and be all good, your developers actually have to know security too so that the code they produce isn't at risk of causing security risks/breeches
Well, I have to try, Iโll tell you how it is when I get settled
A friend of mine who created websites and made plugins told me so
but mostly startups donโt invest much in security unless itโs some kind of bank
As far as I've heard from startups, the quality of their code suffers greatly due to their deadlines
this is a guess but it makes sense
Hi uhh , iam getting a bit a problem :
so i have a abtstract run method that is located in CosmeticFunction but when i implement it in CosmeticWrapper , it does not work , it run the empty method , and not the one in AnvilRainCosmetic ..
the user have AnvilRainCosmetic
this is how i have it :
any idea why it does not work ,-,?
not sure what start ups you are referring to
but most start ups in the mc world are done by kids
and of course kids have no clue about security
hence why they are mostly the victim of most attacks
this is confusing to look over
toss it all on a ?paste
?paste
bruh
also kids have tend to have unrealistic deadlines as well, and this isn't just true with kids but people who are not familiar with coding at all as well
yeah deadlines was something I kept getting wrong at the start
I think the problem is not even with those who create the code, but with those who run the company
gotta write a whole tycoon game
I'd estimate like a week for it lmao
it's closer to 3 weeks if we account for testing and fine tuning
yes it is, but it is also the fault of those who create code too because lack of experience. The start ups generally can't afford a dev like illusion or myself cause they have a shoe string budget
all these screenshots are incredibly difficult to decypher
When I was a newbie, I took an order for a very large amount. I needed to make Rust in Minecraft and I said it would take a week XD
I used to work for a shoe string budget back when I was uh
intermediate
I'd say 2020
I worked like crazy to save up for my pc and after a solid 80 hours of work I saved up 300 bucks
ItemStack item = new ItemStack(Material.STICK);
ItemMeta meta = item.getItemMeta();
meta.setCustomModelData(1);
item.setItemMeta(meta);
player.getInventory().addItem(item);
``` SumeruPack/assets/sumeru/blockstates/ak47.json```json
{
"variants":
{
"normal":
{
"model": "sumeru:ak47"
}
}
}
``` SumeruPack/assets/sumeru/models/item/ ```json
{
"parent": "sumeru:models/block/ak47",
"display":
{
"firstperson_righthand":
{
"translation": [0, 5, 0],
"scale": [1.25, 1.25, 1.25]
}
},
"overrides": [
{
"predicate": {
"custom_model_data": 1
},
"model": "sumeru:item/ak47"
}
]
}
``` and SumeruPack/assets/sumeru/models/block/ak47.json Made with Blockbench https://easyupload.io/vzxk3i
can someone help me with the custom model data resource pack for items? I created a texture pack, uploaded it to the resource packs hosting and Player.setResourcepack with arguments link and sha-1 key. the resource pack loaded in the logs on the client side there are no errors, but when I install in the item meta custom model data to overlay textures from the resource pack on it, it simply does not work.
what a cycle of pain this is
but companies still succeed due to functionality and marketing, despite the content of the code
The quicker the code is to write the longer it takes to rewrite
Yeah this is poorly structured
sure, someone has to win eventually but most end up losing
I'd make CosmeticWrapper hold a CosmeticFunciton instead of implementing it
Something like the decorator pattern
base
So it'd implement CosmeticFunction and proxy the requests to its internal function
While adding any extra functionality
Basically CosmeticFunction and CosmeticWrapper should be segmented
then how do I find out about the problems that occurred while loading the resource pack?
Yeah idk this structure is icky
check your logs file
is there abetter way?
There always is
There are no errors
I just can't think of one because this one's fogging up my brain
the latest.log does not even have a mention of the resource pack, although it is loading for me
As far as I understand, looking at the Yandex and Google companies, those who advertise better earn more, despite the quality. After all, from experience I will say that Yandex is a better search engine than Google, but Google is more popular
uH
why is your ak47 a block
Also I never see a mention of you overriding a stick
assets/minecraft/models/item/stick.json
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "minecract:item/stick"
},
"overrides": [
{
"predicate": {
"custom_model_data": 1
},
"model": "sumeru:item/ak47"
}
]
}
.json 3d model
yeah that doesn't need to be a block
can be an item
You then toss your .json under assets/sumeru/models/item/ak47.json
I want it to be possible to put it as a block
Item Display 
what about the model itself .json in models/block necessary to refer to it somehow?
whatever blockbench exports is whatever you use
And as I understand it, I don't need blockstates.
I didn't understand where to put myself .json model
depends on your market, those who lack quality tend to not last long or end up in more lawsuits ๐
but you can succeed without ever advertising
I never advertised and I still made money
all my customers were from word of mouth ๐
yo frosty you got a platform agnostic packet system?
I wrote one like 4 years ago and I'm looking to get it remade
I do not have one on hand unfortunately ๐ฆ
wanna use it for my minigame stuff
sadge
guess I'll have to write code
and maybe a forum thread
my snippets library died with my hard drive, its not gone forever just need to fix the board on it
but until then that library is inaccessible
for someone with a network history you have horrible data storage habits
a power surge managed to overload my surge protector and it killed the HDD XD
its not a US thing only
if enough transformers get knocked offline on the grid or if a power station goes down
it causes the power to surge while it gets routed, well there was a storm that was knocking transformers offline left and right
I added this file and overwritten all the files that were in models/block in models/item, I hope I did the right thing
and I didn't have time to turn the PC off as I was asleep and I had woke up just as it was happening
fortunately all that died was the HDD though and nothing more serious then that
well the HDD board
not the HDD itself
the correct path in resource packs textures/item or textures/items?
textures/item
no, grids fluctuate. When a transformer goes offline that is a route that is now blocked for the power, the power stations need to re-route power because this now means there is more power on the lines, and if the places that lost power get power again because of re-routing this takes power
so the power stations are trying to manage this fluctuation
it has nothing to do with power going to ground or not
anyways surge protectors are basically capacitors that can absorb some of this extra power, the one I had obviously wasn't enough ๐
afaik I've never witnessed a power surge
either because I live in an area with tropical weather
or because the US just struggles
in worse case scenarios power stations will cut power at their lines to stop this fluctuation pattern because there is a point where it can't be controlled and the only thing to stop it is to just black out
US doesn't struggle with power
I am explaining to you that power on the lines fluctuates
its not constant
ig we just have blackouts sometimes yeah
but you can get this wave pattern going on in the grid though
maybe the us just fluctuates more than us
and the only way to stop it is to just cut power but this wave pattern causes surges in some houses
or you don't have grids with insane amount of power on them
to even notice it
either that or the EU mandates surge protectors
either in houses, the electrical boxes outside houses or somewhere else
well, its possible that the sub stations in the EU are more sensitive and thus just cut power
but in the US, its not exactly that simple though
our grids are massive
in comparison to the EU
a single state in the US is larger in grid size then some countries in the EU XD
true
however as I said, as you cut power, the grid ends up with more power on the lines
this means the power station needs to start producing less power
but if the grid suddenly needs more power, you can't just create power instantly
this is why in the US its a game of routing without going down as long as possible ๐
its more difficult to start back up when all power is gone, then it is if there is still some power on the grid
even power outages are super rare here
i can create custom recipe in async and add this in sync or create process not can be async? - https://paste.md-5.net/heticomotu.cs
my power went out for like a minute last week
last time it had gone out was a solid 2 years ago
during a massive storm
well most of your lines are probably in the ground but we can't do this in the US just too large
uH
in the major cities sure
I call cap
cap?
teen lingo for "lies"
the US can't put all the lines in the ground because its just not feasible econonmically
some of our power lines traverse entire mountain ranges
I do live in the city and for most part of the city the lines are indeed underground
good luck putting those in the ground
yeah, same here in the US
the majority of the lines are above ground because its cheaper and easier to fix this way
We don't really worry about that
as you move towards more the cities they are in the ground because people are too dumb to not hit power poles >>
your country is small
therefore it is easier and makes more sense to put them all in the ground
next to the train station that connects my region with the main train line that goes over the capital
but when you got literally 5k square miles to provide power though
not so easy to do that ๐
not sure if you ever played city skylines or similar city sims
I used to watch sims 3 vids as a kid so no
but you simply can't just have everything upgraded without going bankrupt XD
I get it, the distance between cities in the US is a lot bigger
I walked between cities last week as my train just didn't show up and it was something like 12km
8 miles?
sumn like that
Passed through a solid 5 counties
just under 8 miles according to google
still not working I found it in the logs [Download-3/WARN]: Existing file not found or had mismatched hash
I'd run the resourcepack locally to start with
Did you update the hash after modifying the resource pack
once that's done you can upload it on mcpacks or something
already player.setResourcePack("https://download.mc-packs.net/pack/a939ec2897e634829238dbb6a648eeb03616f336.zip", "a939ec2897e634829238dbb6a648eeb03616f336");
https://paste.gg/p/anonymous/21392e304c2744b38aaac7f5a8ef241d assets/sumeru/models/item/ak47.json
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "minecract:item/stick"
},
"overrides": [
{
"predicate": {
"custom_model_data": 1
},
"model": "sumeru:item/ak47"
}
]
}```assets/sumeru/models/item/stick.json
toss that stick json in assets/minecraft/models/item
hey guys do you know some plugin that will do that the crystals will blow you higher like in 1.18
Would Entity.kill() work if the entity is in unloaded chunks?
Im making a rideable ender dragons system, and I'd like it to despawn 5 minutes after nobody is riding it
minecraft:textures/atlas/blocks.png:minecract:item/stick
minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture1
minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture10
minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture11
minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture12
minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture2
minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture3
minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture4
minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture5
minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture6
minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture7
minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture8
minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture9```
its looking at the blocks texture atlas for an item that looks wrong to me idk what it would be tho
{
"credit": "Made with Blockbench",
"textures": {
"0": "sumeru:textures/item/ak47/texture1",
"1": "sumeru:textures/item/ak47/texture2",
"2": "sumeru:textures/item/ak47/texture3",
"3": "sumeru:textures/item/ak47/texture4",
"4": "sumeru:textures/item/ak47/texture5",
"5": "sumeru:textures/item/ak47/texture6",
"6": "sumeru:textures/item/ak47/texture7",
"7": "sumeru:textures/item/ak47/texture8",
"8": "sumeru:textures/item/ak47/texture9",
"9": "sumeru:textures/item/ak47/texture10",
"10": "sumeru:textures/item/ak47/texture11",
"11": "sumeru:textures/item/ak47/texture12",
"particle": "sumeru:textures/item/ak47/texture1"
},
```assets\sumeru\textures\item\ak47 the problem is that it is missing .png at the end?
yes
I'll try with .png at the end
no
entities in unloaded chunks are not alive
ok iam back now , is there a better way? can you explain ?
its running the empty method that is being used in CosmeticWrapper
and its not running this method :
I'm not even home
alr sorry , maybe other people can help :p
Did you not "unwrap" your cosmetic then?
What exactly does your wrapper do? Having it implement Cosmetic seems odd.
kryiogenic sleep
iam using ormlite , and because of that i can't use Cosmetic Directly with it , i need to make a normal class , not interface nor abstract.
the wrapper should work only if it's the top class
Why do you pass the material and CosmeticType as a String there?
tried few times , didn't give me the right results\
Hey guys do you know some plugin that will do that the crystals will blow you higher with blast protection leggings like in 1.18
The Codec in ORMLite should have no problem serializing Enums.
Changing your data types to fit your ORM is def the wrong direction.
Ok ORMLite doesnt even have a codec. Its very basic. Anyways, here are some types you can use on enum fields
what about the Material ?
Material is still an enum, right?
yes
this is how iam doing rn , but its still not function correctly.
2 impl
inerators*
Then annotate the material field with
@DatabaseField(dataType=DataType.ENUM_NAME)
for example.
oh i see
done , but i still have the run function problem
Why do you query the same cosmetic multiple times?
Shouldnt it be enough to query it once, and then reuse it for every player?
Ah never mind. I misread that line.
The name cosmeticsPlayerList is just confusing
thats line i use the command :
/nick run run
so it run the method of the comsetic the user have
yeah ik its the comsetic for loop of the cosmetics user have
the cosmetics are saved in database
so lets say :
- it load from lobby server to -> ormlite database
- other servers like game-1 , game-2 can get the cosmeticfrom the ormlite database [sql]
Ok but is there something like a Class or Type field in your Database table?
Because to me it looks like
CosmeticWrapper wrapper = dao.getbyUUID(someId);
will never return any other class than CosmeticWrapper.
Because thats exactly what you are asking the service for.
I dont understand where you expect the DAO to realize "Oh, im trying to create an instance of the AnvilRainWinEffect.class".
Ok. This stores your AnvilRainWinEffect as a CosmeticWrapper in your Database. The runtime class is completely lost.
It needs to be stored somewhere. You cant recover a class type from thin air.
Thank you
https://ormlite.com/javadoc/ormlite-core/doc-files/ormlite.html#custom-data-persister
Here. Im already seeing how you could write an abstract implementation for this, that can serialize literally anything. (Including abstract classes and interface implementations).
ORMLite Documentation
Thanks
But there is probably something out there already
i wanted to use ormlite , to get rid of the errors that sometimes i get while using sql , syntax errors
I mean you can also go the lazy road and simply write your class type into your Database.
ik
Ah i see. But for that you could have used QueryDSL. It lets you build type safe queries like this
queryFactory.update(user)
.where(user.login.eq("Ash"))
.set(user.login, "Ash2")
.set(user.disabled, true)
.execute();
Without the need of JPA Entities.
Prevents SQL syntax problems by yourself and you are not bound to an ORM
But now that you already use one. ๐คท
Just keep it
yeah i need to remake everything from 0..
still don't work even with .png at the end
maybe in assets/sumeru/models/item/ak47.json use json { "credit": "Made with Blockbench", "textures": { "0": "textures/item/ak47/texture1.png", instead of json { "credit": "Made with Blockbench", "textures": { "0": "sumeru:textures/item/ak47/texture1.png",
How can I reduce the firework boost when using elytra?
and is it possible to add more folders to textures/item?
Well, maybe that's the problem.
you can edit the item before being used in the interact event for reduce the boost?
"the hints"?
???
bruh
can you explain a little more that "hints"?
What are the things that comes up when your doing ()
Those are handled by your IDE
so how do i see them.
Should be enabled by default
?
okey thanks
can you share a screen about this?
i accidentally pressed disable.
so it doesn't show
Which IDE are you using
Intellij IDEA
Community 2022
i haven't updated
im trying to make directional particles where the player is facing
player.spawnParticle(player.getEyeLocation().add(player.getDirection().multiply(1))... )
or something close
increase the multiply value to control distance
Could not find inset-bson-3660ecc.jar (com.github.slatepowered.inset:inset-bson:3660ecc).
Searched in the following locations:
https://jitpack.io/com/github/slatepowered/inset/inset-bson/3660ecc/inset-bson-3660ecc.jar
????????
entering the link dls the file
?
Which is the default power of a firework? (FireworkMeta)? I can't find it
max is 127, sure?
I'll checks thanks!
Not sure if this will solve anything for you, but
https://jeqo.net/guide/atlases/
not sure if this is the best source for this, haven't really looked at it
but I think Minecraft Commands discord server is "better equiped" to handle resourcepack questions
already thanks #help-development message
How can I get the firework at InteractEvent, I'm trying to cast but ItemStack can't be casted to Firework
is there way of getting if player clicked right click or left click on mob for example slime or zombie ? i mean it must be some event for that but i cant find which one would be best for such thing ?
Cast the meta of the itemstack
That would be FireworkMeta
anyone know why gradle may be failing to download one module from a URL
when i try the url manually it downloads fine
The item will never be a firework, firework is an entity
is it possible to get a snowman to throw a snowball while driving a pathfindering at the player? launchprojectile is not working for me
also the rest of the modules under the same maven repo, group, repo and version download fine
how can i launch up mob 4 blocks up in air like with seting its velocity with new vector
i am currently trying Event PlayerItemConsumeEvent but if i eat sweet berries or glowing berries then why does it return item as AIR
did you set an api-version in plugin.yml?
not set :]
thanks :]
My guess (based on nothing) would be PlayerMoveEvent and then just check if the player is flying with elytra there
thats a good idea yeah
@tender shard do you have idea how can i prevent slime from jumping
disable its AI
The thing is to edit the meta item to change the boost
so maybe MoveEvent can't provide me that
I can just use player.isGliding()!
EntityToggleGlideEvent is fired for starting/stopping the gliding
https://www.spigotmc.org/threads/methods-for-changing-a-massive-amount-of-blocks-up-to-14m-blocks-s.395868/ this is still mostly up-to-date
or just use the fawe api
even after generating the atlas using python software, it still doesn't work.
Any specific reason a Skull doesn't change its texture to the player's head when doing skull#setOwningPlayer?
The player has played on the server before and getOwningPlayer returns the player, the head just doesn't change texture
Did you forget to update the block state
uhh, it's on a GUI
so not the block skull
Did you set the item meta back to the item
yes
try updating the inventory
Already tried, nothing
what version ?
there were some mojang API troubles these past few days on older versions
1.20.2
Those forceUpdate methods mostly handle placeholder replacements.
Also, server is running on online mode
just in case that's a thing
Yeah can't get head textures when offline
here is my code: ```java
ArmorStand armorstand = (ArmorStand) player.getLocation().getWorld().spawnEntity(player.getLocation(), EntityType.ARMOR_STAND);
final ItemStack helm = new ItemStack(Material.PLAYER_HEAD, 1);
helm.editMeta(SkullMeta.class, m -> {
m.displayName(Component.text("Test"));
final PlayerProfile profile = Bukkit.createProfile(UUID.fromString("0f4d0aae-9e91-4d68-951f-94dbfb77999a"));
profile.complete();
m.setPlayerProfile(profile);
});```
If you plan on modifying the armor stand when spawning it use the spawn method that takes a consumer
That will ensure it spawns with your changes instead of being spawned and then modified
They do not
ok, what the frick is that editMeta
How have I never seen that
their code is terribly paper-api specific
PlayerProfile#complete is not a thing on spigot, nor is editMeta or displayName(Component)
aww man
Hi, is there any guide somewhere on how I could make a mob walk in a specific direction?
on spigot you'd call the #update() method on the player profile which yields back a CompletableFuture
You have opened my eyes. I thought paper and spigot had the same classes and methods
they do not ๐
I'm getting cast error when doing this
ItemMeta itemMeta = item.getItemMeta();
FireworkMeta fireworkMeta = (FireworkMeta) itemMeta;
fireworkMeta.setPower(2);
item.setItemMeta(fireworkMeta);
item is a ItemStack
is the item a firework
yes, a Firework Rocket
?paste
That error does not match the code
HandleFireworkMechanics is where the error is
you seem to be casting an itemstack to an entity
Now I don't have errors but nothing seems to happend
What do you want to happen?
like set the boost of the rocket (setPower()) to 0
hi, my server give this error:
[14:48:23 WARN]: Can't keep up! Is the server overloaded? Running 5002ms or 100 ticks behind
how I fix it?
More power, or better plugins
okay, but to me it seems like you are trying to let a player start elytra flight just by right clicking a firework, or am i wrong?
I'm trying to let the firework fail (no power) when fying with the elytra
maybe I can cancel the interact event and done
if you want player to not boost with an elytra you could look into this, im not sure if this event is paper only tho PlayerElytraBoostEvent
thats paper I think
so spigot doesnt have something like this?
The is a method to check if the player is flying with and elytra
but I don't find more
okay, i guess you gotta cancel the event when someone is flying with an elytra and tries to right click the firework
yeah
The thing is when I cancel the event the items seems not to be used and dont remove it
So you want the player to lose their rockets as well? You could try removing the manually
wdym
Get the item in his hand, check if firework, set the number of items-1 of what the player has
hmm, maybe updating pdc every tick is an awful idea
On an ItemStack, Very bad idea
this is a furnace
i don't know what it will do so i can't help
so, call update?
Raydan, why dont you create a oven object and just get the data and from there and once the oven is unloaded you save it in pdc
no idea
hmm
I think this approach would be better as you are not changing the pdc and just some object in memory
how can i check if someone rightclick on a player?
PlayerInteractEntityEvent
done! Thanks!
no problem :)
bro i have 18GB ram server and 800% processor
I smell overallocation
Then send a spark profiling report
But are you sure that #help-development is the right channel for this?
Tried PlayerProfile, problem persists
the skull texture actually loaded once, but only once
It seems like this problem only occurs inside GUIs as I replicate it and get a itemstack with the skull texture
uhm, nevermind
the itemstack doesn't have texture, the skull block has
๐ค
I have started doing that some time ago too
Especially in my tab comletion logic
functional programming go brr
blocked.
Lmao

How functional programing help with streaming?
how can i make custom crops
efficiency go brr
what is spark and how its work please guide me
Then this is the wrong channel I am afraid.
I mean... they both serve their own purposes
And composition is a little easier in languages that actually have good typing frameworks. Java's generics are not great lol
I mean type inheritance and behavior inheritance can be fine
usually itโs implementation inheritance thatโs not so appreciated in the long run
dope
names with more then 15 char
is there some list of items
with short names
made by someone
free to use
xd
SO I don't need to do it
like essentials has DiamondChestplate - DchestPlate
Essentials maybe got an api for that u could use?
well not everyone uses this days essentials
Fair enough
come in dm
you should beable to do this programatically
pretty sure minecraft's resources are publicly downloaded so you could generate resource files
Sir, as a non-paying customer you are not entitled to such services
please guide me
I am willing to help you once you have a spark report - but I aint going to spoonfeed you how to install a plugin and to then run a command.
That's the job of #help-server
what the event can stop enchant item
scoreboard
is it possible to make this in spigot?
yes
does Spigot by default have mob pathfinders?
There other way to create custom recipes not in the onEnable method?
You gotta call Bukkit.addRecipe
yeah, at onEnable method right?
You can call it in that method
And I need to call the class anywhere?
Generally on enable
Just as a question, is it wise to put the recipe addition into the cunstructor?
Doesn't that mean, that it always adds the recipe when creating a new firework of that type?
Wouldn't it be better to either create a static function to add the recipe, but then you'd always have to add that. Maybe instead use a type of singelton pattern (or rather that pattern where you add a #clone method) and have that add it.
What do you think @young knoll?
I mean
I'm almost new at Java maybe I do things in a bad way
You can just hold the itemstack in a variable somewhere
Just create a method called 'registerRecipe' in your main class and put that code in it, then call it in the onEnable
So kinda singelton.
And just to clarify, this wasn't to undermine you or make a snark comment. I was just curious myself as what might be a good way to do this.
@quaint mantle Don't worry, keep at it and do what works and is fun for you :)
but is 100% needed to pass it at onEnable when I already called Bukkit.addRecipe(reinforceRocketRecipe);
No, just to make sure u register the recipe when the plugin starts
Don't worry, I knew perfectly well that you didn't mean anything bad.
@Override
public boolean contains(Object obj) {
if (!(obj instanceof MonthDay)) return false;
MonthDay mday = (MonthDay) obj;
return month == mday.getMonth() && monthDays[mday.getDayOfMonth()] != null;
}
@Override
public boolean add(MonthDay mday) {
if (contains(mday)) return false;
monthDays[mday.getDayOfMonth()] = mday;
return true;
}```
does anyone know why contains returns false but it is still added to the array?
ah ik
Hey !
I'm trying to place a structure in spigot.
Here are a few questions.
If i put a file in my server files that contains the different structures i wanna place, how do I get them in the code?
Does anyone have any documention on how to place structure?
Are you aware of the src/main/resources directory which is the default under maven and gradle?
If not, that is how you include files - if you don't use maven or gradle or have overridden the defaults: Figure it out on your own.
i use maven, how do i include files?
just put them in the src/main/resources directory
so here with plugin.yml?
i.e. like follows
ye
ok, so imagine i put here a file containing the structure that was saved with a structure file, how do i access it? (and place it)
The file can afterwards be queried with https://hub.spigotmc.org/javadocs/spigot/org/bukkit/plugin/java/JavaPlugin.html#getResource(java.lang.String)
declaration: package: org.bukkit.plugin.java, class: JavaPlugin
how you can place it I cannot tell you however - it is likely that you need to depend on the worldedit API, but there might be other ways around it.
Regardless, I have never done that myself
ill try things, and get back to you later.
Thx tho
so, here, what do i put in file and structure?
and this would return the structure i want?
Also remember that getResource requires the full path, including the extension
could you elaborate on that? i dont really get what you are saying
Yo hi , ive got this code for checking if the result of a smithing event is an item material from the config file , and if it is , then to cancel the event.
Problem is , it simply just doesnt cancel the event.
And for my code should i write Material.{Insert Item here } or just the item name in the config file?
@EventHandler
public void onSmithItemEvent(SmithItemEvent e) {
Material resultMaterial = Objects.requireNonNull(e.getInventory().getResult()).getType();
if (isItem(resultMaterial)) {
e.setCancelled(true);
}
}
private boolean isItem(Material material) {
List<String> itemStrings = config.getStringList("Items");
for (String itemString : itemStrings) {
if (Material.valueOf(itemString) == material) {
return true;
}
}
return false;
}
I'd honestly use try-with-resources as follows:
Structure structure;
try (InputStream is = myPlugin.getResource("file.dat")) {
if (is == null) {
throw new IOException()
}
structure = manager.loadStructure(is);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
but the main idea is there
Well basically you need to also include the file extension
Does the event listener receive the event?
ill check uno momento
oooh so if its called "EleanorWall" ill have to put "EleanorWall.png" for instance (ofc its not a png its juste for the idea)
basically yes
And if you decide to put it in a folder within the resource folder (for example to keep things tidy) you'd need to use "structures/myStructure.dat" for example (in this case the folder is called structures)
ok i get it, thx a lot !
oh and last question
does it work the same for worlds? Like if i wanna put a world in my files, would it work if i try to load it
The problem with worlds is that they are likely going to be folders. getResource however requires singular files more or less
how could i do that with a world then?
I am working on a 1.12.2 PaintBall plugin, but I am having a major problem during compilation; I cannot compile the plugin, and I keep getting the error "package BuyAPI does not exist" (this is an economy plugin). I believe I have added the plugin, and the IDE even seems to recognize it. What could be the issue?
Error: https://pastebin.com/RpvG0ZBT
https://ibb.co/xXBm8zT
https://ibb.co/tB8r1bn
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
You can still do it the same way though, but it will be a bit more complicated as you'd need to read the index of files for a given directory, but I am not completely sure how that works (to me that is still witchcraft, somehow)
You could of course store it as a zip in your jar and unpack it via a ZipInputStream, but that is a bit more convoluted.
So you'd have
try (ZipInputStream zipIn = new ZipInputStream(inputStream)) {
for (ZipEntry e = zipIn.getNextEntry(); e != null; e = zipIn.getNextEntry()) {
// ...
}
}
though obviously that isn't even half of the needed logic
I recommend to use maven whenever possible. In your case you might even make use of Vault instead of the economy plugin directly, but that depends on the economy (there are some fringe plugins out there not implementing vault for one reason or another)
Ok so, i put it like this for the structure :
Unfortunately, I cannot use another economics plugin.
1 time I was able to compile the plugin but I still donโt understand how I did it
If the plugin implements vault, you don't need to use any other economy plugin - you can plainly use vault (which in turn will use the plugin you want)
looks about right. Of course it contains a fair bit of unoptimized stuff but that is likely excusable for now
ofc, for now, im just trying to get the basics of structure placement
@buoyant plinth anyways, if you cannot make use of vault and the plugin you want to use is not in a maven repository already you can plainly use the above guide: https://blog.jeff-media.com/manually-installing-jar-files-to-your-local-maven-repository/. Of course there is a less manual way of dealing with that (without using the system scope) using file://-repositories, but that is a bit too advanced I assume
when compiling i have an error
what is your maven pom?
?paste
You'd want to have
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<excludes>
<exclude>plugin.yml</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>plugin.yml</include>
</includes>
</resource>
instead of your current resource-block
Although I did not test above code, but it should work
It compiled ! Ill not test it ingame
Someone knows how i can check if the Inventory of onInventoryClick event is the same from the command? (Obs: Im using a class that implements both CommandExecutor and Listener, and the inventory is in a private variable in the class, but its not the same when i try to check in onInventoryClick event
I have an error,
(this is line 27 : ) structure = manager.loadStructure(fileStream);
PS C:\Projects\PaintBall> ls src
Directory: C:\Projects\PaintBall\src
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 12/31/2023 1:33 PM main
-a---- 1/3/2024 6:18 PM 315022 bank.jar
PS C:\Projects\PaintBall> mvn install:install-file -Dfile=src\bank.jar -DgroupId=com.bank -DartifactId=bank -Dversion=1.0 -Dpackaging=jar
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< org.tokishu:PaintBall >------------------------
[INFO] Building PaintBall 1.0
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- install:3.1.1:install-file (default-cli) @ PaintBall ---
[ERROR] The specified file 'C:\Projects\PaintBall\src\bank' does not exist
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Skipping PaintBall
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.287 s
[INFO] Finished at: 2024-01-08T20:21:48+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:3.1.1:install-file (default-cli) on project PaintBall: The specified file 'C:\Projects\PaintBall\src\bank' does not exist -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
PS C:\Projects\PaintBall>
try using forward slash. Otherwise cd in your src dir and omit the folder
that is likely induced by filtering that shouldn't have happened. Could you show me the new pom again?
:(
PS C:\Projects\PaintBall> mvn install:install-file -Dfile=src/bank.jar -DgroupId=com.bank -DartifactId=bank -Dversion=1.0 -Dpackaging=jar
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< org.tokishu:PaintBall >------------------------
[INFO] Building PaintBall 1.0
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- install:3.1.1:install-file (default-cli) @ PaintBall ---
[ERROR] The specified file 'C:\Projects\PaintBall\src\bank' does not exist
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Skipping PaintBall
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.271 s
[INFO] Finished at: 2024-01-08T20:23:46+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:3.1.1:install-file (default-cli) on project PaintBall: The specified file 'C:\Projects\PaintBall\src\bank' does not exist -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
PS C:\Projects\PaintBall> cd src
PS C:\Projects\PaintBall\src> mvn install:install-file -Dfile=bank.jar -DgroupId=com.bank -DartifactId=bank -Dversion=1.0 -Dpackaging=jar
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.056 s
[INFO] Finished at: 2024-01-08T20:24:03+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Projects\PaintBall\src). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
PS C:\Projects\PaintBall\src>
?paste
Someone knows how i can check if the Inventory of onInventoryClick event is the same from the command? (Obs: Im using a class that implements both CommandExecutor and Listener, and the inventory is in a private variable in the class, but its not the same when i try to check in onInventoryClick event
uh well then let's do it the hard way: Do you think you can implement a repository like follows #help-development message ?
probably not, I'm not that experienced in plugin development and java๐
If you change the file extension of your jar to .zip and open it in a zip archiver, is the (decompressed) file size of the structure the same as it should be?
It's actually not all too complicated. It just happens that it is a less traditional way of going about it - you only need to put the jar in the right folder and you need to tell maven to use a folder as a repository.
So basically you open an inventory using a command and you want to check if it is the same inventory you opened?
By the way, I think you don't actually need to include the pom in the file://-repository - just the jar suffices.
Maybe I'm adding the plugin to the project incorrectly?
i think so yeah, its a .nbt so
0 kb? That is rather concerning. Is the nbt file in your resource directory empty?
I guess you could also use the system scope, that usually works but is deprecated for removal - how that is done is outlined in the blog post I linked earlier
its not empty here
Okay yeah, then something is wrong with the advice I gave you. If a mvn clean package does not work, it's best to wait for the advice of the elders
where do i run the mvn clean package?
in your project directory (where your pom resides)
you can also use IJ and execute the maven clean goal, does the same thing
im sorry, i dont really understand what you want me to do in my pom here
You know how you build a maven project, right? So instead of using package or install you'll first use clean, then package or install
No sorry i don't know what to do here
Usually i just run my code and put it in my plugins so...
Ok ill do that and get back to you
I must stress that this is more or less a final hail-mary approach. I don't actually expect this to work
It works !!!!
It works, but could you explain what was the problem? id like to understand
It's caused by caches. More specifically maven thought it already copied that file into your jar even though it didn't (as it crashed when doing so, as you might remember)
You'll find similar problems quite often, so deleting/cleaning caches will be something you'll do more frequently. So that is something to keep in mind
by deleting and rebuilding it, am i not risking any problems?
well you are wasting your own time, that is what if happening if you do it for no good reason. But as long as you know what you are deleting it is otherwise perfectly fine. The target directory for example can always be deleted
how can i spawn an entity in nether even if player was never there
Get the nether world and call .addEntity
Hey, little question, how would i check for a player interacting with a block?
(i want to check when the player opens a loom, and check the looms location)
PlayerInteractEvent
and how do i check the block they are looking at?
Have you looked at the event?
yes? i dont see any event.getBlock
It does have one, look carefully
look for other methods that return a Block
i am sorry, i was looking at the wrong event, my bad
๐
is there a way to get this exact location im looking at?
like
is there a method for it?
getTargetExact
thx
why when i disconnect and connect from a server a custom nms entity is now like a normal entity?
Yeah that's normal
When the game saved and loads it again
it doesn't know it's a custom entity anymore
You'll need to handle that part on your own
basically just save where it is and spawn it again on load
how could i instead just delete it instead of reseting?
Yes
Hey Guys, i got a little problem. i want to get into plugin development with IntelliJ. I managed to get the debugger running the build process works. but when the debug server is running and im trying to build / replace, i get the "Artifacts builder: Cannot delete file <path>" error... Did i miss anything?
Edit: it magically works now
How should I remove attribute from player? Ifs are true but I have still same amout of healts. Look like Im removing attribute wrong. Adding is working fine
if (HelmetManager.isHelmet(clickedItem) && HelmetManager.haveEffect(clickedItem, healthEffect)) {
System.out.println("REMOVE HP!");
double effectValue = HelmetManager.getEffectValue(cursorItem, healthEffect);
AttributeModifier attributeModifier = new AttributeModifier("mask_health", effectValue, AttributeModifier.Operation.ADD_NUMBER);
player.getAttribute(Attribute.GENERIC_MAX_HEALTH).removeModifier(attributeModifier);
}
if (HelmetManager.haveEffect(cursorItem, healthEffect)) {
System.out.println("ADD HP!");
double effectValue = HelmetManager.getEffectValue(cursorItem, healthEffect);
AttributeModifier attributeModifier = new AttributeModifier("mask_health", effectValue, AttributeModifier.Operation.ADD_NUMBER);
player.getAttribute(Attribute.GENERIC_MAX_HEALTH).addModifier(attributeModifier);
}
The UUIDs of the modifier must match
Generate a constant UUID and hold it in a field, then use it to construct AttributeModifier instances. Or, better yet, just keep the AttributeModifier instance as a constant
oh... yeah make seans. Hmmm better way here will be just check if player has AttributeModifier. ๐ค
Idk if I can do that, maybe I can keep Attribute UUID as constant. bcs affter restart of server I will lose AttributeModifier saved as contant
private static final UUID ATTRIBUTE_ID = UUID.fromString("f239698d-5604-40a2-bb8d-6613bfcd1783");
private static final AttributeModifier ATTRIBUTE_MODIFIER = new AttributeModifier(
ATTRIBUTE_ID,
"mask_health",
/* value */,
AttributeModifier.Operation.ADD_NUMBER
);
If the value isn't constant, you'll have to construct it each time. What matters is that the UUID is constant
If player equip specify helmet, he is getting HP and if player unequip that helment ofc losse that HP.
I can ๐ But helmet have lore where I display hearts (2 healts) and in helment it will display helts (half of hearth) in attribute.
I kinda dont like that, but that make my work more compicated, what I should avoid.
You can use ItemFlag.HIDE_ATTRIBUTES if you'd like
Anyway I learned somerhing new again
Yeah. Just be sure the UUID is the same and you'll be fine :p
You have an alternative if you'd like to explore that avenue instead
Can I hide only specify attribute? probably not I guess? ๐ค
Or I can just ask person, if that display of attribute is oke and all will be fine ๐ Thanks a lot I learned something new thats important for me... Im coding only for 1 year and still have lot to learn...
How can I fix this, the thing i to keep the meta from the original item
Only all of them, unfortunately
The way you can approach this may differ. Where are you using removeFailureItem()?
PlayerInteractEvent? Somewhere else?
there yes
And is handItem = e.getItem()?
If so, that's a mirror ItemStack so you can actually simplify your item handling a lot by just updating the amount and that's it. No need to re-set the item in the hand or anything. It will update automatically. handItem.setAmount(handItem.getAmount() - 1); should work just fine
Is it possible to change classes from the spigot api, like the player class to add methods?
yes
Okay, then your whole removeFailureItem() can be removed and replaced with just handItem.setAmount(handItem.getAmount() - 1);
As Im not setting modifier UUID it will ser random one? ๐ค Interesting.
Yeah, if you don't specify the UUID, it will generate a random one each time you construct it
I just relize Im not setting one and u talked about that ๐ Get me confused for moment ๐ Fixed thanks again!
How can I get the item from a custom recipe?
getResult?
Like get if the customItem from recipe is the one in the hand
What?
I made a custom recipe. So, what I want to do is to compare if the item the player is using is the item generated from the recipe.
Give it a pdc tag
pdc?
?pdc
Hi, i having some troubles to Good, I'm a bit complicated trying to figure out how to do the logic to display the help dynamically. I mean if you have a command structure like faction (main command), faction list (faction argument). On the other hand, the sub command faction points (child of faction) and in turn, faction points info child of faction points.
How could I make the help list to be displayed depending on how the commands are executed, ie. If you execute the command faction without arguments, the help list would include this order: /<command> <argument> (where command would be faction in my case, where argument would be list and points)
In case of executing the command /faction points without arguments, the help list would change to the order: /<parent> <command> <argument> (where parent would be faction, command would be points and argument would be the arguments and/or children associated to points).
someone has a ItemStack gson adapter for 1.18.2?
the one i have its 1.8
so yeah
:(
save me
oh i was looking one for 1.8 could link it to me? I used to have one but i lost it time ago
Spawning an item with world#spawn makes it spawn at Y level 0, even setting the location.setY to -60 will still make it spawn at y=0, i've also tried disabling the randomize data. Is this a bug or am i missing something?
Since ProtocolLib is broken, I'm trying to use TinyProtocol.
It has an import for io.netty.channel. What version does Spigot use?
And it also imports com.mojang.authlib.GameProfile. Where can I find that (with Maven)?
I will be an invisible armor stand with a custom name. This name doesn't have a space at the end, but in the game it's as if there was a space at the end. Does anyone know how to solve this?
auth lib is know as mojang authlib or something like that
Doesn't tiny-protocol have those versions in their pom?
@next plume
I figured out the netty one. The pom is from like 7 years ago.
Uh, I am not sure if the lib works then but I guess you know what you are doing
Looks like that worked. Thanks!
This should be fun. (And by that, I mean not fun.)
no problem, we are for giving a hand to each others. Enjoy your coding
I can't get this thing to compile. I have no idea what I'm doing. F- it.
Iโve noticed you can specify a uuid when sending resource packs to the client now
Does that uuid need to be based on something or can it just be whatever
im guessing thats just the id of the resourcepack
so you can check if they accepted/denied or whatevert
I imagine itโs just cause you can send multiple now so it knows if one is a duplicate
wouldnt it use hash for duplicate
i mean dont they check the hash anyway
That hash is just for caching
I assume I can just use a random uuid and I donโt have to generate it based off the file
how would i make tablist people organized based off their rank
Yeah, I think it uses the URL by default or something. You can check
whats the difference between File#mkdirs and #mkdir?
sudo -r chmod 777 /
now you don't have to worry about the trying part
๐ช
Im trying to incorperate the mariaDB jdbc driver into a plugin and i just don't know what to do, I am aware shading is involved but how and how do i implement shading effectively in my project?
<!-- removed -->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
<repositories>
<repository>
<id>papermc-repo</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.20.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>3.3.2</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
hmm
its weird
cuz
take a look at maven shade plugin
i did and if im being honest, i understood nodda thing
when i use mkdirs on a file lets say new File(plugin.dataFolder, "imablock/block.json" literally creates a folder with named block.json and well, what in the big actual fuck
i want the file
not a foldee with the full name of a file
So i normally do
well yeah
file.parentFile.mkdirs
I am still lost, it just tells me to put my configurations somewhere
just because you have a . at the end doesn't magically make it a file
shouldn't need to configure the shade plugin
well
maybe for some META/INF exclusions one seocnd
yeah
so ig
calling parent's mkdirs is just what i nees
And then createNewFile
right?
yes
@hot reef
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven-shade-plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<excludes>
<exclude>com.google</exclude>
<exclude>sh.miles.raven:raven-platform-mongodb*</exclude>
</excludes>
</artifactSet>
</configuration>
</execution>
</executions>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.MF</exclude>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>com/google/**</exclude>
</excludes>
</filter>
</filters>
</configuration>
</plugin>```
obv you'd wanna replace my variable and exclusions but yeah
what does the bottom exclusions do?
excludes things from your final artifact that could cause compatability
you can remove the com/google/** one
would it looks something like this
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<excludes>
<exclude>org.mariadb</exclude>
<exclude>mariadb-java-client</exclude>
</excludes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
erm
I wouldn't exclude what you wanna shade
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>```
more like this
its already set up like that
Maven package right not intellijs jar export or whatever
Send your pom
i need to verify on the forum hang on
Lgtm you using the right jar?
yes
what even is the issue? I haven't seen you send any error message at all?
have you checked if your jar contains org.mariadb.jdbc.Driver?
how can i check
unzip it
i can do that!?!?
jars are just zip files
Ur a fancy zip file
this is another reason I somewhat dislike windows you can't just open a jar file
you gotta rename it to zip
on linux I just crack that baby open
Archive Manager go brrrr
frr
meanwhile 7zip
7zip go
^
what?
i mean obviously the default "open with" is java
granted I'm in no space to talk I haven't used windows as a daily driver in uhhh 2 years now xD
Did you use the ole Class.forName() trick?
ahhh yess Class.forName()
Tbh, it's bs that you still need to do that in some cases.
heh?!?!
I'm pretty sure you don't have to use Class.forName with the MySQL driver anymore, but I think you still need to for mariadb and others.
You have to force the classloader to load the class because ??? :)
the "legacy way" needed you to CLass.forName it
the ClassLoader is lazy
heyyyy
Tell it to not be
how yall doin
can i just put this in onEnable?
I'd put it onLoad ๐ง ๐
yeah that'd be fine
aint this so cute
you can try to call it anywhere before creating the connection but normally it shouldnt be needed
can't hurt to try it though
hm weird, i never had to do this ever
hi hjonk!
hello there
if this works
you all have my thanks โค๏ธ
THATS A NEW ERROR GG WE GOT SOMEWHERE ๐
that's just auth ye
thank you all โค๏ธ

Ayo, does the Donor rank get access to that?
shadow about to drop 100 for out of server emotes
But boosting is cheaper
I also want to change my name, soooooo
however donor rank lasts forever
Nothixal
But
True
donor rank is 100$ +
Purple color
needs supporter rank on the forum
I'm pretty sure you do
because you're not verified lol
ye i know
You can tell if you open the emoji picker and everything is not grayed out. :p
Itโs all greyed out
You got scammed
u do
Is this the cheapest or most expensive way to do it
Didnโt cost money but did cost my soul
How much is your soul worth?
9.99
Bout tree fiddy
Hey coll, don't you get access to the discord bot panels now that you're orange?
jk i used bc
I can use some of the bot admin commands
But I donโt have access to any fancy panels
So you can't fix the typo in the ?img command? smh
?img
Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.
Here's some screenshot utilities that can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org
Yes
?img
Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.
Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org
Ty coll
Someone does not like typos
Someone clearly missed my javadoc pr. :3
Oh no Iโve seen it
Oh, speaking of. Need to update it again.
It's never gonna be merged. cries
F
And it's updated. Maybe one day
Try spam pinging md
๐ซ
Im trying to test a plugin and server spams
[06:29:54] [Netty Epoll Server IO #1/WARN]: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.lang.RuntimeException: Unable to access address of buffer
at io.netty.channel.epoll.Native.read(Native Method) ~[spigot.jar:git-Spigot-db6de12-18fbb24]
at io.netty.channel.epoll.EpollSocketChannel$EpollSocketUnsafe.doReadBytes(EpollSocketChannel.java:678) [spigot.jar:git-Spigot-db6de12-18fbb24]
at io.netty.channel.epoll.EpollSocketChannel$EpollSocketUnsafe.epollInReady(EpollSocketChannel.java:714) [spigot.jar:git-Spigot-db6de12-18fbb24]
at io.netty.channel.epoll.EpollSocketChannel$EpollSocketUnsafe$3.run(EpollSocketChannel.java:755) [spigot.jar:git-Spigot-db6de12-18fbb24]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:380) [spigot.jar:git-Spigot-db6de12-18fbb24]
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:268) [spigot.jar:git-Spigot-db6de12-18fbb24]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [spigot.jar:git-Spigot-db6de12-18fbb24]
at java.base/java.lang.Thread.run(Thread.java:840) [?:?]
what minecraft and java version is this?
1.16
Server builted from BT (build tools)
also it start crashing when i start to connect the server
Its the first time i have this type of error
well are you doing netty stuff?
the worst weird thing is that i dont have any plugin, just plain server built from spigot bt
your epoll is broken for some reason, I know it happens for 1.8 and lower on newer java versions, but no idea here
plain server, not any plugin. I removed everything for testing
