#help-development
1 messages ยท Page 144 of 1
then you're probably returning from the condition before
Add a debug message before returning and see if it runs through
agh help pls
?paste
paste teh full log as your snippet shows no actual error
what
oh looks like you have a corrupt file in your local maven
h-how to fix
delete the 1.12.2 folder C:\Users\Nurisantoso\.m2\repository\org\bukkit\craftbukkit\1.12.2-R0.1-SNAPSHOT
bc i have wait buildtools for 20+ minute to run bruh
delete the folder ^ and run buildtools again.
this folder?
if that is the folder I linked then yes
You shouldn't need to.
Ok
just run buildtools again
It can help to remove the old BuildTools files
yeah done, now i just need to wait 20+ minutes
you could probably just run mvn install but I can;t remember the full command
Silly question to ask at this point. Are you using 1.12.2 NMS?
Yay 3 minutes left of backing up my 4 TB of data on my NAS
what NMS
I guess not then
ok
Hello How can I do a command clickable message pls I try with TextComponent but I cannot create a new TextComponent
ah still same error
What happens when you try to create the text component?
@eternal oxide still same error
Ok now send the full log
same error with buildtools?
yes
Then paste full log
wait
Use the component builder from spigot. If you use adventure then the approach is completely different.
this https://paste.md-5.net/aqadilabeq.cs @eternal oxide
Okay but I dont found the method of Spigot. I use Mohist server
Mohist ๐
wtf is Mohist?
A bad Forge + Spigot hybrid with security issues
Try
Component message = Component.text("");
If you have those methods then i have some extensive docs for you...
tthis my full logs
That's not work
I dont find the method of Bukkit or paper
looking, but I see no reason for your error
AzureAD+Nurisantoso@PUTRA MINGW64 /e/BuildTools
$ mvn
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.408 s
[INFO] Finished at: 2022-09-21T18:54:45+07:00
[INFO] ------------------------------------------------------------------------
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException
I have to say, I've never seen your error before
TextComponent message = new TextComponent("Click me");
message.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "some command") );
message.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("Goto the Spigot website!").create()));
player.spigot().sendMessage(message );
i type mvn and that happened
So you didnt provide any goals and then wondered why it complains about you not specifying any goals? Mysterious.
;/
Whats his plan? Didnt follow. This looks like he is trying to compile BuildTools for some reason.
https://paste.md-5.net/aqadilabeq.cs building 1.12.2
What's the full command that he ran initially?
his command is fine just java -jar buildtools.jar --rev 1.12.2
Delete everything besides the BuildTools.jar
There might be fragments of newer versions interfering
and its --rev
Error: 'TextComponent(java.lang.String)' is not public in 'java.awt.TextComponent'. Cannot be accessed from outside package
already had him do that
even had him move it off his desktop
still throws that error
same error every time
Wrong TextComponent. awt is useless to you.
I've never seen his issue before. Never even mentioned
hm
Yes but there is not import for TextCompenent which comes from Bukkit
or Paper
Look you PM @lost matrix
Maybe he should clear his local 1.12 maven repos?
net.md_5.bungee.api.chat.TextComponent;
did that, Had him delete teh folder
um one sec
it was a different file last time
it was the 1.12.2 folder
Which ones? The entire .m2? Or only the craftbukkit folder?
craftbukkit
He is not exist..
Yes, this is a slightly different error
Well then you are not using the spigot api
First error [ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-install) on project craftbukkit: Failed to install metadata org.bukkit:craftbukkit:1.12.2-R0.1-SNAPSHOT/maven-metadata.xml: Could not parse metadata C:\Users\Nurisantoso\.m2\repository\org\bukkit\craftbukkit\1.12.2-R0.1-SNAPSHOT\maven-metadata-local.xml: only whitespace content allowed before start tag and not \u0 (position: START_DOCUMENT seen \u0... @1:1) -> [Help 1]
Second error [ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-install) on project craftbukkit: Failed to install metadata org.bukkit:craftbukkit/maven-metadata.xml: Could not parse metadata C:\Users\Nurisantoso\.m2\repository\org\bukkit\craftbukkit\maven-metadata-local.xml: only whitespace content allowed before start tag and not \u0 (position: START_DOCUMENT seen \u0... @1:1) -> [Help 1]
same cause different files
first error is this
Interesting. Try using git bash instead of the normal terminal.
he is using git bash
Then use the normal terminal ๐
๐
still same ๐
already
skill issue
first delete the folder C:\Users\Nurisantoso\.m2\repository\org\bukkit
Windows 10
bukkit folder?
yes, clean it all out so nothign is old
and run in command prompt not git bash
yep, start everything clean
Oke
You shouldn't need to in this case.
Best to be safe as nothing else has worked ๐
oh my, I just took 5 days backing up my NAS due to a failed drive (bought a full replacement set) updated and rebooted it and the dead drive sprang to life ๐ฆ
F
Lol. At least you now have spares at the ready.
Yep, not a lot of use for 5 x 3 TB drives now though. Upgrading to 5 x 6TB
Can;t put them in my PC either as I'm all SSD other than an Archive drive
F
very F
never used it, nice guide
learning from random discussion is nice
btw now when you mention it, there is no way to copy some text with click event on component ?
just SUGGEST_COMMAND ig ?
I'm pretty sure there is a COPY_TO_CLIPBOARD enum.
response -> resource -> id
Display the result in json format. Makes it more clear.
Its giving org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1] error
pipe the stream into a String and print it. I personally would always use the httpclient from java 11 for rest requests
There are several ways. I would go over PlayerInventory
umm you just code it wrong then
would it be possible to make it so whenever a player types a message, I automatically send message in chat as well. Contents don't matter rn I'll modify it.
But I don't want a plugin, ik how to make it, could I modify it in my client, so I'm playing on random servers and when someone chats I chat
do I need to make a whole new client for this?
slash launcher
Make a mod?
You need client modifications for that
could you elaborate?
client modification = A modification of the client
lol
In theory you could also do packet sniffing and write a 3rd party application which sends back chat packets
Hello, I want to create a world whenever the server starts, in case this world already exists, I want to replace it with a new one, can anyone help? any documentation?
?jd
just mixin into the chat box add event and get the text lmfao
well tbf the client has 0 clue about the sender
it only knows the message
so like
<IkeVoodoo> hey
that's the message
and it has to parse to figure out who sent it
Creating a world:
WorldCreator creator = new WorldCreator("worldname");
Bukkit.createWorld(creator);
WorldCreator also has a bunch of parameters you can tweak.
Some inspiration for checking if a folder exists and removing a directory recursively
public boolean worldFolderExists(String worldName) {
return new File(Bukkit.getWorldContainer(), worldName).exists();
}
public void removeWorldFolder(String worldName) throws IOException {
deleteDirectory(new File(Bukkit.getWorldContainer(), worldName));
}
private void deleteDirectory(File directoryToBeDeleted) {
File[] allContents = directoryToBeDeleted.listFiles();
if (allContents != null) {
for (File file : allContents) {
deleteDirectory(file);
}
}
directoryToBeDeleted.delete();
}
how can I get the last damager of a player if they fall into the void?
Well, the last damager would be the void ๐
they probs meant the last human damager
I mean the last player, that damaged the player
That value might be null though because Minecraft only tracks the last player damager for up to (10?) seconds
the killer could be null
yep
and also zombies
zombies result in null
so do mobs
Yeah because it would be the last damager
only players are tracked in that method
I used Objects.requireNonNull(player.getKiller()).getInventory().addItem(giveThisOnPlayerKill);
in the PlayerDeathEvent but it doesnt work, any idea why? (giveThisOnPlayerKill is an Itemstack)
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
it just doesnt do anything. Doesnt return anything, neither does it leave any logs in console.
Is the listener registered? Did you add the EventHandler annotation?
yeah
(also remove the Objects#equireNonNull(), it doesn't do what you think it does)
Just do a proper null check
if I check if the killer is online, would that be a proper null check?
it suppresses the IDE warning and that's all we care about
No. This is a check if the player is online. Not a null check.
Loool so true
I am getting JSONObject["response.resource.id"] not found. ._.
What nbt tag do you want to check for?
Did you print out the full response already?
I'm going to guess your request doesn;t account for redirects
Thats why i would just use javas httpclient
Instead of opening a random stream on an url
ItemStack#hasItemMeta()
Anyone who has a DataManager/FileManager class with everything normal config has like customConfig#set customConfig#contains
etc
?configs
See this wiki page on how to use custom configuration files: https://www.spigotmc.org/wiki/config-files/
Hello! I made a spigot 1.18.2 plugin which works perfectly on my spigot server. But when I put it on my friends Bungeecord Paper Server also 1.18.2 everything works aswell except one method which is only doing some for loops to check if there is a block or not.... Anyone know what the problem could be?
Neutrons from the sun randomly flipping bytes
okay thank you I will look at that
thats the method: https://gist.github.com/ItzJustNico/693e809020e408bb0e7b2144c20eb888
Hello
Nothing in here is paper specific. We need more infos like stack traces
There is nothing in there which would break on paper
Bro I open spigot and error is coming how to solve
Bro. Really? If the error is big then you might have to do some stuff man...
xD
How can I obfuscate a plug-in?
I don't need any moral advice
Dont. Not worth it. We had this discussion several times already.
whats stack traces how do i get them
I can send my error photo in dicord
Okay, thank you
I'm going to guess that your "friends" server uses a different main world name.
ElgarL is my dad
cap
nocap
no cap
also why
if something can be obfuscated, it can be deobfuscated owo
hmm okay thank you i am gonna check taht
It's hard to deobf
an hello world plug-in
If you need the "main" world then its safer to call Bukkit.getWorlds().get(0)
Sure
?paste
https://paste.md-5.net/caxicudoxo.cpp
Apparently sometimes players get connected to the new server after 2 seconds, other times, they have to wait 10 seconds, other times 20s
Sometimes instantly
This is after a slot in the destination server is free
What would be a not "main" world? Every server only has one right? Even on bungeecord?
One more thing:
location.getBlock().getType() != Material.AIR
should be
!location.getBlock().getType().isAir()
Because there are several types of air now.
oh okay thank you
Bungeecord has no worlds. Its just a proxy to forward packets and has no notion of the actual game.
I could fix the world problem through passing a player in the method and getting the world from the player because its always the right one then right?
Did you track how often your loop is executed?
Debug the time in ms it takes between each run() execution.
hint:
those are the problem
public int getMaxPlayers(String server) {
try {
AtomicInteger max = new AtomicInteger(-1);
CountDownLatch latch = new CountDownLatch(1);
ProxyServer.getInstance().getServerInfo(server).ping(((result, error) -> {
if (error == null) {
max.set(result.getPlayers().getMax());
}
latch.countDown();
}));
latch.await();
return max.get();
} catch (InterruptedException e) {
e.printStackTrace();
}
return 0;
}```
Idk how to fix
You pass Two Locations to the method,. just get teh world from that.
You dont need to. You are already passing two Locations to the method. And those Locations already have a World.
Oh didnt think of that thank you
Whats erroneous about this method?
CountDownLatch latch = new CountDownLatch(1);
I believe that, the ping action, takes a longer delay sometimes
for returning a response
Yes thats the nature of a ping. Thats why you have to pass a callback because the ping might take some time.
Nothing
So, any queue plug-in has the same problem?
There are a ton of approaches to this like caching the amount or tracking the connected players manually.
Nope
Ive written a queue plugin with instant responses. It was event driven and backed by redis topics.
hoW
Have a Queue of connections. When a player leaves -> poll the queue and connect the next player.
You can use a PriorityQueue and even force an ordering so you can support premium queues.
Or just a simple ArrayDequeue. First come, first serve.
I'm using a private final Map<String, LinkedList<ProxiedPlayer>> queues;
in a PlayerDisconnectEvent?
Ah yes. The LinkedList. The worst possible Dequeue. (But should work)
:c why
This is not my exact code
but i have something like this
``
String materialName = args[0].toUpperCase();
try {
if (location.getBlock().getType().equals(Material.getMaterial(materialName))) {
// code here to use material
}
}catch (IllegalStateException e)
{
player.sendMessage("ยงcYou have to input a invalid material!");
return true;
}
``
and I still get a IllegalStateException error
whats an ArrayDequeue
Print the exception
does it exists?
What changes between the two?
Why should I use it instead of LinkedList?
I'm not understanding this
Dont worry. Doesnt matter for you.
wdym
You can take that quite literally. Do not worry. It does not really matter if you use a LinkedList or an ArrayDequeue in your case.
even if I print the exception I still get
Caused by: java.lang.IllegalArgumentException: No enum constant org.bukkit.Material.DA
Well "DA" is not a Material, is it?
DA is not a material
but thats what im trying to catch
but it doesnt catch the error, and then sends me an internal error in console saying the thing im trying to catch
And thats what you are catching
Going back to before, can I then maintain an estimate of the actualOnlinePlayer per server through the eventhandler? Right?
Ah you catch the wrong exception
You are getting a different exception then what you are trying to catch
sure
thx
im using IllegalStateException e
and the error
Caused by: java.lang.IllegalArgumentException: No enum constant org.bukkit.Material.DA
I might be stupid, but I thought those are the same, where can i read up on all the exceptions to learn better
Java - Built-in Exceptions, This Java tutorial covers basic to advanced concepts related to Java Programming including What is Java, Java Environment Setup, Java Objects and Classes, Datatypes, Variable Types, Modifiers, Operators, Loops, Decision Making Statements, Date, Time, Regular Expressions, Files, I/O, Exceptions, Inheritance, Overridin...
thank you
oh i see LMAO
state expection
argument exception
very stupid mistake
.
Thank you everyone for the assistance
what's playeronjoin event equivalent in bungee?
how can i get a key from a value?
Are you speaking about maps?
yes
BiMap
Uhm I don't think maps provide that function but BiMaps do usual included in Google java api which is provided to you through spigot
I asked the wrong thing, i wanted to say how can i get a HashMap key
Get the keyset
And filter
In theory there could be several keys which correspond to a value.
But if the 1 to 1 contract is bidirectional then you can either use a BiMap
from Guava, use a second Map or store the key inside the value.
what is a bimap
thakns
google, okay, im sorry guys
public Counter(final HQueue plugin) {
for(String server : ProxyServer.getInstance().getServers().keySet()) {
server = server.toLowerCase();
if(plugin.getConfigs().getConfig().getString("servers." + server + ".max-player") == null) {
plugin.getConfigs().getConfig().set("servers." + server + ".max-player", 100);
plugin.getConfigs().saveConfig();
plugin.getMaxPlayerCount().put(server, plugin.getConfigs().getConfig().getInt("servers." + server + ".max-player"));
continue;
}
if(plugin.getConfigs().getConfig().getString("servers." + server + ".join-permission") == null) {
plugin.getConfigs().getConfig().set("servers." + server + ".join-permission", "hqueue.join." + server);
plugin.getConfigs().saveConfig();
plugin.getJoinPermission().put(server, plugin.getConfigs().getConfig().getString("servers." + server + ".join-permission"));
continue;
}
plugin.getJoinPermission().put(server, plugin.getConfigs().getConfig().getString("servers." + server + ".join-permission"));
plugin.getMaxPlayerCount().put(server, plugin.getConfigs().getConfig().getInt("servers." + server + ".max-player"));
}```
Doesn't saves into the settings.yml file, could you help me?
```java
public void saveConfig() {
try {
ConfigurationProvider.getProvider(YamlConfiguration.class).save(config, new File(plugin.getDataFolder(), "settings.yml"));
} catch (IOException e) {
e.printStackTrace();
}
}```
please fourteen
I believe in you pal
How can i get only the text, test from a HashMap keySet and not [test]?
Maybe String.join?

what are you doing to get [test]
You mean your KeySet contains Strings in the format "[data]" and you want to only get the "data" part?
yes
Why do you store the Strings in this format?
yoo guys, at the first strange thing you all reply, to me you didn't even put a reaction to the message :C
He's probably not. He's getting the KeySet and sysout. It will show as that
because i need it for a playerdata where it saves like:
gangs:
gangname:
....
and i need to add a new path to the gang
if he has a single entry
https://pastebin.com/QdtC3X1V
I am getting a nullpointerexception in the addPriceToLore method in my ShopItems enum here.
Where it attempts to get the shop on line 393
I do not understand how this value could possibly be null, as if you check the enum it specifies the shop it's supposed to be getting for each item.
(ex. GOLDEN_APPLE) is what it is trying to get when I get this error.
Does anyone know why it would do that in this case?
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.
are you storing the gang name as key?
well if you inly want one item in a set or array or list, you just use .get(i)
where i is the index of the item, in this case probably 0
It is for a invite command where i need to get the gang name of who invited the player
Just for the record, Sets aren't random accessible so there is no get(int)
If the ItemStack had no lore before then ItemMeta#getLore() doesnt return an empty list but null.
if (gangInvite.containsValue(player.getUniqueId())) {
String gang = String.valueOf(gangInvite.keySet());
RPGangs.getInstance().addGangMember(gang, player.getUniqueId());
player.sendMessage("ยง4ยงlGANGS ยง8ยป ยง7Ti sei unito alla ยงc" + gang + "ยง7!");```
right now is like this
It's not trying to get the lore, it's trying to add lore using some text i've configured in the enum
in this case, it is trying to get the currency display name from the shop, but it believes the shop is null
even though it is specified in the enum
And in order to add lore you need to do what first?
so whats the problem....
BadString gang = String.valueOf(gangInvite.keySet());
it gets the gang name with the format [gangName] and i don' t know how to remove the []
as I said, you are toString on a KeySet
I know the error is because it's saying the shop is null. I tried to print out the values as a debug, and it says the shop is null each and every time even though it shouldn't be. Since it is directly specified in the enum for which item it's trying to create
Send the stack trace
You are calling toString() on the Keyset which gives you [] around the keys
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.
How can i fix it?
read the keys properly
As you can see every System.out.println() before it works fine.
But as soon as it tries to print the shop debug, it has an error
I don't know how
you either iterate the keys or you read a specific key
item.getShop() returns null
I know that. That's what ive been saying
It should not return null
It is directly specified in the enum for the item
that's what ive been asking the whole time, if anyone would know why that could be
Is Shops and enum? @dusk scroll
Yes, Shops is an enum
I can send that too if you want
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.
is that not allowed?
i never got any error for that before
What it is doing is
When I click on the menu item to open that shop menu
Let me think how enums are initialized
It is basically looping through all the shop items to add them to the gui
The reason it is referencing back to the shop in this case, is to get the currency display name to put in the price of the item
is the GOLD one the only one that doesnt work?
I only implemented GOLD and DIAMOND into the inventoryclickevent for testing. Neither one works.
For the same reason
and how is createItem called?
Using enums for this is really a horrible design choice. But i can only speculate that you are dealing with a initialisation problem.
I asume you dont get a nullpointer because of the item.getDisplayName aswell right before addPriceToLore call right?
No, the item displayname works fine
as you can see in the error it prints it out before the error
where it tries to print out the shop as well (was debugging to see what was null and that's how i narrowed it down)
createItem gets called when the GUI is being created. it takes the information for the item from the enum to create an item with the material, displayname, enchants, etc as configured, and even adds the existing lore, then it will call addPriceToLore() to add the price onto the existing lore and then return the new lore so the item can be created
Wait is your method called in the constructor of your enum?
No
All those methods are outside the constructor
it might still be a circular reference though
Im also leaning towards this
because the ShopItems constructor constructs the enum value for Shops, but in that enum constructor you call the ShopItems Item
System.out.println(item.displayName);
System.out.println(item.getShop());
So this prints
"Golden Apple"
"null"
correct
this seems like a design flaw
why does the item need to know the shop it came from
shouldnt just the shops knowing what items they have be enough for everything?
Yeah its almost certainly a problem with two enums referencing each other
possibly
i think i had some reason but i don't remember it TBH, I did all of this last night ๐
I'll have it provide the shop it's looping through in the method
maybe that will fix it
lol that worked ๐
now ive just gotta change the order of the items and add the interaction back
(im reworking the shop system, previously it was hardcoded into a listener which was pretty trash but now with that at least it's configurable through the enum ๐)
Map<Integer, Consumer<InvClickEvent>>?
Everything else is fundamentally inferior
best thing
Urgh that texture pack
why do you hate it?
just spitballing for a second, but i'm thinking about trying to untangle the game code a little w.r.t threading
for the inventory?
I despise that I have to use my old username here lmao
i mean yeah that's what it's for
makes sense
anyway, game only uses the one sync thread for gameplay shit, then an async for chat, yeah?
Yes chat is handled async
aye
*mostly
guessing that "mostly" has to do with stuff like hover components
but that's a conjecture lmao
and a very raw one at that
anyway, asking since I've got a pretty chunky plugin and while I haven't properly stress-tested it yet, I'm considering ways to reduce or distribute CPU load
aside from cutting down the regular old asymptotic runtimes I mean
So I have this function which is supposed to transfer skull item into skull with custom texture:
public static ItemStack getHead(ItemStack item, String url, UUID uuid) {
try {
SkullMeta headMeta = (SkullMeta) item.getItemMeta();
GameProfile profile = new GameProfile(uuid, null);
Property property = new Property("textures", Base64Coder.decodeString(url));
profile.getProperties().put("textures", property);
try {
Field profileField = headMeta.getClass().getDeclaredField("profile");
profileField.setAccessible(true);
profileField.set(headMeta, profile);
} catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e) {
e.printStackTrace();
}
item.setItemMeta(headMeta);
} catch (Exception ex) {
ex.printStackTrace();
}
return item;
}```
However it always returns normal steve head
Here's the URL: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWQyZDM2NzQ3YmMzZTJjMzdkOTFmYWZlYjU2MjhjZDg4N2ZjZjU0ZWVkNDllY2Y3ZGRjNTRkMjAzMzYzMzNmMCJ9fX0=
since obviously not everything will work in async
The way I usually see more intensive shit like dungeons/raids handled is honestly just through BungeeCord lmao, as in "let's just have a separate server process that hosts this other world"
currently doing data writes async because with large player counts, you're saving a shitload of data every 5 minutes or however long the autosave interval is, and that eliminated the hiccup from saving
and there's not really a need to do it sync
?paste
Try that https://paste.md-5.net/ocesiwayad.cs
but I was thinking more uh
and this is obviously complex, I just spent 6 weeks working on something similar for work
basically dynamically partitioning the world based on player density lmao
Dont use reflections for that. Spigot has a profile api now.
then distributing computation load across multiple sync threads
1.8 btw
thanks, will do
?1.8
Too old! (Click the link to get the exact time)
It's sort of a worst-case optimization, like the plugin runs fine rn, but I've never seen it with like 1k people online at once lmao
So you forked spigot?
Nah but definitely considering it
for this exact reason, actually
I'm so tired of people ragging on people for using 1.8 when more players use it and so do the most popular servers in the game ๐
I have a solution that might work for you
ItemStack head = new ItemStack(Material.SKULL_ITEM, 1, (short) 3);
if (url.isEmpty())
return head;
SkullMeta headMeta = (SkullMeta) head.getItemMeta();
headMeta.setDisplayName(ChatColor.translateAlternateColorCodes('&', name));
GameProfile profile = new GameProfile(UUID.randomUUID(), null);
byte[] encodedData = Base64.getEncoder()
.encode((String.format("{textures:{SKIN:{url:\"%s\"}}}", url)).getBytes());
profile.getProperties().put("textures", new Property("textures", new String(encodedData)));
Field profileField = null;
try {
profileField = headMeta.getClass().getDeclaredField("profile");
profileField.setAccessible(true);
profileField.set(headMeta, profile);
} catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e1) {
e1.printStackTrace();
}
headMeta.setLore(lore);
head.setItemMeta(headMeta);
return head;
```
I was initially thinking about just launching a thread for this plugin by itself, but tbh, forking Spigot might not be the worst idea for general optimizations
No only a minority uses it. >75% of the playerbase is on 1.16 or higher
1.8 is a bubble
tbh i don't see why people cling to 1.8 the way they do
i don't know what's so great about it
Server software is more efficient. It's better for PVP too
i've been playing this game since i was literally 9 years old (older cousin bought it for me as a birthday present in 2008) and idk I've enjoyed seeing it change
i'm now almost 24 lmao
the PvP part, I get, though it's not my cup of tea
It uses less resources, and has a better PvP system in Java. Bedrock has the 1.8 Java PvP mechanics.
Its horribly outdated. It has many bugs which will never be fixed.
Absolute garbage version which is only played by pvp fortnite kiddies which
wanna hammer their left mouse button real fast. Everything more complex
is too hard to comprehend for them.
but the server software? I was under the impression they'd actually cleaned up a lot of server performance
I mean just watching the profiler the GC is doing way less work but that might be my launch settings actually
Wait. How did they buy it in 2008? ๐
My entire experience with the latest Java version has been quite terrible
...the game had an /indev/?
Everytime there's an issue
Sound like a you problem
Maybe it was 2009 and I was 10, idk
I was a literal child so my memory isn't the greatest
2009 was early access
I ran a server with it and the memory kept climbing up and up. Like the GC didn't even work. lmao
hello can help ProtocolLibrary.getProtocolManager().addPacketListener((PacketListener)new PacketAdapter((Plugin)plugin, new PacketType[] { WrapperPlayClientUseEntity.TYPE }) { public void onPacketReceiving(PacketEvent event) { if (event.getPacketType() == WrapperPlayClientUseEntity.TYPE) { WrapperPlayClientUseEntity packet = new WrapperPlayClientUseEntity(event.getPacket()); if (TrollCommandMain.this.names.containsKey(event.getPlayer().getName()) && packet.getType().equals(EnumWrappers.EntityUseAction.ATTACK) && packet.getTargetID() >= TrollCommandMain.this.set.startID && packet.getTargetID() <= ((WatchDogPlayer)TrollCommandMain.this.names.get(event.getPlayer().getName())).getLastID()) { int hits = ((WatchDogPlayer)TrollCommandMain.this.names.get(event.getPlayer().getName())).getHits(); TrollCommandMain.this.names.put(event.getPlayer().getName(), ((WatchDogPlayer)TrollCommandMain.this.names.get(event.getPlayer().getName())).upHits()); if (hits >= TrollCommandMain.this.triggerBhop) { TrollCommandMain.this.btc.addBhop(event.getPlayer().getName()); } else { TrollCommandMain.this.btc.send(event.getPlayer(), "&4&lNETRANKYK, NES BUSI PALAIKOMAS SUKCIUMI!"); } } } } }); this.btc = new BhopTask(this); this.set = new Settings(); plugin.getServer().getPluginManager().registerEvents(new TrollListener(this), (Plugin)plugin); }
Went back to Java 8, no problem
Latest versions can still be run extremely efficiently
but I know I played MC classic lmao
hello what is problem
The indev version was released in 2010. The game's first version was released in 2009 (and its original name - Cave Game - has been replaced to Minecraft with that)
you haven't provided us anything except your code. no errors or anything
how can we see the problem with no info
mb, you're right, it was 2009
if you bought the game you could get a custom skin
oops wrong ping, sorry - that was to @drowsy pawn
Im not gonna get into this but if you prefer java 8 then you are standing
right here
Sure and so can the 1.8 versions
yeah i'm ngl, there was this super hairy ugly period where both spigot and java were kind of shit, and the older versions were just easier to work with
but Java 16+ and the latest game versions are actually really nice
Doesn't work
what's the error?
1.8 versions are extremely limited API wise compared to newer versions
error
no error
this. old spigot API sucks
it just returns steve head
It's a better learning experience
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
it's not really a learning experience if you're doing it wrong
Did you try what I sent?
Learning NMS is extremely valuable.
If you actually want to learn spigot dev, starting with 1.8 is a horrible experience nowadays
yes
Why would you literally cripple yourself with an unsupported, buggy, ancient version from almost half a decade ago?
Its objectively a bad decision.
NMS is only valuable if you plan on diving into more complex mechanics.
@iron glade
Didn't work too?
- It's not buggy.
- It forces you to learn NMS, which is a valuable skill in MC development.
false
Are you in offline mode?
if you have to use NMS nowadays, you're doing one of two things:
- Whatever you're doing, you're doing it the wrong fucking way, because Spigot has APIs for pretty much everything except modifying mob AI
- Modifying mob AI
hm weird, I have no idea if it works in 1.8, it works for me in 1.17+
And this is something I hate in most people. Most devs prefer every other to use the latest software. Its not how it goes by. As I look into all this, most devs just do not realize, that others has their own minds. If they prefer an older software, they shall use it. I use 1.8 and 1.18, while doing stuff in 1.16 as well. I don't mind if I get no support on 1.8. I just google my problem, and voilรก. I typically hate when everyone forces me to do use this and that. No. That's not how its going to work. Just stop being mean telling people they are stupid because they prefer an older software. Each software has its own greatness. And you HAVE TO ACCEPT IT.
It also forces you to learn advanced java concepts like reflection you might not have to use in the later versions
okay
it is possible btw, as this command works
/give @p skull 1 3 {display:{Name:"Pumpkin Spice Latte"},SkullOwner:{Id:"9aac9003-8d9b-461d-bcdd-1ffa7b24dc3a",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWQyZDM2NzQ3YmMzZTJjMzdkOTFmYWZlYjU2MjhjZDg4N2ZjZjU0ZWVkNDllY2Y3ZGRjNTRkMjAzMzYzMzNmMCJ9fX0="}]}}}
what values are you feeding to the method
Honestly, I'm gonna disagree with that as well. The vast majority of plugin devs are doing this shit as a hobby, and the reflection you have to use in NMS really doesn't give you much of a grounding in what reflection is actually capable of
i'll try it too
9aac9003-8d9b-461d-bcdd-1ffa7b24dc3a as uuid
and eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWQyZDM2NzQ3YmMzZTJjMzdkOTFmYWZlYjU2MjhjZDg4N2ZjZjU0ZWVkNDllY2Y3ZGRjNTRkMjAzMzYzMzNmMCJ9fX0= as url
It's looking for an actual URL
use something like (gimme a sec)
Like a texture from minecraft.net lol
gonna hawk my own library for a sec (https://github.com/Dewynion/EmberCore/tree/dev) so I can say I've had ample experience using reflection at this point
\http://textures.minecraft.net/texture/ed2d36747bc3e2c37d91fafeb5628cd887fcf54eed49ecf7ddc54d20336333f0
input a link of this type
since one of the main features is basically hooking Jackson into Spigot
right, like that
yes
Sure, if you are wanting to do this stuff as a hobby, it does not matter what version you use
But if you want to be a professional (like work at hypixel or something) then you should learn all this 1.8 stuff and experience it
that's a more appropriate use of reflection, all NMS really does is make you comb through a bunch of obfuscated nonsense and waste time.
idk I work in research at way larger company and I'm pretty sure nobody I work with would agree there lmao
well
for starters they'd ask why the hell I'd want to work on minecraft servers fulltime LOL
but yeah, I dunno, NMS is just a hallmark of shit software design
it's why I strongly advocate for staying up to date on Spigot as much as you reasonably can
btw wtf is an nms
net.minecraft.server
ahh
it's a package that basically contains the obfuscated game code
Spigot itself is an interface that runs on top of that
basically provides a (mostly) version-independent and human-readable API
thats probably something i dont have in my latest buildtools jar I decompiled or somehingn. I cannot check TPS with the plugin xd
iirc you need to explicitly create the craftbukkit jar
which is where NMS code lives
but I could be wrong, it's been a while
yeah I haven't looked into that enough to know either
but if I cannot use it, then probably it doesn't has it
I'm inferring that "shaded" means "server code shaded in"
but if you can't access nms code, then yeah idk
its... more complicated, I guess...
I mean... The normal version is less compatible with stuff
how's that?
uhh idk
I was not able to use somethjing
I was able with the shaded
- also there is a little difference between the two documents' filesize on space -
I just realized I have the whole Spigot code.
and I can edit it...
xd
The normal doc is 1,32MB, while the shaded doc is 5,39MB.
so?
ye
Out of curiosity: what's the overhead of repeatedly creating/deallocating spigot Vectors?
They don't seem to be pooled
I do a lot of work with vectors, wasn't really sure is all
disclaimer that I primarily work in C++ nowadays so I'm overly conscious of this sort of thing
SkullMaker wsg = new SkullMaker(ChatColor.YELLOW + "Walls SG", Arrays.asList(""),
"http://textures.minecraft.net/texture/7974325fb019d591af4b2e6e4688714b1e95a8dbf981ebec22fa3538e19ec9d0"); did you do it like this?
this is how i use it
did that work?
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
You can make a new class called "SkullMaker" and copy this code and just change the package name if you want...
It works in my use case.
Should work in yours too, as the only difference the url and what name you want
let me try your method
you can add lore too if you would like to the item by adding stuff to the array
btw there is no %22 at the end of the url
discord is bugged out lol
ugh
well we have gc
and then soon youll be able to have stuff on stack
but the overhead is minimal unless you allocate millions
is this full url?
Yes, just take off the %22 at the end. Discord is bugged out and added it for some reason.
np
aight, thanks. don't want to microoptimize for no reason
pretty OOTL on Java GC efficiency
all I know is that it's much better than Python lmao
Doing it by hand is probably better than python 
LMAO
manually taking out the trash
write a new OS that allows you to modify system memory in real time and manually manipulate memory
Exactly, I'm sure you could write that entire OS before Python managed to even run anything
๐
ye unless some dum fuk uses serialgc
if you want so... I actually wanted to make development tools into my OS... lets do it then...
oh I was joking
not too experienced with OS dev
i've done a bit but not in any reasonable amount
if (Integer.parseInt(args[1]) <= 0) {
ChatUtil.sendMessagePrefix(player, "&7Please specify a positive number!");
return true;
}
windows 2.0
this worked like 1 hour ago
now that I start the plugin up again it gives error
Caused by: java.lang.NumberFormatException: For input string: "asd"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) ~[?:?]
what error
its trying to parse asd
ur inputting a sting..
What you entered isnโt a number
cant be parsed to a number
you need to put that in a try and catch
NumberFormatException
you probably want to put arg[0], not [1]
if not, you have to catch exception
text
if (economyManager.isInt(args[1])) {
try {
economyManager.payPlayer(player, target, Integer.parseInt(args[1]));
ChatUtil.sendMessagePrefix(player, "&7You paid &a$" + args[1] + "&7 to &a" + target.getName() + "'s &7account");
ChatUtil.sendMessagePrefix(target, "&7Current balance: &a$" + economyManager.getBalance(target));
ChatUtil.sendMessagePrefix(target, "&a" + player.getName() + "&7 has paid &a$" + args[1] + " &7to your account!");
ChatUtil.sendMessagePrefix(player, "&7Current balance: &a$" + economyManager.getBalance(player));
} catch (IOException e) {
throw new RuntimeException(e);
}
} else {
ChatUtil.sendMessagePrefix(player, "&7Please specify an actual number!");
return true;
}
well i guess we dontk now the structure of his command
and can you send your isInt method ?
public boolean isInt(String string) {
try {
Integer.parseInt(string);
} catch (NumberFormatException exception) {
exception.printStackTrace();
return false;
}
return true;
}
its check
that is tru tho
parseInt can return negative 1
they could enter -1
How am I supposed to make a new objective for my scoreboard?? lol??
just parse it once and catch an exception there
make it return null then
null is likely better, but then you still have a second test
ok now you guys type alot and im confused
u can if you use the wrapper
Hey, can anyone help me think of some non messy way of doing this:
So I have string in my config that looks like this:
|-
&8---&6%player &3Something&8---
&3%placeholder - &6%timestamp
&3%placeholder - &6%timestamp
&3%placeholder - &6%timestamp
&3%placeholder - &6%timestamp
&3%placeholder - &6%timestamp
&8--------&6%current&8/&3%max&8---------
I want to make it TextComponent and only %placeholder parts clickable (each with different click event), but it seems to bit a little more complicated for me then expected
or just parse it once
What is the best solution? I dont want them to put in -1
Donโt use isInt
and in the command try parse
if you catch an exception then send a message to the player and return
nah thats a shit solution too. having a method is a good idea
no, itโs not
what if he wants to do it somewhere else
why parse twice
type that all out?
btw i removed the e.printstacktrace and it still gives me internal error
when i type a string in
and not just return the message that says please specify a number
ive always just done something like this
public static Integer parseInteger(String in){
try{
return Integer.parseInt(in);
}catch(NumberFormatException e){
return null;
}
}
you could. store teh result and check for null
so really doing a parse and a test.
no real advantage
yep
though i don't know how fast parsing is
but how would i check if the number is equal to or less than 1
Integer value = parse(args[0]);
if (value != null && value > 0) {```
operator != cannot be applied to int, null
Integer
fixed in my code ๐
Not sure if auto boxing is the best approach
probably better to keep it as an int and return -1 as suggested before
cool kids OptionalInt it ๐
i mean used like this in a command is it rlly that bad?
thats what i usally do yea
but if he needs to support negative values thats not rlly an option
then its better to test and parse
I just use Integer.parseInt() in a try/catch xD
Same
It's ugly but I don't parse enough ints to warrant another method for it I guess
I understood my code before but now with ElgarL and EpicGodMC advise i kinda do but not quite
and that is very annoying
haha
๐
What do you not understand about their methods
if you want to support negative values your current approach is good
Integer amount = economyManager.parseInteger(args[1]);
if (amount != null && amount > 0) {
ChatUtil.sendMessagePrefix(player, "&7Please specify a positive number!");
return true;
}
try {
economyManager.payPlayer(player, target, Integer.parseInt(args[1]));
ChatUtil.sendMessagePrefix(player, "&7You paid &a$" + args[1] + "&7 to &a" + target.getName() + "'s &7account");
ChatUtil.sendMessagePrefix(target, "&7Current balance: &a$" + economyManager.getBalance(target));
ChatUtil.sendMessagePrefix(target, "&a" + player.getName() + "&7 has paid &a$" + args[1] + " &7to your account!");
ChatUtil.sendMessagePrefix(player, "&7Current balance: &a$" + economyManager.getBalance(player));
} catch (IOException e) {
throw new RuntimeException(e);
}
} else {
ChatUtil.sendMessagePrefix(player, "&7Please specify an actual number!");
return true;
}
so is this ok?
for what im doing
dont want a negative number
and I want the args[1] to be an Integer
int parse(String value) {
try{
return Integer.parseInt(value.trim());
}catch(NumberFormatException e){
return -1;
}
}
// to use.
int value = parse(args[0]);
if (value <= 0) {
sysout("Must be a positive integer!");
return;
}```
real chads also automatically remove accidental chars in the input string 
there ๐
int amount = economyManager.parse(args[1]);
if (amount <= 0) {
ChatUtil.sendMessagePrefix(player, "&7Please specify a positive number!");
return true;
}
try {
economyManager.payPlayer(player, target, Integer.parseInt(args[1]));
ChatUtil.sendMessagePrefix(player, "&7You paid &a$" + args[1] + "&7 to &a" + target.getName() + "'s &7account");
ChatUtil.sendMessagePrefix(target, "&7Current balance: &a$" + economyManager.getBalance(target));
ChatUtil.sendMessagePrefix(target, "&a" + player.getName() + "&7 has paid &a$" + args[1] + " &7to your account!");
ChatUtil.sendMessagePrefix(player, "&7Current balance: &a$" + economyManager.getBalance(player));
} catch (IOException e) {
throw new RuntimeException(e);
}
} else {
ChatUtil.sendMessagePrefix(player, "&7Please specify an actual number!");
return true;
}
you have value so use it
yeah
i saw
ahha
ty guys!
I will test and come back if something is wrong
if im allowed :3
We are always willing to confuse more ๐

Hello, im using this cuboid class (https://github.com/desht/dhutils/blob/master/Lib/src/main/java/me/desht/dhutils/cuboid/Cuboid.java) to make a faller (image), but i want it to break from up to down instead of down to up.
whats ur current code to break it
Hey, is there an elegant solution to listen for all block events? Currently I'm trying to use the "BlockEvent" class, but I'm getting the error message you see below.
My goal is to cancel the event depending on the location.
Then you need to rewrite the iterator class
it runs from low to high
ElgarL
How would I send a message to the player that they have to specify an actual number when using your parse method?
like where do I put it
you do that in the method you called it from
You have to listen to them individually afaik
but there I did if (economyManager.isInt(args[2])) {
} else {
player.sendMessage("has to be a number")
okay, no elegant solution :/
You could probably make a custom event that is fired when any other BlockEvent was fired
You'd still have to listen to all the events, but all you'd be doing was firing another event, so probably a little cleaner.
What do i need to modify? (i have 2 months learning Java and spigot)
the iterator runs from a low value to a high value. You want it to run the opposite way to give you blocks from high to low
Simplest would be base + size and reduce size until size == 0
just from a quick look
its only the Y you neeed to reverse
you could also use reflection to do this.
but that cant really be called elegant ๐
haha
anyone know whats going on here
google that
Class.forName("com.mysql.jdbc.Driver"); or something close
Depends on the version of your driver
coiuld be com.mysql.cj.jdbc.Driver
Correct
if v8
You need to initialize teh driver
?
add Class.forname.... before asking for a connection
you only need do it once at startup
so im not its just i didnt know which one to choose all tiers will be the same colour its just the name changing
Dark Staff T1
Dark Staff T2 etc
and now im trying to work on a combo system
so Class.forname(connect())?
where with each tier a new combo gets unlocked
no
it just makes sure the Class is loaded
im confused why its not letting me push?
u did not commit anything
i did tho
looks like u also need to define ur remote repo

Does anyone know how I can create a world using WorldCreator, but this world can only have bedrock on tier 1?
Then you need to include a MySQL driver
Spigot includes a driver. You are not using spigot so you need to provide your own driver
oh mb, ok ive fixed that now
sorry to bug, do you know how to build a JDA plugin?
no
They have full pom example on github
I made a thread a few days ago sorta related to this but I got no responses so thought it would be a good idea to ask my new question here. Is there a way to use IntelliJ's debugger for Spigot plugins?
Learn how to create a #Spigot debug server inside of #Intellij
0:00 Intro
0:45 Creating New Project
2:30 Setting Up Export Settings & Start.bat
5:52 Testing & Overview
Subscribe: https://www.youtube.com/BGHDDevelopment?sub_confirmation=1
View all our plugins here:
https://www.spigotmc.org/resources/authors/111582/
https://www.mc-market.org/re...
maybe this helps
yes there is
really easily actually
I'll have a look, thank you!
all you need to do is create a remote jvm debugger & intellij will give you some commandline arguments in there. you add those to your servers startup script
and boom ur done
BOOM
Never heard of a 'remote jvm debugger' but I think I understand how it would work and ye that makes a lot of sense. So instead of making IntelliJ run our testing server, we make our testing server run IntelliJ (well, it's debugger)?
uhhh
not entirely
you bassically just open a port on your server
and intellij uses that
in intellij you need to add a run configuration
and select remote jvm debug there
Ah, makes sense! I'll have a go ๐
I'm trying to enchant an item with fortune 4, and it's saying I can't because I can only enchant 1-3, how can I get around this?
As far as I know JVMTI might even be supported without much more configuration
But considering that I never used it outside of the IDE's debug env I never bothered checking out if it really is possible to use it like I think you can
is that a programming question?
or a server question
?jd-s
yea it is possible like that geol
Use https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/meta/ItemMeta.html#addEnchant(org.bukkit.enchantments.Enchantment,int,boolean) with ignoreLevelRestriction set to true if this is a programmatic question
all you need to do is create the config, copy the cmd line args it gives you and add that to your startup script
The video seemed to show it working would having to set up a remote jvm debugger or adding any commandline arguments which is strange but I'm not gonna complain about ๐ Sadly, I thought this would also solve the issue of having to copy the JAR to the plugins folder, but the video got around this using build artifacts which afaik means I won't be able to test any Maven configuration
you can also achieve that with maven
Is there a way that doesn't pollute the pom.xml and can be copied between projects? I'm aware that it's possible, but it's just slightly more annoying
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<outputDirectory>/my/path</outputDirectory>
</configuration>
</plugin>
</plugins>
like this
Yeh, but then that pollutes the pom.xml. I don't want to be including the path to my testing server every time I push to GitHub ๐
I know it's really fussy, but it's annoying me cos I feel like there's got to be a better way
Well, one thing I tried was having my run configuration run a batch file which takes the path as a parameter. But to make this easy to copy between projects, I wanted to use Maven properties to get the path of the JAR to copy, but it doesn't seem IntelliJ allows Maven properties in run configurations
my test server pulls a new jar at startup
this tha topic.
There's also Maven's build profiles (settings.xml) which seems perfect for this, except that profiles made in settings.xml can't configure anything inside <build>, including build plugins
i mean what is exactly meant by pollute
you can have a parent pom and inherit from that
Yeah
imo, the pom.xml should be effective for anybody who uses it on any computer. I'd consider anything inside the pom.xml which only works on one computer/filesystem 'polluted'. Since not everyone has their testing server in the same location on their computer (or would want the JAR to be copied to it in the first place), this includes that.
you normally dont have test stuff in your pom anyways
I use 1.8 and can't find it, maybe not in 1.8?
well you could also just build with an extra argument. for example mvn clean package -DoutputDirectory=<path> iirc
Again, sorry that I'm being really fussy, I'd honestly be quite happy to just manually enter the JAR's location for each of my projects, it's just bothering me that there seems to be so many ways that get so close to solving this but then reach a dead-end
Are u using maven or gradle?
Wait, does that work without having to set variables in the pom.xml? All the solutions like this that I've seen do it by having that argument set a variable in the pom, essentially doing the same thing
Maven
one way to find out
he doesnt want that
I now there is a way but im not sure since im not on my home and i dont have a pc
What does he want?
a way to do this that would work on any pc
and not everyone has their testserver in the same location
I tried this. It didn't come up with any errors or warnings, but the JAR still outputted to the default location, so I guess it does just act as a property to use in the pom.xml
WHAT. ARE. YOU DOING. ?
uhh yea configurations aint gonna work with maven like that
Hm?
@high pewter try adding
<build>
<directory>${dir}</directory>
</build>
in your pom
What he wants
note that this method does require you to always specify a path on command line
Does he want to run a server directly from Intellij and have the plugin jar already setup inside the plugin directory
๐ค
I dont really understand what he wants...
I think that works if you use -Ddir="path". But ye, being required to set it to run the Maven goal is annoying
Yup
But what the fuck you want to do bruh
i mean there arent many other options really haha
๐ก
Dang ๐
Give me a chance to explain it lol
I'm wondering if there's a way to easily test plugins (so package the plugin and run a testing server with the plugin) which can be applied to any project (don't need to copy the build directory for every project, just enable a run configuration for example) but without polluting the pom.xml (I want all my plugins to be open-source and I don't want to include stuff involving my testing server whenever I push to GitHub)
I'll have a look, thank you!
Sadly not what I'm looking for, but it explains that there are different methods for debugging (local or with remote JVM) which clears up something I was confused about earlier, so thank you!
That's what you're looking for though
Wait do you mean you don't wanna build to your server directory?
Do you habe intellij ultimate?
No? The only mention of building the plugin is at the very bottom
Build your releases by building the artifact or compiling your maven plugin
No, but I'm kinda curious now what it has that would solve this lol
You can create a debug configuration that runs a bat file which copies the plugin to plugons after build
As well as runs the server
Just don't commit the bat file
That doesn't require IntelliJ Ultimate ๐
But ye that's something I've tried, but the thing I'm stuck with there is if there's a way to automatically get the path of the JAR to copy from. I was hoping I'd be able to send this ${project.build.directory}\${project.artifactId}-${project.version} as an argument, but IntelliJ doesn't seem to allow Maven properties to be used for run configurations
Ohh
Hm
Well you don't need the build directory because i doubt you're changing it much
You can just setup the bat file to copy PluginName-versionhere.jar
Why dont use docker
Use regex to make it so that it can copy any version
But the build directory would be different too
Every project has a different build directory
There's probably an easier way to do it tbh
Oh minion nice. To see you
I just don't know it
Nice to see you as well
ngl I'm surprised nobody has said that already ๐
I've been very busy with school
Me too
Well not really
Many attempts have been made to create some canonical convention
For instance maven with its target dir
But the target dir is still relative to the project directory itself
Hey mare
Its not posible
Just forget about that
This channel is more for other type of support
Fair enough, sorry
selfrole Add or remove a selfrole from yourself.
cleanup Base command for deleting messages.
embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.
findcog Find which cog a command comes from.
names Show previous names and nicknames of a member.
userinfo Show information about a member.
listcases List cases for the specified member.
reason Specify a reason for a modlog case.
permissions Command permission management tools.
?
Oh ok
I understand
You are talking about plugin Messaging channel
Its sent and receive by a player connection
Thst why it doesnt work when a player its not online
I explain
When you write thru spigot to bungee you the player connection is used to sent a packet
bumping a little
Patient
@quaint mantle look dm
Yes
spigot -> get the player connection -> send a plugin Messaging channel to BungeeCord channel or your custom channel
How can I slowly create a message and then send it to the player
like im running a for loop to get certain colors and I want to add to a piece of text that will be sent to the player each time the loop runs and then send it to the player
any help appreciated
so in the end its 1 message?
yes
use StringBuilder
can I add ChatColorto that?
i would just use the translated color codes
like &6, &5 etc
and translate it when done building
I cant in my use scenario
why not?
I am getting colors from a bufferedimage and then applying them
i need to use ChatColor
Ok
how would I get an enchantment from a string formatted like "ENCHANTMENT:LEVEL"
well, i know most of it
but how would I get an enchantment enum value from a string
there isn't a .valueOf
How do I make command arguments with acf commands
there's only .values()
should use this https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html#getByKey(org.bukkit.NamespacedKey)
declaration: package: org.bukkit.enchantments, class: Enchantment
enchantment is not an enum

