#help-development
1 messages · Page 306 of 1
for (int i = 0; i < splittedString.length; i++) {
ChatColor.translateAlternateColorCodes('&', splittedString[i]);
String color = ChatColor.getLastColors(splittedString[i]);
splittedString[i + 1] = color + splittedString[i + 1];
strings.add(splittedString[i + 1]);
i++;
}
hmm how sould i fix this
the index is out of bounds bc im tyirng to add to the next string
is there a way to make it not?
kk
#announcements is the best bet you have
you could probably check commit history
eg when was Player#getLocale added
ah that sucks
gonna just look through old javadocs
I am seeking some advice on how to implement a thing I wanna do in my plugin. I am making a plugin that has an inventory gui, nothing crazy so far. now there are like a few submenus and stuff but my question is how can I make a system that can handle these submenus more elegantly than having like a bunch of classes.
Like ideally it would some kind of system where I can create a menu with like 3 options, and each option brings me to another menu, which does or does not have such options. idk if im making sense
basically I am getting stuck at making it dynamic I guess
ah
create a menu object would be your first guess
menu holds an inventory
lemme draft sumn up read quick
yes thats kinda how far I am
using maven shade how can i relocate something to another module
if its in the parent pom
ahh, getting [proguard] Note: duplicate definition of library class anyone here using proguard?
can you show me what you have
just a pic of the classes in your ide would be fine
all of them? xD
nah just the menu ones
its for a bingo plugin fyi
AbstractGUIInventory is the one that has the inventory and methods to open them for players
public abstract class MultiPartUI extends AbstractGUIInventory
{
private String currentPath;
public MultiPartUI(String title, AbstractGUIInventory parent)
{
super(45, title, parent);
this.currentPath = "root";
}
@Override
public void delegateClick(InventoryClickEvent event, int slotClicked, Player player, ClickType clickType)
{
}
}``` and this is the on im making rn
ignore the currentpath thing I was trying something but it failed
you want a path so you can have back buttons?
well kinda
just have a menu that is the parent
I want to be able to go back and forth
yeah have the parent
like I want to navigate several windows to pick some options
im gonna use a phone for example
You have homescreenmenu, parent is null
you have appsmenu, parent is homescreenmenu
you have settings menu, parent is appsmenu
kinda like that
yes
exactly like that
except for teh fact that I dont want to create all those as individual classes since they'll all do basically the same thing
which is redirecting you to another window
right so
until ofc the lowest ones which will actually do stuff
well you can create a NavigableMenu or something which takes a Map<Integer, MenuThatDoesStuff> and maps out the buttons
whats the int for, slot numbers?
ye
okay
i dont quite understand your structure here
so i'm giving more general advice
yeah makes sense
actually, do you have a Button class?
Why it still doesn't work?
well i have an InventoryItem class which gets really close to being a button
maybe button can be an interface
so i would actually replace teh ints for inventory items
so your gui class can implement it
what does a button interface do
and opens itself when clicked
onClick(Player)
or something
wait lemme think it through
why would the gui class do that
yeah it doesnt make sense thinking abt it
for reference, my abstractinventory class can open itself to the player, as well as give click events and more stuff
Import "org.bukkit.inventory.meta.Damageable" not "org.bukkit.entity.Damageable"
how do i make maven with multiple modules compile on mvn clean install to 1 location with the stuff not to a folder for each module
ah okay
When calling Bukkit.getServer().getOnlinePlayers.size() from a PlayerQuitEvent, the returned value is the number of players /before/ the player quits. The same command called from a PlayerJoinEvent returns the number of players /after/ the player joins. Is there a nice way of making this consistent without either adding or subtracting 1 to one of the values?
nope
Any idea why the conflicting behaviour?
Yeah
playerquitevent is called before the player is unloaded frm the server
There is a different event before the player is in the server.
playerjoinevent is called after the player is loaded
Joined* Not loaded, the player might still be loading in.
you can see if that exists with playerloginevent
yeah so just remove 1 from the quitevent count
Yeah and the Spigot docs recommend not to use the PlayerLoginEvent.
It directs you to another event my guy
@rotund ravine player is loading in but to the server, the player is already loaded
Wait nvm it doesn't say not to use it
Rightio, I'll just subtract from the PlayerQuitEvent I suppose.
why can't you just subtract ye
I don't like fudge.
then you shouldnt have been a plugin developer
Fair.
i made a custom recipe system but one annoying quirk about it is that custom recipes using RecipeChoice.ExactChoice fail to show up in the recipe book as craftable, even if the player has ingredients
does anyone know how to deal with this
Yes, immediately after the message I noticed where I was wrong, but now when the item drops below 0 durability it is not removed from the inventory, why?
it does not remove itself. (wait damageable might do it, look below)
like what do you expect
But also that
But the durability of the tool in play decreases, not increases
well
riddle me this
how can something be x + 29 in one line
and then <= 0 in another line
like wouldnt it be atleast 29
?logic
durability works kinda in reverse but also not really
getDamage doesnt return the durability, it returns max durability - current durability
I tried to replace the + with -, but now with just one use the item drops below 0 and is deleted, I need this to happen after 2/3 uses
if an iron pickaxe, which has a max durability of 255, has 100 durability, it'll return 155 damage
then don't do -29 and do - something else instead
print the damage values to see what you are actually changing
that way you can see if the item even has damage to begin with
you should be checking if damageable.getDamage() >= item.getType().getMaxDurability()
not if <= 0
also, there are item types that cant be damaged but that are still instanceof Damageable because of legacy support of certain items (like old dyes, for example lapis lazuli)
so also check if item.getType().getMaxDurability() > 0 as well as instanceof Damageable
Ok, actually it works
yeah because damage doesnt return durability, so checking of <= 0 is pointless
it would actually destroy the pickaxe if it had full durability (but in this case it cant because you're always adding at least 29 damage)
in any case now that that's done, does anyone know if there's anything I can do about minecraft's poor recipe book mechanics
basically i made custom recipes that uses RecipeChoice.ExactChoice for most of them and minecraft seems to struggle with figuring out if the player actually has the ingredients or not
so they're always shown as uncraftable and clicking on them only shows their red labeled preview images
but actually putting the ingredients in manually produces the item just fine
is it possible to change the size of a chest inventory ?
yes
How 🙂
connect again
would this work?
I need help solving a large bug. I have a file that looks at the default YML files and upgrade a server owner's YML file if its missing data. The problem with that is if a server owner removes default settings then it regenerates them. Which normally wouldn't be bad, but it is bad because there are example settings in the YML file. So I need to try to find a better way of handling YML file upgrades.
anyone know if when “livingEntity#setRemoveWhenFarAway” is set to true, the entity will be removed after a restart
How to get an event from a listener?
Like get a playerinteractionevent from a getHandlerList()
probably because no one is near it when it restarts
?xy
Asking about your attempted solution rather than your actual problem
Config versions
What does that mean?
Wait nvm, you’re trying to regenerate certain key value pairs if they’re missing, no?
However only some and not all
huh? Why does it return null?``` ConfigurationSection section = getConfigurationSection("items");
for (String path : section.getKeys(false)) Bukkit.getLogger().info("Item: " + getConfigurationSection(path).getCurrentPath());``` config.yml: ```items:
'0': "Test"```
ah nvm
logic
getConfigurationSection was running from base file not items section
Yeah, that's what I'm trying to do
Here’s what I would do
I believe there was a list of included packages in Bukkit (like SnakeYAML etc) if there is can anyone send it?
If the file is sourced and sinked from your jar file, then just let that be
Then just define the default key value pairs
Here
I believe there was a SQLite driver too
Gotta open the picture in your browser
Thats craftbukkit, the impl
Spigot does not expose it afaik
Or well, as a transitive dep
Ye
for example for using snakeyaml I don't have to include it in my jar etc (because it is already included in Spigot or somewhere else) can I see a list of these?
a bit more readable list :d
Yes
Here
And what mfnalex sent u
But those are not added to ur compile time classpath
Eg mysql connector
Hamcrest
But they’re provided to ur runtime classpath tho
Hello friends, gotta problem here
@EventHandler ... EntitySpawnEvent ....
Firework firework = (Firework) entity;
FireworkMeta fireworkMeta = firework.getFireworkMeta().clone();
fireworkMeta.clearEffects();
firework.setFireworkMeta(fireworkMeta);```
It doesn't clear the effects, but why?
Not enough code to tell. Does your code even get called? debug with sysout
I just checked and it indeed does not work
@EventHandler
public void onFireworkSpawn(EntitySpawnEvent event) {
if(event.getEntity() instanceof Firework) {
Firework firework = (Firework) event.getEntity();
FireworkMeta meta = firework.getFireworkMeta();
meta.clearEffects();
firework.setFireworkMeta(meta);
firework.detonate();
}
}
it instantly detonates() but the effects are still there
tried creating a new meta and applying it?
With other words, is it possible to change the firework effects from a firework that gets spawned via EntitySpawnEvent?
More code ...
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void creatureSpawnEvent(EntitySpawnEvent event) {
Entity entity = event.getEntity();
Location location = BukkitUtil.adapt(entity.getLocation());
PlotArea area = location.getPlotArea();
if (!location.isPlotArea()) {
return;
}
Plot plot = location.getOwnedPlotAbs();
EntityType type = entity.getType();
if (plot == null) {
// Try to fix elytras for plotsquared
if(entity instanceof Firework) {
Firework firework = (Firework) entity;
FireworkMeta fireworkMeta = firework.getFireworkMeta().clone();
fireworkMeta.clearEffects();
firework.setFireworkMeta(fireworkMeta);
System.out.println("Prevent " + entity.getName() + " explosion via EntitySpawnEvent");
return;
}
// End of fix```
Sysouts:
100x ... `[00:06:17 INFO]: [PlotSquared] [STDOUT] Prevent Firework Rocket explosion via EntitySpawnEvent`
I try to fix a Plotsquared issue with fireworks, where you can't fly with a elytra and I just want to allow spawning fireworks everywhere in the plotworld, but without explosions.
The explosions cause big problems, for example armorstands will get destroyed and so on
wait
I think I got it
1 min
yeah
@rose aspen
private boolean ignoreNextEntitySpawn = false;
@EventHandler
public void onFireworkSpawn(EntitySpawnEvent event) {
if(ignoreNextEntitySpawn) return;
if (event.getEntity() instanceof Firework) {
event.setCancelled(true);
ignoreNextEntitySpawn = true;
event.getEntity().getWorld().spawn(event.getLocation(), Firework.class, firework -> {
FireworkMeta meta = firework.getFireworkMeta();
meta.clearEffects();
firework.setFireworkMeta(meta);
});
ignoreNextEntitySpawn = false;
}
}
you have to spawn your own firework, then apply it to the spawned entity using the consumer
Hey, I am giving a warden a custom name using warden.customName("name") which should prevent it from burrowing back underground. However it does not. Any ideas on how to get the warden to stop burrowing for inactivity?
there is no customName(String) method, only setCustomName(String)
What
setCustomName is deprectaed
It's customName
no, it's not
declaration: package: org.bukkit, interface: Nameable
you are using the API of some fork probably. and even those will not have a customName(String) method
customName is bukkit.Nameable
no
see? ^
^
Anyway, now that's out the way. My issue is not with naming the warden. It is that it still burrows ❤️
Using setCustomName (the deprectaed one) still acts the same
I am using PaperAPI actually
yeah I know. Spigot's setCustomName is not deprecated
have you tried whether it still happens when using a spigot .jar? sometimes paper introduces bugs like this, where a vanilla feature works on spigot but not on paper
if it works on spigot, you gotta report it to paper. if it also doesnt work on spigot, you gotta report it on spigot's JIRA
Do I need to use repository and dependency in maven to make a plugin depend on another plugin jar i made before
if so what do I need to write for respotiroy and dependencies
no
you can just install the other plugin to your local repository
for example, imagine you have this:
First plugin:
Group ID: me.demopro
Artifact ID: myfirstplugin
Then you just mvn install that.
Second plugin:
<dependency>
<groupId>me.demopro</groupId>
<artifactId>myfirstplugin</groupId>
<version>..</version>
<scope>provided</scope> <!-- compile if you wanna shade it, or provided if the other plugin is a "normal" plugin dependency that also runs on the server -->
np
you only need to upload "firstplugin" to a repository if you want other people to be able to use it without them "installing" it themselves
oh
@tender shard im tryna make an api for myself for a discord bot
I want my plugin to use the api to tell discord bot what to do
So i just made a normal java file
Can I use this for it to depend on and stuff
or will it not work the same
so you probably want to shade it
that means you need to declare the maven-shade-plugin and set the scope to "compile"
https://blog.jeff-media.com/common-maven-questions/ second headline
your groupid should be something like me.demopro or com.github.demopro
the artifactid should not contain a "."
the shade plugin has to be inside the pom that uses the other .jar
how is the other artifact called?
the artifact is just a plugin jar
this discord one is not gonna call it
the plugin one is gonna call the discord one
okay so you have a "discord-server-plugin" that depends on "discord-server" or sth, right?
no
thi one i pasted and sent
im gonna make discord api
on it
but my prison game plugin for mc server
is gonna use that api
<dependency>
<scope>provided</scope>
<groupId>hi-discord</groupId>
<artifactId>server-discord</artifactId>
<version>1.0</version>
</dependency>
I see. remove the shade stuff from the "server-discord"
the shade stuff has to be in the pom that uses "server-discord" as dependency
this is server-discord
<dependency>
<scope>provided</scope>
<groupId>hi-discord</groupId>
<artifactId>server-discord</artifactId>
<version>1.0</version>
</dependency>
and i add this to the mc plugin
one second
this would be your "server-discord" pom
and this would be your plugin that uses the api (and shades it)
ofc also include the <properties> part, I just removed them to show the important parts
ok ill try later tysm
ill also search abit more
if i cant find can i come back to u as last solution tmrw or smthgn lmao @tender shard
lol ok
lol ok
ok ok
[INFO] --- maven-shade-plugin:3.4.1:shade (default) @ PGxPermissions --- [INFO] Including io.socket:socket.io-client🫙2.1.0 in the shaded jar. [INFO] Including io.socket:engine.io-client🫙2.1.0 in the shaded jar. [INFO] Including com.squareup.okhttp3:okhttp🫙3.12.12 in the shaded jar. [INFO] Including com.squareup.okio:okio🫙1.15.0 in the shaded jar. [INFO] Including org.json:json🫙20090211 in the shaded jar.
thats compiled to the jar file when i compile it with this cmd: mvn clean package
how can i exlude some dependencies from it like okhttp3 ?
thats a shade plugin so.. yep
set the scope to "provided"
https://blog.jeff-media.com/common-maven-questions/ see second headline
or do you want to exclude a dependency from a dependency?
if so:
<dependency>
<groupId>some.group.id</groupId>
<artifactId>someartifact</artifactId>
<version>1.2.3</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
</exclusion>
</exclusions>
</dependency>
ik i set all of them provided, but the okhttp3 lib from io socket, and i need to shade the socket io
so im gonna try this hopefully
and .... that works thank you neh
np
So is there an easy way to wipe every enchantment from the server without wiping the eserver lol
Hello, I am implementing vault in my skypvp plugin where I generate my coins with which kits can be bought later (another plugin that works with vault) when I don't have enough money it works fine, but when it has the money it doesn't subtract it
is it possible to create a static hashmap that can be used across plugins ?
like access other plugin hashmap
What do you mean by this?
Yes, need to grab an instance of the plugin and as long as the hashmap has a public method to access it or it is public variable.
Hi?
👋
I have a clock on my server and I want to show it on my website too, how can I make the clock sync in real-time between minecraft server and website?
could you provide some docs for it ?
When you say clock, do you mean a countdown timer? Or like a real time clock?
just got it is about dependency :l
So I have like a countdown timer per player.
I wanted to show how many time left each player has on the website.
Gotcha. Well if you've got it per-player and it's stored in SQL or something, you should be able to pull that timer from the same SQL database with PHP or something
Otherwise you'll need to work out some web requests so your plugin can send information to your website to update the timer
There is ways to do it non dependency. But it is more complex and requires reflection and/or generics to do. Which i doubt you will want to do
That's what I do but I update the data into the SQL every 5 minutes.
anything just give me all
or make it update when a playerjoin/left
No, I wanted it to update possibly in real-time.
Best way to do this would be to setup some kind of rest api on the website that can accept json payloads. Then from plugin its just a matter of sending the json payload to the appropriate end point. Or you could use redis or mysql.
it is realtime
What I did is I use SQL and update the database every 5 minutes and it's kinda not what I absolutely want.
The other alternative would be to have the plugin implement a small webserver to serve a single html page that your webserver can link to or reverse proxy to
Well updating in real time is fine. If you have the start or end time in SQL it's just a matter of extrapolating now - storedTime (or vice versa depending on what's stored)
The real-time updating is just going to be your website updating text every second
On the plugin, I cache the data because I thought it's not gonna take server performance.
The best way to do it with sql is like what choco said. Mysql does have math functions you can use with queries
So you only need to store the timer count and then use the math function with query to get time left and then you dont really need to update further
Plugin only updates when timer expires
Can anyone help me how I can get some random name that is within the Common example ess
The thing is, players can manipulate their time left. (e.g: by storing an item that can increase their time).
Then update the timer when that happens
I wanted to make it pick any of the names randomly within the common
On website just check when timer expires to update or remove timer as necessary or just frequently check
Mysql is capable of handling millions of connections and thousands of queries efficiently
On website I have it on real-time, as soon as the database updated the data will shown correctly.
Alright so, should I query it everytime the time left change?
Sure
Can someone help me please?
I'm just afraid it's gonna be heavy on server performance.
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
You are nowhere close to mysqls limits
Stop worrying about performance until you actually need to
Okay
Alright, thanks for the help. I'll try the solution.
Load the yaml file using appropriate file and yaml methods. And then its just a matter of getConfigurationSection("Rewards.Common") and then iterate over that configuration section object to get relevant config entries
I wanted to know how to use random() to get a name inside the configurationsection rewards.common
Count the entries and use a range with random. The pull a random entry based on number
Anyways back to work for me
do you have a better example?
you want to get all of the entries from the common
and then randomize it.
yes
Okay, let's say you have successfully get all the common rewards
List<Reward> rewards = ...
// Get random rewards
Reward random = rewards.get(rewards.size() - 1);
Common:
Kit: '&aKit'
Hat: '&aHat'```
Can I get the names to be chosen randomly like this?
Yes you can do that, but I don't think you can randomize it from the start, you actually need to get all of the values and then you can randomize it.
Aglerr knows what i am talking about. Once you have your range you want a list of the entries so that whatever is the random number you can just pull the index with same number
yo frostalf, i think the solution for the timer is working perfectly well, so thanks! and also thanks Choco for helping me.
Don't be too efficient this time
What would the best way of doing MySQL database connections? I am trying to use JDBC and OrmLite to connect but no matter what I try I get this error: Connection failed: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
Please ping or do a reply with ping for responses to ^^^
I distinctly remember the other day i responded to you
Did you not check or change max allowed connections for db server?
That is too high
I changed it to just a really high number to ensure it wasn't being messed up
Anyways show the code for your connection
ConnectionSource connectionSource = new JdbcConnectionSource(url);```
And yes I have tried changing localhost to 127.0.0.1 and the local ip associated with the server
Make sure mysql config has tls_version=TLSv1.2
In mysql config it goes below mysqld section
That would be /etc/mysql/my.cnf right? I'm just doing a sanity check
Usually but there is other areas where it can be so its whatever it was setup to use.
If you need to add it to config make sure to restart mysql for the setting to take effect
mhm
Didn't fix it
Ok. You will have to wait for me to get home for me to help further. Get off work in 6.5 hours
Currently on phone so limited abilities to help appropriately with your issue
👍
if i have nms version support for 1.17.1 to 1.19.3 which versions do i actually need? i was looking on some other repos earlier and they dont have 1 for each version sometimes 1 module covers 2 patch versions
probably depend on what exactly you're doing
nbt data stuff
public void onChat(AsyncChatEvent event);``` how do i get the message that has been sent?
event.setMessage?
also wrong place
thats papers chat event
we dont support paper
ah alright
declaration: package: io.papermc.paper.event.player, class: AsyncChatEvent
they use event.message
problem is that the field message is a component and i dont know how i get the content from that
its AsyncPlayerChatEvent if youre using paper api
thats our event
declaration: package: org.bukkit.event.player, class: AsyncPlayerChatEvent
yeah
is deprecated
That's what I really hate. It's already a pain in the ass to maintain support for multiple versions, but why can't spigot and paper have the same API
if you see something deprecated in paper api you can ignore it like 90% of the time
just use spigot
because its bs
Good morning! And thank you!
I can't test this code now because im working, but does this code work with the elytraboost?
Because if I remove the firework via entity.remove(), the boost will not be applied somehow for the elytra.
Paper has things like async chunk loading, which is AMAZING and should be used by any plugin
paperlib
guaranteed until the hard fork 
thats the entire point of it
And then there are also things that spigot has half-adapted or copied over and just renamed it
Meaning that there are 2 methods for the literally the same thing in the paper api
Paper and spigot should just merge their api
they wont
paper is a different software
if you need paper features but want compat use paperlib
totally different ideologies on what their softwares should do
their only common ground is (craft)bukkit 
if (PaperLib.isPaper() {
do
}
Ya I don't need a library for that
its papers api
I just wish I wouldn't have to do that
I think it is better to just use paper as serversoftware and code the plugins with spigot api.
This is how I do it.
^^
Because there is no reason that many APIs are paper-only if they could just exist with soigot
do you realise why paper exists
And that's the thing
paper only exists because md didnt want to accept the prs for some of their features
so they forked
the api's will never be combined
Paper has deprecared AsyncPlayerChatEvent but spigot hasn't
And the class says that it will warn you in the console in the future
So prepapre yourself in writing some boiler code to have both spigot and paper support
just use paperlib
you get the features you want
while
retaining
spigot
support

It's again just boiler code and stress because I always need to check how it's done in both software
wtf is the difference
does it contain fields regarding 1.19 chat data?
if (PaperLib.isPaper()) very boiler plate
That library is just a band aid for the actual problem
Now do that every time for every feature that is different
paper are weird
And now do that for whole events
make a method for it?
Yes make a new method for a new whole class
i have way better things to do than argue with you when you just wont listen
That's boiler code
Even if you accept it or not
It's just some useless code because some people thought it'd be better to just not merge it into spigot
you really are dumb
And we could all prevent that if we'd merge the changes into spigot
paper exists because md ** does not** want to merge papers features into spigot
You are insulting me now because I hate boiler code?
"add paper features to spigot"
That's the reason for the problem
But the problem still persists
Good luck convincing md to do that. Spigot denies tons of PRs for reasons I'll never understand. However, if you can convince him, I'm sure everyone will be surprised.
And just because there's a reason for the problems doesn't mean that I am not allowed to say my opinion on it.
Show some respect
you wont listen to me
At what point did I not listen?
That's one of these things I find funny. I always must thing of that post that he made in which he said that there is totally no need to use NMS because the API has everything you need
I don't understand why hes so strict about everything
you said stuff on the lines of "add it to spigot" multiple times even though you got told the reason paper exists, and you continue to say it
if you dont like it leave
no one is forcing you to support spigot
That's not really an argument
Your comment doesn't make sense at all
It's basically just saying "accept it and shut up"
looking at paper on github rn... where in the Fuck do they store their api code? is it only in patches?!
But at the same time, there is literally no method to simply set the motd on the server till this day
Like, I would love if I didn't have to use it
Things would be a lot better if spigot would be more open with what coule be added to the API
There actually is a method for that. ServerListPingEvent#setMotd(String motd)
This only changes it for players pinging the server, but not plugins trying to access it. They will still use getMotd()
and I could just say that the plugin needs to implement some hacky solution to all the people that tell me that the motd is apparently not being set
But why all the stress if it can be done properly in the first place
And that's just one example
I think you misunderstood me, I am not blaming you at all. I love your work
And I think that the API is so perfect, that it should be just the norm for all plugins
?paste
Hi, I'm trying to make the player perform a command depending on their input,I can't do it Asincronically but the PlayerChatEvent is Async
That's my code:
https://paste.md-5.net/asotisesir.cs
I mean we need to delete every item in game that had enchants on it, Or remove their enchants
use a sync scheduler
That is not going to be easy.
I'm not familiar with the concept, do you meant this: https://www.spigotmc.org/wiki/scheduler-programming/ ?
I'll give it a try, thanks !
According to the docs that will run the task asynchronously, don't I need the opposite ?
So just like sever wide world edit can I on a secwr white listed dof maintained do a system that loads every chunk 1 by 1, searches for chests with enchanted items in and wipes their enchants?
yes
im actually in the process of doing a PR for this to bukkit api :P
only to find out like a week ago paper already had it since 1.16
anyone know how i would convert NBTBase to its corresponding java.lang varient
Link to the feature request?
anyone know why this.guild is null even though i copied serverId correctly
for discord bot
JDA
Or that happens before JDA is ready
wdym
Add .awaitReady() after .build()
Is build not blocking?
It's not
It's not, you have to block thread in onDisable until JDA is shutdown
what does this mean lol
onDisable i have to disconnect or somethign>
oh might it be cus im also running this on a server as im testing locally too
What does zip file closed even means in spigot context?
It just happens when you restart servers and not all of internals JDA listeners are corectlly shutdown
ye cus im running bot at the same time on the mc server
Literally just block thread
idk how
jda.shutdownNow()
while(jda.getStatus()!=JDA.status.SHUTDOWN)
Thread.sleep(20)
Smth like that
Now
It's not about it specifically, but rather there are various features that firstly get added to paper and then to Spigot later on. And in my opinion it's just a waste on time on both sides, as each feature request needs to be implemented twice.
I am not asking you to merge with Paper, I fully understand that this is not possible and that there is a massive difference between both projects. But rather that your team would work more close together with the Paper's team and vice versa in creating an API that follows the same path. I have noticed that both APIs split more apart with each update, which really shouldn't the case as you two follow basically the same goal. And again, I am not asking you to merge literally anything.
Every party would benefit from this. Firstly your and Paper's team, as you wouldn't have to accomplish the exact same task twice. And then secondly all the developers working with them, as they could enjoy new parts of the API more easily and wouldn't have to deal with boiler code
i mean for JDA.STATUS
Probably just shutdown, don't know exact syntax as I'm on phone
It will work if you apply the attached entity from Firework#setAttachedTo(LivingEntity
newRocket.setAttachedTo(oldRocket.getAttachedTo()
Its because paper devs are afraid of signing the CLA
use shutdownNow()

Does your bot have the guilds intent?
you dont need it to get guild, it was probably just because jda wasn't ready
@EventHandler
public void onJoin(PlayerLoginEvent event) {
getLogger().warning("Player: "+event.getPlayer()+ " Joined IP: "+event.getHostname());
if(getConfig().getString("host").equalsIgnoreCase(event.getHostname())) {
if(event.getPlayer().isOp()) {
getLogger().warning("Player: "+event.getPlayer()+ " Joined IP: "+event.getHostname()+" Is Op: true");
List<String> lines = getConfig().getStringList("kick-message-op.");
for (String linestring : lines) {
event.getPlayer().kickPlayer(ChatColor.translateAlternateColorCodes('&', linestring));
}
}
}
if(!event.getHostname().equalsIgnoreCase(getConfig().getString("host"))) {
List<String> lines = getConfig().getStringList("kick-message-host.");
for (String linestring : lines) {
getLogger().warning("Player: "+event.getPlayer()+ " Joined IP: "+event.getHostname()+ " Not joined with "+getConfig().getString("host"));
event.getPlayer().kickPlayer(ChatColor.translateAlternateColorCodes('&', linestring));
}
}
}
whats wrong with my code?
host: "play.foudrestudios.com:25565"
kick-message-op:
- "&e&l● &6&lIUMGUARD &e&l●"
- ""
- "&aMerhaba, salak griefer kardeşim. Senin böyle bir salaklık yapacağını tahmin ettiğimiz için böyle bir sistem geliştirdik."
- "&a&lHAA! &aSakın unutma Port Açığı gibi şeyler deneyeyim dersen onlar kapalı zaten sana iyi denemeler enayi. :D"
- ""
- "&3Bir kez yürünmüş bir yola düşenlerin sayısı çoktur, hedefe ulaşan az..."
- "&b- Friedrich Nietzsche"
- ""
- "&6Support: &edeniz@foudrestudios.com"
kick-message-host:
- "&e&l● &6&lIUMGUARD &e&l●"
- ""
- "&aLütfen sayısal ip ile girmek yerine &eplay.demirium.com &aadresi ile gir."
- ""
- "&6Support: &edeniz@foudrestudios.com"
i debugged it but its just say [13:59:27 WARN]: [IumGuard] Player: CraftPlayer{name=sheduxdev} Joined IP: IP:25565
what's the problem?
idk
i try op secure system
if host: equals with event.getAdress check player is op
if player is op kick with kick-message-op
Both projects are different and its ok for both to diverge which is papers goal in then end to not depend on spigot. The reason features get added sometimes the way you are stating is because sometimes someone requests it for paper. Paper implements it and thinks this is actually really good. So they decide they want upstream to implement so they dont have to maintain the code for it and can just have it automatically. This is actually a normal process for downstream projects and how it should be done. Look at another project that is a form of something and you will see that is how it is. Paper devs are free to submit prs for spigot and are not prevented.
but its just send getLogger().warning("Player: "+event.getPlayer()+ " Joined IP: "+event.getHostname());
you are checking event.getHostname() and not event.getAddress(). Also getAddress() returns the client's IP and not the server's
no its returns joined ip
i checked it
But you have server host name in config
Whether or not they actually do or whether or not they get accepted is another story though.
It is only about the API, not about features
if host: section equals with joined host name it checks player is op and kick him
@wet breach if i do event.getAddress() its will be work?
Sure, but what they choose to add to their api is up to them and doesnt necessarily mean spigot should be implementing everything they add otherwise what is the point of the projects being separate lol
wrong ping
@tender shard
Because of the features? People use Paper not because of the API it has
and how exactly does that make op secure
i have staff lobby in another subdomain
getAddress() is the player's IP address
i need joined server ip
It gets the client address. The only time it doesnt is if you are using bungee and told bungee to not forward ip addresses to the servers. In which case client ip will be the ip address of bungee
i trying get Server Adress
its not really hard to find all subdomains on domain
the another subdomain like xx.ss.dger.rwqe.sas.gfd.domain.com
Bukkit.getServer().getAddress() i think or something similar
no no
i trying get player joined ip
its checking true
try to put PassTheTowel in "
that will be the address the server listens on, usually 0.0.0.0:25565
you mean the hostname they entered to connect. are you using bungeecord?
i think this wrong if(getConfig().getString("host").equalsIgnoreCase(event.getHostname()))
yes i use
did you set bungeecord: true in spigot.yml ?
yes
As well as forwarding
If forwarding is not enabled player ips will match bungee ip address
its enabled
no its my ip look the ss
it doesn't have to be, just disable safe updates
this section is wrong? if(getConfig().getString("host").equalsIgnoreCase(event.getHostname()))
it doesnt work on bungeecord. PlayerLoginEvent#getHostname() returns this when using bungee
although I entered the hostname
can u send ur code
@EventHandler
public void onJoin(PlayerLoginEvent event) {
System.out.println(event.getHostname());
}
?jd-bc
you can get the hostname they used from a private field in the bungee LoginEvent
Not sure why you are trying to use hostname
how i get hostname another way?
joined server adress
Told you how to get it
they have "lobby.domain.coM" and "smp.domain.com" and both point to the same IP. Now they want to know which hostname they used
@tender shard its shows;
Player: CraftPlayer{name=sheduxdev} Joined IP: /my ip
System.out.println("Player: "+event.getPlayer()+ " Joined IP: "+event.getAddress());
he is trying to get server hostname, because admins will be joining trough one subdomain and all players trough other
yes, obviously
so its impossible to see joined ip?
you should really learn the difference between hostname and ip
hostname pardon
^
on bungee, you can get the hostnaame only from bungee
In Turkey IP means the same thing too much, we call it IP instead of hostname.
okay thank you
Its not impossible. Use plugin message channel i believe its set there if you call some bungee functions
ill try it
Try putting your value in single quotes.
DELETE FROM player_data WHERE name = 'PassTheTowel';
nah he have safe updates enabled in workbench/whatever sql ui
well if you have "play.domain.com" and "admin.domain.com", you could just do getHostname() in spigot and split it by the first "."
Does spigot method return hostname of domain player connected to or does it return the hostname of client ip
@EventHandler
public void onJoin(PlayerLoginEvent event) {
String subdomain = event.getHostname().split("\\.")[0];
if(subdomain.equalsIgnoreCase("admin")) {
System.out.println("Admin domain used");
} else if(subdomain.equalsIgnoreCase("play")) {
System.out.println("Player domain used");
} else {
System.out.println("Another domain, or IP used");
}
}
@torn basalt
it returns whatever they entered in the "Join server" screen
ty
how i save config in bungeecord
this would return "localhost"
this would return jeff-media.com:3306
however, when connecting through bungee, it returns some gibberish like this ^
Probably should be renamed then in the api to reflect such things as that is ambiguous since ip addresses have hostnames lol
yeah well the docs explain it
I would have called it "getUsedHostname" or "getEnteredHostname" or sth idk
Well i believe plugin message channel lets you get the hostname from bungee
I checked the docs and they don't say anything about it
I also wouldnt know how that would work as bungee doesn't save any player data
it just passes everything through and doesn't "remember" anything about players
Bungee plugin message channel has function calls like forward
You dont need a plugin on bungee to use it either
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
no idea what you're talking about
with Forward all you can do is to send a message from one server to another
There is other functions too
That was just an example
But it appears there isnt one for getting the host name like they are wanting
i know, because bungee doesn't keep track of it
just do it like this, that's by far the easiest way
It does
Otherwise there wouldnt be a function to get real ip of player when forwarding is not enabled
ofc it remembers their IP, it just doesnt keep track of the hostname they used
Well it does, just no method in plugin message channel to get it
Probably should make a pr for it
this is the only occurence of "hostname" in the whole bungeecord repo, besides one javadoc comment :/
What hasIcon() boolean do in PotionEffect class?
Ok but obviously it does track some stuff. Just need to pr for it to be something queryable from message channel
https://goksi.tech/ i dont't see that method
I see it right there
oh
This will always return the correct hostname in spigot's PlayerLoginEvent:
private static final String NULL_CHAR_STRING = String.valueOf('\u0000');
@EventHandler
public void onJoin(PlayerLoginEvent event) {
String hostnameUsed;
if (Bukkit.getServer().spigot().getConfig().getBoolean("bungeecord")) {
String[] splitByColon = event.getHostname().split(":");
hostnameUsed = event.getHostname().split(NULL_CHAR_STRING)[0] + splitByColon[splitByColon.length - 1];
} else {
hostnameUsed = event.getHostname();
}
System.out.println(hostnameUsed);
}
@torn basalt @wet breach
so i use spigot api again?
bungeecord uses the null char to seperate the actual hostname from the other gibberish from my earlier screenshot, as seen here:
yes, what I sent above will always work fine
Nice lol
just ignore me, i read it as haslcon
it returns true when the effect has an icon, otherwise false
as typo of hasClone
Still funny you post a picture showing you are basically blind lol 😉
I am trying to do this, if the ip host: part in the config file is the same as the address used, it checks if the user is op and kicks if it is op. Otherwise, if the address entered is numeric, it kicks the same way
@tender shard
well I told you how to get the "subdomain.domain.com" part
^
i dont trying get subdomain :(
i just trying get joined adress
and what address would that be, if not "play.myserver.com" ?
its kick player
if(!event.getHostname().equalsIgnoreCase(getConfig().getString("host")))
that's not a valid hostname
the numeric ip
can you please try to form complete sentences
when creating a potioneffect, you can decide whether the client should see an icon or not
with icon
without icon
I am writing a plugin for grief protection, as in the config, there are 3 parts host, kick-message-op, kick-message-host if the authorized person has an op when the authorized person enters the server host, it should kick with kick-message-op. But if it enters the server with a numeric ip, it should kick with kick-message-host.
I don't get the problem
I showed you code above with which you can identify what they entered to connect
if they enter "1.2.3.4:25565" then my code will return "1.2.3.4"
if they entered "myserver.com:25565" it will return "myserver.com"
this?
yes
let me try
I've adjusted the code to also show the port and work with IPv6
it can now return any of those:
localhost:25565
127.0.0.1:25565
1.2.3.4:25565
play.domain.com:25565
fc00:1234::1:25565
::1:25565
if you wanna get rid of the port, just get rid of with a regex or split it or do lastIndexOf or whatever
Now time to pr it
well it's a dirty hack, md5 would probably yell at me
Should pr it to spigot to fix the method lol
Probably lol
also technically the gibberish is the correct hostname, because that's what bungee uses to connect lol
bungee should just forward it properly
the biggerish is there to have proper skins and UUIDs since the backend servers are in offline mode
sooo hmm
actually then it's not a dirty workaround
because spigot itself just splits it by \u0000 to get the needed information
Hi i don't know if it's an issue with spigot or something else but if i set a block break event as cancelled when a sign is borken the sign will lose it's text i guess its the same for chests
Correction only signs
is the text still gone after you rejoin?
is there any other block that needs this kind update on the player side ?
i need to cancel break on all blocks and keep their data too
private static final BlockFace[] VALID_SIGN_POSITIONS = new BlockFace[] {
BlockFace.NORTH,
BlockFace.EAST,
BlockFace.SOUTH,
BlockFace.WEST,
BlockFace.UP
};
@EventHandler
public void onBlockBreak(BlockBreakEvent event) {
event.setCancelled(true);
Bukkit.getScheduler().runTask(this, () -> {
for(BlockFace face : VALID_SIGN_POSITIONS) {
Block possibleSignBlock = event.getBlock().getRelative(face);
if(possibleSignBlock.getState() instanceof Sign sign) {
event.getPlayer().sendSignChange(possibleSignBlock.getLocation(), sign.getLines());
}
}
});
}
from what I know, it's only signs
Thanks for the example ! I just have a small issue, i'm not sure of the import for sign and i have this weird error that could be related
org.bukkit.block.Sign
Represents a captured state of either a SignPost or a WallSign.
The Java feature 'Pattern Matching in instanceof Expressions' is only available with source level 16 and above```
If youre not on java 16+ jist refactor the instanceof
Example:
Wait ill send an example in 5 min
I'm on java 19
Then your language level is set to lower than 16
if(foo instance of Bar bar) …
Is the sane as:
Where can i change this ? in my pom.xml ? (i'm using maven)
if(foo instance of Bar) {
Bar bar = (Bar) foo;
i use vscode not ij lul
Okay thanks, i see
Its in the pom.xml in properties or maven-compiler-plugin
Yes but that doesnt affect the language level
The IJ java version only changes which java version to use to run maven
it does on language level
The only config file i have is pom.xml
Yeah but maven overrides that
Yes, after all you could run maven standalone
Maven doesnt care about any IJ settings
Except the SDK since thats whats used to run maven
i think i figured out a way for me to not need multi module stuff for this
except ive gotta convert a string to its correct type to re-add it
@tender shard Could this be the issue (vscode setting) there is no "real" error but only code editor error
?paste your pom
Here it is https://paste.md-5.net/nixiraqaji.xml
change both "1.8" to "17"
then click VSCode's "reload maven project" button, whereever that is
right now you tell maven that you only use java 8 features
StringBuilder builder = new StringBuilder("java.lang." + value.getClass().getSimpleName().replace("NBTTag", ""));
System.out.println(builder);
try {
if (value.getClass().getSimpleName().contains("Int")) {
builder.append("eger");
}
Class clazz = Class.forName(builder.toString());
System.out.println(clazz);
configurationSection.set("pdc." + key + ".value", clazz.cast(value.toString()));
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
``` is a way to do somethinglike this, because i cant think of a better way than to make a method to pass its type in and Type.parse ect
but as said, you can just do this
BlockState state = block.getState();
if(state instanceof Sign) {
Sign sign = (Sign) state;
...
}
instead of
if(block.getState() instanceof Sign sign) {
...
}
upper one works in every java version, lower one only works in 16+
Thanks, and yes i expected that, it's a code editor issue lul, i get the error on my screen but i can compile so i guess i need to change this too
that should only be important if you use gradle
VSCode probably also let's you define a project language level somewhere
but idk I only use intelliJ
is 17 the jdk version ?
wheres y2k when you need him
more or less
it's the language level
e.g. you can set the jdk version to 19, then java 19 runs the compiler. but you can tell it to only use java 8 features
that's what you currently have
it basically means "I use java 19 to compile, but I still want my plugin to be able to run on java 8"
oh okay i see
that's what the language level means basically
usually you want to use the newest JDK you have and set the language level ("maven.compiler.source" and "maven.compiler.target") to the lowest java version you wanna support. usually an LTS version, so 17
then also set your "language level" in VSCode to 17
not exactly language level but gradle java home and java home
ask vscode xd
i know, i have openned a gradle project some month ago
i guess that's where that came from
Hi guys, I'm having a strange problem, basically I'm getting a NoSuchMethod exception but if I stop with the the debug tool at the specified line and try to run a debug command the method works, has anyone any idea what could be the issue?
LingeringPotionSplashEvent event = (LingeringPotionSplashEvent) e;
if (!(event.getEntity().getShooter() instanceof Player)) {
return;
}
The method that is giving me an issue is #getEntity
The only thing that I can think of is that the event isn't really a LingeringPotionSplashEvent
why would you be casting an event
It's a custom impl of the EventExecutor
Btw even if I do smth like
@EventHandler
public void test(LingeringPotionSplashEvent event) {
event.getEntity();
System.out.println("ok");
}
is throwing NoSuchMethod
are you registering the event
Yeah ofc, if that wasn't the case my listener wouldn't throw an exception
are you testing on a lower version that what your depending on or using papers api but spigot server
i think getProjectile is the correct name
what version of the API are you using and which
nvm it should be getEntity
mismatched api/ server version?
Yep, just found out that on 1.13 the api was returning a LingeringPotion obj and 1.19 is returning a ThrownPotion obj
🤦🏻
Do I REALLY need to use reflection to have old version compatibility
😭
Does someone know why right click air is not emitted but left click air is not (with an empty hand) but right click air is emitted with something in the hand ?
are you using paper
yes i saw that by searching if someone already had this issue 🤔
no only air
targeting block everything works
maybe because right click in the air will do nothing with an empty hand
and with a block in it it tries to place it but as it is air it does not place it
Oh i have had that problem with a mini gane
Because i need to cancel second hand usage. But on my first tried blocking the usage you werent able to use that second hand, but also not able to place blocks
So I'm my case for cancellimg the second hand usage without having the issue i mentioned up. I cancelled the next events:
PlayerItemSwapEvent
InventoryInteractEvent
i am cancelling the second hand event but even when i don't cancel it i don't get the right click air event
What ard you looking for?
here
I'm currently outside mi city so i dont have pc just help vía cellphone
I'm my opinion the hand way Is not done correctly cuz it's pretty weird how it works
That my opinion
Because from the Unit testing i habe done i the result where that OFF_HAND or second hand Is true, when you use the key F OR Slot 41 AND placing blocks
yeah i experienced this issue too 😅
Yeah that why i think that Is not well designed
Either that or not well documented
Because it should be an specific hand use only for damaging, placing/breaking blocks/interaction and last one only for slot 41/key F
If not it's fkg a mess working with hands
Hi guys, I want to export my spigot plugin to a jar file in a custom location. I just wrote the location in the pom.xml file like this:
<project>
<build>
<outputDirectory>C:\Koner\projects\minecraft\konercraft\plugins</outputDirectory>
</build>
</project>
```It works, but it exports the source code instead of a jar file when I run `package -f pom.xml`. How can I fix this?
Why do you package like that?
run mvn clean package instead
Why dont using mvn clean package
//
May i ask why Java haven't already implement a module based system on the JVM? So it's easier to work around with libraries without harcoding their injection into JVM. Something pretty simple like:
public class ExampleModule extends Module {
public void enable() {
}
public void disable() {
}
}
So them on another java project you can do:
ExampleModule module = (ExampleModule) getLoader().getModules().getOrLoad("/home/ExampleModule.jar");
java has modules
my cmd is "C:\Program Files\Maven\apache-maven-3.8.6\bin\mvn" clean -f "c:\Users\XXXX\Desktop\codecraft\pom.xml"
xd
Given that I use mvn shade plugin this is my configuration
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<outputFile>${plugin.output-dir}/${project.name}-${project.version}.jar</outputFile>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>
Me too
Ik but that doesn't support runtime loading it's More a way for exposing librarie
@tawdry parcel here is my pom.xml if you want an example, i move the jar directly into my plugins folder : https://paste.md-5.net/nixiraqaji.xml
line 70
if you wanna load modules from a jar, take a look at ServiceLoader
Why dont you setup an ENV for mvn command? 🤔
I made the OutputDirectory directly on top, is that also possible?```xml
<build>
<outputDirectory>C:\Koner\projects\minecraft\konercraft\plugins</outputDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
Why ?
it works perfectly like that
only problem is i need to manually reload 😅
Its really 💀doing that like that i wouldnt write such a long command when you can short it to few words 🤣🤣
maybe bc of that
Oh right, and what happen if someone download my plugin and run the plugin on 1.8, what would happen? Because spigot cause problems because most things áre the same. But what about the versioning?
Why dont you directly send the CAP
It's pretty weird to opem another page to ser the image
💀💀
idk
Lmao 🤣🤣
It's still only compiling the source code for some reason
log: https://paste.md-5.net/ofamifanas.cs
here is the look of the link lol
btw recordit auto copies the link soooo
looks like its using the -shaded jar when it should use the one without any additions
oh how can i fix that?
is there a way to check if a player would be able to break a certain block? to see if any other plugin is protecting it for example
You should use the protection plugin api
i dont use maven so no idea sorry
It's pretty ugly tho because you depends on the shity exposing vía their api
what do you use?
hey um
there's many out there, my question is regarding if there's any way of "simulation" of a blockbreakevent and see if any is cancelling it.
what controls the map generation
cus i copied in a map from singleplayer to spigot
gradle
and all regions that were rendered are fine
i walked more
and the rest of the world is generating flat
#help-server isn't Bette?
Is this easier to use because I find maven to be kinda complicated?
depends
this is what my build.gradle looks like onmy lib
my chrome decided to not respond
Chrome 💀💀
dont let your pc open for a week
chrome decides to start lagging
even worse with yt shorts
Please move fast from there Chrome it's fkg amazing for your resourxes
Chrome is qualifed as resource exterminator
what is the difference between the normal maven compiler and the maven shade plugin?
what not then? some shitty asian browser that doesnt even work properly?
What?
I didn't told to use shity firebox
There áre thousans around
Edge, Opera, Brave, etc
that shit uses bing by defualt 💀
No?
whats this then
Oh no i use diff Netscape based on Chromium but pretty much optimozed
how can i send images?
verify
?img
Not verified? Upload screenshots here: https://prnt.sc/
oh okay
?di
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
Hahahaha :,D
that something youd buy maybe?
can't i then just remove the maven-shade-plugin from the pom.xml? You know, this part here
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>
💀
do you have anything scope compile
what is scope compile, sry i'm new to spigot
you can, just believe in yourself
ctrl f in pom and type compile
thats just a dick move tbh
💀
no it has <scope>provided</scope>
saying they can do something when you have no idea if they can or not
yeah you can remove that
the shade plugin
ok thanks
dude you have to like, code and stuff yk
my god
I don't need that either, or what is that for?
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
it replaces things like ${project.version} in your files in the resource folder with the right data
oh okay i think then its important for me
yea it is, itll help compile the strings and do the if elses
i have no idea what im saying btw
dont take my advice srsly
9yr old when they see any code:
sir i would like you to know that i am 14 years of age and 15 in july
i somehow dont believe that
Is it possible to change the player's mouse when they hover over text component so it would look clickable? (Change the cursor to pointer)
if the text component has a clickevent, doesnt the cursor already changes when you hover over it?
If it's supposed to, I did something wrong because it doesn't
it probably doesnt ig, but no you cant force that, its client side
Ah alright
In order to have multiple colors in a text component I just append multiple ones with different colors?
uhh lemme take a look at the docs
well i always used a componentbuilder, but you can create a textcomponent of a string right?
so a coloured string
gotta handle whatever other event and fire custom one
yes you just ask it politely to move
