#dev-general
1 messages · Page 207 of 1
This is where it's from
that's the steepest arrow code I've seen in a good while
*uses 8 chars long tabs*
there we go
Also, am I allowed to modify every single script 
wait but all those ifs could have been done in one if could they not ?
Question is what the hell is that spacing
what spacing?
also function hasitem() { 😦
also it uses if and this time they could have just used switch.
Can i modify it?
I mean I assume you can. Can't you?
but also
there's the checkitem expansion now
so
is it rly needed?
Wdym what spacing lol, u blind?
a ( a )
IJ just crashed on me...
Also, aboody is the author of has_item script
Idk if it's really needed now
Also, "data" script seems too complicated for new users
I mean its good tho.
Just realized
I mean this: https://github.com/PlaceholderAPI/Javascript-Expansion/blob/master/scripts/data_example.js
yeah but there's a wiki for that. https://github.com/PlaceholderAPI/Javascript-Expansion/wiki/Advanced-Scripts#storing-data
?
is it the community scripts ?
Yeah
the thing is
that's not meant to be easy ...
its good as it is
that's not for examples. Thats for use.
Btw, who's the author of faction script?
Ok found it
From frosty
I am adding credits inside each scripts
// Author: aBooDyy && NathanG
wait but the factions one is not on the community scripts
It's not, yeah
its the only one that is not there I think
I'm adding new changes to v1.6.1 expansion now
It includes Data.setTemp(), Data.getTemp(), Data.clearTemp()
When you use this, after Placeholder.saveData() and restart, everything in this data will not be saved
oh so its basically saved until a server restart
Yeah
no matter what
Or even expansion reload
Not sure where to ask this but my server has plugins which have updaters which are not connecting their hosts, I cant even join the server it says authentication error so I assume it isnt contacting Mojang. Not sure what to do 😦
running on linux
i have a question for a plugin dev, is there one whom i can talk with ?
Ask away
is it possible to make a plugin that can manage "Speedruns"
Make a world per player and keep track of there progress.
Delete their wold if they play on hardcore and die and then they have to create new world.
and so on
Possible yes
Hmm, would it be best to get a standalone plugin made for this. Or try and find different plugins that might be able to do this.
Or could that effect the performance
Doubt anything like this would even be possible with mix matching different plugins
Ok. because i only know of a plugin that makes world per player.
@frigid badge Go accept https://github.com/LemmoTresto/LemonMobCoins/pull/33
@ocean quartz Why is mf gui maven :c
Cuz maven central
Gotta make a project so I can even debug shit first ;C
Cuz maven central
@ocean quartz wut
He's a 4head
@frigid badge It is extremely annoying to publish to maven central through gradle, the only way i got it working was to stage but i had to manually release on the website so i switched back to maven
can i create a private repo then make it public at another time? or would i have to create another repo for that?
You can yes
awesome
installing a new ssd so im wiping my drives and need to save my projects somewhere 
samsung 860 evo 1tb
very nice
yup
exciting
installing it was surprisingly easy
how you got 2
860 evo is sata
altho i was thinking of getting another nvme, i have m.2 slots on my board
just didnt feel the need for another nvme as the difference isnt too big in games
compared to OS boot times for example
u put ur OS on nvme?
yeah true it's basically unnoticable for games
im going to
backing stuff up to reset pc
noice
debating whether or not to dual boot linux now i have the space
ah yes 
what's wrong with adopt
yes
"Videos"
there we go
lmao
Github is hard apparently https://i.imgur.com/z181aZU.png
erm you can't have multiple forks of a repo lol
pretty sure you can fork it multiple times
Even if you're forking a fork, and have already have forked the original, it will just go to your fork
You delete the previous one
I do that when I have to rebase since it's 100x faster
That's one of the devs from IS
yeah
the PlotSquared expansion is his I think
that's what he pushed as well
I'll merge the update
what? why?
do it for me 🥺
andre did it .. xD
LMAO
is this how you play a sound?
player.playSound(player.getLocation(), Sound.ZOMBIE_INFECT, 1.0F, 2.0F);
?tryandsee
max volume and pitch is 1.0f iirc
I have this stupid IntelliJ problem where a kotlin standard function results in an unresolved reference. I have tried invalidating the cache and restarting IJ
but it did not help
StringBuilder.appendLine(...) -> Unresolved reference: appendLine
Any ideas what I could do?
ok
who needs comments?
Then there is me who comments even the most obvious thing 
@frigid badge Did u accept my pr?
Make sure to mark it as hacktober accepted
isn't necessary since the repo is already marked as hacktoberfest
but sure I will just for you
does anyone know of a command framework that supports "in-between arguments"?
so something like ```
/booster <blah> activate
/booster <blah> deactivate
where blah could be anything
ACF doesn't seem to, doesn't look like MF does either
Does cloud?
potentially
Although I can't find any definite information and don't wanna spend time rewriting everything just to find it doesn't work
I was going to say you could probably use @Optional with MF but I forgot it only works on last parameter.
just 1? that's worth it xD jk
to MF*
never used mf
is never too late
@prisma wave What do you mean by in between arguments? ;o
pretty much exactly this
/bossbar add <id> <name>
/bossbar set <id> color <color>
/bossbar set <id> name <newname>
/bossbar remove <id>```
where id could be anything
I could just use @CatchUnknown but then no tabcompletion 😦
Yeah cloud can do that
Wouldn't that be just public void command(Player player, Object id, Color color)?
no because it's color not <color>
i.e it has to be literally "color"
like a subcommand
Oh okay, sounds complicated
yeah it seems tricky to implement
@obtuse gale do you know if Cloud will properly tabcomplete with brigadier with those?
Ye
I mean you could just check if second parameter is "color" or "name" can't you?
I could, but then I'd lose tabcompletion and it would defeat the point of using a framework
ok ty
i'll look into cloud
looks quite good
messy
While cloud isn't really "thought" rn for annotated commands or whatever tf they're called, they are somewhat supported and they'll get properly into it, right now City just wants to clean it up as much as they can
yeah but so does cloud hopefully :))
👍
Makes sense
The builders are kinda ugly imo, but hopefully the annotations are good enough
If you want to go with annotations that is
Would share an invite to the discord but Barry won't like that lolz
it's on the github so np
it's quite a lot of boilerplate to make a commandmanager
Fefo 👀
👀
Is there an IJ plugin which auto documents stuff? 🥺
Lol
Yep, there’s a plugin that writes the code for you
@kindred hatch https://github.com/ItsNathanG/PictureLogin maybe this ?
Hipity hopity, the code is now my property
you stole my line that I stole from Dani.
Go drink milk
shut! shut!
kinda sad 😦
B
shut shut yes
welp i fucked up dual boot
i'm not 100% sure
first thing I switched from raid to achi
then I resized the c partition, and make a new partition for ubuntu
told ubuntu to install on that partition
then it said it's going to create it's bootloader on "blahblah0" or something
Did you install on the wrong on
ig that overwrote the windows loader
I think I needed to select the "install alongside" instead of "install on partition" option
so reinstalling windows, not going to manually make the partition this time, will let ubuntu do that
I mean wsl can run many distros
What's wrong with weed :c
i mean nothing
i've been using ubuntu for years and never needed to switch
on the server side of things that is, not the desktop
regarding why not wsl2, no reason in particular
Me
Me
Me
I'm literally working on 3 projects at the same time and the one I started yesterday I just left it xD
Only working on 1 project now cause I've abandoned the rest <o/
is Collidable a word?
uh
What is proper english for "something that can be collided with"
i'd say a "physical object"
theres also this answer if u wish to read it
yup. i cba reading it for myself 😄
Im just gonna go for physical object for now
what u need it for?
To describe an object that can be collided with duh
A weird HCI project
hci?
just a presentation, but the professor is a bit strict about how its worded
hci?
@quiet depot
Human Computer Interaction
oh
if collidable is an explicit requirement, then perhaps a diagram is in order
have a gif of you punching said object as hard as possible
show the damage
Nah its actually just used in a sentence about a drone avoiding "collidable" surfaces
collidable
I changed that to physical objects
Okay so I need some suggestions, my wifi is shit, do I just take a hammer and beat the shit out of the router or?
Destroy it
keep it as physical objects, theres more words there 
The drone would be equipped with proximity sensors to prevent collisions.
https://spotthestation.nasa.gov/tracking_map.cfm
find the location where the ISS would be in an hour and place your router safely in its path
See the International Space Station! As the third brightest object in the sky the space station is easy to see if you know when to look up.
Ahhhh yes that is a much better sentence
That'll be more effective I think
Yugi, please fix those color tones tho, that's gotta be a bitch to read
yeah light text kthx
Disgusting
😢
what's the point of Adventure? is it just a nicer version of the componentbuilder api?
yes
worth shading?
if you're going for platform independence
Probably not, just Cloud uses it for its help message generation so I guess I'll need it
what's this 'cloud' thing?
New command frameowkr
Anyone else love db connection errors 🥺
kk
but daemon is broke
link?
DM me the stuff and I'll investigate so you can go to bed.
guessing I do
i'll try first
I just don't see an upgrade guide for it
o found it
ok it's working
@frail glade go crazy
Already am
check pms too
I need to continue working on TP beta.
?
Mhmm
"TP 2020 update coming in 2021"
how do you use when () with enum?
no is
It's just
when (enum) {
Enum.VALUE -> {
}
}
is PetType a variable here?
it needs to be a variable of type whatever enum you have
wait I'm stupid lol
Those when statements are god-tier.
I had to write one the past few days to handle a bunch of on-demand changes and it's been amazing.
Yo Java has that also nocap
when? I think I saw someone saying it has it on newer versions
any idea why this doesn't go over 2? minedBlocksMaps.merge(owner.uuid, amount) { _, value -> value + amount }
ah I need to switch _ with value
Java 15 has
switch (enum) {
case Enum.VALUE ->
}
Which is similar to when
Is there a way to limit how far a mob wonders from a certain position in mc
I know I could make a check for but I feel like that would be making too many calculations since I am already making distance calculations for the player to a specific landmark block. There are up to 40 landmark blocks in the world (all within 1000 blocks)
is not possible to use switch with Enum#values @ocean quartz ?
kotlin syntax is sometimes confusing
@distant sun Wdym?
switch (Enum.values()) {
case Enum.X:
case Enum.Y:
}```
I mean that wouldn't work in java either, values is an array
ok I need a break
What are you trying to do?
ye idm xd
I have literally no knowledge of plugin dev, but I found the src for a plugin I want on GitHub. How do I turn it into a JAR file for me to use?
you download it and open it using IIJ or something then you compile it if everything works fine
well no but yes
again total noob here
intellij is better
OK from my researcxh, i have figured out the plugin ises 'Gradle wrapper"
IIJ > Eclipse
does that make sense?
if you just wanna compile it, you can use like mvn package or ./gradlew build
uses*
James I also did try the gradlew build after installing, but i get a mess of errors
so I am trying a diff method
what errors exactly?
first it said the plugin uses deprecated features not available in Gradle v7.0
so I went down a version, then just siad some generic error
I will pull it up again one sec
What plugin & errors
deprecation usually isnt an error its a warning
^
Ok, and the error?
he has a jar right there
3.0.2 doesnt work
oh
8 feb 2019 though
Send the error you are getting from gradle
run gradlew shadowJar
build already depends on shadow jar
Wait hang on jsut so I am clear here
I downloaded then extracted a ZIP of the git hub
from that plugin
you can usually just git clone <link> but that will work too
ok, now open a cmd and run that
Outside src
from the root directory of the project
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
I obv missed a step lol
thanks for taking the time to answer me
Great lol
i suggest you download intellij and import the project as a gradle project
which should generate the missing gradle files
will do
Does eclipse have no support for any build tool?
It does say i can Import Gradle Project in eclipse
and I did that
but IM literally lost after that step
uh it might but i dont like eclipse nor know how to make it work lmao
if you wanna use eclipse you could send some screenshots and we can try to figure it out
taht seems to be general consensus from forums ive been on all day trying to do this
Well yea but is not worth to download another program just for that
nah its good im installing IntelliJ right now
Importing now to IntelliJ
OK done
open build.gradle and press the green triangle near build
ye
Run Anything?
gaby are you trying to reload the gradle project or build?
ah you can do it from the gradle tab as well
trying to send Screenshot but I dont see that
gaby are you trying to reload the gradle project or build?
@surreal quarry doesnt it index the dependencies when the project is opened?
i think so gaby
lucfours - on the far right side there should be a gradle panel, open that up and then double click build
Thanks james
Good
?paste
Paste Services
When asking for help with a config/menu/code issue please use one of these:
(However we do prefer if you used our paste :))
• HelpChat Paste - Usage
• Hastebin
send them ^
Every single error is related to a "?" symbol being at the end of the inferred type
I will do that now James
James is possible to paste a config section to a yaml file?
wdym?
like the yaml extension on that paste?
thats automatically inferred based on the first line or something
also lucfours, the author of this plugin needs to fix that or you can try, but he basically has done a bunch of stuff that you can't do in kotlin
ConfigurationSection
Hmmm, cause I know this plugin is running on this exact version on a few other servers
So maybe they did it themselves somehow?
the Author is no longer active 😦
Since it is open sourced people can just fix it for themselves
@distant sun how do you have a ConfigurationSection without a YamlConfiguration that you can save
Ahhhh
I mean copy from a file and paste to anthet file
How much would someone charge to fix this type of issue do you think? I obviously cant learn java or whatever this is overnight
#761129130321772564 #761129129730900028 is probably your best bet
oh gaby i think you would need to make a file, then iterate over whatever configsection you have and save each part to the new file
but thats just my guess
I can do it for 400£ if you want :)) Not expensive at all
$2
RIP
681,22
400 GBP is probabily like 700 usd
Canadian Dollars
worth it
its just 516 USD tho
ill go see if there is a premium plugin i can buy or somethingf
I'll do it for 200 Euro
£ lost value in the past few years gaby
Thanks @surreal quarry @distant sun for your time
np
300 RON
100 RON
Yen
Rial
Bollivians
fuck. The one where they have like a 100,000 note
¥
Venezuela or Zimbabwe I think
give me 50 Kuwait dinar
Rial is the lowest currency
how can it be the lowest?
lmao gaby
1 rial = 0,000024$
i actually only accept HC XP as of now
fr the poor kittens
Mf
She's actually running xd
just mf
kidding gaby's built different y'know
Bones flesh and duct tape
t
Down for some code review @frigid badge or anybody else?
Java library for Tebex.io API. Contribute to iGabyTM/tebex-java-sdk development by creating an account on GitHub.
oh yeah I saw that
looked pretty neat tbh
haven't looked into it as a review tho lol
Do it! 😈
Wow you actually written javadocs
public void deleteCommands(@NotNull @org.jetbrains.annotations.NotNull int[] commands) nice one javadocs
is there a place on this discord where i can talk to sysadmins
this is probably the closest you are gonna get to a channel where you will find sysadmins
ok so basically im debating renting a server with omgserv , https://www.omgserv.com/en/hosting/vps/game/ thats the link ,
i want to run maybe 3 or 4 servers with this dedicated
do i buy 3 serves
#development is the support channel ender
magic
For "unlimited" ram
omgserv xD
Always expect good service from that
unlimited ram and storage
yea
:))
anybody needs some PRs?
so u name uhd and fhd but dont know HD? ur thinking of resolutions which is high definition 
Make your own holograms plugin. Be different. Be better. Be Elite.
Use Elara.
he said 'be better'
i mean im sure it can mean a lot of things
Bruh
stop right there
maven 😐
Do you have 2 minutes to talk about our lord and saviour Gradle?
well if the other option is not using a build tool then it is
gradle even easier 🙂
Maven is the devil. It takes many forms but that one is the worst
that's why you need to stay away from it
XML in 2020 😬
imo the worse part of maven is that it uses xml
yup
guys instead of flaming maven, just explain it in a normal manner
piggy's one
agree lime
We have before lemmo
=wiki gradle
Gradle - HelpChat Wiki
Gradle is a build tool, especially common among JVM languages as an
alternative to another build tool, Maven. Gradle offers a few key benefits over
maven ...
Lemmo believe me the only reasons I know maven is better its because its faster and has shorter code xD
Maven is slower, less extendable, more verbose, lacks portability, and just generally sucks
better in comparation to?
but I mean its enough
gradle is the opposite of that
Only reason to use maven if you’re a frontend nerd
Gradle does have a bit of a learning curve tbf, but so will any build tool compared to IDE drag and drop
wdym conclure
maven doesn't suck, gradle just improves on a lot of things
maven sucks in comparison
markup languages Gaby
you mean xml?
It’s similar to html
🌝
Sgml
theres even xhtml

well because html is xml
Not really
Soap > Rest APIs
the thing with build tools is you won't see the benefits until you're actually familiar with them - they might look like overcomplicated mess right now, but when you know how to use them well, you won't want to go back
that goes for Maven AND gradle
xml have way stricter rules than html
they both suck 🤷
rule 3
I mean they have their functionality
"the third rule"
is there any reason why something should use xml?
html isn't that bad
for example, json > xml for rest api
How is gradle too much work? .-.
xml is very strict making it quite maintainable if you understand it
I do understand it but is horrible
What lol, you have like 3 or so lines in gradle for every 20 maven
Gradle is less work than Maven
a simple spigot project will literally be about 10 lines
compile(group: 'group', name: 'name', version: 'version') can be replaced by compile('group:name:version')
implementation 🙂
??
how is that 3 lines
lmao
no lol
you need all of those
that's at least 12 just on your dependencies
2 for dependency block, group, artifact, version and scope
implementation "something:something:1.0"
vs
<dependency>
<group>something</group>
<artifact>something</artifact>
<version>1.0</version>
<scope>compile</scope>
</dependency>
no?
Oh yeah forgot scope
is generated by minecraft dev plugin
Oh yeah forgot scope
lol, more lines 🙂
nothing is auto generated
kind of
Gradle and Maven both generate a basic empty script, you have to add the spigot stuff yourself for both of them
unless you use minecraft dev plugin
^
which kinda sucks but it does the job
which is not working for gradle
oh yeah then they're automatically generated
https://paste.helpch.at/piyiyivazi.gradle this is what I normally use
you got placeholders for @version@, the jar is being sent to your plugins folder and relocations in only 50 lines vs 200 with maven
gradlejerk
always
can even use this plugin called manadrop to generate the plugin.yml btw
spigradle >
@onyx loom tier 7 :0
lmao
you will be stuck in tier 7 for eternity
took me like 2 weeks to do 59-60
can even use this plugin called manadrop to generate the plugin.yml btw
@distant sun Or the one i wrote, works pretty well too ;p
Damn bru
xd
i have been slacking on the xp, but thats besides the point
This is with mine, you don't even need to add the main or version ;p
how do I clone the dev branch of mfg?
oo nice
Fork it and change branch gab, it clones the entire thing
I use gitkraken to change branch but can be done on IJ
ic
Command line is meh ;p
yOurE MeH 😤
Command line pog
anybody looking for some pull requests? 
pdm
Best way to store a map in database?
Make a table for it
I mean the core structure of a table gives you a key:value relationship.. why not make proper use of a database if you have one?
Conclure
You disappoint me smh
😔
¯_(ツ)_/¯
Exactly
hmmmmmmmmm
Guess I like json too much
Does gson know to convert an array of objects to a list without having to tell it how to?
I think so
"payments": [
{
"txn_id": "abc0asf5",
"time": 1561124237,
"price": 4.2,
"currency": "USD",
"status": 1
},
{
"txn_id": "X-ABA123-ASDK8374",
"time": 1561123598,
"price": 4.2,
"currency": "USD",
"status": 2
}
]```
`private List<Payment> payments;`
ok it does, sweet
any idea how can I turn this into a map?
"purchaseTotals": {
"USD": 771.22,
"GBP": 150.94
}```
Okay I'm doing
public void SetOwnerName(String OnwerName)
{
this.OwnerName = OwnerName;
}
public String GetOwnerName(){
if(OwnerName == null){
return "No Owner";
}
return OwnerName;
this is in another class
And in my main class doing
Sat SatCome2 = new Sat("Hey");
SatCome2.SetOwnerName("Amir is the owner");
System.out.println(SatCome2.GetName());
System.out.println(SatCome2.GetOwnerName());
And I get in the output
Hey
No Owner
@vast ore your setter has a typo in the parameter name
You're assigning OwnerName to itself
Any good IDE should've noticed that
Also variable names should be lowerCamelCase
sat?
Sars
SATA
So I've got a slight issue, when I turn on my pc normally, it's unresponsive (keeps loading something but I've no idea what since it's slow af), and when I turn it on in safe mode it works perfectly fine, so I'm guessing it's a program that's being a cunt? Any suggestions
consider using a cunt eradication tool
lmao
a sledge hammer to the computer usually does the trick
I'd happily do that, but no, there's gotta be a less brutal way
guillotines are meant to be painless right? quick and easy, less brutal
just slice the laptop in half
What confuses me is that it was working perfectly fine yesterday, and now it's acting up
you any closer to buying a new pc?
anyway to actually help, try running some windows diagnostic tools and shit
might find a problem
I can't lemmo, it's unresponsive, the mouse works just can't click any programs or do anything
It's loading somet
Something*
@quiet depot I'm not no, rona keep fucking shit up
did you update a driver or something?
Not that I'm aware of
And looking through installed programs, none were updated this week
Does anybody know if there is an which one is the best MCP help server
I realise we can’t share links here but a name is all I need really
what u talking about gaby?
"Mcp"
mod coder pack
Uhh
if op meant pocket edition, surely they would've said "mcpe"
Anyways, is anybody familiar with moodle api? It uses php and I dont know php and the docs are kinda weird xd
@oak coyote don't know of any mcp discord, I'd try asking around in forge/sponge
alright
(forge doesn't have a discord btw, but they have a forum)
thanks cause honestly i'm losing my mind i can't get it to find new assets
Why do people use PHP 😭
Because they have suicidal tendencies
Thank god moodle has a mobile app
ew moodle
The app itself is actually pretty cool, esp when teachers know how to use it
what is moodle
It's an online site for school assignments and shit
Someone can give me a hand? i developed like a repair kinda plugin, but when using the commands, this exception comes out: https://pastebin.com/GMV01eLX
the bot is offline to give me roles is there another way I can get some help?
@fervent obsidian tokenrepair.java:157 is null
also please use helpchats paste in the future its a lot nicer to look at lol
?paste
Paste Services
When asking for help with a config/menu/code issue please use one of these:
(However we do prefer if you used our paste :))
• HelpChat Paste - Usage
• Hastebin
@fervent obsidian
tokenrepair.java:157is null
@surreal quarry The line is null or wdym?
also please use helpchats paste in the future its a lot nicer to look at lol
@surreal quarry Okk i will
A member of staff has requested I move your pastebin.com paste to our paste.helpch.at!
I gatchu with the paste
cube should let like tier 5 + and nitro boosters use that lol
https://paste.helpch.at/cakaqemeju.java (As u can see im not that good at developing)

The inventory of the player returns Null
Don't feel down, we all start somewhere man.
Btw my "no" was to james' message xD
i dont think having a jugadorIntroducio variable is what you want
i think you want to move that variable inside the commands themselves
or at least reassign it for each command
"jugadorInv" is my players inventory, and "jugadorIntroducido" is a name of a player
jugadorIntroducido is wrong assigned right?
do you want those to be changing for every command, or are you trying to assign them once and they never change
I want to assign them in every command, i forgot to reassign "playerIntroducido"
u are right
I cannot do "jugadorIntroducido = (Player)args[0];"
You don’t need getServer() but that’s correct ^
true
jugadorIntroducido = Bukkit.getPlayer(args[0]);
That looks right
Ok, let me try it 😄
but remember getPlayer can return null
so its a good idea to have a null check there
player = getPlayer(...)
if (player == null) {
// no player found message
return
}```
Like Players will have to click on an npc, for making the console to run the command, so i think it wouldnt be null
or im wrong
?
Maybe
Bcs the player who clicked on the npc is online
but either way its still better to check
@surreal quarry Okeyy
The player might log off
so its a good idea to have a null check there
player = getPlayer(...) if (player == null) { // no player found message return }```
@surreal quarry This makes the code not run right?
the return alone
return will stop the method wherever it is and return that value meaning code below won't have a chance to run
also since this is an onCommand you may need to return false
cause spigot didn't want to make that a void :)
Look at my lines 154 and 262, do u mean that returns?
return false should imply that the sender doesn’t have permission iirc and it will in addition send an ugly message to the sender. However return true should represent a success of the command execution.
i think false is just in general it wasn't a success
Hmm yeah I don’t remember, was like 6 months since I compiled
but most people do their own handling of that so i feel like its just extra
Okkk, im trying it wait me 1 sec
What if we could have Unit in java
isnt Unit just void
what if java was good 
returnable void
unit is just void afaik
returnable void
yea i think of them as basically the same
kind of sounds like its making a new Unit object for every void method 😦
Why does this
if(!event.getAction().equals(Action.LEFT_CLICK_AIR) || !event.getAction().equals(Action.LEFT_CLICK_BLOCK)){
return;
}
Not cancel a PlayerInteractEvent when they throw a snowball?
#development is the support channel. also thats not enough code to tell :)
Firstly use event.setCancelled(true); second compare enums with ==
also isn't there a projectile launch event
yeah! But this is for reloading snowballs in a paintball
There is
?paste
Paste Services
When asking for help with a config/menu/code issue please use one of these:
(However we do prefer if you used our paste :))
• HelpChat Paste - Usage
• Hastebin
we dont do screenshots lol
I havnt read through this
But pretty sure that event fires twice, once of left hand, once for right hand
Oh nevermind just read your code
yeah! It kind of does, when I throw a snowball it triggers the "no left click" and then also reloads the snowballs
okay! I will use == 🙂
Hmm I don’t know but I think setting it cancelled doesn’t always have the effect of “cancelling” it you might need to set the result instead
so event.setcanceld(true)?
Yes
If you want to cancel the event use that
return; will just leave the method, but the event will still go to other plugins
cancel will as well usually
alright
listaItemsInv[i].getType().getMaxDurability() > 0 this can return NULL?
After checking if the item is or not null i mean
No it won’t
anything that returns a primitive type will never return null and can’t never be null
and left click doesn't work eather
@steel heart ok thx
@nocturne dock wait can you explain what functionality you wanted?
4head
Okay! This is a paintball plugin, I want it when I leftclick with snowballs to run the plugin.gameManager.gameFunctions.addSnowballs(player) method. When I right click snowballs I don't want that method to trigger but still want the snowball to be thrown

