#help-development
1 messages Β· Page 1066 of 1
it doesnt show in /plugins
errror in startup?
i dont know console is flooded
Drop the latest.log here
I'm not running up a server to fix it
if you give the error/log I'll take a look but I'm not reading through ChatGPT code to debug
Just have chatgpt fix it π
Ideal solution
all he has to do is add the commands to plugin.yml then
it didnt on mine somehow
well then post logs
or read it I guess
does it work
dunno I just booted it on a test server
post your entire server log, it has to say why it's not loading
[19:05:28] [Server thread/INFO]: [minecraftplugin] Loading minecraftplugin v0.0.1-SNAPSHOT
[19:05:28] [Server thread/INFO]: [GroupManager] Loading GroupManager v3.2 (Phoenix)```
it loads fine
bruh racist plugin?
uh?
more like chatgpt plugin
I named it minecraftplugin as thats what ChatGPT named it
no clue what is racist about it
isnt env.build number supposed to be shown?
nah thats just a local build of Vault for debug
Now all you have to do is open up the plugin.yml and add all the commands
Why is there a limit on teleport duration of 59 or am I missing something?
givelifestealersword,giveendsword,givebowofapollo,giveairtrident,givewardendagger,giveproteinshake,givebowofrhythm,givepresidentcrown,givedragonsoulsword,givewealthgem.
those are the commands the commands in your code
pull out the plugin.yml
with 7zip you can just right click the jar and open with 7zip
you don;t need an IDE or anything
just a text editor
and an archiver that can open zip files
opened
name: minecraftplugin
main: me.mazen.minecraftplugin.Main
version: 0.0.1-SNAPSHOT
api-version: 1.20
authors:
- ChatGPT
description: Weapons.
uh
shoudl be a link for these
do i just
givelifestealersword,giveendsword,givebowofapollo,giveairtrident,givewardendagger,giveproteinshake,givebowofrhythm,givepresidentcrown,givedragonsoulsword,givewealthgem.
copy paste
im not really a java coding guy
this isnt even java π
add a sectionyml commands: givelifestealersword: description: Gives a Sword. giveendsword: description: Gives an End Sword.
etc
use spaces to indent
no
its literally just text
lol
so its all like this?
it just does 4 spaces
Then put the plugin.yml back in the jar
You can just watch any youtube tutorial instead of using chat gpt
givelifestealersword,giveendsword,givebowofapollo,giveairtrident,givewardendagger,giveproteinshake,givebowofrhythm,givepresidentcrown,givedragonsoulsword,givewealthgem.
ISTG
MY NERVES HAVE ENOUGH ANGER
only if your editor is set to convert tabs to spaces. Not all do
uh, a description
name: minecraftplugin
main: me.mazen.minecraftplugin.Main
version: 0.0.1-SNAPSHOT
api-version: 1.20
authors:
- ChatGPT
description: Weapons.
commands:
givelifestealersword:
description: Gives a lifestealer Sword.
giveendsword:
description: Gives an End Sword.
givebowofapollo:
description: Gives the bow of apoll.
giveairtrident:
description: Gives the air trident
givewardendagger:
description: Gives the warden dagger
giveproteinshake:
description: Gives the protein shake
givebowofrhythm:
description: Gives the bow of rythm
givepresidentcrown:
description: Gives the president crown
givedragonsoulsword:
description: Gives the dragon soul sword
givewealthgem:
description: Gives the gem of wealth
correct?
looks ok
not workgin is not very descriptive
are you op?
yes
They show up for me
I'm going to bet you didn;t put the plugin.yml back in the jar
edit teh jar and look
alr if i didnt do it ya gotra fix it now\
you can;t make changes with the server running
oh
yeah it didnt save
restarting server now
it works
but
doesnt work π
so it gives an item
with that name
but that item doesnt work
Thats ChatGPT for you
does anyone know why my PlayerInteractEvent is firing twice?
add event
it fires for both hands
?interactevent
The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.
For example, only executing code if the main hand was used:
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
return; // do not progress past this point |
}
// provide functionality
}
looking at the code the lifestealer will only work if you right click air or a block
is it supposed to work on right click air/block?
ye
Good job ChatGPT
ah yes a nice assert
kek
I'm sure it will be fine π
src with pom so you can import it into your own IDE to make changes
?paste
wdym
well thanks ig
I did what you requested, to build your ChatGPT source into a plugin. I did say I'm not fixing anything for you though.
thanks
Hey
How can I do a multi-module Gradle project with some submodules using a different JDK than the main project?
I'm trying to do like NMS_common, NMS_v1_21 etc.
1.21 NMS sub-module will be on Java 21, NMS_common will be on main project's JDK version, aka 17 etc.
Is there an example project on this?
This is Maven tho
Spigot is setup to use Maven
Gradle would work wouldn't it?
No, I'm trying to switch to Spigot because I want to publish my plugin in SpigotMC marketplace
i do it in this project, check the parent build.gradle.kts and the nms modules https://github.com/PineappleDevelopmentGroup/Pineapple/blob/dev/
any help?
you can;t create a NEW instance of your plugin
use the one Spigot already created
import il25plugin.betterteams_tokenenchantbank_addon.TokenEnchantStuff.YmlReader;
import il25plugin.betterteams_tokenenchantbank_addon.commands.CommandManager;
import il25plugin.betterteams_tokenenchantbank_addon.utils.BankStorageUtil;
import org.bukkit.plugin.java.JavaPlugin;
import java.io.File;
public final class BetterTeams_TokenEnchantBank_Addon extends JavaPlugin {
private static BetterTeams_TokenEnchantBank_Addon plugin;
private static YmlReader ymlReader;
@Override
public void onEnable() {
plugin = this;
saveDefaultConfig();
getConfig();
new Messages(this);
getCommand("TeBank").setExecutor(new CommandManager());
BankStorageUtil.loadTeams();
new Placeholders().register();
File pluginFolder = getDataFolder();
ymlReader = new YmlReader(pluginFolder);
ymlReader.readYmlFiles();
}
@Override
public void onDisable() {
// Plugin shutdown logic
}
public static BetterTeams_TokenEnchantBank_Addon getPlugin() {
return plugin;
}
public static YmlReader getYmlReader() {
return ymlReader;
}
public static void setPlugin(BetterTeams_TokenEnchantBank_Addon plugin) {
BetterTeams_TokenEnchantBank_Addon.plugin = plugin;
}
}```
is the plugin variable the problem?
are you extending JavaPlugin elsewhere?
and wth is this new Placeholders().register();
Uhh, PlaceholderAPI probably
in which case thats whats doing it
I don;t remember placeholder but it's probably something like `PlaceHolderAPI.instance().register...
No
PlaceHolders is a class that extends placeholdersexpansion
It changed a long time ago
I think I've found the problem
I've took a look but I'm confused since I've never worked with multi-module projects. I have an existing project which has a src folder, how would I turn it into a multi-module project?
Ok ty all, it works now
I'm trying to run a check and if passed stop the player from swimming. I tried detecting the EntityToggleSwimEvent and cancelling it but it didn't seem to work. Then I tried detecting EntityToggleSwimEvent and just doing setSwimming(false) and that managed to crash the server and generate a whole bunch of errors. What is the best way to go about this?
You made sure the entity was a plyer yes? (probably did just checking)
poor squids head exploded
Yeah, then cast it to a Player
create files, mark them as modules in settings.gradle and add the needed build files
I registered the listener elsewhere
The first bit works fine but you cancircumvent the gravity penalty with swimming so I want to cancel the swimming for players in armor
toggling swim inside the toggle swim event is probably not going to end well
kek
I tried just cancelling it first
your use of Objects.RequireNonNull is going to blow up on ANY of those armor slots being empty
That was what Intellij suggested so I just clicked it lol
yeah Ij moment π
I really wanna see a rather streamlined version of the armor checks :p
But I do need to check for null, right?
I mean if you want to
Yeah just trying to get it to work first
actually, you are only checking type so it should be ok
unless one of them returns null
I think they all return AIR not null. getArmor returns nulls
That's interesting
Good to know
Hey
However, setCancelled is correct, but I would setSwimming 1 tick later
How would I do that?
yeah I can't really see a reason other than the notnull's to cause an issue with setCancelled here
So I was recently trying the image map pluggin, and I want to know can I resize my image like it's now 4x4 but I want it 9x6?
Bukkit.getScheduler.runTaskLater()
idk but I was able to swim just fine mostly
just runTask is enough
Pls help me dude
Is it your plugin?
No
Or are you creating an addon?
I added it from aternos
oof
Ah so #help-server then
It's called "aternos" because it gives infinite headaches
You could also figure if that plugin has a support discord and ask for help there
Literally only ever used my local host kek
No actually it didn't cause any trouble I just wanted to know that weather I can resize or not
Ok well this is the wrong channel to be asking A, and B, you'd have better chances finding this answer from a discord specifically for this plugin.
There might be someone here who knows the answer but I'm willing to bet you'll wait way longer
But the pluggin is of spigot s
This channel is not for support, this is devs making plugins
@hollow viper I think you can set the size when you run the command to place it
One of them
iirc there are two ways to do it
Whew look at psych
I did but it didn't worked
Being knowledgeable
I did set the size to 9x6 from 4x4 but it didn't worked it again created 4x4 only
Whats this plugin called?
ImageMaps
Dude I am searching the solution for like 4 hours but didn't get any solution π₯²
Can anyone tell me why this code isnΒ΄t resulting in any clientside funktion
import net.minecraft.network.protocol.game.ClientboundSetHealthPacket;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.server.network.ServerGamePacketListenerImpl;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftPlayer;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
public class PlayerJoinListener implements Listener {
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event){
Player player = event.getPlayer();
ServerPlayer serverPlayer = ((CraftPlayer) player).getHandle();
ClientboundSetHealthPacket packet = new ClientboundSetHealthPacket(12f, 0, 4f);
ServerGamePacketListenerImpl connection = serverPlayer.connection;
connection.send(packet);
player.sendMessage("Packet send");
}
}
@hollow viper I tested all the mapart plugins I could find and I found the best one was "ImageFrame"
It is updated to 1.21 and supports gifs
You're maybe sending the packet too early
either not running your code or you need to send the packet later
why send a packet for health?
Does it can be resized
just set it on the Player
i know thats stupid
Definitly
Yeah @hollow viper I cannot find a real sliver of support for resizing images on this plugin, might just wanna look for a better plugin
but i am testing packets and stuff
then schedule it for a few ticks later, or do it in a command
Ok then I will try once and report back here
so I change it to PlayerMoveEvent
Well i'd try it multiple times
/imageframe create <name> <url> <width> <height> - Create a new image map
right there on the list of commands
botta boom botta bang
but can you acually schedule Listener?
any reason for using a packet here instead of the api
Ok
not the listener, the packet sending
could you give me an example for that?
?scheduling
.
there is zero reason to use a packet for a basic api feature
it only for testing an learning purposes
I wanna know what is happening behind the Packet creation and so on
public class PacketEventsListener implements PacketListener {
@Override
public void onPacketReceive(PacketReceiveEvent event) {
if (event.getPacketType() == PacketType.Handshaking.Client.HANDSHAKE) {
WrapperHandshakingClientHandshake clientHandshake = new WrapperHandshakingClientHandshake(event);
System.out.println(clientHandshake.getClientVersion());
System.out.println(clientHandshake.getServerPort());
} else if (event.getPacketType() == PacketType.Play.Server.UNLOAD_CHUNK);
}
This was my practice with packets and packet events kek
thats protocol lib right?
packet events
does anyone know how to prevent items being taken from a gui? i canceled the event but u still able to shift click and close the gui quickly and get the item
arent those just ghost items?
they are
nop i can drop it/move it after
How are you detecting the inventory?
like via name, inventoryholder etc
are u in creative?
metadata?
yes does it matter?
yes
oh
and yeah if youre in creative you bypass ghost items
so for normal players in survival it'll be fine?
Creative likes to fuck with inventory related operations
yea, in creative everything kinda breaks
Yeh should be good
is it bad to use metadata?
?pdc
Modern^
you mean pdc?
metadata isn't pdc
normal metadata
You put the data into a container ie: the pdc
It's bad if your items data should be persistent
Use pdc for this
Metadata is what you can consider to be the descriptor data of something in this case the itemstack, the metadata holds things like displayname, lore, etc but with the addition of pdc in 1.13 or wtv, we've been able to create our own custom data structures and apply them to whatever we need
Like I said here
persistant data = data which exists so long as teh object exists.
If these items are given to players and need to be used later (after like server restarts and whatnot) they wont hold that data unless you explicitly put it into a pdc
Obv there are other ways to do this like flat files, but since pdc exists that's just dumb
pdc is held by the server anyway so
ah already been linked
hehe
I'll pretend it wasn;t me π
Hello, we are trying to load a plugin after remapping it, but it says it's already initialized, here is our code to load the remapped plugin :
https://github.com/SpigotCVN/CVN/blob/main/src/main/java/io/github/spigotcvn/cvn/loader/PluginLoader.java#L125
And it's usage :
https://github.com/SpigotCVN/CVN/blob/main/src/main/java/io/github/spigotcvn/cvn/CVN.java#L69
Here are the logs
do not call new YourPlugin()
Okay so I have two things: p.getInventory().getHelmet()).getType() can produce null if there is no armor in the armor slot, so what is the best way to check for that so it doesn't throw errors? Also I am detecting and cancelling the EntityToggleSwimEvent as well as setting p.setSwimming(false); but I am still able to swim around just fine, what else can I try to make it stop the player from swimming?
where ?
p.getInventory().getHelmet() != null
That is never the case
Coll help with the swimming this is so dumb we can't figure it out kek
I even found a post where the legendary Choco said to use setSwimming(); but it seems to have no effect
NMSTestProject1122.java line 13
what a name
what's on that line
@shadow night
what
.
its not his program
it is
it's his program
oh
he wrote it lol
my bad i didn't see "we"
royal we >
NAH WE DON'T LIKE THE TSAR
I don't have source code on me rn
why do you have a default constructor lmao
It's decompiled code
ah
You don't ever just put useless constructers in your classes?
line 13 π
Paulem casually dropped in the wrong source lol
The source for nmstestproject1122 is.different
the not compiled & remapped one
here is the remapped one
Now that's the right one probably
But it calls invalid methods how can there be a different error in it wtf
bro really sent the jar
Here I go @compact haven
skull
I'M SORRY DOC WRONG PING
here's the decompiled's remapped's code π
(too many 's)
jesus at least remove the comment
Why it's beautiful

Just curious, what's the point of DummyJavaPlugin if its not referenced in main?
based
Hard to explain
you're just a big kotlin
well
Idk how to say it in english π
looks like it's not this, hummm
say in france
okay
say im france?
you are france
surely you dont have this in cvn and in the plugins folder yeah?
je suis France
french* π€
I cant see you invoking new xyz anywhere so is it just that CVN and the spigot plugin loader is attempting to init the same main class twice?
t'es un gros bandeur de Kotlin rad
(disclaimer I have no idea what CVN is)
Cross-Version NMS
The plugin is in a subdir of the plugins folder
This bullfuckery
Probably useless
But it's funny
ah this is y'all private project as well?
This is all public
It has a repo
Org*
SpigotCVN is the org name, look it up if you're curious
ok so you guys coded CVN and this is your first time testing it right?
like there's no proof the plugin(class) loader in CVN works yes?
Class loader doesn't exist
Description outdated
Paulem dumb
It just remaps plugins before loading them
And it works on more modern versions (1.19)
Atleast it worked, Idk maybe it decided to not anymore
lmao
that's 1
1 fact
Wanna be my ASM32 ? π«¦
It's already remapped and repackaged for use in spigot
alright so it got stripped?
Well, remapping failed miserably, but repackaging worked almost
Basically yeah
ight just trying to see if there's any flaws in this ver vs your 1.19 test lmao
Repackaging should theoretically remove dummy main class but yeah
raydan dm
._.
wait so you put the CVN plugin in a subdirectory of the plugins folder
so the server loads CVN which then remaps every plugin in that subdirectory and repackages it into (another subdir remapped) plugins folder, then calls the PluginManager to load it?
π
No it stays in the remapped directory
We never modify the original jars
But basically yes
This means we could introduce mixins into other plugins that use cvn but sounds like a shit idea
checking the JavaPluginLoader src to see if there's any help there
Check it for 1.12.2
Hello, when I run BT with Java 21 for 1.21 with flags --generate-source --generate-docs --remapped, I don't get 1.21-R... in mavenLocal's org/spigotmc/spigot. How to fix this ?
Skill issue
why ?
You need to level up your spigot building skill level for it to work
--rev 1.21 too
bro forgor
why'd you tell him
I put that
1.21 isn't latest
Here is my build bat
hmm how can I backdate the source LMAO
I know
will buildtools spit it out for me?
I put --rev 1.21
batch script for that π
but that looks logical
and ?
Yes
since when was there a buildtools gui
Or run cvn, it pulls the cb repo for the current version
and BT GUI isn't working for this version π
I get smth with this version of specialsource isn't available
I feel like there's been a gui for a while
here is the log with BT GUI
that's really strange...
So I don't think that's a skill issue @shadow night
I think that you should
somehow loop through all loaded plugins and print their jar directory
before you call PluginLoader(cvn)#loadPlugin or whatever
to figure out why it's already been initialized
and if it's not there then your code is running twice and init'ing twice, yeah?
Is there like a marketplace channel
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
For commissions
@tribal sky
Ty
"Loaded Plug" -> Plugins already loaded on the server
"Plug Path" -> remapped plugin's path
What's this meant to be?
Looks like it wasn't able to find special source
yeah
is it really that special tho
Yes it's written by the one and only md5 
Cvn and the dummy plugin
but well, it's building with BuildTools.jar but there isn't any .m2\repository\org\spigotmc\spigot\1.21-R0.1-SNAPSHOT generated
It needs to finish successfully
okay, I rebuild
ah dummy plugin is DummyJavaPlugin in the jar?
You can find the cached failure of special source and delete it from your m2
Yep
That should force it to retry
let's do that
Originally there is a dummy plugin.yml that has this weird cryptic name and a main: DummyJavaPlugin
Rebuilding won't help unless you wait for the cache to expire
Repackaging replaces it
I rebuild to see the log for BT.jar (not BT.exe)
What would the best event be for detecting if the player puts on a chestplate?
I've seen different people use/suggest PlayerItemHeldEvent, InventoryClickEvent, etc. but not sure which one would be more effective
Probably a mix of them all
Shouldn't be a difference
ty
Wait alex made that an event?
yeah, alex is a gigachad
I even have a folder category for his blog posts
Yeah
Lol
@tender shard makes a lot of cool posts 
ok but why hasnt that been pr'd
It has
I have that in spigot folder too
https://www.spigotmc.org/threads/spigotmc-yellow-lettering-in-forums.298612/page-2
can y'all retest the 1.19
a lot of things
and if that works u need to check patches from 1.12 -> 1.19
But the pr is a bit ded atm
@cinder abyss
smh should just make this an actual spigot api thing
it should work on 1.19 if you use the right nmstest project
OMG MY GOD @chrome beacon BT IS WORKING THANKS I LOVE YOU
Oh thank god
I have written that ages ago for my own plugins
I fcking hate having to describe 4 events to detect armor changes smh
which one ? the one you sent or the one on CVN github ?
Idk the one on the cvn gh should work
okay
I should have a look at that PR again
You can use the same cvn jar tho
Merge when? kek
See if I can make the old and/or new item a mirror without things exploding
Hello, how to get tps with the spigot api ?
Why do you merge a pull request, it requests to be pulled, and you, the idiot you are, merge it!
already searched
you cant with the api
humm strange
you have to use nms
I know you need to interact with nms
You can using the scheduler
jankily
does Class#newInstance invoke the default constructor?
Also maybe make it cancellable? Idk how that would work in some cases
or do you need to do that manually?
Yeah, reflection isn't unsafe
dom ur a kotlin user arent you
yeah how'd you know
I think this is fine, just in the docs make it known some cases might be odd with the cancelling of this event
i thouhgt i remembered you using it
lmao
wanna know something cool, i use kotlin more than java at this point
Your bio says "kotlin developer" too
Event gets called for armor -> air when it breaks
You cancel it and the armor⦠unbreaks?
so constructing PluginClassLoader calls newInstance on the main class which calls initialize (a method) back on PluginClassLoader
so is it possible that PluginClassLoader is being initialized twice?
oo a stack overflow
merge request >>>
that is possible but why the heck would that ever happen??
me ?
2 events, equip and unequip perhaps?
And why does it not happen with normal plugins
Im speaking abt CVN
i write so much kotlin it's incredible (real)
This isnβt about the equip event
oh
does CVN make two PluginClassLoaders
This is the InventoryChangeEvent
you know how to use delegation properly
It never makes a class loader
which makes you a giant nerd
it works on 1.19
i do
It uses the PluginManager of spigot
i write my own delegates
To load the jar
@shadow night
so it does work on 1.19
I still feel like this should be cancellable, but like you said there are those weird cases
then it's a spigot problem
yeah
Yep
I just started getting into plugin development and only have basic experience with Java so far, but how would I go about implementing this (as in, importing their package to use the ArmorEquipEvent?)
fricking amazing?
spigot is ALWAYS the problem for us
Use maven
i use delegation like this πͺ
so ig the next step is to check every patch that manages loading plugins from 1.12 to 1.19 LMAO
Like the 4th time?
Itβs set up as a maven dependency
unpopular opinion
(Gradle works too)
Great (not really)
yeah
they converted me to the fact that : maven is shit
lmao what have we done to paul
ah ic, ty
I don't want to build a website to make my plugin works
object Fonts {
@ChevyFont("beaver_mono", "beaver", 301.0, 1.0, "race_background")
val RACE_TIMER by font
@ChevyFont("beaver_mono", "beaver", 313.0, 1.0, "race_background_minimized")
val RACE_TIMER_MINIMIZED by font
@ChevyFont("virtue", "virtue", 9.0, 1.0, "duel_background", "flag_red", "flag_blue")
val DUEL_BOSS_BAR by font
@ChevyFont("virtue", "virtue", 5.0, 1.0, "elimination_counter_actionbar_background", "elimination_small")
val DUEL_ELIMINATION_COUNTER by font
@ChevyFont("virtue", "virtue", 10.0, 1.0, "elimination_counter_actionbar_background", "elimination_small")
val DUEL_ELIMINATION_COUNTER_MINIMIZED by font
@ChevyFont("beaver_upper", "chest_backgrounds", 0.0, 1.0, "navigator_background", "paginated_7x3_background")
val CHEST_BACKGROUNDS by font
@NotificationFonts(12.5, 15.0, 17.5, 20.0, 22.5, 25.0)
val NOTIFICATIONS by notifications
@ChevyFont("virtue", "virtue")
val VIRTUE by font
@ChevyFont("beaver_upper", "beaver")
val BEAVER_UPPER by font
val SPRITES = registerSpritesFont()
val REGISTERED_FONTS = mutableListOf<UIFont>()
}
``` hehe
As far as I'm concerned they all suck
unless kotlin
could i do my delgation in that ss any better
no
'cause kotlin iskotlin fun
LMAO
Maybe you guys can create an automated process to build each version of spigot and test CVN to narrow it down to where it no longer works?
might be easier but not sure
@blazing ocean khm khm
i dont want to write all the methods in abstract skyblock hook again just to write something.exactSameName(params)
when using kotlin you don't expect fun but you have actual fun
Reminds you of something doesn't it?
Seems like a skill issue
Cannot agree
once you got it working on one version i'll start
and you're just an object for this language
Believe it or not, we have that exact thing already planned for ages
fist fight me
haha
I might as well have to finish it because rad is too busy
yeah
sure
Well, my kotlin skills don't mind getting better
less projects for me
because he's doing musculation
manstruation*
musculation??
convert that to groovy
masturbation*
what the fuck??
lmao
HE HAS THE REFERENCE
What in the hell
Groovy 
OH MY GOAAAAD IS THAT A FREAKING JOJO REFERENCE ???
why is rad doing masturbation
π£οΈπ£οΈπ£οΈ
Lmao
i'm not doing type masturbation / java (same thing)
Nobody ever asks why he is doing manstruation tho
kekw
because he's the OWNER OF A LONELY HEART TULULULU π£οΈπ£οΈπ£οΈπ£οΈπ£οΈ
So that's why java feels so good
brother
that's not what type masturbation is
YOU'RE THE BEST BIG BROTHER I COULD EVER ASKED FOR π£οΈ
I'm just too sleepy my friend
I'm an only child
mAss test my Ass
paulem ur a bit weird
yeah
Rad give me a list of your favorite Kotlin features
nah seriously π
rad has exactly 4 reasons
BRUUUH
- builders
- lambdas
- delegation
- data classes
- objects
- no need for getters and setters and bigass constructors
- extension functions/properties
- operator overloading
- top level stuff
- coroutines
- ktx.serial
- ktor
now remove the : Boolean and we're all good
real
nah
Bro likes his verbosity
Operator overloading π
btw idk if this helps at all but it's kinda in the same realm as CVN to what I understand? this is an old project from one of Skript's leads https://github.com/Moderocky/Glass
it's almost as if kotlin is somewhat based off java
accurate java
It's miss used so often
Man I wish java had objects
can I even be called a kotlin dev, I've written so much kotlin but never used coroutines
same π¦
doesnt mean cases were it isnt misused shouldnt be allowed
bro does not like his NegativeSpaceProvider[offset]
I have no idea what it does, even the explanation is way too complicated
flashbacks to C#
LOL
no
yall have seen your CVN description yes?
glad youre not writing c, the whole stdlib "is miss used so often"
bc you're talking about objects, I want to make a joke but I don't want to be banned of this wonderful server
oh right another point
- the stdlib
Whoβs miss used
omg hte kotlin stdlib is to die for
Is there a Mr used
I have never written a description for CVN, if I did you wouldn't even need to read two words from it to understand
FR
||girls||
rad's only reason for hating kotlin: lsp
c# is great innit
True but it's C so performance go brr
REAL
go brr?
@blazing ocean intellij community is open source, go dissect and make your own kotlin LSP
yeah I prefer my women as objects too, they misfunction as classes
is kotlin-language-server that bad though?
there's an attempt at that and it sucks
Shit rad you've been got
who even needs an lsp
crashes, hangs up, -65535 errors π
to be fair though... why would you want to NOT use intellij
my buddy s been coding in vim without theme and syntax checker for years
Cuz he likes to use neovim
(yes that's the error code)
and zed
zed is a piece of garbage
no it's not
zed
pulls in thousands of dependencies for the sake of why not
rust moment
havent found anything that i cant achieve with my current neovim setup
Reminds me of shading WE
adds tokio
+20gb
you're not talking about the rust editor right]
i am
we are
imagine not being able to do :e ~/.config/nvim/init.lua and edit some lua nahh we got json π€
Jetbrains also has an editor for both of those
namely Webstorm (I just use IJ) and RustRover
rustrover is ass
is it? tbh havent used
lua is only good for neovim π€
but I feel like JetBrains is more capable at making editors than the creators of Atom
only free for non commercial usage, crashes and lags
I remember some guy in here who was making a plugin with lua kek
zed is extremely fucking fast and is great when it comes to rust
okok
what you need rustrover for when you have vsc?
Haven't had any crashes nor lag
But ok π€·ββοΈ
though this isn't relevant to the original topic of, why neovim for Kotlin lmao
i only get vscode errors and shit on save
like what mods have you done that you cant replicate in IJ
wha..
with any lsp
tried a clean install and everything
works in any other editor
vsc errors with rust analyzer?
only issue i ever had is that it hung for hours
is rust that cool
(sometimes)
what is it worth learning for
yea, borrow checker isn't tho
like I feel like I'd never use it since I do backend mostly
and who acc writes backends in Rust
rust forces you to design your code in some way i dont like
me
isnt it too low level though
it works great with actix
Rad's just different man
i write all my backends in c# but ig noone asked about c#
my go-to atm is kotlin with javalin, pretty simplistic
#[delete("/server/{id}")]
async fn delete_server(path: web::Path<String>) -> impl Responder {
let client = Client::try_default()
.await
.expect("failed to create client");
let game_servers: Api<GameServer> = Api::namespaced(client.clone(), "mire");
let pods: Api<Pod> = Api::namespaced(client.clone(), "mire");
let services: Api<Service> = Api::namespaced(client, "mire");
let name = &*path.into_inner();
game_servers
.delete(name, &DeleteParams::default())
.await
.expect("failed deleting game server");
pods.delete(&*format!("{name}-pod"), &DeleteParams::default())
.await
.expect("failed deleting pod");
services
.delete(&*format!("{name}-svc"), &DeleteParams::default())
.await
.expect("failed deleting service");
HttpResponse::Ok().json(Response {
code: 200,
message: None,
})
}
``` fucking love it
ktor tho
too much .expect tbf
Javalin is nice
ktor was nice but I found myself in the slack channel every so often with a problem
it wasn't as barebones as I wanted I guess
tf u mean a discord backend
Someone explain to me the difference between backend/frontend I've always had a very vague definition
if im not here tomorrow you gonna know why
this is so hard to read lmao
(for someone whos never programmed in Rust)
what is
looks pretty simple though
so what is Api::namespaced, just curious
i probably wouldve thrown a service layer underneath it
a kubernetes api which depends on a namespace
it's an internal api idgaf
it works (somehow)
ight thought so because I saw Pod but wasn't sure
why is it like Api<XX> though
why is the actual type a generic
i took my api offline cuz someone tried ddossing it π
generic
ask the kube-rs devs
but yeah with generics that's much easier
well
there's just that few methods, CRUD?
idek
and why is client cloned for the first two invocations then not
I mean it makes sense
borrow checker
oh its a rust memory thing?
yea
what auth
for the endpoint
oh
it runs within k8s
token gives access to all endpoints?
or literally no auth because its interal k8s space
no auth
cluster?
hmm
Me too
pretty sure
just seems dangerous, like if the ingress is compromised and allows outside traffic to access the internal api
albeit probably not likely with proper setup
if something is compromised you're already cooked
true
you've got much bigger shit to worry about then
what are you writing this internal api for, may I ask?
my mc network
just curious because I have yet to find an excuse to learn kubernetes
ah that seems overkill
LMAO
and just for the average k3s cluster you don't need to worry about all that shit
autoscaling?
minigames?
yes
nevermind then
that's fucking sick
lmk if you ever want to let me dig into ur shit lmfao
lmao
alr I spent way too long on this so I figure I'll share if any one is interested: Cancelling the EntityToggleSwimEvent doesn't work because a lot of swimming is client side. So my solution? Just set the hunger to 6 if it was above 6. A simple solution but it works well.
I mean that works haha
Really weird that setSwimming / e.setCancelled didn't work tho
It also goes well with a message like "Your armor weighs you down. You feel exhausted"
I found a few threads with people talking about it. Something about the sprint swimming being mostly client-side
So was this function to make players not able to swim if they are wearing some armor
Yeah I set their gravity to 0.5 but sprint swimming was allowing me to bypass it
odd
I'm thinking that issue is caused because theres two parts to isSwimming being in water as the movement physics are already a bit different and the fact that sprint swimming is a thing
Is checking playerMoveEvent a potential source of lag?
Depends what you do
calcs are quite slow when it comes to playermove event
I think conditionals might be fine
Considering like just 15 players, that's still 15 different events you have to deal with in most cases within seconds of each other
You may have 6 incoming event calls one tick, 12 more the next
It's not a big deal if it falls behind a tick or two as long as it doesn't cause lag
Like I said, it just depends what you're doing
Multiple packets actually
It's what SkinsRestorer sends
Like iteration of any kind onPlayerMoveEvent would be absolute no go
Remove, add & respawn packets and then resetting stats etc.
I can't even think of a reason you would want to do that
Hey!
How do we listen to packets in newer versions like 1.19.4?
I want to get the pipeline but I couldn't find where I'd get it
Do I just make it accessible then?
Yea
Doing this would be bad huh π€£
config.set(path, object);
this.saveConfig();
}```
Weird, putting it in the file class fixed the problem i was having. so problem solved
rip server performance
i removed saveConfig()
it fixed my problem i was having yesterday.
which was it wasn't storing stuff setting values. so its something to do with my fileUtils class.
Always API if you can
Not sure where else to ask this, what are the bank accounts in Vault when you're implementing an economy?
boolean hasBankSupport()
many don;t implement bank accounts
I know but what are they?
bank accounts are for when it is not player backed
like an account for a nation/clan
oh
I don;t know of any plugins which use bank accounts
iConomy 5 used to have bank accounts but it was dropped
huh
This works: player.getWorld().playSound(player.getLocation(), sound, volume, pitch);
This doesn't: player.getWorld().playSound(player, sound, volume, pitch);
How???
is your sound a default MC sound?
yeah
no clue then, the underlying code is identical on those
It's only for 1 of my accounts, maybe somehow the player was set to silent but I doubt that that stays over restarts
welp that was the issue π
omg i'm an idiot. I put my file creation in my FileConfiguration getConfig() π
that was my whole problem
!verify
Usage: !verify <forums username>
!verify Shortaholic
This account is already verified!
you already have the role
His spigot name changed, he wants it reflected here
π€ am I tripping or can't I reset firework stuff after the first detonation attempt
For 1.21 Is org.bukkit.ChatColor deprecated in favour of net kyori adventure?
help I can't type
I'd send you some new fingers but my parole officer said I had to stop doing that
What did you always put your real address as the return address?
guessing ChatColor is not depricated for Spigot?
no
ok
Why is there a limit on teleport duration of 59 or am I missing something?
okay what the actual fuck
firework code is so cursed
This causes the firework to fly forever (FireworkExplodeEvent)
setting the meta on the same tick causes the change to not happen
okay lmfao so setFireworkMeta does absolutely nothing
Howdy howdy,
I've had an idea for a long while and before I jump in on it, I would like to ask if is possible with a plugin or if it would have to be a mod.
The idea is setting up a GUI for a custom item exchange.
Custom item in, Custom item out.
What I foresee being an issue is how the plugin would tell the exact item or if it would only read the parent item its attached to. Such as something being attached to the item type of a stick.
Since 1.13 pdc exists, so you should be able to just .clone any item that goes through this inventory?
So it's possible?
That's such a relief to hear.
Thank you for your time, now I can hop on this!
Very possible, pdc is held by the server not the plugin, so like I said you can simply just .clone the items you need
easily done too tbh, a lot of plugins do this
I was concerned it might have some limitations. But it sounds straightforward. At least much moreso than I was considering.
I really don't think you have to do much else but clone the input item and use that clone for the output item
Originally I thought to just change it out every now and then, but I should be able to get it to read the item in and put a different item out depending, right?