#dev-general
1 messages ยท Page 71 of 1
does anyone know how to fix this/what plugin this might be
regen walls are unraidable because water will not create obsidian with source block
the gen walls are fine
theyre unraidable because water on top of lava doesnt do anything
it just sits there
its supposed to make obby and take the source block away
when my custom plugin starts up, i get this error https://paste.helpch.at/yutotaqiki.md
@obtuse gale Backpacks line 24 what's there
kek
Should I learn spring framework, or do i need more java/kotlin knowledge first? I kinda wanna make a website,
Honestly I'm considering purchasing 3 test servers
1 for 1.8, another for 1.12 and another for 1.15
All 3 are versions some plugins I make need to support
@obtuse gale You gonna learn spring?
I dont really know to be honest
I mean you can search most things and Baeldung usually has a guide
Ive got a friend who has a crap ton of udemy courses.... I wonder if his got any on thtis ๐ค
oh, nice his got this.... https://www.udemy.com/course/spring-framework-5-beginner-to-guru/
no need to buy courses
there are free online tutorials for pretty much everything online
Ive got a friend that whenever udemy courses go on sale for like 15 bucks he buys a crap ton lol
He can probably hook me up with that.....
I want the report now
Oof
In intellij
When using format
How do I automatically put all methods on 1 line that can be
like from this:
@Override public PrisonCore getPlugin() {
return plugin;
}
to this:
@Override public PrisonCore getPlugin() { return plugin; }
there should be a minus on the left side
?
minus - fold
plus - unfold
sec, let me open my ide
I dont think you can make it put the getters / setters in one line
I guess
How do I automatically put all methods on 1 line that can be
@signal tinsel don't
It's ugly
How is that relevant 
Its only me who has to deal with it
that's the most important part in most cases
So i hooked up my backpack plugin with autosell, so it sells the items in my backpack, but i get this error in console and it doesn't sell my items ๐ https://paste.helpch.at/navufazodi.bash
@obtuse gale line 165 of BagController references something null
@prisma wave ๐ could you help me out maybe?
He did..
Yes i mean, help me fix the null...
You need to post some code for us to look at
you dont read minds @somber tulip ? Lameee
something is null
I'm still learning that ability unfortunately
Okay thanks so much!
I don't get why people ping when you've legit posted a message prior to their seconds apart
it is prob this fucking API it is ass
Possibly
I assume you mean autosellapi, it is
Null checking stuff from an API is always wise
But hey I got it to work so nothing is impossible 
You can't trust 'em
Yes, because i removed the API and it works
But, i only have the issue when i do /sellall
because i want it to sell my items in the backpack ๐
Wait, @prisma wave could it be because it is not depended?
the API i mean
You only need to depend AutoSell
Yes @hot hull i did not ....
Also stop pinging
Sorry, so if i depend should it be fixed?
I mean try it, but you should always add the dependencies you're depending on
Frosty yeah i should
I assume you're the dev
No, name change sorry haha
:Whatthe:
lmao
Wait, can you depend on 2 things?
You can depend on how ever many things you want
Will i do it like this?
[depend] vault
[depend] autosell
depend:
- "vault"
- "autosell"
Will i do it like this?
- "vault"
- "AutoSell"
Gaby, what will i do then
depend:
- "Vault"
- "AutoSell"
ty!
So i have a question
I made a plugin that does instant respawn, which works fine for 1.8 players, but when player is using version 1.12.2 somehow they still get the respawn screen. Anyone has a fix.
the 1.8 method doesn't work on later versions
Check their health and just clear their shit, don't actually kill the player
It should be client side so it's probably not possible
You can go around it though, like frosty just said, don't kill the player, set it's health back to full, drop it's inventory and teleport him to the respawn location
Using the Holographic Displays API, will Holograms created using the API be permanent through restarts of the server, or would you have to recreate them each time?
Yikes I have absolutely no time for a break within the next ~2 weeks
After that I might take a week off development
Or well, not entirely off development
Just less
Uh, is this normal? https://imgur.com/1IjmZ5m
Wowza, that's a lot of mobs.
Ik, no idea what is causing them to spawn that many, and having another issue where mobs are just frozen, standing still..
Is the server on hard mode?
Yeah
That's normal then I think
@heady birch Would I use spring for any kind of website?
Ye
alright, i wanna include like a simple login for on my website that hooks to a database
Ive done it on php before but like php is just kinda gross
I mean tbh it didnt seem that bad
Like just for a simple login for
with spring what ive seen is u gotta have controllers, and views and all kinds of stuff, if its just something simple php seemed to do the trick
yea, which is why im wondering if i should even use it for smaller apps
Why not
yea true....
Just because its made for scale doesn't mean you can't use it on a small scale
The thing is id want the security on this to be high
but i guess i might give it a shot and try
So should i be making like a User class? or like a BaseEntity class then making user extend that? Thats what ive seen so far, that being said idk much about it lol ive been looking at this thing
@heady birch ๐
No, don't stop developing if you do you will loose the next fortinite game you play
It's an addiction... just one more class... just one more.
any one have time to help me?
so
@obtuse gale Couldn't recommend it more for login and stuff
When I came from PHP to spring - I was like.. how do I actually process the login..
Spring does the actual authentication for you
.alright
whre should i start?
I started learning some basic spring earlier
I was looking at the pet clinic thing idk if uve heard of it?
seems pretty straightforward
Have you got intellij ultimate?
you mean you aren't paying 600$ yearly 
Ok yeah that's good
When you create a new project select "Spring Initializer"
Then you select the dependencies you want
Because you want a database backed login system, you probably want:
- Spring Web
- Spring Session
- Spring Security
- Spring Data Jpa
- MySQL Driver
- A template engine of some sort, I usually use Thymeleaf
alright thanks, ill have a look
I saw they seperated data from web, should i be doing that as well? With spring initializer it just makes one module
I think it's fine
alright time to try and get started
Where can i find the new Guilds Version
@heady birch so would i have to make requests from the frontend to the backend or can i do this with thymeleaf or whatever
if so how do i make said requests
Thymeleaf is basically your html
The main 2 options are:
Do it all in thymeleaf and just query services and stuff
make a front-end in angular or something that makes web requetsts to you API
I've never done option 2
I think alot of the web is moving to that sort of stuff
I'd probably go the first option
@GetMapping("/blog")
public String getBlog(Model model) {
model.addAttribute("posts", blogPostRepository.findAll(Sort.by("date").descending()));
return "blog/blog";
}
Heres an example of a controller
<div th:each="post : ${posts}" class="post" style="margin-bottom: 50px;">
<a th:href="@{'/blog/' + ${post.id}}">
<h1 th:text="${post.title}" class="title"></h1>
</a>
<p class="subtitle">
<span th:each="role : ${post.author.roles}" th:text="${role.name}" style="margin-right:5px;" class="tag"></span>
<a th:href="@{'/user/' + ${post.author.username}}"><span th:text="${post.author.username}"></span></a> on <span th:text="${#dates.format({post.date}, 'dd MMMM yyyy')}"></span>
</p>
</div>
Gives you a little idea of how it works
It's more you add the data to thymeleaf, rather than thymeleaf requesting it
mm, th: lets it know its a thymeleaf field right?
alright so where does all my html go? Do i make a directory called views?
ah
yea it did
So, should I make like a user class? that has like all the users information?
Yeah
what package should I put this in? Just tryna stick to conventions
user
Make a class such as UserServiceImpl and implement UserService
apparently user service is non existant ๐ฎ
Oh actually
I'll be honest it's been a while
Mine looks like this
@Override
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
UserAccount user = userRepository.findByUsername(username);
if (user == null) {
throw new UsernameNotFoundException("Invalid username");
}
return new org.springframework.security.core.userdetails.User(user.getEmail(), user.getPassword(), mapRolesToAuthorities(user.getRoles()));
}
Where UserAccount is the custom object
ah ok
For now you may want to miss out mapRolesToAuthorities
Whats userRepository
public interface UserRepository extends JpaRepository<UserAccount, Integer> {
UserAccount findByEmail(String email);
UserAccount findByUsername(String username);
}```
You dont need to implement interface thoughthis though
You can just autowire it and it will work
Make sure its for your object though
It interprets the methods
so findByEmail(String email) find's it literally by the 'email' column in the database
wdym by autowiire it?
Where ever you need to use that class
You can
@Autowired private UserRepository userRepository
and you dont need to = it or anything
o
Make sure to annotate UserRepository with @Repository
now,,,, i wonder wtf that is in kotlin
cos this aint workin
@Autowired private val userRepository: UserRepo
@field:Autowired
@field:Autowired private val userRepo:UserRepo?
@Autowired
private lateinit var repo: UserRepo
late initialized
You define the contract that the field will be initialized at some point after the creation of the object
ah
in my case it just makes the roles in the database into spring authorities
Guys, why does this happen https://cdn.discordapp.com/attachments/700337894942048336/703213073661689897/unknown.png
read the error
you cant have two thing running on the same port
THe port couldnt bind
hm
so what else do i need to pass to the method niall
class UserServiceImpl:UserService {
@Autowired
private lateinit var repo: UserRepo
override fun loadUserByUsername(username: String): UserDetails {
val user = repo.findByUsername(username)
return org.springframework.security.core.userdetails.User(user.email, user.password)
}
}```
return org.springframework.security.core.userdetails.User(user.email, user.password, Collections.emptyList())
Or the equivalent in kotlin to empty list
I'm tempted to make a basic API for update notifications
To get the plugin version from songoda because it has the better API and then check that against the installed plugins version
How do I do so in java tho
I've never made a web application in java
songoda
This might be useful next steps
I really need to add update notifications
does intellij undersstand thymeleaf?
cos its giving me an error when im typing out all the th:text.... stuff
hungry boi
and it still be complaining
just give it everything
sure it will appreciate it
so it can grow into a full fledged chrome
use the jetbrains toolbox
it was on lol idk why it didnt update
anyway got that fixed
But my keyboard just stopped working with intellij lol this is so weird
bruh
nvm fixed it lol
@heady birch in https://www.baeldung.com/registration-with-spring-mvc-and-spring-security
in the html they do like label.user.password, whats label?
I think you can ignore that
It looks like a language file or something
I'd leave it out and just use normal html for those bits
Instead of <label th:text="#{label.user.password}">password</label> Use
<label>Password:</label>
Make a class like UserController and just place it in their:
@Controller
public class UserController {
@PostMapping
public void registerUserAccount(Model model, @ModelAttribute("user") @Valid YourUserObj user, HttpServletRequest request, Errors errors) {
...
}
}```
@heady birch if the html th: stuff is just for language files and stuff whats this for?
<div>
<label th:text="#{label.user.email}">email</label>
<input type="email" th:field="*{email}"/>
<p th:each="error : ${#fields.errors('email')}"
th:text="${error}">Validation error</p>
</div>```
The #fields.error
Still jus t lang?
ah
do i keep the label.user.firstname and stuff but just replace it with like firstname?
Or just remove ti completely
oh
i misunderstood your question
same for input?
<input th:field="*{username}"/>
and the para <p th:each="error : ${#fields.errors('lastName')}" th:text="${error}">Validation error</p>
a;rogjt
@ocean quartz, mind sharing that animation :p
@hot hull Which one? ;o
If you need me to explain anything just let me know ;p
https://github.com/ipsk/TriumphPets/blob/development/common/src/main/kotlin/me/mattstudios/triumphpets/crate/components/CrateAnimation.kt
oh god kotlin
Without Kotlin that class would be soo awful though, when is a blessing for animations like that
I mean atleast you documented it nicelly so that's a plus
Also wouldn't switch be equivelant to when, which would still be kinda organised, but ye this looks clean af
Here is the problem though, to do the same as my first part of the when you're need to do:
switch(controller) {
case 15:
case 16:
case 17:
case 18:
case 19:
// Stuff
break;
// etc
}
While with when you can just do:
when(controller) {
in 15..19 -> {
// Stuff
}
}
there's case x, y, z in newer versions but ye, that's cleaner
"newer version" when everyone still on 8 :feelsbad:
I wonder if you use that switch from the new version but compile for 8 would it work? ;o
try ๐ฎ
probs not
Yea that's nice
-> ?
Yeah
like a return?
No it's just the same as :
Because you can't do it like that in previous versions xD
fuck java 8
Would this work in getting a random file from plugins/myplugin/worlds?
val files = File(plugin.dataFolder.absolutePath + File.separator + "worlds").listFiles()
val random = (0..files.size).random()
val chosenMap = files[random]```
I do get some warnings....
files.random() ;p
Hmm idk that one, and also to do the random i suggested you'd actually need to turn it into a list, i thought arrays also had it but no
I don't believe so
Atom One Dark
Shame that's not a thing in 8 Matt 
F
I'd say time to switch to kotlin, but I'd commit sudoku before I'd even figure out what's what
You guys should give it a try, once you get the feel of it, you'll see so many things that makes your life easier
And before you all start talking about !! and ? you hardly use them, and when you do ? is pretty nice
Like val test = getSomethingNullable() ?: retun
You hardly use ??
Was mostly referring to !! tbh, which i never use
I use it in certain situations where smart casts are not possible
I barely use any apart from the Elvis operator
@obtuse gale bear in mind listFiles() is nullable
This example is one thing that I wish Kotlin would take in consideration
We know that right there the block field is not null, but it still wants us to assert it
just use location.block
but yeah those situations are what I mean by "when smart cast is not possible"
you could just use block?.type
That was just an example xD
And no BM doesn't work needs assertion
If you're sorry, why did you tag him, along with whoever you tagged in the other channels?
You obviously did
You wouldn't apologize for a ping if you didn't mean to ping
That's.... not how it works
2 separate messages..
it is, haha
๐ okay okay geez
I've changed maybe 10 lines of code today
It's very possible...?
Message 1: Pings
Message 2: Apologizes
^^
@ocean quartz that smart cast failure makes sense though
I can see that yeah
Yo idk which channel to ask but i need some help with discord server verifications
i have it so players link their MC account with their discord account and that gives them a key , which works but how can i prevent people creating multiple discord accounts
ive got it so they need phone number to join but that isn't working
Sup
tfw u backed up your IdeaProject folder, but not all your projects are in there ๐ข
Luytex sucks when it comes to searching for method or field line because it takes so long
Bro just backup your entire pc
Let me walk you through it.
Take pc, put it in storage
Buy new pc
Repeat every month
oof
ngl bois, this is sexy af
>.... [14:18:19 INFO]: @AsyncSettings(max, min, avg){x[4, 4, 5] y[2, 2, 3] z[5, 5, 5] yaw[7, 7, 10] pitch[7, 7, 10]}
>.... [14:18:19 INFO]: @AsyncData(Flamexus) -> (max, min, avg){x[0, 0, 0] y[0, 0, 0] z[0, 0, 0] yaw[8, 5, 0] pitch[10, 0, 2]}
>.... [14:18:19 INFO]: @AsyncTime(afkTime){135}
๐คจ Huh
Ngl that looks like someone forgot what formatting looks like
Upgraded intellij... what is this new font
Atleast it fixed the false dependencies issue
Thought it was that material theme you guys use that made your font look stupid
if (message.size != 7 or 14)
@topaz bay Kotlin is awesome
Don't know why you didnt tell me to switch earlier
oof everyone switching to kotlin I see
Thats....
No... thats not going to do what you think it will
LOL
The kotlin or operator is equivalent to the Java bitwise | operator
Oh
Lol
Also another question
when (downLinkFormat) {
in 24..32 ->
}
downLinkFormat is a byte
24..32 is an int range I guess
It doesn't like that
.toInt()
Like I could understand if it was the other way round..
๐ฆ Yeah
oh damn
val a = 1
val b = 1.0
In the end it doesn't even matter, as we're all just sheep in this cosmic slaughter
a is the double, and b is the int
Are you not using gradle?
maven ๐
Sx, gimme a tutorial for gradle and I'll switch over
Oh dear
And it will convert your maven builds for you
gradle init in the root directory of your maven project
Dependency 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72' not found
You problem
I like the when
Do we still use packages in kotlin
ofc
thoughts on the override xD
Why are you even renaming it?
moving aint a thing
if the version is different it will move the old config to plugins/RoleSync/old/old_config.yml and put the new config.yml in plugins/RoleSync
tbh the beta was put because mainly everyone was wanting the /unsync command that i forgot about adding in the v1.0.0 so xD
Just don't change the config, ez
xD
Also dissapointed that you're legit advertising
Like damn show something off instead of just plopping the link
It's showcase, not advertisement
its to show off something you have done....
if you think i should remove it ill do gladly
sure, ill edit it xD
I get annoyed by everyone who does that, but still it's not against the rules (yet hopefully), so can't force you to not do that :p
im not a person who wants to be the advertiser, i thought that fell under showcase
as i said ill gladly remove it and i did
Nah add it back, just add a gif or something to show what it even is
(don't wanna be a meanie :p)
Oh that's a bot stonks, I mean yea it's a picture, but what are the features :p
I was gonna say make like a gif showing it off, like when you sync a role, but that's probs effort so :p
yeah thats hard to do :p
cause its nothing special other than syncing roles and stuff
How does it sync roles btw? Does it just take your primary lp group or?
permissions
next BETA hopefully will have API and ActionUtil
171 downloads so far (spigot/bungee combined)
You've got spigot and bungee versions combined right?
till now no
i have it on trello to combine them, but that will take time since i will have to recode some parts to not repeat same exact code
I gotta figure out how to do that in mine, Sx says bungee is very similar to spigot but never used it so no clue where to start :p
i basically copy pasted the plugin and changed .sendMessage to use the chat component api
Oof
oh and some stuff with events
like switch Player to ProxiedPlayer
and totally change the FileStorage class just because bungee, and make your own config.yml instead of bukkit creating it
I just need it to send messages through bungee so don't need all that :p
How do I make an item not fixable by essentials? I solved with commands, but I don't know how to do it with signs
Perhaps cancel PlayerInteractEvent?
Random question but can you tell if a project was coded using IIJ community or ultimate?
@distant sun if it uses spring, it was made in ultimate
Hey uh
If I were to create a skyblock plugin, should I create each island with their own world, or should I have the islands all in the same world?
Atm Iโve made it so that the islands are created in the same world
Take a moment
and consider that
Every island
gets its own dedicated world
Worlds generation take up like 60% of the server startup logs, at the minimum
and 95% the cause for server files being so large
Yeah youโre right, but how do servers like hypixel do it though? I was just wondering to see methods of bigger servers
Hypixel has thousands of servers
Nvm I talked to someone, and they said hypixelโs devs completely rebuilt the world system so that they basically donโt even have โworldsโ
And send their own packets to the clients
but ngl don't think you're gonna get 30k players using your skyblock plugin on one server
at one time
This is for my own server :P
Yeah thatโs exactly what Iโm doing atm :D
how to do that? i'm still figuring that one out
it involves math which i can't do
Itโs pretty simple subtraction lol
You think i can do that
eventually i'll tell someone to fix it for me
Fix what?
Whatโs โeverythingโ lol
Oh youโve made your own sb plugin?
https://discordapp.com/channels/164280494874165248/452279708856614912/696765819731968002 that was the last time i touched it
Island creation was kinda simple for me ngl
same
Took like ~30-45 min or maybe even less
I have a lot of stuff i need to finish but i dont want to
Iโm kinda the opposite
I get carried away with other ideas and constantly start working on new projects, leaving my other ones unfinished
Lmao same
I was working on a huge project and every time I would open it up, it took me a while to reorient myself to my code again, at one point it got so bad I just stopped working on it. Now Iโm rebuilding a much cleaner version from scratch :P
@winged tendon Quick tip btw, don't compare things to hypixel since it's usually a stonks cuz yknow hypixel is hypixel :p
Yeah
I realized
They do some crazy hackery
Practically rebuild Minecraft to their own liking lol
I mean hypixel is hypixel
@quiet depot cant use spring on community?
I think only ultimate can do html
you can, but it's not a fun experience @distant sun
I see
You have ultimate do you not @distant sun ?
yes
So guys
i have an issue
I have a blockbreak & place listener and cancel the event, but somehow if you place the blocks very quickly it just let you build
Latency issues? Or another plugin messing it up
bruh
is your account an admin account?
yea
@ocean quartz Can I get an example of how to setup command aliases, I'm confused
Using the annotations or the method?
the method
public class CommandClass extends CommandBase {
public CommandClass() {
setAliases(Arrays.listOf("alias1", "alias2"));
}
}
I only have to do this on one right?
Yeah
Gucci thanks
How different is C# to java? Cos Ive wanted to make some changes to this for a while, but idk if ive got the skills lol
Its probably too complicated for me lol
yea lol thats what im seeing looking at the code
I might give it a shot, what jetbrains program is for C#
rider
Identical my ass
almost identical*
Thats still too much
mostly the same
k
lol im already failing to make a new project
c# is very similar to java, that's fair to say
It won't take long to pick it up if you know java, skimming over the reference should suffice
anyone know if I can get EzPrestige plugin to work with luckperms?
@obtuse gale wut?
why not just System.out.println("Your name is " + userName + ". Your age is " + userAge); @obtuse gale ๐
I mean that could work too
Hello I want my spawned snowball to go straight forward but now it falls after a 20 blocks in to the ground. It's for a gun plugin. Is the .setgravity(Boolean) working?
How hard would it be for me to edit this, https://github.com/ORelio/Minecraft-Console-Client
And add some things, like being able to log multiple accounts in at once?
@obtuse gale Why not have like a counter in the map corner before it corrupts it?
Instead of that Wait for it
Map update tick is difficult
Also one difficult thing there is that you can't remove the text once you printed it that easily
I don't even know 1 seconds = either 4 or 5 ticks update
Hey guys! ๐
I'm building my own protection block type plugin
I'm trying to work out the most efficient way to check if any block event occurs within a limitless list of regions
Regions are saved to a config file when the block is placed. I could iterate through all the regions for every block event but I feel this would be very inefficient and give unnecessary overhead
Any ideas to how I can improve this?
Use objects, load them into a map, and just iterate through the map
Would it not still be inefficient to iterate through a map every time any block event is triggered? @hot hull
I'd assume so, but not sure of a better way to do it
The idea of having an if statement run 100+ times for every block broken sounds like it would lag
I'll just iterate through a map, hopefully it won't cause problems
Only when I use this project name
It adds desktop as a content root automatically and I have to remove it... why?
Sorry bud, I've no idea
โน๏ธ Looks like it's fixed now but still not sure why, sorry for the rant ๐
angry messages removed
gradles fault i expect
@austere moth iterating over a set of Locations or something isn't particularly heavy. But you might find it faster to compare the minimum and maximum points of each region to see if the block is inside
@prisma wave I did consider having min and max already calculated in the yml file however I need the radius of the region to be changable
then calculate the min and max when the plugin starts based on the radius?
No problem @austere moth
object is awesome
it's like a singleton without the annoying INSTANCE calls
@prisma wave any opinions on how this could be improved?
Each protection block in the config will be written somewhat like this:
owner: dajakos
type: 1
worldName: world
minMax: { 0, 0, 0, 10, 10, 10}
@topaz bay Octrees?
yes
Is it going to be worth learning for this?
I mean...
It depends..
Theres no reason you shouldnt just use worldguard
ew... double negative
I thought about using WorldGuard however I feel I have more leeway to make specific changes
Without going into the customisation of my other functions
Players aren't trusted should not be able to break in the region
Should not be able to open doors oooooor mmaybe they should, I haven't decided yet
wait...
They should be able to open chests
You literally want land claiming?
Tnt can damage within the regions
Theres like hundreds of plugins that have these features
No no no no no no
More spefici
Specific...
Untrusted players should be able to break the protection block allowing the area to be raided
Not only the protection block but also custom blocks
Not an idea I want to share yet >:D
Anyone else had an issue with intellij just freezing for like 1-2 seconds randomly while typing?
Increase heap?
How would one do that?
Did you install through the Toolbox?
na, it was bugging out like crazy for me
I set mine to 8G but that is excessive. Maybe 2 or 4?
Haven't since the the one time I played it after downloading, why?
Oh wow
it's meant to be like that
apparently unreal engine doesn't have good map compression
Ahh
might have to delete my install, or move it off the ssd
unfortunately I can't justify having 183gb of ssd taken by a single game
How big is the SSD?
who wanna convert some c code
uses unsigned and it's proving difficult to implement in java
How complex is it
id say, very
I saw that Niall
Yeah i thought i wont bother him during a match
removed metrics ๐ฆ
So looking forward to 1.16
@quiet depot yes or no
https://paste.helpch.at/ronisodove.java
https://paste.helpch.at/elowijoyuh.java
negatron
it's a bit yuck
Again, elaborate
yuck, with the ck being a more guttural sound than usual
Just tell me what you don't like smh
want me to get rid of the command?
what's the difference between subcommand & command?
yeah nah
Would you prefer the current carfufle that is the ecloud command class?
I'd do PapiCommand & EcloudCommand if u want shit like that
It's /papi ecloud <all the 50 different commands>
So not really a nice way of formatting that
Oh boy that does sound scary
Hence subCommands to hopefully make it a bit more organised
Gimme a layout you'd prefer, just so I can imagine what the hecc you're even thinking
uh
no uh's
idk
just do whatever u want
i'll fix it up later
then u can see
I'm not one for planning
I think it's pretty neat, and would deffo look better than the current mess
iS thAt LiGhT tHemE
Its 2020, personal preference isnt allowed anymore
Hello my for loop executes 2 times can somebody help me?
for (ItemStack item : player.getInventory().getContents().clone()) {
if(item == null){
continue;
}
if (item.getType() == Material.IRON_INGOT) {
if(item.getItemMeta().getDisplayName().equalsIgnoreCase(plugin.getConfig().getString("glock19.ammo-naam"))){
player.getInventory().removeItem(item);
int ammofromconfig = plugin.getConfig().getInt("glock19.ammo-refull");
int newAmmoAmmo = newAmmo + ammofromconfig;
int maxammo = 10;
lore.add(plugin.getConfig().getString("algemeen.lore"));
lore.add(ChatColor.BLUE + "Durability: ยงa" + newDurability);
lore.add(ChatColor.BLUE + "Ammo: " + ChatColor.GREEN + newAmmoAmmo + ChatColor.WHITE + "/" + ChatColor.RED + maxammo);
meta.setLore(lore);
e.getPlayer().getItemInHand().setItemMeta(meta);
player.sendMessage("ยงaJe wapen is herladen!");
}else{
player.sendMessage("ยงcJe hebt niet de juiste ammo!");
}
}else{
player.sendMessage("ยงcJe hebt geen ammo!");
}
}
return;
}```
https://gyazo.com/14d3522eb8dce55d05357eacd9b22e60
Don't post in two channels
Sorry
Why the fk is my intellij discord integration not working
Ask it
How would you guys go about breaking blocks in a x shape?
loopty loop
I just can't work out how you do it tho, is it vectors or?
it's like going up then right or whatever somehow
This is similar
๐ thank you so much for sharing about that
The two locations to get the blocks between are the corners in your case
this is gonna be fun to work out how to do this part, ha ha.
Aye thatโs the Kompye dude
he gets around
Heโs my idol
Ooh just tried IJ ultimate's database viewer thing and it's awesome ;o
Show
ignore how bad the query is, this was just for testing
Ooo
Donโt know if this is the correct place to ask this, but Iโm asking it anyways.
Iโm trying to create a skript and one of the key features is to keep a Boolean (or just a variable would work too) per player, and store that info.
Basically I want to test if that player has already ran the command or not. Is this even possible and if so how would I go about doing it?
Nah fam, we don't do skripts here
sKrIpT
Lmao
they literally have eclipse downloaded.....
I guess its not much better than notepad but still
Hello i want some1 sugget to me a plugin that hide my plugins and block commands bukkit and / + tab
TreysCommandBlocker
damn, it's insane how inconsistent mojang naming is
left 1.10, right 1.15
nether quartz -> quartz
block of quartz -> quartz block
chiseled quartz block -> chiseled quartz block
pillar quartz block -> quartz pillar
iT's Mc WhAt U eXpEcT
idk
some consistency
just a little
they're shooting themselves in the foot every time they rename something
(which btw is like every update)
imagine the code just to update from old versions
iT's Mc WhAt U eXpEcT
mega yikes
They should have set it to something, and just used that from the start
That's why you should map out projects ๐
nah bet the devs are fucking it up purposely just so they can fix it later, get the line counts up for $$
and ew no mapping out bad
planning is lame
lmao
im jk ofc i plan please hire me
frosty, have you ever actually planned a project out?
nope
Why do you think I already refarctored this commands shit three times?
4th time incoming soon
just write it right first numpty
You keep disliking it, so sthu
I told you to do whatever, push, so I can look at maybe fix it
Trynna make it papi3 worthy btw, so just perhaps, a big perhaps I can be of some use
Cause you know, rpf never gonna be finished <o/
hey i'm working on it right now
โค๏ธ
just going through all the materials between 1.7 & 1.15
linking them to 1.15
it's a painful process
and I haven't even began on "related" items
armour, eggs, potions, etc
think I'm just gonna skip that for now
I want to work on papi, and this material api is way bigger than I imagined
I mean once you have it made, it'll be smooth sailing tho :p
lol no
it'll be a fuck ton of testing
I just want to get a beta papi poc out
tabnine is a great plugin btw
really good suggestions, dare I say even better than intellij's
let's test it out
@quiet depot You mean your stuff doesn't work immediately? That's weak
when did I say otherwise?
it'll be a fuck ton of testing
oh this
guaranteed my code will work perfectly first time
but should still test
if something is broken, it's someone elses fault
like a suggestion someone gave
or a pr
Yaya lies
pff
A couple of days has already passed btw
kite holograms
No, the contest results @quiet depot
Someone please teach me traditional dependency injection, I've practically got used to just using frameworks
why do you need to go back?
In large applications when I used to do traditional DI i'd end up with getters like getOneThing().getMainForExample().getAnotherComponent()
Because some times I do not want to use a framework due to it's startup overhead
Desktop application's mainly, swing's startup time is slow enough
I just want to point out that, that example is likely bad
depending on the real example, it's most likely a violation of the single responsibility principple
most likely
That reminds me
I have a class that 1 keeps track of some objects
But then it also keeps track of listeners for those objects
so If I add an object to the Manager, it calls listener methods on all the listeners
Violates SRP since it's kinda doing two things??
yes
But then its only responsibility is to literally be a list
the listeners would be roughly handled by your event dispatcher
roughly
yes
no because I don't understand the problem at hand. You've just given me an abstracted example, not what you're actually dealing with
One second
I have a good example
public class UserManager {
private Map<UUID, KiteUser> userMap = new HashMap<>();
public KiteUser getUser(Player player) {
if (!userMap.containsKey(player.getUniqueId())) {
userMap.put(player.getUniqueId(), new KiteUser(player, plugin));
}
return userMap.get(player.getUniqueId());
}
public void removeUser(Player player) {
userMap.remove(player.getUniqueId());
}
public Collection<KiteUser> getUsers() {
return userMap.values();
}
}```
Manager is pretty abstract
I don't know the correct word to actually explain what it does?
UserRetriever, UserFinder, UserTracker?
Fetch?
NO
Lol
yes, it really is
Ok
anyway that's fine
Yeah i always use "manager" for things like that
you'd benefit from some final usage
Yeah, upgraded to intellij and it warns me
Blah could be final
Piggy fancy a code review?
For only 69.99 you can get an exclusive code review from Piggy!
I'm aware of final stuff
Possible structuring
ConfigFile really should not be named ConfigFile
bit busy atm
No problem
https://github.com/Niall7459/HolographicExtension/blob/master/src/main/java/net/kitesoftware/holograms/animation/impl/Pulse.java#L55-L65 cant this be replaced with a method?
Probably
ChatColor color1, ChatColor color2, ChatColor color3, ChatColor color4, String text, List<String> frames, int pauses or smth like this
but then id have to make a temporary list and reverse it and that's acouple object creations i probably don't want to do
I mean, use the same structure but as a method, just an idea idk.
You know better than me.
In fact trump knows better than anyone
He knows more about java than any of us I hear
Lmao
Why not just use String.. and then get the color with that @distant sun would be neater :p
Why? You can just use the color
sMh
failing hard at spring framework rn lol
whats the best way to hook into autosell? I tried using https://www.spigotmc.org/resources/autosellapi.62935/ but no hope
@pale shell just use the plugin
I can't find any api docs for it?
https://gabytm.me/docs/autosell shouldnt be very different / outdated
There are a few things you can use anyways, AutoSellAPI and SellHandler are the main classes
the api worked "fine" for me
Ok but if you have access to the plugin why not use it instead
because i didnt know where everything was in the plugin?
Also i cba to download it. lol. Aaaand it's going in a shared github.
Thats stupid lol