check if the event has items involved, check what item. If the action was left click do something
First 2 checks could be used with an implicit else design
well isn't that exactly what I did?
👍 Implemented that now
Don’t use the implicit else design to check if the action was left click
well, for me there is basically always an item in the event, cause I am holding snowball
The event is fired independently though
with this code https://paste.helpch.at/acuboyetoj.cs it only reloads when I throw a snowball
//listener
if (!event.hasItem()) return;
if (event.getItem().getType() != Material.SNOWBALL) return;
if (event.getAction() == Action.LEFT_CLICK/*you check both*/) {
//todo
}
``` I was thinking this
But I think you should have switched the || to &&
kind of sounds like its making a new Unit object for every void method 😦
@heady birch it's not
because it was just checking if it wasn’t a left click air nor a block, not both
They compile to return void and just use Unit.INSTANCE if it's actually needed
@steel heart umm, how can it right click air and a block at the same time?
So here ```Java
event.getAction() == Action.LEFT_CLICK_AIR || event.getAction() == Action.LEFT_CLICK_BLOCK
That’s why you use || to check if any of those are true, in an implicit else design you would have used the && to filter
Make it return a Material and see if it’s a snowball
Like I have already? ```Java
if (!event.getMaterial().equals(Material.SNOWBALL)){
event.setCancelled(true);
return;
}
yeah but don’t cancel and use != instead
also event.getItem.getType returns an Itemstack
@nocturne dock will return a Material right?
getItem returns the ItemStack afaik
Alright!
This is my code https://paste.helpch.at/xerohevasu.cs At leads it reloads on left click now, but it still reloads when I throw a snowball
when I throw a snowball it even reloads twice exactly at the same time
Why in the world does Spigot count throwing a snowball as left click?
That’s weird wth
Amm im not understanding why when using these jugadorIntroducido.getItemInHand().setDurability(jugadorIntroducido.getItemInHand().getType().getMaxDurability());
The durability of the item turns "0"
The durability is "the wrong way around"
0 means it's not damaged
10 means it has 10 durability points less
Im trying to repair it
jugadorIntroducido.getItemInHand().setDurability(0); ???
Yes
Like thise?
This*
Okk
thx
Is throwing me this exception Error:(73,55) java: incompatible types: possible lossy conversion from int to short
Ok nm i parsed it like a short value jugadorIntroducido.getItemInHand().setDurability((short)0);
@quiet depot So I left the pc for a day, and now it works as it should again, I'm confused
Also if anyone has any "semi" large repo's I could contribute to lemme know I need 2 more PRs :C
Hell naw
hey I can do it and have very little java experience
kek
i'm physically shaking
I think I have accidentally removed all collaborators last night O.o
a server that I've contributed so much to
please pig .. 😭
(out of curiosity why was I in the org? I honestly don't know why)
forgive me
@hot hull https://github.com/lucko/LuckPerms/issues/2676 ez pr
I think I have asked you once for your opinion, I don't remember
¯_(ツ)_/¯
do you have the code used by pinger?
Piggy I mean.. if only the fucker showed the entire stacktrace
is the server log not full?
Did not even see the server log eee
Caused by: java.lang.ClassNotFoundException: net.kyori.adventure.audience.Audience
There's your issue
no
Gimme 40$ now
I assume he's just not shading it
velocity shades adventure
try reproduce the issue with the latest version of adventure
I have a sneaky suspicion op isn't using the latest
Ain't got a server
friend is switching hosts so
He pays for his server, and I use his server


