#development
1 messages · Page 85 of 1
worked ty
@dusky harness why i can use mini messages
@Override
public String onRequest(OfflinePlayer player, String identifier) {
switch (identifier.toLowerCase()) {
case "prefix":
Component prefix = MiniMessage.miniMessage().deserialize(configManager.getConfig().getString("general-settings.server-prefix"));
return prefix;
case "domain":
Component domain = MiniMessage.miniMessage().deserialize(configManager.getConfig().getString("general-settings.server-domain"));
return domain;
default:
return null;
};
}
PlaceholderAPI doesn't support minimessage
oh
It doesn't support adventure components actually.*
Worst case scenario, you can serialize the component back to a string using the legacy serializer
ohh yeah whoops
Is there a way to place a block as a player, in the paper api
... why?
so other plugins handle it how it should be handled (jobs)
trying to create the right click harvest mechanic but dont wanna break jobs
You can try to set the block and fire the BlockPlacsEvent ig
constructing and calling api events isn't supported 
so im hearing no
did, plugin didint pick it up
but didint do mega debugging so not sure if it even gets dispatched etc
You can see if the plugin provides an api for stuff like custom blocks
Can I create a page within the menu or am I forced to create another menu to make the other page?
what is bro yapping about
no they dont, its jobsReborn and they only have events for stuff :/
I tried that, didint work
Why? Do you get an error?
hi quick question, im trying to code a scoreboard in my own plugin. I currently face the issue that the custom coded placeholders aren't updating in the scoreboard i made. Do i just have to use the Teams method or is there a different way?
Hey so I'm having problems importing the library, here's the rp/dep i use
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.11.6</version>
<scope>provided</scope>
</dependency>
<repository>
<id>placeholderapi</id>
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
</repository>
the dependency isn't being recognized by my ide, though
did you try reloading maven?
if the problem is that the text is red, make sure you reload maven (ctrl shift O i think?)
I've seen this issue so many times - IntelliJ really has to fix this
if that's not the issue, send the entire pom.xml
lmaoo this is rigged i reloaded it earlier but when u did it it reloaded like the god u are
🥲
yeah I would just go based off the actual maven errors
intellij is funky with the red dependencies
pages doesn’t exist in menus. “pages” are just different menus
how to fix this?
package com.sk89q.worldguard.bukkit does not exist
add worldguard as dependency 
did that already still not working this is my POM https://paste.helpch.at/vozapafohi.xml
are you sure you're not supposed to do worldguard-bukkit
You need to add both
worldguard is the common module
worldguard-bukkit is for the Bukkit platform
So add core and bukkit and it will work? Okay ill try
Yes
thx bro it worked
https://paste.helpch.at/rasiposobu.java
the worldguard.Getregionmanager is red its the only error's in the code what is the problem i use worldguard 7.0.8
What is this code
Have you considered reading the documentation https://worldguard.enginehub.org/en/latest/developer/
the code worked for 1.12.2
Yes and WG 7 is not WG 6 because code that worked before doesn’t work anymore
i got these 2 errors any one nows how to fix it?
symbol: method getRegionContainer()
location: variable worldGuard of type com.sk89q.worldguard.bukkit.WorldGuardPlugin
and
java: no suitable method found for getApplicableRegions(com.sk89q.worldedit.util.Location)
method com.sk89q.worldguard.protection.managers.RegionManager.getApplicableRegions(com.sk89q.worldedit.math.BlockVector3) is not applicable
(argument mismatch; com.sk89q.worldedit.util.Location cannot be converted to com.sk89q.worldedit.math.BlockVector3)
method com.sk89q.worldguard.protection.managers.RegionManager.getApplicableRegions(com.sk89q.worldguard.protection.regions.ProtectedRegion) is not applicable
(argument mismatch; com.sk89q.worldedit.util.Location cannot be converted to com.sk89q.worldguard.protection.regions.ProtectedRegion)
This one 6 times
this is the wrong channel to ask for configuration help, stick to #general-plugins @hardy sonnet
Yo @scenic vapor the custom UI you made with display entities seems pretty cool, is that open source? I’m interested to do some experiment with it
it is gonna be, yes
Hey does somebody know how i can remove the Armor Tool Infos with Paperspigot 1.21 ?
I know that all database operations should be done async to avoid them blocking the main thread, but isn't it a better idea to have startup and shutdown DB operations be on that main thread?
Since if something goes wrong on startup, I'd want the server to not start or have a delayed start - while if something's wrong on shutdown, i'd want that shutdown to be delayed too
Tool or trim?
For trims, one of the ItemFlags should work.. idk which
Tool 🙂
Leather Boots. I want to remove the "+1 Armor"
That doesnt work on 1.21
Try ItemMeta#setHideAttribute
So that worked somehow but now my Item Displayname is gone xd
Found it
Any reason Inventory.addItem(ItemStack) won't add the full amount of the item anymore?
Example;java Inventory inventory = ...; ItemStack gold = new ItemStack(Material.GOLD_INGOT, 640); inventory.addItem(gold); //Main.getLogger().info("Debug >> "+gold.toString()+": "+inventory.addItem(gold).toString());Seems to only ever place 430 items but when debugging the returned hashmap is empty.
Debug >> ItemStack{GOLD_INGOT x 640}: {}
This case should return 64 gold in the returned hashmap...
the return for add item has always been really strange to memory
Do you add the items twice, one before the debug and inside the debug?
Has anyone made an annotation processor for a paper plugin before? I don't understand if it should be in a separate sub project or if it should be in the same project.
Yeah I meant sub-modules
What I am struggling to understand though is how I can get the annotation processor to work
Do I need to have the annotations in that same module?
So I'd have an annotation processor class, and the annotations that it should be responsible for?
And then I add that sub-project as an annotation processor, in the dependency block of my build.gradle?
That’s where it gets tricky, you most likely want to have the annotation as a dependency of both the normal module and the AP
Yeah exactly that is what I was struggling with
The thing is that, the annotation also uses an object of type DataType
Which I need both in my annotation and my plugin
But it's related to SQL operations, it's weird to have it in the annotation module
If it is closely related to the annotation, it‘s not that weird
And if it isn’t closely related to the annotation, the annotation shouldn’t use it
I guess it is closely related to it then? without it the whole annotation system falls apart
Wouldn't matter.... the output of the hashmap would change.
But no I just put the debug line there to show an example.
I think that addItem mutates the stack, I remember having an issue with a give-all plugin because I didn't clone the stack before giving it.
Ah that’s pretty cool, do you have any eta when you will release it for public?
nope not really
there's quite a few features that I would love to implement
I would love to see it later, how does the hovering works by the way?
So I saw that you hover with cursor? I'm not really sure.
the cursor is actually fake 😄 It is a display entity
the movement is calculated by player's yaw & pitch
Ah interesting, that’s what I’m trying to achieve too, I’m thinking to create like a notification in the top left or top right. For example a party invitation notification and player would be able to click that to accept the invitation.
So the top left display that you show is just a display entity placed really far away from player so it looks like a notification popped up?
Oh right, would it be possible to make the display entity interactable by clicking certain parts?
Like what if I want to make it so there will be several buttons, whether to accept or deny the invitation?
This is already done
Ive already done a system for checking what button is being hovered over / click on
as you can see here
That would be the future of minecraft gui tbh.
uh I dont certainly think so
this is the reason
am planning adding Zooming tho
so you can zoom in/out
I mean yeah but it will be a great addition 😀
I mean it can be pretty great if you wont have like whole screen UIs
otherwise it is gonna look like this
FOV just breaks whole scaling
Yeah I saw that too, so those are one display entity as the base and there are gonna be another 5 display entity as a button, correct?
Does setting a fixed resolution will have different results if player uses smaller or bigger monitors?
no
That's pretty cool, for interacting do you use ray trace on click or just use PlayerInteractEntityEvent?
someoen oughta make a UI library with fonts to get around this issue
id assume neither of those things.
he can just compare mouse cursor position
why would I need those
you do not need that
just import a custom font into RP
and set the font using Minimessage
into a text display
lol
Ah, because he has that system already.
anything to do with text displays would have issues with FOV would it not
cause no anchor
what
what part is unclear
why would it have issues
if you show elements with text displays and you decrease FOV then wouldn't some stuff be cut off
you can left/center/right align it
how so?
the FOV does not change size of text
that's not a text display then is it? that's just like sending text to an action or boss bar
no it is text display
how do you align text displays to screen space
how does that work if text displays are entities in the world
what? 😄
Can you show a picture?
I dont have it ingame currently
text displays are entities in the world. how do you align those to screenspace
they get cut off if you make your FOV smaller
but am using item displays o-o
yea and your stuff breaks if the player changes their FOV does it not
so how would text displays solve that issue
Oh Ive misread I guess
for some reason I thought that someone is talking about Font generation xD
Ive just misunderstood
it is almost 1AM, sorryyy

