#help-development
1 messages · Page 1410 of 1
Why not 1.17?
1.17 isnt gonna be a very game changing update
1.7 was the packet rewrite afaik
1.8 was im p sure
because they will be too busy stewing in their shit over the world height being changeable per world now
1.17 does change a good portion of internal stuff
I suppose
it's horrifying
1.17 would allow for a bigger world already
and what's more horrifying is that they are going full steam towards being fully data driven and dynamic
yes
and bukkit can't even get rid of the fucking biome enum
never gonna be merged
yea 😔
md69 is just gonna sit on his mouldy ass until it grows roots and spigot dies
ok sir
I advocate for that PR, even if it is a pain to rewrite my plugin to it
you can get them to work on bukkit
but they're not supported in any fashion
same with biomes
No thats what i mean
Previous custom worlds wouldnt generate with datapacks
I added that support (with some md help)
“”Support””
you've been able to hack those into loading and generating for quite a long time
there was a slimefun server like a year or two back that had a custom nether dimension from a datapack
of course it still explodes daily even to date because no plugin can handle the custom biomes there, as the getBiome return type is an enum
how can I check if the damager is a player in EntityDamageByEntity event
event.getDamager.getType
Also event.getDamager() instanceof Player
^ better
I imagine instanceof is ever so slightly slower
But better practice in the long run imo, especially considering most people asking such a question are just beginning programming
And forces them to have some sort of early contact with OOP principles
https://wiki.vg/Protocol#Player_Movement Anyone know what this maps to with ProtocolLib
i don't think so. getType() is using instanceof internally
at least for blocks
instanceof is in the realms of nanoseconds
getType likely also, but instanceof is usually faster than a field access from what I know; the difference decreases (and eventually goes negative) up if you chain instanceof though
instanceof needs a field access as well of course
or, well, not a field access, but a memory read anyway
i suppose getting the type would be two at a minimum
what's that gettype() does
it chains instanceof
iirc
or maybe im incorrect
it think they do this for inventory types
lemme check
i've saw some chaining for sure
yep
inventory.getType() does this
Is there a way to check if a Configurationsection exists?
in this case wouldnt it be easier to get the class name and do a switch?
O(1+n) or at best case O(2)
getting the class name is pretty expensive iirc
chaining would be O(n) everytime right now
but, entity::gettype definitely doesn't do that
the entity type is a final field on the entity instance
inventories are just fucking cancer
ik
why wouldnt they store the inventoryType everytime
the inventory is created
like you use InventoryType enum still inside the args whenever you create it
why not store it in a field
instead of chaining shit like that
muh 32 bits
references are 4 bytes though, usually anyway
you're not allocating a new instance of the enum or type or shit, you're just referring to the existing instance
the stream parts are the best
can someone explain PermissionAttachment
if (Integer.valueOf(args[2]) == null i cant check if is null ? i getting null exception aways
check args length
you're probably not getting a "null exception"
you're probably getting either ArrayIndexOutOfBounds, or NumberFormatException
it will be index out of bounds or a number exception
please read your errors past the first fucking line
check first if args[2] is not null
then try to get value of integer from that argument
is not null
if you haven't specified args[2] it would always throw nullpointerexception
becausee :
in this case
int chance = ( args.length < 3) ? 100 : Integer.valueOf(args[2]);
i already this check
do you want to test if its an integer?
do you try to get the integer out of this string?
he wants to send us the fucking exception
its because i need check if player execute command /loot create name otherthingelseanumber
sudo vinny7 c:no i dont
ParticleManager.getInstance().getCustomConfig().load("config.yml"); gives this error https://paste.md-5.net/fiyasenuwu.md
^^
file not found literally
i already getting this
but the File Is tehre
have you added plugin data folder to the path?
you literally inputted "asd" and you're trying to parse integer from it
use try catch block
if it throws NumberFormatException
it means the integer is not parsable to int
nope
i ill try it
your error was not null
show us the stacktrace
it trys to parse the string to an integer. if it can't do that -> error. you have to catch the error.
when you input normal number
I don't seem to have any issues with the player flying into space, but I forgot jump boost reduces fall damage
Ok imma just wait till u guys are done with him
They're called "exceptions" for a reason. In a perfect world, you never get an exception. Say my boss asks me to work on an assignment. He'll expect me to say "yes, sir!" but I might reply with "I have a lot on my plate right now, I can't accept a new assignment without letting existing work fall through." He is prepared for both of those. He isn't prepared for me to punch him in the face. I lose my job and he calls security. Now imagine if he called security for me simply saying I have too much work - that's the third method: calling the cops for something that should just be expected.
Caused by: java.lang.NumberFormatException: For input string: "asd"
read
your
exceptions
past the first line
Yea, could be related to this kb system i have for damage
(85% sure)
I do onow that the server calcukated jump boost velocity correctly
Its an int value, not byte value (server side)
But then I have to calculate all the fall damage reduction by hand
i think he wants to check IF the string is a number and do anything if its not
that is a stepping stone to what he wants to do yes
he stated that he doesn't get parsed number even if he inputs it
Note to self > burn in daylight + instant death challenges don't go well together if you don't have a spawnpoint inside
in reality he just wants to let a player specify a number
because it throws "null pointer exception"
he should stop being a sub 70 iq vegetable
i even sent him the solution then
I tried to make a reload command but it gave this error https://paste.md-5.net/fiyasenuwu.md
It says that the file is not there but the file IS there as you can see below. I think I may have done smth really dumb this is the code
public FileConfiguration getCustomConfig() {
return this.customConfig1;
}```
```java
private void createCustomConfig() {
customConfigFile1 = new File(getDataFolder(), "config.yml");
if (!customConfigFile1.exists()) {
customConfigFile1.getParentFile().mkdirs();
saveResource("config.yml", false);
customConfig1 = new YamlConfiguration();
try {
customConfig1.load(customConfigFile1);
} catch (IOException | InvalidConfigurationException e) {
e.printStackTrace();
}
ParticleManager.getInstance().getCustomConfig().load("config.yml");
And the file is there in the plugins/ParticleManager/ location the config.yml is there
I love that thread
"If best practices don't matter to you, or you want to troll the guy who does your code reviews, try this on for size:"
restart your server?
ah nvm that file im dumb
Commands.java:28
which line is that?
Pattern numbersOnly = Pattern.compile("^[0-9]+$");
public boolean isNumber(String arg) {
if (arg == null || arg.length() == 0) return false;
return numbersOnly.matcher(arg).find();
}```
what means load()? is that one of your methods or from YamlConfiguration or smt
tuff 🙂
im dumb at reading, it's from FileConfiguration
and also base2 and base8 and base16
Someone told me to use load ¯_(ツ)_/¯
like, have you seen that regex that you're "recommended to use to check strings" that's listed in the javadocs
shit probably weighs more than trying to parse it throwing the fucking exception
Aren't compiled patterns reasonably fast
faster than a regex
so, it's searching for a file... idk where it searches...
final String Digits = "(\\p{Digit}+)";
final String HexDigits = "(\\p{XDigit}+)";
// an exponent is 'e' or 'E' followed by an optionally
// signed decimal integer.
final String Exp = "[eE][+-]?"+Digits;
final String fpRegex =
("[\\x00-\\x20]*"+ // Optional leading "whitespace"
"[+-]?(" + // Optional sign character
"NaN|" + // "NaN" string
"Infinity|" + // "Infinity" string
// A decimal floating-point string representing a finite positive
// number without a leading sign has at most five basic pieces:
// Digits . Digits ExponentPart FloatTypeSuffix
//
// Since this method allows integer-only strings as input
// in addition to strings of floating-point literals, the
// two sub-patterns below are simplifications of the grammar
// productions from section 3.10.2 of
// The Java™ Language Specification.
// Digits ._opt Digits_opt ExponentPart_opt FloatTypeSuffix_opt
"((("+Digits+"(\\.)?("+Digits+"?)("+Exp+")?)|"+
// . Digits ExponentPart_opt FloatTypeSuffix_opt
"(\\.("+Digits+")("+Exp+")?)|"+
// Hexadecimal strings
"((" +
// 0[xX] HexDigits ._opt BinaryExponent FloatTypeSuffix_opt
"(0[xX]" + HexDigits + "(\\.)?)|" +
// 0[xX] HexDigits_opt . HexDigits BinaryExponent FloatTypeSuffix_opt
"(0[xX]" + HexDigits + "?(\\.)" + HexDigits + ")" +
")[pP][+-]?" + Digits + "))" +
"[fFdD]?))" +
"[\\x00-\\x20]*");// Optional trailing "whitespace"
if (Pattern.matches(fpRegex, myString))
Double.valueOf(myString); // Will not throw NumberFormatException
else {
// Perform suitable alternative action
}
no
yes
up your ass
a little overkill
that the javadocs are dumb
so i got 2 ideas
1: try to use #load(File); instead of #load(filename); maybe that helps
2: try to use the whole path as input, so like ./plugins/<yourdatafolder>/<yourfilename>
getTitle seems to be deprecated, what can i use instead?
Ight
getView.getTitle
getTitle on inventory view
thanks
also, if that question wasn't one that people ask 100 times a day, we would have no idea what you're talking about
yeah, why do people even ask about that... isn't that change since like 1.8?
because 1.8 people can't read the docs
true true
and sometimes have to do stuff on other versions than 1.8
which makes their small and smooth brains overheat
are you okay? you sound pretty angry tho
i am fueled by my fucking incandescent hatred
NNYa has a permanent vein bulging on his 5head.
that's interesting
Hatari — Hatrid Mun Sigra
bot attack
None works
same error?
or try to use YamlConfiguration#loadConfiguration(File);
that should work definitely
or code your own loader
or code your own loader xd
ok this is wizard magic
or depend on a configuration library that isn't garbage
let me guess, it works, and you dont know why?
Nope It works but I didnt do anything
wizard magicc!
like... a decade ago...
my getDataFolder() always returned null, and even mods didnt knew why lol
aaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbb
intellij update
oh true
im too lazy to update aaaaa
if i update now, i will get 1000 errors again, i guess?
i haven't updated intellij in years
like everytime
in my experience the people developing the ide only make it worse with every update
there's one update in intellij i really enjoyed
what did it do
nothing!
this
would be nice if the ide wasn't so fucking heavy I could run even a single instance without lagging to shit
lol
god bless my cpu
ij is so bloated and full of useless eyecandy
my explorer lags more than intellij
some day I will write myself a simple and bare bones ide
or just switch to fucking notepad and javac
Isn't there an intellij light client for people that work on toasters ?
you can turn a lot of the gizmos off but then it's just about as useless as eclipse
tbh I dont like my pc... its not "good" but im glad its not a toaster
what stuff is inside?
just vim and language server kekw
my processor is like 600mhz
well, i had a 2x2ghz cpu before, with a geforce gt1030, imagine that
what was it? lol
it goes up to 1.5ghz but because of shitty passive cooling it always throttles down to 600mhz
ParticleManager.getInstance().getCustomConfig().load("plugins/ParticleManager/config.yml");
like my gpu has a huge problem
it's made that the fans only turn at 55+ degrees
problem?
wtf?
it always is between 53 and 56 degrees
im pretty sure fans are suppose to... not even let it go that high
What's the problem in here
Map<String, Integer> PlayerHits = new HashMap<String, Integer>();
PlayerHits.put("howmanyhtis", 0);
int howmanyhits = PlayerHits.get("howmanyhits");
howmanyhits = howmanyhits + 1;
well, when playing horizon zero dawn, or stuff like that, its on like 70-80
the fans of the msi-version are trash yeah
rivex
he wants to store the # of times a player punches
tell me. what's the problem
that he doesn't know anything about anything
yes
question should I change my particle system to packets instead of spawn particle
never written a single line of java and unable to comprehend even the simplest of tutorials
spawnParticle just shit out packets anyway
i mean, what is the problem? error?
they're basically the same
no error doesnt work
o well
it's because the map is capitalized
what exactly doesnt work
duh
lol
I have typed neyort instead of object once
tf
dont ask
doesnt matter if it's capital or not. in functionality
maybe answer this to give me info
i mean doesnt work isn't that specific
well it's pretty obvious to see why it doesnt work
it's like trying to help a toddler build a house
isnt it howmanyhits++
map.set(key, map.get(key) + 1);```
that will solve all the issues yes
pseudo code is like the code that the idea is correct but it isnt correct
tf, you want to correct me? lmao
my name is pink
that's pretty gay
and youre white
guys, does anyone know how to properly use commodor file format?
Do you have an idea of the event when a block of cobble and generate from lava and water?
not pink H O T P I N K
BlockUpdateEvent() or smt
😦
tf what is that name
wait
block from to event iirc
if we cancel blockupdateevent
Does BlockFromToEvent really exist? lmao
and im
no one?
ICH BRAUCH WASSER
nope
😦
no readme
Why not listen to the cobble forming
does it have a resource page
Hi! I am waiting since 25 days for my PullRequest (https://github.com/SpigotMC/BungeeCord/pull/3057) to be reviewed. It may not be appropriate but its a long time, so I am just asking this question. Thank you.
i think the reason i didnt go with that is because i couldnt set the block during the event
you can cancel the event and set the block manually
dont remember
Or just override the old block one tick later
cancelling the event fucks plugin compatibility though
But yes it would be nice if it had a setNewState
Hey, I made a plugin so enchants multiply with a specific number. Basically when I have 2 sharpness 20 swords and i combine em in anvil, the new sword will successfully be sharp 40. But if i have both sharp 20 swords, but they both or one of them has more than 1 enchantment, the numbers stay the same and dont go up as they should.
Heres my code
https://pastebin.com/Ld8Nz4Yb
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
40?
ty !
hardcore
Someone PR a setNewState for that event, i'm lazy
I have no idea what .set() does I dont even have that option
it actually seems to work
thats a lot of unnecessary empty lines and nested statements
@wraith rapids man my plugin doesn't appear on the server
i did
I did a variable ?
[21:42:08 ERROR]: Could not load 'plugins\Soldier.jar' in folder 'plugins'
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:160) ~[spigot-1.16.5.jar:3054-Spigot-4225eac-f3ed1ac]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:144) ~[spigot-1.16.5.jar:3054-Spigot-4225eac-f3ed1ac]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:382) ~[spigot-1.16.5.jar:3054-Spigot-4225eac-f3ed1ac]
at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:224) ~[spigot-1.16.5.jar:3054-Spigot-4225eac-f3ed1ac]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:928) ~[spigot-1.16.5.jar:3054-Spigot-4225eac-f3ed1ac]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:273) ~[spigot-1.16.5.jar:3054-Spigot-4225eac-f3ed1ac]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_291]
Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
... 7 more
have you tried reading it
needs plugin.yml
but look
is it in src/main/resources
yaml parser
Also make sure it's in the exported jar
that last line will cause problems
why
'
or "don't"
Fair
big brain
or just dont yeah
do not
Do'nt
I want to paste a schematic via code, while I have worldedit installed right now, I don't intend to keep it like that, Can I paste schematics async without having worldedit/fawe installed?
you said that
you cannot paste things async, period
FAWE will try
not with worldedit nor otherwise
just slowly pasting it in then, like only a few dozen blocks at a time?
https://github.com/Redempt/RedLib/wiki/Multi-Block-Structures redlib has some stuff for it
@sage swift
Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
yes, just call setBlock a million times over
You can place quite a few blocks per tick if you use NMS
yeah but that doesnt support schematcs, right
nope
so what do i go with here
you definitely cant support schematics without worldedit, lol
@wraith rapids help pls
lol
Idk
Since it's in src/main/resources I hope Maven/Gradle
no
probably using ant now
lol
n0
yes
Wrong
so you did give up, but only halfway
run as -> maven install
but maven install doesn't do anything
no
Forget where that is with maven
mvn clean package
i had to use a youtube tutorial because it didn't work
I used install /shrug
it compiles to the target folder
real men deploy directly to prod
lol
where does it go?
we just told you
.
I wish the quote button still existed
It would be fine if it was persistent
why
Source Option 5 is no longer supported
okay wait
Use 7 or later
^
change the compiler version in the pom
lol
What is Java 5
why can you not read anything
lmao
@paper viper return
literally every issue you have had until now is you not reading things told to you
you either skip reading them entirely
or you read them, don't understand, and then forget about them
but you didn't tell me what Java 5 is
how is it physically possible for someone to be so complacent and slothful
java has its own versions
A VERSION?!?
but you DIDNT TEL me what JAVA 5 is
I just did
did you try searching google with java 5?
And that too
did you try doing anything yourself?
if you have java 8 installed (really hope so)
go to your pom.xml, change the version from 5 to 8, that's it
im stupid
I just said that Java 5 was just one of the major versions in Java
Java 5 is a version of Java released in 2004
...
People born in 2004 are 17 this year
noob at life
I updated Java just today
People born in 2004 are 17 this year
thats not the point lol
what is it
lol nvm my bad
that skeleton guy says im not doing anything
lmfao
i don't even
Lol
THis is hilarious
hitler
gecko you're good will you tell me what to do
maybe gecko will take you to the 1.8 support server
I AM NOT
anyway
wtf
i suggest you guys reading #general and his messages today
uhhhhhhhhhhhhhhh
i updated java just today
i dont think he acts like 12
fuck off i dont like you
i am literally the only one helping you
to quote myself, i dont like you either
now, you need to go into your pom
then fuck off
but yeah, that's humanity
and specify source version as 7 or 8
you arent respecting me
and that's what you probably never learned, so don't expect to get respect
piece of shit
who me or him
heyo chill
im doing whatever i can
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
add these properties to your pom
you are capable of copy pasting text, yes?
yes
guys, you can't talk normally to him... really
or shall I mail myself to you with fedex and do it for you
i told you to fuck off
show respect to me, and i will show respect to you, it's that easy
you're the baby sucking on my man-teats of programming knowledge
you are talking shit
you shall beg and bend your knee at my feet
Respect should be both sided. If one side does not show respect there is no point in showing respect on that person
return;
please keep it clean! It's for coding help 😦
@quaint mantle someone is being disruptive
i'm a pretty clean guy
do you want to get bombed in the crossfire
I came for coding help and this guy started shit
oh yeah show me your tongue
i just ate some cookies
what did I do? :/
i ate a granola bar
i bet you wish you had cookies
the only cookie i have is my third-party identifier B)
Nothing. I just recommend you to not enter in to conversations like this just in case people start attacking you in the crossfire :D
the cookie monster eats my browser cookies
you almost did it right
you need to paste it between <project> and </project>
since it's part of your project
i dont like going in it like this, but didn't your mother told you to respect people?
You show no sort of respect. if you want i can show everyone here what you wrote all the day today.
I say it a last time. Have Respect in here, this is not your bubble of friends, where you can do whatever you want.
Be respectful to people, and they'll be respectful to you, of course.
Thats the last thing i tell you
can you handle doing that
you started it you shithead
protip: you can press ctrl-z to undo an action
unlike in real life, where you will forever be held responsible for calling me a fucking skeleton
you look like a skeleton
santa hitler boner
i have no clue
i guess it's there to add perms
i've never fucked with permissions beyond registering some in a plugin
well, i always used my own permission system, so idk
luckperms-hacked.jar
I just use vault
and realizing that discordsrv bricks the garbage collector because it checks the perms of like 50000 users in a single task
not really
which invokes a billion regex matchers
just like a file with Strings (permissions) bound to uuid's, and if's to that. that simple
the background role sync task
amogu
because PermissionsEx is still unsupported, and i dont like vault/luckperms
well i dont like you
return (Main.get().getConfig().get("activeBeds." + player.getUniqueId())) != null;
will that return true when its not null and false when its null ?
you can't simply add permissions iirc
what is it set to
or is it a list
because if its a list you should check #contains, not != null
it just
activeBeds:
playerId:
beds:
'1': 1
'2': 3
where player id is the player.getuniqueID
it will return true if it's not null
use getConfigurationSection
I mean you can simply add them with the vault api
is it just me or sometimes spigot does not update the file when posting a resource update
yeah, but iirc you can't manage perms without permission api's
except #hasPermission
Yeah but that's why you have a permission API
i dont like depending on stuff
and yet PermissionAttachment is beyond me
except spigot
You only need to depend on vault
literally any competent perm plugin replaces bukkits permission stuff with its own impl of stuff
yeah, so you have to have vault installed on the server. and i don't like that, just dont ask why
vault works if you need to access things like groups, but, vaults pretty dated
i liked the api of PEX tho
Still works with modern permission plugins
And saves you working with 7 different plugin APIs
thats why i use my own Permission-System 
i mean, it's simple, but working
spigotmc has a support-desk? holy
that's nice
is there a way to affect all the values of a section in the config at the same time?
playerId:
beds:
'1': 7
'2': 2
playerId1:
beds:
'1': 10
'4': 16
playerId2:
beds:
'6': 4
'1': 8```
i want to set everything under beds to the num--
maybe * ?
i cant remember
for (String key : config.getConfigurationSection("activeBeds").getKeys(false)) {
is there a way to detect for an item in a players inventory
if (player.getInventory().containsAtLeast(item, 1)) {
Who know luckperms API I have problem
they have a discord, but sure, go ahead
wut
its on the plugin.yml as well
Solved the problem by making a new project and just basically copying the code and pasting.
do i have to do that
first of all: the Objects.requireNonNull() is doing Nothing, like you can see. you can probably remove it.
2nd: i guess testCommand() is not a class?
if it is, why tf do you call a class in lowercase
testCommand is the only class i have in lowercase to avoid problems,
what kind of problems?
its just a test class i use to test things inside my proyect
a small command executor
that runs a part of my code
if i do Bukkit.getOfflinePlayer() and the player is online what happens
to see the output without running all the events and classes
yo it says the class YalmConfiguration doesn't exist on spigot 1.8.8?? anyone knows why
version: ${project.version}
main: me.paradis.main.Main
api-version: 1.16
authors: [ Paradis ]
description: a bed plugin for Toxic
commands:
beds:
description: "adds a default respawn location to send the players when they close the GUI"
usage: /beds [add/remove/player]
test:
description: "test"
usage: /test```
with ````this please
oh
yo it says the class YalmConfiguration doesn't exist on spigot 1.8.8?? anyone knows why
looks right
lmao
Yeah. Because you use an old ass version
1.8 isn't supported here
is there another type
ok
so I won't be able to use custom config files? x/
on 1.8.8
1.8? i used to play that minecraft version like 9 years ago
yeah, that doesn't change the thing that it's old-ass and therefore not supported here
why tho?
ok so you won't help me ? -.-
i personally don't, because i don't code with 1.8 since years
so you have no idea why it wouldn't work?
what exactly is the issue?
I'll check that
so lucas, you get a NoClassDefFoundException
i usually get that when reloading, or exporting into plugins-folder while server is running.
maybe try a clean restart, or exporting it with server closed?
or even Try Call the Class in ThisLetterCase? (idk how that case is called lol)
@sharp bough
oh okay nvm, what was it
yeah, never call a class lowercase
lol
maybe it got confused and thought it was a method, because... lowercase, idk
i have all my classes in lowercase, i do define functions with upper case
hah just joking
please don't do that
ok the clas YalmConfiguration is suppose to exist in 1.8.8 but I can't find it
it says it doesnt exists
if you are doing a plugin in 1.8.8 you are either really good or really bad
wich one is it
smoothbrain
tf
mister? lol what did i missed
YamlConfiguration*
yes
I typed it correctly
several times
didn't work
it's like the class doesn't even exists
it does
look at the right side
i ditn't enabled dualwindow reasonless
I love those colors how you do that
real men use red
red is gross
you're gross
girls
Thanks
Think you misspelled "darkest dark" as "red" there buddy
can you send a ss from your org/bukkit/configuration/file package, with all of it's files?
from the spigot package ofc
ok, so the file does obvly exist
if not, you would probably get thousands of errors tho
rebooterino
what means cant access
lolipop
there's your issue
have you tried importing it
you wrote YalmConfiguration
kekw
it's YAML
xd
I am so sorry for all the trouble
happens to everyone tho
sure
i dont think YALM exists in any world
No clue
cuz i didnt write that line
but yeah, like a year ago i forgot semicolons, and opened forum threads... so i feel you xd
the IDE is able to fix up some simple typos in class names
ommgg lmaoo
what does the * do in config.get() ?
wdym
probably nothing
i saw it once a guy using config.get("example.*")
that doesn't look like it should do anything useful
gets all keys
to get all keys, you should getConfigSection and getKeys
yeah thats what i do but you dont have to
or is the * returning a list or smt
that's my guess
bit like @a in mc
never seen anyone do that or even mention that
same
Does the PlayerInventory class have the methods where i can place an item in a specific slot.
of the inventory
PlayerInventory#setItem(slot);
Thanks bro!
FileConfiguration config = YamlConfiguration.loadConfiguration(file);
config.set(uuid.toString(), permission);
config.save(file);
does this actually save the Config?
(Testing it would take much time, so please don't tryItandSee' me)
tbh try it and see
god you got it dude
but yes
this should write the entire config to file
including the updated uuid key permission value set
@EventHandler
public void onInteract(PlayerInteractEvent e) {
if (e.getItem() == null || tracker == null) {return;}
if (!e.getItem().equals(tracker) || !stalkers.contains(e.getPlayer().getUniqueId())) {return;}
Player stalker = e.getPlayer();
if (runner != null) {
Player blockrunner = Bukkit.getPlayer(runner);
CompassMeta compassMeta = (CompassMeta) tracker.getItemMeta();
if (compassMeta != null && blockrunner.getWorld() == stalker.getWorld()) {
compassMeta.setLodestoneTracked(false);
compassMeta.setLodestone(blockrunner.getLocation());
} else {
stalker.sendMessage(ChatColor.LIGHT_PURPLE + "You cannot track the runner because he isn't in the same world as you!");
}
tracker.setItemMeta(compassMeta);
} else {
stalker.sendMessage(ChatColor.DARK_AQUA + "There is no runner to track!");
}
}
it's an api, so i would have to implement it in a plugin first lol.
question was only like, if config.save(file); does act the same like saveConfig();
when there is a stalker and the runner is null it prints there is no runner to track
so that works
but when there is a stalker and a runner, it doesnt track the runner
Well saveConfig internally just calls save(File) on the FileConfiguration that represents the config.yaml file
what in the world is tracker
its a compass itemstack
but you never give that stack to the player o.O
i do
the itemstack and item meta are not consistent through spigot
there is a command
no
no
after giving them that item stack
you have to re-apply it
huh
that's why people use ItemBuilder's
it no longer "syncs" with the item stack you passed in
tracker.setItemMeta(compassMeta);
^
yes, that is your single item stack defined somewhere
right at the end
i did that
but it only matters when you add the item to a players inventory
all modifications after that do not modify the item in the inventory
if (Bukkit.getOnlinePlayers().toString().contains(args[i])) {
stalkers.add(Bukkit.getPlayer(args[i]).getUniqueId());
Main.main().tracker = new ItemStack(Material.COMPASS);
Bukkit.getPlayer(args[i]).getInventory().addItem(Main.main().tracker);
} else {
invalidPlayers.add(ChatColor.RED + args[i]);
}
i add the item to the players inventory using a command
yeah
read
once i do the command i trigger the event
what we are saying
you have to re-apply the meta to the stack, then the stack to the player
oh
because the player-existing stack is still the old one
almost all get operations in bukkit clone the thing you get
you re-apply the stack to the player, yeah
ok
meaning that modifying the thing you get doesn't change the original thing
why tho
that's just how it works
how would that work over a server restart in your case lol
Hi
spigot just magically tracking all items that were created from your tracker variable ?
if you get an item from an inventory, you're actually getting a copy of it instead of the actual item
lol
if you get meta from an item, you're actually getting a copy of it rather than the actual meta
oh ok
that's pretty much the same like this:
s = "i'm a String!"
that's not updating it in the map
after I used maven and tried to compile the plugin everytime it says in the console couldn't find main class: <class path in plugin.yml>
your plugin.yml is in the wrong directory
it's in resources
then it's right
put it in the jar manually with winrar or something, i don't know
but the plugin.yml needs to exist in order for it to complain about not finding the main class 🤔
it's there
yeah, that isn't your issue
lol
have you opened your jar file and investigated ?
content wise
wait what are we talking about
he likely did
oh right you're the guy who has the main package name issue
i told him to look and send a screenshot and unless I'm blind the class path and the value in plugin.yml are both correct
i don't know why it doesn't find it
probably for the same reason, my #getDataFolder() returned null like a year ago
to scam kids out of their parents' money
nobody knows 
its like saying we're hosting the servers, but its way worse than hosting
well, because they still think that people buy realms
because you can't fucking do anything
because they're dumb
people do buy realms
on bedrock that's understandable because you cant always host a server on a the specific platofrm
who tf buys realms lmao
the absolute number of 12 year old pimplish fucks that play on realms is insane
i think realms is like the inbuild twitch streaming-feature
almost nobody ever used it
what even is the point of realms
lots of kids do
servers
cant u just do that with a server
without hanging around with dumb hosters like Bisect etc
like a free server
idk what the pricings of realms are tho
i think its like 10 bucks a month
My code is is in src/main/java/<my package>/<the class>
like if you look it up on reddit or some other tard infested site, you will find massive boards and communities full of normies who play exclusively on realms
$7.99 USD per month.
and think it's the shit
how is the performance?
iirc they rent from like amazon aws or something
of course you do
idk
so the performance isn't very good
never tried it
but why do hosters like Bisect exists?
``Realms is build upon the Amazon EC2 cloud, it'll be one of these standard instances:
``
because people don't want to hang around with that stuff
that's natural selection
but scamming kids goes beyond the line for me
that's capitalism
german youtube in a nutshell tho
rockstar games in a nutshell