#help-development
1 messages · Page 880 of 1
And yes, I apologize, if I - apparently - hurt ur feelings by saying that u were rude. But calling me names, even after me saying that it was a misunderstanding and assuming shit without actually thinking, was not necessary.
what a great apology, thanks. I am also sorry that you identify with the names I called you
And yes, I'm serious sincere about the apology.
I never said that, but sure
oh then I'm sorry you lack the self-awareness to be able to do that instead
Okay no but seriously now, sorry for calling you out like that. It's 10:40 in the morning for me and I already had a stressful day.
oh c'mon what the hell
how can i shoot a fireball in front of the player?
if you mean from the players direction use https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/Fireball.html#setDirection(org.bukkit.util.Vector)
when i set fly speed (Player#setFlySpeed) it doesnt work with creative speed but works with Player.setAllowFlight, can i fix it somehow?
I think for it to work player needs to be floating
At the time when the speed is changed
I wish I could use chatgpt as a spam filter for my mail
I proposed that idea in my university discord lmao
We get so much "official" shitposting we need smart filtering at this point
How do I register custom enchantments?
This is my current code:
public TeleportationMasterEnchantment() {
super("teleportation_master");
}
@Override
public @NotNull EnchantmentTarget getItemTarget() {
return EnchantmentTarget.ARMOR;
}
@Override
public boolean canEnchantItem(@NotNull ItemStack item) {
return true;
}
@EventHandler
public void onEntityDamage(EntityDamageByEntityEvent event) {
if (event.getEntity() instanceof Player) {
Player player = (Player) event.getEntity();
if (player.getInventory().getArmorContents() != null
&& hasEnchantment(player.getInventory().getArmorContents(), this)) {
Random rand = new Random();
if (rand.nextDouble() < 0.2) {
player.teleport(player.getLocation().add(rand.nextInt(10) - 5, 0, rand.nextInt(10) - 5));
}
}
}
}
private boolean hasEnchantment(ItemStack[] items, Enchantment enchantment) {
for (ItemStack item : items) {
if (item != null && item.containsEnchantment(enchantment)) {
return true;
}
}
return false;
}
}```
Is this correct?
I've just recently moved to 1.20 development
before I've used in lore
bukkit classes are not meant to be extended / implemented
you should use a custom PDC tag to identify your enchantments, instead of extending any bukkit classes
Why is that? Isn't this better?
Does this Player#getStatistic(Statistic.PLAY_ONE_MINUTE) return all playtime, or current server start?
should be of all time
I would assume it returns how many minutes a player has been on the server.
Actually it returns ticks, but do you know if it return current server or all time?
it's the number of ticks though
ah- that's dumb
Then how can I get current server start? Or get certian week
keep track of that yourself
If player joins I save their timestamp with current long time, and when he leaves i get diffrence and save that?
I think that would be best way
for example, yeah
that isn't even what the statistic is called anymore
huh
love bukkit
I wonder if it at least records the proper time, e.g. if I play 1 second on a server with just 5 tps, does it return 20 or 5
hm looks like it only "records" 1/4th second if one plays for 1 second with 5 tps
"hey lil' bobby, stop playing minecraft, you've been playing for 6 hours today already"
"no big mamma, I only played 1.5 hours because my laptop can only do 5 tps, see?"
life hack
And for changing day? I should run BukkitScheduler every 1 second?
Stopping the tick loop = infinite play time
while (true) {} infinte cpu glitch
Heating your room in the winter
actually did that lmao, was cheaper then oil
will i still get older?
Only if you dont stand on banana peels while playing
what happens if i do
You get older 🙂
as usual or faster?
🎉
Noice
i hope dont get now the feedback i request less 1 year ago xd
Let's go :3
are ppl using prettier with prettier-java-plugin here with IJ Idea?
prettier? its a like a formatter not?
bc i feel like my formatting is not properly applied upon formatting with prettier
whats prettier
me, duh
i only use that un TypeScript and only because the previous dev keep that xd
damn i thought prettier was much more common
only used eclipse code formatter and google style so far
okay ic
I got a storage thingy that supports mysql, json files and sqlite, now I want to make the prefix for tables configurable - now I wonder, should that prefix only apply to mysql, or also when using sqlite? I mean people will never think of using one sqlite db for different things, do they?
I just used save actions and a code style.
Also i think prettier is installed on default in IJ
yeah, but prettier needs a plugin if you want it to work with java iirc
I dont see the appeal of it honestly. Just configuring your code style is all you need 🙂
btw why there is still bunch of people using Eclipse? Is there anything that it can do but intelij can't do?
Its lighter and simpler. Also: Multiple projects in the side tab.
afaik no, eclipse is trash.
tbh idk how eclipse is today, but it was trash back when i used it and i've heard quite often that it sucks
it's probably ppl that got used to it at some point and don't bother to switch
okay fine except that, lol
Is there a way for me to allow players to sprint, even if they are below 6 levels (3 food)?.
no
at least not if youre not making a mod
if i just read up on that correctly, that flag is set client side?
for sprinting in relation to hunger
yeah, thats all clientside
so you would have to go the hacky way
velocities, pinning the hunger at 3.5, whatever
hacky way? 😨
pinning hunger woul've been my first idea there but that's kinda stupid
just pin the hunger and simulate the rest with packets
oh god
you want to hot-reload classes when using the debugger?
I THINK that's the thread you're looking for:
https://www.spigotmc.org/threads/intellij-live-debug-run-your-server-inside-the-ide.364782/
good ol kangarko xD
i mean, it records ticks, javadoc says so, mc wiki says so
i don't see why it would use wall time when the whole game revolves around ticks
reinstalling node_modules got it to work btw, no idea why
i thought i updated the entries in my package.json... and reinstalled then... but apparently my brain shut off for a sec and it wasn't even a newer version
Are plugin Commands able to be used by /execute?
Did u try?
i-
there's even people who still use windows soooo
good point, fine. i'll try at home lmao
from what I know: no
i gotta stop asking shit just bc it's convenient to know them rn
oh okay thanks
Probably won’t work at all
idk I only remember I once tried to do /execute as ... in ... ` and that didnt work for plugin commands
yeah i don't think that'll work unless you register your commands as a brigadier command in the vanilla command dispatcher (separate from the plugin commands one, taken from the commandmap)
✨ internals ✨
that's good actually tbh
bc otherwise i feel like that could be a security risk
given that admins shouldnt allow random players to use execute anyway lmao
so whatever
execute as @e run /nuke
Can yall recommend me any good sites to learn spigot from?
there's youtube tutorials
Do you already know java?
People told me those arent the best
I was thinking some like udemy?
.
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
because you need to learn the language (at least a bit) to know how to code in it
because there is no "i want to learn spigot"
Don’t try running before you know how to walk
you want to learn java and how to use the spigot-api WITH it
I mean they do offer to teach you java
I learned self taught over 4 years (I’m def not the best or even close) but I used Stephan’s udemy course as a basic crash course for spigot api, otherwise since you don’t know java, make sure to check out codecademy’s free intro to java course
^^
hi guys
hi
the best java course imo are the books
i got ddossed
True
nice
call your isp and ask them to change your ip
When you can read books, suddenly learning information becomes so much easier
and i saw that many popular servers uses neoprotect or tcpshield, i tried them too they are so easy to setup, but i have bedrock support and im stuck
ohhh
Sounds like a question for #help-server
it doesn't matter, if they do "ping ip" they instantly get it cause i have no protection
oh thanks
yeah and head first java or the OCP book are great
i thought you meant you got dossed, there's a lot of anti-ddos solutions out there
but im a newbie 😭
Speaking of I think one of those is in my closet haha
i have way too many lol
books and crash course it is
Introduction to Java Programming and Data Structures by Y. Daniel Liang is also great
Try codecademy’s java
would it take a month?
more than that
oh lord
It’s a pretty fast course, you could finish codecademy in easily a week
we have a guy saying a week
learning programming is a never ending process
and another guy saying more
yeah completing one course probably won't be enough
Super starter concepts are learnable in a week ie: crash course such as codecademy’s intro to java
You might do it in a week, but you'll struggle after that
listen, if you are dedicated you can learn how to do a basic plugin in a day
worth a shot
and yet you wont get far with it
thanks guys
you will have the fundamentals, the basics. if even
Yeah trust all of us, you just need to learn to walk first
yeahh im just waiting for my schedule to be completely free
suprisingly, I do know the basics
With all the courses we mentioned, take about 3-4 months with all of them and I’m sure you’ll be making some decently structured projects at least within that time frame
Yeah that’s true, but like I said walk before you run, also I really like codecademy because of it’s simplicity, shows how anyone (if you take the time) can learn this kind of logic development in a pretty good amount of time
Not only that but it’s a pretty simple course, I don’t know about many other ones except for Stephan’s crash course into spigot so I’m sure there are better ones as well
in germany we had "BiVieh" who made pretty good tutorials
To be fair germans are pretty good coders haha
debatable
i thank you so much guys for explaining me the java plugin loader
For the one's who have made their way, it seems like they are pretty advanced
I thought the Germans were more known for manufacturing
Among other things
problem is, too many pretend to have made their way
Coding probably isn't the first thing you think of when germany is brought up however, the first thing that pops up in my mind is how one time I called someone a girl in german over a video game
"Du bist ein madchen!" haha
I suppose that can be said about anyone to be fair
Could be more common in germans, though usually if its not american, its less lazy so
probably
i was one of them 10 years ago
not even knowing what a for loop was yet called myself a decent dev
Haha
tbh having Java dev in the discord description is a common trend that I see
While failing at super basic stuff
i used that to create a .cs Mod Loader for Unity3D
Yeah there's a lot I don't understand but I like to call myself a decent dev just since I have the ability to make most of my peojects work lol
So I now take that as a red flag
same
I've been wondering how much class loader stuff can you do in C#?
FREE JAVA LESSONS
id say you performed pretty good when you dont have to introduce yourself anymore
idk
for c# i need a .dll and it's path
Yeah actually funny story about that, I provided this guy with some simple java resources such as a udemy course and like the codecademy java course..... a week later that guy has "full time minecraft / java dev" in his discord description lol
so i can use Reflection
Assembly.Load("path to dll") -> Type myScript = Assembly.getType("Name of the c# class")
and then for unity you can do gameObject.addComponent(myScript);
that's the only way to make a plugin loader
so you have no choice
Only way fot c#?
also only way for java
since it's ClassLoader is full of native shit
and Reflection shit
getDeclaredConstructor() and stuff
You ever thought about how spigot server loads your plugins?
Yeah I never like reflection... perhaps why I didn't know that. Certainly only used it like once or twice maybe
and why main class always has to extend the JavaPlugin
Not unless it didn't load up to be fair
Like I said I'm self taught over the past 4 years with no other experience in programming so my experience is really only with spigot development... I'd say I'd only have a solid years experience though since it was pretty on and off
you should avoid reflections where you can anyways
Just in the sense that I messed up a dependency or perhaps just forgot to remove args from the main constructer, so unless it didn't load up, I never thought about it
when you dont do weird crazy stuff or a framework or shit you should keep your hands away from it
also there is a giant crutch called plugin.yml 🙂
it literally has the string which specifies the path to the main class in a .jar like in a folder
I remember having to manually fill this one out back in the days of using eclipse haha
still do that tho
eek awful
also copy-pasting maven spigot repo everytime
I let intellij fill the main information, obviously if I have to add more I will, but I just meant in order to get your plugin to load up, you'd have to manually fill out plugin.yml in eclipse
Never had fun with that since my formatting was already bad lol
Gradle plugin.yml pog
Gradle is pain
Nou
Gradle is pain
gradle is pain, but better offers more than maven, right????
no?
yes
Gradle can do more things
I mean if it aint broke dont fix it
since it's not like i'm using maven or gradle much
i just need them to compile my shit
like Pen-is bans
Which is how we get unmaintainable legacy systems that become a mess long term
Haha yeah
gradle is cooler, but maven is better
I just don't like to mess with gradle
Plus I don't even do enough to complain about it so
this guy ignored my freejavalessons tho
i'm crying
noooooooo
the more expensive it is, the better will it be
Well like I said, I don't even do enough to complain... I'm at best a very mediocre minecraft dev haha
eh not always
eh not always fr
my free java lessons are actually self-made and they are PRICELESS
That's like saying I'd be a better dev if I spent more than 10$ on the stephan udemy course.... though I only put 10 hours total into his course
exactly
my anticheat is better then the free ones which fixed every possible exploit because i paid for it
visited 10 times
my custom essentials is better than essentials because its not downloaded
pov you are a serverowner
same tbh
My anti cheat is best because it just stops all joins to server
my custom essentials is the best since it's on russian and has memes in description
even though mine is missing 60% of regular essential functions....
my anti cheat is the best because it stops the server
100% success rate on preventing cheats
90% actually
You're pretty funny yk that
the one on my git isn't even the right one lol
my anti cheat is the best because it has virus which kills every pc which connects to the server
that one is literally missing 90% lol
"this server requires the use of custom resource pack, would you like to download it"
this is not tinder
Forcing .exe files to peoples pcs in order to join your server D:
I don't see any rules against it
Well it sure could be :/
the Netty discord does have rules against that however lmao
Tinder for mc devs should be a thing imo
"Hey wanna come over and completely rewrite vault later :P?"
my pen-is banner is 20 blocks high
Steve (400 m. away) wants to have wild role-play with you.
Oh dear god
See funny story about that, I was requested to make a marriage plugin that would allow players the ability to cheat on their spouse and if within a certain amount of blocks of their spouse, if "cheating" it will notify their spouse and shit among other sort of mechanics following that sort of style haha
Kinda funny plugin idea imo
But I said no cuz who even wants to do that
Hey has anyone here ever messed with breeding related functions? I was wanting to make a cool interactive breeding plugin that's handled mainly with gui interaction... any suggestions relating to this?
rather a plugin where you can swipe player heads
Not like that you goofy goober, I just wanted to make breeding an interactive system with the stats displayed through guis / breeding options / breeding enhancements / etc etc... just make breeding cooler in minecraft
is this even allowed
Actually....
my player bounties plugin allows that
true
You can decide which heads to keep / claim the bounty of through a gui was an idea I had with this one
/notTinder -> opens the notTinder app on minecraft, displays right swipe button / left swipe button + player skull in-between, when click left -1 score to owner of player head / when right click +1 score to owner of player head. Extra functionality /notTinderTop -> displays top 10 users with the highest scores
rather make a website where you can swipe actual player profiles and display it in minecraft
How dare you move out of my skill range
imagne all the descriptions
"looking for a man with lots of diamonds and a huge base"
That would be pretty nuts plugin tho
You could make it configurable for all gamemodes too, such as the pfp's being able to be edited through minecraft as well
you'd have to deal with so many shit
fake profiles, bots, sexual content, mad owners
ok but thats the server's problem eh?
yeah true
so you have to prevent that
but you cant
what i also thought about was a serverwide plugin with one central database
Still, NotTinder plugin would be lit
imagine 50 servers having the tinder plugin installed and they all see the profiles from other servers
I'd say implement messaging through this interactive "app" but it'd get really fcked up really fast lol
"More hoes"
Configurable option that shows other players from other servers too
for the /notTinderTop
Who's got the highest score of all servers with the tinder plugin???
What did I just come in to
Might as well leave if you're not a hardcore tinderer
Well yeah that's fine, I was just making fun of you saying "it cant be called tinder"
I like mineship but it comes off being for a younger audience imo
Could be a concern considering this a "tinder" like plugin lmao
biggest problem will be to keep this minecraft related
people will upload pictures of themselfs
lmao true point
at this point you could just integrate tinder into minecraft with a plugin lol
or you create templates which represent the minecraft skin, but everyone would have the same image
no place for creativity
Such as getting an f5 view of your player model to post
exactly
Like this sort of thing?
Yeah
That would be really cool to be fair
Minecraft tinder might become a thing....
nah lol
youd actually have to make an entire swiping simulator
aka a whole ass dating app
doubt anyone will do it
Like I said already, its out of my skill range so I won't be the one haha
how to initialize luck perms
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
what?
sorry i meant
I usually just put an instance of the api in my constructor
?learnjava!
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
https://media.discordapp.net/attachments/694661573125472256/998143126373941248/6n0v4g.gif
i know java
Then you can initialize in whatever method you need correct?
Won't lie i forgot how I do it lol
yea but when i do new LuckPerms() then it just loads every function
^ that might tell you the correct way to do it
I never used luckperms either to be fair
i would call it common sense to look at the docs of the api you're using
@hybrid spoke would you like to have a look at my bounty plugin?
ok ill check if it worked
for what purpose
yo stfu ur so fucking mean
I need comments / concerns / suggestions
if you feel attacked you're lacking common sense
i mean why not, but cant guarantee anything
I DID LOOK AT THE DOCS YOU DUMB FUCK
Language pls
No worries, looking more for suggestions / concerns tbf I want to make it more functional, configurable, and fun
tell him to be polite then
🤙 im windows user
who doesn't tho
Should I send it here or just dm you it?
sadge
arch the best
is it on github or a jar or what
I just put it on git
just drop it here
idk, I don't really feel to change to other OS, I'm using windows since I first started using PC so I think that in near future i won't switch OSs
https://github.com/NukeCaps/PlayerBounties
looking more for suggestions / concerns tbf I want to make it more functional, configurable, and fun
Also I know there are a couple issues with this, I wrote it in one night and haven't touched it since. So there are a couple missing things and I'm sure the organization could improve haha. Also I know it's probably more sloppy than not, I have been on a lot of meds recently
bruh
doesnt look too bad on the first look
ChatEvent #setFormat? That only accepts strings
you have to turn your component into a legacy string
Good to hear, like I said I know there are a couple missing things for now, will hopefully get those written out when I've got the time
This happens if you call toString() on a component message.
You need to either parse it or use a method which makes use of components.
Also would love to hear if you have any suggestions to make it more functional / fun
ohhhh thanks
could only imagine visual shit for a bounty system
or cool bounties
functional bounties idk
or turn it into a revenge plugin
Yeah like I want to do more with the heads you get from bounties tbf
so you have to take revenge on the player that killed you in order to get your head back
something this game played in school
"zombie ball"
where if someone throw you out you can only get back in if someone else throws them out
and you get more valuable the more you killed and collected
other than that idk. let npc slaves spawn out of the heads or whatever
Oh that sounds cool
Does anyone know why the config folder isnt being created?
https://pastebin.com/DEAkdRyH
This is not how you program spigot plugins
Remove the main method comepletely. Your entrypoint is overriding the onEnable method in JavaPlugin, not a main method.
Sure? im watching a toturial on how to make a discord bot to the things i want it to, and in the video "main" is being used
So you mean that i should just take everything from "main" and move it inside "onEnable" and delete "main"?
The main method will never be called
Why does your BountyCommand have its own map/bounty instances for bounties?
Alright thanks
can i make an entity (armor stand) visible only to some players?
you can spawn it for them via packets or hide it for specific players
There's also setVisibleByDefault
^
thanks
Does anyone know why the message isnt being send?
https://pastebin.com/QPrKwmzv
I dont really have that much experience in jda but i cant see whats wrong
isnt jda with .query
Oh yeah i forgot, but even with .queue it still isnt working, the plugin is being enabled and the bot is online, but the message isnt being send
TextChannel textChannel = shardManager.getTextChannelById(DiscordBot.config.getString("channelId"));
textChannel.sendMessage("Vagten " + vagtPlaer + " døde til fange " + fangePlayer).queue();
Does anyone know how I can distinguish my own packets in ChannelDuplexHandler? I send them using Channel#writeAndFlush, so how can I make sure that the packet in ChannelDuplexHandler#write is my own packet and not block it?
can i hide a player and make them still visible in table when pressing tab?
im pretty sure jda has to send the message
nvm on that
can it find the channel?
you shouldnt really need to use sharding for spigot plugins
It dosent broadcast anything
https://pastebin.com/i5rRWkiy
What should i use insted?
But how do i send a message?
you can get the channel over the guild
get the channel from guild instance, then send message
does anyone know?
//Bukkit.broadcastMessage("In Structure");
CraftWorld cWorld = (CraftWorld) w;
Level world = cWorld.getHandle();
Location structLoc = cWorld.locateNearestStructure(loc, Registry.STRUCTURE.get(NamespacedKey.fromString("revamp:desert_pyramid")), 200, false).getLocation();
CraftChunk chunk = (CraftChunk) w.getChunkAt(structLoc);
Map<Structure,StructureStart> structs = chunk.getHandle(ChunkStatus.STRUCTURE_REFERENCES).getAllStarts();
for (Map.Entry<Structure,StructureStart> entry : structs.entrySet()) {
Structure structure = entry.getKey();
StructureStart start = entry.getValue();
int structBaseY = start.getPieces().get(0).getLocatorPosition().getY() - 4;
if (structBaseY >= loc.getY()) {
p.addPotionEffect(PotionEffectType.SLOW_DIGGING.createEffect(PotionEffect.INFINITE_DURATION, 1));
//Bukkit.broadcastMessage("Inside Crypts");
}else {
p.removePotionEffect(PotionEffectType.SLOW_DIGGING);
}
}
}else{
p.removePotionEffect(PotionEffectType.SLOW_DIGGING);
}```
This is how I went about checking if a user is in a structure, there is more than likely a better way to do this but I couldnt for the life of me figure out how to use a TagType or Registry.
can't you just extend the existing packet class? then check instanceof
e.g. instead of sending XYZPacket, just create a class MyXYZPacket that extends XYZPacket
I wanna do it with multiversion support
and I'm not a big fan of making 20 modules for each version
also can't use bytebuddy cuz it weighs 3 MB
Structure structure = level.registryAccess().registryOrThrow(Registries.STRUCTURE).get(new ResourceLocation("revamp:desert_pyramid"));
StructureStart start = level.structureManager().getStructureAt(new BlockPos(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()), structure);
if (start.isValid()) {
// in structure
} else {
// not in structure
}
Isn't it possible to accomplish that using the api
Oh
Would anyone with some towny api experience mind taking a look at a project for me?
In which case you could just do
Structure structure = Registry.STRUCTURE.get(NamespacedKey.fromString("revamp:desert_pyramid"))
List<GeneratedStructure> structures = new ArrayList<>(chunk.getStructures(structure));
if (structures.isEmpty()) {
// Maybe in structure
GeneratedStructure currentStructure = structures.get(0); // Check with currentStructure.getBoundingBox()
} else {
// not in structure
}
It's less about that and more so to fix it
Ok then hold on haha
Do you know how?
Ngl you are probably my favorite person in this server lol
https://github.com/NukeCaps/EpirateTownyAddon/tree/master
Alright so the issue is that the events are either not correct or something else in my code is just bugging. The intended functionality of this project is to add a cooldown to the player when they join / leave a town in order to prevent quick town hopping of sorts... In addition to this, it should also prevent anyone from inviting a player who is on cooldown as well as informing the inviter that the invited player is on cooldown... however even after adding in some debug prints, I've still had no progress with finding the issues... I was using different events before but the intended functions were still not working... if anyone has some towny api experience perhaps they could point me in the correct direction
So what happens
Literally nothing haha
Do the events not fire?
The point is that a cooldown is added to a player after joining / leaving a town if they do not already have one, if they are on cooldown, the event gets cancelled and they arent allowed to join / leave a town
As far as I can tell, it seems like they just don't
Because none of my code seems to be getting ran when a player joins / leaves a town
Put a print and see if it gets run
are you registering yoru listeners?
Also depend on Towny
I did, even after the debug statements, absolutely nothing
Also yes
and I already am
Perhaps I'm using the wrong towny dependency?
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<dependency>
<groupId>com.github.TownyAdvanced</groupId>
<artifactId>Towny</artifactId>
<version>0.99.5.0</version>
</dependency> ```
I know 0.100.1.0 is the most recent, but this project is being written for a server using 0.99.5.0
events have not changed since then
I mean in your plugins.yml
Oh dear god I forgot to do that...?
Do as olivio said, then show us a server statrup log
depend:
- Towny
This works correct?
yeah
Working on the startup log, thank you for your patience
https://hastebin.skyra.pw/esaheyokik.prolog
@chrome beacon @eternal oxide
Can anyone please help me on how to send a message when a player with permission "vagt" dies
https://pastebin.com/i6kaBSjk
All starts up so now add some debugs at the beginning of each listener., before ANY logic
Heres the full log if you wanted it
Alright let me do that
I guess because it happens to a Block.
It only fires for a Player, but I guess in thoery it could fire for others, in the future
This should be fine yeah? @eternal oxide
We're just trying to see if the event fires correct?
Hi marco
yes
anyone?
why is your git name set to BuildTools lol
That was fixed in #171 btw
I wonder that too sometimes
shadow did
It was a long standing bug that annoyed me.
Why is my git name sometimes set to BuildTools
Because BuildTools would set the name and email globally if they were not already present so it could compile correctly.
bruh
You'll have to go in and change your git settings, but BuildTools will no longer do that.
--local lol
🍺
¯_(ツ)_/¯
There were issues with other approaches to fix it before, but now it just sets local env vars.
It is?
Idk how to fix that lol, this is literally the first time I’ve ever used GitHub other than to look at others source / api documentation
What's the best way to store a list of itemstacks, strings, and 2 ints in an SQL table?
I was thinking serialization but wanted to hear other opinions
it's shown above the method name
git config --global user.name "Your Name"
git config --global user.email "your@email.com"
Eh I thought serialization was like basically the only method
i mean, serialisation just means "transform this live object into some transportable data representation"
it is not a technique
What would be the equivelent of compileOnly files("libs\HeeseUtils-1.0-all.jar") in maven?
But perhaps just making a table for each datatype would be better?
that seems unefficient
It also depends on what you are trying to store and why.
Storing the rewards for a quest. So I am storing a list of items to give, list of commands to execute, amount of xp to give, amount of coins to give.
I'm probably not the best person to be speaking on that topic to be fair, I have very little experience with sql
probably installing the jar to the local repo and then scope provided
It's showing buildtools because I haven't set that up right? Also I have absolutely no clue how to change that
Those are terminal commands, you just run them with the proper info.
Ah gotcha lol
I ran those in intelliJ terminal, still displays "buildtools" above all my methods... not sure if I did it correctly or not
You may need to restart IJ for it to refresh.
I did that as well, still displayed buildtools
I wonder if that works off of commit name then. 🤔
if those are already committed files, you'd have to change them
you are basically seeing "someone else's" changes
Ohhhh that's probably the issue then
Since I did those terminal commands however, now when posting new projects to git, it should display what I put in correct?
go into your repo and enter git config user.name
does it show the correct name now?
Can you show me an example? I am not sure where this is sorry
Who among you could come to me to fix something that I can't?
you just cd into your project folder (e.g. with windows command prompt, or in git bash) and then you enter git config user.name to see what it says.
Ah gotcha, yes it works now
Changed both the name / email, and both are popping up correct now
Thank you btw, that was kinda annoying me that everything just said buildtools haha
uuhm what is a final var in kotlin
np :3
can't be overridden by subclasses
the property
ah ok that makes sense, thx
val is used to declare a read-only (final) variable. A val variable can be assigned a value once, and its value cannot be changed afterwards
I know, but it's a var, and it's final
not val
it kinda seems weird because it sounds like "final not-final"
So then just apply final to val and there you go right?
That does not answer the initial question?
Yeah the way it looks written is weird for sure
That's why I don't use kotlin cuz its goofy
final in kotlin doesn't have to do with immutability/readonlyness
The question was "what does the combination final var mean" and you answered everything but that lol
it's about inheritance
Give me a break, I'm on 8 different meds man
Welp
Also recovering from a head trauma so.... I'm slow I know
I've read the code review thread yes
So then don't be so mean! D:
Well that explains the "2 years ago since I last gave a fuck" in your discord
Look man I'm self taught over 4 years that has been on and off obviously I'm not going to be the best dev, but I am certainly trying! I just want to help where I can as well and thank you for pointing out the response I gave alex had absolutely nothing to do with what they were asking, but I swear my intention was to help only... I don't know everything i can admit that but we all have to start somewhere right? I'm just doing the best I can man
I've got a PlayerBlockPlaceEvent which gets cancelled and after that another block is placed at the exact same location, but the block doesn't get placed, instead it seems that the cancel of the event is too slow and the block gets placed too fast. Is there anyway around this? And, would a scheduler (for a few ticks delay) work?
I ran into an issue such as this where a delay was needed to achieve the intended function with squaremap, I added about a 3 second delay and it worked perfect after that...
Perhaps 3 seconds is too long however, you can always adjust it to your needs, but it seemed to fix the issue I was having exactly how I wanted it to
Okay, yea, 3 seconds are a bit long, so I'll prob use 5 ticks delay at max (or the minimum I can do for it to work), thx
that's normal. At the time the BlockPlaceEvent gets called, the block is actually already placed. Cancelling it will then "undo" placing the block after all event handlers were called. So two options:
- Don't cancel the event, or
- Set the block a tick later
good thing alex is here, they seem to know everything about spigot api haha
It kinda works like this, don'T ask me why lol
if(player has placed a block)
call blockPlaceEvent
if(blockPlaceEvent is cancelled)
set block back to original
the fact that some cancelable events fire post mutation is goofy
but not all do so it isn't really consistent lol
is it really just a concern when it comes to functions that require that sort of instant cancellation?
I think it's because a ton of different things that could happen when right-clicking with a block in hand and doing it that way, spigot doesn't has to handle all those different situations or sth
They're not meant to and I'm not sure if Alex is correct. He might be, but I thought it went place -> capture and revert -> event -> if not cancelled place captured
not cancelling the event also introduces light issues ;-;
So like it does place, but then it's reverted before the event
What in the hell
Any idea why some events follow this sort of process?? Seems really goofy
Because placing a block is quite unpredictable depending on the item and block used
It's not a case of just placed block = block version of item in hand
to me it looks like it first calls placeBlock, and then later the event. and if the event is cancelled, it just calls update(...) on the original blockstate
So the server has to run all the place code then figure it out
Maybe it gets more complex when you are trying to mess with the placed block... that makes sense for sure, but in cases of it being just the vanilla game... I guess I just dont understand why it'd be necessary
what the heck is a SolidBucketItem
How do you know what orientation stairs are placed for example?
Ah ok
yeah
I forgot minecraft does that haha
But even then, would it not just be better to handle the cases of those specific blocks instead the entire event?
Definitely easier to use the existing code than rewrite it all
the logic for calling BlockPlaceEvent would probably be spread out into 320 different classes then
Damn yeah I suppose that's correct... I guess I just forgot how many blocks are actually modifiable like that
how to notice that a project is going into the wrong direction:
What are you up to alex?
Essentials, but with modules
https://github.com/SpigotBasics/basics
WIP modular core plugin for modern Spigot versions - GitHub - SpigotBasics/basics: WIP modular core plugin for modern Spigot versions
Maybe... I've never used it so I am biased 100%
it looks weird at first but it's really great
Sigh this towny addon is giving me such a headache
The events just arent firing and I have no clue which ones to use because I swear I have tried them all
https://github.com/NukeCaps/EpirateTownyAddon
If anyone would like to help 😄
Idk I feel like this whole project is just written incorrectly and I'm just too slow currently to fix it lol
player.setPlayerListName to just change their name in tablist, but how would I reconstruct the hole tablist for each player differently? any in-game API?
Your gonna need to use packets
hey I can't figure out why neither the fuse nor the velocity is being set with this code
@EventHandler
public void onSneak(PlayerToggleSneakEvent e) {
boolean sneaking = e.isSneaking();
if(sneaking) {
PluginLogger.getLogger("DTNTPlugin").info("Player is sneaking");
Player player = e.getPlayer();
TNTPrimed tnt = (TNTPrimed) player.getWorld().spawnEntity(player.getLocation(), EntityType.PRIMED_TNT);
tnt.setFuseTicks(0);
tnt.setVelocity(new Vector(0, 0, 0));
}
}
}```
Its supposed to spawn in tnt at players feet when they shift
and what does actually happen?
the tnt just has the default fuse (120 or 160?) and the usual random velocity when spawned in
its working except for the fuse and velocity portion
try to set the ticks and velocity in the consumer https://blog.jeff-media.com/use-consumers-when-spawning-custom-entities/
When you want to spawn a custom entity, e.g. with a custom name or certain items equipped, you must use the method World#spawn(Location, Class, Consumer) unless you give a shit about compatibility with other plugins. I’ll explain why. The shitty way Usually, you can easily spawn entities like this: That is fine, as...
player.getWorld().spawn(location, TNTPrimed.class, tnt -> {
tnt.setFuseTicks(0);
}
https://github.com/NukeCaps/EpirateTownyAddon/tree/master
Made some reformations to the code, was trying to implement some of the suggestions I got before about readability and strict single purpose / functions methods, also fixed an issue with me (stupidly) shading towny into the plugin, last thing I tried to do was reduce the strenuous error handling into a simpler system. Please let me know what you think and if I could make any more improvements!
Is there a way to attach meta data to an inventory? Say, for example, store a string within an inventory without using any items? Thanks
https://github.com/quadrix-hd/Warp-teleporter somebody wanted to remake my teleporter code now nothing ist working the plugin doesnt show up on the server no error messages
if theres nothing in console, then you didnt put any .jar in the plugins folder
also why is that repo using a maven layout if theres no pom.xml?
persistent across restarts: no
otherwise just put the inventory into a map
Hmm, I'm already storing all my inventories in a map. I'm looking for a way to check within the inventory interact event whether an inventory is part of my plugin or not. I'll look for another way. Thanks!
yeah whats the issue with that?
just check if yourMap.containsKey(event.getClickedInventory())
Hey alex you should look at my revissions and let me know what you think... I worked kinda hard on the formatting and trying to make it a lot easier to read
Ah, so literally storing the inventory object inside a hashmap? Currently I'm storing classes which contain an inventory object in my hashmaps.
I love honest feedback, and you give good notes as well
You have to use Inventories as the key
Right okay. I'll probably need to create an additional hashmap in that case to track inventory objects. I'll have a think about how to do that. Thanks
its not the whole code but the jar ist in the plugin folder
yes, I usually do sth like this:
public class MyInventoryInformation {
String idk;
int someThing;
// Whatever information you wanna store for that inventory
}
// ...
private final Map<Inventory, MyInventoryInformation> inventories = new HashMap<>();
?paste log
then in inventory click event just use inventories.get(clickedInventory) and you got your custom information object
Right I see. I spend the good part of a day completely refactoring my gui manager so I'll have to change that around a bit again lol. Thanks for the help
np
i have 6 files with code should i past all of it in there?
no, you shall paste your server log
now i found the error
Anyone know a good way to make mining fatigue not mine slower? Im replacing it with a custom effect
Uhh
Don’t let the player get it?
Or rewrite the block breaking system to be server side
Kek
Im replacing it so I need to use it, so not letting them get it is something not so useful lol
Ahh
Well yeah you’d have to rewrite the break system
Why replace it thought, just make a custom effect system
I need it to appear in the inventory system like normal effects do. Plus it is pretty much a replacement for it
Itll be used in ocean monuments but it more completely disables block interaction apart from a select few.
Why not just go off the base mining fatigue then
Since it seems you want it to be a more powerful version
Because certain items need to be mined at proper speeds (Wo/ Mining fatigue)
java.lang.NoSuchMethodError: 'net.minecraft.core.IRegistryCustom net.minecraft.world.level.World.I_()'```
Also this is the error I get
with the code from earlier
This one
Did you remap for the right version
Hmm perhaps World#registryAccess is paper only
I am using paper tho
Yes but I mean at runtime
Yea I use paper
Im guessing it is this
Im testing it rn
Yea I got no clue
Same error
Could I be reobfuscating wrong where only some of the methods are done correctly?
Is there a way to loop through all advancement names?
I have tried using Bukkit.advancementIterator() but have tried a couple different ways but can't find a way to get the name of it
Advancement#getDisplay#getTitle?
For some reason it can return null so I tried a new method but put in a try and just skip the null and it works
thanks
Anyway the hidden advancements probably have null names
Or maybe all the recipe ones
does Player#closeInventory trigger InventoryCloseEvent
well, it does xd, i was just wondering about the event
Everything is on 1.20.2
yes
if you want to not trigger the event you're probably doing something wrong. If you want it to trigger the event you are probably doing something right
i want it to be triggered 😂
Question by what was getServer().getCommandMap().register("", new Settings()); replaced in 1.20? So that I can simply use command instead of CommandExecuter
Wut
So I want to use extends Command in the Command, but I don't know how I can register it in the Main
For CommandExecuter, for example, it is getCommand("setwarp").setExecutor(new SetWarp(mySQL));
You can only register commands that are listed in your plugin.yml
With the api anyway
Yes, with CommandExecuter I have to enter it in the Plugin.yml, with extends Command you didn't have to do this in 1.19 and you could register it like this getServer().getCommandMap().register("", new Settings());
is that a fork spigot has no such option as far as I remember
?jd-s
getCommandMap :weewoo:
is that a paper addition
perchance
I have no idea, I'm always changing programming and that's why I still have it in my head
if I'm trying to update a structure, do I need to unregister it before I register it
From the registry?
yes
eh
just a small personal project I'm not too concerned
I'll take the path of least resistance
#1100941063058894868 message Anyone interested in giving this a look?
Well for starters your package setup isn't convention.
Some of the comments are redunant. Comments should only really be used when clarification is required
there was an extra for the cooldown util class, but that was removed since I updated the cooldown system to just use towny, that just left the main in an odd spot with the events hanging in that other package
For example, if you think this requires a comment it would be because the name isn't clear.
That's fair, I just wanted to mass comment as this is a project I was proposing to Llmdl (head towny dev) if they perhaps wanted to use this. Just trying to make the readability as easy as possible for anyone wanting to give it a look more or less.
If your code isn't mostly self-documenting you've got another problem. Here, if you're okay with it I'll refactor a class as an example.
And it was also something I might like to keep for a portfolio of sorts... so any and all notes are appreciated
Sure no worries!
I thought my naming was pretty alright for the methods and what not? Do you think they could be better to describe the function?
When you write that many comments you seem insecure others can read your code. Don't assume the person reading is an idiot. Just assume they're going off variable names and function names. Comments are for clarification so you don't need a method called getAllXfromYthenParseXandY etc etc
^ +1 only time you need comments is if you have a ton of magic numbers. They tend to be useful there
Right right... also to be fair, this is probably the first time I've ever actually commented code (I was showing my father haha), in addition to that like I said I was proposing it to the head dev of towny so perhaps the comments would be nice just to give a quick scan of the code perhaps.
Gotcha that makes sense
is there any preference between the runTask and scheduleTask variants
wdym by this
Also, you need to remember that errors are for users
Bukkit.getLogger().log(Level.FINE, "TownPreInviteEvent Failed: either ln 32 / ln 53"); This is terrible for the end user to read. Not to mention it's the wrong log level. You really want to explain that something terrible went wrong. It's not a "weird error" you're logging it's something potentially gamebreaking and the user should be made directly aware via an error message that states exactly what's gone wrong.
often times with these its important to send the stacktrace with the error as well if there is one
Fine level never gets logged anyway
I'm going to take this to the thread as there is a lot more to unpack
Keep in mind this plugin is also in production, I haven't had the chance to test it yet either, so I'm not sure it even works
I only have one mc account so I can't test the functions
Offline mode
^ Use Offline mode
I can connect to localhost that way?
What event is triggered when giving an allay an item? PlayerInteractEntityEvent or PlayerInteractAtEntityEvent doesn’t seem to work.
if you set online-mode to false in your server.properties yes
Oh cool thank you
Also, @vocal cloud as I said this production project, so the goofy error prints are just for functionality testing, they will have been changed by the time this comes to being finished
This code here doesn't need to be try catched as the method inside doesn't throw an error.
But you are correct I think I used the wrong levels on some prints haha
Oh yes thank you for pointing that out
Putting a guard case for the inviter or invitee for example will delete most of your nested if eyesore
The warnings Intellij is highlighting are essentially "you don't need this anymore because it'll always be true"
Gotcha alright
If you have more, please, keep on. I'm gonna have a lookover of this first but I will read everything else you got
Here is the final result. Cut 50% of the code and nothing of importance was lost.
Yep, I'm seeing that now huge improvement, I appreciate that
private final EpirateTownyAddon epirateTownyAddon;
public TownPreInviteEvent(EpirateTownyAddon epirateTownyAddon) {
this.epirateTownyAddon = epirateTownyAddon;
}
// Event Handler method to handle invites to players on cooldowns.
@EventHandler
public void onInviteSent(TownPreInvitePlayerEvent event) {
Player invitedPlayer = event.getInvitedResident().getPlayer();
Player inviter = (Player) event.getInvite().getDirectSender();
if (invitedPlayer == null || inviter == null) {
Bukkit.getLogger().log(Level.WARNING, "Could not process invite as either inviter / invited player is null!");
return;
}
if (CooldownTimerTask.hasCooldown(invitedPlayer.getName(), "TownHop Cooldown")) {
// Get the appropriate message(s) related to this function.
long remainingCooldownHours = epirateTownyAddon.getRemainingCooldownHours(invitedPlayer);
String inviteMessage = ChatColor.translateAlternateColorCodes('&', epirateTownyAddon.inviteCooldownMessage
.replace("%player%", invitedPlayer.getName())
.replace("%hours%", String.valueOf(remainingCooldownHours)));
event.setCancelled(true);
event.setCancelMessage(ChatColor.translateAlternateColorCodes('&', inviteMessage));
}
}
}```
This look better? @vocal cloud
Comments are still unnecessary imo. Only need them when it's a function you've made that needs clarification on either the input or the output that an annotation cannot provide
could someone possibly help me, im trying to make a little mod that presses or simulates a keypress a key whenever theirs a certain message displayed in chat ex: "blah blah blah" then i would press 0 on my keyboard
not a player typed message but a system typed message
Alright no worries, I'll remove them then haha
you can't send keypresses to the client
what you want isn't possible
ah i see
if you're talking about forge/fabic
its certainly possible but this isn't the place to be asking those questions
okay, thank you
could you send me those discords per chance
@vocal cloud
...
// this is an event class btw
}
*
*
*
public boolean isCooldownExpired(Player player) {
return !CooldownTimerTask.hasCooldown(player.getName(), "TownHop Cooldown");
}
// method in the main class
Should I instead of using CooldownTimerTask to check if the player has a cooldown active, should I just reference my helper method for checking if the cooldown is expired?
It achieves the same outcome either way correct? I just wasn't sure if it would be better to use the resources I made haha
let me be helpful for you.com
thanks tho numb nuts
Up to you. If you feel it keeps the code cleaner and doesn't add unnecessary bloat.
Well I suppose it just comes down what the outcomes are when I test it
The nice thing about the way I did it was you can easily add temporary logs to before/after the if assuming that's where trouble arises
https://github.com/NukeCaps/EpirateTownyAddon Alright what do you think of the updates
Yeah I did notice that for sure, you have great writing techniques
Practice makes perfect
Yeah I notice that for my 4 years on and off of self taught spigot development, my logic is pretty decent, I just have poor writing techniques and formatting
At least I think my logic is pretty decent haha
Well your over care with try catch is something you need to watch out for
Try catch the entire plugin
I'll check the code later
To be fair that was just kinda added in because of rage earlier, I was testing it and just absolutely nothing was happening so I just added all sorts of debugging
is there any reason to use one over the other
or like a preferred default
log to debug never try catch to debug
Gotcha no worries
Is this in the BukkitScheduler? I mean a lot of those methods are deprecated for one reason or another. I'd stay away from the schedule methods looks like they're all deprecated. For a naming reason but still depreciation even in bukkit means it's possible they could eventually be removed. Especially with Commodore now it's very possible If you use them it's possible they could dissappear and only ABI is retained
?jd-s
https://gyazo.com/572806861ddc263f901210c60b0ba6b1
https://gyazo.com/1b4b1b3af94e2e97e6daaff1a500ed74
https://gyazo.com/f4d19b63a63ac897b7bb5eb19d6b75a2
https://github.com/NukeCaps/EpirateTownyAddon
Finally got this thing working haha. I'm now going to add an ingame gui where you can mess with the config for the cooldown timer and message customization. Let me know what you guys think! @vocal cloud (sorry for the ping but you're still online and I'd love to hear your feedback!)
Also yes the default messages are ugly but they are configurable and support & color codes haha
Some of the schedule ones aren’t deprecated
So that’s why I was asking
selfrole Add or remove a selfrole from yourself.
cleanup Base command for deleting messages.
embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.
findcog Find which cog a command comes from.
names Show previous usernames, global display names, and server...
userinfo Show information about a member.
listcases List cases for the specified member.
reason Specify a reason for a modlog case.
permissions Command permission management tools.
Compare different mappings with this website: https://mappings.cephx.dev
#bot-commands lol
Hey got a gradle error when trying to get authlib to work.
Runescape:main: Could not resolve com.mojang:authlib:5.0.51.
Required by:
project :
https://paste.md-5.net/wufegifebo.cs
My entire build.gradle
I just built this project and its for the latest version but i created this project the same way I do for any other project so I don't understand what is wrong this time. Anyways I need the authlib to work for the latest version, because I am going to be running the latest version
@Helper I think the website is down and thats why im not able to download Mojang Authlib
works fine for me
I dont know why it is still giving me this error when building my gradle file.
Runescape:main: Could not resolve com.mojang:authlib:5.0.47.
Required by:
project : > org.spigotmc
1.20.2-R0.1-SNAPSHOT:20230922.144705-1
In my dependencies im using 1.20.2 now instead of 1.20.4 but i still get the same error
Why do you have both spigot and spigot-api
Well, to access the full-server so i can take advantage of Packets to do the things I need to do.
Then you don't need the spigot-api dependency
'NMS' i guess
The api is in the server jar
You do understand though that with only this line it compiles fine but I dont have access to NMS
compileOnly 'org.spigotmc:spigot-api:1.20.2-R0.1-SNAPSHOT'
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
But im using 1.20 i dont understand
How would that make sense
Because it applies from that version and onwards
hmm
I imagine you dont change your build setup besides dependencies every version of your plugin.
Okay lets stay on topic though, I am just trying to get access to NMS to work.
Hey there frostalf, how are you doing?
It is on topic and what the bot sent should help you
Imported this: compileOnly 'org.spigotmc:spigot-api:1.18-R0.1-SNAPSHOT'
Builds successfully, but of course no access to Mojang Authlib
You dont need the api if you are going to depend on the server jar
No reply D:
Nice, but technically all git repos are functional even if nothing in them
I meant functional more so when it comes to the plugin haha
It's a small niche towny addon that implements a configurable coodlown that prevents townhopping
Bro i dont think you understand at all
I dont understand that the server jar has the api?
You are the one that wants to use nms which is fine. you need the server jar for that
In addition to the time being configurable, the messages sent to the player are as well (currently only & color codes / formatting work)
Yes but it doesnt work!
Ok did you follow in the steps in the 2 posts?
Yes am still confused
https://paste.md-5.net/ogilagozes.cs
Please just be straight up with me I feel like your being smart I cant tell
That link is my build.gradle file so tell me why my NMS is not working?
since google kinda left me hanging again, i have a not that relevant question about general java (and idk where else to ask tbh):
is it better practice to use:
public static final String A_STRING_CONSTANT = "Some String here";
or
private static final String aStringConstant = "Some String here";
public statif String getAStringConstant() {
return aStringConstant;
}
?
Or is this just preference?
Well i only sent a link to 1 post but there is two posts. If you read through the first one it will lead to the second post. And there is more info. I dont know how to set up gradle the proper way or what it should look like. I only know maven however you know gradle so i gave you the link to the necessary info if you are going to depend on the server jar
It does make a difference but its quite a long technical explanation though. Generally you dont make methods static in places where it doesnt fit to do so. If its a constant meant to be accessed globally then its fine to leave it public.
Bro im going to be completely honest i read all that please dont take me for a lazy person, i tried all that you offered me i just dont understand how this can help me get the use of NMS in my project.
And I am shading not depending their is a difference bro
You are shading the server jar?
O.o
Well regardless will have to wait till i get home as i am about to drive. Just got off work
Yes through gradle? Lol. Thats why I told you i dont think you understand
I see. I can imagine that assigning objects to a constant would not be a good idea since you could still change values inside of it, correct?
But for literals it's fine like this?
damn, i just got ON work
I just had lots of problems trying to shade towny as a dependency haha tbf it was also maven so not sure if that's a different process
Plugins typically dont work if they are shaded
Well shaded into another plugin that is
ah gotcha, yeah it was causing me issued for like 5 commits
Btw frost do you wanna review the project I've been talking about?
Any ideas on how I can get the height / width of a display entity? Display#getDisplayHeight and Display#getDisplayWidth exist but return 0 🙂
yeah ofc you won't have NMS with that, that's just the api
thx
probably would have helped if you just read a bit more
if id want to set villagers recipes how would i set the trades, like ive seen the docs but it looked like i could only set the item you need to pay with and not the item you get after you pay
declaration: package: org.bukkit.inventory, class: MerchantRecipe
Where do you get that idea?
"result"
Can I re-register a tab-completer on the fly?
Hey, im coming back inside the community after some time and i lost track of the new adds like block display and i saw people like making ropes etcs.. with physics does the block have it already by default or something is adopted to make it work?
maybe
Just set the tabcompleter again?
yes, just call setTabCompleter on the command
okay perfect, thanks
Well how many items are you expecting to get after you pay???
one but how to set the pay item and the get item, theres only one itemstack argument to pass
damn i cant do it in one line?
NerchantRecipe recipe = new MerchantRecipe(result, 1); recipe.addIngredient(myItem);
:p
val recipe = MerchantRecipe(result, 1).apply { addIngredient(myItem) }
also whould -1 work as infinite uses?
technically yea but wouldnt look good
your ceo of hell
couldnt he just Ctrl+Alt+L
I don't think so. Why don't you just set it to Integer.MAX_VALUE
oh yeah but visual studio also suckz
but also i think there was like a code prettier online or sum
VS has a format all
fr, i use jetbrains intellij idea
It’s like CTRL + K + D or something
"i use a special operating system that uses \u+151 as line separator"
you couldve also change like function names to "uu6YS7" or sum and variables to "00nau7HS"
you could write another program to do it for you
is this just gibberish or are these os shenanigans?
its possible to make blocks you can throw or placing them not in the normal way like stacking them in the border etcs? and if you have a guide or some kind of plugin could be useful
Yes and no. You can have falling blocks, those don't have to align to the block grid. However having tons of them will lag out your server since they are entities, not blocks
im trying making a system for props like box you can move and stack to reach places you cannot reach normally
is it possible to show a task in two categories in gradle?
it does have auto formatting however
wdym by places you can't reach normally?
I'd like to have this show up both in categories basics-test, and in basics
like high place idk rooms in flats
also it depends which visual studio you are referring to
visual studio code doesn't work exactly the same as Visual Studio Pro
isn't the crab claw coming with the next update? It increases build range
you need not for that but for like entering room
like this
There is a comment that explains exactly how it works
xD
I'm not taking shots. I just found it funny how you answered everything but the question
No blaming anything on anyone
hopefully you didn't hit your head at 50mph against a windshield
that is what happened to me XD
The window learned its lesson though and didn't try fighting me again
but to be fair I didn't try fighting it again either
What a peaceful resolution
Set the group of the task
Not sure if it can show up in both tho
Maybe just have two tasks to cover both groups
also, it is a myth when they say cars can't fly
as well as it is a myth that you must use an axe to split a tree
a car is just as effective as long as its going fast enough
I mean doesn’t it depend on the definition of flying?
I suppose that is true, because even though I did go quite the distance, it didn't like stay in the air for a long duration
Yea lol
but I could blame the tree for being in my way though
but, it did get split in half so there is that
should i use hibernate with spigot/plugin dev?
I did set the group, otherwise it wouldn't show up 😛
I don't think I can add the same task name twice, otherwise how would it know which one to run when using it from CLI?
but sure let me try quickly
idk I just find it more fancy. In 99% of cases I only need to run copyAll... so I'd like to have it in the normal group. But it also belongs into the other group kek
Ah I see
Well
There might be a way to attach the task to both groups on the intellij sidebar with some hacketry, tho doubt its worth the effort
Also alex can I dm you about something
sure
yeah probably not, anyway thanks
I figure even changing it in IJ will not really be possible, IJ seems to just get the output of gradle tasks
I think I'll just move the copyAll to basics, and then basics-test is to test specific modules
alsop what the hell is this
😮
why does shadow include that lmao