ah 😭. I was saying you could just recreate cursor and all the other GUI stuff with action/bossbar custom font stuff, and that wouldn't break with FOV or GUI scale
they're jus different solutions ig
item displays have 3d capabilities
id recommend u capitalize on those
and also how would you handle different resolutions
it would still cause some issues
but it is surely still better
however
having a pixel generated for 1024 different Y levels
well it'd scale the same as all the other Minecraft gui
just for the cursor though
well you don't really need the other elements to move do you?
well unless they're moving dynamic ally all over the screen all the time, you only need to generate fonts for a few possible y levels
you mean like the anchor point would look weird?
you'd probably want that though. that's like the reason the setting exists if I'm understanding you right
that would not work tho
bcs
you dont know the UI scale of player
the math would be off
imagine generating 1024 y levels
for each height right
but player would be able to see just 600 pixels
you don't need to though. the elements only need to have the right position relative to themselves. it would be really weird if GUI scale didn't scale those properly
what o-o
what why 600 😭
just a random number
and why 1024 then
Ive just calculated it ingame
but as mentioned
you need to generate each pixel for Y level
why
for the movement
for the movement of the cursor yea
why anything else
you don't need to draw the UIs dynamically, use sprites
bcs why would you handle the cursor w actionbar and the rest w displays?
well no
people do not know how to use them
I was saying to just not use displays at all 😭
I think people are smart enough to figure out how to just add sprites
yea
but ye
still
if you would change scale of ur UI
its gonna break completely
Im gonna test that cause I'm not sure
I am sure
I feel like the relative positions of the elements to each other should stay the same
when you scale up ur UI
then also ur chat, actionbar, etc. scales up
including sprites
@scenic vapor Is it possible to make the background of the display entity visible at all times? For example if I set the width and height to 1920x1024 then I want the black background to be visible even if there's no text?
am using item displays for that
Interesting, how would that work?
So I need to use resource pack for that.
Like make the item larger but don't show anything?
well how else would you have textures like that lol
using pixels
it is doable
theres unicode char for the square
just upsale it
remove BG
okay, how else you would reasonably do that
xDDD
lmao
no idea but it is doable xD
just making sure 🙂
@scenic vapor
the thing at the bottom is 2 different characters
they stay together throughout
so i'd assume there wouldn't be problems with ui stuff in that way
the anchoring is what might cause a problem
it is an issue, bcs it scales as well
which changes the resolution then
yea
why does that matter
it's rendered exactly the same
ohhh well yea that would be weird with the cursor

