#help-development
1 messages · Page 314 of 1
so if I do so I would be making it blindly
if you extend pluginbase it doesn't require a plugin.yml
okay 👍 I'll even implement all the abstract methods
yeah can just put generic stuff for that
let's see
this whole discussion ahah
how owuld the server even know which is the PluginBase class without plugin.yml
ssssh
so let's go
paper is starting up
oh no
what a surprise
who would have guessed that
that is crazy
can i ask a 1.8.9 forgegradle question
I have the same result
must be a paper bug ig
the server doesn#t load it
lol
did you add a plugin.yml?
oh shit I actually did have a plugin.yml inside
haha yeah again
one sec
I forgot to mvn clean
here you go
so paper removed the functionality
lol
LOOOOOOOOOOOOOOL
now is still the same with spigot?
dw i got spigot too
dont ask why im asking this, brain cells turned off. but am i correct in saying i could```java
String string = "cool string";
for (String key : Map) string.replace(key, map.get(key)
I will have to ask md5 if he chaged it
nah I think we obviously just never used it
wouldn't surprise me, so few people used it anyways
yea? no?
?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!
my 1.8.9 gradle process wont work.. ive tried clearing caches, reinstalling, restarting ide, force quiting java, and nothing works.
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
ok
using spigot @wet breach
mb
you can ask your question but you are using forge
shall I try craftbukkit too?
so thats a no?
lets see the git history xD
yes pls
i just dont wanna be ignored and then not get the cue that yall cant answer my question
lol
could you please?
I dont know how to search through git efficiently so pls you do it
because extending pluginbase was a thing
you must be confusing this with something else
but as I said since hardly anyone used it doesn't surprise me if it was a removed functionality
No I am definitely not
I have projects on a backup somewhere that use it
i will get them out when I get spigot stuff compiled after work tonight/tomorrow
test something for me
this is the oldest version of Pluginbase I could find, from 2012:
add a plugin.yml but don't add the main class thing
here's the corresponding plugin interface
still, abstract class + interface
not psosible that this was ever able to get loaded in any way by spigot
see the javadocs even say to extend it if its not a JavaPlugin
yes, that would be possible if you also write your own custom PluginLoader or sth
but spigot/bukkit never had any other plugin loaders besides the JavaPluginLoader
String joinMessage = message;
for (Map.Entry entry : BungeeCoreSpigot.validNameValues().entrySet()) joinMessage.replace((String) entry.getKey(), (String) entry.getValue());
``` what would be the correct way of doing that, my brain isnt braining
lets fix this
yeah I am going to have to look into whatever changed
replace is not going to do anything on its own
String joinMessage = message;
for (Map.Entry entry : BungeeCoreSpigot.validNameValues().entrySet()) {
joinMessage.replace((String) entry.getKey(), (String) entry.getValue());
}
epic, shall I continue my blog post about ACF, or continue the spigot-plugin-archetype?
joinmessage = joinmessage.replace ?
this right here
you can't modify a string
i thought i was hallucinating
So because you can't modify strings
you have to use another String object to hold what you modified
depends, the acf stuff might be needed on the spigot plugin arch but the arch would be needed to come out so people know why the acf thing exists
so probably acf
@tender shard watch it be a bug with baseplugin
and it has been there because no one uses it all that much lmao
isnt that the same thing as i sent?
yes, I formatted it to make it easier to look at
ah'
but fourteen answered it
not using {} 😠
i love my one liners
i never know whether only the line following directly is executed or what
i used to do else try {}
it executes whatever is after until it sees a ;
ah
at least by skimming at bit, there has not been a single different loader than the JavaPluginLoader out there.
In the commit that the PluginBase was introduced in, SimplePluginManager already checked for plugin.yml and JavaPluginLoader enforces JavaPlugin as a parent type
I'll see if it was added anywhere else
something changed somewhere because anything that was a pluginbase was not loaded up and was just a way to allow libs to exist in the plugin directory without the server complaining about it. Due to this, it wasn't required that it had a plugin.yml.
Either it is a bug right now
or the functionality changed
in either case not like people really used it anyways
I mean, https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/0a106995d2c79518cb8a3818dd565e6fbfec080a is the commit that introduced the type and at that point no plugin.yml would have already exploded
PluginBase obviously was an idea to introduce a way to create non-java plugins but nobody ever wrote any different plugin loaders
that would be my guess yea
that is an in memory plugin
so I guess it does need a plugin.yml just doesn't require specifying the main
wat
I will find it, where it changed
that makes little sense
or I will just wait for MD_5 later tonight
okay 👍 it would have to be changed to and back
basically the only reason why plugin.yml exists is to specify the main class
(yeah okay and name and version ofc)
because the JavaPluginLoader required a JavaPlugin subtype
and that is the only loader, I don#t see what else would create the PluginClassLoader needed to attach a "lib jar" to the classpath
no it being on the path as in in same directory
jars are on the path if they reside in the same directory as your application
due to how the JVM searches for it
I-
whut
as I said, the server will complain about jars in the plugin directory if they are not valid plugins
you were talking about the plugin directory like, a few minutes ago
Well, if you see md_5 down the line I guess ask them, I have no idea anymore what exactly you are talking about
@tender shard after almost 8 hours, join messages, chat formatting and it being mostly customizable is done. tomorrow i just have to add all the name varients and or their correct name or a hex for them
actually
8 hours
13 min
nice
will check it out later
today
is it on the server alr?
on the lobby atm
just pushed it to github, lmk of anything you want changing or i could add
i couldnt be bothered to add all colour names earlier so for now purple is replaced with a hex, darkblue for dark_blue
oki
ill add the rest when i wake up
then next thing we need is to sync that PDC data (but only the simp/bungeecore tags) cross servers. either through mysql or redis
you don't need a classloader for a lib to be used by plugins in the plugin directory, therefore anything that was a PluginBase didn't need to be loaded by the server and were left alone without the server complaining that they were not valid plugins and all that fun stuff. Anyways obviously it seems that functionality has since broke, and who knows for how long since obviously barely anyone uses it, except I guess myself every once in a while
yes you do
the pluginclassloader is a URLClassLoader that only opens that one .jar file
why would a lib need to be loaded by the server for plugins to use it?

