#development
1 messages · Page 86 of 1
ah ok
good to know
text, item, block displays are all special cause they can have a matrix transformation
also did you know that you can make a camera to be upside down?
xD
I've done it by mistaken math
one thing different between text and item displays is that text displays are only visible from one side
without shaders?
yea cause normals
I was working on a particle SFX library that uses stuff like this. all of these are billboards but that's easy to change ofc
I wonder how many display entities a minestom server can handle 🤔
your mac lagging is iconic
i have a new one now!
aka not moving?
in other words, spawned and stay untouched?
or do you mean smt else by static
?
yea
okay what the actual frick
like in that case they're technically just like
100% free
cause you just send the spawn packet
and that's it
another guy that has done UIs like this before said he is using item displays
and that his texture is 1920x1920
????
id guess multiple stuff stitched
or optifine and such
a single texture from my understanding
well ask them :>
I did speak about optifine and he answered knowing about that
I just did
gonna be painful for him if he says he uses optifine lmao
how am I gonna tell him
💀
maybe I am not meant to tell him, maybe it's a canon event
uhm....
@torn heart he said without optifine, etc....
it just needs to be a square...
unable to test this atm tbh
but once I get time I will test and give an update
will try on monday, have to study for my exam on monday morning
xD
ah alr
also @worn jasper its potentially better to use item displays as it is easier to make item texture animations
ofc you can make animations using text displays as well by updating the text there
however that would be bigger packet usage
as well as more ticking basically
yeah I know, not sure I would be using animations but yeah, I will be switching to item displays either way, doesn't require much change in my library
only a few lines
change to item and adapt the coord translation system to go from center instead of bottom center
that's about it
well I meant like texture animations
if you are planning doing this as public lib
then people may find this as benefit
items overall can be more controlled
Unsure if I will or not, I live OSS but I have also been loving the adventure of doing this
And I kinda hate spoon feeding people
Bit controversial lol
Idk yet
Will see after
This library is for my server initially
Yeah ik, might use it in some places
funnily enough, the whole library's code is still in a test project for when I started messing with minestom lol
I need to move it to another project and put this in a subproject/module xD
things I have to do after my exam
There is no time to wait! Ask your question @bleak tide!
negative spaces
for ex.
Wrong channel, for deluxe menus go to #general-plugins
Hello, I want to write what I want in paste.helpch.at through code, just like a file, write text content through write, how can I do it?
what
You need to send a post request to https://paste.helpch.at/documents with the content of the paste in the body of the request
The response will be a json with a key which is the result url, for example makifusipa, the final url would be https://paste.helpch.at/makifusipa
For more info: https://www.toptal.com/developers/hastebin/documentation
Though you should not spam the service with 1000 pastes per second 🙂
Unless you host your own :)
Do I need to set up an account? When I run it, code: 403 appears.
Yes, as you said, you should get code: 200. Maybe I wrote it wrong.
Yeah I was talking about ours
I know
Speaking of this, do you know a paste service that supports multiple sections?
Smth like this:
Section
const content = "hello";
Section 2
{"content": "section 2"}```
Each section will have its own highlight
Or well, one service that supports markdown could work too 
Not sure, maybe gist supports markdown? That's the only one I can think of
Yeah but I wanted this for a public plugin, and for gist you most likely need an api key
Why do you need that btw?
I have a /debug command and it consists of multiple parts, and I wanted to format it better 
https://rentry.co/ this seems nice
@pulsar ferry I saw that he said at the beginning that you need to create an API token first. Is that because of this?
Maybe for toptal instance
You don't need an api key for helpchat's, you can set it up to have api key when hosting hastebin, but we don't
I'm using no auth
So, I need to find out why it is 403. When I output the response message, it tells me that it is forbidden, but I don’t know why the response is forbidden.
Might wanna show your code
val url = (URL("https://paste.helpch.at/documents").openConnection() as HttpURLConnection).apply { requestMethod = "POST" connectTimeout = 5000 readTimeout = 5000 setRequestProperty("Charset", "UTF-8") doOutput = true doInput = true outputStream.also { it.write("example".toByteArray()) } } println(url.responseMessage)
I use kotlin, I don't know if you can understand it
No, it just records the error information for developers
omg HTTPie my beloved
On your case you probably need to set content length as well
You might wanna use an http client instead, it'll make your life easier
Love HTTPie
Is this a higher version of jdk, or is it using tool content? I am using jdk8
It's using ktor's http client https://ktor.io/docs/client-create-new-application.html
Thank you for your answers. Maybe the problem lies in the idea, because when I copy the code of @dense drift , it will also trigger 403. But when I use curl of cmd, it returns code: 200
Yes, there is a problem with idea. When I run it on it, the code is 403, but after moving it to minecraft, it can be normal code: 200
is the server running on the same machine as your IDE?
Yes, and idea sets up Http Proxy
I need some help, i want to create a command (ex: /ub giveCustomItem PLAYER), but i'd like to be somehow compatible with placeholders format, so I can use that command with other plugin with no issue, how can I make it
Do you want to fill in the variable in PLAYER so that it can be replaced with the name of the executing player when executing the command?
Then you need to use PlaceholderAPI
compulsory?
They are all the same, and both require the use of the Placeholder API, or the use of the replace method, text.replace("{name}", player.name). This is a more traditional method, but it is only allowed in the location you set.
usually the plugin executing the command is the one that parses placeholders
You can choose to use it or not, but many plugins now use PlaceholderAPI, so you can't choose not to use it unless you write all the plugins yourself.
Yes, you are right. It depends on the developer's choice. I personally prefer PlaceholderAPI, which is also very easy to use. Just use PlaceholderAPI.setPlaceholders(player,text)
not what I said...
After importing PlaceholderAPI, use the method PlaceholderAPI.setPlaceholders(player,text) to parse the variable %player_name% to get the player name
plugins calling the commands of your plugins are usually the ones that should parse those placeholders whether it be with their own system or PAPI
your plugin should simply only execute things on demand
you should not have to parse input yourself too
Okay
Yes, you are absolutely right. It depends on the developer. PAPI can be used more widely, while replacement string can only be used by your own plug-in. In terms of functionality, I prefer PAPI.
I am not speaking about string replacement or papi, tf?
The PAPI Wiki has simple instructions on how to register and resolve variables, and there are also many variable extensions available.
Your plugin, should not be the one setting placeholders with PAPI on input, that's the other plugin calling that command
no one is speaking about using papi or their own system
makes no sense to parse every single input of that command even when it's not needed
But his requirement is that when the plugin executes the command, PLAYER will become the name of the triggering player. I told him two solutions. You said that there is nothing wrong with the parsing placeholder of the execution command. I was just giving a solution, and it does not conflict with what you said.
I don't quite understand what you mean. Is it possible to execute commands without parsing placeholders?
you don't need arguments to do that lol
im sure if any server uses plugin it surely does implement PAPI
I think this is simply a bad implementation for an XY problem
lol
what even is the xy?
?
it looks like it yes
Well, then let me think better
on my server, I want to allow players to buy bandages through a menu (Deluxe Menu) by clicking on an item. These bandages are "special" because they store metadata. I tried creating a kit bandage with Essentials, but the bandage it gives doesn’t work. So, I want to make sure that when someone buys a bandage, they get a working one from my plugin.
well then just create a command to give it in your plugin, and execute it in DM, DM already provides placeholders that will be parsed before executing the command
It doesn't require create a variable player?
Such as /up giveitem player? Or is it enough with /ub giveitem
depends, if you execute that command in the console then it does require a placeholder, but DM has their own placeholders that will be parsed before the command is executed, I would check their wiki or ask for help in #general-plugins
Hey I keep having a NullPointerException upon doing /sounds off, and I can't for the life of me get behind the issue.. Can someone review my code?
`} else if (command.getName().equalsIgnoreCase("sounds")) {
if (!sender.hasPermission("scc.sounds")) {
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', config.getString("messages.noPermission")));
return true;
}
if (args.length != 1 || (!args[0].equalsIgnoreCase("on") && !args[0].equalsIgnoreCase("off"))) {
player.sendMessage(ChatColor.translateAlternateColorCodes('&', config.getString("messages.invalidUsage").replace("%usage%", command.getUsage())));
return true;
}
boolean enableSounds = args[0].equalsIgnoreCase("on");
logger.info("Setting sound for player " + player.getName() + " to " + enableSounds);
soundSettings.put(player.getUniqueId(), enableSounds);
player.sendMessage(ChatColor.translateAlternateColorCodes('&', config.getString("messages.soundsToggled").replace("%status%", enableSounds ?"enabled" : "disabled")));
logger.info("Sound settings for player " + player.getName() + ": " + soundSettings.get(player.getUniqueId()));
logger.info("Sound settings map: " + soundSettings.toString());
return true;`
Any chance you've got the error as well? The stacktrace usually points you to the line where the issue is
Use https://paste.helpch.at/ for errors, logs and configs. So we don't spam the discord.
Which line is MessageCommandExecutor.java:142
I'll send you the whole class if you dont mind haha
Sure
My best guess would be that config.getString("messages.soundsToggled") returns null
Try printing the value on line 141 (before sending the message to the player)
Ah yes, thanks man. i totally overlooked that one, my bad!
which minecraft versions are compatible with Spigot Api 1.13 ?
1.13
🤯
i think they ment what server versions work just fine if ur building against spigot 1.13
i dont think anything breaking has been deprecated since 1.13
like some plugins work just fine even when built against 1.8 but you might have to check on a couple of the majorly used versions
paper's brigadier api or using a command framework that hooks up to brigadier, like cloud
Ah okay, i've seen someone saying 1.13 api is compatible with 1.20++ versions
Well not 100%, but most things will still work as before
Hi guys, maybe I'm asking the simplest question, but how do I connect the dependency for PlaceholderApi?
How much when according to the instructions for creating an extension, I add the following code
<dependencies>
<dependency>
<groupId>me.clip</groupId>
<artifactId>PlaceholderAPI</artifactId>
<version>2.11.6</version> <!-- Check for the latest version -->
<scope>provided</scope>
</dependency>
</dependencies>
it says that It does not find such a dependency from the central Maven database!
tell me how I need to connect it correctly, thanks in advance.
anyone familiar with making a secondary configuration file that may be able to assist here ive made a new config file to hold location data for my warp plugin but im struggling to get it to save changes and sets to the file
@swift brook use jitpack, the main repo is currently down
Hello, when trying to connect API for Guilds plugin (guilds 3.5.7.1-SNAPSHOT) I get an error in Maven: [WARNING] The POM for co.aikar:acf-paper:jar :0.5.1-SNAPSHOT is missing, no dependency information available.
Who has encountered this and how can it be solved?
Excuse me, where is it down below?
That is a prime example of a language barrier
Hi, who i can import in gradle NMS ?
use paperclip
Hey, are there any devs here?
We've created a server that will have simple, but addicting abilities, but we don't have anyone to code them into existence.
thanks
Hey, I’m running into an issue with my code. I’ve set up a world checker where you can blacklist worlds in the config.yml so you don’t bleed in certain worlds, but for some reason, it’s not working at all. Any ideas?
@EventHandler
public void onPlayerDamage(EntityDamageEvent e) {
if (!(e.getEntity() instanceof Player)) return;
Player player = (Player) e.getEntity();
String worldName = player.getLocation().getWorld().getName();
List<String> blacklistedWorlds = plugin.getConfig().getStringList("disable-world");
if (blacklistedWorlds.stream().anyMatch(world -> world.equalsIgnoreCase(worldName))) {
return;
}
double health = player.getHealth();
double maxHealth = player.getAttribute(org.bukkit.attribute.Attribute.GENERIC_MAX_HEALTH).getValue();
double healthPercentage = (health / maxHealth) * 100;
if (plugin.getConfig().getBoolean("bleeding")) {
double bleedChance = calculateBleedChance(healthPercentage);
if (random.nextDouble() <= bleedChance) {
startBleeding(player, false);
}
if (plugin.getConfig().getBoolean("heavy-bleeding") && random.nextDouble() <= bleedChance / 2) {
startBleeding(player, true);
}
}
}
This is the part where is called that bleeding action
why not do blacklistedWorlds.contains(worldName))
okay then the only reason would be
- disabled-world is empty
- the world is wrong in the config
- "bleeding" in the config is false or doesnt exist
- event isnt registered
add debugging (just println the config output)
Maybe i got with the key
One is in plural and in code is in singular
I feel so dumb
looking for a dev to make me a elemental Plugin. Need proof you wont scam. I have everything ready and examples I can send you code of it i js need it organized bc my dev screwed up
quit spamming
can i make PlaceholderApi.setPlaceholders(Entity entity, placeholder)?
No @lyric gyro
Not directly. But you can make placeholders that don't require a player and then get the entity from the input (e.g. by id or whatever)
What are you trying to do?
Get %worldguard_region_name%
Just use the WG api then
ok
wg api is so confusing lol
you cant
just water
mountains are a feature
water too lol but u can delete it
it's like a block
mountains are not
what about if we manuplate chunk generation
regions can overlap and players (and entities) can be in multiple regions at once 
Erm, players are entities 🤓☝️
Hi there i have some problems whit my code i dont now how to fix it i am not realy known whit coding i hope you can help
here is the main Class
https://paste.helpch.at/ejinuhoxen.java
The errors are on lines 3 - 5 - 27 - 67 - 70 - 78 - 92 - 93
https://paste.helpch.at/elakopabit.java
The errors are on lines 3 - 55 - 110 -147
pom file
https://paste.helpch.at/apiramevaq.xml
Could u guys help pleasee!
what are the errors?
You have to put // for comments before typing them
Hi, I want to ask how can I set permissions in the DeluxeMenu plugin to open only a specific menu?
hablas español?
ksksksk
this is development channel
Hey there
Hope you are doing well
I am a senior full stack developer who has full experience in web development | design and AI development
So if you have some projects, please let me know
thank you
Hey does anyone have any advice for getting started in selling premade plugins?
Those are payable projects?
Sorry they’re only for TYD
We have a special relationship
See. never mind. I am fine
no problem
are there any links that would be easy to use block textures that are above 16 x 16 pixels?
private String getBlockImageUrl(Material blockType) {
return "<link>{material}.png".replace("{material}", blockType.name().toLowerCase());
}
What?
Bit confused on what you are doing
wdym Minecraft image
instead of the item looking small in the discord image
I cant send images anywhere here so its hard to explain it
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.
:I
send to me
I'll send it here
or use imgur
can you not just upscale the image and pass the data
how would you do that
idk do you have access to the discord bot
yes
like the code of it
can't you just upload an image with the actual image data
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.
???
- get 16x16 img
- upscale with algo
- pass in upscaled image data
algo?
algorithm
oh
I dont know how to do that
TextChannel channel = DiscordSRV.getPlugin().getDestinationTextChannelForGameChannelName("guard.blockPlace");
if (channel != null) {
// Create an embed with details
EmbedBuilder builder = new EmbedBuilder();
builder.setColor(Color.GREEN);
builder.setTitle("Block Placed");
builder.addField("Player", player.getName(), false);
builder.addField("Material", report.material().name(), false);
String locationString = report.location().getX() + ", " + report.location().getY() + ", " + report.location().getZ() + ", " + report.location().getWorld().getName();
builder.addField("Location", locationString, false);
builder.addField("Date", report.date().toString(), false);
// Dynamically set the block image URL based on the block type
Material blockType = event.getBlock().getType();
String blockImageUrl = getBlockImageUrl(blockType);
if (blockImageUrl != null) {
builder.setImage(blockImageUrl);
builder.setThumbnail(blockImageUrl);
} else {
builder.setDescription("No image available for this block.");
}
// Build the embed and send it to Discord
MessageEmbed embed = builder.build();
channel.sendMessageEmbeds(embed).queue();
}
like just the link?
or like modify all 1k+ items in minecraft for a small project...
No
upscaling an image then sending the bytes shouldn't be hard. plenty of bots do this. try using that approach and googling how to accomplish it
well I mean the alternative is trying to find a website which reliably hosts images like that..
do u know any bots that automatically upscale an image?
just use BufferedImage or smt
then get the scaled instance
with the new size and algo to be used
and voila
the new size and algo to be used
it ain't that hard 🙏
Any MC java devs able to assist me real quick? Needing some help on figuring out how to impimplement liment something and my brain is fried after trying multiple things... Need to make it so a plugin can detect if a player is flying on an elytra and if they press space bar something happens... I just cannot detect the spacebar! I've tried protocollib, invisable entities, everything haha
just spent way too long figuring out that kotlin coroutine's coroutineScope {} waits for launch {} inside to finish...
I looked online and it seems like I have to use GlobalScope to avoid this?
However, the docs say that GlobalScope should be for things that run throughout the entire application's lifetime, but my usecase is to launch a coroutine that sends an IO (via usb) message, then launch another coroutine that delays 11 seconds to detect if there's been a response
this definitely doesn't seem like code that runs throughout the entire app's lifetime lol - is there any workaround?
If I don't use GlobalScope, and if I don't want all of my code to be in 1 function, then my code tries to wait for those 11 seconds because of the first sentence in this message
it seems like you are using coroutines wrong honestly
a scope contains any logic that is tied to that.. scope
its effectively lifetime
and instead of delay etc
you should be using timeout
for timeout logic
probably... I just have to figure out how to do it correctly tho
although the actual sending of the message also blocks the thread so I had to put that under globalscope (at least for now) as well
to send multiple messages at once (might sound weird but)
you should have a scope
for whatever service / module that part is in
keep a reference
and use that scope
you can also make sub scopes for tasks
how do I call launch in another function tho in the same scope?
if you want it to cancel other coroutines in that task
use suspending functions?
they carry on the scope they are used in
and to return data from usb
wdym
if I do like ```kt
suspend fun a() {
launch {}
}
you can directly return with coroutines
and it will wait etc automatically for you
depending on where you call the awaits
or rather suspend that code until it completes
suspend fun concurrentSum(): Int = coroutineScope {
val one = async { doSomethingUsefulOne() }
val two = async { doSomethingUsefulTwo() }
one.await() + two.await()
}
for example
here
honestly read the whole coroutine part of it and you should get how it works
if you worked with any other type of structed concurrency
usage of global scope is not recommended
since then you are basically saying hey this tasks scope is the entire runtime of the application
which rarely is true
yeah I know that's why I asked here 🙃
atm looking into the async to see if it fits my usecase
you basically want to create sub-scopes
per module
then also sub-scope that per task
scopes only control the lifetime so they are a tool for cases like
lets say you got a task a
and you do request b and c in that task
and lets also say request b fails and c succeeds
if you scope that out and launch a coroutine per request
the failing one will also cancel the other one
since they are tied to each other and save you cycles
will also fail the whole scope as if its a big try catch statement
so in my case, I have two tasks
- send the request
- wait x seconds for a response (don't think I can use a timeout here since it's not just a "wait until this code is done")
if one of them cancels or errors, then I suppose that they should both cancel
does this mean that I should make a new coroutine scope on every request?
to kinda group those 2 tasks together
Parent and child
creating new scopes is fine and intended
just have a function that starts with
suspend fun a() = coroutineScope {
etc
oh okay
this coroutineScope still confuses me a bit but I gotta do a bunch of other stuff rn so I might ask some followup questions another day
thanks a lot for the help/info so far tho :D
In Kotlin and other languages, coroutines are often seen as just async/await. But the essence of coroutines is much simpler and easier to understand. In this video, I'll boil down coroutines to their most fundamental properties.
Recommend watching this
it's midnight rn so my brain might not be at 100% but I tried starting with this
here's a simplified version of my old code just to give more context```kt
// send data
val job = GlobalScope.launch {
delay(11.seconds)
println("no response!")
}
jobs[id] = job
GlobalScope.launch {
port.writeBytes(...)
}
// code that listens for data - completely separate function
while (isConnected()) {
val message = port.get()
jobs[message.id].cancel()
}```so I tried to make the jobs (either one) into async, but IntelliJ doesn't like that there's no return value (println and writeBytes don't have (usable) return values...) so I'm pretty sure I'm doing something wrong...
(I was thinking of maybe putting it into async and then just cancelling the scope when I get a response or timeout)
|| also lmk if you don't want pings ||
hmm
first of all - did not know that was possible... this is interesting 🤔 haven't really seen this aspect of coroutines
but I feel like there's so much more to the essence of coroutines so I'm a bit confused on this video - I might have to look at some stuff some more
i feel like i'm doing something wrong here, but are you only able to use 3 placeholders in the onPlaceholderRequest method? here's my code:
@Override
public String onPlaceholderRequest(Player player, String identifier) {
if (identifier.startsWith("formatted_date_world_")) {
String worldName = identifier.substring("formatted_date_world_".length());
World world = Bukkit.getServer().getWorld(worldName);
if (world != null) {
return plugin.getFormattedDate(world);
}
} else if (identifier.startsWith("formatted_time_world")) {
String worldName = identifier.substring("formatted_date_world_".length());
World world = Bukkit.getServer().getWorld(worldName);
if (world != null) {
return plugin.getFormattedTime(world);
}
} else if (identifier.equals("temperature")) {
int temperature = plugin.api.getTemperature(player);
return String.valueOf(temperature);
} else if (identifier.startsWith("localized_time_")) {
String format = identifier.substring("localized_time_".length());
if (format.isEmpty()) return "Invalid date format";
try {
World world = player.getWorld();
LocalDate date = plugin.getWorldDate(world);
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(format);
return date.format(formatter);
} catch (IllegalArgumentException | UnsupportedTemporalTypeException e) {
return "Invalid date format pattern";
}
}
return null;
}
my game parses the first three properly, but the fourth one doesn't work at all
i know it's not the individual placeholders because i tested the same thing with just the last two in a separate class and it worked fine. turns out i can't have multiple identifiers
yes
Actually I see
also, turns out my issue was i wasn't parsing them properly in-game, i did the wrong placeholder name
seems like they all work perfectly fine now, sometimes things just magically fix themselves lol
thank you for the quick response
Wdym "this aspect of coroutines" that is what coroutines are
Can you give me a tldr of what you're trying to do? I might be able to help
Okay I'm on pc now and I read a little bit more
First of all don't use global scope, make your own instead
Second the difference between launch and async is if you want a value or not, launch creates a job you don't care when it ends, async creates a job you do care when it ends because you need the value (that's why you need to await())
Third why do you need to do two jobs for that? Remember that coroutines are sequential so you can just do:
scope.launch {
// send data
delay(11.seconds)
// receive data
}
However why is it so specific? Like, exactly 11 seconds after?
the big idea is to control a drawing machine
However why is it so specific? Like, exactly 11 seconds after?
It takes ~10 seconds to move from one corner to the other, so that's basically the smallest timeout that won't trigger falsely (it's quite slow with the default firmware)
Oh also I probably should've said this earlier but sending the data also appears to wait until the drawing machine finishes executing that command - according to the docs of the library I'm using: "this call will block until bytesToWrite bytes of data have been successfully written to the serial port." 🤷
However, idk how it works so I just kept the extra response listener as a "backup"
This means that sending the data has to run separately/concurrently from receiving the response to do the timeout if needed (although might be redundant?)
As for why I can't do (or at least why I think I can't? do): ```kt
scope.launch {
// send data
delay(11.seconds)
// receive data
}
Also, in order for the drawing machine to run smoothly, it needs another command in its queue, so that means that the code would go like `send (id: 1) -> send (id: 2) -> wait for response -> got response (id: 1) -> send (id: 3) -> wait for response` etc - so I can't just listen for the response and assume that it'll be the same id (in this ex, it's 1 instead of 2)
and the actual code in the timeout removes the id from `jobs` in the example above (the code in the send part + receive part does this too)
sorry if this sounds confusing - I'll clear up any questions
but how should/would I do this... the coroutine way?
since this wouldn't really be difficult to do with java's executorservice, but since I'm already using kotlin, I'd like to learn how to do it properly :))
Uh still don't fully understand but I guess you can have a loop to listen to responses and handle them according to the id
If you think it'd be easier then write it with executor service and then migrate it to coroutines, it's not that much different
Yeah messaging system makes a lot more sense from the description
is it possible to modify default server logger to include millis/or change format in general?
or will I have to patch the server jar?
Edit the logger config inside the jar 
I don't believe it's there 🫣
can't seem to find anything related to logging
or in fact any resources
I read somewhere it's possible to provide logging configuration via params? ex. -Dlog4j.configurationFile=log4j2.xml?
yeah I can see it in the source
just.. not in the jar itself
I'm using a custom jar (paperclip) if that changes anything
Here's how you can configure log4j: https://logging.apache.org/log4j/2.x/manual/configuration.html
I'm guessing that Spigot (or vanilla Minecraft) specify their own log4j config. You'll need to override it. It looks like if you set the "log4j.configurationFile" property then you can override it since it's the first place that log4j will look.
that might work, ye
Make sure you're looking in the patched jar
Not the paperclip jar
11 seconds isn't any more or less specific than say 10 seconds or 33 minutes
and where would that be?
I think they changed the locations throughout the versions so I'm not sure
I think in the versions folder?
my alarm clock always has to be in 10's, otherwise I won't sleep well
and my volume also has to be in increments of 5
ah, right, yeah lol
alright I managed to set it via -Dlog4j2.configurationFile prop
no more finness
Is it normal for a middle-click, during the InventoryClickEvent in survival mode to return an UNKNOWN click type?
In creative, middle clicking an item doesn't even trigger the inventory click event
makes sense since in creative packets arent always sent when you do an action
Turns out it's a paper bug with the survival middle click
I have a Runnable and I'm using bukkit scheduler to schedule it.
The function is supposed to run only when enabled is true in config. If the user sets it to false and reloads the plugin, how can I stop the runnable?
Save it and call cancel.
You can also cancel all tasks created by the plugin since you're reloading it.
then after reloading, start the enabled tasks?
hmm also i was using scheduleSyncRepeatingTask as in the wiki, do I have to switch to runTaskTimer?
this sounds pretty vague so i'm gonna explain a bit - i'm making an announcement system where every x seconds the plugin makes a new announcement, and I'm using runnables for that
Yeap.
Either is fine. I think the schedule is depracated in newer versions because the name of the method.
scheduleSyncRepeatingTask is not deprecated though
Then I might have them swapped. I know they deprecated one of the method types from the scheduler because of its naming.
might be schedulers using BukkitRunnables?
Maybe
how can I get a Command? I want to use it for CommandMap.register
you just create one
im implementing a custom command system, so the command name can be anything
Command needs a specific name, I tried to add all the custom command names as aliases but intellij keeps saying the last two arguments (description and aliases) are redundant, is it safe to ignore?
okay nvm i didnt provide usageMessage
hey im having issues where my PAPI command args are getting clipped off
just to elaborate on that, I just tried adding a 1 at the end and it set the args length to 3 & parsed a 1 but not the placeholder before the 1
it looks like something is stripping out placeholders?..
uhhh are you registering the /papi command itself?
forked from commit 272e2e7904da739ddca6554160a683a88c5efcc7 (latest on master)
running paper latest 1.21.1
I have absolutely no idea why it is clipping the placeholder arg because I dont see any processing that would do that & its just a bukkit arg, there shouldnt be anything processing papi before the papi command
then this issue should basically be completely unrelated to placeholderapi and more on general spigot, right? (nothing wrong with asking it here - but just wanted to clarify that)
I guess try with only that plugin on the server, debugs, etc
there's gotta be some issue in the code that we can't see, since your screenshots alone look fine
the only reason why im here and not in paper is because it only happens with papi, no other plugin has commands clipped
will try on an empty dev server tho
alright, found the issue, the guy im working for added a plugin that removed papi placeholders from various places including commands... fucking kms ive been debugging for 6 hours
🙃
😄
How can I change the message in an AsyncChatEvent?
should I use event.message()? i'm just trying to change the message content, so would that function suffice?
AsyncChatEvent#message()
Ten you should probably serialize it to plain text.
https://docs.advntr.dev/serializer/index.html
// Creates a text component
final TextComponent textComponent = Component.text()
.content("Hello ")
.color(NamedTextColor.GOLD)
.append(Component.text("world", NamedTextColor.AQUA, TextDecoration.BOLD))
.append(Component.text("!", NamedTextColor.RED))
.build();
// Converts textComponent to a plain string - "Hello world!"
final String plain = PlainTextComponentSerializer.plainText().serialize(textComponent);
there is also TextReplacementConfig
Am a bit confused trying to get a mob to walk to a spesific location and it's so super random. I know mobs can be disturbed by other game mechanics so I start a task and try to redo this part again inside the timer but somehow the mob just seems confused and doesn't move.
MoveControl moveControl = mob.getMoveControl();
moveControl.setWantedPosition(destination.getBlockX(), destination.getBlockY(), destination.getBlockZ(), moveControl.getSpeedModifier());
moveControl.tick();
mob.getNavigation().moveTo(moveControl.getWantedX(), moveControl.getWantedY(), moveControl.getWantedZ(), 1);
mob.getNavigation().tick();```
am just trying to move it from a > b and track it when it arrives to b really.
hi yall! Does anyone know how I can implement custom crops to my plugin? Like anyone got idea what exactly to use in order to achive custom crops?
I have no idea how to add custom crops/plants, I want to when I plant for example modified seed of "seeds" after some time, it would grow into the grass.
then when harvested it would give me the seeds for the crops and the actuall plant item.
Something like this: https://youtu.be/ChXgX57izdE
I am not looking for code, I am just trying to get help how to implement that (what listeners or at what functions to look at)
i am using nbt tags to identify the items
Give player a custom seed by setting some data on it (nbt or just use pdc)
When placed (planted), listen to the event, then set some data on the block placed (nbt/pdc)
When its ready to harvest, check if its a custom plant (if it has the data set), if yes, cancel the event, then run the logic you want
simple as that
can I overdrive the minecraft plant checker?
what is plant checker?
like I want to use seed of the wheat
but when ready to harvest, I want it to turn to the grass instead of wheat
listen to the grow event
ohhhh
declaration: package: org.bukkit.event.block, class: BlockGrowEvent
you are right, but would it still contain the nbt thing when planted?
if its the last stage, then set another block
like if I plant the seed, but then how I can pass the data on the seed that I planted
you mean if the seed item data passes onto the block? if so, then no
oh? Is there any way how to achive that
I think slime fun had some crops
like oranges or strawberies
you could try player interact event, not sure, since its not a block place event
and if the planted seed turns into the wheat would it still contain the nbt? So I can check if I can turn it into the grass
but theres no distinct event for planting crops
alright, so I need find some way how to pass the nbt onto the placed seed?
wait does it works with paper too? I saw the paper api is slimmar to the spigot api
well you just need to get the "crop block" itself, if it was placed via the seed then you can apply additional data to the block
paper is built on top of spigot
alright, no clue how to do that, but I can found some way
alright
im not on pc atm so I cant tell
glhf
i heard blocks dosent have nbt tags
Im working with attributes on the player, and im trying to just set them to a said number, and then reset them, right now im using setBaseValue, and to reset it i just set it to getDefaultValue() of the attribute, but ive ran into an issue that for example generic movement speed is 0.7 by default for some reason while for the players actual default is 0.1, is there any easy way to reset to the players default
i found one way, I managet to store the block data in chuck
so bassicaly I can store the block x,y,z in the chuck, and check if the block is on that cords
this include word
so no one can abuse it
maybe the block data would be better
I am wondering when the crop would grow then it would change the block with the block data
so the data would be lost and I cannot check if that was the custom crop
I would recommend using the library
i found another way, btw if Iget reference for plant that is two block height, would the "block.getY()" be the first (base) or the second (higer)
im not sure
i used for storing the chuck
for example:
PersistentDataContainer container = block.getChunk().getPersistentDataContainer();
String locationKey = block.getWorld().getName() + "_" + block.getX() + "_" + block.getY() + "_" + block.getZ();
NamespacedKey key = new NamespacedKey(plugin, locationKey);
container.set(new NamespacedKey(plugin, locationKey), PersistentDataType.STRING, "blabla");
But I need to find a way how to remove the tag in every possible scenario so players wont exploit it
Is deluxetags removed from the maven repository repo.extendedclip.com?
Does anyone have or know an API/framework for textured GUI? I need the spacing between fonts (the same as css paddings xd)
Hi, I was connecting bungeecord with my servers. I started with Lobby and Bungeecord, connected them and it worked fine, I used services like Bungeeguard, authme and tcp. I did same configs with another server let's say survival but it says Did you forget to enable ip forward / bungeecord? Even though they're already enabled.
i am trying to add ability to plant a fern, everything is going alright but when the plant would grow the fern breaks. I tried to delay it but even after 1 sec delay it stills break.
I am using BlockGrowEvent
Block below = block.getRelative(0, -1, 0);
below.setType(Material.GRASS_BLOCK);
BukkitRunnable task = new BukkitRunnable() {
@Override
public void run() {
block.setType(Material.LARGE_FERN);
Block above = block.getRelative(0, 1, 0);
above.setType(Material.LARGE_FERN);
BlockData upperFernData = above.getBlockData();
if (upperFernData instanceof Bisected) {
((Bisected) upperFernData).setHalf(Bisected.Half.TOP); // Set to upper half
above.setBlockData(upperFernData);
}
}
};
task.runTaskLater(plugin, 20);
https://www.flexclip.com/share/7016887397383460d3dc834221e41e2f23eb338.html
When there wasnt the delay. It only worked with bonemeal.
but naturaly it broked.
Does anyone knows what I am doing wrong.
I think there is something wrong with the fern placement
but I am not sure
How can I create an account on PAPI eCloud?
I created a PAPI Expansion that allows you to do lots of conditional stuff and text transformation.
Here is the source code: https://github.com/TheArmagan/PAPIConditionExpansion
Please mention me.
you can register and upload your expansion at https://api.extendedclip.com/all/, but it's not be verified.
verify at this discord
I fixed it by setting block updated to false
block.setType(Material.LARGE_FERN, false);
It says "Registration is currently locked. If you feel it is necessary to create an account, please join our discord and get in touch with us."
does anyone know how to remove javaassist malware?
Javaassist malware?
whatever that is which spreads across plugins
ello!
I downloaded someone else's Minecraft plugin repository and I want to compile it myself, but I'm getting this error
Searched in the following locations:
https://repo.minebench.de/me/clip/placeholderapi/2.11.2/placeholderapi-2.11.2.jar```
The repository is added to repositories, like the PlaceholderAPI wiki says
```repositories{
mavenCentral()
// Placeholder API
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")```
(https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Hook-into-PlaceholderAPI)
I haven't used Gradle before, so I have no idea why it's not working or how to fix it
Could I get some help please?
Oh easy don't download cracked plugins
No like my server smh got infected and m lazy to reinstall everything
Hey all, just trying to get started using PlaceholderAPI in my plugin, and I'm getting a bit stuck with offline players. I'm trying to show placeholders for players that are offline (or rather, online, but on a different server in my network). These players may or may not have been on the server I'm trying to show a message on with a placeholder on, but it doesn't matter - if the player is offline, the placeholders don't work, even for expansions that supposedly work with offline players. I'm fetching the player by UUID using Server.getOfflinePlayer(UUID). Am I misunderstanding how the offline player stuff is meant to work and it's... not for offline players?
Aah just reading around, is this because my server is in offline mode? (Because it's in a Velocity network)
Seems like being in offline mode makes no difference. Even using /papi parse the result is empty for a placeholder that says it supports offline players, with online-mode=true. Is it supposed to work if the player I'm testing against has been on the server?
Alright, that does work, I just chose poorly and it turns out the statistic expansion hasn't had an up-to-date release since support for offline players was added back in 2021, but compiling and using the up-to-date version with that support built in does work fine. I thought I was losing my marbles
only one thing that I think of is to check if you have added compileOnly ("me.clip:placeholderapi:2.11.6") into your dependecies in gradle file
oh I see the issue
I see the issue, try replacing version with 2.11.6
bcs 2.11.2 dosent exists
in the compileOnly
Oh.. I feel silly >.<
Thanks!
Hey could somebody help me? I am currently trying to check if someone has been put into combat. They get put into combat and i can verify so by seeing that there time is going down on the players' client and i see that they are being put into combat in the console but still when i try to check the players' timer with a command it returns negative..
https://paste.helpch.at/zunoworuto.java
ctc Myek
[14:11:55 INFO]: Checking combat tag for player: Myek (UUID: 1d024a7c-9b91-41ed-83bc-cefc6174aa4b)
[14:11:55 INFO]: [SC] CombatTag ╗ Myek is not in combat.
[14:11:55 INFO]: Combat check: Myek is not in combat.
ctc NoukjeKoekje
[14:12:00 INFO]: Checking combat tag for player: NoukjeKoekje (UUID: c8b92e35-484a-4560-bc9a-de43dcacee8e)
[14:12:00 INFO]: [SC] CombatTag ╗ NoukjeKoekje is not in combat.
[14:12:00 INFO]: Combat check: NoukjeKoekje is not in combat.
I should clarify that most of the time I don't really have a clue what im doing and I dont think the debug steps im trying to take are helping me in any sense..
(Please ping me if you respond)
We can't see where you're registering the Listener and Command class. Maybe you're creating 2 instances instead of 1? Send the code where you initialize the class as well.
Hope this helps
I was right. You're using 2 different instances. One for listeners and one for commands.
Instead of creating a new instance of CombatLogListener when setting the command executor, pass the already initialized one. The same way you've done when registering the event listener.
Alright will check that!
yup it works now! tysm!
hi, right now im using H2 (as well as SQLite) with a relocated H2 driver (xyz.srnyx.personalphantoms.libs.h2)
but this causes the db files to be innaccessible outside of the plugin (such as an online viewer / external viewer)
this makes it difficult to examine when testing
i also want it to be possible for it to be accessible outside the plugin if users want to modify it manually or something
any suggestions on how i can have it use the default driver while still being safe from versioning conflicts?
ping if reply
what do you mean accessible outside the plugin?
cant you see the database file in /plugins/YourPlugin/...?
I think he means he can't open the DB with any other tools than the plugin.
this ^
isolated class loader
i just have to use the class loader when i run SQL queries right?
so i like have a class loader, load the driver classes, store the class loader, then reference/use that class loader when i use PreparedStatement#executeUpdate() (and similar) or what
ping if reply
Paper reference
you just need to pass a URL pointing to the sqlite/h2 jar file to a urlclassloader that has the system classloader as parent (so it's isolated from the minecraft server entirely), then get the Driver/DataSource/Connection reflectively through that CL, then work with the regular jdbc java.sql interfaces
check out how luckperms does it
https://github.com/LuckPerms/LuckPerms/blob/9d80de5d5cbc15c75e01e4d1faf143fb9906ab42/common/src/main/java/me/lucko/luckperms/common/storage/implementation/sql/connection/file/SqliteConnectionFactory.java#L51-L74
https://github.com/LuckPerms/LuckPerms/blob/9d80de5d5cbc15c75e01e4d1faf143fb9906ab42/common/src/main/java/me/lucko/luckperms/common/dependencies/DependencyManagerImpl.java#L97
https://github.com/LuckPerms/LuckPerms/blob/master/common/src/main/java/me/lucko/luckperms/common/dependencies/classloader/IsolatedClassLoader.java#L37
can i not make connection using DriverManager#getConnection(String, Properties)? does it have to be through the specific connection class for H2/SQLite?
cause i tried something like this:
// Load driver
classLoader.loadClass("org.h2.Driver");
log("Classes in classloader: " + Arrays.toString(classLoader.getClass().getClasses()));
// Connect
return (Connection) classLoader.loadClass(DriverManager.class.getName()).asSubclass(DriverManager.class)
.getMethod("getConnection", String.class, Properties.class)
.invoke(null, url, properties);
```but got this exception (when it tries to connect):
Classes in classloader: []
java.sql.SQLException: No suitable driver found for jdbc:h2:file:.\plugins\PersonalPhantoms\data\h2\data
Hello, I have a strange problem, when the function is activated I get the logs, both on the server side and even in game, as if I had summoned an entity, but I can't see it IG, as if it hadn't spawned (probably not spawned).
On the other hand, if I do PerformByPlayer, it works, but I want it to be through the server,
I had dev in 1.18 and it worked fine, so I upgraded to 1.19.4, but since then it seems I've got a problem - any solutions?
Because I've got the logs its spawn (I've already debugged the spawn, the mobs world is correct)
public void spawnMobs(Player player, String mobTypeName, int count, List<String> names) {
Location loc = player.getLocation();
World world = loc.getWorld();
Random random = new Random();
for (int i = 0; i < count; i++) {
double xOffset = (random.nextDouble() - 0.5) * 10;
double yOffset = 0;
double zOffset = (random.nextDouble() - 0.5) * 10;
Location spawnLocation = loc.clone().add(xOffset, yOffset, zOffset);
String name = "";
if (!names.isEmpty()) {
name = names.get(i % names.size());
}
String command = "summon " + mobTypeName + " " + spawnLocation.getX() + " " + spawnLocation.getY() + " " + spawnLocation.getZ() + " " + world.getName();
if (!name.isEmpty()) {
command += " {CustomName:'{\"text\":\"" + name + "\"}',CustomNameVisible:1}";
}
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), command);
}
}
Why aren’t you just using the proper api to spawn the entity
I have custom mobs (forge Alexsmobs)
So can't use default API spawn, so i need to use summon
But why do I have the debug on MC (Summoned new mobname)?
But nothing spawns, why if it's perfromByPlayer it works and if it's me typing the command it works
Thats strange
ok with execute its work wtf
Spawning forge mob, using Bukkit, we're talking about one of those cursed servers aren't we 
Anyone here know a bit of regex?
Ow okay damn, I have this homework for school and I have to create regex but I'm stuck on this problem and I'm actually going crazy
.*
But It's like easy but Idk it won't work. Soo I have to find all strings (only uppercase letters) that have no repeating letters
all strings
You mean a list of strings and you have to get only the ones that don't repeat? Or you mean words in a string?
Uhmm I mean like I have a file with on each line a word with uppercase letters. And using the grep command I have to find all the words that have no repeating letters
Like this? https://regex101.com/r/7nsAiR/1
\b(?!.*([A-Z]).*\1)[A-Z]+\b
When trying to run those in my cmd I keep getting the same error: grep: Invalid back reference, any idea why?
cat words.txt | grep -E '\b(?!.*([A-Z]).*\1)[A-Z]+\b'
Oww hmm, how should I fix this?
regex 🤮
grep -P '^(?!.*(.).*\1)[A-Z]+$' words.txt
What we're hating regex too now?
we were always hating regex
Interesting decision
for the record -P flag is to enable Perl compatible expressions
which does support back-references and look-aheads
Ahh okay I see, thanks a lot guys!
Okayy so the next problem, not finding it either. I have to get all words containing alternating vowels and consonants
bump

How can I get the source code to DeluxeMenus 1.13.3?
The source code is here
https://github.com/HelpChat/DeluxeMenus
ok i think the answer is yes lol
you're welcome!
if I have a string that I know is a placeholder, is there a way I could directly pass it as an object or something to placeholderapi, so it avoids the "placeholder finding" step?
so like passing the identifier, the player and the params directly somehow?
no, placeholder api is based on string parsing entirely
every expansion is passed a string and is charged with parsing it however they want, so we can't really separate it out into parameters and stuff like that
I know that, but I meant passing the params as a string, same way the expansion receive them
basically as if I was calling the expansion directly instead of through placeholderapi
but obviously I can't depend on the expansion, so papi would be the middleman
i mean yeah you're just describing direct API usage
which you'd need to depend on the plugin/expansion directly
papi provides an abstraction based on strings, and it routes based on the first "word" of the string, there's not really too much overhead involved
what about searching on the string though? 
in my case I literally only have the placeholder as the entire string, so I think it'd be much more lightweight if I could just pass it
i mean if your string is literally just "%placeholder_arg_arg%", there is basically no overhead
well you can't, and there'd be basically no difference lol
wouldn't it skip some steps given I know that's the entire string?
we're talking milliseconds of performance here max
basically just remove the first char, split by _, use index 0 as namespace and pass the rest
there's no way you're like parsing this placeholder hundreds of times
I guess that's true
that's literally what the parser does lmao
wouldn't it need to search for the placeholder first 
or well the placeholders
given it doesn't know how many there are
it's literally like O(n) to find placeholder delimiters
and your string is probably like 15 characters long
you could not be optimizing more prematurely if you tried
if you really care, depend on the plugin's API and use it directly
then you get actual benefits like type safety and stuff
rather than skipping a single for loop
it's user input so I can't really do that
so you do need the placeholder parsing step then
the only thing I know is that the string is only the placeholder
it's already been parsed beforehand
even if it wasn't then papi would just ignore it
like on any non existent placeholders
and then it'd be the user's fault lol
yeah so you're fine lmao
Anyone know how to setup those bots that console players can friend and then automatically join a java server?
like this - https://www.youtube.com/watch?v=MEn1Uwcw-6M
In regex, if I have a string like this
#83Y2h182UU4 #49MbQ3y0I3 #3_13_4x_Qv_ #_9h63_X434o
I need to find a word in the string that has three _
How would I check per word? Because the '^' and '$' operators only work for the beginning and end of the string, not the word.
Just split the string before
But I have to find the string back after that, I'm only allowed to use linux commands.
just match it to start with a space or nothing and end with space or nothing or ., etc
then match whatever you need in those words
or match starting # and ending in a space or nothing
Does anyone know if there's a way to add custom items to the /give command using spigot api?
/give command doesnt havr any api around it
your better off making ur own give command
idk if what im saying is made up but with paper i think u can add it to the registry which is what /give will use
Hy, do you have a idea how i can create license for my minecraft plugin pls ?
Hey
How to send a title to a player?
Im using spigot 1.8.8
(i mean code not command)
You should be using 1.21.1 qwq 1.8 is over 8 years old- and filled with security vulnerabilities which will not be supported by most plugins, and most likely lead to your server being hacked by others-
However, if you really wish to do this, read this https://www.spigotmc.org/threads/send-titles-to-players-using-spigot-1-8-1-11-2.48819/
Cuz i am making bridging practice server for 1.8 players
but i can't compile if i add code in this thread
it said build failed
Hello I removed my prev offer services post because I wasn't sharing any relevant content there. Is there anyway to regrant my user the ability to share content there?
hey is this possible to make 2-3 items displaying on a single slot
like at first 1 item will display then after 1 sec 2nd item will display and after 1 sec 3rd item will display and so on
Where? DM?
Yes, then read the channel topic and rethink where to send that message 🙂
Okay that was kinda passive aggressive lol, just ask in #general-plugins
thanks
Can anyone help with this?
PlaceholderAPI extension:
When a player logs in, determine the Bungeecord server name, split it with hyphens, take the last word of the hyphens and return it as a placeholder
Example: bedwars-1 - will be displayed in placeholder: 1
its literally just String#split
send current code, error and the ways you've tried already
error?
no longer relevant, implemented it myself
anyone got suggestions on how to execute console commands into a k8s pod Minecraft server?
Not sure what you are using to access your k8s pod and not sure if it would work either but using something like kubectl you could probably do something like kubectl exec -stdin <pod-name> -- /bin/sh to get access to the pod then find the running process, something like screen -r and there you have access to the console
can also try using minecraft's rcon, though idk how good it is
but at least it is agnostic to what you use to deploy the server
Yeah In trying to use kubectl api with stdin
I’m using Hibernate ORM, and I’m not sure if I annotated everything correctly because it’s my first time using it. Basically, I’m trying to parse my ArenaManager into the database
I keep getting a row not found error when I try to save these objects into the Hibernate database, which in this case I am using H2 embedded for testing purposes
This is my controller class, and the line the error occurs when I try to save my data — https://github.com/PulseBeat02/MurderRun/blob/0ae75a2d2cab89ae318f159eb3b5faf4691a1171/src/main/java/io/github/pulsebeat02/murderrun/data/hibernate/controllers/AbstractController.java#L51
dont know if anyone here can help just installed python on my computer and keep getting this popup when i try to check the version
PS C:\Users\1234> python3 --version
python3 : The term 'python3' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
At line:1 char:1
+ python3 --version
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (python3:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Try python --version for windows
C:\Users\jb>python --version
Python 3.11.0
Turned out I didn’t actually install python I just downloaded the installer
Any clue why this is happening?
Been using it for years and now it started to happen
when using it with 1.21.1
Using latest ProtocolLib latest 5.3.0
no spaces after commas 💀💀
Not commas but yes 💀
huh
no spaces before curly brackets as well 💀💀
nvm only one missing a space
Check the protocol packet format on wiki.vg
Does it align still with what you’re doing
Well, not sure tbh
1.21.1
1.20.1
If someone know exactly how to fix it, pls ping
i see many things have been added
but not sure what to add exactly
Write the other data values that aren’t in 1.20.1
And then write the optional data values if you want to change them
Like block interaction, etc write the data after

Oh wait, I only saw the brackets, you mean the commas in the params
is BukkitRunnable#runTaskTimer(Plugin, long, long) affected by adjusted tick speeds in the latest mc versions (/tick)?
ping if reply
best bet is looking at the implementation
I'd assume it has some effects regarding schedulers
or. test?
or fuck around and find out test
😭 thx
np
You’re welcome
FAILURE: Build failed with an exception.
-
Where:
Build file 'C:\Users\oooo\Desktop\guilds\Guilds\build.gradle.kts' line: 137 -
What went wrong:
Task with name 'slimjar' not found in root project 'Guilds'.
any1
but i have this task in build.gradle.kts, idk its becasue gradle ver or smoehting
changed one thing to upper case and there's a new error
Task with name 'bstats' not found in root project 'Guilds'.
and now yes, there's now task here named bstats so what i have to do ?
./gradlew shadowJar
FAILURE: Build failed with an exception.
-
Where:
line: 7 -
What went wrong:
Plugin [id: 'org.jetbrains.dokka', version: '1.9bstats.20'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Included Builds (No included builds contain this plugin)
- Plugin Repositories (could not resolve plugin artifact 'org.jetbrains.dokka:org.jetbrains.dokka.gradle.plugin:1.9bstats.20')
Searched in the following repositories:
Gradle Central Plugin Repository
probably theres no any tasks from here in this project, can i compile it somehow?
relocates(
"org.bstats",
"co.aikar.commands",
"co.aikar.locales",
"co.aikar.taskchain",
"ch.jalu.configme",
"com.zaxxer.hikari",
"org.jdbi",
"org.mariadb.jdbc",
"dev.triumphteam.gui",
"net.kyori",
"com.cryptomorin.xseries",
"kotlin"
)
to get just .jar file as a plugin
ok idk
BUILD SUCCESSFUL in 3m 22s
ok so it wont work without it
16:24:34 ERROR]: Error occurred while enabling Guilds v3.5.7.2-SNAPSHOT (Is it up to date?)
java.lang.IllegalStateException: bStats Metrics class has not been relocated correctly!
as said in #dev-general, wrong place, #general-plugins
Code:
https://pastes.dev/fLloiSPleU
Error:
https://pastes.dev/LGh5LNdLW4
Main:```java
@Override
public void onEnable() {
displayAsciiArt();
loadManagers();
new PlaceholderAPIHook(this).register();
Bukkit.getConsoleSender().sendMessage("§a│ PlaceholderAPI kayıt edildi.");
Bukkit.getConsoleSender().sendMessage("§2│ Eklenti başarıyla yüklendi ve aktif edildi.");
}
name: LobbyUtils
version: '0.1'
main: dev.shedux.lobbyUtils.LobbyUtils
api-version: '1.20'
load: STARTUP
authors: [ sheduxdev ]
depend:
- PlaceholderAPI
- SkinsRestorer
- ItemsAdder
- AlonsoLevels
- UltimateRewards
```i dont know what i did wrong
at me.clip.placeholderapi.expansion.PlaceholderExpansion.register(PlaceholderExpansion.java:147) ~[LobbyUtils-0.1.jar:?]
you are shading PAPI (and maybe the other dependencies) in your plugin jar
don't do that
dependencies {
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
compileOnly("me.clip:placeholderapi:2.11.6")
implementation("net.skinsrestorer:skinsrestorer-api:15.4.3")
implementation("io.github.revxrsal:lamp.common:4.0.0-beta.19")
implementation("io.github.revxrsal:lamp.bukkit:4.0.0-beta.19")
implementation("dev.triumphteam:triumph-gui-paper:4.0.0-SNAPSHOT")
implementation fileTree(dir: 'libs', include: '*.jar')
}
I mean, that's just a portion of your build script, but the exception clearly says that PAPI is inside your jar
what should i do
what's the whole build script like? you might also be a transitive dependency of one of the implementation ones, or maybe it's in that libs directory?
btw this isn't related to PAPI but you probably want to compileOnly skinsrestorer as well
try gradlew clean and then run gradlew shadowJar again
and make sure you're looking at the right file
trying it
rn
looks fine on mobile at least
worked ty
Is there any way to edit the player's name tag above the head? (Not scoreboard teams, or using the game profile)
packets
Hmm
? that msg is 3 years old btw 💀
the mother of the holy bagel is important af
Hi, how can I change or replace the world name "world" without changing the folder name?
for example, Currently it is called World and I want to call it Country
I tried to use some extensions but like changeoutput but I don't know completely how to use it
if it's a default world, in server.properties
otherwise, not sure
maybe by using multiverse-core
how do i make the deluxetags GUI show the tags, but can be seen when locked as an item, but cannot use them, just view them?
Thanks for the suggestion, I already tried it but it creates the worlds again and my intention is to keep them
you can just change the name in server.properties and rename the folder
i believe that should be enough
yeah that's what I meant lol
I understand, it's just that now I would have to change the configuration of several plugins to assign the name manually, so I insist, isn't there a way I can replace the name using placeholder?
no
well, if you only need it to show up in differently several places, you can, as you said, using changeoutput placeholder
just read the docs and tinker around, its not that deep
has dev general been removed or is my discord bugged rn
You need to link your github. Right click the server and click on Linked Roles
Someone using facebook api (or attempting to) using node.js? 😢
no
hello. i am trying to create a placeholder expansion. external i am trying to return an int (network level) since I use the plugin "TAB" it only wants an int not a string. is it possible to do this?
Hey @robust crow, I ping you because I can't message you, and that's what others have been instructed to do. Can I get an eCloud account made? Currently says Registration is currently locked.
updating from 1.20.4 to 1.20.6 and noticed Particle.REDSTONE doesnt exist anymore, was it replaced with Particle.DUST?
ok ye im 99% sure its DUST
Have you got an expansion ready? if so link us to the github please
It was
Alright, can do tomorrow. Not currently on GitHub
https://github.com/expxx/SysInfo I lied, here you go. Very simple, but I didn't see anything on ecloud already for it
thx
What's the use case for exposing system environment variables and properties
At least in my case, I've got a dynamically scaling set of servers, and having the server ID and template be displayed through tab would be useful for debug.
Hey!
I need a help in little thing!
I make a Ban Menu with Litebans, in Deluxemenu and how do i make fully customzible duration & reson, with a button?
I Write duration separetly and reason separetly
Thats possible?
probably
idk
hi. i want to rotate a block display around its center, similar to how item displays rotate. i can center the display's pivot point by applying a translation of (-0.5, -0.5, -0.5) but when a left rotation is applied the pivot moves again. is there a way to re-center the pivot point after a rotation?
the particle is where i want the pivot point to be at. you can see from this gif what i'm struggling with
https://i.imgur.com/V52UPKP.gif
rotate the translation vector too
then apply it as a transformation
are you using a library for those physics sims?
it's a very basic thing
i'm using libbulletjme for the physics
i'll try to integrate it to the minecraft world so performance is a concern
so i've tried this, but the display started spinning lol. should i apply the new translation and rotation at the same time?
tf = entity.getTransformation();
newtf = new Transformation(tf.getTranslation(), rotation, tf.getScale(), tf.getRightRotation());
entity.setTransformation(newtf);
tf = entity.getTransformation();
newtf = new Transformation(tf.getTranslation().rotate(rotation), tf.getLeftRotation(), tf.getScale(), tf.getRightRotation());
entity.setTransformation(newtf);
ah okay I'm dumb I got it
- look up how matrix transformations work
- look up what a quaternion is. it's not complicated
alright nice
i was rotating the current translation, not the actual translation i wanted
i've rotated (-0.5, -0.5, -0.5) instead of the current translation and it worked perfectly
thanks
💜
does anyone know what would be the replacement for IntEnum in protocollib
it was removed in ~5.0 i think
Okay so this is not quiet devlopment but was wondering if any of you knew. I am trying to give my self an item through console with gradient coloring, and I cant seem to make it work.
I have made one color
/give @p minecraft:pumpkin_pie[minecraft:custom_name='{text:"Pumpkin Pie",color:"#ffbf00"}'] 1
But I cant figure out any other ones, I was wondering if any of you could assist?
Does anyone know how can I fix this issue?
Ive got my own core that uses Kotlin
kotlin is being used from the bukkit libraries (in plugin.yml there's stdlib added in libraries)
however Eco (from Auxilor) has the Kotlin shaded
and it seems like it breaks my plugin
hi, is it possible to use a placeholder inside a placeholder?
like this /papi parse --null %otherplayer_world_{objective_entryposhigh_{LASER}_{1}}%
Yeah looks like they don't relocate Kotlin.
Comment suggests they're not shading it, but they very much are.
https://github.com/Auxilor/eco/blob/be970bd5a07b703e7da5496c2b59274122aeb1b9/build.gradle.kts#L223
Solution would really be for them to relocate properly, I'm not sure why they aren't
Oh it's a framework, yeah why are they shading kotlin at all
if I recall correctly that's why they remade "libraries" in paper
they suck
lol
including those problems
and I don't think there is a way to fix it
You can always try asking in spigot
but as always, my suggestion is not using spigot at all 🙂
the issue is that Kotlin cannot be relocated
it does not recognize extensions then, etc.
it just breaks
ye well I have to use spigot
no
should work if you do that
wdym
define "broke"
so when Ive added Waves into dependencies
in my other project
all extensions broke
additionally hashmaps were not recognized
& such
because you relocated it?
ah you want kotlin to be accessed by your plugins
Works fine?
I could have created instances of extensions xDDD
so that only the core has the stdlib
yes
Unless you mean relocated for the lib, then yeah they shouldn't be shading it at all
yeah unsure tbh
ye well what should I relocate then
Ive been literally searching on google
and found absolutely nothing
I dont think that anyone has had such issues
bcs its just bcs of 2 plugins using Kotlin that is shaded
the issues is that as it cannot be relocated
it uses the same classpathes
but the classloader somehow breaks it completely
I mean I would potentially need to make my own class loader lol
to load the rest of my plugins
but that sucks
bcs like the issue seem to be just in the classloader
What do you mean?
you have told me to relocate kotlin
but like
what should I relocate
Are you asking what package to relocate for kotlin?
tasks.shadowJar {
relocate("kotlin", "x.y.z.libs.kt")
}```
Because something like this should work just fine.
ye well this is what Ive done
but it went absolutely crazy
as described above
it has broken the extensions
collections
and such
Not sure if it has broken it in the project itself
however when Ive added that project into other project's dependencies
I couldnt use the collections & the extensions from the plugin
Is Waves a library as well?
Waves is a standalone plugin
it has registries & such
so Ive made it a Core plugin of my plugins
Oh I see
then its being added as compileOnly dependency
I highly recommend shading Kotlin stdlib instead of using bukkit libraries, and defeinitely relocate it
It's too integral to the plugin to be relying on it being present late
shading did the same thing
it just throws the LinkageError
Huh I've relocated for years with no issues, might wanna share how you have it setup, gradle etc
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
theres the commented relocation of kotlin
just tried it again
and as you can see it just breaks all extensions
and my extensions are then literally loaded as classes
oof
Hi, I wanted to know if you could help me with my error when using “ClientboundPlayerInfoUpdatePacket”, because I can't understand why I get “Expression expected” and I'm using spigot 1.20.6
yea 😭😭
I'm confused about your setup, relocation is only done at compile time it should not affect ide at all, you should never get an in ide error for just adding a relocation
Unless your kotlin is coming from a fat jar, in which case don't
yea that's just pretty strange
i just wanna note that it breaks extensions and collections only in the other project, not in the core directly. The other project cannot see the extensions of the core
just noting that as some of my messages could be confusing
Unless your kotlin is coming from a fat jar, in which case don't
Okay so this is true
Publishing fat jars is a bad idea
yea
so
I guess that I would need to publish a different jarfile of the core
without kotlin
and then in the other project i will just exclude Kotlin and relocate it
Why exclude Kotlin in the other projects?
to not shade it
the core would have Kotlin compiled itself
so other projects are gonna use the Kotlin from the core
I guess you could publish with kotlin as compileOnlyApi and build with implementation
That way the other projects wouldn't need to exclude anything
But yeah that would work too, as long as the relocation is setup identically
for some reason all of my projects always compiled Kotlin as I've had the kotlin jvm plugin there
so I've had to add the exclude in shadowJar
I'll just need to figure out how to simply make the building and such
bcs as the core is standalone and published as well
I'll basically need to somehow setup 2 different shadowJar tasks
one that is father - the plugin
and second that would be used as artifact in publishing
@pulsar ferry it seem like I've figured it out. I've registered 2 custom tasks for shadowJar. One has the Kotlin shaded and relocated and second has the Kotlin excluded. The second is being used for publication and the first one for the plugin itself. Ofc I'll still need to test it properly, but so far it looks promising.
I want to help you so much for the suggestions and overall help ❤️
Hello, i've created a menù with DeluxeMenus https://pastebin.com/0hp5yfgi
But how i can do that, if player has the item required, when he click it get command executed and the item removed from his inventory
> Could not resolve all files for configuration ':compileClasspath'.
> Could not resolve org.spigotmc:spigot:1.21-R0.1-SNAPSHOT.
Required by:
project :
> Could not resolve org.spigotmc:spigot:1.21-R0.1-SNAPSHOT.
> Unable to load Maven meta-data from https://repo.tarkan.dev/org/spigotmc/spigot/1.21-R0.1-SNAPSHOT/maven-metadata.xml.
> org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 10; DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 17s
2 actionable tasks: 1 executed, 1 up-to-date```
how can i fix this
1.21.1
why spigot when you could use paper
agree but also irrelevant to the issue
Hello everyone, I wanted to ask a question. How does the compass calculate the direction the player should go, for example, the compass indicates that the player should go to the North. How is this possible, is there any function that returns the same result?
I have a project that involves this, I need to know exactly where the compass points for the player to go, NORTH, EAST, WEST, etc.
Pretty sure the compass points to spawn or the bed location.
I'm not on PC so I can't check my code but you can get direction using two locations. I think location might even have a "direction" method.
import org.bukkit.Location
import kotlin.math.abs
import kotlin.math.atan2
fun getCardinalDirection(playerLocation: Location, targetLocation: Location): String {
val deltaX = targetLocation.x - playerLocation.x
val deltaZ = targetLocation.z - playerLocation.z
val angleRadians = atan2(deltaZ, deltaX)
val angleDegrees = Math.toDegrees(angleRadians)
val normalizedAngle = (angleDegrees + 360) % 360
return when (normalizedAngle) {
in 0.0..45.0, in 315.0..360.0 -> "NORTH"
in 45.0..135.0 -> "EAST"
in 135.0..225.0 -> "SOUTH"
in 225.0..315.0 -> "WEST"
else -> "UNKNOWN"
}
}```
This my function for calculate what cardinal
```kt
@EventHandler
fun onPlayerMove(event: PlayerMoveEvent) {
val player = event.player
println(getCardinalDirection(player.location, player.compassTarget))
}
And my event
then as yapperyapps mentioned you can get the direction using the two locations
dm it to me and I'll send it
that works too
This compass is pointing to NORTH and in console shows "EAST"
might need to change your degree values
since positive Z is probably marked as east in your code
also technically it's facing south if you go by what minecraft says
¯_(ツ)_/¯
anyone know how to make the end world custom generation
like a end world that doesnt have void holes or seperated land
just all as one
like overworld
is it not possible to set player velocities?
search results are scattered
final Location location1 = player1.getLocation();
final Vector velocity1 = player1.getVelocity();
final Location location2 = player2.getLocation();
final Vector velocity2 = player2.getVelocity();
player1.teleport(location2);
player1.setVelocity(velocity2);
player2.teleport(location1);
player2.setVelocity(velocity1);
printing the velocities instantly returns correct values
but printing 1 tick later returns 0,0,0 (and in-game there's clearly no velocity)
ping if reply thx
Pretty sure you have to normalize or multiply it in some way.
does it also do this if you don't teleport
because I remember setVelocity working
maybe you have to delay it by like a tick after tp
but also unless you do setVelocity(customVelocity) then the velocity is probably going to be pretty small/zero (excluding gravity)
in all my tests im like flying while it happens
but i always just fall straight down
will try
ok it sorta works
it barely moves the other player
this is the velocity data while running around + jumping:
-0.02446379223545523,-0.3739040364667221,-0.08300832441767343
but the other player barely moves
i basically want the players to switch locations and continue in the direction the other player was going
so a seamless swap/transition or whatever
maybe there is something else i should do to accomplish this?
ping if reply again thaxnks
btw I don't think the minecraft velocity is actually the player's velocity
but also note that like if you're running and jumping but then release all controls, then you really don't move much