Tried that too. Same output.
And even if that was the case the hashmap should have an itemstack with the amount of 64 left in it.
WAIT WAHT
so I guess thats why am having issues w giveall in my plugin
xDDD
well lets fix that I guess
is that 1.21?
Ive had some issues with giving as well
bcs Ive had stacks of 100 items
instead of 64
maybe it could be somehow bugging out?
if you want to give the 10 stacks
try to just separate the ItemStack into the stacks
and give it like one by one
however ye the latest changes in 1.21 are pretty buggy
as well in papermc
for example item flags do not work to me till now
Does anyone here know how I can create a sidebar display board with packages for Minecraft version 1.21.1? I don't know how to do that with this version. I last did it in 1.16.5
using packets?
packets aren't really necessary for scoreboards
Holographic displays, i have a visual timer, but everytime i call "updateHologram" method, it seems to be effecting the server performance. Is there a performance friendly way to update the hologram?
I dont think that this is the correct place to ask that tbh
I would recommend using a custom system for holos I guess?
kotlin or java?
java
oh well rip then
I wanted to tell u to try using my lib
Ive got packet based holograms there
w view conditions, conditional lines and animated lines
but it is in Kotlin
so it may be confusing to u
if you dont understand kotlin
I dont have docs done for it yet
you can see the holo here
(Ive been showcasing animated UIs in the video, so ignore that
)
that looks awesome
The fuck is AquaticString

so I can use the kyori component in entity names, inventory titles, itemstack, etc.
Spigot rules are spigot rules

welp

surely it interops with java fine though
yeah i understand what you mean though
well not all the stuff tho
bcs
Ive got some serializers there right
that are using reified keyword
which is not supported in java
am trying to make it work in java tho
Is it not compiled to something like reified0?
I have no idea tbh
I havent checked it
however the methods w reified are not visible in java
and u cannot use them basically
ah I see, i thought you meant the name is reified
nah
am using <reified T>
am also working on a system that automatically generates ingame editors
will be painful ngl
what kinda serializers do you need reified generics for lol

