#help-development
1 messages · Page 420 of 1
Preferably a proper profiler like VisualVM
stop the server (this will pause all tasks)
change the config
start the server again
Also spark tells you exactly which method takes up how much time
Show the method and ill tell you
And spark also shows you exactly what in there takes up your time btw
Are you running on a potato?
MaxParallelAsyncCalls: 8 -> MaxParallelAsyncCalls: 2
MaxMillisPerTick: 22.5 -> MaxMillisPerTick: 10
How many CPU cores do you have at your disposal?
Yeah then decrease the parallel calls to 2 and max millis to maybe 10-15
BLOOM 
shared host 
Looking in there it says something is null. I replied to this already with the log
?npe
The NullPointerException, (commonly referred to as NPE), is thrown in the following cases, but not sealed to: 1. null is passed into a method or constructor which does not allow it; 2. When trying to access a field on an object pointing to null; 3. Casting null to a primitive. See https://stackoverflow.com/a/3988794/17047120 for information on how to debug NPEs.
what's a NPE? never seen one
Your plugin is null
my code is just too good
bet it's trash
with 0 enums
just like 5 interfaces
and you can make as many functions as you want ;)
it also didn't take me 8 hours to come up with
is there a tutorial for how to manage multiple config/settings/data yml files for the plugin to use in several places?
my scripting system wouldn't need 8 hours to come up with if it didn't have allowing complex targeting and 3 layers of caching in it
I did have a solution but I think its pretty bad
mine also allows complex targeting
Yes but hardly any good ones
Oh we flexing our work rn?
Multiple lines in the ActionBar 😄
mans got too much time in his hands
I see, do you have general advice?
can you make a cylinder that only selects solid blocks and then only select 20% of them?
also wtf
yeah
wtf teach me
Steaf, most tutorials just creates different FileConfiguration instances and thats it, one might even create a ConfigFacade along with a ConfigManager
Smile smiling pretty smilingly hard rn
did you make it so it's usable by people who have never seen a line of code and does it have a webapp or external creation tool ?
yes, I taught my boss how to use it
but how do they make one that can be used from anywhere, is that using DI or like static instances ?
I can teach my dog how to write java code that doesn't make my app usable by non-programmers
he's a mac user
because right now I have some static boys but I think thats not the best practice way, but DI makes it annoying
Steaf yes
it also doesn't use maplists
This is a choice between usability and design
hm did I use maplists?
Its IllegalArgumentExpression
I think I only did for the configuration structure based on yaml right
DI would be better design wise, but a static singleton can be argued to increase usability
Up to you here
okay but there are pretty much the same performance wise right?
Yes
https://cdn.discordapp.com/attachments/741875863271899136/1086666418247958558/image.png
Again: Your plugin is null
All good, I can check over what you’ve written if u want and we can discuss what you could have done differently
Like after u’ve implemented it (:
But give it a try urself first and foremost
I have been editing this kinda devlog kinda tutorial video for so long I no longer understand what is going on on the screen
okay sure, I will make a thread for it
Ye just ping me i reckon
I have done something really dirty in the project.
Just wanted to see how robust singletons are and
with how much you can get away. Its usable but
a bit too much static for my taste. But im too deep in rn.
🥲
whats the difference between a singleton and just making a class fully static other than lazy loading
How can I find Validate.java?
Fully static makes the class trash
Not as thread safe-able by design
You are passing null throgh the constructor of your class probably. You dont need to find the Validate class.
And cant be used as a generic type
You also compromise open closed principle entirely and other solid principles
Static should be stateless and immutable. If it changes on runtime then it should not be static.
Where and what is that?
meanwhile, in game engines: Singleton? Oh you mean just creating a static version on object load and referring to that?
If you would have used this whole day to learn the basics of java instead of tinkering with your plugin
then you would have written 3 plugins by now.
Well I am more referring to the canonical definition,
only one instance with a global access point
sometimes I wonder where I went wrong, to be making plugins for the past 6-7 years and only have this much knowledge
but then I remember I was like
11
it's not your fault, you're just dumb
I already learned java. I just didn't learn these things
same
I mean it depends what you’re after right also
If you just want to learn how to write a join plugin, then learning about design principles is scarcely helpful
Constructors are something you learn after maybe 4 or 5 hours of java...
If you didnt learn about them then you didnt learn the very basics.
buy the most basic java book for 20$ and read it
but like really read it
Or just use Jetbrains academy or one of the 20 other links out there
?learnjava
Imagine reading books to learn programming...
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.
constructors are the basis for oop stuff
They're genuinely useful
I used to read 900 page C books back in 5th grade to pass the time
meanwhile I implemented an aabb check between two rotated cuboids using a shortest arc quaternion last week, I'm still riding that high
there probably was an easier way to do it but who cares
Which step on codeacademy is constructors I wonder
The best way to learn programming is to write code phisically in a notebook, then try to compile it
Constructors are just functions with special semantics 
Probably first step after learning branching loops and datatypes
computers are just rocks we tricked into thinking using electricity
Lol so true
yes and methods are just static functions where the first argument is this
yeah you usually start with data types and arithmetic operations
then control flow (if else)
then loops (for & while will do most of the time)
and then you start with oop
Yep they’re actually
why is every message you post written in verse
You can write sth like
class A{
void a(A this){}
}
How do I compile code I’ve written in a notebook
Is there like, a scanner with a Java compiler built in?
very carefully
press is really hard
get a magical notebook
Pass it to your computer, using the best IDE, Notepad
Windows notepad
No auto completion, no error checking, no warnings. Just you, your code, and the hope that you've done everything correctly
Or you dont use methods in your classes at all. Imagine this
public final Function<String, Integer> parseSafe = input -> {
try {
return Integer.parseInt(input);
} catch (Exception e) {
e.printStackTrace();
return 0;
}
};
Tbh js vibe
Ah yes
tho now I cant extend my AbstractFactoryFactory and override the “method”
Out of all the plugins I have made, this is the most confusing. I just needed help making this plugin work correctly. I'm sorry I didn't learn about this, so I thought I could get some help.
Alright here is the solution: Dont pass null when you are constructing an instance of your command
Sure. Just make it non-final. Composition.
And abstraction is solved by using the constructor.
Create a method named "method" in an abstract class called AbstractAbstract
Ah true, but what about my polymorphism :(
public class SomeFactory<T> {
public final Supplier<T> supplier;
public SomeFactory(Supplier<T> supplier) {
this.supplier = supplier;
}
}
hm
/**
* Java abstract Abstract class
*/
public abstract class AbstractAbstract {
/**
* Get the abstract class
* @return the abstract class
*/
public abstract AbstractAbstract method();
}
I even made javadocs 😎
I didn't. I checked all of the code
Villagers can smelt cod in exchange for emeralds
And they don’t go to a furnace to do it
Therefor villagers are a furnace
Powered by emeralds
i too fill a steel furnace full of fish to cook it
I love casting fish ingots
Can you smelt my cod and grill my iron ore?
Villagers are the actual enemy in minecraft, like, they are the only ones able to summon entities, black magic, not even the witch is able to that
Vex tries to hug you, he not bad
It's like creeper, he just want some hugs, but he gets overexcited and explodes
Animals can summon babies by pressing their faces together
That's not summoning, that's love
You didn't got summon by your parents, did you? 💀
thats how children are made
it starts with face smooshing
mojank skipped that part
Don't know why, in a game in where you can build everything
Minecraft animals also have a very short pregnancy
0.5 seconds
It doesn't, first, there appear some hearts, from those hearts, the baby will appear
So the baby is made of hearts
So, the baby animal doesn't get summoned, it gets loved to life
babies are holograms
huh what happened
So they are enslaved to show text and only exist for the client?
yeay
Yes, like you, we live in a virtual reality, you exist only for the client.
Wake up
if only it were that easy
It is, just open your eyes bruh
when you remember its all packets
accurate to real life
I've never been there to see someone giving birth so it must be how it happens
Guys, who can help me with the question of applying effects? Here is my code: https://pastebin.com/raw/gKqV2jEt.
The problem is that for some reason 2 items do not impose different effects at the same time. Conditionally, if I have leggings in the slot for them give the "jump" effect, and the pickaxe in the main hand gives "night_vision", then only 1 of them will work.
if I can do this to your code you already have a problem
HADOUKEN
learn about early returns and extracting functions out of bigger functions
because noone can read this, including you a few days from now
hahahahha
DialogueCommand: https://paste.md-5.net/opihezizet.java - DialogueTask: https://paste.md-5.net/yolufasiti.java The only thing that relates to null is when the player is offline and it cancels the task
this is a sound statement 👼
You are passing null instance of Plugin to itself
That doesn't make sense, learn java please
You are just blindly copy pasting
Without understanding what is happening there
me when doing webdev
Same tbh
this.plugin = plugin;
plugin you never put something non-null in plugin.
You are writing the variable in itself.
?di
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
Read this
https://pastebin.com/raw/gKqV2jEt Is that better?
whats a good inventory api? with item callback etc
is there a way to convert my 1.19 plugin to 1.16.5? do i just change my pom.xml?
Triumph isnt bad
docs? or is it a joke?
https://www.spigotmc.org/threads/a-modern-approach-to-inventory-guis.594005/#post-4553427
You can also just write your own
Not a joke, I haven't update docs in a while.
But is relatively easy to use
there was one with like templates so you could make an inv of invs?
i used it a while ago
and forgot the name
I'm just duplicating the question, I've tweaked the code to make it readable.
oh god this karma gui lib is not good
it has static panes
😦
What am I not doing good?
it also dynamically registers listeners and uses python's naming scheme
Well, that's actually right
I made those really fast, didn't even though on the correct implementation for it
Inventory Framework thats the one
Any recommendation to "fix" my code?
While @lost matrix's proposed AnvilInventory#getRenameText() should work in order to let bukkit handle the PacketPlayInItemName (or custom payload MC|ItemName on older versions, FYI) and set the text field on the wrapped anvil container (AnvilInventory), I couldn't get that approach to function at all. Virtual (non-block-bound) Anvil UIs seem to be weird on bukkit, as I also couldn't manage to set any anvil slot contents. Since I need to perform clientside slot updates anyways (for the bottom inventory UI), I decided to handle the packets myself. If there's any better solution to this, which doesn't require the madness of having one implementation per version, I'd be happy to hear about it. My implementation works from 1.9-present, while 1.8 has some weird crash I didn't yet investigate.
That's exactly what I don't want, xD. I have my own library by now, but thanks for the suggestion! :)
just steal code samples from it
?
change pom, look at the api-version in the plugin.yml
test it out and fix errors
Hi, does anybody know why itemmeta doesnt inherite PersistentDataHolder?
probably because you have an old version of spigot
whats the dependency for spigot 1.16.5?
for the pom
probably 1.16.4
iirc
just try 1.16.5 and keep downgrading until it works
it's not a big deal
if I don't get a confirmation that my keyboard has shipped by the end of next week I'm going to taiwan and firebombing the place making it
and if that doesn't work, 1.16.4-R0.1-SNAPSHOt...
I guess I'm not the only paranoid person with shipments
I'm not paranoid, I have the beginnings of a repetitive stress injury and my normal keyboard hurts to use
homie ordered my birthday gift and it should arrive on monday around 10:30 - 11am, so I'm scheduling my day around it
I just want my zsa moonlander to get here already
looks like an off-brand ps4 controller
has the same amount of keys too
a very astute observation from imillusion once again
alright... first issue
[17:16:52 ERROR]: Could not load 'plugins\ZMPTeams.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: Unsupported API version 1.16.5
at org.bukkit.craftbukkit.v1_16_R3.util.CraftMagicNumbers.checkSupported(CraftMagicNumbers.java:361) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:149) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:414) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:322) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:393) ~[patched_1.16.5.jar:git-Paper-794]
at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:269) ~[patched_1.16.5.jar:git-Paper-794]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1074) ~[patched_1.16.5.jar:git-Paper-794]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[patched_1.16.5.jar:git-Paper-794]
at java.lang.Thread.run(Thread.java:833) [?:?]```
1.16 in your plugin.yml
api-versions on the plugin.yml should not include revisions
not .5?
ye ^
alr
so what are you getting me for my birthday?
rope
if you think I'm throwing that rope down after I yeet you down a cliff you are delusional
private static void visualEffect(int counter, WormholeEntry wormholeEntry) {
for (Vector vector : new ArrayList<Vector>(wormholeEntry.getWormhole().getCachedRotations().get(counter))) {
Location particleLocation = wormholeEntry.getLocation().clone().add(vector);
wormholeEntry.getLocation().getWorld().spawnParticle(Particle.REDSTONE, particleLocation.getX(), particleLocation.getY(), particleLocation.getZ(), 1, 0, 0, 0, 1, new Particle.DustOptions(wormholeEntry.getWormhole().getParticleColor(), 1));
}
}
fun mystery, how is that spawnParticle giving me a CME?
how is that even possible, cached rotations should be getting initialized at the start and never modified... am I modifying a shallow copy or smth
List<Set<Map<Queue<String>, Potato>>>
What's this?
Obviously a list of sets that map a queue of strings to a potato
I think it's better to have this instead:
List<Set<Map<Queue<String>, Potato>>>[0]
An array of lists of sets of maps of a queue of strings to a potato
But the array is 0 in size
whats the dependency for nms? maven
O right, let me fix it
List<Set<Map<Queue<String>, Potato>>>[-1]
Now it's -1, meaning infinite
😈
tf is that
You must compile with BuildTools, and it will be installed into your local .m2(maven) repository
oh right
An infinite array of lists of sets of a map of a queue of a string to a potato
Then change spigot-api to spigot
this.cachedRotations = new ArrayList<>(new VisualEffects(wormholeConfigFields).getCachedRotations());
💀
why bother investigating
I think we should stop joking, I mean, apparently the channel description is "Serious Spigot and BungeeCord programming/development help"
I've added 3 different sql database options to my software and when inputting data mysql, mariadb do it perfectly fine but postgresql returns an error saying it can't find a specific column... Makes 0 sense am I missing something with postgre???
me who just figured out jitpack can pull from github repos
So remove this line?
yes, well... people who ask for help should be prioritized over jokes and other "nonsense" of course :)
Okay, lamo definitly redis is bein asshole today
I cant fix the shity issue related to sending specif server data
So then the data is only sent to data server and is not self listened to it
Pretty simple, but im so dumb that cant figure the why 😡
can I ask smt or are ya'll helping someone
ask away :]
Conclure want to see code?
Atm plain Jedis, but i will change it, dont critice it
jedis, ooough
using an exp bottle does not trigger a player interact event
thats weird
cause Im 99% sure it should ?
only when throwing it in the air
uhh making 9000 streams when the player logins isnt a good idea right?
Wait no interacting with air doesn't call it
prolly not
since it has quite the memory footprint
good ol' for loop :(
ah alr
right im using the next channel pattern <identifier>:global for broadcast message (sent to all servers) and <identifier>:<server> as specific server data input
So the issue comes when i want to send data to its specific server. Here you have some code:
https://paste.md-5.net/iqofalawos.java - Usage example (Skywars)
https://paste.md-5.net/azozekonuy.java - Usage example (Proxy)
https://paste.md-5.net/uloyikiqib.java - Jedis Listener
hmm, and in ur case, are ya able to use sth like entity spawn event instead?
@rough drift
I would be really thanful if you can giveme a small hug with this, i cant understand what happening right now, im really struggling
idle server
did u debug RedisListener properly?
nah, just trying to detect clicks with it
not actually the bottle throwing
it's a custom item
ah i c
Fixed it
o, nice
apparently the event gets cancelled
Yes, i debugged properly
So far global channel works perfect, the issue is while using specific server channel
so if you use ignore cancelled set to true (mcdev default) it won't work
myes
If im not wrong i sent the JedisListener code, also smth i forget to say the "servers" given via RedisBuilder are the channels which im subscrubing
that looks.. ..brr
I really to need to fix this, if not i wasnt beeing so asshole
Ik, just want to fix, i cant lost more time
I am following this tutorial: https://www.spigotmc.org/wiki/using-dependency-injection/ I changed everything to adapt to my plugin, but it is still returning null. I don't know what I should do about this line, but I know it is causing it. Here is my code: https://paste.md-5.net/suzuzosisu.java
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Thern i would write it properly, just need to make it work and the yes i can improvee everything
Just give me a hand to fix it 😬
I just need that
hehe chunk generation, i dont want to see what happens when i use the reverse engineered vanilla one
takes seconds to load
no conclure goes off, now i dont have anyone heling haha
Okay what a good momment to dm some friend, cya for some seconds
Collections.add a redis thing?
No, its a custom class
Which just add the value into a String[]
Mainly
Because Jedis subscripton is so stupid, that just accepts String[] or byte[] for subscribing to channels 😡
k
cool but String[] isnt a collection derivative, rather just an array :>
I try passing a List<String> but no success. that why i created the method
ye, well, btw did u know redis has inbuilt support for pattern based channels
Yes, but they are just for byte, isnt it?
it takes more time
Just want to fix this
Then i recode if you want
😂
I really need to fix this shit, then i can do whatever and follow your improvees
Just give me a small hug to fix this
I cant find the reason
please im being serious, trying to fix this, its really important
well, key input logging isn't possible
but probably possible to do it fairly robustly with just events
oh really thanks bro
(possibly nms also)
I will give a try to it
yea gl verano
What a shity support, 22 hours and none response
Fucking github, it doesnt allow me to invite any people as any repo collaborator
wait what
And seems to me be the only one having that issue
maybe u did sth wrong?
No no
I did correctly
I go to repo/settings/collaborators and invite
they have to join ntl
Then i select the correct user, after that when i select to invite
a) they dont receive the invitation
b) the invitation link is broken with a 404 response
Bump
Have you heard about that?
change to
public DialogueCommand(Plugin plugin) {
probably also want the name of your main class instead of Plugin
as long as you dont need your own stuff sure
well, if u have other stuff, that should come from a different dependency
Are there any other games that runs java and have good dev tools etc like mc?
what are good dev tools according to you?
Well like mc has huge dev support with apis and stuff. So just similar to minecraft, I guess.
Just bored of mc
Fancy a change
hmm, probably not in java
i mean there are other games
but smaller communities
significantly
Yea Java is really oddy for games, specially huge ones
What other big games have similar community size to minecraft with dev support etc. I'm open to learning different languages
FiveM or Roblox, but those have a very big toxic community
^
Do you want to be a game developer?
unity
Lua 💀
terraria is decently big
Lmao idk how people can code on that shity scripting lan
Not really I prefer software design but I'm struggling for motivation at the minute
fivem supports Csharp also tho?
Backend is a good area tho, you can do many things, in that case you can use some langs like Java or JavaScript/TypeScript or C# or Rust
which is like, Java on steroids drunk
Yeah I've done a bit of backend with JS, might go down the spring boot route... Just don't feel motivated at the minute idk why
spring is fairly popular still
Nop conclure, i cant fix this shit
Are you still free?
😬
Now i moved to patterns right
i will open a thread
its better
Redis pattern pub/sub questions
I don't even understand redis, I couldn't find out how to actually create a view a collection... Am I just stupid? Any other db's are fine but redis I just didn't like... Maybe I was looking in the wrong places for info
That's why its so fast. It doesn't has to read from X where Y equals Z, its key will always point to a single value, as simple as that
And you can even store json
Which is a +1
Also because is written on Native lang (C)
Yes but redis, cache it while databases not
Redis is not persisten (you can enable an option for it), but his goal is just to have huge amounts of cache
Plus MySQL doesn't actually brings support to json, only mariadb
I finish written the thread
Yes but different points
Redis = memory database
Sql/NoSQL = persistent databases
Not really, I just know how to use it
I use it to synchronize two ws
redis can be persistent also, btu ye
yes i know, but its not common usage
true
Its mainly designed for catching huge amount of values
#1086707812735909939 i finish wrriting it
Sorry if im being asshole, i must fix this, i have been many hours
Legacy versions 💀
change 1.19 to 1.8?
Dont proxy just contain 1.16 and 1.19 options?
But bungee 1.16 allows to connect 1.8, 1.9, 1.10, etc players up to 1.16 mc version?
uhh
time to make the fork up to date
and why "won't it load"? what's the error?
1.7 is 9 years old lol
Well then from almost a decade ago, wow
Uri is blocked on my country, please use paste md5
oh this is a thing
When using spigot, you have to use ?paste uri
How can i add multi-version support to a plugin? Like support for 1.12 and 1.16
why don't you just use the latest bungeecord? it does support your 9 year old version, doesnt it?
Depends on the things, some things are version dependent
Is there any specific way to light an end portal? I'm spawning one with all ender eyes but it isn't light. and the blocks are facing the right direction.
by using the 1.12 api
it definitely supports 1.8
1.7, not sure
The plugin i want to change has only commands
do you have worldguard?
No.
lighting a self built one probably wont work
What do you mean?
You can light a portal place dby yourself im just trying to figure out how to do it from a plugin side
clearly a mismatched version issue
On spigot discord you must use https://paste.md-5.net/
encouraged to use*
Must, because those weird paste they use are most of them taken down by Interpol caused to DMCA implicits
lol
tf
oh yeah I recall having my spigot code on pastebin being taken down by interpol
so relatable man fr fr
everything that I must do is outlined in the laws of my country, discord terms of service and the rules of this server & channel
Na dont fuck, for sigot just use https://paste.md-5.net/
Those weird uris for pastes looks like 1900s sites
well I do but you can't say that I must do it lmao
anyone mind doing sort of a code review here in a couple hours? Tryna get input on the way I use static and singletons
if I want I can use pastebin or whatever
send the GitHub right away, I or someone else may take a look
oh you don't have it yet
well do you have any parts of code that are ready?
Why github support is so shity
They have taken 22 hours and no answer, its really import ticket tho
Oh my fucking god
sorry dude, must I use gitmd5 on spigot or something
it just wasn't clear my bad
Imagine that i have to open ticket on Github because their collaborators system is broken on my account, people i invite to repos doesnt receive the invitation or the link they received is broken with a 404 code
the urge to use atomic ints 💀
whats an atomic int do
volatile int wrapper with some extra logic
ensures all accessing threads see its value the same way
yes, still better than those stupid ifs
is it performance heavy at all btw
6 lines of code for 2 checks 💀
the atomics
well the int is volatile so it isnt stored in cpu cache but its retrieved from main memory every time
is there some way to use custom player heads without having to change my skin every time? (I didn't start yet, but I assume that old player skins stay uploaded somewhere for this to work..?)
shouldnt be noticeable
ty
you can probably do that in the same amount if lines as rn but using ternary
unless you care about 3 cpu cycles
looks ugh but whatever
this algorithm has to work instead
instead of what
instead of not working
lemme just spawn a thread that keeps responding to keep alives when i start debugging 🤡
yeah
I can't believe you would do that :O
On Minecraft-Heads.com you can find more than 30.000 custom heads, which can be used to decorate your world! The collection is seperated into two databases: the first contains custom heads, which never change their texture, using the Give-Codes from Minecraft 1.8+, the second one includes player heads which can be used in all Minecraft versions.
then just use bukkit's PlayerProfile feature
Should be Bukkit#createPlayerProfile
or something along thos elines
oh i can debug player inv stuff while player is offline
i have class Gui implements InventoryHolder and listener for inventoryclickevent, then i check if event inventory holder instanceof Gui but holder of inventory is null, someone have idea why?
Nice wave
My eyes are burning
It's a world generator that makes those plots based on a basic mathemathical function
here's a basic example:
(Yes it is infinite)
A plot is
edge, block x16, edge, roadx4
so the total length is 22
isEdge -> index % 22 == 0/17
isBlock -> index % 22 within (1, 16)
isRoad -> index % 22 within (18, 21)
and you just set the blocks depending
or you can do some fancy math and just fill out the squares and road individually
I believe the sizes are all configurable
i have 2 plugins
plugin 1 is an dependency of plugin 2
in plugin 2 plugin.yml i put depend: [plugin1]
why my server keep loading plugin 2 before plugin 1 ?
delay plugin 2 loading
Emmm yes but how ?
plugin 2 absolutly need plugin 1 to work
i think yes because depend: [plugin1]
i puted the same name that the /plugins give
hmm that should be all you need
For example, this works softDepend = ['WorldGuard', 'Towny', 'GriefPrevention']
yes yes iiii maybe missed something in the code of plugin1 :(
loadbefore is what you want
No it isn't
If you control both plugins, use depend
depend will stop plugin2 from loading if plugin1 is not installed
why its there
if you want to do that create a check onload on the 2nd plugin
simple enough
Why do that when spigot can do it for you
softdepend will nto affect load order. Depend will
You're an idiot.
plugin2 depend of plugin1 and cannot work without
softdepend
A list of plugins that are required for your plugin to have full functionality.
The value must be in YAML list format.
Use the name attribute of the required plugin in order to specify the dependency.
Your plugin will load after any plugins listed here.
Circular soft dependencies are loaded arbitrarily.
unless you add any of the other load priorities then depend will ensure teh load order
yeah, look at teh actual code and softdepend does not affect load order
i dont understand why soft depend will not affect the load order
but the difference is that soft depend will not block your plugin from loading
correct, softdepend only checks the plugin is there, no affect on load order though.
do you have softdepend too for other plugins?
no its just a test that i'm doing
but i think maybe i know why
wen does onEnable is called ?
after onLoad
yeah because like i create the instance in onEnable
soooo maybe i should create it on onload because the onEnable of plugin1 trigger after the loading of plugin2
ok nevermind
the plugin2 load and enable before plugin1
wtf even whit the depend
what the depend is ? is it the artefact ID ?
or is it the plugin name in the plugin.yml
OOoook
so whyyyyyy my spigot is doing that :((((
softdepend does change the load order if possible
Bump
Hashmaps are only saved in cache, you need a way to save the hashmap
You can do it in yml, Json files or databases, or using player's PersistentDataContainer
Before vs After, only change made was adding softDepend = ['WorldGuard', 'Towny', 'GriefPrevention'] to Blueprints plugin
[15:47:59] [Server thread/INFO]: [WorldEdit] Loading server plugin WorldEdit v7.2.13+46576cc
[15:48:00] [Server thread/INFO]: [WorldGuard] Loading server plugin WorldGuard v7.0.8-beta-01+cbb2ba7
[15:48:00] [Server thread/INFO]: [Blueprints] Loading server plugin Blueprints v1.0.0
[15:48:00] [Server thread/INFO]: [Towny] Loading server plugin Towny v0.98.6.0
[15:48:00] [Server thread/INFO]: [GriefPrevention] Loading server plugin GriefPrevention v16.18.1
[15:49:42] [Server thread/INFO]: [WorldEdit] Loading server plugin WorldEdit v7.2.13+46576cc
[15:49:42] [Server thread/INFO]: [WorldGuard] Loading server plugin WorldGuard v7.0.8-beta-01+cbb2ba7
[15:49:42] [Server thread/INFO]: [GriefPrevention] Loading server plugin GriefPrevention v16.18.1
[15:49:42] [Server thread/INFO]: [Towny] Loading server plugin Towny v0.98.6.0
[15:49:42] [Server thread/INFO]: [Blueprints] Loading server plugin Blueprints v1.0.0
load order is not guaranteed, unless depend. it's random depending on the directory file list
The directly file list did not change
one startup may show a different order then the next
is there any api i can use to generate minecraft maps from images? i know theres one website that does it, but i want to implement it in the plugin
Alright lets see
no not the presence of files, the order the system provides them
check stash, I dug through all teh load code ages ago
depend and softdepend are handled differently. soft does not affect the order
It does
[15:52:56] [Server thread/INFO]: [WorldEdit] Loading server plugin WorldEdit v7.2.13+46576cc
[15:52:57] [Server thread/INFO]: [WorldGuard] Loading server plugin WorldGuard v7.0.8-beta-01+cbb2ba7
[15:52:57] [Server thread/INFO]: [GriefPrevention] Loading server plugin GriefPrevention v16.18.1
[15:52:57] [Server thread/INFO]: [Towny] Loading server plugin Towny v0.98.6.0
[15:52:57] [Server thread/INFO]: [Blueprints] Loading server plugin Blueprints v1.0.0
[15:53:46] [Server thread/INFO]: [WorldEdit] Loading server plugin WorldEdit v7.2.13+46576cc
[15:53:47] [Server thread/INFO]: [WorldGuard] Loading server plugin WorldGuard v7.0.8-beta-01+cbb2ba7
[15:53:47] [Server thread/INFO]: [GriefPrevention] Loading server plugin GriefPrevention v16.18.1
[15:53:47] [Server thread/INFO]: [Towny] Loading server plugin Towny v0.98.6.0
[15:53:47] [Server thread/INFO]: [Blueprints] Loading server plugin Blueprints v1.0.0
[15:54:24] [Server thread/INFO]: [WorldEdit] Loading server plugin WorldEdit v7.2.13+46576cc
[15:54:25] [Server thread/INFO]: [WorldGuard] Loading server plugin WorldGuard v7.0.8-beta-01+cbb2ba7
[15:54:25] [Server thread/INFO]: [GriefPrevention] Loading server plugin GriefPrevention v16.18.1
[15:54:25] [Server thread/INFO]: [Towny] Loading server plugin Towny v0.98.6.0
[15:54:25] [Server thread/INFO]: [Blueprints] Loading server plugin Blueprints v1.0.0
3 more startups
?stash
It does. hence paper will actively reject your plugin if you have softdepend and loadbefore at teh same time
It wouldn't make any sense anyways
Outside as a suggestion of sorts that is - but in that case the plugin.yml would need to look a lot more differently
?
really?
Although java.awt.Image is kinda meh
yea
If you don't care about performance it's okay but outside of that you'd want to use LWJGL or similar for rendering
I'm using it, but to be fair only at startup
how do u create a map?
👍
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/browse/src/main/java/org/bukkit/plugin/SimplePluginManager.java#294 softdepend does not affect load order
that's extremely slow compared to doing it yourself
if it is in softdepend is goes ahead and loads it. it does not get delayed
that line contains both depend and softdepend. Are you sure you wanted to contain that particular line?
doesnt work
// We're clear to load, no more soft or hard dependencies left
im using 1.16 btw
And if we are applying de-morgan we get
if (!dependencies.containsKey(plugin) && !softDependencies.containsKey(plugin) && plugins.containsKey(plugin)) {
Yes, we had this issue with Towny for the longest time. On some systems it would error due to load order. Others would work fine. soft depend was the issue
depend fixes load order
Could be something that was an issue in older versions of bukkit
// We now iterate over plugins until something loads
// This loop will ignore soft dependencies```
@eternal oxide
line 317
?
all depends get resolved first, then it loads all others no matter if it has a soft or not
Doesn't that loop only run if teh dependency is not present?
no it runs for all plugin which HAVE a depend, soft or depend
Does anyone know how to use the generateNoise() override method in the ChunkGenerator class??? I don't understand what the point of it is or how to change the noise during this... For reference I am trying to make a plugin that generates a vanilla minecraft world, with a custom heightmap... somehow editing the noise function to be the function I have for the heightmap seems the most logical, no? but at the same time this generateNoise() method seems almost useless? can anyone help? Here is a link to the method https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/generator/ChunkGenerator.html#generateNoise(org.bukkit.generator.WorldInfo,java.util.Random,int,int,org.bukkit.generator.ChunkGenerator.ChunkData)
declaration: package: org.bukkit.generator, class: ChunkGenerator
the first section runs for all plugins which don;t have any depends
can I add a player's uuid as a valid team entry?
players add to teams by name, entities by UUID
but... why?
is there any alternative to ProtocolLib? its not working for 1.19.4
Ask mojang
I mean my testing showed the load ordered changed when I added softdepends, so I'll stick with that
it changed because your files on disc changed so your system offered up a different order
So if I delete the file and copy it again, it should change again
it MAY not guaranteed
it all depends on the FAT
This is why it took us so long to figure out our bug, it was so unreliable to replicate
Well, after deleting and copying it again 4 times it has not changed
It would be so much easier if it did affect teh order
to duplicate the load order issue for me it took a completely different system
I mean
You would think removing the softdepends would not change the load order then
Still on the same system
I never found any rhyme nor reason to when it changed.
so finally dug into the CB source
the order files are offered up by the system are not guaranteed.
I guess I could modify bukkit to print the order it receives the files
that would be a good test
then we can see if that matches the load order
can u create npcs with spigot or u gotta use nms?
NMS
find the bug
Or citizens api
link?
is there a good tutorial on it?
no idea
💀
sorry for the photo however im using 1.8.8 anyone know why this wont work https://cdn.discordapp.com/attachments/1084282431114322011/1086747518949396610/D8788EA8-2C5D-4131-883C-5ED1F105CE29.jpg
why 1.8.8......
last 1.8 version
Client-only iirc
oh
Unfortunately this is too little information to be able to help you adequately
I'd guess you have a compilation error though.
Good luck
Hello, I have problem with deleting an armorstand.
First I save my armorstand in hashmap called "knockedout":
ArmorStand as = victim.getWorld().spawn(victim.getLocation(), ArmorStand.class);
{
as.setVisible(false);
as.setCanPickupItems(false);
as.setInvulnerable(true);
as.setMarker(true);
as.setSilent(true);
victim.getScoreboard().getTeam("noCol").addEntity(as);
as.setCustomNameVisible(true);
as.addScoreboardTag("knockout_counter");
as.setGravity(false);
as.setAI(false);
as.setPersistent(true);
as.setCustomName("KNOCKEDOUT");
};
victim.setPassenger((Entity) as);
Object[] data = new Object[]{60, 15, null, 10, null, as.getUniqueId()};
knockedout.put(victim.getUniqueId(), data);
Later I collects his UUID from this hashmap
Object[] data = knockedout.get(id);
Player p = Bukkit.getPlayer(id);
ArmorStand as = (ArmorStand) Bukkit.getEntity((UUID) data[5]);
p.sendTitle(ChatColor.GREEN + "HEALED", ChatColor.WHITE + "You have been healed by " + helper.getDisplayName()); //WORK
p.setPassenger(null);
as.remove();
p.getScoreboard().getTeam("noCol").removeEntity(p); //WORK
knockedout.remove(id); //WORK
And everything looks fine, because the armorstand disappears, but when we get all passengers of that player, this armorstand is still there. Then I can't add any other passenger. Any ideas? I'd be grateful if someone helped.
https://bugs.mojang.com/browse/MC-261082
*Forgor ping
sorry didnt add. It's s sayng Material.MOB_SPAWNER is unresolved
cannot resolve symbol
@modest garnet https://helpch.at/docs/1.8.8/org/bukkit/Material.html#MOB_SPAWNER should exist. Double-check your imports
org.bukkit.Material
Are you really using 1.8.8?
nah m8, beta 1.2
i.e. try LEGACY_MOB_SPAWNER. Does that compile? If yes, you have an issue
anyone know if entity spawning changed in 1.19.4?
I don't think I even launched that version yet ¯_(ツ)_/¯
specifically I'm not seeing packet 0x1 hit the wire when spawning an entity
Should still be sent
https://bugs.mojang.com/browse/MC-50247
We decided against using UUIDs for players on scoreboards. Scoreboards are not meant to be long term storage of persistent data and having players lose their scoreboard progress after a name change should not have too much impact.
yep order changes
Only when I change file names
yes, thats enough at times to affect the order files are discovered
almost any change to files many affect discovery order
Notice that the file order for 1 and 4 are the same
But the load order changes since I removed the softdepends
its quite random
bruh
On windows at least, it's always reading the files in alphabetical order
Ignoring case
I guess there are edge cases where softdepend fails and others it works for ordering
in all my tests teh only fix was depend over soft
its possible. this was a long time ago
java.lang.NoClassDefFoundError: net/citizensnpcs/api/CitizensAPI
at com.zushee.zmpteams.plugin.trader.Trader.createTrader(Trader.java:15) ~[?:?]
at com.zushee.zmpteams.plugin.world.Worlds.lambda$createWorlds$0(Worlds.java:116) ~[?:?]
at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:485) ~[patched_1.16.5.jar:git-Paper-794]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1083) ~[patched_1.16.5.jar:git-Paper-794]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[patched_1.16.5.jar:git-Paper-794]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.ClassNotFoundException: net.citizensnpcs.api.CitizensAPI
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:155) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:114) ~[patched_1.16.5.jar:git-Paper-794]
at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?]
... 7 more```
can any 1 help, citizens api doesnt load
my pom.xml:
try adding citizens jar file into project modules dependencies.
Are you depending on citizens in your plugin.yml
no?
how?
depend: [Citizens]
wait, am i supposed to add a plugin?
player living in congo
Or you can buy it, since it's premium
Bump
what line is the error at?
what aint working
public DialogueCommand() {
this.plugin = plugin; //here
}
Hmmm
You are assigning this.plugin to itself
Which does nothing
oh lmao
yes
you forgot the injection part of dependency injection
you need a constructor parameter that is the plugin you want to store
Ah, seem as if org.bukkit.WeatherType is missing thunder lmfao
only clear and downfall
Thunder is not a weather type
It is though
It's just an extra flag when it is raining
It makes the sky darker
mfw weathertype is not a boolean
Still a weather type chief
nope
Ayo chief
maybe logically, but technically, no
Yeah I also recall it being an extra boolean
thats an essentials command
mhm
that is vanilla
I am in single player @eternal oxide
There's toggledownfall and thunder
@young knoll Find that method on player tyvm ❤️
afaik there's none
for some reason it's only rain or no rain for per player
uhh go do it then
^
Oh yeah it's still backwards
if (type == WeatherType.DOWNFALL) {
this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.STOP_RAINING, 0));
} else {
this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.START_RAINING, 0));
}
Mojank
Notice that setting it to downfall sends the stop rain packet
it does lmao
Full method
public void setPlayerWeather(WeatherType type, boolean plugin) {
if (!plugin && this.weather != null) {
return;
}
if (plugin) {
this.weather = type;
}
if (type == WeatherType.DOWNFALL) {
this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.STOP_RAINING, 0));
} else {
this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.START_RAINING, 0));
}
}
in NMS, right?
Bukkit reverses it again to be the correct form?
No
It is correct, just backwards
Well more specifically the mappings are wrong ig
Also the packet for thunder is not a simple on/off
Its a float
somethings weird with the AddEntity packet in 1.19.4 https://i.imgur.com/tllCgaT.png should be the 2nd packet sent there
if (plugin) i thought i was looking at some weird js for a moment
there is nothing weird about js /s
oh i loved writing methods today that dont return anything although they have to

DOM 💀
?
NextJS ❤️
idk im learning webdev at college
angular newt year
Nuxt is nice
dont let me write html/css or ill fuc k up so badly
you daont want to see my exam file
real quick, if I have a blockstate of a block whose world unloaded if I access blockState#getWorld will that make it unhappy or should it be a relatively safe access?
What are you trying to do with that World
something tells me you're hard-referencing that
Unhappy
check if it's loaded to stop it from tanking the server
in which case the world wouldn't be properly garbage collected, no?
If it does anything at all
guess I'll pass a reference to the world uid then
me who was already looking through the stash
thanks
if world is null, it throws an illegalstate
Yes but world won't be null if created from a loaded world
will it evaluate to placed if the world no longer exists?
Yes
whats that weakWorld thing?
where's my gigachad world
lmao i probably got a memory leak by keeping 200 item tags into memory
there are no memory leaks just happy little patches of fun memories of the times we had together
Weird that there's two worlds....
Also the weak one can still blow up if it hasn't been GC'd yet
ok so I'll just get the world uuid ahead of time huh
why do i get this error:
Cannot invoke "org.bukkit.inventory.ItemStack.getItemMeta()" because "teststack[i]" is null
on this loop:
for(int i = 0; i<10; i++) {
if(item.getItemMeta().getDisplayName().equals(teststack[i].get ItemMeta().getDisplayName().toString())) {
p.sendMessage("Display Name: " + teststack[i].getItemMeta().getDisplayName().toString());
}
}
When it clearly works? Like it works i just want to get the error out of the console
itemstack[i] is null?
but it isnt
does that come from an inv?
"in an inventory" do those stacks come from an inventory or not? there no item there then
no those stacks get created in methods like these:
public static ItemStack[] getItemStacksDamageEnhancementUnlocked(Player p) {
ItemStack[] skillpoints = new ItemStack[9];
int damagelevel = skillCommand.cfg.getInt(p.getName() + ".Damage");
for(int num = 0; num<damagelevel; num++) {
skillpoints[num] = new ItemStack(Material.GREEN_CONCRETE);
ItemMeta nameMeta = skillpoints[num].getItemMeta();
skillpoints[num].setAmount(1);
nameMeta.setDisplayName("§alevel " + (num + 1));
ArrayList<String> namelore = new ArrayList<String>();
namelore.add("§6increases your total damage done");
namelore.add("§6against enemys by §e" + ((num+1)*5) + "%§7.");
nameMeta.setLore(namelore);
skillpoints[num].setItemMeta(nameMeta);
}
return skillpoints;
}
I wonder if I could get that modelengine alternative done by april first to do a fun prank
damagelevel is lower than the amount of stacks then
i mean the stacks created are based on the damagelevel
public static ItemStack[] getItemStacksDamageEnhancementUnlocked(Player p) {
ItemStack[] skillpoints = new ItemStack[9];
int damagelevel = skillCommand.cfg.getInt(p.getName() + ".Damage");
for(int num = 0; num<damagelevel; num++) {
skillpoints[num] = new ItemStack(Material.GREEN_CONCRETE);
ItemMeta nameMeta = skillpoints[num].getItemMeta();
skillpoints[num].setAmount(1);
nameMeta.setDisplayName("§alevel " + (num + 1));
ArrayList<String> namelore = new ArrayList<String>();
namelore.add("§6increases your total damage done");
namelore.add("§6against enemys by §e" + ((num+1)*5) + "%§7.");
nameMeta.setLore(namelore);
skillpoints[num].setItemMeta(nameMeta);
}
return skillpoints;
}
well it loops through damagelevel itemstacks then and leaves the rest null
ohh wait i think you are right, the array is limited to 9
yeah it fixed it, im dumb thank you
I think ImIllusion broke into my house and stole my toothbrush, I can't find it anywhere
they know I'm about to blow up as a youtuber and they want some memorabilia
Muhahahah it wasnt him.
Beard trimmings.
each strand of hair is worth its weight in antimatter
How much is antimatter worth
pound for pound about as much as my hair
there's also its namesake in physics which merely costs 62 trillion per gram
How does it have a price
peanuts
price of production for experiments, it's not a commercial product
Because they produce it
I did not expect us to be able to produce it
Thats basically the cost of energy and equipment wear
you thought we'd just find it somewhere randomly?
aw shit I was digging in my backyard and found 3 grams of antimatter
I thought it was more of a theory
where should I click to call ClickType.WINDOW_BORDER_RIGHT?
On the right window border 
Yes. But with right clicks
what if nothing happens?))
Either I'm not clicking there, or I don't know. no errors
Add sysouts to check if the event is even fired
then you can create an inventory with more than 54 slots? I mean, use the player's inventory as well. and at the same time do not replace his things?
Hello! Can anyone have any idea why this happens
Here it says Only valid for shaped recipes https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/RecipeChoice.ExactChoice.html
declaration: package: org.bukkit.inventory, interface: RecipeChoice, class: ExactChoice
But by accident I inserted it into ShapelessRecipe and...
you can store the inventory contents somewhere and restore them after they close the menu, but idk if thats teh best /reccomended way
it just works?
Why does the doc say that then?
lemme say i have this class, if something outside that class still uses EMPTY_INGREDIENT, can my recipeloader object be freed or not?
Yeah I think the docs are outdated
And no one is really sure what it works for
So no one has updated them
To send a player info update packet, do I also need to first send a player info remove packet?
Yes. Statics have no relation to instances.
ah, checked it with visualvm to be sure and yep
that server.start method is blocking so hmm
ofc it is
it runs on the thread that called it
well ye so my method isnt exited so how can that recipeloader be gced?
Where is that method
Simple, no
run method
at the end of it?
yes
If anything holds a reference to an object (or to it's fields) it will never get GC'd
nice
anyways yeah it will be freed
because the GC knows it's not used anymore

