#help-development
1 messages Β· Page 290 of 1
Yeah, it's pretty good, also saw it from there
There's a lot of people backing it up now
However gradle still sucks
It's CSS + Emmet
was it the post about chatgpt?
/etc/maven/settings.xml
YEP!
lool
If you are a windows users, idk where that setting is located at
You'll want to remove
<mirror>
<id>maven-default-http-blocker</id>
<mirrorOf>external:http:*</mirrorOf>
<name>Pseudo repository to mirror external repositories initially using HTTP.</name>
<url>http://0.0.0.0/</url>
<blocked>true</blocked>
</mirror>
Global maven config
For that PC that is
You most likely can use envvars, but don't quote me on that
I've always done it through /etc/maven/settings.xml
no idea if you can do that
maven wrapper 
I honestly think the concept of a buildsystem wrapper is disgusting
It exists - blieve it or not
Someone should not need an additional tool to download the "correct" version of a build tool
sometimes its just about being portable i think
With gradle that is deeply necessary
With maven not at all
Perhaps gradle is how it is because of it's wrapper? Perhaps it's the other way around
Is there a way to make maven ask for these "requiredProperty"s even though I gave a default value, when running it in interactive mode?
Never worked with archetypes myself
actually using archetypes smh
The daemon is an alright concept though.
If it were less broken then it'd be much better.
how did you survive for 20+ years without using archetypes?
well i only used maven for tops 6 months out of the 20 years
Copy pasting the poms from project to project?
They are rarely exactly the same that it'd make sense to create one
my problem is that it simply assumes the default values when I defined one, and only asks for properties I didnt include default options for
personally i am a fan of starting from the ground up every time
that's why I use archetypes
java 8 
hat are archetypes
like project templates
Imagine giving into Big Archetypes
Oh that's neat.
mc dev plugin
hi
e.g. if you say "useNMS = true" then it automatically includes "spigot" instead of "spigot-api" and if on 1.17+, it also adds the whole remapping stuff, etc
true
Somebody set my state to tired
archetypes are awesome
So I can go sleep finally
vodka can help
Ahhhh ok
Archetypes have been here for as long as I have worked with java
I meant that my spigot-plugin archetype is just a "beta" yet
Ah
I gotta wake up in under 4.5 hours fuck this
it works fine right now but it's still missing a ton of features
Vodka vodka
Also, I advise against calling it maven-spigot-plugin
tbh I find it easier to just create it from the ground everytime
Because that implies that you are writing a maven plugin AND that will never be approved on OSSRH because it is prefixed with maven-, which is reserved for maven plugins written for maven
archetype-spigot-plugin
spigot-plugin-archetype?
Whats the problem with it then
Because when I first looked earlier today at it I thought it was a maven plugin and though "neat, but what does it do?"
spigot-plugin-archetype ezpz
Ah ok
yeah idk
I mean it's kinda redundant to add archetype again
-DarchetypeArtifactId=spigot-plugin-archetype
that sounds weird to me
archetype-archetype :)
that's what I used to create it, yes
dont most of the maven archetypes suffix -archetype
no
they start with archetype
archetype-archetype-archetype tho?
hmm
that's why I originally called it "maven-archetype-spigot-plugin" or sth
because it's a maven archetype for spigot plugins
but yeah that's weird
it'll be either "spigot-plugin" or "archetype-spigot-plugin" or "spigot-plugin-archetype"
but as usual, I cannot decide and will probably just go for the shortest name - "spigot-plugin"
idk
it's your job to tell us what the problem is
and then we can see whether we can tell you how to fix it
but doing it the other way around makes little sense
btw I really hope that "getDataFile()" does not do any I/O
can you compare blockA == blockB
ofc you can
FUCK
what "lights up red"?
well but you should not do it
it always returns a new BLock object
so ofc yo ushould use equals()
well I just spoke to ChatGPT and it is CREEPILY lifelike.
ah thank god
either that method does not exist, or your theme is really confusing. you should always use the default theme imho lol
does it complain when you compile? If so send the error message
did you actually declare any "getDataFile()" method?
in your main class?
If no, then obviously that's the problem
How do I add WorldGuard as a dependency for my project? I need to use stuff from within it
are you using maven?
or gradle?
or none?
fuck IDE's
I build my Java projects with Make only
notepad ftw
a
Right, I only know how to add stuff it if gives me the groupid and artifact name so yeah lol
oh
thank you
then do the same for worldguard
I can't find the info for worldguard though
no, there are garrysmod servers for that
HUH
Where my DarkRP enjoyers at
you are not, I also find their website extremely confusing
I just always google "worldguard maven dependency" to find it
where can I find this
no i dont really play games
just join some random wiremod GMOD server
the ones without VAC
thank me later
what if I don't want to play Gmod
then there's no mech pr0n for you
fuck
O_O
D.VA
i couldve sworn there was a regular emoji for that face but i cant find it
so when in doubt emoticons are ur friend
sadly
the recent emojis are...
i like π₯Ί better