ingame editors 
am doing loads of generic stuff
not like kotlinx.serialization?
no
like serialization from FileCOnfiguration, etc.
I basically got a system for Prices
Actions
Requirements
etc.
however instead of binding it all to Player
Ive got <T> to set the binder type
oh I just use Hoplite for that, super easy, just make kotlin data classes and it fills it in
yeah I mean that just seems like a very manual config setup lol
data classes can have methods and stuff, you know
yea but I dont get why I should use the Hoplite lib hahah
Ive just got a generic actions class
that can have different binders
cause you don't need to write the serialization logic
you just make an object hierarchy and it knows how to map stuff
best thing i've ever used for config stuff
how would that handle polymorphysm tho
polymorphism in what way
if you have different options, you can use sealed classes as sum types to have it pick one or the other
it is an action in meaning of being able to send actions when you do something ingame
so yeah you'd just have like a List<Action> and it would match any of them depending on the structure of the data
or i think you can use a discriminant string
interesting
yeah i use it for a custom block plugin, so you can either have noteblock blocks or like regular minecraft blocks
and it knows which is which based on the fields, like a noteblock one has a note and instrument field, and a normal one has a material field
that's my whole config class
and then it can load it from any json, yaml, hocon, toml, etc. file you give it
interesting, however I may not be able to use it anyways as I wanna make it so it generates the ingame editor automatically
😅
how would it not be able to generate the ingame editor
Kotlinx.serialization is so good
it literally just gives you kotlin classes lol
am using custom class that handles the editing and the real value
okay, so make your custom classes with the classes that this binds for you
you can exclude fields and stuff too iirc, so you can just use that as your wrapper class
ah, always hated ingame editors
ye same here
but like my customers do request it a lot
and my plugin is already quite advanced
yeah i mean obviously not for this kinda stuff
but if you ever want a simple configuration loader, hoplite is as good as it gets
the most declarative you could possibly be lol
interesting lib, ty for sharing B)
I have a really neat config system in a project I'm working on, basically you do something like
@Serializable
data class MyConfig(val name: String)
Then all you need to do to load it is
val config: MyConfig by config("/path")
I don't care about editing it at runtime, just reading so didn't add much more, but could easily be done in a neat way
yeah that's pretty much hoplite lol
How is config() defined? I saw by whatever a few times in kt but idk how it is defined / works
Ah it seems like it is just a class/interface that overrides an operator
It's a property delegate, basically contains operator function getValue and/or setValue, once you use it it's the same as calling the method but you don't need to reference it
Easiest way which is the way I'm doing is to just use a lazy wrapper around it
Cool
Yes it is (1.21.1). And I was trying to limit how many times I use the addItem method because it takes a lot based on profilers.
there's still quite a lot of bugs on 1.21.1 from my experience
Yeah might just have to write my own inventory methods anyways. Especially firstEmpty (-1 if inventory is full)
what's wrong with that?
Is that not how a lot of things work in general? x.indexOf("Hi") != -1 => x contains Hi
The method always worked like that iirc, if your problem is the -1 for full inv
It's taking a decent percentage per tick when ran alot.
The content array is full of even null objects.
yea if am not wrong, this content is even used in the packets then
I was only using that method as an example the others aren't great either.
Doesn't it just check if the item is null or air? What could take so much resources?
ye am actually thinking abt this too
lol
but ye Yappery mentioned that he uses the method just as an example
^^^
Pretty sure it tests for something else too. I'm not currently looking at the code though.
This is pretty slick, but how are configuration/loader properties configured?
Like config type or node style?
Wdym?
Like if I wanted to use hocon over yaml, or if yaml there's two node styles for how the config is presented (single line or block indentation)
I only use hocon but you could easily make it use a different serializer depending on the file extension
As for node style that's all handled by kotlinx serialization
Ah gotcha, I like the default hocon thank you for your service
I love hocon, been using it for everything
It was the first config I had to use so yaml was quite the downgrade for me
There any good guides for Brigadier commands with paper?
in what way
like doing them raw? there are a ton of libraries to make it nicer to use
commodore? I've heard stuff about that just not sure if its good
commodore like one step above raw, but there are lots of full command frameworks that can do brigadier stuff
one of my personal favorites is https://github.com/Revxrsal/Lamp
you can also go with https://github.com/JorelAli/CommandAPI if you like the builder style more
How do I refresh gradle dependencies/cache? I deleted the caches file in my .gradle on my macbook, but doing that broke all my projects and I can't get them back on their feet
Something about not being able to read workspace metadata
never heard about lamp, it looks super cool
Deleted the entire .gradle an dit sorted itself out
what about triumphcmd? has that fallen out of flavor or is it still valid
lamp stack 😳
it's not really supported much anymore, the docs are down too iirc
They're still up
Oh, then I should probably change the Github README lol
I mean at this point I have the whole API memorized, is it a bad idea to just stick to it for the time being
cause that link is borked
oh I mean if you're already using it then yeah it's no problem
I suppose it's not worth learning now is that what you mean
Yeah possibly not, idk honestly
LAMP is my favorite as well, going into v4 (iirc) with user feedback, real nice
what is the best way i can manage my submodule project? i am making a plugin, which will be supported on multiple platforms (e.g paper, minestom, velocity), i looked into dependency injection using guice but couldn't really understand what that was about
For saving player data should i have a folder and each player with its own json file? Only issue i see is that if i want to add a new value to players it wouldnt update. Like if i have money and xp and then after a week i add gems for example. Is there a way to check if user on join is missing a specific value in this case gems and then automaticly add it
I mean, does it even matter if it's missing? Surely you can just add the default value (likely zero) and then add whatever you need and save it and it will override and lazily update
Thats what i was trying to get an answer to. If a value isnt there, but it needs to be, can i on player join check if they have all the values and if one is not there it sets a default in its place.
Bc i dont want to have to make ton of if atatements before every piece of code that changes any value to check if that value exists
why wouldn't you be able to do it?
Example a player joins and the json is this
money:
xp:
But after many updates they join back and the default json template is now
money:
xp:
armorlevel:
toollevel:
playtime:
gems:
Want it to see that some are missinge and it puts a default value on
hmhm?
I want to know how i would do so
.-.
Best case scenario i have a default json format with all the values and how it should look and then it loads based on that.
What should it be
whatever you want
there are so many libraries
why are you not using a db though
?
I did, the code is such a pain to work with, and due to how much i end up needing to save values it becomes spageti code
Having to make a set and add functions and routes for each value you add gets too much when you have 20+ that needs to be changed
It just pain
SQLite i beleave
- i cant esely manualy change data
I mean yeah, ideally you'd use a database library to make that stuff wayyy easier and just do migrations to get the DB to a known-good state
but if you want to do JSON, it should be pretty trivial to just read the data from the file and initialize an object that has all the default values you want, then just immediately save that object
that way it overwrites the defaults with anything they have, but also adds whatever it needs
Yes idealy i would also want to use a db. But i have no good template for it. My current SQLite one takes up 7 java files of just adding and seting and routing to functions. Not susteinable bc adding a single value i must change a bunch of files
How could there possibly be that many files lol
Surely you'd have like one class per table? and then just getters/setters for each thing and a save() method that saves it to the db?
A file for setters and getters and then a parent file for saving that table and then times that with how many tables you got
Why a file and then parent file?
Or do you mean like a record and then the actual class that handles that table?
Also why do you have so many tables, surely you're just storing singular playerdata if you are just putting it all in a JSON file?
Idk dont ask me i just found a template on how someone else did
Yeah it seems like you might want to learn database fundamentals at some point to best manage your data
For now I suppose the JSON thing will work, it's just less than ideal for anything but a single server setup
I do know the basics
Just want a clean way of doing it. An example or something
I mean it just depends on what databse library you use
They all have their nice ways of doing stuff and make it easy to work with
But even if you just wanted to use like raw JDBC, it should be pretty simple to make a single classfile that contains instances of the table and has get/save methods
And from the sound of it, you could get away with just one table easy peasy
Or a manager class + data class combo, also works
Hey guys, I am creating a placeholder expansion in my plugin, which is found successfully ([PlaceholderAPI] Successfully registered expansion) although for example this code:
if (params.startsWith("team_topraidable")) {
int copy;
try {
copy = Integer.parseInt(params.split("team_topraidable")[1]);
} catch (Exception e) {
return "Error: " + e;
}
List<PlayerTeam> teams = getInstance().getTeamManager().getTeamSorting().getTeamTopRaidable();
if (copy <= teams.size()) {
PlayerTeam pt = teams.get(copy - 1);
return Config.HOLOGRAM_FTOP_RAIDABLE
.replace("%team%", pt.getName())
.replace("%number%", String.valueOf(copy))
.replace("%raidablepoints%", String.valueOf(pt.getRaidablePoints()));
}
return Config.HOLOGRAM_EMPTY.replace("%number%", String.valueOf(copy));
}
Doesn't work when I add a hologram with the line {team_topraidable1} for example, why is this?
If you need to see more of my code please let me know
aren't placeholders literally with %% and not {}?
Idk but neither work I can send u a screenshot but i dont have permissions to
it is normal you can't post images
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/upload or similar service to upload images/screenshots.
^^
Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
• HelpChat Paste - How To Use
or
what hologram plugin is it?
maybe sure you look up how to put PAPI placeholders in there since some plugins do it differently I think
Holographic Displays
your identifier is azurite
so it goes %azurite_killstreak_top% for example
oh i thought the identifier was for something else
ah
yes! that works, thank you
np 👍
https://dev.bukkit.org/projects/holographic-displays
btw note that the bukkit page says that Holographic Displays is no longer being developed, so if you haven't done many holograms yet, maybe it's better to switch now rather than when you already have everything setup
yeah well, im on legacy and theres not really any supported hologram plugins for legacy
thanks for keeping lookout though
for some idiotic reason my delete queries don't work with mariadb driver
any idea why that could be?
when I execute the same query on heidisql it works without issues
at first I though it was related to database encoding and the value stored was an uuid
and then I changed it to an auto increment int
still the same
I debugged everything, from the id to query itself
I am stuck with this issue for the last couple days
Might need to show both the query and the code to execute the query, can't really tell what's going on with just you telling it doesn't work
sure
@Override
public void removeRefundAsync(int id) {
EXECUTOR.execute(() -> {
try (Connection connection = dataSource.getConnection();
PreparedStatement statement = connection.prepareStatement(Queries.DELETE.getQuery(refundsTable))) {
statement.setInt(1, id);
statement.executeUpdate();
plugin.getLogger().info(id + "");
plugin.getLogger().info(Queries.DELETE.getQuery(refundsTable));
} catch (SQLException e) {
plugin.getLogger().log(Level.WARNING, "Database thrown an exception!", e);
}
});
}
DELETE("DELETE FROM %s WHERE id = ?;"),
SAVE_REFUND("INSERT INTO %s (issuerStaff, playerName, item, server, time) VALUES (?, ?, ?, ?, NOW());"),
CREATE_REFUNDS_TABLE("CREATE TABLE IF NOT EXISTS %s" +
" (id INT AUTO_INCREMENT NOT NULL, issuerStaff varchar(32) NOT NULL, playerName varchar(32) NOT NULL," +
" item TEXT NOT NULL," +
" server varchar(64) NOT NULL, time DATETIME NOT NULL, PRIMARY KEY(id));"),

