#help-development
1 messages ยท Page 521 of 1
whats the event?
Yes you can change the enum, but you will NEVER assign the same ID to different code.
no
you change one ID and you get ONE item which is no longer special
You seem to be ignoring NEVER REUSE AN ID
You can not account for other probrammers being idiots
You can comment yoru code is all
Nothing is idiot proof if you are allowing end users to modify your code
they could CTRL+A and delete,
oops your code was not idiot proof
If you create an ID of "FIREBALL" and some other dev replaces your code, there is absolutely no way you could programatically prevent that
Doesn;t matter if you use Int ID's or Enum.
Enum would be better and easier to manage
for ID's not teh associated code.
for the love of god don;t put your actual executable code in the ID enum
You'd end up with an Enum like we have in Materials
If you use an Enum for key other devs can;t mess up
if they add a function then yes they add to the Enum
Enum keys are unique
they can;t add a duplicate
and you use the actual Enum.name() not ordinal
if you used ordinal I can see your argument
which is why you use #name()
How do I reload the plugin
- stop the server
- start the server
can't I do it in the plugin?
create a command that switches the plugin off and on again?
you can implement something that does that I suppose
its not going to be the same though
It's OK. What do you have to implement?
you just have to reset any variables / listeners that you need
I have to restart the plugin's playerstats.yml
whats the difference between PlayerInteractEvent#hasBlock() and PlayerInteractEvent#isBlockInHand()
the first one probably gets updated after the event completes
what about if the block was an itemstack and was rightclicked in the air
no it's not the same. hasBlock() returns if you interacted with a block (right clicked a placed one)
then check the action
bruh what is this
Ass-pressure is crazy
user of the api
yes be we arent users we are devs
you are a user of the api
different context of user
and someone probably just wrote it without even thinking
How can i manually re-render a map whenever i like?
Without using a custom MapRenderer extending Spigots MapRenderer, in which the render function would be triggered every few ticks
I'd like to use a MapCanvas, but idk where i could get it from? do i just create my own?
and its been there for 10 years after
Hey I wanted to ask if anybody knows how to get a custom player head into an Inventory. For example the oak head with an "A" on it (https://minecraft-heads.com/custom-heads) or any other heads from that site. Thanks in advance
?jd-s
Do you know How can I update my scoreboard without create new lines ?
Have you found a better way to do it?
I've been searching for hours, but can't find any...
could i make it like if something.equal("true" or "false")
what are we talking about
You probably are talking about if (something.equals("true") || something.equals("false"))
|| is the booleanic "or"-operator (technically | (logical or) is also okay but noone uses that one)
lets just do Boolean.parseBoolean(something)
yep
thank you!
At this point you should avoid using strings for true/false types of questions and use booleans (or Boolean if you need to use them within a collection)
You mean boolean flags? Like --hidden for example?
Well for some reason they have something that should be a Map<UUID, Boolean> but always represents it as a Map<UUID, String> so I made them aware of the possibility of using Boolean
ahhh, gotcha. Makes sense
But out of interest, how do you guys make boolean attributes in commands?
Cuase I normaly use flags that you can add to enable/disable certain aspects of more complicated commands
lets give this to a 5 years old :)
Gotta love how the children are laughing at the proposition
"arm for kids" ๐
Seems weird to compile scratch into assembly but okay
I mean something has to do it
its really for kids
i remember the time i had to manually encode x86 into binary ๐ฅฒ
how do i get a players EquipmentSlot with PlayerInteractEvent#getHand()
Player.getEquipment.getItem(slot) iirc
thx
kinda weird question but if I have some files of my plugin that only get used when the plugin is used for a public server and some files that are only used for private servers, what do I call the packages to put the files in?
I cant create packes with the names public or private
wdym by "private servers," like you're allowing special features for specific servers that shouldn't be usable on other servers?
i'd question naming a package based on that tbh
That doesn't really make much sense imo
Release different version for public and use different for yourself
At least that is what I would do
yea. like in a multi-module project. have a premium module and a normal module or something of the sort, with a core module doing the major lifting
the moment someone forks your projects and makes the private features public ๐
I think it is more like dedicated server vs integrated server
that is still questionable
Though these two terms cannot be used in this context but the idea is the same
Yeah it's pretty vague, should probably wait for his explanation
let me explain myself
I am creating a bingo plugin where one half of my users want to just use it on a small server with a group of friends
I am 60% sure that they mean "open to public"-servers with public and with private they mean "server among friends"
and one half wants to use it on server networks
and now I have some classes and stuff pertaining to each part
but the names private and public were preoccupied by intellij or whatever
so I am just looking for better names
java. public and private are keywords according to the JLS
yeah sure
Does the plugin do the same thing on both?
generally
Then I have zero clue what you are asking
but I mean, the "public" version can manage more games at once for example
So you are talking features for paid versus unpaid?
How can i remove the delay from a shield like the paper api Player#setShieldBlockingDelay() ?
no not premium or anything
In that case name it after the most distinctive core feature difference
Though honestly that would still be ๐ฆ
Merge both into one package
Perhaps you can find multiple packages that are similar enough
Otherwise I can suggest the terms singleton vs networked
hmm
Can't you just make it always behave as networked
Let it be able to manage multiple games regardless
because it also has like stuff to set up so games can be played automatically and such
Even if it's only running one
PacketPlayOutPosition posPacket = new PacketPlayOutPosition(0, 0, 0, 0, pitch, Set.of(PacketPlayOutPosition.EnumPlayerTeleportFlags.a, PacketPlayOutPosition.EnumPlayerTeleportFlags.b, PacketPlayOutPosition.EnumPlayerTeleportFlags.c, PacketPlayOutPosition.EnumPlayerTeleportFlags.d), 1, true);
Whenever i send this packet, my player gets kicked with the message "Invalid move player packet received".
What am I doing wrong? How to fix? It worked fine in previous versions, but now in 1.19+ it seems to be broken.
anyways I will play around with some of the options yall have given me, thanks
Its meant to set the players pitch and yaw to a specific position while keeping his momentum which would be removed if i used a normal teleport packet
Maybe my explanaions helps? xD
Why are you not using remapped
how
?nms
Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.Inventory.getType()" because the return value of "org.bukkit.event.inventory.InventoryClickEvent.getClickedInventory()" is null
maybe just add an
if (event.getClickedInventory() == null) return;
Thanks, I did not notice that. I did see the clicked inventory was null. But I did have this check in my farm rod code which I going to copy to the gui
Was I halucinating when I thought there was an article on better GUI practices?
There is
there is no command
you need to find the article
its by smile
the reward for finding it is that you can read it ๐
Aye there it is
He made me smile as his approach was the same as me and a friend just did in a non minecraft plugin and were were here like "Wait spigot devs DONT do this?!?"
There is a article but what I have works. Code will be changed if issues appear
I got it
How give permission with a commands like: /add_perm PERMISSION
Create a permission attachment
You'll probably prefer using an existing plugin
Well there might be rare cases where an existing plugin won't help. Like regional permissions or timed permissions etc
What?
?jd-s
declaration: package: org.bukkit.permissions, class: PermissionAttachment
I mean give a permission to a player.
Imagine you have a permission whose name is "rm.perm.add" and you want to give it to a player.
You have to use the PermissionAttachment object to give string permissions to a player
?paste
I was just giving an example. Maybe someone wants to hand out a permission when a specific mob is killed
or only at full moon lmao
Are those PermissionAttachments permanent or do they automatically get removed on reconnect?
I never tried using them
The error was, that you cannot pass 1 as the Teleport ID.
Passing (int) (Math.random() * Integer.MAX_VALUE) instead seems to have fixed the problem.
Is that really how to fix this problem or am I just lucky that this works?
You're just lucky until you're randomizer will give 1 (or maybe some other numbers)
Had the same thought. But what else would i pass as the Teleport ID?
I only know they're a pain, at least few years before
ClientboundPlayerPositionPacket posPacket = new ClientboundPlayerPositionPacket(0, 0, 0, pitch, 0, Set.of(
ClientboundPlayerPositionPacket.RelativeArgument.X,
ClientboundPlayerPositionPacket.RelativeArgument.Y,
ClientboundPlayerPositionPacket.RelativeArgument.Z,
ClientboundPlayerPositionPacket.RelativeArgument.X_ROT), (int) (Math.random() * Integer.MAX_VALUE), false);
using mojang mappings now, maybe that helps understand my code
I checked a few months ago and they still looked pain so I decided to come back when I wanna suffer
what to put instead of (int) (Math.random() * Integer.MAX_VALUE) ?
I keep getting this error :
https://paste.md-5.net/risaluniku.cs
Here is my main file :
https://paste.md-5.net/pulalogaro.java
And here is my heal File :
https://paste.md-5.net/ezitecakav.java
I have absolutely no errors in intellij and I have no idea what is causing it
Two methods :
- lazy: output the number when it works, and hard code it
- not lazy and clean: look online if someone faced the same issue or detailed the packet description, and adapt the number
How are you compiling? Maven?
Yep
and are you sure you updated the plugin?
And not moved it some wrong location/forgot to restart?
I recompiled it It's not in the wrong location
The proper way is to stop, remove plugin, compile, move, and start (yeah it's long, yeah...)
I always use /rl and only do a full restart if I run into weird issues
most of the time I do not though
you are missing something
if I am it's not telling me
Maybe you are moving the wrong file, check if it's creation date is actually as of now
try changing the version in the pom to see it reflected in the name
do a full restart
How do you compile it? I mean which process of maven do you use?
I just press the green button to compile it
try console -> mvn clean package
package fr.program;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.AsyncPlayerChatEvent;
public class RMEventListener implements Listener {
@EventHandler
public void onPlayerChat(AsyncPlayerChatEvent msg) {
Player player = msg.getPlayer();
String message = msg.getMessage();
}
}
``` How can I add something before the message of the player with this event?
Ex: the player send "Hello", I want to have "Yo Hello".
use setFormat()
Msg.setMessage
How do you display your board?
that would break other plugins
like that
.
and do I cancel the event?
event.setCancelled(true)
Where might the console be in intellij I only see the terminal
or do you mean windows cmd
the terminal is a windows cmd
Well, iirc you'll have to use Teams to update easily without flickering your sidebar.
how can I use it pls
However I recommend using a lib like FastBoard
mvn clean package
'mvn' is not recognized as an internal or external command,
operable program or batch file.
I just use maven that comes with intellij
Meh, cmd.exe is more of a terminal emulator than an actual terminal
I can't tell you now, it as been a long time, however check this : https://github.com/MrMicky-FR/FastBoard
or just in "edit configurations" tab set that options
ohh
Then you need to install maven yourself if you want to run it like that
then my pc will become the slowest thing on the earth
how so?
Why?
it's struggling right now it can barely run intellij
maven doesn't make use of anything that would particularly slow down your PC - outside of an additional entry on the PATH
Alternatively you can use the portable executables (maven is portable by default anyways) https://maven.apache.org/download.cgi
Never really found the performance impact of PATH actually
Outch Intel core duo ๐ณ
Yeah It'd be marginal
4gig memory is your issue
core 2 duo
ough
But yeah, memory is more of an concern
Actually this processor is really okay
The CPU is probably fine
you'd do better running Eclipse over InteliJ on that PC
Didn't know such low specs are fine for win10 lmao
much aware of that
less than 4 gig as you have on board video with shared memory by the looks
wdym "fine" it takes like 3 minutes to look up chrome of I have intellij open
Unlike gradle maven doesn't make use of daemons to "improve" performance, so ironically you'd be fine
I think that's better then my other cpu
Launch Date: Q1'08
That is likely because you run out of ram so the OS uses your HDD as memory instead
my uh intel pentium dual core e5460
My ThinkPad runs like a Ferrari with it
(not windows ofc)
Running out of memory can be big ouch if you are not careful
maybe because it isn't a dell optiplex 780
How I delete a replace a name of the key in a config.yml ?
Or just delete the key.
with the worst specs
set null
And we can not replace the name of the key?
yeah my memory is fine
1066MHz ?ยฟ
a dell exclusive speed
I love dell
me too
But you'll have to insert some more coins to get a decent hardware lmao
I wouldn't even be using this pc if my pc motherboard didn't break
before I had a i3 10100 and a 3060 with a 500gb samsung ssd
but the motherboard broke and I'm stuck with this piece of shit
Meanwhile I wish I didn't install my current os on my SSD.
Can't install shit with 256 Gb of storage
is dis ram?
uh yes
noice
the only good thing about this pc is that it can somehow run minecraft at 60+ fps (1.8)
a brick can run 1.8 at 60 fps ๐
That's why you buy a 2TB m2 and just put everything on there
I see you, render distance -3000 chunks
2 chunks no fancy graphics
my secondary drives are all empty
if I ran shaders you'd probably hear a nuke
now they should do that to micro sd cards
for what? 100x less speed?
yes
tbf I have a budget PC build from 5 years ago. So the descision of having 256 Gb of SSD with 1 Tb of HDD was sound at that time
OS on SSD, disable swap file on that drive and install all applications to another drive. Always my prefered setup.
Am i outclassing myself here?
scoop install neofetch
even 5 years ago SSD weren't expensive anymore
to install scoop
iwr -useb get.scoop.sh | iex
in 2016 they were like 1GB=1โฌ but that quickly changed till 2018
mine's way worse then that
That's also my go, and it's totally fine. I created a new partition to install "fast" programs lmao and of other quick stuff
how to get iwr on windows ๐
'iwr' is not recognized as an internal or external command,
operable program or batch file.```
windows powershell has it
hold on 3 minutes while I open up powershell
xD
70 bucks per TB would still have obliterated my budget at that time (and even now it is way out of my standard budget. PCs are hella expensive)
perfect ;- ;
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
it hasn't loaded the shell yet
Herem take 1 tb of space 5000MB/S for only 50โฌ
https://www.amazon.de/Crucial-Plus-CT1000P3PSSD8-PCIe-Schwarz/dp/B0B25NXWC7/ref=pd_ci_mcx_mh_mcx_views_0?pd_rd_w=LlKo8&content-id=amzn1.sym.0cbf7d14-5630-4ffd-8c03-015d34863840&pf_rd_p=0cbf7d14-5630-4ffd-8c03-015d34863840&pf_rd_r=SGVWBQAJWQJE5HZ0AF6J&pd_rd_wg=Oxu48&pd_rd_r=1526cda2-0b3d-4501-b1d9-bb6fa5755a41&pd_rd_i=B0B25NXWC7
Jetzt ist die wertvolle Gen4-Leistung verfรผgbar. Die Crucial P3 Plus Gen4 NVMe SSD รผberzeugt beim sequenziellen Lesen/Schreiben mit beeindruckenden Geschwindigkeiten bis hin zu 5000/4200 MB/s und bietet gleichzeitig Datenschutz fรผr optimale Sicherheit. Die Crucial P3 Plus wurde von Micron mit der...
there ya go
Epic i have like 1 Tier above u in gpu and cpu xD
do I care
no
I paid like 200 bucks for it
That is 2023 pricing most likely
bruh tf is this
iwr -useb get.scoop.sh | iex Initializing...
PowerShell requires an execution policy in [Unrestricted, RemoteSigned, ByPass] to run Scoop. For example, to set the execution policy to 'RemoteSigned' please run 'Set-ExecutionPolicy RemoteSigned -Scope CurrentUser'.```
xD
oh it's finally doing something useful it's downloading
Win 10 pro sus
ebay key for 1$
Is possible to remove the blocking delay from the shield?
no โค๏ธ
I have 8x as much ram as you
and
do you get the old experience of having a slow computer? I bet you don't
I did
I had a linux mint pc when I was like 6 because windows xp was too heavy for that pentium cpu
I also started coding on a 4th gen intel laptop
with 4gb ram
I also used to have a pentium*
and worked on it for years until I saved up in 2020 and built a shitty pc
32gb ram is shit?
I had 16 at the time
that's still not bad
what cpu did you have in 2020
my first gpu was a 25$ ebay gpu
I still have a few gt210's
but now that i'm stuck with this dell optiplex which doesn't have a gpu slot I can't put it in there
what model was your old pentium
idk I got furious at that pc and tossed it out
apparently "steel_lock"==null
how come when i run getLock(ItemStack) i get null but when i log 1 of the Strings in the method i get "steel_lock" and the method im trying to check has "steel_lock" as a key
?nocode
Itโs hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
i sorta fixed it by removing a line that checks if its null
How can I update the board with lib FastBoard pls for players
board#updatelines()
not useful imo
^ just null check
I'd rather learn about java first rather than stressing over minor features
I'm seeing that in 1.19.4 ChatColor class is deprecated. Is there a new class to use instead that I'm not seeing?
Why when I have the permission but not op I see a "red command"? I mean the name of the command when I type is red, not white like if I was op.
did you set your permission to default to op for the plugin.yml of the command?
name: RankManager
version: 1.0
api-version: 1.19
main: fr.program.Main
commands:
create:
description: Crรฉation d'un rang
permission: rm.create
remove:
description: Supprime un rang
permission: rm.remove
list:
description: Liste tout les rangs
permission: rm.list
spr:
description: Donne un rang ร un joueur
permission: rm.spr
scr:
description: Donne une nouvelle couleur ร un rang
permission: rm.scr
snr:
description: Donne une nouvelle couleur ร un rang
permission: rm.snr
addperm:
description: Donne une permission ร un rang
permission: rm.addperm
removeperm:
description: Retire une permission ร un rang
permission: rm.removeperm
I added in a permissionattachment "rm.list" to test but when I type my command whose name is "list", I see it like if I had not the perm.
did you give the default rank with your permissions plugin the permission for rm.list?
No?
right now you have it set so that in order to use the command you people to require the permission rm.list in order to use your /list command
why can't i add nbt to doors
Why would doors need NBT data
why not
?blockpdc
Learn about CustomBlockData here:
https://www.spigotmc.org/threads/custom-block-data-persistentdatacontainer-for-blocks.512422/
Welcome to paper
minmessage
adventure โค๏ธ
why isnt the item setting set to air
player.getEquipment().getItem(event.getHand()).setType(Material.AIR);
use equipment.setItem
thx
Hey, i have a problem with packetwrapper
this is my code:
values.add(new WrappedDataValue(5, WrappedDataWatcher.Registry.get(Boolean.class), true));```
and the problem is:
```java.lang.NullPointerException: Cannot invoke "java.lang.Class.getConstructors()" because "com.comphenix.protocol.wrappers.WrappedDataValue.HANDLE_TYPE" is null```
is there any good api for async tasks other than the normal bukkit api or papermc?
i need to make a plugin with a lot of async tasks and im looking for better options
For people that have been working with item displays, is it just me or is interpolation duration a bit buggy? Sometimes the display spawns immediately at the final step of the transformation but other times it animates correctly
i see, is there a main github or docs for this?
mainly sql querys
It's a java feature
this
I wrote that guide because people were confused
personally I would just make my own java threads if its just sql queries
since you can make it a daemon thread
thats what im looking for, if someone else already did this to avoid wasting time
in this manner you don't have to worry about the threads shutting down, as soon as the main does, the daemon will too and the child threads
but yeah you could put the thread exec on the daemon thread and probably the best to do ๐
someone else probably has, but making the class and code for this isn't actually all that hard
nor will it take much
the only reason I suggest making your own thread instead of using Bukkit tasks is that the tasks are tied to the tick rate of the MC server
the thread system you create wouldn't be tied to that and instead is bound to the cpu speed making your queries faster
yeah im just looking for examples and ideas
T
are they rolling it back out now
makes sense
how do i make a list
in markdown
adds up
does anyone know how to make/where i can find a plugin that can give players revive passes and let the players type a command to use them?
you are in the development channel
oh were do i post that then
well if you read the channel names it should be obvious #help-server
well development sounded like the name for the channel where people create plugins but alr
it is, but you are not asking how to create one
you are asking for a plugin already made
it is also not the channel to illicit services either
that is located on the forums
is there a way to update a block in a chunk? lets say worldedit pastes a floating grass, and I execute a command to update the coords of the grass, I want the plugin to update it (remove the block basically)
idk a good way to explain it
private float yawFromLocation(double x, double y, double z) {
Vector direction = getA().toVector().subtract(new Vector(x, y, z));
System.out.println(direction.getZ());
System.out.println(direction.getX());
float yaw = (float) Math.toDegrees(Math.atan2(-direction.getZ(), direction.getX()));
return yaw;
}```
Hey all, I have this code for making the yaw face twoards location A. For some reason this only works with both getZ and getX are both positive or negative, not one or the other. Any ideas?
Idk what the issue is but i got a similar method, maybe it helps, idk https://github.com/JEFF-Media-GbR/JeffLib/blob/a1f7e122204b5ec4c45c6c9572272042c826ce03/core/src/main/java/com/jeff_media/jefflib/VectorUtils.java#LL35C1-L35C1
thanks alex
wth can I not rename modules in IJ lol
looks like I gotta manually rename that folder
alex back on gradle?!?
I haven't done anything for 2 days, now checking again whether I get it to work
on macOS this time
i think i figured out why the jar was always getting bigger
I remember you told me the issue but I don't remember you having mentioned any fix lol
if i download my javadoc jar from my repo for epicspigotlib, the jar includes another javadoc jar, and that one does too
thats the issue lol
i just had an idea
who tf pr this dog shite to it
that literally just broke the entire javadoc stuff lmfao
Ok, I got a hopper that auto sells. On Roblox, there is machines that you get your earned balances. Now should I do that with my hoppers or add a user uuid to add to player's eco? public void sellInv() { Inventory inv = ((org.bukkit.block.Hopper) this.block.getState()).getInventory(); for(ItemStack item : inv.getContents()) { if( item == null ) { continue; } if( !item.isSimilar(new ItemStack(item.getType())) ) { continue; } if( plugin.shop.manager.hasMaterial(item.getType()) ) { ShopItem shopItem = plugin.shop.manager.get(item.getType()); inv.removeItem(item); } } }
now the idea i would have used to fix it wont work unless i re-add what "ItzZisker" removed
yeah I also just saw this
i just reverted that PR
current version seems to be working fine on macOS
` public void updateChunkBlocks(Chunk chunk) {
World world = chunk.getWorld();
int chunkX = chunk.getX() << 4;
int chunkZ = chunk.getZ() << 4;
for (int x = chunkX; x < chunkX + 16; x++) {
for (int z = chunkZ; z < chunkZ + 16; z++) {
for (int y = 0; y < world.getMaxHeight(); y++) {
Block block = world.getBlockAt(x, y, z);
block.getState().update();
if (block.getType() == Material.GRASS) {
Block blockBelow = block.getRelative(0, -1, 0);
if (blockBelow.getType() == Material.AIR) {
block.setType(Material.AIR);
world.playEffect(block.getLocation(), Effect.STEP_SOUND, Material.GRASS);
}
}
}`
Can somebody rate this ? Like find any thing I should add or smt
why are you randomly updating the blockstate
also, why are you setting the "blockBelow" to AIR if and only if it already is air?
?
They are setting block to air if block below is air
oh yeah my bad
hehe
Yes, there is a issue with worldedit. I know why he might be updating the blockstates. I was a admin of a server years ago and I had to install a light fixer due to lighting issues. There can be dark areas shown in fully bright room
ah you just want it to do a physics check, yeah well okay in that case it makes sense
ive fixed this
for (int x = chunkX; x < chunkX + 16; x++) { for (int z = chunkZ; z < chunkZ + 16; z++) { for (int y = 0; y < world.getMaxHeight(); y++) { Block block = world.getBlockAt(x, y, z); if (block.getType() == Material.GRASS && block.getRelative(0, -1, 0).getType() == Material.AIR) { block.setType(Material.AIR); world.playEffect(block.getLocation(), Effect.STEP_SOUND, Material.GRASS); } } } }
(compacted)
But I think the devs of the worldedit should add this after//pos1 //pos2 //set AIRto avoid such errors
or glitches
personally I am making this plugin because of worldedit issues, it will be open source to help beginner coders
I swear worldedit used to have a command to update everything in the selection
Or if they didnโt they really should
I don't know, I really cannot tell you. I don't have the plugin/mod installed
what do you think the command was?
paperweight is dying for me
wdym
by default it should update
the flag worldedit has, is to not do physics
:nms:1.19.4:main: Could not resolve com.mojang:authlib:3.18.38.
Required by:
project :nms:1.19.4 > io.papermc.paper:paper-server:userdev-1.19.4-R0.1-SNAPSHOT
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
:nms:1.19.4:main: Could not resolve com.velocitypowered:velocity-native:3.1.2-SNAPSHOT.
Required by:
project :nms:1.19.4 > io.papermc.paper:paper-server:userdev-1.19.4-R0.1-SNAPSHOT
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
:nms:1.19.4:main: Could not resolve io.papermc.paper:paper-mojangapi:1.19.4-R0.1-SNAPSHOT.
Required by:
project :nms:1.19.4 > io.papermc.paper:paper-server:userdev-1.19.4-R0.1-SNAPSHOT
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
``` all exists on papers repo or mojangs
hehe
weird, it works fine for me right now haha
anyone know a better solution than to manually repeat this for all primitive types?
public static Character[] toComplex(char[] arr) {
Character[] newArr = new Character[arr.length];
for(int i = 0; i < arr.length; i++) {
newArr[i] = arr[i];
}
return newArr;
}
public static char[] toPrimitive(Character[] arr) {
char[] newArr = new char[arr.length];
for(int i = 0; i < arr.length; i++) {
newArr[i] = arr[i];
}
return newArr;
}
I don't recommend this as this allows cracked clients to connect but setting online-mode to false, there is a fix
Or maybe
Yes, instead of manually repeating the conversion methods for each primitive type, you can make use of Java's autoboxing and unboxing feature, along with the Arrays class, to simplify the process
i set gradle to offline mode?
but it cannot auto box arrays, wdym?
`public class ArrayConverter {
public static Character[] toWrapper(char[] arr) {
Character[] newArr = new Character[arr.length];
for (int i = 0; i < arr.length; i++) {
newArr[i] = arr[i];
}
return newArr;
}
public static char[] toPrimitive(Character[] arr) {
char[] newArr = new char[arr.length];
for (int i = 0; i < arr.length; i++) {
newArr[i] = arr[i];
}
return newArr;
}
public static void main(String[] args) {
// Example usage
char[] primitiveArray = {'a', 'b', 'c'};
Character[] wrapperArray = ArrayConverter.toWrapper(primitiveArray);
System.out.println(Arrays.toString(wrapperArray)); // Output: [a, b, c]
Character[] wrapperArray2 = {'x', 'y', 'z'};
char[] primitiveArray2 = ArrayConverter.toPrimitive(wrapperArray2);
System.out.println(Arrays.toString(primitiveArray2)); // Output: [x, y, z]
}
}
` @tender shard
You do that in the server config where you set the server-name and all that
do you even know what gradle is
I don't really get it, isn't that exactly the same thing I sent
not really
gradle is a build system like maven, not a minecraft server software
it is a custom class for all of the conversion
where is the difference? you take in a char[] and output a Character[]. It's not generic and only works for char and you manually loop over the contents. I don't see any difference to my code
max-tick-time=60000
require-resource-pack=false
use-native-transport=true
max-players=20
online-mode=true
enable-status=true
allow-flight=false
Character[] newArr = new Character[arr.length];
for (int i = 0; i < arr.length; i++) {
newArr[i] = arr[i];
}
return newArr;
}
public static char[] toPrimitive(Character[] arr) {
char[] newArr = new char[arr.length];
for (int i = 0; i < arr.length; i++) {
newArr[i] = arr[i];
}
return newArr;
}``` this is the recommended approach
it is basically your code
dude what drugs are you on
gradle isnt a server software, that will not work
Wait, its a server issue? Please switch to Spigot, I using 1.19.3 and it works while I program my plugins
trying to say i should fix my gradle issues by enabling online-mode
lmfao
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
?learn code
I using maven for my plugins
okay good
why do you want to use gradle than
I can get chatgpt to explain it to u
`Gravel and Maven are both build automation tools commonly used in software development, but they serve different purposes and have distinct features. Here's a comparison of Gravel and Maven:
Gravel:
Gravel is a build tool developed by OpenAI specifically for managing and building Minecraft mods and plugins.
It provides a simplified build system tailored for Minecraft-specific projects, making it easier to set up and manage dependencies.
Gravel focuses on building and packaging Minecraft projects efficiently, with features like automatic dependency management and version conflict resolution.
It uses a configuration file called gravel.toml to specify project settings, dependencies, and build tasks.
Gravel is designed to work seamlessly with OpenAI's ChatGPT and AI Dungeon platforms.
Maven:
Maven is a widely-used build automation tool primarily for Java projects.
It is a powerful and feature-rich build system that manages the entire software development lifecycle, including compilation, testing, packaging, and dependency management.
Maven uses a declarative XML-based configuration called pom.xml (Project Object Model) to define project settings, dependencies, plugins, and build tasks.
It has a vast ecosystem of plugins and extensions that provide additional functionality and integration with various development tools.
Maven follows a convention-over-configuration approach, allowing developers to follow standard directory structures and naming conventions for their projects.
In summary, while Gravel is specifically designed for Minecraft mod and plugin development, Maven is a more general-purpose build tool widely used in Java and other software projects. Gravel simplifies the build process for Minecraft-specific projects, whereas Maven offers a comprehensive build system for a wide range of software development tasks.`
gravel makes flint in minecraft
in 2023 a new build system joins the team
looks like a good build system
https://paste.md-5.net/uxavisahew.coffeescript
@remote swallow
I don't plan to, I just trying to help with the issue above. The reason I told him to switch to Spigot is because I think there is a issue in the server's source code. Like for a example```import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import com.mrnategeek.serverShop.ShopItem;```It can be one of these bukkit classes but in his case, paper
wtf lmao
Who?
u
ok]
its not a source code issue lmfao, its gradle not finding a dep
Now I see what you mean, what editor you use?
ij
?learngradle
RESPONSE
`Gradle is a powerful build automation tool used for managing and building software projects. It provides a flexible and efficient way to automate the build process, including compiling source code, managing dependencies, running tests, and packaging the project.
Here are a few key points about Gradle:
-
Declarative Configuration: Gradle uses a Groovy or Kotlin-based DSL (Domain Specific Language) for defining the build configuration. It allows you to specify dependencies, tasks, plugins, and other project settings in a concise and readable manner.
-
Dependency Management: Gradle has a sophisticated dependency management system that simplifies the management of external libraries and project dependencies. It can resolve dependencies from various sources, such as Maven repositories or local files.
-
Plugin Ecosystem: Gradle has a vast ecosystem of plugins that extend its functionality. These plugins cover a wide range of use cases, such as Java application development, Android app development, web development, and more. You can leverage these plugins to customize your build process and integrate with other tools.
-
Incremental Builds: Gradle uses an incremental build system that only rebuilds the necessary parts of the project when changes are detected. This can significantly improve build performance, especially for large projects.
-
Multi-Project Builds: Gradle supports building and managing multiple projects within a single build file. This feature is beneficial when working with complex projects that consist of multiple modules or subprojects.
To get started with Gradle, you can visit the official Gradle website (https://gradle.org/) and explore the comprehensive documentation and guides available there.
Happy learning and happy building with Gradle!`
did you run gradle in the nms subfolder?
parent
then I am out of ideas
im just testing deleting some files in my local repo
have you tried down\loading it on another computer?
works for alex my pc is just refusing to redownload the deps
this happend to me but my router was blocking outbound connections from non usa so I fixed it
the funny thing is it worked a few days ago
well one has to say, it worked for lynxplay on linux, but not for both of us on windows, but for me on macOS, but unlike lynx it does NOT work on linux for me - lmao
Most ISPs have these static, its not easy without a VPN
damn
my IP only changes like once in 3 months lol
mine changes when I unplug the router for 3 minutes and plug it back in
else its perminate
I know this because I had my website hosted on my network before which cannot be done again as I on a hotspot now
whats the program where I can sell my services on spigot?
Services?
I don't know
ive seen it in the chat when a player gets told to go to a link and not advertise
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
real
TIL a new exception type - never seen ArrayStoreException before lmao
oh wrong reply
my bad, I sometimes reply to random messages instead of the actual one
im just gonna give up on trying to get it to work
ill try it again later
i should start doing unit tests
yeah writing tests is a good way to spend time without actually having to add any new features
how do i handle nms stuff with mock bukkit and setting a plugin instance
lol alg
you don't
mockbukkit only implements API, not NMS ofc
well i mean for like getting a server version
private final int myCoolness = 100;
if(you.getCoolness() > myCoolness ) throw new ImpossibleException("It's impossible to be cooler than me B)");
you can just create a MockPlugin MockBukkit.createMockPlugin("RandomName");
I also usually check if Bukkit.getServer() is instanceof ServerMock and if yes I disable all the NMS shit
makes sense
Hey so ive been stuck on this forever, I am trying to host a gradle repository (Preferably with something that can link to the github on push) and all I can get is a local nexus repo. I already have webserver hosting if that is needed
there is no "gradle repository"
what is that supposed to be
a gradle repo is a maven repo
would prefer to avoid any extra fees
use something like nexus or reposilite on the webserver
there's usually 3 ways
- nexus
- reposilite
- plain SFTP/webserver
i prefer nexus over reposilite but it doesnt have a builtin javadocs viewer unless you pay for it
and usually you wanna host javadocs too ofc so
Am I able to have it add a new release without manually doing it every time?
How I tried forever to do it lol all I could find was using some other software from them that required a premium
@tender shard much confusion
reposilite is easy to setup if you know docker and reverse proxy stuff
are you in src/test/ ?
ye that fixed it
and don't forget, you gotta annotate your tests with org.junit.jupiter.api.Test
i stole it from lunaticlol
there's another Test annotation that exists but that other one is wrong
I'm great in making up long method names lol
Caused by: java.lang.NoSuchMethodException: No compatible constructor for xyz.epicebic.simplesuggestions.SimpleSuggestions with parameters [org.bukkit.plugin.java.JavaPluginLoader, org.bukkit.plugin.PluginDescriptionFile, java.io.File, java.io.File]
real
going great
you need a constructor with that signature
it's all explained in mockbukkit's readme
i dont see it
oh wait, it's not lol. yeah anyway, just create a constructor that takes in those args
do i have to use them for anything
not really
i have public SimpleSuggestions(JavaPluginLoader loader, PluginDescriptionFile pdf, File a, File b) {} but im getting a
Failed to instantiate plugin
java.lang.RuntimeException: Failed to instantiate plugin
just checked the wiki
found a fix
what was the fix
i had to call super() with the params
aaaah yeah that makes sense
if you had sent the full stacktrace, it would have been obvious that this is needed ๐
Hi all. How to find out in which direction the player turned his head? Right or Left?
right or left of what?
can mockbukkit not load resource files
in playermoveevent, if yaw is less than before, it's left than before. otherwise it's right. if it goes from negative to positive or other way around, the opposite is true
it can, put them into src/test/resources
or do some gradle magic if you wanna have the same as in main, but I don't know how to do that in gradle
yeah i did that
hm are you doing JavaPlugin#getResourceAsStream, or what?
What should I do about it?
where's your getMessageConfig
If the turn in two directions is less
lombok, @Getter
as said, listen to InventoryMoveEvent and check if new yaw is less or more than old yaw, and if it did the turnaround at -180/+180
how does your MessageConfig class look like
this is the loadResourceFile method
@NotNull
public static Optional<File> loadResourceFile(Plugin source, String resourceName) {
File resourceFile = new File(source.getDataFolder(), resourceName);
// Copy file if needed
if (!resourceFile.exists() && source.getResource(resourceName) != null && !ServerUtils.isRunningMockBukkit()) {
source.saveResource(resourceName, false);
}
// File still doesn't exist, return empty
if (!resourceFile.exists()) {
return Optional.empty();
}
return Optional.of(resourceFile);
}
why are you checking whether you're running mockbukkit everywhere? IIRC it should work just fine in mockbukkit like on normal spigot, no need to differentiate everywhere
im guessing ill need to add an if for mockbukkit and return an option of the resource
i thought the saveResource might have been causing it
this isnt working bc the file cant get saved anywhere
so it returns an empty optional and then the param isnt set
im starting to think unit testing this isnt worth it
I didn't understand
idk why, but it doesn't count "to left", when my start position is south
what is the math.abs for, there isnt really aneed for that
just the if one is bigger/smaller than the other
I have to do this to ignore small camera deviations.
So I'm checking
Because if I do a rotation like this:
It thinks it's a turn up
print out the yaw instead of cancelling the event and you'll see what the issue is
yaw goes -180 to 0 to +180
how do i solve this?
What are you not understanding about the answers you got?
Oh, sorry, I made such a stupid mistake. Thank you
Already everything seems to be working.
Yes, I fixed it and it works
? Is prefix
lol
so I am using the PlayerFishEvent and want to change the amount of fishes that player gets from fishing, how can I do it?
or how I get the type of fished fish?
cause event.getCaught().getType() returns DROPPED_ENTITY or smth
is event.getCaught() not supposed to be an ItemStack?
oh wait no, it's indeed an Entity
iirc you can just cast the getCaught() entity to an Item (org.bukkit.entity.Item), then you can get the itemstack using getItemStack() on that, change the amount, then do setItemStack back on that item and there you go
Check before casting that entity is well an instance of Item
ok and how do I get the type of the caught entity?
what else would it be though
it will always be a DROPPED_ITEM
so I dont get the type of item?
you can get the type from the itemstack, it'll be a normal Material though
e.g. it'll be ItemStack.RAW_COD or whatever
or a rotten shoe or sth haha
Thought you could caught animals, monsters or players with a rod by throwing at them. But maybe another event is thrown for that
holy shit, you're right. I totally forgot about that
yeah
that explains why it returns Entity instead of Item lol
okie, thanks you
so like I would like to do something
specific mobs spawn in specific location (inside a given room)
is there a way to check if a method in a class exists with set parameter types?
Class#getDeclaredMethod (or #getMethod) and see if no exception gets thrown
kk
what are you trying to do
?whereami
๐ thats funny as hell
Ok, trying in the correct channel...
After a world is created with WorldCreator#createWorld()
I got this beautiful message:
java.io.FileNotFoundException: .\arena_Test\data\raids.dat (Systemet finner ikke angitt bane)```
The system can't find the path...
Sure, I can see that the data folder is not there, but why isn't it created?
u smell
FileConfiguration config = this.getConfig();
config.addDefault("aaaaa", true);
saveDefaultConfig();
config.addDefault("test", true);
saveConfig();```, this is what i have in my onEnable, without saveConfig() it only copied the config.yml i have in the resources folder, after adding this method nothing is added to the config.yml
any ideas?
how do i add then
manually calling config.set
Use #set
kk
?whereami
how do i get player skulls?
SkullMeta, setOwner or whatever
ok...
how i use it?
?jd-s
Google your question before asking it:
https://www.google.com/
ok!
BlockDataMeta
BlockDataMeta meta = item.getItemMeta();
Light light = (Light) meta.getBlockData(Material.LIGHT);
light.setLevel(15);
meta.setBlockData(light);
item.setItemMeta(meta);```
Yes
hi, does somebody have an idea on how to store ItemStack, in a file or something else that persist after restarting the server ?
If yes, can you share me how to do it ?
There is a way to remove "all" PermissionAttachment from a player?
config.set("x", item)
does it work on any type of file or only on yml file ?
you need a FileConfiguration object
ok
what is this nonsense
This is what i call "The hopper issue" This is a long standing issue that Paper, Taco, and spigot have all given a crack at but nobody seems to have a good "FIX" for the awful performance that hoppers have. This is my fix, its a whole breakdown if anyone wants to read it. But i think this TOTALLY fixes the hopper issue, without compromising on the true function of a hopper, and its Redstone implications etc...
(open in web to get a better quality image)
I Forgot who asked, but whoever it was this is my solution to the problem, and ill be implementing it into React. But in case anyone else has this issue, when i comit / test it ill post the source here too :D
lmao released a full scientific paper about it
hi I found how to store the Map of an itemstack but I don't know how to restore my ItemStack from the stored Map
what map of an itemstack
if your calling ItemStack#serialize you shouldnt need to do that
How can I add a Coin emoji on scoreboard, 'cause I've been experiencing where it instead shows an empty emoji box
use utf-8 encoding and find a utf emoji for it
yes i use ItemStack.serialize and then store the return Map in a file, bur how I can restore my ItemStack from the file ?
yeah you shouldnt do that
use yaml and set("path", itemstack) then getItemStack("path")
iirc the deserialize is in craftbukkit + package private
Must I use yml file or can I use random type file ?
to use the built in bukkit stuff you need to use yaml
the file extension doesnt matter, it must be valid yaml syntax inside that file
ho ok ty
wdym how
if you want to use json you should use gson and write a type adapter, if you want to use a db serialize the item to a byte[] and save it as a blob
saving itemstacks to sql ๐ซฅ
hello i was trying to find a way to activate a listener only if the player is holding a specific item i tried many different things and none seem to work
more specifically im trying to make a listener that removes blocks around the player when holding any type of firework rocket
check if Player#getInventory().getItemInMainHand().getType().toString().contains("FIREWORK")
it only works when changing inventory slots for some reason
this is how the listener is now
public void onPlayerItemHeld(PlayerItemHeldEvent e) {
Player p = e.getPlayer();
if (p.getInventory().getItemInMainHand().getType().toString().contains("FIREWORK")) {
Location pLoc = p.getLocation();
World world = pLoc.getWorld();
int radius = 7;
int radiusSquared = radius * radius;
for (int x = -radius; x <= radius; x++) {
for (int y = -radius; y <= radius; y++) {
for (int z = -radius; z <= radius; z++) {
if (x * x + y * y + z * z <= radiusSquared) {
Block block = world.getBlockAt(pLoc.getBlockX() + x, pLoc.getBlockY() + y, pLoc.getBlockZ() + z);
block.setType(Material.AIR);
}
}
}
}
}
}
}```
if that only existed for html ๐
Best pratices are often overlooked
All you learn is functionality 90% of the time
And some theory about SOLID and other principles
Definitly not enough to write clean and maintainable code
schools don't give a shit about clean code
source: am friends with all the programming teachers at this school, they showed me the protocol
It's all standardized and like
usually outdated
my classmates code is awful lol
To be fair it would make teaching those subjects way harder if it wasn't. You'd have to update everything year by year. Meanwhile math doesn't change at all in a decade
ehh somewhat
Been mucking around with simplifying events in terms of scalability and accidentally made a "ClassConsumerMap".
Its a Map<Class<?>, Consumer<?>> so you can cast generalised child classes back to their class if its within the map, and direct em to specific methods within a Class based on the Class key.
Dunno if general Java, or if there is a better way, but my gut be telling me this is hella cool either way ๐
yeah I've done that before
Yeah we are currently designing a library for all our in-house plugins. And ngl it feels hella satisfying
used something similar in the event handling for my minigame lib
I love smile to pieces, but not having to write onClick, onOpen, onClose over and over again is too nice to describe lol
Why is EntityType an enum and PotionEffectType is not? D:
Hello, can anyone help me with a problem I have on my server? When I try to spawn any aggressive entity like a zombie it disappears a second later.
a second or instantly?
You in peaceful mode?
that's why I'm asking, too. Peaceful and cancelled events won't take a second to remove the mob
that's why you just
abstract away his stuff even more
Oh im way ahead of ya buddy xD
this is what I do with my engine
and I just have all menus with a common configuration
Actually going out of my way to integrate redis into the library so you can cache player's inventories in a HashMap<Player,ItemStack[]> to compare before and after the gui is closed or if the player DC's , gets kicked, quits etc) .
and it ends up being pretty versatile
instead of having slots I have a Selection interface that's just a List<Integer> getSlots and I can apply elements to them
Instantly
and those elements don't need to be specifically buttons but can also be like multi-element switches for stuff like scrolling left/right
Well do you have any plugins or does /difficulty return peaceful?
No, in easy (default)
Huh noice.
This is where im currently at with mine
*it aint perfect, there is a reason u do UML's before u code a library lol :L *
I'm way too lazy for that :x
Yes but coding > diagrams
Maybe thats where im different. I actualy find this really fun
And I cant describe the utter joy that comes from sitting down with a UML, and getting code bashed out in 1/3 the time as u know exactly what ur doing
Yeah in that case it makes sense
yeah I don't do UMLs and all that shit
I just write
and see where it goes
and when I'm unhappy I just nuke it all and rewrite
Ah the good ol' NASA in the 60's approach xD
I mean I'm writing an engine for Regional stuff atm and I also spent like 8 hours reworking something that I would have seen with UML before. But whatever lol
Something very close to my heart. But fun fact, we can't actually remake the SaturnV rocket as the engineers in the 60's literally designed it like most coders such as yourself.
All hte little changes were wrote down on scraps of paper that have since been lost lmao
working on a minigame engine atm
We can't make the SaturnV engines because we've lost the skilled engineers who can do the production work.
Hard disagree.
because im one of em

Not skilled enough then ๐
I did not notice that
I don't like how the team code is not abstracted away 
But yeah @echo basalt it is the next big thing we are gonna do with ours.
Cause our team's called Curiosity Core we are calling each of our library addons a "core".
The Curiosity Core
The Combat Core
The Command Core
Need a name for minigames lol
The minigame core
How would I dynamically instantiate objects that implement Keyed but aren't an enum?
For enums it's easy.
if (type.isEnum()) {
return Enum.valueOf((Class<Enum>) type, s);
}
But for some reason PotionEffectType is not an Enum. EntityType is
IT NEEDS A C DAMNIT!
xD
We are holding the most highest regard aspect of coding up....
puns
xD
Such as the latest and greatest add-on to the CoreProtect plugin made by Curiosity Core.
MoreProtect xD
its a great name i'll die on that hill lmao
The Clown Car
instanceof covers implements
Yeah but the Keyed interface doesn't have any useful methods
D:
I don't get why PotionEffectType isn't an enum in the first place. Is that some technical debt?
I'd make a "participants" object that holds a HashMap<String,Participant> where "Participant" is an abstract that has the child classes of "IndividualParticipant" and "GroupedParticipants".
And then you could slot that into the general "minigame" abstract and then just define as and when needed .
Then an interface with defaults for "GroupGames" and "IndividualGames"
ehh
too much abstraction
some games are weird
some are not
each minigame is unique and categorizing them into those groups is rather limiting
You are not categorizing them into groups thats the beauty
"Participant" is an abstraction of just "person playing the game"
you are categorizing them into the group of "group game" or "individual game"
And you just add more...
I don't need a participant class at the moment
Each to their own ^_^
Hi,
I having this message when loading my yaml file : unacceptable code point ' ' (0x0) special characters are not allowed in "'reader'", position 2
And when I try to extract my ItemStack from the yaml file by using config.getItemStack() i get this error : java.io.StreamCorruptedException: invalid stream header: 6974656D
Can somedy help me ?
post your yaml file
==: org.bukkit.inventory.ItemStack
v: 3337
type: OAK_WOOD
amount: 12
item2:
==: org.bukkit.inventory.ItemStack
v: 3337
type: OAK_WOOD
amount: 12
item3:
==: org.bukkit.inventory.ItemStack
v: 3337
type: OAK_WOOD
amount: 12
item4:
==: org.bukkit.inventory.ItemStack
v: 3337
type: OAK_WOOD
amount: 12
item5:
==: org.bukkit.inventory.ItemStack
v: 3337
type: OAK_WOOD
amount: 16
I create it from my code
?paste your actual yaml code
Nah all good. Just surprised by the effort. I'm just used to people not even being able to communicate their error e.g. "this doesn't work". So that was the hard opposite
you never write anything to file
so why can I see its content change ?
๐ง
Spigot Repo : https://www.spigotmc.org/resources/easyqueue-1-14-2-support-server-queue-system.68304/ - GitHub - KeilaPallo/easyqueue: Spigot Repo : https://www.spigotmc.org/resources/easyqueue-1-14...
how to convert the build above into a plugin running on 1.19.4
Do you happen to know what's the UTF-8 encoding for coin?
\๐ช
think imma write bedwars today
how can I write my ItemStack in yaml file ?
this does not work ๐
It's just that it's not working in scoreboard to represent a coin emoji
I have tried that before asking the question here
โโโโ
just copypaste em
still don't work...
I would have probably done that before going here asking the question not going to lie...
I have ran out of options, so had to ask here
Or EquipmentSetEvnt
resource pack
just google it seriously
and shade it
Well, if that's the last point just to get a coin on scoreboard, then oki
ok bud
ok i'm so sorry i don't paste the good code
why is minecraft such a boring game
every server is the same gamemode
nothing unique
damn i just realized you can use github gists as a free file storage
dude
int numberweneedtochecklol = Integer.parseInt(String.valueOf(readefileofplayerlol.readLine()));
this line 306
why arent you using the fileconfiguration api to get an int
it should get any int in string of readfileofplayer.lol.readline
can't be bothered
gl then
how wtf this related to
currently using config.options().copyDefaults(true); and i have an issue with it, in the default config i've added an example and i want to make it so the example is only generated if the yaml path that contains it doesn't exist
lol
thats how my translation stuff does it
actually how do i use it in this case since im working with a list?
the example is a list
mhh what list, what does it contain
strings
ye buth are those paths or what
because you are trying to parse players-required: 15 into an int, which it obv isn't
Could I only Get The 15 and ignore the string?
by using same thing fourteenbrush said to you
i thoguht Integer.parseInt do that
oh
reminds me of my expression parser where i had to do the same bs
fileconfiguration api
how use fileconfiguration api
what is fileconfiguration api
it parses string into int lol, its descriptive as that
?configs
See this wiki page on how to use custom configuration files: https://www.spigotmc.org/wiki/config-files/
yeah thanks
oh
this whole other system
i using other system
i can't change all the system to file configuration api
i just asking for an error
not change for whole system ;/
any one know how make this?
Split at : then trim and convert second item in the array
well have you looked into the docs?
โ ๏ธ frist time know there is a docs
java dosc