odd
can i have this emote
for a friend
sure, just join the PH dc
damn... invite?
dm
Actually a good feature
but what do you mean
reject pornography, return to war.
works fine from the phone, but joining is only possible on desktop
I can't stop reading the word "pornography" in the TF2 Spy's voice
PORNOGRAPHY STARRING YOUR MOTHER
cue bass-boosted laugh taunt
its interesting that it's blocked since both discord and apple have my real birth date on file
and would both know im of age
well they don't give a shit they just don't allow 18+ content afaik
yeah :(
Chads
discord thinks i'm 26 but somehow i'm still underage
And it is right, I'm not 26, but it has no way of knowing >:(
are you sure
because you just told Discord, via using Discord, that you're underage
no, i am 78 trust
As long as you are not under 16 it should be fiiiiine
I am not under 16, no
Or as long as you live in the US and are not under 13
Though if you are in north korea and you are under 18 you'd be up to some trouble
how dwo you know what age discord thinks you are?
Because I always register under the birthdate of 28/05/1996
in everything
since I was like 7 lol
I just scroll until I get to 2000 or lower
I put my birthday, but in 2000
got like 3 months left until I can finally just put my real one
mans 13
I always said that I was born in 2005 - outside of waaaay before where I wasn't able to do anything
Though I believe I did trol spigot a bit there
Think I am also born in 1996 there
I am actually a 2005 kid :/
2005 best year
It's really the last year where one can experience most of the nice things of old
yas
Heβs in your dry walls
mine are cement tho
dry walls are too US
yeh we don't use drywall here
you make it too easy to find
Oh mb US stay winning
oh noes
'twas born in 2006, raised on VHS tapes and pirated movies
full name, country
I am the only zoomer who has actually watched a VHS tape
Therefore I am the only zoomer who can appreciate the VHS aesthetic
I can try stalking you and I'll probably find your mom's facebook page
Most likely ngl
honestly yeah I can easily find your age online
you're careless
May 28, 2005 (Age: 17)
Not careless, I just don't really mind it
I honestly can't find myself online
I've tried
Through your portfolio maybe?
yeah you can't find me either
Hello friends , anyone know why this dosen't work ?
iam loading the prestieges when server startup :
my problem is with load method specfficly the setPrestiege :
if anyone have anyidea on what can do this , it make a null profile after i leave & join .
when i remove the setprestiege from load method , it works without Prestiege in the system ..
'please don't tell me to upload the code on paste-bin or somthing.' ..
i have been stuck with this error for the last 2 hours .. i checked every peace of code in the plugin .. .
you can find my brother's linkedin
wrong channel
the only pictures of me online are from my mom
which I wish she wouldn't post
its code related xd?
I don't have any connection to her so you'd really need to know her name
lol
its oky
could you take a look? i have been stuck at this for the last 2 hours , almost pulls my hair out of my head
does anyone know how I can access java classes from within VTL in maven archetype templates?
sorry no idea ,-,
do you cache the profiles in any way?
yes i do ofc
idk why it does that π¦ , i dont want to leave it , its a must thing to have in skypvp π¦
the problem with archetypes is that they only either let you embed VTL into the files, or run a groovy script. both allow to access java classes but I hate groovy
yes me too , but never have the time to finish it xd
soo do i need to make a thread in discord to discus it more?
it can't hurt to create one
although usually noone answers in threads
i just don't understand why its does not work as it should be .. π¦
what exactly does not work as it should?
did you see the code i posted?
the two screenshots ,yes
this
if you didn't understand the problem i will explain it ..
wdym with "null profile"?
what is "profile"? Is that your own custom profile class, or are you talkin about the builtin PlayerProfile class?
yes my custom profile
oh then no clue. Indeed I would need the full code on github π
It's hard to troubleshoot problems with custom classes without having the full source code
ok so when i get a new prestiege , log out to save it to sql , i login .
it stop working the load method dosenot work ..
this is how its saved in the json file :
footage of a programmer going crazy ^
true
its oky , i will figure it out today or tomrrow .. its already 2 am ..
Hi, I'm trying to access BLOCK_STATE_REGISTRY but I just came to find out this is deprecated from an older version of net.minecraft.block.Block but I can't seem to find the new implementation of this method, any one who knows?
what's your version?
good night
1.19.2
using mojang mappings?
What are you trying to do with the registry
I want to get the block state from a state id, found multiple examples that used the registry method but this is now depricated
the registry is centralized in net.minecraft.core.Registry
Eeeuh... Not that I know?
Why are you using state ids
can you access a class called "PacketPlayOutEntitySpawn" ?
Or is it called "ClientboundAddEntityPacket"?
If you have classes like "PacketPlayOut..." you use spigot mappings. If you have classes like "Clientbound..." then you use mojang mappings
what is a "state id"? can you show an example?
Because I'm trying to create a plugin that messes around with packetsending, and creating ghost blocks and stuff, but for that we need the state id
Mojang mapping
that's good
yeah you can just do Player#sendBlockChange or sth like that
^
You could also use a packet library like PacketEvents
Example of the the state IDs, the states>ID is the one I'm trying to get
Never heard of it, I'll research it
I'd use Protocollib since it's more commonly used and already installed on most servers
I use protocollib π
But even with protocollib, the mapchunck packets aren't fully written out yet in their latest Dev version (1.19)
So I'm trying to get around that and thus found the BLOCK_STATE_REGISTRY wich offered a solution but is now sadly depricated and so I am trying to find its replacement
Go make a pull request
You sure those ids still exist
These are exported from the last version of spigot
So yeah
How do I make my function show the outline of the schematic that is going to be pasted even if it's clipboard has a transform to rotate it?
hi, how to clear 1 specific item in 1
As far as I know, I have everything installed worldguard related, however, I can't access the WorldGuardPlugin class for some reason.
Help?
Yeah
The issue is there's none
yep
i'll do it again just incase
1s
Yeah i needed maven clean & install
Thanks! I'm stupid.
That's the plugin I was talking about
I linked my old message. Sorry for taking so long, I was a tad busy
Top one is "Commons"
So like, the Spigot-1.19.x module has commons as a dependency, and commons has worldedit and guard as a depdedency too, however, Spigot-1.19.x doesn't inherit those dependencies. How do I make it so without duplicating them?
I should mention that worldedit and worldguard are set as provided
Sorry, I don't understand
How to handle updates, like changing the values in database, i need to use sockets or smh?
I meant more like chaning values via web like for ex luckperms
Luckperms has a webserver
When you are done doing stuff you run a command ingame which fetches the permission changes from the link you give it.
+1
but it sends data to the server
so how to fetch it
i meant the spigot part
not webdev
i can handle it by myself
?
I told you
The link you give it
Is an api call
Which quite literally gives the plugin anything it needs.
Itβs get request
To send it uses a post request
All a webserver with an api
The plugin just uses a post and a get request
go touch some grass
@formal bear itβs 1 am
I UNDERSTAND THE REST API PART
Yeah? Whatβs the issue then
Get to retrieve from the server
Post to send to it
.
There many ways to use post and get webrequests with the web
Itβs not spigot dependent
Google your question before asking it:
https://www.google.com/
does any1 have any suggestions on how to setup a simple mission/achievement system. what would be a good way to abstract such a system?
just remove all mc achievments and create your own lol
naaaa i need my own system
Hereβs a simplified version:
Here's one way you could set up a simple mission/achievement system in Java:
Create a Mission class that represents a single mission. This class could have fields for the mission's name, description, and whether or not it has been completed.
Create an Achievement class that represents a group of missions. This class could have a field for the name of the achievement, and a list of missions that belong to the achievement.
Create a MissionManager class that is responsible for managing the missions and achievements in the system. This class could have methods for adding new missions and achievements, marking missions as completed, and checking to see if all the missions in an achievement have been completed.
well you could do this lmao
okay. thats simple enough but the hard part of missions is
where & how do you handle the completion
events
sure. but i probably have to create a good system to abstract that. i dont wanna create a random events everywhere
in the mission class you could create a listener
and register it
so you have custom listeners for each class
dunno if this is good
Iβd probably do completion terms and have a global listener for each event that can complete a mission.
ye and just pass that event to the missions?
I mean sure, that is one way. Youβd usually want to offload anything not a mission from a mission. Like why does the mission need to know anything other than if it is completed or how to complete it.
how do you store "how to complete it " tho
enums?
not sure what you mean by that
the way a mission can be completed can be vastly different for each mission
Give me a second. I'll write up an example of what i mean.
sure. thank you.
how can I get the line number of a ConfigurationSection?
for what do u need the line number? :p
you uhhh. still writing there mate? haha
xd
Api does not provide it
you can search for methods and stuff here btw https://hub.spigotmc.org/javadocs/spigot/
to tell the user what line is wrong incase there's an error in the config
ah
just tell them the key?
i was gonna do both
key is missing or invalid or something
well you could read the file content and search for the line of the key
Yeah give me a few more seconds.
sure!
alright
Idk, something like this: Note it can be optimized and made look much better, it's 2 am and i was just going for an idea.
https://gist.github.com/JanTuck/57d9667fc38ee5e0eebe75c00b7658bf
wow. you really went all out for me haha
thanks alot. i think i can make something work with this idea
not entirely sure what ur going for with "taskInformation" though
does that assume every mission has a Material associated with it?
No it was just a fast placeholder.
Supposedly you'd also do some generic stuff with that
why is my string from config.yml in [] in minecraft?
right. make sense, thanks
How are you getting it?
private Plugin plugin = PluginMain.getPlugin(PluginMain.class);
String messaggioKit = plugin.getConfig().getString("kitMessage");
sender.sendMessage(messaggioKit);
And what do you mean it is i bracket?
yeye
how is your config looking?
do i have to translate into english or is it fine as it is?
its like 5 lines
#File di configurazione del plugin.
kitMessage:
- Ti Γ¨ stato dato il kit Starter.
rules:
- Non Grieffare
That's a list my good man
Might even want to throw some ' or " around it. Though it should be able to parse it without.
wdym
sorry, i dont get it
still same
like u code if u have a string you put " before and after it
so the program can parse it right
message: "test"
message: test
Did you edit the config in the correct place and restart the server properly?
used /reload
and which config did you edit
the only one
where is that located
src
do you copy it over to plugins/?
ahh
saveDefaultConfig is a shortcut to it
didnt know
right after the instance?
I am going to bed, please tag knuffeliger, he seems to also know how to fix this issue. Though saving the config is not the issue for you atm.
@rotund ravine sorry for the ping. but shoulnt this be changed to generic type 'U' then?
k gn
did you send your code somewhere? wanna see it
Yeah
thank you
Easy spot nice.
yea then i think i understand what ur going for. thanks alot for typing that all out 
No worries. Achievement does def not need to be an enum btw, that would look dumb if you needed to add all of it in there.
hmm how else do you propose i register them
this is the class of the command
I mean an enum is fine, i just think it might look a bit dumb with 200+ achievements
since this is for a private server its fine if they are hardcoded btw.
Then itβs probably fine.
thats not what i ment T^T
I didnβt read what u said haha
I just made some abstract stuff
how would you approach that if it were for 200 plus achievements tho
@tall dragon Could have classes for each achievement that extends abstract achievement.
i meant with an enum the type of the mission to complete
like BREAK_BLOCK or PICKUP
I implemented that already.
Well sortof
yes i just defend myself T^T
did you find anything?
well can u send your error too? xd
there is no error
ah yh. well thanks will expand a bit on this.
Heβs getting the string in a listformat tostring somehow
in my config the string is "abc" but in mc it shows up as [abc]
you have a list
just get the item with #getString();
and dont save it as list save it as string
thats how to save a string or a list
string: "test string"
list:
- element1
- element2
it is saved as a string
#File di configurazione del plugin.
kitMessage: "Ti Γ¨ stato dato il kit Starter."
rules: "Non Grieffare"
u sure u updated the config?
okay so can u make a check if the returned object is a list or a string?
well it doesnt make sense what im trying to do
cuz it is yml to java?
nah
it should work actually
so are u 1000000% sure its a string in the config?
PLS HELP ME @rotund ravine
@ionic thicket look in your plugins/ folder
.
well
go ahead then
fioua4erbnos78r5znu5b4e78iruzhgne5rlohg5u4eh
why hasnt it changed when i built the project as it did the first time
bcs it doenst overwrite it
@ionic thicket It does not override defaults after it has copied it once
yeah you are 100% sure lmfao
thank you
hello, i have recently started to make a server and want to have multipule diffrint gamemods the first of witch being a csgo/ search and destroy plugin. dose anyone know a good one that has active devs that can help with issues
?
Google your question before asking it:
https://www.google.com/
if you want CS:GO just install it from Steam.
Depends if you're looking for a "same server" based plugin or having "different servers" for each lobby
Depends if you're looking for a "same server" based plugin or having "different servers" for each lobby
It depends on how much lobbies are on each server
i just wanted to say that the amount of servers are not relevant T^T
Still matters.
not really
Some plugins work as a one server only and maybe he wants a multi server way.
If you have less than 100 players, you probably don't want to have 10 main lobbies.
just 1 or 2 more things but not that important
if u join a server with the plugin just start the lobby routine yk what i mean
can you explain more on this? do you mean different server as in different ips or different worlds?
you can have multiple server on 1 root server => ip address
oh i didnt know that can you send me a video on this? or how would i find my own video or articles on this?
Google your question before asking it:
https://www.google.com/
Bunge cord thank you
yw <3
maybe green=default?
Does anyone know about ClassDefFoundErrer?
My code is complied Successfully but When I call Class in onEnable() it always throw errors
?img
Not verified? Upload screenshots here: https://prnt.sc/
You probably didn't shade your dependencies
umm..
shade?
I've heard about that, but I don't know well π¦
How can I do that?
Idk a good resource but if you just google the error with shade and spigot there's tonnes of threads
Okay let me find it thx π
i need /hub (bungeecord 1.19.3, all Plugins Outdatet on spigot :/
What do you mean outdated
Nothing has changed, slashserver from like 2013 would work completely fine
i like how all of the recent reviews on this are like "holy shit how does this still work"
A lot of plugins work fine with updates, it really just depend what they touch.
They're probs just suppressed it can still communicate with bungee through bpmc
How can I simulate block placing for worldguard?
I need to trigger the event somehow, using Player Interaction with Paper
use the worldguard API?
you can call an event, eg Bukkit.getPluginManager.callEvent(new BlockPlaceEvent(...))) but its not supported API and may cause issues with other plugins
okey, thanks
Anticheats will freak out if you do this on blocks far away
Hey guys. Intellij IDEA can only do 1.15.2 version for Minecraft Developement plugin, how can I fix this?
uhm
There should be more versions here, and I can't find solutions on github.
Im sure its not a big deal to just edit the version later
If I change the version in pom.xml, that should work?
yeah
Okay, thank you guys.
mc dev plugin π
bypass minehut restrictions
At college rn
What arguments should be entered?
BlockPlaceEvent(Block placedBlock, BlockState replacedBlockState, Block placedAgainst, ItemStack itemInHand, Player thePlayer, boolean canBuild, EquipmentSlot hand)
check the javadocs
declaration: package: org.bukkit.event.block, class: BlockPlaceEvent
oh, thanks
or let ij autocomplete it for you
This was something i created ages ago. https://gist.github.com/JanTuck/7d4d793493d92f78317315f0d8c1ff9e
Hmm
they limit player count
i wonder if i could use this to change the motd while offline
But what should I pass to canBuild? Given that I need to find out if the player can build there)
Place default true
If itβs false after it was disallowed
u dont have to send playerinfo packet for adding an npc, right?
just add player packet only?
in 1.19.3
wat
my patch files will only work if u build a custom spigot jar and can then upload said jar to minehut btw
yeah i realised that as you sent them lol
but i just got an idea for a plugin that should be able to do it with just bukkit events
luckily i can change the jar
woo
nvm
how would i pathfind for an npc
I would use the Citizens api
@remote swallow π
why
Why not
notepadd++
i dont use np++
does vscode not use way more resources than npp
Vscode uses a bit more resources but it's generally fine
i have more than enough ram to handle editing a single file
i use sublime text
I also use VSCode as my text editor
what about 40
trying to use chatgpt to implement pathfinding rn π©
When do you ever have 40 files open
when i forget to close them
i dont even get to 40 files open on a real IDE smh
Just use Citizens
and not realise npp has multiple open page tab thing
i could but i want to look into i before i use a shortcut
vsc usin like nothing rn
damb
i dont like multimc
You really shouldn't use ChatGPT for that
i dont like multimc because of multimcs prime function
I use MultiMC as the vanilla launcher broke long ago on my PC
its good if you use mods and different versions
wooo
for Devs it's great
i play vanilla :v
the essential mod did bring this like functionality to the default launcher
or well just performance mods
multiple accounts at teh same time, easily
yeah
each version got its own mod folder
it would probably still break cross version though
because mojank
its mainly to help me learn the pathfinding algorithm
A*
so i can implement it
A* isn't so easy to implement in MC as it's 3d
look at citizens code
true
Is there a way to prevent falling blocks from being placed down when they land?
ah fuck, i forgot to kick if the servers "full" and plugin max-players is less than server.properties max-players
RedBlobGames has a lot of great guides
Highly recommend
Does anyone know about NoClassDefFoundError?
I didn't do anything but It occured when On Enable() called
?img
Not verified? Upload screenshots here: https://prnt.sc/
show the error
?paste
It usually happens when the class you're using doesn't exist
Is that your class
Obviously It exists
is SkillsManager part of your package?
@alpine urchin packetevents π
Open the jar and make sure it does
Okay let me check
It exists but there are other .class files
SkillManager, SkillManager$1, SkillManager$2
yeah It is
That's normal
umm...
Make sure the package is correct
What does mean package is corret?
And classes should be PascalCased
There is no problem in package location
sry but what is pascal cased?
The definition of PascalCase defined and explained in simple language.
?jd-s
did you reload or something
Ahha It may be cause. let me check it thx π
I didn't realise it was called that, had been taught at school CamelCase and lowerCamelCase
no
CamelCase usually defaults to lower camel case
thats weird
yes
everything is open source if you can read assembly
The head is lower
whos that
OMG IM IN LOVE
thicc
haha "fluffy" my name
oh mojank, why did you ever move on from the old jar launcher
nothin
cant the old launcher not work with the new jsons
or are u using the non-microsoft store new launcher
yeah i think they had redone the jsons at some point and so the old launcher doesnt have the right object models for them
true
why
i have a copy of the old .jar launcher, one day i might try and decompile it n then do some rev-eng to try and make it work again
i just miss the old launcher
@remote swallow paper beat me to the patch πΏ https://jd.papermc.io/paper/1.19/org/bukkit/Server.html#setMaxPlayers(int)
declaration: package: org.bukkit, interface: Server
murder them
true
when was that added
i wonder who you would have to remove from paper for it to die
1.16 is the first time setMaxPlayers shows up in javadoc for paper
so i guess thats when
Can still add it to spigot
ye
So long u don't copy papers code
what if paper thought the same way she did
Very unlikely it's a line for line copy tho
true
why would you not want to make an account'
the CLA is scary
i can see not wanting to sign the cla but whats the problem with a jira account
doesnt it say like ur real name will be visible somewhere
?contributing
?contribute
wasnt there a comamn for this
if you sign up on jira with it yes
You can find information about contributing to Spigot at the following links:
https://www.spigotmc.org/wiki/cla/
https://www.spigotmc.org/wiki/guide-contributing-to-spigot/
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/README.md
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/CONTRIBUTING.md
bots just slow
o
you can sign up on jira with any name
only the cla has to be accurate for name ithik
what the fuck does this say
inlernly
maybe you are a robot
can you read what that says
beep boop
that sounds like something a human would say
Anyone can check this out?
https://github.com/TechFortress/GriefPrevention/issues/1794
So Since the server got upgraded to 1.18.2 most of the features just broke...
Q] Do you know what changed in Plugin Configs from 1.12 to 1.18 that led to quite a lot plugins starting to break
submitted CLA now we wait for Stash account π
wot
how
it took mine 4 days and an email to support
which seems to just be md
Choco can probably-- yeah
is there a way to make maven ask about requiredProperties during mvn archetype:generate even when they have a default value?
Google your question before asking it:
https://www.google.com/
Smh
why does this cause Hopper to break itself?
wdym with "break itself"?
imma rec it
:(
Btw @remote swallow, Did you start coding Java and Spigot together?
oh probably due to WorldGuard
just found a post abt this
fuck
that's a pity
although that issue is 14 years old
might have changed meanwhile π
yes
it was a bad idea
why so :(
i had no java knowledge and was trying to use that to make a plugin
that won't work
How good do you need to understand Java to actually code properly
it depends
though, can you help me with my question, im lost for hours lmao
Hey guys.
yeah whats up
here @remote swallow
let's just hope that this works lmao
I am trying to develop a command plugin.
I am trying to make a similar command to /me
It's called /try
for example:
/try hit someone
and a random decides if it was successful or not.
My problem is, I do not know how can I make a similar thing like Convert.ToInt32(Console.WriteLine()) thing in minecraft chat method.
edit: /try <text> <--- i dont know how can i make an input for the text.
what is that Convert.ToInt32 thing supposed to do? o0
C# methods
<text> will be the args[] array in the onCommand method
a decent random way is use thread local random to gen an int between 1-100
I just used tha for an example.
if its greater or less than your percent amount run code
for example:
/try my name is jeff
in onCommand, args[0] will by "my", args[1] will be "name", etc
if that's what you mean
what version did you use in 1.12?
np
1.12.2
if you need it as full string, you can String.join it
i mean plugin version lol
e.g.
String.join(" ", args) will be "my name is jeff"
let me see
oh wait hang on ur telling me that fucking code will create a random int? the Fuck?
GriefPrevention version 16.18-RC1-4-gfb75955
i almost exclusively use int.TryParse in c# and couldve sworn WriteLine is just a void so i am Confused
Can I write you on dms?
please don't
"NO SUPPORT IN DMs! Please use my server: https://discord.jeff-media.com/"
lul
my server
this line, how should it look like ?
yeah
like this
where should I put String.join(" ",args) ?
their entire code base is just a mess and i cant figure out where they actually store data, best option you have is save your old config then delete the config and let the plugin regen it and then copy the old settings
on a String
alex is probably writing something
well where you need it
after /try <args>.
I mean, I don't know exactly how the syntax looks. What is the order of putting things, etc.
example
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
String text = String.join(" ", args);
sender.sendMessage("You wrote the following text: " + text);
return true;
}
Im bad at understanding, could you detail it a little π
np!
without looking at it: might be the changes done to Material
the way that plugin is coded is just insanely poor its very hard to find whats needed so ive got no idea what would have changed in it, easiest way i can say to fix your issues would be is to regenerate the config from new. save the config you want to use then delete the one on the server that has the plugin installed then restart the server to force the plugin to remake its config
then copy the settings from the old config to new
following format
does the existing data get lost? allthe claims etc
if you only delete config.yml no
if its stored in an external db you would need to put the info in again
So I tried it, but it just returns an emptiness.
What I need
/try <text>
Output:
*Name has tried to hit someone and it was successful/ it was not successful.
The thing is, I do not know how to put together the command with the String text, and make it look like the /me command in the vanilla mc.
I can't even find the /me command source code so idk what to do.
The pic.
what's your code
rn
That wonβt run
Hey, i'm making invisible armorstand every 1 tick change the head direction to the right.
and i recognize that my server is laggy every like 2 mins is that from the 1 tick runnables?
Depends take a spark thingy
you are checking if the command name is "try <text>"
it will never be that
also comparing the command name is useless anyway
just delete the if(...) part, it's completely useless and just plain wrong
the command name will always be exactly "try" and nothing else
is there a way to execute a code on plugin disable from outside of the main class without it's onDisable method?
yeah, and that is OK.
Here is the /me
Listen to plugin disableevent
^
is it called if the plugin being disabled is current plugin?
I need to execute shutdown code of a bunch of objects which i do not currently register anywhere, and i wanna avoid doing that
I don't think so
well it is called, but your listener won't know it
What do you mean by you don't register them anywhere
i just create an instance with new and don't store anywhere
Uhhh
i didn't catch that? can u explain please?
Not even in the class you created it in?
If you need to cleanup something later, you should store some reference to it
Thank you, it worked, didn't saw that earlier
Hey, i'm making invisible armorstand every 1 tick change the head direction to the right.
and i recognize that my server is laggy every like 2 mins is that from the 1 tick runnables?
no
@fossil pike
tyvm
how would i check what item is consumed in playeritemconsumeevent?
cause i havent coded in a few months and cant do the basics
@fiery prairie https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/player/PlayerItemConsumeEvent.html
declaration: package: org.bukkit.event.player, class: PlayerItemConsumeEvent
Yea getItem but more like what do I put inside the () cause I tried a lot of ways with ItemStack(Material.Whatever) but didnt work
@fiery prairie just getItem()
Im using an if statement, sorry for the lack of details
}```
No.
That will always be false
getType() == Material.
I'm in the process of learning java and I now search a tutorial to learn how to use spigot to create plugin. Can someone send me a good, complete, well explained tutorial ?
Thx
Kody Simpson on youtube has a lot of tutorials (not the Cody that makes music or smth)
ok i will check, thanks