#development
1 messages · Page 50 of 1
i think u do, at least i had to (i think)
you think the guy who wrote the api for it
didnt think of fixing it
fr?
u mean spigot?
when you spectate other player which is 500 blocks away in mc it dont work
it does
you dont have to do teleport then...
because server dont teleport u first and then does the other thing
yeah
you'd be surprised lmao
also what r u trying to do?
spigot api is in good hands
ok
looking back on my code, maybe i didnt, my whole spectator logic stuff is a big gross to look at tho lmao
i also didnt add a delay, but i think ive been experiencing issues with it, havent touched it in a while
i was trying to apply the shadow plugin with a specific version via my own plugin, but im not gonna do it cause just makes more sense for the user to apply it like any other plugin
apply?
its a library
or you want to use other plugin via ur plugin?
so it will beocme like 1 package
becuase if thats the case im sorry to tell you but it just doesnt work like that
just add it as dependency and thats it
also shadow the lib into the resource
yes, apply the plugin to the project
but its fine, im not gonna do it...
i dont think i want to help you using other resource va your resource
kinda big red flag
piracy
what... its apache license...

shading a jar into your own jar is definitely not piracy..
im also not even doing that lmao
what are you trying to do?
you can 100% apply other gradle plugins from your own
he wants to shade a other spigot plugin
not a library
and still thats not piracy
^
using other resource via your own
you're not going to shade a gradle plugin, but you can apply a plugin
its piracy tbh
it's not piracy lmao
its just not
the unauthorized use or reproduction of another's work.
"software piracy"
keyword: unauthorized
ok so ill get an paid plugin and shade it into my plugin like the guy wants so my plugin launches other plugin also
who said it was paid
and claim that both of those are my job its piracy sorry to say
who ever said anything was paid
?????????????
so long as you comply with the license it's fine lmfao
you've got to be the lamest troll i've seen this year
srynx its off topic since it i didnt get u correctly
apply shadow plugin to the project from his own gradle plugin
^
oh right, I can't help too much there
yeah its fine im not doing it anyways
you might have some luck looking at tasks provided by shadow plugin
realized it'd just be too messy in my case
i definitely thought this would work but it screamed at me saying it couldnt find the com.github.johnrengelman.shadow plugin, oh well! 🤷♂️
in your plugin you declare it as a regular dependency, and in your apply(Project) method, there's a method in Project you use to apply other plugins
yeah i got the actually dependency part down so that i can use the classes and such from it
but the issue is that if i use what i declared in my plugin's dependencies to apply shadow, then it'll be locked to the version i used for my plugin, y'know?
like i think i could do apply<ShadowPlugin> or something, but then it'll be locked to using version 6.1.0 (what my plugin has in dependencies)
then you're adding it as a dependency wrong
repositories {
gradlePluginPortal()
}
dependencies {
compileOnly("com.github.jengelman.gradle.plugins", "shadow", "6.1.0")
}
try "com.github.johnrengelman", "shadow", "8.1.1"
Tip, look for the plugin on the gradle portal, and the "real" artifact details will be in the legacy area for the class path
it's true
yes, thats what i did
Then how did you get com.github.jengelman.gradle.plugins? 
because 6.1.0 doesnt use that
Oh outdated I see
thats why i have ShadowVersion:
BELOW_7_0_0("com.github.jengelman.gradle.plugins"),
BELOW_7_1_0("gradle.plugin.com.github.jengelman.gradle.plugins"),
BELOW_8_1_0("gradle.plugin.com.github.johnrengelman"),
REST("com.github.johnrengelman");
why tf would you do that?
to know which group id to use
yeah but do you use multiple gradle versions?
across my projects yes
why? why not keep your projects up to date?
gradle plugin
yea
some of them arent working on 8.x.x for some reason
i think theres an open issue on shadow's github page for it
skill issue
Is the gradle version compatible with the shadow version?
if u use gradle 8.x.x, u need shadow 8.x.x and vise-versa
Almost
35%
Yes, I'm asking about the projects where you are having issues, if it's all up to date
I have never encoutered an issue with shadow not working
Because I feel like it's easier to solve what ever issue you have than to over engineer multiple version support
oh dear
well i'd want it to support multiple versions, and to not force a particular one on people that may use my plugin
i thought that was like a programming guideline or something
In that case I'd recommend depending on shadow and making people apply it on their own instead
I agree
yeah thats what im just gonna do
how would i be able to grab the version from the pom.xml and use it in a class?
howdy howdy howdy
so if i want to include my plugin.yml and any maven dependencies in my plugin how do i do that
Isn't it just <plugin instance>.getDescription().getVersion()
The plugin yml goes in the resources folder, as for the dependencies, you add them into the the dependencies section in the pom.xml
yep thanks
working on mcmmo lol
Sounds fun haha
cleaning up the papi expansion
awesome! so how do i then get those dependencies into the jar comin from maven build
with maven-shade-plugin?
Yeah
awesome
Oh hi Omega
Hi
also fyi for this you need version: '${project.version} with filtering and such enabled via pom.xml
in anybody else happened to need to know for the future 
i wanna do custom hud with my plugin
tellraw with custom textures works but if someone writes in chat its all messed up
actionbar with custom textures works but you can only do one at a time and theres no up or down offset
You can just intercept the chat packets and send them correctly-ish
I highly recommend doing actionbar hud
And you can move up and down
could it be related to the fact the other item would already be dropped
maybe when the event is called tho it's not considered as being part of your inventory
But the slot is being cleared right? Or am I just dumb
try also clearing event.getDrops or whatever it's called
actionbar hud seems pretty good but i cannot do line break
if you can be bothered to mess with font magic, you can effectively do multiple lines
although if you need line breaks, consider scoreboards or boss bars instead
i was using the negative font in bossbar but theres no vertical offset that you can just add to move everything (i asked AmberW)
i cannot get line breaks to work in bossbar
ironically the correct name shows up in the text chat when it says "boss bar[
]" has been renamed but in the actual thing they show up as boxes
You can use multiple fonts with different ascents to achieve line breaks
yeah that sounds like it
Does anyone know if Server#getTickTimes is all I need to get the MSPT?
[16:21:57 INFO]: Server tick times (avg/min/max) from last 5s, 10s, 1m:
[16:21:57 INFO]: ◴ 5.2/3.6/19.3, 5.0/2.6/19.3, 5.4/2.1/53.3
Is possible to pass an imported SVG to a inner component in React using some mechanism (I thought in using props)? Because I did an attempt but couldn't figure out what type I was supposed to inform in the prop so it would work, and how to use the passed SVG in the inner component's HTML.
This is the children, a button with text and an image on its left side.
function ActionButton(props: { imageSource: any, btnText: string, isFilledColor: boolean }) {
return (
<button className={props.isFilledColor ? "btn-filled" : ""}>
<div>
<img src={props.imageSource} alt="Button icon"/>
<label>{props.btnText}</label>
</div>
</button>
);
}
This is the parent component
import ActionButton from "../../ActionButton/ActionButton.tsx";
import addFileSvg from "../../../assets/svg/add_file_icon.svg"
function MainWindowActions() {
return (
<div className="horizontal-div">
<ActionButton imageSource={addFileSvg} btnText="Add File" isFilledColor={false}/>
<ActionButton imageSource="../../../assets/svg/add_folder_icon.svg" btnText="Add Folder" isFilledColor={false}/>
<ActionButton imageSource="../../../assets/svg/undo_icon.svg" btnText="Undo" isFilledColor={false}/>
<ActionButton imageSource="../../../assets/svg/confirm_rename_icon.svg" btnText="Rename" isFilledColor={true}/>
</div>
);
}
I'm branch new to React, I was just trying to figure out how to pass either the SVG path or itself (by importing it first) and somehow informing it to the children component ActionButton so it could get the image dynamically.
yeah that should work
i would recommend not using the props: in front, just destructuring the props directly
some reading 😌
OBS.: I'm not using Node.js, so I don't have the require thing that I saw some guides in the internet recommending, I'm using Vite to deploy my application, and this code will be transpiled into WebAssembly by Tauri/WRY/Whatever the name of the library that Tauri uses.
I could not figure out how to do that in TS, the code didn't compile, and I also didn't figure out how to set default values for the props
i love wasm!
Wasm will replace html as a security layer
Would it be heavy on the server to save a couple hundreds files that contain not too much data each every 5-10 minutes asynchronously?
I am thinking not but I want to be sure
database 🙃
also r u a sunblock dev?
if u rly need it, the best way to see is to benchmark it
doesn’t particularly answer my question
no shit
anyway i wouldnt be worried abt perf
unless u notice its being slow in prod then maybe id profile it
but using a database will solve all ur problems
Databases are very good at databasing
real
@rancid bronze
Even if it were thousands of files every few seconds, it would probably handle it
Wtf is sunblock
people underestimate their hardware
Indeed
a server
Recently yes
I see
Servers these days don't have any standards smh
ik the one of the owner guys and hes bad
Which one
average
Source: trust me bro
or smth
I rub sand in my hard drives
Fr, when a server has multiple owners (especially if more than 2), you know the management will be garbage
Uh not in particular
How do you think a business works?
Educate me
well the owners basically a dev so
cant be that good of a server
How does owner being a dev influence the quality of a server?
hierarchies aren't mandatory for function.
Just because theres 8 guys named owner doesnt mean anything
scalability
scalability: the capacity to be changed in size or scale.
Im talking about how it influences scalibility
because if the owner is doing development it makes it harder for them to also do things that help the server grow
Here's 5th grade math:
Need to do 100 amount of work
1 person will have to do 100 amount of work
2 persons can divide the work equally to do 50/50 amount of work
🤯
crazy innit
But you know that just because an owner is a developer it doesnt prevent more devs being hired?
And again, owner doesnt mean he actually takes on all roles
so its pointless and they care too much about titles rather than actually being a productive team!!!!!
whats the point of an owner title if it has no meaning
It means he gets a share I assume?
you cant be a developer and get a share?
You can, but you can also be owner and get a share
so its pointless
Why do you care if a developer gets an owner title
Like why do you care if its pointless
A good way to be happy is to not let things that dont affect you make you upset. (not meant to be rude genuine advice)
it means that theyre doing a lot of bike shedding and not a lot of work
What do you mean by bike shedding
making bike sheds instead of making a nuclear power plant
I dont get still how a role on discord influences the work you do?
what are you trying to prove
Me or him?
they shouldnt be spending time sorting out meaningless discord roles
But they arent
assuming my pronouns now?
u literally admitted owner role was pointless
why would you be given a role if you don't do <something required for the role>
This is getting spicy
Ok so thats why they arent busy sorting out roles on discord
Because they are busy doing other things
huh
This is the dumbest argument
but they made a pointless owner role
im just starting beef with this guy cuz its my brother who owns the server
Uh okay
lmao
Sorry for defending him?
Why are you doing that in #development
you should be.
mb
anyway u should still leave like no jokes
server doesnt even have consistent branding
I’m fine where I am
thats what u think now
Also back to the development question
The reason I dont want a database for this is because I am loading in the data entirely whenever I need it
And I believe a local json file will yield less of a hassle and good performance if I’m doing only that
What type of data?
Properties of an object
What's the object?
it just a json representation of the object
u just described json
I know
What's the object?
If it's JSON anyways than you might as well just save it to a file
I mean the data itself can be easily represented in JSON
So your're loading all of the data at once?
Yeah its mapped per uuid
So I load in the whole object when I need it for the uuid
I guess if you never really need individual properties than that would be easiest
.
Performance wise a local json file that you load when its needed is maybe even better than multiple sql queries
Yeah it probably is because you don't need to lookup the data by key, though I guess it depends on the database implementation
Though I have a single thing I want to query without needing to load in the whole object
Which is whats making me doubt it
But I also considered specifically moving that value to an SQL database
How big is the object?
You could always just wrap it in another object like
Wrapper {
specificProperty: property
wholeObject: object
}
Right but that would still require me to load in the object no?
Well it would prevent having to parse the whole thing
Yeah but then you might as well have it seperate since you still read the file
and at that point why not just load in the whole object
If you're going to put one thing in a database you might as well put the whole thing in it
Exactly
The one key is only needed to be loaded in separately when performing queries on offline players
Like we dont need the whole object when doing that
but i think switching over to SQL will result in worse performance when needing to save and load the whole object which occurs a lot more often
You said you're only saving a few hundred objects at a time though right?
Yup
I can't imagine that having any significant impact on performance
You can use batches too
If you really needed to you could split it up and do half of the objects every 5 minutes
How often does the data change?
I plan on having a variable that says if the object was modified
And then saving the object only if it was modified
Do you think the data is going to be edited often?
So for example for offline operations, i’d load it in and then I’d save every 10 minutes, and if the object is not needed than invalidate it and save if it was modified
Yeah it needs to be in memory
Can you say what the data is / what it's used for?
Like is it for a minigame?
Less so right now
Or something else like quest progress?
But the value that I want to query gets updated every second AT LEAST
if the player is online
So every second per player?
This is probably the best option then
So what I plan on doing right now:
Load in to memory when a player logs on, load in to memory when wanting to modify an offline player, every 10 minutes go over all loaded in stuff, check if player is offline and if yes then invalidate, and then check if it was modified and save
I was considering doing a save whenever a player logs off
Will offline data ever be edited?
But
Yeah like I said
if we want to modify the value for the player we need to load it in
Though i’ll probably never have over 1000 objects loaded
So i think itll be fine
If it's a value like a number you could just use an SQL query
True but that means going to SQL
It would help if I knew what the object was lol, or the general idea of what it is
@leaden sinew dms
new user of adventure's component system for text here, how do i go about making an item's name and lore not italic by default
component.decoration(TextDecoration.ITALIC, false)
.decorationIfAbsent
this will only remove italics if it isn't explicitly set
(also in the future I'd recommend posting in the kyori adventure discord server)
is there a good way to detect left/right click in a plugin
and similar keyboard keys n mouse buttons
Keyboard keys no, sadly we dont have access to those through spigot
For mouse left/right there's PlayerInteractEvent#Action
Ig
is there a way to cancel sneak, so like fire an event when a player sneaks and do .cancel()
note that right clicking on air with no item in hand won't actually register (I think)
the last time i was working with plugins it was 6 years ago, tnt explosions and cancelling them apologies if im a bit out of date
thank you
its a minigame so ill probably just force an item
and for keyboard keys the most you can do are things like offhand detection and movement
alr ill experiment
it does, just that the event is fired as cancelled
all of these packages are coming from a dependency i have implemented. that dependency has these packages implemented, but relocated, why is my plugin including them too? https://i-love.tixte.co/7zFM_99ZAqeaJU6.png
Transitive deps prolly, you can mark transitive false when you're depending on things.
Packets 
Didn’t know that even sent a packet
Wait doesn’t the interact event have a RIGHT_CLICK_AIR action
the client doesn't even send a packet in that situation
yes, but that fires if you have an item in hand, for that the client does send an interaction packet
Ah, requires an item
but i still want the transitive dependencies marked for compile time, the ones i dont want are marked for runtime
Does it not compile?
it does, but now it also excludes dependencies from the implemented dependency that r marked as compileOnlyApi, which i dont want, i only want to exclude dependencies marked as implementation
dependency being implemented:
dependencies {
compileOnlyApi("org.jetbrains", "annotations", "23.0.0") // i want this
implementation("org.bstats:bstats-bukkit:3.0.0")// i dont want this
}
```my plugin:
```kts
dependencies {
implementation("xyz.srnyx:annoying-api:3.0.1")
}
So why can't you mark bstats as not providing transitive deps?
Or is that outside of your project?
because thats not the issue
org.bstats is being implemented into my plugin thats implementing my api, and i dont want it to (cause my api already has it relocated into xyz.srnyx.annoyingapi.libs.bstats)
its putting it in both org.bstats (incorrect) and xyz.srnyx.annoyingapi.libs.bstats (correct)
it should never be put in org.bstats as i can always just access it via xyz.srnyx.annoyingapi.libs.bstats
I think I get what you're getting at, sec
implementation("foo") {
exclude("org.bstats...")
}```
I think that should work
dependencies {
implementation("xyz.srnyx:annoying-api:3.0.1")
}
```here?
Yeah
hmmm thats what i was afraid of
?
cause then i either gotta add that to all my plugins
or add it to my gradle plugin, which means if i ever add a new library to my api, i'll have to update the gradle plugin
is there a way to do it from the api's side? cause before (when i had a broken publication), it wasnt including the implementation dependencies in the pom, which was perfect, cause then my plugins werent installing them too
Why are you providing bstats at all if you're not planning on using it though?
the api uses it
Do you not manage the api?
and again, i can still access it via xyz.srnyx.annoyingapi.libs.bstats
i do
wdym?
some plugins may have custom charts or such which requires bstats
i shouldve said that first 
So not all of your plugins replace the api's version of bstats?
so both the api and plugin uses it
none of them should, they should all use xyz.srnyx.annoyingapi.libs.bstats
Wait, then why are you trying to exclude it then?
im trying to exclude the duplicate of it, org.bstats, which is at the root level
org/bstats/blah blah blah
xyz/srnyx/annoyingapi/libs/bstats/blah blah blah
both have exactly the same classes
So either relocation is messing up, or something is providing bstats transitively right?
Is your API the only dependency that provides bstats?
yes
btw its not appearing in the api jar, only in plugins implementating the api
This is making more sense then, sounds like the (I assume shadow) gradle plugin is doing something weird then maybe?
What does your relocation look like?
its all because of this:
<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
<version>3.0.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>de.tr7zw</groupId>
<artifactId>item-nbt-api</artifactId>
<version>2.11.3</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<artifactId>functional-annotations</artifactId>
<groupId>de.tr7zw</groupId>
</exclusion>
</exclusions>
</dependency>
```in the pom
relocate("org.bstats", "xyz.srnyx.annoying.api.libs.bstats")
sry for slow response, playing fortnite 💀
It doesn't relocate published things, it only relocates things you build with shadow
(haven't fully read the problem btw, just thought i'd mention this)
Oh that's good to know actually, I didn't realize that (never really tried though I don't think)
yeah, i dont even need them to be published
so anyone know? 
I still don't understand exactly what you want and what the problem is, so it's a bit hard to help 
yeah no clue tbh
i dont want my plugins that implement my api to install the api's implemented dependencies itself
right now, my plugins will have both org/bstats and xyz/srnyx/annoyingapi/libs/bstats (which have exactly the same classes), but i only want them to have xyz/srnyx/annoyingapi/libs/bstats
So set the org/bstats as compileOnly on the api
the api and the plugins need bstats to be implemented though
I'm so confused, if you want it to be on both then set it to api on the api and don't declare it in the plugin
using api still includes org/bstats for the plugin
this works btw, when adding it to my plugin, but im just looking for a way to accomplish the same thing but on the api's side, so that i dont have to do that in each plugin (and so others dont have to either)
You'll need to show some build.gradle, because if api has it set as api and plugin is relocating it then the original shouldn't be there
plugin is relocating the api, its not specifically relocating bstats
Then how aare you getting the xyz/srnyx/annoyingapi/libs/bstats?
the api relocates bstats
yes
That's most of your problem, publishing fat jars
But anyways, if that's the case then you shouldn't declare bstats in your plugin, since you'll be getting it from your api
And if you are getting both from the api then you have your publishing configured wrong, which is pretty easy to do because publishing far jars is not a great idea most of the times
skinny jars >
im not declaring bstats in my plugin 
my publishing is just from(components["java"])
how does placeholderapi do it? it has accessible classes from bstats for my plugin but doesnt cause org/bstats to exist
Player#spawnParticle should only show it to the player
very nice
now it doesnt exclude my compileOnlyApi dependencies 
should i just do a skinny jar or whatever and use transitive dependencies? would that accomplish the same thing?
figured out why it doesnt happen with placeholderapi, cause im not implementing it 🙃
how to attach data to a player?
so that if, for example, an event is triggered, and i do event.getPlayer(), i can find one of my own properties i want to set
You can use PersistentDataContainer
some things might be difference since thats paper docs
but it should mostly be the same
🥲 np
@dusky harness do u ever publish fat
so u do just use transitive?
ok its not actually skinny jar 🥲
just wanted to point that out
before u started using it
nah im calling it that from now on
no but i dont publish using shadow or anything
im getting confused between what transitive is now
if i do compileOnly or implementation, is that considered transitive? Since it's still being passed on to the plugin using the library
aaaaaaaaaa
ok i think they are not transitive
there are still reasons to use implementation in a library though without a fat jar
if i want to trigger an event on player sneak, and then make the player not sneak, how do i do that? i did a cancel on the sneak event and also do set sneaking to false but it still happens
i basically want something else to happen instead
basically, player hits shift, do something else instead of crouching, wait until user stops holding shift, continue doing whatever else
it is transitive, just won't be added to the consumer's compile classpath, but to the runtime classpath
only implementation, not compileOnly, right?
is compileOnly transitive?
yeah
i think
it just won't be in the runtime classpath either
but it's there so that u can exclude the dependency for ex
i think?
wooo emily's back
well no, compile only isn't, doesn't make sense
yeah I was taking about implementation
cause im pretty sure compileOnly isnt added to the classpath
yeah
wait but when opening source (like ctrl click) then how does it reference the code or would it just error
what r they?
¯_(ツ)_/¯
the build tool should still add it to runtime classpath
so it'd be shaded into the result plugin
maybe from module file?
wdym
but I checked pom file and you're right, it's not in it 🥲
idk there is usually another pom-like file
.module
wheres that?
oh interesting, i never really paid attention to that file
in pom file:
<!-- This module was also published with a richer model, Gradle metadata, -->
<!-- which should be used instead. Do not delete the following line which -->
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
<!-- that they should prefer consuming it instead. -->
<!-- do_not_remove: published-with-gradle-metadata -->
```which i assume is referring to the module file
and it shouldn't
compile only is not exposed in neither compile nor runtime classpath of the consumer
ig it'd only be useful when looking in the source
artifact.source.pom 🙃 🙃 🥴 🥴
do ur dailies everyone!!!
that's out of the scope of a build tool
ik but theres also -sources and -javadoc which the build tool doesn't need either
¯_(ツ)_/¯
so if i dont use implementation (and shadow) then my plugin wont have what my api shades?
it's basically runtimeOnly in the plugin
not strictly true, javadoc can be used for offline linking, but in any case those are just extra artifacts with different classifiers, just as you can publish any other jar with any classifier, the build tool won't mind
wdym offline linking?
javadoc generation stuff
but the build tool won't download those two without you telling it to
intellij (not gradle) does it automatically because it, a dev environment, does benefit from having them
you can with gradle add extra metadata to that module file to do what you're suggesting anyway
and configure your script as a consumer to read said metadata
What is the difference between NBT tags and PDC?
NBT is the raw data (technically a data format) that requires NMS
PDC is an api that allows you to store custom stuff on items, entities, and tilestates using nbt
NBT itself stores lots of things - much more than just PDC, such as player data (ex inventory) and worlds
things like lore are also in nbt
example (singleplayer) level.dat taken from wiki.vg: https://pastes.dev/a3jttHZZLX
Thanks
How i can a auto reload my placeholder? My code is:
@Override
public String onRequest(OfflinePlayer player, String params) {
if (params.equalsIgnoreCase("serveronline")) {
for (Player p : Bukkit.getOnlinePlayers()) {
if (isVanished(p)) {
int i = 0;
i += 1;
return String.valueOf(Bukkit.getServer().getOnlinePlayers().size() - i);
} else {
return String.valueOf(Bukkit.getServer().getOnlinePlayers().size());
}
}
}
return null;
}
i'm need to check if (isVanished(p)) { for example every 3 seconds
doesn't really matter as long as isVanished doesn't do stupid things
however the rest of the method looks just wrong
You need to initialize the int i variable outside the for loop.
So it should be like this:
int i = 0;
for loop…
i++
i’m on my phone 🥲
But I suggest just use stream
stream filter
cmi doesn’t have a placeholder like essentials_safe_online(
I don't think that method is quite right
Also I don't think you determine how often the placeholder refreshes from where the request is handled
It needs to be done from wherever the placeholder is actually being displayed
Hey, I want to make a command that spawns particle on the border of a chunk that you are in. However I don't know how to work with the chunk coordinates... How can I use them as a block location?
Here's my code for reference:
Chunk chunk = p.getLocation().getChunk();
if(sender instanceof Player) {
int x = chunk.getX() * 16;
int z = chunk.getZ() * 16;
Location loc = new Location(p.getWorld(), x, p.getLocation().getY(), z);
new BukkitRunnable() {
@Override
public void run() {
if(counter <= 0) {
this.cancel();
} else
for(int x = 0; x < 17; x ++) {
for(int y = 0; y < 6; y ++) {
for(int z = 0; z < 17; z++) {
loc.add(x, y, z);
p.getWorld().spawnParticle(Particle.COMPOSTER, loc, 1, 0, 0, 0, 0);
p.getWorld().spawnParticle(Particle.FIREWORKS_SPARK, loc, 1, 0, 0, 0, 0);
}
}
}
}
}.runTaskTimer(Hideandseek.getMain(), 0, 5L); ```
Okay never mind. Found my mistake. I forgot to subtract the variables x, y, z from the location after the for loop was being triggered
possible?
ive got
public void onPlayerToggleSneak(PlayerToggleSneakEvent event) {
if (event.isSneaking()) {
event.setCancelled(true);
event.getPlayer().setSneaking(false);
}
}
but no dice
i dont believe you can force the player to not sneak
You can just won't display to the player being forced
Maybe you can use a packet to cancel sneak now but you weren't able to in the past if I remember correctly.
what packet ?
also thank you two
Sneak packet
Tho the client will still be sneaking, server would think he is not iirc
ah alr thank
i thought there was a packet you could send to the client to disable sneak on clientside
how i can "update" text in chat without send it again
i saw some plugins update text when creating something to show summary what you need to set
yeah the just resend it
store everything that was sent and is being sent, don't send it to the player, and once they leave the mode just flush everything stored
i want if player set spawnpoint message updates with spawnpoint - set
so player know what need to set if he forgot
i dont understant
OP setting up dungeon so i have this to show summary of creation to OP but when he set someting then change "Nenastaveno" to "Nastaveno" but all in 1 message not resending message with changed data
add("");
add("&7-------- &cDungeon &7--------");
add(" &e> &7Name - &a" + args[1]);
add(" &e> &7Min Players - &a" + args[2]);
add(" &e> &7SpawnPoint - &cNenastaveno");
add(" &e> &7Boss - &cNenastaveno");
add(" &e> &7Enemies - &cNenastaveno");
add("&7------------------------");
np
wdym by custom inventory?
I hope thats not a
nee ArrayList<>() {
{
add(...);
...
}
}
why not?
Because that creates a subclass of arraylist
You should use java.util.Arrays.asList(element1, element2, ... or java.util.List.of(element1, element2, ...)
public List<String> compatibleVersions = new ArrayList<>(){{
add("1.13");
add("1.14");
add("1.15");
add("1.16");
add("1.17");
add("1.18");
add("1.19");
add("1.20");
add("1.21");
}}; => public List<String> getCompatibleVersions = List.of(
"1.13",
"1.14",
"1.15",
"1.16",
"1.17",
"1.18",
"1.19",
"1.20",
"1.21"
);
?
ye
and its thing we doing ("standards") or for better performance
Immutability is based
real
now take that idea and multiply it by 1 million
@icy shadow what now?
now we wait
that is your personal problem
but
have a bug report https://github.com/PlaceholderAPI/LocalTime-Expansion/issues/3
Ok but did I ask
Ever heard about List.of? 🥴
hello guys!
I try to create a hologram with a rotative item below it but i can't make it work like it should..
I mean i created an armorstand with a diamond on his head but the item rotates around armorstand's axis.
How can i make the item to rotate around it's own axis?
That comment is quite literally him learning about it.
Just woke up, only read the first part 🥴
What Hologram plugin are you using?
I try to create it myself 😄
can you share the code?
cannot really help if you created it without seeing the code 🤷🏻♂️
The hologram it'self
public Hologram (String name, Location loc) {
this.name = name;
this.loc = loc;
}
public ArmorStand createHologram() {
hologram = (ArmorStand) loc.getWorld().spawnEntity(loc, EntityType.ARMOR_STAND);
hologram.setGravity(false);
hologram.setCanPickupItems(false);
hologram.setCustomName(name);
hologram.setCustomNameVisible(true);
hologram.setVisible(false);
hologram.setPersistent(true);
hologram.setInvulnerable(true);
plugin.setMeta(hologram, "hologram.custom", true);
plugin.setMeta(hologram, "hologram.location", loc.getX() + "|" + loc.getY() + "|" + loc.getZ() + "|" + loc.getWorld());
return hologram;
}
public void removeHologram() {
hologram.remove();
}
public String getHologramName() {
return hologram.getName();
}
How i try to create the rotative item (one of my tries at least)
// Create the rotating diamond item below the hologram
Location itemLocation = hologramLocation.clone().subtract(0, 4, 0); // Adjust the offset as needed
FallingBlock fallingBlock = Bukkit.getWorld(holoLocDetails[3]).spawnFallingBlock(itemLocation, Material.DIAMOND_BLOCK.createBlockData());
fallingBlock.setGravity(false);
fallingBlock.setHurtEntities(false);
fallingBlock.setDropItem(false);
// Start the rotation task
int rotationTaskId = Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, () -> {
rotateItem(fallingBlock);
}, 0L, 1L); // 1 tick = 1/20th of a second
private void rotateItem(FallingBlock fallingBlock) {
Location location = fallingBlock.getLocation();
float yaw = location.getYaw(); // Customize the rotation speed here
if (yaw >= 360) {
yaw = 0;
}
location.setYaw(yaw);
}
skript?
I cannot really figure out what might be the problem. just have patience and Gaby or someone else will be here to help you
there you go
Skript ??
mb
Look at how HD does it ig Brosky
Iirc you can add items to holograms, idk if they rotate or not
DH does that
Though they might be rotated manually
this is what i'm trying to do 😄
I created another armorstand below the initial one and i tried to rotate it but the problem is that the item rotate around armorstand's axis instead of it's own axis
they do rotate just do the command /hd create test ICON: diamond
or put in any item name you want
Great
yw
alrighty, thanks!
think HD and DH drop an item mid air to make that effect.
did you figure it out?
hi, i hooked into placeholderapi following the latest version on the github, but i didnt changed anything but i get everytime a error
(https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Hook-into-PlaceholderAPI) Followed this one
(java.lang.NoClassDefFoundError: me/clip/placeholderapi/PlaceholderAPI) error
yup, i used decent hologram so now i have what i wanted 😄
thanks again for help!
what version is your server running on?
1.8.8
1.12.2
1.13.2
1.14.4
1.15.2
1.16.5
1.17.1
1.18.2
v2.11.1 - Latest
v2.11.1 - Latest
v2.11.1 - Latest
v2.11.1 - Latest
v2.11.1 - Latest
v2.11.1 - Latest
v2.11.1 - Latest
v2.11.1 - Latest
let me see
Plugin version also 1.19.4
api-version: 1.19
depend: [PlaceholderAPI]
Paper-Plugin.yml
did you follow all the steps correctly and exactly?
yup
public class Joinlistener implements Listener {
@EventHandler(priority = EventPriority.HIGHEST)
public void onJoin(PlayerJoinEvent event) {
String joinText = "%player_name% &ajoined the server! He/she is rank &f%vault_rank%";
/*
* We parse the placeholders using "setPlaceholders"
* This would turn %vault_rank% into the name of the Group, that the
* joining player has.
*/
joinText = PlaceholderAPI.setPlaceholders(event.getPlayer(), joinText);
event.setJoinMessage(joinText);
}
}
strange 🤔
well i dont really know why the error is being shown to you, maybe wait for Gaby or someone else to help you out
if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
getServer().getPluginManager().registerEvents(new Joinlistener(), this);
} else {
getLogger().warning("Could not find PlaceholderAPI! This plugin is required.");
Bukkit.getPluginManager().disablePlugin(this);
}
apologies
👍
Im pretty sure paper-plugin.yml has a different format than plugin.yml
its just plugin.yml but got changed littlebit
nvm
got changed few weeks ago xd
Yupp, that was the problem
😉
after ~5 minutes the placeholder doesn't use method if (isVanished(p)) {
here's my code:
@Override
public String onRequest(OfflinePlayer player, String params) {
if (params.equalsIgnoreCase("serveronline")) {
for (Player p : Bukkit.getOnlinePlayers()) {
int i = 0;
if (isVanished(p)) {
i += 1;
return String.valueOf(Bukkit.getServer().getOnlinePlayers().size() - i);
} else {
return String.valueOf(Bukkit.getServer().getOnlinePlayers().size());
}
}
}
return null;
}
Your code will return after the first player
you need to return outside the loop, after you have checked all players
like this?
for () {
if … {
return …
}
}
return …
this is what you have already @mortal scaffold
?
look at your code and what you sent, it is the same thing
public String pch(String string, Player player) {
FileConfiguration autobroadcast = Filemanager.getInstance().getAutobroadcastSettings();
DecimalFormat df = new DecimalFormat("#,###");
string = ChatColor.translateAlternateColorCodes('&', string);
string = string.replace("{username}", player.getName());
string = string.replace("{online}", df.format(Bukkit.getServer().getOnlinePlayers().size()));
return string;
}
How to replace with this {target} from a other command
Hey guys i need help with creating a placeholder, currently i am trying to create a placeholder that will return information about n position as i am trying to create a simple "leaderboard" placeholder to showcase like
%parkour_name_<position>% and %parkour_score_<position>% but on wiki i found only basic placeholder setup how would i assign these custom values if there is a wiki page i missed or any guide i would appreciate
In the meantime i created something like this i don't know yet if it is going to work but this would return bot name and score
return query.getDataForPosition(position).toString();
}
i defined the position variable at the top of the class and by default i gave it 0 as value
anyone know of a website that will present the user with a choice of the mc version to view when going to a javadoc link?
that way instead of putting https://helpch.at/docs/MC_VERSION/org/bukkit/enchantments/Enchantment.html in my docs i could just put https://helpch.at/docs/select/org/bukkit/enchantments/Enchantment.html (example) and then when they go to that link, it'll give them a list of available versions, when they choose, it'll take them to org.bukkit.enchantments.Enchantment
i think this is an example of what u want: https://github.com/srnyx/limited-lives/blob/master/src/main/java/xyz/srnyx/limitedlives/LimitedPlaceholders.java#L35-L40 (identifier = params)
could you clarify please?
well, it doesn't work with spigot api, but with your own library if that's what you want
afaik there isnt a site like that (that already ccontains all versions available of spigot, paper, etc)
well i found this which is pretty useful lmao: https://jd.andross.fr/tools/versions.html (is there a better/updated version of this?)
Tools for the Bukkit & Spigot API javadoc.
damn
Status » Fixed
I made a .yml file & and i want to add more sections to it without deleting the file & breaking other sections, how to do that?
or should i have to first get the old sections & replace them with new sections etc
https://github.com/Andross96 try to reach them out
Andross#5254
ye
something something new username system
although for friend requests the old username should keep working
website didnt even load for me, i found it on one of their github repos
yeah I've used inspect 
If anyone use configurate, is intended for Records to not be null? I try to read a Config object from config.yml and when the file is empty, it is not null 😵
Records?
java records
oh, yeah not sure, never used records with configurate
i do know that an empty file will just return an empty ConfigurationNode, not null
configurate creates an empty node then attaches any data it loads to that node and returns it
so if there isnt any data to load, it'll just return an empty node
it'll also return an empty node if the file doesnt exist
yeah it behaves like that with normal classes, idk why not with records as well
oh for records its null?
I meant to say that normal classes are null, but records are not
oh, i thought it was never supposed to return null, at least based on the source code
whats the proper use-case for EventPriority.MONITOR? cause im not modifying the event, but i am doing stuff to the player (damaging/killing). does MONITOR have the highest priority?
yes
as the name suggests it should be for things that dont modify the event
player stuff is a little vague but i'd say that counts as modifying
it's definitely not monitoring, at least
so its basically just for stuff that gets information from the event and doesnt modify anything that came from the event?
Isn’t the naming for high/low reversed
no, lowest = happens first, highest = happens last
That doesn’t make much sense
if it happens last it has the final say in what happens to the event
In my head it makes more sense for it to be reversed
Well if you're changing the players hp for ex, that's not monitoring
However if you're logging the players hp into a dB, that's monitoring
A lot of events have stuff u can change but doesn't change right away, only after all the listeners have been executed
So highest priority allows those plugins to change those values last
🥲
both of those examples are the same...
not modifying = monitoring
yea, that fits into my definition/explanation
What r u changing about the player?
well now that i know that, im not gonna use MONITOR, since i was damaging/killing the event's player
Oh wow I got it correct
Lol
It was just a random example
I can read your mind :))
i literally said it in my initial msg 😭
bruh i thought the trip was over
3 hrs left
Well now I'm going somewhere to pick someone up
And go back home
Lol
So this one's not a trip

We need my stats cmd back
It showed u ur most used emoji
But cube removed it in favor of slash commands but forgot to add it back or smth D:
L
seems fine to me
L
Srnyx
this is #development dkim u r breaking the rules and making me too
Omg
@robust crow petition for /paste to open a modal form
Haha
ask someone with access to pr
Who
Gaby is a great example
better get to work bribing him then

I'll do it for 1 robux
🤣
If I have a Block block = event.getBlock().
- If it's a blockbreakevent, would
block.getMaterial() == Material.AIR - If the block was later change to a different block, would the material change?
Why doesn't everybody have access to PR?
PR?
Because
Pretty sure it's so in order to ensure the same code styles etc
That's the most stupid reason
That is not the reason lol
Yeah
I believe people here are smarter than that
Idk if that's the reason now but
Because Barry is not open sourced
Level system?
theres only like 3 people with access 🙃
Such a shame
Indeed
Is there a way to simulate a player placing a block so all of the blockdata is correct? Stuff like what way the block is facing relative to what surface was clicked/direction the fake player was facing, and getting things like walls to be attached correctly?
Prob
Hi!, how to check if a section in a yml dont exits that the plugin will create that section again?
if (!getMessageSettings().isConfigurationSection("Motd_disabled_log")) {
// Do this
}
``` Something like this
does anyone know how i can draw a text with a custom font (.ttf file) in MCP-Reborn? is there any template?
To draw a text with a custom TrueType font (.ttf file) in MCP-Reborn, you'll need to follow these steps:
Prepare the TrueType font file: Make sure you have the .ttf file of the custom font you want to use. If you don't have one, you can find free fonts online or create your own using font creation tools.
Import the font file: Place the .ttf file in the appropriate directory of your MCP-Reborn project. Usually, fonts are stored in a "fonts" folder within the project's directory structure.
Register the font: Open the code file where you want to use the custom font. At the beginning of your code, you'll need to register the font with MCP-Reborn using the registerFont() function. Provide the path to your font file as the argument.
registerFont("fonts/your_custom_font.ttf")
Replace "fonts/your_custom_font.ttf" with the relative path to your font file from the code file you're editing.
Set the font for drawing: Before drawing the text, you need to set the custom font using the setFont() function. Pass the font name (usually the same as the filename without the extension) and the font size as arguments.
setFont("YourCustomFont", 24)
Replace "YourCustomFont" with the name of your custom font, and 24 with the desired font size.
Draw the text: Use the appropriate drawing function in MCP-Reborn to draw the text on the screen or canvas. For example, if you're using the drawString() function, you would pass the font settings and the text string as arguments.
drawString("Hello, World!", x, y)
Replace "Hello, World!" with your desired text, and x and y with the coordinates where you want to draw the text.
By following these steps, you should be able to draw text with your custom TrueType font in MCP-Reborn. Remember to adjust the specific function names and syntax based on the programming language you're using within MCP-Reborn.
of course
import java.awt.*;
import java.awt.font.FontRenderContext;
import java.awt.geom.Rectangle2D;
import java.io.File;
import java.io.IOException;
public class RenderManager {
private Graphics2D graphics;
private Font font;
public RenderManager(Graphics2D graphics) {
this.graphics = graphics;
initializeFont();
}
private void initializeFont() {
try {
Font customFont = Font.createFont(Font.TRUETYPE_FONT, new File("fonts/FONT.ttf"));
customFont = customFont.deriveFont(12f);
this.font = customFont;
} catch (FontFormatException | IOException e) {
e.printStackTrace();
}
}
public void setFont(Font font) {
this.font = font;
}
public void drawString(String text, int x, int y, int color) {
graphics.setColor(new Color(color));
graphics.setFont(font);
FontRenderContext frc = graphics.getFontRenderContext();
Rectangle2D bounds = font.getStringBounds(text, frc);
graphics.drawString(text, x, y);
}
}
i have generated some code. where can i get an instance of Graphics2D?
In order to get an instance of Graphics2D, you typically obtain it from a java.awt.image.BufferedImage or from a java.awt.Graphics object. Here are two common approaches:
Approach 1: Obtaining Graphics2D from a BufferedImage:
int width = 800; // Width of the image
int height = 600; // Height of the image
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
Graphics2D graphics = image.createGraphics();
// Now you can use the 'graphics' object to draw on the image
RenderManager renderManager = new RenderManager(graphics);
Approach 2: Obtaining Graphics2D from a Graphics object:
// Assuming you have a component such as a JPanel
Component component = new JPanel();
// Get the Graphics object from the component
Graphics graphics = component.getGraphics();
// Create a Graphics2D object from the Graphics
Graphics2D graphics2D = (Graphics2D) graphics;
// Now you can use the 'graphics2D' object to draw on the component
RenderManager renderManager = new RenderManager(graphics2D);
In both approaches, you can see that an instance of Graphics2D is obtained either from a BufferedImage or a Graphics object. You can then pass this instance of Graphics2D to your RenderManager class to initialize it and perform text rendering using the custom font.
Note: Make sure that you perform the text rendering within the appropriate painting/rendering method of your application, such as paintComponent() for Swing components or paint() for AWT components. This ensures that the rendering is done at the appropriate time during the component's lifecycle.
Who needs to work on apis or integrations with AI when you can just hire this man to copy pasta some chatgpt
💀
BarryAI is lagging behind this technology
For free
Any ideas why I am getting this while using tab completion with ACF?
https://paste.helpch.at/uzeqocoyes.rb
For context, modifying crashclaims.
as real as it gets
@river solsticeAI help out here then
The error message you provided indicates that there is a ClassNotFoundException for the class net.crashcraft.crashclaim.apache.commons.lang.Validate. This means that the class loader is unable to find the specified class.
Here are a few possible reasons for this issue:
Missing dependency: The class net.crashcraft.crashclaim.apache.commons.lang.Validate is not present in the classpath or is not included as a dependency in your project. Double-check your project's dependencies and make sure you have the necessary libraries available.
Incorrect class name or package: Ensure that the class name and package are specified correctly. It's possible that there might be a typo or a mismatch in the class name or package declaration.
Version mismatch: It's possible that the version of the library you're using is different from the one expected by the code. Check the documentation or the source code to verify the correct version of the library required.
Class relocation: If you're using a build tool or a plugin that performs class relocation or shading, it's possible that the class has been relocated or renamed. In such cases, you'll need to use the relocated or renamed class name instead.
To resolve the issue, you can try the following steps:
Check your project's dependencies and ensure that the required library containing the class net.crashcraft.crashclaim.apache.commons.lang.Validate is included.
Verify the class name and package declaration to ensure they are correct.
If you are using a specific version of the library, make sure it matches the version expected by the code.
If class relocation or shading is being used, check the documentation or the build configuration to determine the correct class name to use.
By resolving these potential issues, you should be able to fix the ClassNotFoundException and successfully use tab completion with ACF.
Well, I am pretty sure I implementating and relocating the right thing so what else could be the problem?
have you checked your jar if the class exists at the given location?
There are a few more possibilities to consider:
Build or compilation issue: Ensure that you have successfully compiled your project after including the required dependencies. Sometimes, if the build process fails or if the dependencies are not properly included during compilation, it can result in class loading issues at runtime. Make sure to clean and rebuild your project to ensure that all the necessary classes are compiled and packaged correctly.
Classpath configuration: Check the classpath configuration of your project or application. It's possible that the classpath is not set up correctly, preventing the class loader from locating the required class. Verify that the necessary dependencies are being included in the classpath and are accessible to the runtime environment.
Conflicting libraries or versions: There might be a conflict between different versions of the same library or a conflicting library with a similar class name. This can cause confusion for the class loader and result in the ClassNotFoundException. Check for any conflicting dependencies and ensure that you are using compatible versions throughout your project.
Runtime environment configuration: If you are running your code in a specific runtime environment (e.g., a server or container), there could be configuration issues related to class loading. Verify the runtime environment's configuration and make sure it is set up correctly to load the necessary classes.
Jar file corruption: It's possible that the jar file containing the required class is corrupted or incomplete. Try re-downloading or reacquiring the jar file from a reliable source and replace the existing one.
Custom class loading: If you have implemented custom class loading mechanisms in your application, there could be an issue with the class loading logic. Review your custom class loading code to ensure that it is correctly locating and loading the required classes.
so much text for literally zero useful information
I apologize if the previous response did not provide the specific solution you were looking for. Resolving class loading issues can be complex and require detailed analysis of your specific code and environment.
To further troubleshoot the issue, here are some additional steps you can take:
Double-check the dependencies: Ensure that you have correctly added the required libraries to your project. Verify the version and compatibility of the library you are using. Check if there are any additional dependencies that need to be included.
Review the package structure: Validate that the package and class name you are referencing in your code match the actual structure of the library you are using. Check for any typos or inconsistencies in the package names.
Check the class relocation configuration: If you are using class relocation or shading, review the configuration to ensure that the necessary classes are properly relocated and accessible at runtime. Verify that the relocated class name matches the one you are referencing in your code.
Examine the runtime environment: If you are running your code in a specific runtime environment or framework, investigate any relevant configuration files or settings. Look for any class loading-related configurations that could impact the availability of the required class.
Enable verbose class loading: Enable verbose class loading output, if available, in your runtime environment. This can provide additional information about which classes are being loaded and help identify any issues with class resolution.
Seek help from the library or framework community: If you are using a specific library or framework like ACF, reach out to their support channels or community forums. They may have encountered similar issues before and can provide guidance specific to their tooling.
Without access to your complete codebase and environment, it is challenging to pinpoint the exact cause of the issue. However, by carefully reviewing your code, dependencies, configurations, and seeking assistance from relevant communities, you should be able to identify and resolve the problem you are facing.
Alright it's getting a bit too spammy, let's get back to normal here
you are not useful
me need help from real human
.
hell, what's the next best thing?
relocate("org.apache.commons", "net.crashcraft.crashclaim.apache.commons") this is right, right?
how can i convert a YamlConfiguration into a Map<String, Object> that consists only of normal objects (strings, maps, lists, etc...)?
ConfigurationSection
what
me when i answer the question
anyway i dont think there's a super easy way of doing what you want
yeah i assume i'd have to do it myself
you could use ConfigurationSection#getValues(false) and just recursively loop over that
little messy though
YamlConfiguration.getConfigurationSection("") is closest to it. The rest you do yourself.
^^^
yeah thats what i was thinking
a YamlConfiguration already is a ConfigurationSection, you dont need that method
c.getConfigurationSection("") == c
just wanted to check before i did something i didnt need to
Ah thought there was getDefaultConfigurationSection or something
even if there was it'd be redundant lol
I thought there was so though it had to be used. But not currently checking so could see if it was
is it possible to "combine" 2 ConfigurationSections? more specifically, a MemorySection into ConfigurationSection
I'm starting to smell an xyproblem
alternatively skip bukkit entirely and just load the contents yourself
potentially but not necessarily
getValues(true), loop over the map and call set with each entry
mutable combination obviously
sadly
at this point, you may consider using configurate
It supports exactly what you're seeking
yeah i use configurate in my discord bots
that sounds like an xy answer
🙃
but i can deal with bukkit, just need to make some adjustments
not sure we need a whole ass extra library just to load a map
yeah its also only for 1 feature 
I was talking about the merging
im just switching my Map<String, Object> stuff to ConfigurationSection, no biggie
whatever
configurate has its uses but i dont think it's super valuable in this case
🤔
it makes sense for me lmao
Didn't simpleyaml add an option to make a map?
does anyone know how i could detect an inventory change and run the code after it happens? i need to detect whether or not a horse has a saddle after the event finishes
schedule a task that checks for a saddle 1 tick later?
yeah but i dont like using those kids of timers. theres always so many bugs and loopholes for players to take advantage of. is there any other way
i dont think there are many possible loopholes here
even with some client side script the server wont acknowledge the change until the next tick, and it'll be after the task runs
best alternative is using EventPriority.MONITOR or whatever
but i dont think theyre really equivalent
Waiting a tick isn't uncommon in parts of Minecraft.
Also the exploit would need to take place in 1/20th of a second, which is pretty unrealistic
I don’t think that’s so unrealistic, you can do that very easily with scripts / mods
but I’m fairly sure that scheduled tasks run very early on in the tick before any actual packets get processed
I imagine it's unrealistic for software designed around your software to exploit 1/20th of a second.
It's obviously not literally unrealistic
Uncommon might be the better word
Oh yeah definitely not trivial to pull off
But also it’s how a lot of mc duplication glitches work, and various other exploits - someone with a lot of experience could potentially find a flaw pretty easily
Assuming such a flaw existed
I suppose that is true.
Really a matter of weighing the potential for exploit vs how much you care/want to spend time "fixing"
I think this edges the same line that premature optimization hits
Why not use monitor priority? What event is it?
either inventoryinteract or inventoryclick, i dont remember and im not home. its to detect when a horse is given a saddle
@leaden sinew
You can check if a player clicks the slot with a saddle, or if they shift click and the saddle slot is empty
check the player's cursor
also use eventpriority either highest or monitor
you don’t need a timer if that’s your purpose, regular inv events should do
chatgpt is the most useless thing ever
i want a glob that will catch 1 but not 2 or 3
api/build/libs/AnnoyingAPI-3.0.1.jarapi/build/libs/AnnoyingAPI-3.0.1-javadoc.jarapi/build/libs/AnnoyingAPI-3.0.1-sources.jar
so i just want the normal jar, how
chatgpt keeps suggesting api/build/libs/AnnoyingAPI-*.jar like the idiot it is and its explanation is the stupidest thing ever ("2 & 3 wont be detected cause they have additional suffixes" like what????)
maybe AnnoyingAPI-*.*.*.jar ?
i'd go for AnnoyingAPI-[^-]*?\.jar
final * catches -javadoc and -sources
Ah true
nope 🙃
yeah i wish it was regex
api/build/libs/*-@(sources|javadoc).jar does the opposite btw (catches -javadoc and -sources but not normal)
i think api/build/libs/!(*-@(sources|javadoc)).jar should be working but it just dont
AnnoyingAPI-[0-9].[0-9].[0-9].jar
but what happens if i release 3.10.2 or something 💀
Welp
api/build/libs/AnnoyingAPI-*[!-a-z].jar seems to work
glob is so weird
i'll give you my paypal later
uhm heh yeah... sure... totally...
honestly i have no idea what that abomination is
uh
it'll probably break if you look at it funny
It feels like a cheap regex implementation 🤣
yeah still have no idea how this doesnt work lol: api/build/libs/AnnoyingAPI-*!(-javadoc|-sources).jar
by definition that should work
!(ab|cd|ef)matches anything that does not directly match any of the patterns in the parentheses.
ok next question >:)
im trying to use the github release's description in an action's options: https://github.com/srnyx/annoying-api/blob/main/.github/workflows/publish.yml#L41
but it just dont work: https://modrinth.com/plugin/annoying-api/version/3.0.2
i assumed it'd work based on this: https://github.com/srnyx/annoying-api/blob/main/.github/workflows/build.yml#L22
am i just using it wrong or smth
My guess is you need to add it in between ${{ }}
ok trying that, if that doesnt work, ill try environment variables
ok it worked but i definitely used the wrong variable
https://api.github.com/repos/srnyx/annoying-api/releases/109844151
ill try https://github.com/srnyx/annoying-api/releases/tag/${{ github.event.release.tag.name }}
i was looking at this: https://docs.github.com/en/graphql/reference/objects#release
These are the values of the release object
o this is the same
this one returned blank :/
aka just https://github.com/srnyx/annoying-api/releases/tag/
which one do u think i should be using?
o there is github.event.release.tagName
Release object: https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#get-a-release
well i dont need to make any requests for a release that is already accessible that'd be goofy 😵💫
release.html_url gives you that
oh
No, thats where the event page redirects you to see the structure of the release object
i see
heyyy that worked ty!!
Great
its justt me or PlayerInteractEvent executes only once 4 ticks?
and not every tick?
If holding interact yes.
Hey everyone, is there a way to remove enchantment glint whilst maintaining the enchantment effects and lore?
Not without a resource pack.
I am using a resourcepack
how can I do it with the resourcepack
not by removing the texture completly, I want it to glow normally, just not on some items
I'm not sure you can do it any other way
yeah
u can
by writing custom damage system according to itemlore
actually completely sperate system from mc
includng armor
and then use glow when ever u want
think out of box
yeah i was debugging itt and noticed that it work like shit
ill probably write a custom event that fires on packet player sent
Its the same on packet
Look how crackshot checks for holding interact
Not sure then lol
now i did same
but shit didnt work
so i debug and it works only every 4 ticks
crackshot code is so poor and ew
Try other plugins then?
nah not gonnna decompile others
not into decompiling
from some reason it works
maybe because it upgrades the itetmstack in player hand
i do not upgrade the itemstack
Try it
what does <T> mean again?
a type argument
^^^
Generic
oki thx
Its meaning depends on its use case
bruh
Uhm another question, I suppose I am unable to "regenerate" a record from a method inside itself lol
What do you mean?
return new TheRecord(this.x, this.y, newZ)
ah ignore, already know what to do
btw in a library, for error handling, is System.err good?
stdout / stderr directly are generally not a good idea
actual loggers >
particularly in libraries
any recomendations?
slf4j & logback is the de-facto standard afaik
or even the java logging library if you dont want any more deps
define "allow"
theres no special syntax for them
but you can overload constructors soooo
whats overloading a constructor?
🤔
not familiar with these terms