and the getQuery method is just:
public String getQuery(Object... variables) {
return this.query.formatted(variables);
}
just something I came up with to replace the table name
Hmm that is a bit odd because it does look fine and should definitely work on mariadb 
how do I check if the auto commit is true or not
maybe its something related to that or my database
I also thought maybe it was related to my executor but nah, debugs work and I also tried the same on the main thread, still nothing
SELECT @@autocommit apparently, according to SO
Might be worth trying it out on a fresh database as well
it is quite new, actually
I created it specifically for this plugin lol
on cPanel
yeah it seem to be true
I tried taking it outside of the try statement, just in case if the connection was closed before the query was actually executed
did not solve the issue either
solved, it was infact an idiotic thing
What was it?
It's fine we all do idiotic things, just curious ;p
I have another table for logging the refunds, which has the same schema with the refunds table
remember the getQuery method? I passed the refundsTable variable instead of the logsTable
lmao
Oh I see, honestly understandable mistake
I can't believe this is what I've been stuck with this for days 
sometimes to solve a problem you need to ask someone about it
and you usually find the problem yourself
happened to me like 90% of the times when Im stuck with something lol
For that exact reason I have a Sherlock Holmes rubber ducky beside my table
Good day, I am faced with a problem that when you make more than 100 different menus, they begin to replace each other, that is, if I make 101 menus, the menu that already existed will be replaced with menu_title: 'Default Menu', what to do with this and how return my menus????
this is for development
or am I misunderstanding and this is not a DM issue?
your sentence kinda hard to understand
It's hard to understand that when I create the hundredth menu, those menus that have already been created are replaced with 'Default Menu'
is this in DM?
Then #general-plugins is the right channel, I am not sure what this could be, maybe a bug... who knows
hmm, for some reason all my variable is parse as void?
the code itself
float spriteWidth = sprites.loadWidth() * ratioX;
float spriteHeight = sprites.loadHeight() * ratioY;
int id = sprites.loadTexId();
Vector2f[] texCoord = sprites.loadTexCrd();
ImGui.pushID(i);
if (ImGui.imageButton(id, spriteWidth, spriteHeight,
texCoord[2].x, texCoord[0].y,
texCoord[0].x, texCoord[2].y
)
) {//rest of if statement go here
}
or maybe im interepted it wrong... Just updated the library, probably the function is now void type so the if statement is broken
it used to be boolean type to detect when the button is click or not. so I might need to find a new way to check if that button is click
Looked into the native code, it seem like this is changed because ImGui already have item check so probably can use that instead
if I want to check through code that a player-built structure matches with a template structure I have buit, do I just have to check each block one at a time or is there some other, better way?
I guess it depends on the size of the building, the check frequency.
It's like 5x2x5
Nothing massive
But generally what's the best approach for small and for big buildings?
50 at most of course
Really I am checking for 8 locations right now
How many do you think it would be worth using another approach do you recon
it also depends on whether you have an origin point to check from, or if rotation is allowed, etc
honestly you can probably do a good few thousand before you need to start worrying
but yeah it depends
I mean you need to do some sort of equality check either way
with a big enough build i imagine it might eventually be worth to do one of those chunk clones, to copy the block data and process it async
but yeah you'd need to cover a ton of blocks before that becomes worth it
the only problem with that is that if the users change a block mid-processing you end up with the checks giving false positives
but i guess that's easy enough to prevent
yeah
@dusty frost sorry for the ping but do you know what cause this ? I try generate the wrapper again to try fix it but it no work, so I might want to remove the classpath, since they said it is not needed
yeah I mean try removing the classpath stuff
But honestly you should be able to generate the wrapper without even running any code in the project
so I might recommend just making a new project from scratch, making sure gradle is all setup, and then porting over your existing lwjgl stuff
i see, does pushing from the new project to github sstill work normally ?
uh I mean if you set the git remote to that and just fully recreate, yeah
might just be worth it to make a new git project honestly
it a bit complicated since I also have other contributor so I might go to that if makeing new local project not work
actually the classpath is correct, but the system is pulling 3.3.4 from another project, so ugh i'm kina lost at this point why it behave like this
does anyone know why the placeholderapi dependency errors out?
i have never used tweaked the pom.xml before so im kinda new to this stuff
it says the dependency me.clip:placeholderapi:2.11.6 not found
nvm i forgot to refresh maven haha
Do any opensource alternatives to model engine exist?
I want to see examples of how the bbmodel file format is parsed and implemented
trying to implement a hologram that will follow the player, pointing towards a location if you follow it
i know theres some mathematically way to do it im just confusing myself when trying to figure out how exactly to do that
what does the hologram look like?
like how does it point?
legit its just text that shows a distance aswell
its not a physically arrow or anything
oh that appears like x blocks away from the player?
player is at 60, 60, destination is 0,0. hologram is like 4 or 5 blocks away from the player that if you walked towards the hologram itll eventually end you up at the destination
but the hologram moves based on where you are
so guiding you towards the destination
okay then yeah it would probably only need a little bit of trig - it'll be quite helpful if you already know how to use sin/cos but if not, there's a bunch of other people that already asked: https://stackoverflow.com/a/43642346/ for ex
oh you'd also have to find the angle
I wonder if bukkit vector has anything for this 🤔
there's probably a much simple way to do this with bukkit vectors
found a way to compute an angle thats in the direction of the destination, now just gotta use that to generate a location like 4 blocks away from the player
yeah completely out of my depth no idea how to get this shit to work
the angle isnt even one that makes sense, its just tiny
testloc is 50.5, 76 50.5
like from googling ive got the info that i need an angle thats between 180 and -180 and then do some rotation matrix shit to rotate a point that like 4 blocks away from the player around the player by the angle that the atan2 thing is supposed to generate and then itll give me a location that is between the player and the destination location
nooo
no matrix stuff
hold on
im assuming the matrix only applies when you dont know certain values?
idk matrix math is complex math
at least more complex than my current level of knowledge
🥲
like ive been sat here for like 3 hours trying to come up with some sort of solution that i can break down and turn into code
like a method for it
tbh should ask chatgpt
or if you wait a bit I might be able to make some psuedocode-ish
hmm, both circles would always collide in the same point if both circle sizes were A in radius
variables: dest, player (loc), radius (hologram distance)
// find angle
angle = Math.atan2(dest.y - player.y, dest.x - player.x) // angle in degrees
angle *= 180 / Math.PI // angle in radians
// find new point
y = radius * Math.sin(angle) + player.y
x = radius * Math.cos(angle) + player.x
```something like this should work
maybe?
ahh i reversed it
oh wait and add player loc
there we go
atan2 seems to range between 0 and 3, both negatives of the same aswell which is weird
just wait until you enter trig class and it'll all make sense 🙃
(pi = 3.1415....)
atan2 already does it in radian, so with removing that adjustment its working fine
oh wait its actually degrees to radians
idk
confus
why
you can just get the difference vector and normalize it to those blocks
- get difference from player and destination
- normalize to 4-5 blocks if player is > 4-5 blocks away from destination
- profit
there is absolutely no need for trig
why yall overcomplicating it 😭
I'm so confused. i must be missing something.
you're just trying to get a point 4-5 blocks away from player in the same direction as a destination right?
there is no need for rotations here
yea literally just this
then
the way luna started looking up rotation matrices is quite funny
please read more math 🙏, and how it's actually applied
and stuff with vectors is really quite simple if you avoid matrices
oh and btw id recommed not using bukkt vectors
joml vectors are superior in every way
Update on the issue
The new version of the library that I use upgrade to a lwjgl version newer than the project, I fixed the issue by updating the project to match the library requirementy
Hello
ye
i spent way too long trying to come up with a way to get it to work
also i read that the distance method doesnt work at long distances
why
what
literally just this
30 seconds of programming
do you understand how the distance method works 😭??? unless you're making a Minecraft map bigger than billions of blocks you'll be fine
it's literally just Pythagorean theorem
this should be x and z not x and y
sorry for the ping
and even then you shouldn't be using trig @proud pebble 😭
Oh yeah whoops
Either way you should use the vectors 🥲
Idm
extendedclip clip repo down?
Repo down...
Follow along in #announcements fo status updates.
Damn. I was going insane, so this explained it.
same
#general-plugins @west basalt
do i have to delete message from here?
Would be nice 🙂 and don't ping staff members for help, just wait
Hi! I need some help with a plugin I'm making.
I've made a bleeding system where there is a chance of start bleeding if you get hurt, and you'll need to heal with a bandage (custom peace of paper), very simple
The problem is that I can't make it work well the healing part, sometimes it doesn't heal when you "bleed" even if it says it does
Video in
code?
Yes, on my way
Im making the video, and will post my repo
huh cant upload video?
?imgur
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/upload to upload images/screenshots.
You can also use a screenshot service like gyazo or jinx and post those links here.
The class where I manage the bleeding system is BleedingEffectManagement
Video
it took me so long cus i didnt know what steps to take to get it done
use UUIDs, not Player instances to identify them
ex in the map it should be Map<UUID, BukkitTask>
also when the player takes damage, it seems like the code doesn't check if the player is already bleeding
so you should either check or cancel the previous task, since right now, it just replaces the previous task in the map without cancelling it
like my thinking was get an angle off the player's coords and the target location and then transform the players location 3-4 blocks in that direction
just getting the distance doesnt give an angle
the angle isnt based on the player's looking direction either
also its been a while since i played with vectors and programming as a whole really as ive not touched any of my projects in months so im a bit rusty and trying to come up with how to approach something i know very little about isnt gunna be a fast process
so it accumulates
Yes i believed that was the issue
But didn't know how to manage it
oh then you should make it a list
inside the map
or multimap etc
Well my main idea is not to accumulate
oh
But thats what is happening right now
Hence im opening tasks and tasks and cant instanciate them
I see then
Will try to modify it
Thanks!
im a bit late on this but ur code is fine, all u need to do is instead of Map#put you should use Map#compute
so:
yourMap.compute(player, ($, oldTask)) -> {
if(oldTask == null) {
return task;
}
oldTask.cancel();
return task;
});```
or use what Map#put returns; it returns the previous value of given key or null if none
so
var oldTask = map.put(player, task);
if(oldTask != null) {
oldTask.cancel();
}
Well everything implemented
what you both have said
Now will see if it works
Looks like it works now
Thanks!
ok well just do what I said and ur done
you don't need an angle!!! nor trig!!!!
.
literally just like
var playerVector = player.getLocation().toVector();
var diff = dest.sub(playerVector);
if (diff.length()) > THRESHOLD) diff.normalize(THRESHOLD);
Location displayLocation = new Location(world, playerVector.x + diff.x, playerVector.y + diff.y, playerVector.z + diff.z);
nice!
for nearly a day
i guess that's why ive been trying to compile my plugin for few hours
thinking something wrong with my plugin
ahh dammit
@scenic vapor can i get your resource pack that has 1920x1080 dimensions for item please please? i'm experimenting with display entity and wanted to achieve what you had before, which is the large background shadow.
those are regular items
it really is not affected by resource pack
Ive only got 2D items imported that got 16x16 ingame pixels
Oh, so you spam it until it reaches 1920 pixels, basically?
what? 😂
no I just set scale of the item display
and the texture resolution is 512 for example
so to reach 1920 you need to use 8 items in total
due to resource pack limitations
Ah scale okay, so "invisible item" in ItemDisplay and you scale it up? this is confusing me lmao, okay, can i receive the same outcome if i use unicodes that has 1920x1080 dimensions of nothing?
Hellow, someone knows how to create this item using NBTAPI?
/give @p nether_star[attribute_modifiers=[{id:"scale",type:"generic.scale",amount:0.2,operation:"add_value"}]] 1
I don't mean using spigot api like setAttributeModifiers and a map with Attribute.GENERIC_SCALE
I mean, make it manually using NBTAPI methods like setString etc
attribute_modifiers is a compound list I guess
jokes on you, I do not have this limitation
mine is just a 1920x1080 png xd
Pros and cons of item displays vs text displays I guess
yes, that's what my approach is
might involve more math to properly set coords since item displays the coords are the center in both x and y
while in text displays it is the bottom center
#showcase message for ex. is one 1920x1080 text display for background and 2 others for the cards
So basically, you either go with item displays which are easier to use because of custom model data, but require extra work for the textures themselves, since item textures NEED to be a square. Or you go with text displays which you have to do some extra math and extra work to define each texture's unicode but at least have the freedom with resolutions
Both choices work, and are up to preference.
i think so too, but i dont understand exactly how to make it since NBTItem instance
Hi guys!
Is anyone of you having issues while running "mvn package" on IntelliJ IDEA?
Basically the repo.extendedclick.com website is down, so i'm getting some errors for that.
I'm basically stuck on this issue and idk how to bypass it, can someone help me?
consider using search regarding an issue
Thank you! 🙏
And sorry, i just joined here so i didn't know
If maven previously downloaded the dependencies then offline mode can temporarily fix this issue
Nope, sadly i had some issues before :/ can i tell you on dm?
what?
you cannot have over 512 pixels in a texture
sorry to inform you, you can xd
in text displays it can be any
in item displays, the item texture NEEDS to be a square
so 1920x1920 for ex.
(part of the item is unconfirmed, I just know it needs to be a square)
wait so is this inaccurate?
"Glyphs themselves must not be larger than 512x512"
what's the difference between textures and glyphs?
glyphs are custom texture characters
you cannot go over 512
welp, it appears that's wrong
cause I am LITERALLY using above 512
otherwise u can't
so are you just displaying this big image as a glyph in a bitmap, mapping it to a character?
that's strange tho
I've been working w Custom UIs using glyphs for quite long
and there was always the limit
o-o
yes
1s
opening vanilla and starting server
gonna test it
do you like have a pixel texture
and then render whole image using it?
or do you have over 512 pixels big texture in the resource pack
- option
huh
could you send the resourcepack that's letting u do that then
yea xD
maybe it got updated recently?
hmm think you are right
I've also sesrched it up on the internet
yeaaa that would make sense
o
it won't load the pack
bcs of the error
if am not wrong
it fails loading the image
it did load
oh
the resourcepack
does it work
the image is not showing though
got baited
sad news 😦
xD
😭
it requires optifine
well it requires optifine to have higher resolution
tbf, most people nowadays do use an optifine, etc.
wait what
how am I 2x in the game
LMAO
minestom moment
Ah Auth is not on
wait a sec, how did that one guy do it...
1s
I was fooling with packets and found out that you can trap the player in their body
like they are in their player but have absolutely no control
uh wut
in any capacity. was very interesting
i don't
Not true at all
Oh welp
how so
You'd be surprised the amount of people that play vanilla
yea
let's start a statistical debate based on no statistical evidence
minecraft is quite literally unplayable without it, from polls servers I worked at did, over 90% was using them
and most of servers do hope that they are using vanilla
bcs iris breaks the server shaders
well, audience here is people that play on servers
not just vanilla
We had stats but I don't remember so I won't say anything but from people joining island (many many thousands) the percentage of players on optifine was very small
did you include sodium, rubidium, other stuff
And the amount of work I had to do to support optifine because it doesn't render components correctly
yeah ^^
or just like a general "non vanilla"
Yea 😭😭
Including fabric it is higher but vanilla is still the most used
cause optifine itself is just falling out of favor for new versions
wait which components?
All components
ah interesting
it would definitely vary a lot with what your audience is
Font shenanigans
yeah
although tbf, audience I am targetting is a more casual one
sooo....
Yes but optifine changes how text is rendered making components not render like they do on vanilla
ur probably gonna see a lot of vanilla players then if you aren't too custom
does not apply to other performance mods, optifine only
Also lunar client used to completely fuck anything related to text because they also messed up how components are rendered
I had something similar with my font based particle library, the transparency is all different depending on the client
Eh either way, it's no biggy if textures 1920x1080 don't render, luckly I have made the system easy enough to use that splitting that screen into several 512x512 is no big deal
yes lunar and badlion hwk break a lot
define "too custom"
I am not doing an smp
We had a lunar dev join island during dev time to work on fixing the component rendering 
in lunar I assume?
Yeah
textures and models
Matt by any chance
have you taken a look into optimized world handling?
I've tried to actually, because am working on one multi server handling
Well using text displays still has that one advantage... resolutions still don't require to be a square
and it has loads of logic with worlds
I mean, it is quite custom yeah, I am using minestom, not gonna do an smp for sure xD
I haven't really messed much with world handling, I do think we do stuff with it, but it was another dev
for item it does not have to be square as well
oh I see
don't tell me the papermc guys baited me on that one too
lmao
well I've been thinking Abt copy pasting code from paper
and skipping some logic
and putting it more into async
as much as I can
lol
a tiny bit better to handle I guess
in what sense?
around X and Z
yes
yes
they're displays
item displays can't?
matrix transformations work on them

basically that