#dev-general
1 messages · Page 68 of 1
When you define the type as not null, kotlin prevents you from passing null there
Before the code is even compiled
With IntelliJ, in Java you also get hints that the type is not null through annotations
When was the last time you had to debug an NPE in Kotlin?
a while ago mind you
but it's still not worth getting rid of them just for slightly smaller jar size imo
When do you ever benefit from them...
Sxtanna make a spigot fork and write it in kotlin KSpigot
If youre working with only kotlin, you fucking never see them
Not really...
IntelliJ shows you the nullability
And you can configure that to be error level
It will enforce the same compile restriction as kotlin does
:o
let's say hypothetically you were working with someone who completely ignored IDE warnings
Then fuck em?
and hypothetically they didn't like reading stacktraces
hypothetically they would be very useful
Except thats no one
yep
no one
I've never worked with anyone like that before
never...
anyway
why can't kotlin do SAM conversion for a kotlin interface?
or a Java interface
smh
It does?
which case?
fun ButtonHolder.transformMeta(transformer: MetaTransformer)
@FunctionalInterface
interface MetaTransformer {
fun transform(itemMeta: ItemMeta)
}
can't convert that for some odd reason
Oh
Its in 1.4
lol
why would you even write that kotlin code?
that is very not kotlin
but that doesn't have transform 😦
?
and?
i'm being petty
i want nice method names
also Consumer doesn't seem to give SAM conversion either
That wasnt the point
God dammit Sam
The point was that you dont need to define your own interface for this
sam is really messing up my plans
can you use (ItemMeta) -> Unit in java?
ig I could typealias it
It is
overloads
and make the kotlin functions synthetic to mask them from java users
oh god
so 1 method with a consumer and 1 with a kotlin function?
with the second being synthetic
If you really want interop so fucking bad
You could always just not care about the non sam functions
that's unstable
nah I've just realised the method with the MetaTransformer is private
unstable
I yes that is exactly how the moon looks
Hf Matt, you going for star wars theme or just moon?
Just the moon
Any structures on it?
Not yet, I need to figure a good generation first xD
Btw, gonna be using your framework tommorrow, hopefully I can figure it out properly
Oh nice, if you need help just let me know
Will do 👌
Switching from Charlie's lib, which also uses annotations but in a different style
I'M TRYING!
ha
Rekt
both of you can choke
On what? Cookies
Sxtanna, since you were working with the packets stuff, you think is possible to send a custom biome name to the client?
You can make your own biomes
@ocean quartz no
biomes are identified by their id only
the names are entirely clientside
deeper
This stuff is so complicated
@ocean quartz don't forget to make meteors after you make this to give it that umpf
I might give up on the moon stuff and make it like a random alien planet or something, sounds cooler xD
Perhaps custom mobs? :P
I'll try yeah
Me searching for Bukkit's default world generator to check the source, fantastic
Lmao
Actually this one is pretty cool
I'll stop sending stuff though, I'm clogging the chat xD
That looks like it was Voxel snipered or world painted
Very weird perlin noise to make that xD
It always trick me when it comes to size drawn in WorldPainter
I wish I knew how to use world painter to make actual good looking things
Piggy, I changed ideas no longer making a moon, I'm making an "alien planet" now
Made pretty good progress today, but now i have a huge annoying bug happening
o
if ur not making a moon
can I see ur old code?
because I haven't even started generation
@ocean quartz
The code is basically the same since I'm still making a custom world
Let me get the link just a sec
Looks a bit meh right now, I'll change it a bit more later
Basically ignore the top layer generator and you'll have a normal world
Also ignore my useless comments they are there just so i could understand what the heck i was doing
Can someone compile a source for me since It doesnt wanna work and i wouldnt know where to start as from lastnight
"o noes it's kotlin" I feel you piggy lol
@ocean quartz that looks spicy, keep updating us, noone cares about clogged chats
abandoned, and not related to us
o
Dw. We'll be there soon enough
@ocean quartz not quite a moon, but something regardless
I didn't use perlin, I used SimplexOctave
cottage cheese
ur cottage cheese
thank you
np
no
Ya lazy porkchop
yesn't
stupid question, is this arrow code? https://i.imgur.com/5PckbAW.png
@pale shell you can catch multiple exceptions in 1 catch clause
I think
like catch (MaxChangedBlocksException | Exception ex)
I think
Not sure
LOL
nah dw it's too large to send over discord
Lol
(even with nitro)
I've spent literal hours so far fixing 1 issue
It all boiled down to me getting a string from configuration that shouldn't exist based on the saving thing
and then using yet another string sometimes
Bugs that are hard to fix doesn't mean the code itself is technically broken
in this case lol
@quiet depot Nice! I felt like Simplex felt too round at times compared to Perlin, maybe it's because I have no idea what i'm doing xD
I'll try it out, I'm pretty happy with the result I got from simplex though
I have a weird bug happening to my generation, it generates fine, but then a few seconds after, it starts spawning random dirt blocks everywhere
I don't even have dirt in my generation
This makes no sense lmao
Piggy this might be useful for you https://github.com/Dinnerbone/BukkitFullOfMoon
The author of infinite scoreboard sent me here because it seemed like it was a problem with your plugin. (error at line 384)
(285)
Line for what?
What plugin?
Log?
Reeee
Erh dw hes getting help in #placeholder-api now
Yeah I saw it was posted above.
Just makes me angri when users provide such generic info
This is killing me, wtf, this blocks are coming from nowhere
lel
Ah, yes
The corruption
I mean it's an alien planet with an infestation block
I just wanna know where it's coming from xD
Any other plugins you loading that might cause that?
Let me check, the thing is that it only happens when I cover the surface with grass, if I cover it with any other block it stops
On another note, the generation I have so far is pretty cool
That looks dope, you gonna add collumns as support later down the line?
Hmm idk, probably not, since some mountains will reach the roof so it could be the support
Can confirm, it's not being placed by other plugins
How are you generating the grass?
Just setting the top layer as grass
Though i found people having the same issue, they said it was fixed in the latest spigot version so let me update and give it a shot
Not even surprised that it's a spigot issue :p
Oh finally it actually does fix it
Spigot being spigot, lovely
Spent more than 4 hours trying to find this cause
Making laser tag, and I'm struggling designing it to actually be playable
You're going to do it with particles?
Yah
Beacon beam perhaps, but doubt you can make it they way I want it too
The end crystals beam could be an option as well perhaps
Guardian beams?
Don't think beacon beam can go sideways can it?
Imagine
can you even use nms to display beacon beam?
They used a datapack
read somewhere that it is client side
I don’t think it’s possible :/
too many cool things are client side
I feel like the end crystal beams might be tho
Minecraft fix sideways and diagonal beacons :/
Just perhaps
If not then just a particle line should be cool too
I mean Guardian beams is also cool
yeah beacons are client side feelsbadman
Was testing DinnerBone's crater generation and couldn't find anything, realized it's done on the highest Y level so checked the roof of the world
@ocean quartz This is the current thing I have (don't judge the code I'm just experimenting atm) https://paste.helpch.at/joyahesaso.java
You don't need the filler stuff, gui.getFiller().fill(fillerItem) also to see the gui updating you need to do gui.updateItem instead of setItem
Filler will fill any space that doesn't have an item, you can also fill bottom, top, border etc
If you want a specific place to be empty add an AIR item
Okay yea that makes much more sense now :p
Is that Canada
just need to switch them around
You making the moon Piggy?
yes
Try adding asteroids and shit down the line
Not sure what that is
a mod
Still no clue
search it up
effort
im a lil confused
"world" quite clearly isn't "moon"
so why tf world, got my moon sky
I mean you could have changed the worlds name?
Can't you do worldCreator.environment(World.Environment.THE_END)?
that's a bit of a ree
Look at the nerd actually using annotations smh
code quality is marked
Yea ik
anyway that's really sad
just spent like an hour doing the protocol code for environments
and matt just comes out with that
lol
I did something similar xD
spigot be surprising at times :p
Oh damn that color pallette
you wouldn't also know how to simply not spawn the ender dragon would you matt?
yeah nah
Let me see if i can find xD
Now that's what I call an exit button
Piggy I have a suggestion though, since you'll have a resource pack why don't you make the sky black using it, then replace the moon with earth, that way the cycle will still go but you'll have earth and sun instead
environment is temp in the event I don't get around to a rp
Oh okay, couldn't find anything to disable the dragon
Can't you legit just listen to entityspawnevent
and cancel if it's a dragon, or is the dragon a diff event
PreCreatureSpawnEvent ?
no such thing
you not using paper?
o
yuck what a noob
@hot hull precreature doesn't work at all, creature works but bossbar is still there, and the bedrock nest is still there
looks like I'll just have to go back to protocol
Kinda sad there isn't a useable event for that
@quiet depot perhaps this, but not sure what the dude means with it :p
Legacy dragon scan
as far as I can tell that's just some sort of check
not to do with the actual spawning
big rip then
A little more optimized
Oh that's smart lmao
that's cool pig
Wow
give creepers green glasses
Make some cool pig astronaut
Why not make custom leather armor to give to zombies and skeletons so they look like astronauts
we'll see
Piggy, should I make the game guis customisable within the config or should I hardcode it
I wanna hardcode it so much cause it'll be so annoying to fit it into a config nicelly :c
lel
@ocean quartz tried out BlingGravity's implementation
instant stackoverflow
guess i'll try without my async attempt
Oof, we'll probably need to change quite a lot of stuff since it's an old code
it works
no clue about the performance
probs trash
slight issue
strafing doesn't work
You got NBT utils in your framework Matt?
I tried to do async chunk populator, the server was stuck generating for like 10 minutes xD
@hot hull Only for items
and flying is broke
@hot hull Basically only usage is this this.itemStack = setNBTTag(itemStack, "mf-gui", uuid.toString());
And then for getting the uuid back
Piggy you can add a isFlying check to it so it doesn't affect maybe
Mind if I coop that so people can use the funky gravity in mine? :p
yeah
i haven't pushed yet
I haven't pushed anything cause code so messy rn
Legit every part of the text is static, and I've got like 20 itemstacks which do the same thing inside the gui :p
(nothing is static except colorize so ayy)
yeah this algorithm also has a slight issue where velocity persists
meaning hold space bar, keep jumping, and zoom zoom
What's wrong with zoom zoom?
yuck
Yuck?
We don't do that here
Whats that
skript
i must to know pls, i hawe 2 questions and 1st is java plugins is better or script for java plugin is better to perform actions 2nd how fast it can be if i need for project codder and average pay thru the paypal is around 16-25 Euro monthly
Speed comparison between Java and Skript
ITERATIONS JAVA SKRIPT
1 0s 0s
10 0s 0s
100 0s 0s
1000 0s 0.01s
10000 0s 0.03s
100000 0s 0.08s
1000000 0s 0.71s
10000000 0s 4.21s
100000000 0s 41.52s
1000000000 2s 413.33s
its numbers but practicly i am not sure
I have no idea what you are talking about
If you want to ask which is better between java and skript, then the answer is clearly java.
but why
Skript should be used only for small stuff if you can't code
Because one is the language the game is written in and the other is some plugin
Also, idk what iterations you are doing there but I dont think that 1000000000 will take 2s, unless you just iterate over them or idk
i hawe in my grou guy he tested thinks for me , he is scripter not java codder :/
Sooo your question is which is better, java or skript?
actutaly you kinda ansvered it like + explained why java is better , from that i just feel like peace of s#it 😦 i bought server box specificly for my project 😦 and now i get info script is worse and i need more pc horse power for it
Try to avoid skripts as much as possible
It's ok to use skript for small stuff like a /discord command or whatever but for more complex stuff an actual plugin is the way to go - even if it's not coded by you.
i hawe builders i hawe scripters i hawe discord manager i hawe compleet team but i hawe scripters not codders .. 😭 i just cant make it then , because i hawe writed thinks what i need i am willing to make completly diferent type of game in minecraft but when all is almost reddy and almost up an runing i just got smasht in face with , you can not do it ! just cant.. it hard to explain... actualy i am here for help hand
Whut.
in short txt - i realised that my project is imposible, because script is worse compare to java , and i do not hawe someone to do the work, i hawe only scripters (2)
they should learn spigot :)
Yea that's a yikes
its my last actions ... i just cant give more... i relised that my project is imposible..
It's only impossible if you think so, 🤷♂️
@pallid gale I'm dissapointed in you, you hecked all the external emoji perms ;(
theres no external emojis >:(((((
There are for boosters.
Oh damn, my boost ended
Actually didn't have nitro just the boost so we could reach 30 boosts
Oh well
Any developer who speaks Spanish? xd
Nõ
When your packages are a mess and your project keeps growing and growing 
how do i add a menu to the gui for a plugin i got
Wym
i bought a minion plugin and i need to add it to a menu so playes can buy a minion
oh my bad
Ah yes, a success like no other, populating the entire world with trees
Alright enough suffering for a day
@ocean quartz Atleast use some custom trees :p
Hello, I'm wondering if someone has a plugin they know of available on Minehut that can tell me when players mine diamond? The purpose for this would be trying to see if people might be using xrays in game.
There is a few out there, not sure if they're on minehut tho
rocket testing with the cube
👀
Pretty much elon musk at this point
@quiet depot im sorry to tell you but thats a boat
@pallid gale did you forgot smth?
Who needs gravity, it isn't even real.
density is where it's at 🎵
Wasnt there smth that made you fall slower?
me and cube are in this together
scary sight
just do player.setGravity(false) <o/
disgusting
Crashed my minecraft lmao
TOo many particles
50 count, and it spawns it every time the projectile moves
I'm confused af rn, it's not spawning the particles ,-,
it's a wip .-.
Piggy, what would be the most efficient way to spawn particles on the projectiles path every block (not every tick, but every block traveled)

Ah yes
Cube, mind designing me some star wars weapons? :p
Nothing fancy just the basic shape
do you know the velocity of your projectiles?
Yea
what does an xyz value correspond to in a vector?
I'm asking because I honestly don't know
is that how many blocks it travels in that direction per second?
Might be
Lemme print out and see what it is
>.... [10:25:54 INFO]: -6.1955962656880645,0.7612394524337845,-0.31241224151819325
>.... [10:26:00 INFO]: -5.328575100247696,0.2348854913080214,-0.26869279723499473
>.... [10:26:06 INFO]: -5.016747971435862,0.04558048817904062,-0.2529689495049865
>.... [10:26:12 INFO]: -3.7862374743291523,-0.7014417301655168,-0.19092059675131007
>.... [10:26:13 INFO]: GRASS_BLOCK
Ik, I assume it is blocks traveled a second
easy then, whatever the direction of a particular xyz is, that's how many times you spawn a particle per second
doesn't account for vectors that utilize more than one direction
you can do the maths for that
big rocket boi
hax
o my
smh
Its an invisible giant holding the rocket block
(It's only a concept, doesn't actually move)
weak
nah its fine
lol
@ocean quartz
Got this onEnable
manager.getCompletionHandler().register("#weapons", input -> Arrays.stream(Weapons.values()).map(Weapons::toString).collect(Collectors.toList()));
manager.register(new WeaponCommand(), new GameCommand(this));
And this for my command
@SubCommand("give")
@Completion({"#players", "#weapons"})
public void giveCommand(final CommandSender sender, final String user, final String object)
But it breaks the completion completelly
Btw you can use Player and register Weapon
What do you mean it breaks? And yeah ^
wdym Gaby?
Harolds, it works if I only use the player completions
Anything I try adding to the second arg completion breaks it
Ah
Does console give you a fat error?
Gaby means giveCommand(Command sender, Player user, Weapon object)
You'd need to register weapon though
testing
Okay yea that worked
getting a fat error now tho
Legit removed all the changes and it keeps throwing that error, I'm confused af rn
Can you show me the code where you register the parameter?
You're not registering the parameter
Interesting that it gave a null pointer instead of unregistered parameter exception
Perhaps if you set it to throw unregistered parameter I wouldn't have this struggle ;C
It should have, is weapons an enum by any chance?
yup
Oh yeah that's why, normally all enums are registered by default, and some throw errors idk why, i got the error with sound, but works fine with Material
Yeah Imma take a look into that today and see if i can fix the enum stuff
I assume registering it manually should work for now ye?
I think so, if not use String and get it that way until i can fix it
matt, u still gonna do gravity?
I'm not sure, it looks very janky from the videos you sent, I've seen people do slow falling and jump boost for it, but doesn't looks the same
I tried it with cube earlier (effects), it's trash compared to the algorithm in bling
but ya know
not much else we can do
@distant sun I've tried that but it throws an NPE
f
read chat smh
fun part is getting this bad boy to work
he didn't make the model
f
he just had the software that converted it to mc format
:))
should of made it a minecart
you could of probably just get the velocity on the minecart
tried that, but there's not actually much point
code wise, there's 0 difference between any falling block vs for example, a mine cart
except the fact you can ride the minecart
I'll give it a shot on the gravity and see if i can make it work with bling's algorithm
Also it's looking nice!
Do you want a crater populator?
this is me & cube riding a falling sand block
it's a bit glitchy, that was actually the only time it glitched from multiple recording attempts
probably client side
works very well wdym
@ocean quartz no thanks, I plan on having the craters appear at real time
like in galacticraft
Oh nice that sounds cool
oml id try smth but I dont have time nor knowledge 😭
what makes you think I had the knowledge?
Gaby are you even participating?
Same here Gaby, we're going blind into this
basically everything I've implemented so far - the apis involved, I've never used them before
my prior bukkit experience was basically simple events and commands
ye but you know more than I do
I highly doubt that
I've read so much to try to understand perlin noise and i still don't get it correctly
It's all about learning doing this Gaby
Perlin noise is a bitch agreed
I'm still using simplex octave, I like the result
Tried using it once before, never again thank you very much
Considering it's name though, and how the bukkit guide recommends "8" octaves without any explanation as to why, I wonder what would happen if I didn't use 8
it seems strange to even have "Octave" in the name if the number is configurable
so what the fuck are "octaves"
I did a few tests and simplex seems more mountainy and round so i tried mixing both and got some cool results
I mean it's mc, wat u expect
In music, an octave (Latin: octavus: eighth) or perfect octave (sometimes called the diapason)[2] is the interval between one musical pitch and another with double its frequency.
You are welcome piggy
xd
octave means 8
or something along the lines of 8
I don't know the exact definition, but it involves 8
it means 8 aves duh
Octaves from what I understand Piggy are basically different generations of the same seed
This is where I got my values from
Pretty useful video
only thing I don't like about simplex is it's not really all that random, it follows a very consistent pattern
there's never a flat bridge between to bumps
it's always up and down
final ItemStack item = new WeaponBuilder(weapon, weapon.getMaterial(), weapon.getName(), weapon.getAmmo()).getWeapon();
Clean enough?
no, that's not a builder, that's a constructor
^
.setX() is a builder
no, that's a setter
rekt
builder methods are generally unprefixed, and their naming corresponds to the value they set
no
👋
set assumes that you're setting a pre existing value, whereas the unprefixed alternative is trying to emulate what are called "named parameters" in other languages
I wish I wouldn't have even asked..
frosty how on earth do you spawn a bunch of particles to create a sort of explosion, without them separating at a million blocks per second
Play around with their data
ok
I mean it's spigot, methods could be broken 
you say that but spigot is without doubt the most thoroughly tested minecraft software available
:stonks:
you say that but spigot is without doubt the most thoroughly tested minecraft software available
@quiet depot and the worst, lets not forget that.
Custom world generation going well
easter egg
If i use the default tree populator it goes so fast, if i do the generate tree stuff it's laggy af
Matt, custom trees :>
The begin of a new world generation plugin
You gonna be making custom biomes as well or?
I dont meant to be rude but it reminds of me playing with worldedit @ocean quartz 😂
I'll try xD
And ikr Gaby
i got cube slaving away building my structures
I need an arena, cube ofc won't want to make something simple for me ;c
Yes, fuck testplugins 2020 update smh @pallid gale
lol
"update it yourself gaby" - cube
"Shut up fc" - gaby
They got sick of your bullshit and decided to leave
I'm right behind them
Should've learned how to use paddles beforehand tho
@ocean quartz
What this mean? https://paste.helpch.at/amixafafis.shell
Uuh what, i've never seen that before o.O
I changed something, not sure what and it broke every single gui
What is in this line? GameCommand.java:58
empty line .-,
Uuh fantastic xD
Can you send me your gui class?
sec
stopped, cleaned the package and rebuilt, to double check it's not a funky error
Okay yea that fixed it, the jar wasn't updating properly
Oh okay
Aye
nice
How did ya get a rocket in minecraft 🤔
looks really good
magic numbers
😮
imagine knowing how to mod]
it's bukkit
yes
ah
Hey guys, is it good practice to have enum values inside an enum
IRON_ARMOR,
LEATHER_ARMOR,
CHAIN_ARMOR(Material.CHAINMAIL_CHESTPLATE, Material.CHAINMAIL_LEGGINGS, Material.CHAINMAIL_HELMET),
SWORD(Material.IRON_SWORD, Material.WOODEN_SWORD),
DIAMOND_SWORD(Material.DIAMOND_SWORD);
private Material[] materials;
EnchantMat(Material... mat){
this.materials = mat;
}
public Material[] getAllMaterials() {
return materials;
}
}
why not
It's fine, however it's generally bad practice to have your enum members mutable, and yours are mutable
you should probably return a copy of the array
consider using an immutable collection instead of cloning the array
Ok thanks
@modern trench what is your main language?
Sorry for my bad english, my language is spanish
It's alright
your issue is due to the negative if statement in your loop
as it therefore will only check the first statement in your loop
not tested but this should work better
@EventHandler(priority = EventPriority.HIGHEST)
public void onBuilderCommand(PlayerCommandPreprocessEvent event) {
final Player player = event.getPlayer();
if (!(inventoryContents.containsKey(player.getName()))) return;
boolean correctCommand = false;
for (String command : commandList) {
if (event.getMessage().toLowerCase().startsWith(command)) {
correctCommand = true;
break;
}
}
if (correctCommand)return;
event.setCancelled(true);
sendMessage(player, "&cYou cannot run this command in builder mode.");
}
@modern trench
I want only the commands in "commandList" to be used
that is what my system will do
if (correctCommand)return;
this will proc if that condition is true
Omg
?
@oak coyote all commands are blocked :(
change the .startsWith() to .contains()
It's the same
Show me the error 3 times
@modern trench change it back to startswith
Okay
and put an extra } after
like this
@EventHandler(priority = EventPriority.HIGHEST)
public void onBuilderCommand(PlayerCommandPreprocessEvent event) {
final Player player = event.getPlayer();
if (!(inventoryContents.containsKey(player.getName()))) return;
boolean correctCommand = false;
for (String command : commandList) {
if (event.getMessage().toLowerCase().startsWith(command)) {
correctCommand = true;
break;
}
}
if (correctCommand)return;
event.setCancelled(true);
sendMessage(player, "&cYou cannot run this command in builder mode.");
}
i was still checking within the for loop
whoops
public class ifb{
@EventHandler
public void onHangEvent(HangingPlaceEvent e)
{
e.setCancelled(true);
}
}
can someone help me? I need to disable putting items in itemframes on creative mode?
@ionic pebble so is that all the code you have so far?
@oak coyote ty man!
@oak coyote yeah im not good at all..
@modern trench np
BlockPlaceEvent would be more suitable don't you think?
@hot hull i believe he is actually using the correct event
just i don't believe he understands Listeners

🙂
love you too
i won't ping again dw just force of habit when i staff sometimes people in tickets are quite oblivious unless you ping
alright @ionic pebble you need to implement Listener in that class and register it in your onEnable()
how to register it ?
getServer().getPluginManager().registerEvent(/* your class call goes here */);
The bling gravity is very funky, you can't adjust velocity mid air
That's just like when you're using slow fall effect imo
It's very hard to control it
so are you making a custom world using a texturepack and a plugin i assume?
Yeah
hey! How can I "reverse" this code? right now it's blocking all the commands except the ones on my list ...
I want it to be reverse, block only the commands in the list
https://hatebin.com/blpbpcowni
I'm trying a while ago, using !(Blablabla) to change the result, or change Blablabla == true to Blablabla == false, but I still don't understand why it doesn't work
@ocean quartz How would I update an item, if I'm loading it in with addItem ?
GUI.Update()
I get that, how would I update a specific item tho
You can’t update just one item if you’ve set others beforehand unfortunately - the library updates GUIs by closing and reopening the gui for players with it open
@ocean quartz you can adjust, it's just VERY slow
Otherwise frosty, you can use setItem but it will only take effect after you’ve updated the gui
Or someone new opens it
ah gonna be messy :c
What are you trying to do?
I've got a map with available arenas, and I'm updating the items lore when they click on it etc
so loading the arenas through addItem
Yea I do
In that case, it would be going into either NBT tags or hiding a code in the lore / title. I don't think the LIB provides that afaik, I could be wrong.
I'll play around with it
Do you know if there's a way to get every empty space in the gui? as in the slot
(using the lib)
There should be, but what's the end goal? To fill the spaces?
I've got arenas identified with their ids, so I can just use that to fill the empty spaces (meaning I can use setItem with it on the empty slots)
Doesn't look like there's directly a method for that - I'll create a PR with it later. For now, you could use: ```java
gui.getGuiItems();
k
@somber tulip So you get an idea of what I mean by that :p
(also to flex that nice design)
Might be handy to set it to auto updating
will do
& I like that design ;p
My .m2 file is using alot of storage
Whats in that file, and can i delete at least some things from it?
Its a maven thing right?
Is it gonna break stuff if i just remove it?
Then when i load up my projects will stuff auto redownload
Cos I think it has stuff from ages ago
You can delete all of it
But you may have to reinstall some things if you didn't take them from a public repo before
For example spigot
yea alright, so ill just have to like rerun buildtools and stuff?
@hot hull There is updateItem which updates the item without refreshing the entire GUI, which is recommended
yeye Ik that, it'll work with the way I'm changing it to
Welp lp exists
Tru
But one day I wanna make a server with 100% custom plugins
to be fair at that point you don't need a permissions plugin but eh
I mean permissions aren't really that difficult, it's just a map, it's the execution that's iffy
Youd AT LEAST be able to manage permissions ingame
Something else interesting would be a vanish plugin
xd
more something like vanishnopacket
and I need to do nametags
like what you see above someones name
I wanna make that myself sometime
@onyx loom
Blasters (DH-17 blaster pistol)
Blaster rifle (E-11 blaster rifle)
Heavy blaster pistol (DL-44 heavy blaster pistol)
Sporting blaster (Defender sporting blaster)
Light repeating blaster (T-21 light repeating blaster)
E-Web repeating blaster
Jawa ionization blaster
Bowcaster
Beam tube (Emperor-4 beam tube)
Ssi-ruuvi paddle beamer
Disruptor (DX-2 disruptor pistol, DXR-6 disruptor rifle)
Sonic pistol (Sd-77 sonic pistol, Sg-82 sonic rifle)
Wrist rockets (MM9 rocket system)
Stokhli spray stick
Projectile weapons (Oriolanis Striker Projectile Pistol, Dressellian projectile rifle)
Flame projector (C-22 flame carbine, CR-24 flame rifle, ZX miniature flame projector)
Dart shooter (Stealth-2VX palm shooter, PRP-502 hold-out dart shooter)
Flechette launcher (FWG-5 flechette pistol, FC-1 flechette launcher)
Missile tube (PLX-2M portable missile launcher)
Thermal detonator (Class-A thermal detonator)
Grenades (G-20 Glop grenade, C-22 fragmentation grenade, WW-41 CryoBan grenade)
Grenade mortar (MobileMortar-3)
Blaster artillery
Anti-vehicle artillery
Anti-infantry battery
``` Which ones do I add :p
all
oh god
my rocket is almost fully functional
it has particles
a countdown
it actually flies now
Issue is I'm using a single projectile type, so grenades don't really fir it
fit*
Okay, yea not adding this :p https://starwars.fandom.com/wiki/Repeating_blaster/Legends
Please do
:perhaps:
That's sick btw :p
did u notice the little wiggle?
What wiggle?
i'll make it more obvious
mine is going well
lol
oof
• Removed 10 messages.
This is all I'm adding for now
that's still loads
yeah pretty extensive
Might add the repeating blaster at the end if I have time
where the melee at though
soon™️
vibroblade pls
spinning lightsaber if I can make it
Putting Terfs' commission on slight hold for this ;c
It's laser tag
ark wooden club
You trynna beat your oponent to death with a stick?
tf2 spy is a wonderful thing
it really is
I used to love to go onto a 10x server with my kunai and the thing that makes you recharge your invisibility when you stand still
oh and the diamondback
that was a useful tool
it really was
didn't work the same charm on normal matches
but fuck those
I have stabby mcstabbington for those ones
which btw is literally what my knife is called
how do you even rename items on steam
I can't remember how I got that knife
you need name tags
I think someone gave it to me
which cost like $2 I think
o
Should I set the particles for each weapon inside their enums, or should I have a switch on the projectile timer?
My world is coming up together pretty nice, just like i imagined it ;p
spicy
brister why do I have 4 ambassadors when they're not tradable
What if I were to have multiple particles per weapon?
what do u do with that
craft other weapons
i haven't played tf2 for ages
untradable stuff is kinda useless
year or two
me neither
switch (weapon)
{
case "DH_17":
case "E_11":
case "DL_44":
case "T_21":
world.spawnParticle(Particle.DRAGON_BREATH, location, 12);
world.spawnParticle(Particle.CLOUD, location, 5);
break;
case "BOW_CASTER":
world.spawnParticle(Particle.EXPLOSION_NORMAL, location, 2);
break;
case "DX_2":
world.spawnParticle(Particle.FIREWORKS_SPARK, location, 15);
world.spawnParticle(Particle.END_ROD, location, 6);
}
got this rn
EWW
wdym ew
string cases
some DRY would float my boat
god
it's impossible to use boat like that
you can say some dry
or less WET
but neither is a good thing for a boat
enums good strings bad
use java 12 switches then
or 13
or 14
whenever they came out
i needa learn how to write raw bytecode
screw off with kotlin and java
I can use the best of both worlds
changed to enums, happy? :p
i needa learn how to write raw bytecode
That is a crime
@ocean quartz How is the prevPage and nextPage handled? Will it throw an NPE if there is no previous page or?
@onyx loom
Blasters (DH-17 blaster pistol) Blaster rifle (E-11 blaster rifle) Heavy blaster pistol (DL-44 heavy blaster pistol) Sporting blaster (Defender sporting blaster) Light repeating blaster (T-21 light repeating blaster) E-Web repeating blaster Jawa ionization blaster Bowcaster Beam tube (Emperor-4 beam tube) Ssi-ruuvi paddle beamer Disruptor (DX-2 disruptor pistol, DXR-6 disruptor rifle) Sonic pistol (Sd-77 sonic pistol, Sg-82 sonic rifle) Wrist rockets (MM9 rocket system) Stokhli spray stick Projectile weapons (Oriolanis Striker Projectile Pistol, Dressellian projectile rifle) Flame projector (C-22 flame carbine, CR-24 flame rifle, ZX miniature flame projector) Dart shooter (Stealth-2VX palm shooter, PRP-502 hold-out dart shooter) Flechette launcher (FWG-5 flechette pistol, FC-1 flechette launcher) Missile tube (PLX-2M portable missile launcher) Thermal detonator (Class-A thermal detonator) Grenades (G-20 Glop grenade, C-22 fragmentation grenade, WW-41 CryoBan grenade) Grenade mortar (MobileMortar-3) Blaster artillery Anti-vehicle artillery Anti-infantry battery ``` Which ones do I add :p
@hot hull
ALL
Scroll up, you'll see which ones I added
Nothing will happen if there is no next or previous page
I should be fine to check using the getPrevPageNum ye ?
You don't need to
for showing the page item
If there is none it'll return the current page number instead
Get next page number
The method getNextPageNum()will return the number of the next page or -1 if it is there is no next page.
Get previous page number
The method getPrevPageNum()will return the number of the previous page or -1 if it is there is no previous page.
,-,
if (gui.getPrevPageNum() != -1)
{
gui.setItem(20, new GuiItem(new ItemBuilder(new ItemStack(Material.SPECTRAL_ARROW)).setName(Color.colorize("&fNext Page &8»")).build(), event ->
{
gui.prevPage();
}));
}
Yeah it's outdated i thought it made more sense to return the current instead, so dw about that xD
Ah k then
@ocean quartz I might be dumb, but it's not updating the item properly
private void nextPage(final PaginatedGui gui)
{
if (gui.getNextPageNum() != gui.getCurrentPageNum())
{
gui.setItem(32, new GuiItem(new ItemBuilder(new ItemStack(Material.SPECTRAL_ARROW)).setName(Color.colorize("&fNext Page &8»")).build(), event ->
{
gui.nextPage();
gui.update();
}));
}
}
Do I need to update the gui outside or is this fine? :p
Wait what are you trying to do? I don't think you should be updating the gui when you change page, it already does that
When I change the page, I want it to hide the next page, and show the previous page
Currently it doesn't
Leading me to assume it doesn't update the items :p
I doesn't yeah
Actually hold on, i'll make it auto update the items as well
I probably won't do anything
What i suggest you do there to hide the item is something like
if (gui.getNextPageNum() == gui.getCurrentPageNum()) gui.updateItem(32, GuiItem(yourFillItem))
That way it would hide it if there is no next one
But you'd need to show it again
Does it only run the gui code when you open it?
Yes
@ocean quartz @hot hull https://p1g.pw/gc/rockets3.mp4
if it ever loads
Oooh nice it's looking great! ;o
that's sick
later, trynna figure out how to make an rp
That rocket shit is hella cool
@quiet depot Just watched it, that's spicy
How to scare @prisma wave https://i.imgur.com/0jDHbKo.png
the image not showing is deleting .gitignore
my life flashed before my eyes
Omg that rocket is deamn cool @quiet depot exactly my idea if I had time. Altough suggest using T-10, T-9 etc. But deamnn boii nice work
Hey! Help me pls
If me execute "/this is a example"
How can i get just "/this"?
I'm trying with event.getMessage().args[0]
But doesn't work
String#split(" ")
@errant geyser Something like this works for you?
yes!
Alright alright
can someone tell me a good place to learn how to start making plugins?
Do you know java?
I would
Basic Java Tutorials: https://docs.oracle.com/javase/tutorial/
Online Java Course: https://www.codecademy.com/learn/learn-java
Java from Zero to Hero: https://java-programming.mooc.fi/
Some links to help 😎
Utilize our Java tutorial to learn the basics of the popular language, including Java objects, in this introductory course.
Helsingin yliopiston kaikille avoin ja ilmainen ohjelmoinnin perusteet opettava verkkokurssi. Kurssilla perehdytään nykyaikaisen ohjelmoinnin perusideoihin sekä ohjelmoinnissa käytettävien työvälineiden lisäksi algoritmien laatimiseen. Kurssille osallistuminen ei vaadi ennakko...
is it hard to learn?
It's not as bad as some languages
hey i just started making plugins today, and i finished my first plugin (its just a plugin that has a /fly command), but im getting an error: the type FlyCommand must implement the inherited abstract method CommandExecutor.onCommand(CommandSender, Command, String, String [])
public class FlyCommand implements CommandExecutor
@ocean quartz Better make that already translate colors
It will just execute the internal method for MessageResolver or how's called
( I guess )
So it's on your side to color it and such.
@sweet apex type onCommand and if you are using IntelIJ it should auto complete with that method
That's effort Gaby ;c
no?
You register it once and then reuse it
Either way you still have to register the message
Yea ik, still effort adding that method in tho
You are effort @hot hull
no u
@floral basin You got any star wars weapons textures?
Not made
How much for like 14 weapons (simple models)
your liver
@pallid gale ?