#help-development
1 messages ยท Page 26 of 1
maven looks like html and I hate it
I use maven
mojang mappings are pretty easy
it's a markup language
Then use special source plugin
well I can barely look ahead without my eyes fogging up
imma try to slep
probably gon wake up at 6pm
Did this
Thatโs because HTML is XML and Maven is also XML, and XML is hateful
It did not work
โฅ๏ธ happy to share
not explanatory enogh
website written in java when
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
You can do that. It's uh. Bad?
@tender shard this guy seems to not like your blog post, explain it to him "personally"
It's just like I didn't change anything
No errors or anything
It just did nothing
did you add the maven dependency :)
Think so
Send pom moment
Thissssss
One sec
slayyyyyyy
And paste it
yo how to i remove all of a specific itemstack, remove# doesnt work and removeItem# doesnt work
Loop thru inventory *
What's wrong with the spigot one?
And set air
Sorry for interrupting but I would like to ask if somebody could help on my thread.
What u are trying to remove
I got you
I'll write you one
give me 2 minutes

im trying to remove a custom item stack, setting it to air isnt possible to my knowledge
Depends on how
Sometimes youโre given a direct proxy delegate that reflects onto nms
And sometimes its just a normal context object, in which manipulating it will have no effects
public class MyPlugin extends JavaPlugin {
public void onEnable(){
Bukkit.getPluginManager().registerEvents(new MyEvent(this), this);
}
}
public class MyEvent implements Listener {
private final MyPlugin plugin;
public MyEvent(@NonNull final MyPlugin plugin){
this.plugin = plugin;
}
@EventHandler
public void onJoin(PlayerJoinEvent e){
plugin.getLogger().info("Wow I used the plugin in this class crazy as fuck");
}
}```
my pom file is too large but I can't send a file in this channel
where should I send it?
?paste
:P
not spoonfeeding purely provided an example of dependency injection its up to that person to apply it
by that logic all learning resources are simply spoonfeeding
Its impossible to spoonfeed someone who doesnโt elaborate on what they need, tho hopefully people dont spoonfeed you but instead providing pseudo examples
well yeah but still better than someone just saying "use this method" and then continue to provide nothing else on what it does lmao
when it comes to just using a method I'll just say yea use a method lol
its easy to apply it given the docs are used
Thanks
Dependency Injection is a fundamental concept not a method
Best out there and most easy to understand no ton of bullshit and libraryโs
Well, saying something like โyou could use X, tho think about Yโ is generally speaking enough
Dependency Injection is just fancy for passing around what you need in constructors
just remember to stick with lowest values like Plugin instead of MyPlugin etc
it makes your code more portible
?di believe there is quite literally almost an identical example here tho evan
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
is there maybe some website where I can see what each mapping is mapped to?
Screamingsandals
I made a function to make a particle helix, I want it to flip directions and "come back down" once it hits a certain height. Any ideas? its currently just completely stopping at the top
public static void createHelix(Location location, float radius) {
new BukkitRunnable(){
public void run() {
new BukkitRunnable(){
double t = 0;
public void run(){
if (t < 100) {
float x = (float) (radius * Math.sin(t));
float z = (float) (radius * Math.cos(t));
float y;
if (t < 20) {
y = (float) (radius * (t / 10));
location.getWorld().spawnParticle(Particle.DRIPPING_HONEY, location.getX() + x, location.getY() + y, location.getZ() + z, 1);
} else {
y = (float) (radius * (t * 10));
location.getWorld().spawnParticle(Particle.DRIPPING_HONEY, location.getX() + x, location.getY() + y, location.getZ() + z, 1);
}
t += 0.1;
}
}
}.runTaskTimer(cadiaBees, 0, 0);
}
}.runTaskTimer(cadiaBees, 0, 200);
}
we should teach Guice
Why
I don't like Guice depency Injection it makes it hard to adapt
purely a joke but you got me before I could spell a word
itโs ok for really large programs
Oh, me just not getting the irony 
anything small is just overworked if itโs using Guice
nope itโs just that I was too far scrolled and was still on the dependency injection being a concept not a method xd
I don't get it like usually I always pass around 1 main thing, but what if I want to pass in other values too
with guice that becomes impossible
Thats kinda not good tho
Or well, it isnt that much better than a singleton
(Little bit)
whats wrong with passing needed values into a constructor
But Ive seen some fairly big projects doing that in practice also like LuckPerms
So wouldnt blame ya
My point is a lot of people just pass their main instance everywhere
what would be the alternative for moving stuff around that you'd reccomend just curious if constructor passing is bad
oh I don't do that
I only pass what i need
My sonar lint is extremely strict lol Its usually just like bruh

the only thing I don't follow is the complexity practices sometimes I just need one more if statement to make my method work lol
Ah
pls
its very rare I set them off but if I do its super annoying because Its not worth it to split up that method usually
should coordinate arguments in commands be parsed as floats?
you can probably go for doubles
Since thats how theyโre afaik stored (Through Location and Vector for instance)
thanks
I need to break the habit of finaling all of my local variables lol its pointless but I do it every time
Ah, I usually only add final if the function becomes impolitely big for readers to keep track of eventual mutations, but it is actually good as it can reduce the amount of bc instructions when compiling (not that it matters a lot but still Ig)
I'm actually surprised I was able to land a job at a server with only a year of programming experience I'm glad someone thinks My code is good enough for that lol

if someone doesn't like my posts, no problem lol
every time I look at my code I go oh lord what the fuck is this get this away from me
beat them up
Hehe, I used (and still do to some degree) just hide everything behind interfaces so I cant see the ugly implementation
thats what I started doing
if i look at my implementation I cringe so we just make some neat tighty interfaces
Myeah, altho there are some benefits with it Ig like decoupling and mockability
It is called abstraction ๐
๐
any tips on iterating through all blocks between a selection of two coordinates?
adding
So uhhh...is there a way to use world#spawnParticle without the particle spazzing out? i.e. Dragon_breath spreads out
I want it to stay still
the only way ive found that works is packets.
If its a really large volume, split the iteration up into multiple tasks running on individual ticks and add necessary synchronization (necessarily not anything with multithreading)
thanks
but for iterating
like
how would I go about going through all the locations
O(xyz)
Not the most efficient time complexity, but you cant get any better, you just have to come up with tricks to make it scalable enough
O(n^3)
Only if itโs a cube
Lol
so should I just schedule a new task with my for loop inside?
One way to do it
Depends on where the bounds come from, for example if itโs always y bound = 2, then its O(n^2)
?workdistro
Might wanna peek at that
thanks
If there are restrictions, yes, but time complexity simply is the number of iterations in the worst case
so to say itโs O(xyz) is not technically wrong but no one would give that as the time complexity, too situationally dependent
Its not good if that happens
But for sth to take 50ms you have to do something quite expensive such as IO or large computations
My point was more, if the boundaries are arbitrary or a cube, yeah itโs O(n^3), but if they fall within specific constraints, like only y = -1;y<= 1;y++ then it could be a different complexity
It depends how they construct the shape
so should I use additions for distrubuting the workload on this?
anyone know why player.getInventory().removeItem(item) would only remove one of the itemstack and not all of them even though it respects item sizes
i made a completely different class and it still wont remove all of the stack
protected void onCommand() {
Player player = (Player) sender;
ItemStack item = new ItemStack(Material.CALCITE);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName("hi");
item.setItemMeta(meta);
PlayerInventory inventory = player.getInventory();
if (args.length == 1) {
if (args[0].equalsIgnoreCase("give")) {
inventory.addItem(item);
} else if (args[0].equalsIgnoreCase("remove")) {
inventory.removeItem(item);
player.updateInventory();
}
}
}```
Whenever I use gson to save a string with these characters โฏใ it saves as weird characters and loads back in as ???
u mean json?
gson saves to json files yes
Make sure u use a consistent encoding and decoding
Well it saves as "๎พ๎??๎๎๎?๎พ๎??๎๎??๎พ๎???๎?C๎พ?๎??๎?a๎พ?๎?๎๎?d๎พ???๎๎๎i๎พ????๎๎a ๎พ????๎?H๎พ?๎?๎๎?i๎พ?๎?๎๎?v๎พ????๎?e๎พ????๎๎?๎พ????๎๎?
How do u save and load?
it should be #c35bfbโฏ#b65ff8ใ#a963f6C#9c67f3a#8f6af0d#826eedi#7572eba #6776e8H#5a7ae5i#4d7ee2v#4081e0e#3385ddใ#2689daโฏ
gson
public void saveHives() throws IOException {
File file = new File(cadiaBees.getDataFolder().getAbsolutePath() + "/hives.json");
file.getParentFile().mkdir();
file.createNewFile();
Writer writer = new FileWriter(file, false);
Gson gson = new GsonBuilder()
.registerTypeHierarchyAdapter(ItemStack.class, new ItemStackSerializer())
.registerTypeHierarchyAdapter(Location.class, new LocationSerializer())
.disableHtmlEscaping()
.setPrettyPrinting()
.create();
gson.toJson(cadiaBees.hiveManager.getCustomHives(), writer);
writer.close();
}
public void loadHives() {
File file = new File(cadiaBees.getDataFolder().getAbsolutePath() + "/hives.json");
if(file.exists()) {
Reader reader = null;
try {
reader = new FileReader(file);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
Gson gson = new GsonBuilder()
.registerTypeHierarchyAdapter(ItemStack.class, new ItemStackSerializer())
.registerTypeHierarchyAdapter(Location.class, new LocationSerializer())
.disableHtmlEscaping()
.setPrettyPrinting()
.create();
List<CustomHive> hives = gson.fromJson(reader, new TypeToken<List<CustomHive>>() {}.getType());
for(CustomHive hive : hives) {
cadiaBees.hiveManager.addHive(hive);
cadiaBees.hiveHoloManager.setupHiveHolos(hive);
ParticleUtil.createHelix(hive.getHiveLocation().add(0.5, 0, 0.5), 1);
}
}
}
no his problem isnt gson
use Stu like
try (var writer = Files.newBufferedWriter(file.toPath(),StandardCharsets.UTF_8){
//use the writer
}
btw
It shows weirdly in notepad++ but when he uploaded the exact file onto discord it displayed fine in the file preview
But the encoding was right so no clue why
Oh right, on phone
Everything loads fine ingame except for those characters i posted above
Wdym by except
Like in game it shows those weird colors instead of the hex?
heres a side by side
ah wtf
Well FileWriter is ehmโฆ
Anyway
Idk what java version you use
But older ones do not necessarily use a consistent default charset, might be os dependent etc
And some classes still havent migrated to a default of utf8
They have
Ah they sent it
im on java 17
So uh
LOL
this is with the buffered thing
its screaming
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
any help?
it legit says in the api it should work but it just doesnt
Player told me that he spawned in a block
loc.setY(loc.getWorld().getHighestBlockAt(loc).getY());
i keep teleporting when walking to bamboos
anyone know how to fix it?
Why is it null: data.getConfigurationSection("Quarries")
Config:
Quarries: []
what is FAWE?
Cause that's an array/list not a section
Doesn't it work like that? Should I use a Map instead maybe?
@Override
public void initializeFields() {
getFileConfiguration().addDefault("Quarries", new ConfigurationSection[0]);
getFileConfiguration().options().copyDefaults(true);
getFileConfiguration().options().copyHeader(true);
saveConfigFile();
}
I don't think you can make an array of sections
But a section is analogous to a map
does gpl3 allow me to hide source code?
tysm
oooh big man is here
possibly my only hope of fixing this issue
first screenshot's text saves and reloads as the 2nd
public void saveHives() throws IOException {
File file = new File(cadiaBees.getDataFolder().getAbsolutePath() + "/hives.json");
file.getParentFile().mkdir();
file.createNewFile();
Writer writer = new FileWriter(file, false);
Gson gson = new GsonBuilder()
.registerTypeHierarchyAdapter(ItemStack.class, new ItemStackSerializer())
.registerTypeHierarchyAdapter(Location.class, new LocationSerializer())
.disableHtmlEscaping()
.setPrettyPrinting()
.create();
gson.toJson(cadiaBees.hiveManager.getCustomHives(), writer);
writer.close();
}
the Team class only has addPlayer and addEntry, and cannot add entities... any idea how to?
anyone know why player.getInventory().removeItem(item) only removes one of the items i specified even if i have multiple?
I want to fully track some type of entity (caching them)
EntitiesLoadEvent so when they load i know they are subject to be seen
EntitiesUnloadEvent so i can unload them from my cache too cuz they are no longer subject to be seen
is there any events that i might want to listen to? Like if they are removed by player / destroyed / moved, etc? Are there events for those?
I just need to track them (track them as in, always know their coordinates without sending some .getNearbyEntities all the time
nvm figured it out lol
does anyone know the namespacedkey for "using a totem of undying"?
nvm I found it
minecraft:adventure/totem_of_undying
lmao sorry copilot, but this isn't exactly what I meant lol
Eclipse loves to do that on its own
lmao
every copy/paste
they also cast it to (Player)
plugin idea plz smth related to board games or anything thats fun
is there a better way to grant advancements except to loop over their criterias?
chess plugin
already there and you said it twice xd
i dont think there is
I'll repeat this suggestion everytime you ask lol
theres a command thothat would give u every advancement
/advancement give everything or smthing along those lines, i did see it in a yt vid two days ago
Postmortal
yeah but using commands is a weird method
oh yea no other way than iteration
Listen for ChunkLoadEvent, ChunkUnloadEvent, EntitySpawnEvent and EntityDeathEvent
EntityDeathEvent isn't being called with entity.remove(), meaning that you should also regularly check whether your cached entities still exist. You may do that on a separate thread
Can I replace ChunkLoadEvent & ChunkUnloadEvent by EntitiesLoadEvent and EntitiesUnloadEvent?
Or are those happening in different contexts
Oh there's actually a EntitiesLoadEvent
I don't think that there will be a difference
Only make sure to go through all chunks that are already loaded with the start of your plugin
Entities are loaded at a different time than chunks
Which is why these events exist
They are being loaded before the chunk is being loafed
So i shouuld listen to both chunkload and entitiesload
"The provided chunk may or may not be loaded."
They are specifically not loaded before the chunk
aha
They are loaded individually
That's what EntitiesLoadEvent says
Either entities are there and chunk isn't
Or chunk is there and entities aren't
Two different threads doing two different things
Considering that I want to track the coordinates of my entity, shouldn't i listen to move event too? I mean its itemframes but technically a plugin could move them right?
I think my method names are a bit verbose lol
You could do that on the separate thread as well while you are checking if they still exist
.getLocation() is thread safe, I believe
alrightie, thank you very much, yeah i planned to do that on different thread^^
Many thanks!
To regularly check if they still exist, and to check their coordinates constatnly
yeah ok
^^
but tbh just doing isValid() on an entity is taking like half a nanosecond lol
well its for animation anyway which already runs in seperate threads so i don't mind, i don't have to create more threads
last time I checked I think just calling isDead is good enough for checking entity#remove
since I believe isDead checks if they have a remove reason or something and entity#remove sets a remove reason
something like that
ah yeah, interesting ๐
Also I have a random question which is totally apart
I've managed quite impressive results with map art dithering algorithm (so it really feels like the map has the full spectrum of colors even tho technically minecraft maps can show only 143colors)
Because I'm a mad lad I'd want to do the same with audio&music, do you guys think it'd be possible to make an audio palette from all the sounds & pitches that noteblocks or any mobs can make, split the track/music in very small packets (a bit like what a pixel is to an image), and do some dithering (calculate best distance, apply quantization & correction at neighbors, etc)
My dream would be that we can input custom music in vanilla minecraft without going through data packs or texture packs or whatever, even if the quality is obviously nth near to the og quality i think it could be quite fun
I just fear about limitations due to how much sounds can be played at once or due to the small size of the palette i can make
Was wondering if the Spigot API detects the whole second argument of /command arg1 "arg2 is long" arg3 or will return it in 3 arguments?
3 different ones
Dang it ๐ฅฒ
it'll be like this
args[0] = arg1
args[1] = "arg2
etc
Now I have to fix it ๐
it just does String.split(" ") iirc
since i'm already doing the checking whether entities still exist with .isValid() in side thread, do I need to also listen to EntityDeathEvent?
you don't have to, unless you care whether you "instantly" get notified about the death
np
lazy
sometimes I read my own code and I wonder "wtf was I trying to tell myself using this comment" lol
3 ds end? whut?
oh lmao
it was actually "Graveyards end" and I accidentally replaced it a minute ago lmao
At least you add comments to your code ๐
I add a shit ton of comments everywhere lol
:X
100+ matches... smh
it's like 800+
also wtf why does it say "12+ files"
I could understand 10+
but why is 12 the limit
lol
could possibly be even more than 800 if was included
/*
*/
If you search my code there will be less than 10 (If you don't count Todos ๐ I use them a lot)
oh yeah TODO comments are awesome
I love how intellij mocks you for pushing TODO comments
best kind of comment:
// TODO: Fix this
Yep I just use them so I don't miss anything
I just searched in my project and 56 // was found ๐ฏ
You can add custom ones. I like adding notes
I need to get into the habit of commenting
Same ๐คท
I don't remember the last time I pressed / twice
You can even add random links into code lol
I was stuck for 3 days in a class I created last month figuring why I added two methods and what they do
The funny part is that I forget them... So it happened 4 times so far ๐

I think I am doing a bit too much debugging lol
Evil people say s debugger beats sysout
There's never too much debugging :}
But those are haters
it's meant for server owners
are those toggleable or sosmething?
ofc
Getting item in hand doesn't work
it's like this
I can see how that could be useful then assuming an error occurs.
just needs pretty colors
yeah I also always have a /pluginname dump command
it generates a .zip file of everything needed to debug stuff
sth like this
very good
why the fuck does IntelliJ only show the parameter names sometimes?! E.g. in the "track player positions", there's no label for "delay", but in the next line, there is. and the last parameter never has any label
it looks like it only shows labels when using primitives or keywoards (this, super, etc)
that's so fucked
plugin idea (alex, no chess plz
DevilsChest
like angelchest but it spawns the chest in the nether in a lava lake
and you need a dragon head to open it
iirc if you actually pass a value its gonna display the name but not if theres some inline function call
oh and if you pass a variable it also wont show iirc
so only if you put an actual value in
Hi, does anyone here know how to make this kind of scoreboard? I see more and more of them but can't find anything on how to make them
use custom unicode characters in a resourcepack
something more bigg plz
thats what she said
{
"providers": [
{
"ascent":19,
"chars":[
"\uF009"
],
"file":"custom/ui/party/party-deco-1.png",
"height":256,
"type":"bitmap"
}
]
}
use this to get started
ho thank you !
for your default.json
yeah but whyyyy
it should just always show the parameter names :<
is executing a task within BukkitScheduler::runTask the same as executing it as a normal method?
WHY IS COPILOT SO SMART
its not smart enough to use the logger ๐ค
copilot is kinda scary
Like i once was creating items with lore and it took the pdc tags i put on the item before and displayed them on the lore
like even with color codes
like ยงaENABLED and ยงcDISABLED
it writes the basic stuff for me everytime
and automatically understands how i log and then logs that same way
me creating a completablefuture be like
yay boilerplate
๐ค
what does it do
I am dying. Trying to fix a bug since an hour now and I don't understand why it keeps happening lol
just like cf stuff but i need it to do sync execution too
f
do you need a ?learnjava moment? ๐
I need a ?learnhowyourowncodeworks command
tired of writing my stuff like this
Yeah, been there
i have 100% on codecademy
how is the bot supposed to understand it if you dont
i have 100% on sololearn smh
AI
I can comment every line now just so when I come back to it I can understand it.
?stacktrace
we definitely need a stacktrace command that explains how to read stacktraces
ok
?exceptionhandling
?workloaddistribution
?st
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
?workloads
handy guide for reading stacktraces:
- look through the stacktrace to find a plugin name
- bug the author of the plugin till they either fix it or ban you
it's ?workdistributions
I love this
smh
?workdistributions
what do you guys interpret this button as meaning?
?workdistribution
join the party
add friends
new Person()
or add friend
or invite friends
or "3 people going to hospital"
give em party hats
lmao
yo
@ashen quest
plugin idea
when you die, you respawn at a hospital. then you can pay a doctor or show them your insurance card, if you like. Then you respawn with all your items. If you don't, you respawn and lose all your items
and if the card declines you get un-respawned
yeah
somePlayer.spigot().unrespawn()
another plugin idea
when someone enters /exception, it just throws an exception
throw new Error()
Final results. I think im happy
yet I'm doing it myself in this plugin
damn
why not player selector?
he probably means a list of online players where you can just click on one
I'd probably do both. Like, add player / add offline player
its for a party they wont be offline
yoo that looks sick
ty ty
oh wtf
I still havent released my resource pack merger
why have I not uploaded it lol
im surprised no one has made one yet
i was tihkning of making one but sounds like alotta work
so it merges all json files and stuff aswell?
the code is horrible but it works
yes sir
damn nice
well
it tries to merge things
I have tested it with numerous resource packs and it always worked fine
but I don't promise that it's always able to merge json files
e.g. if there are overlapping things like, 2 resource packs overriding the same custom model data
it will then just use the data of the "first added" resource pack
but if they only use different model data, it should work fine
oh wow much simpler than i thought
yeah I'm just using a map and then call it recursively for nested things, IIRC
I was totally drunk when I made this so I dont really remember how exactly it works
lol what
lmao
๐ป
i want be pro developer but me noob
yeah I also code a lot of stuff while asleep. for example my CustomBlockData library, I had the idea in a dream, then when I woke up I actually coded my idea from the dream
lol
my pathfinding idea was also made in a dream lol
๐
lol
lmfao
@Nonull
@Override
why so much cof this
whats even pathfinding ;-;
Worst is if you have an idea for solving a problem at 4am in the morning, run to the pc, start coding and it doesn't work.
That's a propper "skill issue" moment XD
LMFAO
I know that feel lmao
that would probably be me
it's to add custom behaviour to entities
a
actually path finding is the wrong word. it's more like complete entity AI
And normally it's so early in the morning I don't go back to bed, just kinda... wait
e.g. make pigs attack players, and stuff like that
only thikng i can code is real simple commands
or make zombies not attack people who have a totem of undying in their hand, etc
YESSSS THATS SO GOOD
yo whut how did u make that? spigot? forge? minestorm? uwu daddy? nvm?
truly
resource packs
lol
oh them packs there
it merges different resource packs into one
vanilla spigot
only resourcepacks
sheesh
I guess I'll upload my merger on spigot now
only downside is, it has to get approved >.<
idk why but standalone applications need approval on spigot
@vagrant stratus Standalone apps cannot be premium on spigot right? Like, if it's premium, it has to be a spigot plugin, right?
am i doing this right?
https://www.toptal.com/developers/hastebin/evumokucum.swift
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
xd
looks good though, should work fine
well unless there is no player called BlindFrenetic
^this is what I meant @ashen quest
How and why are there two onebytes
so u mean the color scheme of ?paste
cannot find symbol
yes sir
oh well
line 34 and 38
would it be possible for multiple plugins to communicate with each other. Can I like call a function from a plugins main class from another plugin
of course you can
buuut
are you using maven?
you need to have the other plugin as dependency, otherwise the "other other" plugin won't compile
for example, here's a "tutorial" on how to access ChestSort (one of my plugins) from another plugin @cunning canopy https://github.com/JEFF-Media-GbR/ChestSort/blob/master/HOW_TO_USE_API.md
imagine not
gradle defenders would try to cancel me but they are still waiting for gradle to finish loading
there are still people who use neither gradle, nor maven, nor ant
because most tutorials "how to code your first spigot plugin" don't explain it
mos tof the newbies
yes thats how i started
yeah that was the reason why I started my blog
fun fact, if spigot wasnt here, i wouldnt be making the bread i am making right now
same ig
https://blog.jeff-media.com/how-to-create-your-first-minecraft-plugin-using-the-spigot-api-and-maven/
so that people can start coding plugins and directly use maven lmao
whut
yea, i started programming with spigot (even tho they warned me)
it's totally fine to start with spigot, as long as you still google actual java tutorials when you don't understand basic stuff
and here i am today, working as a full stack dev 25usd/hr
i dont even know what my prices are
what are they
nice profits lmao
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
ok
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!
https://www.toptal.com/developers/hastebin/evumokucum.swift
error: cannot find symbol on line 34 and 38
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
whats wrong with it?
someone bugged it i think
when i enter in
it spawns me in normal world
Is there any way to get the plugin data folder from a static context?
wrong channel sorry
yes, that's what the portals are for
well, kinda
do you know the plugin name?
in overworld*
Yeah
you could just do it like this
Bukkit.getPluginManager().getPlugin("MyPlugin").getDataFolder()
its actually really good for a 17 year old
That's fancy, thank you.
im pretty sure this type of portal works different
but a better way would be to use sth like this https://blog.jeff-media.com/getting-your-main-classes-instance-in-another-class/
doesnt it have to tp you in endcity place?
ooooh right. I'm sorry, I dont play MC very often. It's used to spawn you back to the "main" end island, right?
no i am on main island
and trying teleport
to
end citys place
ah okay. Then you'll have to get some end city location yourself, listen to PlayerTeleportEvent and change the destination
its two way
yeah I remember
That's weird. There's an end portal instead of a gate portal there
this still isn't fixed lol
maybe try looking at the way /locate works
what isnt fixed?
why is it?
"does not working"
the "Does not working"? It's mispelled on purpose
but but guys
Perharps the chunk glitched out?
it's because most of the time, people just ask "Why my code non workings"
does it happens often?
xd
so I also included this "typo" into the command
https://www.chunkbase.com/img/gallery/end-gateway-finder_400.png
They should look like this.
I have never experienced it.
hmm
how can i get end gateway block?
or can i place it with AWE?
/setblock x y z minecraft:end_gateway
yes
since itll spawn on you
you are so formal haha, we chill here ;)
Assigning information to players
I'm usually more formal when I'm new in a community, especially in a programming one. Over time I should let loose a bit, though :P
yea xd
What?
What i exactly said
How would you even do that, did you delete your repo or something lol
Seems that my ide is dumbass
indeed every ide is a dumbass EXCEPT notebooks, you can write your code with a pen, so good
user error
Scrap that, let's go back to punchcards
yesss thats even better
punch cards were annoying but fun for a while
Is a player UUID the same on every server?
If so then what if you change your name?
always the same, so long as its online mode
waiting for approval again ๐ฅฒ
resourcepackmerger borders?
borders?
it can merge any version's resource packs
models would merge?
should work fine
since it bugs on different versions from what i know
here's the source https://github.com/JEFF-Media-GbR/ResourcePackMerger
well then it will still be bugged after using my tool
swing or javafx
let me check
I coded it while drunk a few months ago
I dont remember anything about it
must honest
swing only, no javafx
you really used swing
is that not good? ๐ฎ
btw I hate creating GUIs in java
ah yeah
git --config
git config --global user.name "Your Name"
git config --global user.email "youremail@yourdomain.com"
you shouldnt use your real email address though
why?? i put the same address as i linked to github
github has this feature where you can use an "anonymized" email address but it'll still work and link to your actual github account
oh thats decent
it's fine i think i dont link my personal personal email anyway
the one which i use in paypal,bank..
but thanks alot!
How would I set a Player to be riding an entity?
otherEntity.setPassenger(player)
I see, thank you.
Long ago, I was what some would call (Editorโs note: Who? Name names) a programming prodigy. I woke up every morning, cuddled with my pet Python, poured a cup of Java and ate an orange (to ++ the vitamin C). While doing my loops at my job I would attempt to take as many โbreaksโ as possible, until the day I was promptly fired for being too literal and/or having a lack of โwork ethicโ
or addPassenger
not sure rn
but one of those will definitely work
git out
or I'll commit a crime
That's alright, addPassenger is probably 1.12+, and I'm on 1.7.10, so it's alright. I would assume that addPassenger was added because boats starting having more than one passenger.
LOL
1.7?!?!?!
git commit -m "a crime"
I don't talk to you anymore ๐
lol it depends on the commissioner
but yeah
Literally everyone has reacted in this manner, lol.
And I don't blame you
You're right
setPassenger is deprecated because in "normal" versions ( ๐ ) multiple passengers can exist
wat
its even more common than 1.8.9
Too old! (Click the link to get the exact time)
Lynx, guess what
lmao 1.7.10 is more common in pvp
I made a list of available discord commands
oh ?
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
it doesnt have all commands, only the ones I found useful myself
swing is ew
what's wrong with swing
use javafx with scenebuilder and custom less files
hm
tbh I don't do GUI stuff very often
actually this is only the second GUI I ever made
so I have no idea about what you're talking about ๐
well i have to do it daily sadly
F
and i can tell, a javafx gui with a mvvm design is pretty cool
when I do GUIs, they typically look like this haha
(My latest adventure game)
@hybrid spoke aren't you german?
i am
Is this the right way to filter Players?
ArrayList<Entity> nearby = (ArrayList <Entity>) sign.getWorld().getNearbyEntities(sign.getLocation(), 10D, 8D, 10D, Predicate.isEqual(Player.class));
Predicate.isEqual(Player.class)
just learn nms
you have anything to lose?
either nms is not always needed to make custom entites
indeed
when i try i get .a .e .b .s its hell
is there no mappings?
Install 1.17 with BuildTools: https://www.spigotmc.org/wiki/buildtools/
Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.
Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163
thanks
guice has nothing to do with json ?
do you mean gson ?
or actually guice for dependency injection
Small question: We have to return true if the command succeeds, and false if the command breaks, right?
I am planning on working on a Staff plugin. I want to be able to do /staff and come into a kind of 'staff mode' where i have items in my inventory to tp to players and punish them. But I don't know how to check if the staff mode is active or not, can someone tell me how i should check that?
no no just guice for dependecy injection
the boolean return is used to determine if the command entered will be sent back to the player in chat
EpicGodMC what you explained me didnt went well
ill try to stick to the library which make things easier
id just always return true, which means that will not happen
oh i see
i had issues with this one
ton of errors (stacktrace that i cant understand.)
you can also look at https://github.com/VoxelGamesLib/VoxelGamesLibv2 I guess
which is a larger application using guice
If I have a given place I want to teleport a player to, using the teleport method, how do I find the pitch which I am standing now on? Idk if I am on the right channel though
is that this thing under F3?
the -135, -0.0
Well, this is related to development i thing that you need to go #help-server
Alright
wat
Well, this is related to development i thing that you need to go help-server
am I having a stroke or does that make no sense at all
Yes so they are planning on using the Player#teleport method
as they are developing a plugin
this is the absolutely right channel for that question ๐
#help-server is for server administrators running a server
is the chat preview thing live yet?
As of 1.19.1, yes.
Can i specify an item by giving it a model number
wdym
Item Meta
custom model data
meta.setCustomModelData(int);
whats the event called? cant seem to find it
declaration: package: org.bukkit.event.player, class: AsyncPlayerChatPreviewEvent
For the world.locateNearestStructure method in the api, how do I only search for structures in a small radius? I'm not sure what the radius argument does since it says this in the api ```radius is not a rigid square radius...
So how can i specify a block
just added and already deprecated kekw

deos someone know, how to generate a tree at a specific location?
Deprecated because it's a draft
You can use it and suppress warnings. It'll be undeprecated later if changes don't occur to it
cheers
Just use it with caution in case changes are made
if stuff breaks i'll know who to blame ๐
okay
are there any plans for component support in spigot? kinda ass to have to work with strings if you're used to components hah
what do you mean, the bungee chat api is perfection
well the event returns a string regardless lol
I'm the opposite. I'm used to strings so components is ass to me.
elgar probably having nightmares about a hover event and hex colours
Cold sweats
guess i'll just shade adventure and get people asking me why my jar is 4MB again
just library loader it
whomst?
thats a thing?
yea
idk what that means
you can define libs from maven central
and spigot auto downloads them for you on server start
keeps your jar small and breaks maven central TOS in one go
surprisedpikachuface
its the perfect fit
Spigot: must be able to run plugin offline at all times
also spigot: download libs from maven central lol
check the Library Loader section
That applies only to premium resources
- you can provide a way to download those libraries manually for premium ones
That rule is mostly in place to prevent people from contacting their licensing servers that frequently go down and render a plugin useless
Which has happened before -,-
Deprecate annotation confusing users since 2000.
yeah that makes sense
@ApiStatus.Experimental ๐
does it work for repo's from other sources too or only maven central?
only maven central
Experimental annotation doesn't always give warnings in your IDE ๐
afaik neither NetBeans nor Eclipse do (yeah yeah, don't say it lol)
what about BlueJ though
then whats the point of libraries feature
nvm i read on
non premium plugins? xD
i think you're allowed to use them on both
just dont contact x server or something
since you can basically guarantee maven central will never be down? i suppose
ok this library thing is pretty epic
Yes i always tell that and the rule is really stupid because multi player must depend on Internet Connection. Haha
why not just make the rule "cant have license server thingy"
Because that's too narrow
"It's not a license server. It's just checking if the plugin is valid"
I have been told from lot of people that when they premium resources are leaks and spigot doesnt do something. Is it true?
"It's not a license server. I'm checking for updates"
if text has colors in will it be returned with & or with the section char? don't have an easy way to test atm
then have a rule that you cannot have any checks that will make the plugin not work at all
If it's on our platform we delete and permaban. If it's off-platform, it's not our responsibility to go after them. It's the responsibility of the author
We do! ๐
but u still cant download libraries for example
Agree but still stupid that rule about Internet Connection because you are "contradiciendote"
As far I know spigot must depend on Internet Connection
i'll just use my small particle collider to determine if your license is still valid
You can use the libraries feature, just state in your description "Hey! If things won't download, you can download them manually here and put them in this folder"
That's really all we require
or just have a "fat" jar
Yeah or that
Luckperms uses their own lib downloader and no one cares so dont complicate with stupid rules
If possible, we're not against a fat jar. Just can't exceed the maximum
Sorry For but im mad
LuckPerms is free
ahh
makes sense
i thought it was a straight out no
If your stuff is free, you don't need to provide alternatives. You can depend on an internet connection if you want to
yea yea
Thst is against polรญtics because people should all have the same rights... That what its explained in eula
We only require it on premium ones so that people don't buy a plugin only to realize "wtf, why won't it start" and waste $20
then i can tell my devs to use that for my libraries
yea i never buy
i find open source alternatives
If you're referring to the Mojang EULA, this is for players on a server lol
Spigot has its own terms and conditions
sometimes theyโre just better
someones got their panties in a twist lol
?
politics
Spigot should include mojang licenses so in teory you are keeping their rules + your own ruules
they can have their own forum rules
That why licenses exists
but some things are a but contradicting
๐
For example the stupid no Internet Connection dependent
๐ ๐ ๐
like bukkit license GPL and spigot forums contradicting but idk what you mean by mojang stuff
why do you care
their forum and discord, let em do what they please
Maybe I send an email ti Md5 to cimplish about that
SpigotMC's terms of service have zero relation to Mojang's EULA
The platform is separate
yes
Spigot's development has to abide by Mojang's IP though
I now it separete in fact you are using their code. M
(e.g. we can't just redistribute their software)
You are contrdation yiursle
As I far as I know if your product internally use another product you are indirectly vinculated to them
Ghost what whre you doing?
Hello, I would like to upload the version of spigot 1.19 to my server that is hosted by a page and when uploading the version it gives me an error, how should I do it? Any moderator who can help me or let me contact you by md to explain my event in more detail
Never heard of the word "vinculated" before, so TIL I guess lol
Na haha I dont care about Legacy I always prefer playing Legacy rather than las test
Loving you
I redropped the item and it works
But yeah, development of Spigot is bound by intellectual property laws (we can't redistribute the binaries nor host decompiled source of Mojang's proprietary code), but the SpigotMC platform where we dictate what is and is not allowed to be uploaded to our website is entirely up to us, free from Mojang's jurisdiction
Spigot != SpigotMC
SpigotMC is the company and maintains the Spigot software, but it's a forum platform as well
It can set whatever rules it wants free from Mojang but if we're working with Mojang's IP then we have to be careful when doing so
I have heard that americans do bulling to non native english speaker but bruh its a lot that...
The word exists, I've just never seen it used. No competent English speaker would use it because it's too complex 
Don't worry ๐ SpigotMC has lawyers (or a lawyer at least) where all of this stuff is sorted ahead of time. We're in the clear
Hahaha
Hello, I would like to upload the version of spigot 1.19 to my server that is hosted by a page and when uploading the version it gives me an error, how should I do it? Any moderator who can help me or let me contact you by md to explain my event in more detail @worldly ingot
You mean you're trying to upload a .jar file to your server?
Lmao really hating i patient people
I wanna swear all to them but then I think im losting my own time
Depending on what you're using for a web panel they might have a version selector built-in for you
He wants to upload his own jar file to server
I think he means that
Not every hoster allows that
Yes thst why
and we don't know anything about that Page