we could probably make a "better" pdc set/get/getOrDefault/remove method that just does that auto so we shouldnt need to change any extra code other than the main method calls
where else would they come from, if not from the associated class loader?
i mean, I guess frost just used the fact that the classpath defaults to .
the PluginClassLoader only checks in the plugin .jar file, or those loaded through the libraryclassloader associated to this plugin
classloader is just one way to tell the JVM where something might be at, its not the only way the JVM knows how to load a dependency you are asking for. If the classloader doesn't know, the JVM will do a quick search to see if its in 3-4 key directories one being where the application was started, then the libs directory for the JVM, and the other directories but also for the JVM can't remember their name
and hence the JVM would allow you to access .jar files in folder you start the server in
but like, that logic has absolutely nothing to do with PluginBase
the server logic never knows anything about these files
there is 0 points in having a PluginBase
maybe the default classloader might do that. every plugin created by the SimplePluginManager get their own PluginClassLoader assocaited to it, though
because its not meant to
if you are just shoving the jars into a dir that is on the classpath
what is the point of PluginBase then 
does math require MC?
no, but what is the point of PluginBase
so the server didn't complain about it
the server does not know about it
also, you can implement your own PluginBase as well
either you have it in the plugins folder and not the jvm classpath, then the server is responsible for loading it, which it uses the JavaPluginLoader for. This breaks for non JavaPlugin types even in the first commit PluginBase was added
or you have the jar on the classpath
at which point, the server will never complain about it
because it doesn't load it or interact with it
if you add a jar to the plugins directory that doesn't have what it expects, it will complain about it, even if that jar is just a lib for a plugin to use
if you add it to the plugins directory, the server would have to load it which it cannot do unless you have a JavaPlugin as the JavaPluginLoader requires it
it does so rn and it does so back in the first commit
how "configurationserializable" is ItemStack
will it serialize enchants & other item meta like potion effects?
Yea
as I said I will have to find where it changed because this was indeed a thing whether you believe me or not
okay 👍
I wouldn't have brought this up otherwise
looking forward to it
you will however have to possibly wait till I am off work tomorrow or when its my day off, depends how much time I have to search and what not when I get off work as I work 10 hour shifts lol
but I am curious as to why this changed so I will look
ah no worries
day off starts Friday morning 🙂
so I have the weekends lol
monday - thursday nights is when I work, and since that is 4 days, I work 10 hour shifts to get my guaranteed 40 hours 😄
Hey, dose anyone know how to setup Lilypad?
tf is Lilypad
lilypad is a proxy written in GO
Only for 1.7 and below now? I can't even setup using ip's as it keeps saying java.net.BindException: Address not available
the author abandoned it when 1.8 came out
my bf has reported sick since 6 weeks now, and today he did it for another 2 weeks lol
nice I guess?
that means he's basically away from work since 2 months lol
yes lol
if I call out sick I have to use my PTO if I want to get paid, but downside is I don't get my shift differential pay
Used but slf4j still can't find any implementations to bind to. It works just fine when it's not relocated.
well I don't know which version you are using, but regardless it doesn't work for versions beyond 1.7
lilypad required a plugin to be used as well on the server if I remember right
i have to relocate because some persons got an error with the plugin due to another plugin not having slf4j relocated
hey is here i should ask for help or is it in help-server?
what ya need help with?
what does your pom look like?
pasted
i always just shade slf4j-simple
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.6</version>
^^
are you using 1.16.5+?
no
i asked my friend he knew its bc i want to set the rest of my server up alone bc i wanna learn to setup servers and idunno how so i did not ask him until now
You can ask for help in #help-server or on the forums. You can also look at youtube vids on how to setup servers
yeha i looked at yt vids but there where none on the plugin i used so i did not really help
where does that message come from? hikari?
yes
Does anyone know the best way to setup bungeecord voting? I want rewards for each gamemode but when a player votes in a gamemode, it wont register in that server. Only the hub.
can't you somehow tell hikari to use spigot's log4j logger? that should definitely be possible - SOMEHOW lol
if you need to rename the service file, you need to use a transformer fyi
or tell it about your relocated slf4j, idk but this should also be possible somehow. BUt i have no clue how, righ tnow
@wet breach
used a transformer
and it does rename the file
[156 1 0 153 1 123 34 101 110 102 111 114 99 101 115 83 101 99 117 114 101 67 104 97 116 34 58 102 97 108 115 101 44 34 100 101 115 99 114 105 112 116 105 111 110 34
58 123 34 116 101 120 116 34 58 34 65 32 77 105 110 101 99 114 97 102 116 32 83 101 114 118 101 114 34 125 44 34 112 108 97 121 101 114 115 34 58 123 34 109 97 120 34 58 50 48 44 34 111 110]``` does anyone know what the 156 and 1 mean? this is the response packet from a server, i thought the null byte would be on pos 0 but its on pos 2
what are u doing?
so you're imitating a client?
sure
or are you making a plugin and intercepting the packet?
im sending a request to a minecraft server to receive the server info
but I dont understand what the 156 1 are
like the motd etc?
this is getting more and more cursed every day
yeah
the response is
�☺�☺{"enforcesSecureChat":false,"description":{"text":"A Minecraft Server"},"players":{"max":20,"on...```
so here's what u do
private static final int SEGMENT_BITS = 0x7F;
private static final int CONTINUE_BIT = 0x80;
public int readVarInt() {
int value = 0;
int position = 0;
byte currentByte;
while (true) {
currentByte = readByte();
value |= (currentByte & SEGMENT_BITS) << position;
if ((currentByte & CONTINUE_BIT) == 0) break;
position += 7;
if (position >= 32) throw new RuntimeException("VarInt is too big");
}
return value;
}
and call readVarInt on your byte[]
oh right I forgot the varint stuff
that will give you the length of the response
yep
all strings are prefixed by a varint of it's length
I did read that but also its always confusing with the data types
so I was reading up on it
you need to depend on slf4j-api
huh?
if you try to depend or impose a dependency that specifically targets a binding
@humble tulip you can make hikari use spigot logger like this
it won't work and you can't have more then one binding on the class path
if you have 2 bindings on the classpath it will just result in not using one
that is what I read from the manual lol
can you explain what a "binding" is?
i see
or spigot logger in this case
oof the library I was using read the response and converted it to []bytes before I did other reading
lol
how does slf4j find a logger?
through the serviceloader
ah
but won't that path change if i relocate it?
or that way
as frostalf said, you can have only one binding in class path
so if some other plugin do same thing, you will be in problem ig
yeah, if you have 2 it simply won't choose one
and it will be as if there was none specified
but since the entire slf4j is relocated, won't it be considered separate?
slf4j is just api
there wont be
if binding is not on org.slf4j.impl class path, it will not be used
you are relocating slf4j api if i saw right
have nothing to do with impl of facade
i think i understand
i'll just ignore this for now and work on the rest of my plugin in the meantime
This is what the Devs of SLF4J have to say about bindings in libraries or frameworks
Basic rule Embedded components such as libraries or frameworks should not declare a dependency on any SLF4J binding/provider but only depend on slf4j-api. When a library declares a transitive dependency on a specific binding, that binding is imposed on the end-user negating the purpose of SLF4J. Note that declaring a non-transitive dependency on a binding, for example for testing, does not affect the end-user.
Embedded components such as libraries not only do not need to configure the underlying logging framework, they really should not do so. They should invoke SLF4J to log but should let the end-user configure the logging environment. When embedded components try to configure logging on their own, they often override the end-user's wishes. At the end of the day, it is the end-user who has to read the logs and process them. She should be the person to decide how she wants her logging configured.
essentially you don't do it
whoops
So spigot should be the only application specifying the binding
everything else should abide by it
so, what you are trying to do is not impossible per-say
but also not supported as well lol
player#spigot#getHiddenPlayers is that will gives me when i use player#hidePlayer ?
i'll try it
Gets a constraint violation using a maven compiled & shaded gson from different jars
This is from the oracle docs about GridBagLayout. Do I have to worry about turning this into a constructor regarding this thread safety stuff, or does it matter whether something is in a constructor or method, regarding thread safety?
Damn bro, i just wanna to add some libraries and do my plugins xD
i have this code and i get java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.meta.ItemMeta.hasDisplayName()" because the return value of "org.bukkit.inventory.ItemStack.getItemMeta()" is null even though that code isnt getting triggered and it will work if i have an item in my hand but if i dont nothing else will be parsed
if (event.getPlayer().getEquipment().getItemInMainHand() !=null ||event.getPlayer().getEquipment().getItemInMainHand().getType() == Material.AIR) {
ItemStack iteminhand = event.getPlayer().getEquipment().getItemInMainHand();
msg=msg.replace("[item]", ChatColor.translateAlternateColorCodes('&', "&7[&6&l" +
(iteminhand.getItemMeta().hasDisplayName() ?
iteminhand.getItemMeta().getDisplayName() :
iteminhand.getType().toString()) + " &8" + iteminhand.getAmount()
+ "x&7]"));
}
btw the original method, and now my constructor, is doing nothing besides creating a JFrame, adding contents to it, packing it and setting it visible
iteminhand.getItemMeta() is null
the item is not null, otherwise getItemMeta() would throw NPE
this
i have no item
why do you call getItemMeta() if you know that it's AIR? AIr can not have meta
just check if the item hasItemMeta()
this²
the if stmt it stopping it tho
no
you do this:
if item is not null or if item is air:
do sth
instead of || item == air,
you should do
&& item != air
lol its looks like skript
xD
still get an NPE
its not
because the getType() == Material.AIR will NEVER be checked
the ide doesnt know that air is null
then you have a shitty IDE
but the IDE will know that getType() can only work when the ItemStack is not null
and if it's not null, then it would never check the second expression
air is NOT null
AIR is a material
ovi
whats your version?
what does ovi even mean lol
1.18.2
of course
ovi = of course? 🤔
ye
as I already said, just check it the other way around
ItemStack iteminhand = event.getPlayer().getEquipment().getItemInMainHand();
if (iteminhand != null && iteminhand.getType() != Material.AIR) {
check if it's != null AND != air
instead of checking if it's != OR == air
ItemStack iteminhand = event.getPlayer().getEquipment().getItemInMainHand();
if (iteminhand != null && !iteminhand.getType().isAir()) {
please
CAVE_AIR exists 😢
yes but not in your inventory
I'd just check if hasItemMeta
Material.CAVE_AIR
ItemStack iteminhand = event.getPlayer().getEquipment().getItemInMainHand();
if (iteminhand != null && iteminhand.hasItemMeta()) {
there's a thousand ways to properly check this
ye like i could use a while (true) loop
No
lol
lol
Please dont
i have before
💀
some maven pro could help me here?
i need the most updated gson version
already
Oh I think it’s just a versioning issue
this simple gui took me half an hour lol
What feature do you need from latest?
Javafx be like
?paste your whole pom, and also do mvn clean package -X and send the full log
what's the point of that?
it's swing
wait is swing the jframe one?
its gonna be a GUI for my maven archetype https://github.com/JEFF-Media-GbR/spigot-plugin-archetype
I could ofc add that too
however that involves some nasty groovy scripts if I don't wanna create a second archetype for multi module
Maven multimodule is easy
still annoying to setup
Still no clue how to use gradle
same lol
is there an easier way to set maven stuff without actually typing out my pom?
I can now setup a new project for 1.18.1 remapped including ACF, ProtocolLib and WorldGuard within 4 seconds lol
ig u can have a multimodule archetype
just for example
i personally dont mind having 2 archetypes
I just thought about it...
in 99.9% of cases, only the "core" module will need worldedit, worldguard, protocollib etc dependies right?
I mean, you wouldnt use worldedit in the version dependedant module
so the multi-module archetype could just use my existing one for the core module
with useNMS set to false
ye
yeah easy
will do that tomorrow
first I'll finish this GUI thingy
if anyone has any ideas for useful dependencies i could add, please open an issue or PR
ir just tell me
whatever
how do i update intellij?
using the jetbrains toolbox if you're on ultimate
and if not?
otherwise it's in Help -> Check for updates I think
ty
omg thats so weird
im getting a weird "error" now
maven shading sucks 💀
At the first jar
The same jar as a dependency
maybe if i use the same shadedPattern as pattern?
someone said me thats necessary for shading
if you want to use gson in both things, then either shade it into the first one and use the shaded in the second one, or declare it as optional dependency
hell nooo
to people who claim github copilot is useless - naaah it isnt
but how i can test if the plugin is using the library from my jar not the spigot's runtime library?
oh if you wanna make sure that you're using exactly what you shaded, when the same package already exists at runtime, then you indeed should relocate it
however, to a DIFFERENT package name
e.g. com.google.gson -> my.package.shaded.com.google.gson
oh ok 🙂 thanks
np!
show your interface
works now
lol its amazing
show more about that Spigot Version
you can enter any string there. if you accidentally use 1.19.0, it uses the correct 1.19. For everything above 1.17, it automatically uses mojang mappings and adds the remapping stuff.
this is also true for dependencies - if you add WorldEdit/WorldGuard, it uses latest version 7.x, if you're on 1.12 and below, it uses the latest version for those versions
I could do that, but then I'd have to update it for every new release
maybe I'll make a middle thing - it has some versions you can select, but you can also enter anything you like
🤔
what about connecting it to a online server
with all these versions
it's basically just a frontend for mvn archetype:generate
its a fixed size?
i mean setResizable(false)?
Amazing
im doing a new type of layout for my application that auto resizes all components to the frame's size
like...
100x100 frame contains 50x50 components
if i resize to 50x50 (the frame), components will be resized to 25x25
would you add option to generate project with Gradle?
Just use the mcdev plugin for IJ i guess. I personally just use a github template
right, for all of this years I've been blind there is actual option for gradle
this is a good idea
wtfrik
what this
not possible
gradle doesn't have archetypes
it's just a frontend for mvn archetype:generate using my spigot-plugin-archetype: https://github.com/JEFF-Media-GbR/spigot-plugin-archetype
see here ^
dam
just store a template build.gradle files in the jar 
that would not be very flexible lol
naaah gradle users chose the hard lives themselves
what would i put as the teleport location?
the location where you wanna teleport to?
well that would be 100 blocks in the direction i just raycasted but i don't have that location because the raycast hit nothing so therefore there's no block.
good question
thankyou
?paste
well im getting this error https://paste.md-5.net/rigicetada.sql
heres the code
any ideas?
Give us the first error when the plugin is loaded
Also that code is useless
DctrSpaceHelmCMD.spacehelm is null
I don't think I'm using these futures right lol
no, but it's a standalone GUI app anyway
so I guess that won't help me 🥲
I think I'm using the futures wrong because e.g. when the extract fails in lines 50-57, then I throw an exception. Fine, but then it would still go the the next whenComplete in line 58. Ofc I could just check there if the "throwable" is null, but it seems kinda stupid to have to double-check this everytime. Isn't there something like "whenCompleteWithoutExceptionOrElsePropagateException(...)" or sth?
oh
There is a different way to use futures so it will do it properly, but I haven’t slept in a lot of hours so i will sleep now gl.
Me too, good night!
Hey, I was wondering if someone has an answer for me.
If I have the same spigot plugin running on separate servers and I am running bungeecord.
Can I send a forward message via sendPluginMessage and have a PluginMessageListener in the same plugin receive the message?
so Server A sends the message and Server B will receive it?
You're looking for thenAccept()
thenAccept() accepts the result of the previous stage but only runs if no exception was thrown. Then at the end you can handle exceptionally(), which runs only if an exception was thrown and returns a new result
.startDownload().thenAccept(file -> {
downloadDialog.setText("Extracting mvn.zip");
logger.info("Downloaded Maven binary zip to " + file.getAbsolutePath() + ". Extracting...");
try (ZipFile zipFile = new ZipFile(file)) {
zipFile.extractAll(DATA_FOLDER.getAbsolutePath());
} catch (IOException e) {
throw new CompletionException("Could not extract Maven binary zip", e);
}
if (!file.delete()) {
throw new IOException("Could not delete " + file.getAbsolutePath());
}
if (!new File()) { // Your maven thingy thing
throw new IOException("Could not rename " /* etc. */);
}
downloadDialog.dispose();
logger.info("Done");
});```
Then the caller can handle the exception if they want via .whenComplete() or .exceptionally(), but really Alex, all of your whenComplete() statements could be merged into just one statement
ZipFile#extractAll?! thats a thing?!
It's from Zip4j
o
I'd honestly recommend using NIO FileSystems for zip stuff, though
It's just more convenient since you can use Path as opposed to ZipEntry
The main issue is just that it's kind of hard to figure out how to get it to work?
bump
How can i check if player connect using premium acoount
if (!sign.getLine(3).equals("&5$6,000.00")) {
event.getPlayer().sendMessage("test");
return;
}``` have this for debugging and it sends test when i right click the sign. even tho the 4th line is set to that value
yes which is right
because the lines are 0 indexed
you too read the entire message
wait
i didn't understand the entire message
i did read just brain skill issue
its probably because of your &5 which should be §5
yeah thats what im testing rn
yes
that's what i meant first time
my brain
i forgot the § isn't & for a while there
i always forget about the section sign since im so used to using the ampersand symbol lol
ah yes works now
ty
ChatColor#translateAlternativeColorCodes
bumping a bump
you can always strip color
what does that have to do with anything smh
strip the colors and compare it with a normal string
@topaz cape print the channels after
To make sure yours is there
@topaz cape
Does the client time out after a while?
Sending the player a message means you send a packet which means you send a message which means you send a packet and on and on
Print to console instead
How do i place a schematic file from code?
Using fawe?
O I need to use their api?
Who even uses normal worldedit?
all of us that dont want world exceptions
what does fawe do differently from we
Why all the fawe hate?
fast async world exception
but yes
that would be amazing
it corrupts wordls
it corrupts the soul 🧠 👁️
2 questions:
-can you get a snapshot of a chunk without loading it
-whats the easiest way to find all tile entities in a snapshot as the method does not exist unfortunately
I am going to get the white whale that is "deleting every item of a certain type from the map from every chest" 😅
You see you say thst but I've not seen one example of someone actually doing it
And yes
And I assume edit it,
Exactly
Legend
Ur gonna have to also look at this https://github.com/PowerNukkit/NBT-Manipulator
Using those paired with a nbt viewer u shpuld be able to figure out how to delete your items
My gosh this is gonna be a slog haha
This is what happens when people ruin the economy haha
Got over 30mil of gold blocks knocking around haha
Gold ingots and the players are storing em as blocks.
We have an anti dupe system too
Am i not bri ish enf to know what slog means?
shat ap chicken dipper
Nt rly
Difficult when ur on a deadline of this Friday haha
You can get this done in 2-3 hrs
Also have a big list of reworks to do lemme get the list lol
Did you expect a 5min answer?
For something you yourself said you never seen anyone doing
Get chunks
can anyone assist I need help with setting the chat format on my plugin
Get nbt compoint
-Operation OreRework / wipe
-Biome rework
-Portal implementation and Spawn rework to accommodate (Build Team + @RazielMartelus96 )
-XP rework (fishing, mining , furnaces) )
- Work with Lore team to make an event for the release and wipe! (Lore team based , in progress / 80% done)
-Upkeep Rework ( @RazielMartelus96 )
-Finishing anti exploit / economy observation tool ( @RazielMartelus96 )
-Find a cure for male pattern baldness (cause you know, im already pulling 5-10 miracles out of my ass, @RazielMartelus96 )
when I set the format and send a message
Then get block_entities
in console it appears with the message but not the format just the message
no username
Show code
e.setFormat("%s:%s");
[16:44:27 INFO]: s
yes
ik
but the format in console does not appear
- I don't think you should use event.getMessage() in that
because you can use %s %s
because the message would double up
aight
Yes
besides the point the format just doesn't exist in my console and no one else has this issue so idk what to do
use "%2$s" as the message
Yes
yes
yes
yes
If you set the format to include the msg and another plugin mdofies the msg
Wtf is gonna happem
:/
and %1$s for player
Um
yeah, you can also use event.getplayer()
It's a format
true
It's not supposed to include the message
the default format works though like I can see my username in console without setting the format
but whenever I set the format to anything like e.setFormat("%s:%s"); it just wont appear it will only show the message
Yeah sure but when you create a chat filter plugin in the next 10 mnths and can't figure why it isn't censoring words you'll feel pretty stupid
inb4 you will
you will
Ok smartass
I can't figure out this bloody problem man anyone know any possible solutions?
its been 2 hours
no
e.setFormat("%s:%s");
my laptop will go flat
its legit just that
in a class
I know what pastebin is
or hastebin that makes your text disappear
thats md5bin
(totally real)
Oooo what about a cheat. Rather Rather mucking about with nbts.
Everytime a chunk is entered by a player it checks if the chunk has been given a "already been cleaned" tag (or some sort of list in a db or yml) if it hasn't, wipe it of the items and add the tag.
Should be a lot less demanding right?
did you ever face this issue?
chunks have pdc
where it wouldn't show the username in console while setting chat format
i had it show the name in console and no message
hm
replacing my message placeholder with %2$s fixed it somehow
weird anyway i'll have to debug it more later and my mind would go insane
thats why you parse stuff before you add itin
yes the chat format works
and placeholder api only cares about %%
yeah i did that
That's gonna be more demanding
ik its weird i'll setup a blank server and make a plugin for it see what happens
You can clean all the chunks while the server is offlime
And create a bug report
could be something interfering but if not i will
It is just honestly the stress of it ngl. Got 30 exams to mark this week too and would rather dip me toes in somewhere I'm confident haha
It isn't hard to read nbt
But up to you ig
I can do it if u pay me 🙂
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Its having the confidence every single gold item in every single container of every single type (barrel, furnace , shulkers in chests etc) are all wiped clean of this item yknow?
Needs to be fool proof and absolute
But it's having the sanity check that it worked you get me?
You can do whatever you want
Directly modifying the mca files is the best way to go
Aight cheers
?scheduling
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
?stacktrace
We cannot help without the full stacktrace; Please paste it here: https://paste.md-5.net
?paste code then
im sorry im not awake lol
i made 2 plugin with same code .
the forst plugin works
but same code doesnt work in 2nd plugin
you cant cast me.aman.epic.epiccore.EpicCore to su.nightexpress.excellentcrates.ExcellentCrateswhats sharekey.java line 27
And I doubt that worked in another plugin
^^
class names should start with an uppercase character tho
?conventions ig
yes it worked in other plugin
no it didnt
CrateKey key = ExcellentCratesAPI.getKeyManager().getKeyById(args[1]);
is that a command?
yes
/sharekey <playername> <keyname> <amount>
and the keyname is the place were err arises
?paste the full method
and i use tab autocomplete
paste the full onCommand method or class
well line 9 of that already wont work, args.length would be 3 for the command you just sent
idk but it works in the 1st plugin perfectly
2nd plugin i get err althiugh same code
https://paste.md-5.net/ezoqihomag.java tab autocomplete
Well that line doesn't match error provided
So you are either using another version of your pl in the server or you didn't sent correct line
ver is same
.
i gave that line only
there is no err in code
the same code works in another plugin
but when i made new plugin and started this err came
that error does not match up with the code you gave us, recompile the plugin, add it back to the server then find the error when it appears
whats faster bukkit structures or FAWE/worldedit api?
None
depends the use case probably
?workdistro
placing several structures / schematics
maybe like 1-2m blocks ish?
well if its user provided you probably should use worldedit and their api, if its gonna be a set thing you can probably make bukkit structure for it
now made simple
a event
now hope err can be identfied
a simple bucket empty event and it sends the data to us but it gives err
same err as previous
whats line 17 of Color.java
looks like an issue with excellent crates api
no. the same api works in another plugin
discord i just fucking opened this link 2 seconds ago?...
anyone help
you probably have pluginversion/api mismatch
look at the code
looks like he's trying to cast his main class to ExcellentCrates
maybe how can i avoid this
We need to see code
its provided only. i edited now and forgot to write full
how. the same code works in m 2nd test plugin but when i made new plugin its not working
no i didnt make it depend
how can this be done
add ExcellentCrates to the depend section in plugin.yml
if it isnt their create it
its the same err
?paste your plugin.yml
your colon is in the wrong plaace
no it isn
dpend
that will not work
my test plugin work without depend
same err
is the plugin actually on your server
yes it is
hey everybody, there is a way to move an entity and get it walks from point a to b? and when it reaches point b it does an action?
What exactly are you trying to do? You will most likely need to use pathfinder goals
Is there a way to set normal png skin to a player
Without needing mojangs database
?
I want to set a 128x128 skin
concerning you don't have the signature needed to sign the skin texture I don't think you'll have much success
that's a lib, Zip4J
thanks, I'll check it out!
it was 6am and I knew it was shitty, idk why I came up with these chained things lol
thenAccept is was what I was looking for, thanks!
hewwo
yeah it's 14:10
oh god its 1pm already
2*
Why???
thx <3
why am i getting this error on maven reload ?
'java.util.Collection org.jetbrains.idea.maven.server.MavenServerEmbedder.resolveProject(java.util.Collection, java.util.Collection, java.util.Collection, org.jetbrains.idea.maven.server.security.MavenToken)'```
that's at best a tiny part of the whole error
why don't you send the full stacktrace
maybe bc thats all?
doubt
whats chest manager
if its a double chest don't you need only one side to set it open?
if I had to guess it would be left side for that
does markAsOpened just track what chests are open?
sorry I read your question wrong
thought you were trying to set the chest as opened
XD
sysout the location, it might be that which is off
but double chest class doesn't implement block state. how would instanceof check pass?
state instanceof DoubleChest doubleChest
check if it's instanceof Chest. If yes, check if the Holder is instanceof DoubleChest
cast it to chest, get block inventory and then holder ig
obviously not, but on Container. Which Chest extends
if(blockState instanceof Chest chest) {
if(chest.getHolder() instanceof DoubleChest doubleChest) {
// it's a double chest
null check isn't needed btw
there aint getHolder on chest
oh yeah then you also have to get the inventory, then get the holder
why are doing an instanceof on a block with blockstate?
do NOT use getBLockInventory(), but just getInventory
shouldn't it be if (block instanceof Chest chest)
if(blockState instanceof Chest chest) {
if(chest.getInventory().getHolder() instanceof DoubleChest doubleChest) {
this should finally be correct lol
getBlockInventory() would only return the inventory of this single chest, while getInventory() should return the combined inv
from "Chest" interface
should i use bukkit logger or console sender to print out update info?
it's actually more or less the same
I use the logger if it's an automatic message. if the console / admin manually checks for updates, I use the command sender
in the console, both looks the same though
so I guess it doesnt matter
k thx
i have 1vs1 (Duels) game, and i need to make a map system to generate the selected arena for the players what the best idea for this situation?
(without worldedit)
I do use the ConsoleSender, and not the logger
huh whatever, it doesnt matter
🥲
Structure API
can you provide me a link? cuz its my first time hearing this api
Its part of bukkit
declaration: package: org.bukkit.structure, interface: Structure
is this will work with spigot 1.8.x?
i have an idea but idk if this will kill the server memory..
i have an map contains all the arenas and this folder is made like a template
so when a player duels other player the map (template) copies the files to other directory with dummy name like asda_123213213
and load the world then teleport the players and when the game ends i delete the world
@tender shard do u think its a good solution?
is using Plugin#getDescription#getVersion in async task thread-unsafe? ik it says that i shouldn't use any bukkit api in async tasks but this cases seems questionable
Is there an interface for mobs being sizeable ?
wdym sizeable?
Well, I would need a simple way to check if a mob can be resized
yeah thats will work normal but the players may play the same arena so i have to duplicate the arena many times, i tried but i don't found the best solution.. @last temple
such as a giant, slime, magma cube, etc
im pretty sure only a slime can
giant is a different mob to a zombie
yeah indeed but all of those methods are declared directly in interfaces, so no
Well yea, in that case, it's only 2 mobs, I can just type check it
That's unfortunate, but yea, for just 2 mobs it wouldn't make sense
Aight, thanks
collectiont thing?
You're allowed to re-create anything afaik
As long as you're not straight up yoinking their exact code
the whole design is minecraft anyways
I mean they probably could send you a cease and desist I suppose but Hypixel probably doesn't care lol
how could they
as long as they have no patent on that
which i doubt
you are gtg
unless they copyrighted or trademarked it they cant
check their website
just steal it, put a patent on it and sue tf out of them
they probably have to disclose it

I mean that's usually the motive behind most copyright claims but it doesn't have to be
more like they would only care if you would earn money with it
whats the point of Enchantment.getStartLevel()?
don't all enchantments start at level 1?
custom enchants maybe
yea, im doing that right now
i just saw that and it confused me
I can't think of any use case for that lmao
if soem custom enchant starts at like level 234
ikr
Someone must've just been bored when they added that lol
"ah, yes. Let's throw this versatility in there to confuse the developers"
Any good websites where you can learn java basics for free?
codecademy
w3schools
youtube tutorials
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
oo fancy
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming. https://media.discordapp.net/attachments/694661573125472256/998143126373941248/6n0v4g.gif
i concede
?stacktrace i made imajin add this yesterday
We cannot help without the full stacktrace; Please paste it here: https://paste.md-5.net
for codeacademy thanks
yt tutorials be like: lets learn what is variable, after 5 hours, lets learn what is class
make him add ?paste! and ?paste!! and ?paste!!!
?gtfo
and this
w3 is good for revising instead
maybe in future
thnx to a dude who sent about codeacademy seems to be good learning website
YT tutorials are a joke
fr
I also love how they spend half an hour installing intelliJ
like fr, people who want to learn coding should at least know how to install a program
true
all stuff java basics yt tuts told me, is known by me like 5 years ago from school computer classes
lets make an official SpigotMC programming tutorial series
i think its better to learn java basics first than going into spigot api
It is



