#help-development
1 messages · Page 2164 of 1
But you can also use the tarball and run maven through ./apache-maven-3.8.5-bin/apache-maven-3.8.5/bin/mvn with the proper maven stuff
getType().getKey(), but yes
Does that have the minecraft: or would I need to add that?
I don't know how
and is it lowercase?
What should I do now?
for the namespace?
It does. It returns a NamespacedKey object which, when toString()'d, will return the namespace:key format
Don't know what? Unpacking tarballs?
Ah thanks
i mean i dont use it like this
@worldly ingot i only use item types like this
public void onInventoryCloseTransmuteSmithing(InventoryCloseEvent event)
{
if (event.getInventory().getType() == InventoryType.ANVIL)
{
if (event.getInventory().getItem(1) != null)
{
ItemWrapper item = new ItemWrapper(event.getInventory().getItem(1), null);
if (!item.getOriginalMaterial().equals(""))
{
item.getItemStack().setType(Material.valueOf(item.getOriginalMaterial().toUpperCase()));
event.getInventory().setItem(1, item.getItemStack());
}
}
}
}
``` xD
to make other crafting materials but vanilla ones be able to be used as smithing material
@quiet ice there certainly has to be something wrong here. I got the same error again...
[ERROR] Error executing Maven.
[ERROR] java.lang.IllegalStateException: Unable to load cache item
[ERROR] Caused by: Unable to load cache item
[ERROR] Caused by: Could not initialize class com.google.inject.internal.cglib.core.$MethodWrapper
I cd-ed into the folder and did mvn clean install
and I got this error
actually i'll just google it
How do I add a custom tag to an item stack?
?pdc Use PDC for custom tags
So I have this and it doesn't break the item ItemMeta meta = item.getItemMeta(); Damageable damageable = (Damageable) meta; damageable.setDamage(Integer.MAX_VALUE); item.setItemMeta(meta);
why isn't it
you have to manually reduce the amount
?
ItemStack#setAmount(ItemStack#getAmount - 1)
but -1 repairs it
if the health of the item is below 0 you have to do that
its setAmount, not setDamage
Cannot resolve method 'setAmount' in 'Damageable'
I did specify ItemStack
that would decrease the amount of the item but not break it
it want it to break
which is the same thing
no
the sound and animation
and there is also a condition that should reduce the durability and not break the item entirely
so I need to know this
So what happens when you do this
https://bukkit.org/threads/solved-item-break-on-0-durability-help.91444/ This but don't set it to null. Ive had the server crash on me because of that.
I just reduced the amount instead of setting to null
there is an effect for that
spawning particles and playing sounds is easy
how do I use public static final EntityEffect BREAK_EQUIPMENT_MAIN_HAND
i dont understand
geol sorry if i was a bit difficult but things finally worked out and i have a functioning plugin so yeah... thanks
oh good to know
time for me to get into plugin development and learning java
generics, lambdas and that good stuff
That is because tarballs are usually either source or are used for portable installations. In maven's case it's latter.
There is no standard way to install tarballs
I found instructions in a .txt file inside the archive
Ah nice
I wasn't sure how to follow the instructions but it worked out somehow
now i have latest version of maven and it works
why does it say Cannot resolve method 'playEffect(Location, EntityEffect)
because that method doesn't exist
BungeeCord
How to check if section contains a key?
I want to check if it contains "permanent"
for(String s : Main.getPlugin.discord.config.config.getSection("roles").getKeys()){
if(Main.getPlugin.discord.config.config.getSection("roles").contains(s+"permanent")){
Main.getPlugin.getLogger().info("Not NULL");
}else Main.getPlugin.getLogger().info("NULL");
}
Well those are lists, not sections
declaration: package: org.bukkit.entity, interface: Entity
that takes an entityeffect, not a location and an entityeffect
oh
so I need to get the list and check if it contains "permanenet"
Solution for those having same issue:
for(String s : Main.getPlugin.discord.config.config.getSection("roles").getKeys()){
if(Main.getPlugin.discord.config.config.getSection("roles").getList(s).contains("permanent")){
Main.getPlugin.getLogger().info("Not NULL");
}else Main.getPlugin.getLogger().info("NULL");
}
getStringList() is probably more appropriate, but yeah getList() works too
it contains Long , String
your pfp makes you look like one of the discord developers
player.playEffect(EntityEffect.BREAK_EQUIPMENT_MAIN_HAND);
didn't break the item
It does not break the item, but it will play the effect as it it broke. To actually break the item, just set the material to air or something like that
ok
dont make your fields public lol
can some1 help me about nms
i did everything i needed but i cant still use it in my code
Sounds like you didn't do everything you needed. Are you using maven or gradle and what version of Minecraft are you targetting
use any class of it
So what class are you trying to use
Rerun BuildTools with the --remapped flag
how do i do it with the flag
java -jar BuildTools.jar --rev 1.18 --remapped
I still highly recommend updating to 1.18.2
If I use Bukkit#getOfflinePlayer on an online player id, it should still return the offline player and when I do getPlayer I should get the online player?
Yes
alr, don't use that method from a while lol
well that offline player will be the player instance
What event gets triggered if a player is blocking with a shield?
playerinteractevent?
this only get triggered if the player clicks the shield not if he's holding the shield
?
i figured out
you can check if the action was a right click, and if the item used was a shield
Whats PathFinderPetGoal name in mojang mappings?
public static String getString(ItemStack item, NamespacedKey key) {
return item.getItemMeta().getPersistentDataContainer().get(key, PersistentDataType.STRING) == null ? null : item.getItemMeta().getPersistentDataContainer().get(key, PersistentDataType.STRING);
}``` i'm getting an npe in console when i try using this method on certain items (which is expected). how can i prevent the npe while still allowing null as a passable object?
dont allow passing a null value lol
item.getItemMeta() can return null. You are also calling get twice which is unnecessary overhead.
yeah it used to be just return item.getItemMeta().getPersistentDataContainer().get(key, PersistentDataType.STRING) but i thought adding the extra bits would fix it
PS:
if(item == null) {
return null;
}
people that add brackets to early-returns 
People that dont 
best thing
Google code style
:(
Every statement needs a body
It's generally for readability of the code
but even when i have an item in my hand that doesn't contain data of the specified key, it still returns npe
^
Just because you can shorthand something doesn't mean it should be
Jesse
Hello
Jesse
Then check for everything that can be null.
If you use intellij then it will warn you when something could be null on runtime.
Ah. At least my name is affiliated with a good show about paying taxes
uhuh
I do prefer my early returns without brackets, it is just too much bloat for me
or just give me elvis operator
another question, what's the Object type i put into my method param for me to just pass PersistentDataType.type
One moment
that code doesnt make sense lol
if its null return it but when its not null also return it
smile looking for the spoon
I would prevent null values wherever possible.
Using Optionals will help you write code thats more null safe.
public Optional<String> getString(Entity entity, NamespacedKey key) {
return Optional.ofNullable(entity.getPersistentDataContainer().get(key, PersistentDataType.STRING));
}
disgusting creature
optionals are only good in rust
In addition you can use intellijs annotations to get better code analysis.
public Optional<String> getString(@NotNull Entity entity, @NotNull NamespacedKey key) {
return Optional.ofNullable(entity.getPersistentDataContainer().get(key, PersistentDataType.STRING));
}
so that i dont have to make a method for each type
Aha
ima just leave now before more damage is done
is Persistentdatatype generic?
Yes
Yes. PersistentDataType<Primitive, Complex>
Which for me mostly means <String, AnythingICanThrowIntoGson>
lets go from an integer to an integer ;/
ye
I mean, makes sense tho doesn't it ? 😅
no
I mean, yea you could have used a different system for custom data types and primitive ones
but two systems are meh
in what way should i get the actual database implementation class?
https://github.com/FourteenBrush/xKingdoms/blob/cfb23560d256172dbaab1d3b7c42a3ff31949262/src/main/java/me/fourteendoggo/xkingdoms/Xkingdoms.java#L24
i was thinking of putting it as a field in the StorageType enum
dont like manual switch
no just Map<String, Function<ConnectionProvider, Database>>
Like with enums you'd most likely have to do some conversion anyway to get the user supplied value to the actual enum name anyway
and beyond that the enum does not really have any benefit over a simply registry
Oh god
Didn't know atomicreferences were a thing
That would've solved so many of my problems
I used concurrenthashmap instead
i was thinking of putting the database class in the enum as an extra field but that would probably give problems getting the right constructor parameters from somewhere
how would i go about making a class that just stores a bunch of hashmaps
stores ?
i havent used enums much, would that work?
What would the hashmaps be storing?
then each enum constant would have to store a map
why would that be different maps tho
what will happen if i cancel an already cancelled task?
aren't all of those part of the item itself
nothing
Try and see
1 map per item
multiple plugins can cancel an event
i dont want to see bugs happening
ig i'd also need a main map for all the items too
No
the one with the highest priority wins
Why don't you create a customitem class
^^
That stores all the data abt that item
what would that look like?
also do you mean like 1 item per class?
yes but you can make a customitem object for every custom item
and store in a map
oh ok
like Map<ItemStack, CustomItem>
how would i fill each one up
like map.put("key", new CustomItem(itemstack, int, int))?
looks kinda sus
actually im wondering if i can achieve the same thing with a Function<Xkingdoms, HikariDatasource> as with this?
yeah
well
you should change ur class naming to
XKingdoms
hmm ye
and i would recommend
either extending Supplier<I, O>
which has the method
O get(i i);
or changing ur interface to that and making the datasourcesupplier
to a class
supplier only has one generic type
but would it work with that function?
extend a function
yeah
Is it possible to regenerate a chunk that has been inactive for some time? if yes how i can do it ? thx
Chunk#load?
@grim ice i guess there's a better way
dunno why you told me to create a Supplier<I, O> but its literally the same as a Function
Probably the name
lol
ok but how i can know when the chunk is inactive for one week for exemple
what do you mean by "inactive"
not loaded for one week, for exemple
U wanna regen the chunks?
I'm not sure how to delete a chunk but I'll tell you how to do the one week part
Just store a timestamp every time the chunk is loaded
a world contains thousands of chunks lol
yes
Cache it and then store to a file every x mins
that were ever loaded tho
that's what i was going to do
Don't save the file every time a chunk is loaded tho
nice theme
U cna use sqlite
but I don't know how to retrieve the necessary information ^^'
Use sqlite
Store it in a table with 4 columns, world, chunkx, chunkz, lastloaded
Then select * from table where lastloaded < now-1week
Then u have all the chunks that meed to regen
h2 for the win
I've never used h2
mmh ok but what function to use to retrieve this information about players entering the chunk?
??
h2 has the same syntax as mysql but its an embedded database and thus faster
whats the best way to get a player's active potion effects and put them in a list, but set the time of those effects to 60 seconds?
thsi is what i have rn
List<PotionEffect> effectList = new ArrayList<>(player.getActivePotionEffects());
effectList.forEach(potionEffect -> potionEffect = new PotionEffect(potionEffect.getType(), 1200 /* 1 minute */, potionEffect.getAmplifier()));
Kit kit = new Kit(irrelevantArg, irrelevantArg, irrelevantArg, irrelevantArg, effectList, irrelevantArg, irrelevantArg);```
how i get chunk information
I already told u
Here
oh hi minion
Wait what mc version are u using?
Yes but before putting them in sqlite. What is the function to know if a player has entered the chunk ^^'
You can use player move event but why do u wanna know when they enter
Why not regen it when the chunk loads?
Hey
Chunks have a persistent data container so u don't have to use sqlite
Because I watch when the player enters, I note the TimeStamp in SQlite and I check each time the plugin starts each chunk to know if there is one where no player has entered for 1 week
whtats the best way to convert a collection to a list? new ArrayList(collection)
if no one has entered for a week, I regen
What mc version
1.18
Wjy do u wanna regen when the player enters and not when the chunk loads
U can store the timestamp in the persistent data container
I tell myself that if the player enters it, he loads it, but thinking about it... not quite ^^'
Yeah chunks load around a player before they enter them
Also store the value when the chunk unloads
ok, i'll try it :p
Lol
im sorry 500fps
im on a macbook
pog
question
uh
Player#performCommand can run bungeecord commands right?
say I add a command through bungeecord plugin
macbook >
can that method in player run it?
I know but there is a different between just clicking one time or holding the click
stfu
wtf
just die
:((
jump
ok but what about my question
done
not really sure what you mean
look you can click just a second or hold the click for 5 seconds
do i have to use bungeecord plugin channels instead of player#performCommand with "server [servername" as an arg
Don't think so
yes?
U have to use plugn messaging channel
oh k ty
finally my onenable method is compiling
lmfao
https://github.com/minion325/VariableEnderChests/tree/master/src/main/java/me/saif/betterenderchests/data @tardy delta
This is how I store data
you're blocking with the shield if you are holding the click but if you are clicking only one short time you're only blocking for that short time. I want to check if the player is currently blocking so if he is holding the right click
Nowehere as clean as your setup
the PlayerInteractEvent only gets triggered if the player starts blocking not when he IS blocking
what about doing the stuff async?
Oh that's done from the enderchestmamager class
why do things need to be async
^
then it seems like you're looking for a method, not an event
😮
thanks
that helped me alot
np
Didn't know abt atomicreferences so i create data snapshots to save
whats atomic stuff
oh is that why it asks me to use an atomic when im looping async?
in a scheduler
I mean you can still use data snapshots in combo with atomicity
is player inventory clientside? or can i create something that will open a different GUI when opening inventory
Player inventory is client side
pretty sure its clientside since u can open it instantaneously even when u have hella lag
Hey - I've got a bit of a question but due to the nature of it I'm unable to ask in a public forum and would require to talk to some staff in private. I don't want to be the guy who just sends unsolicited DM's so I'm just wondering if I'd be able to talk to someone (It isn't some dumb development question, it makes a bit more sense with context)
sure send over a dm
You aren't staff 🙃
I have no idea
It's related to development, just unsure if something aligns with guidelines and I'd like an explicit answer since it's kind of in blurred lines/vague
Bruh I'm so curious😂
if its so bad you can't post it here its probably not allowed lmao
It isn't bad - the previous version md_5 authorised
this discord is lax as fuck with rules
I'd just rather it didn't get out
No?
Ollie I’m only a moderator on the discord so Idk if I am to much help here, but try Choco, he’s usually available :3
bruh most other public discords banning you for saying something slightly off hinge
We still follow rules to the letter tho but sure
I wanna get a players skin offline but I'll only be getting the skin of players that player before. Should I just save thw textures to a database on login?
I feel like this is the best soln
use UUID
for players skulls yea?
if you have UUID stored somewhere you could prob grab it
if your making some like top 5 balances and stuff you can just store that as all of it is determined while the player is online
well ik this prob isnt the right place to ask
Well ye
well what a broad question lol
^
What type of ai?
what kind of AI
It's for friends lost
Machine learning
uhhh do u know a place to learn from
I think it involves computer science too
well I'd start Machine Learning with python
well i wanna do it with java
Sure do
is that bad
do people make AI in java even?
YEAH
Tho yeah there’s a lot more material covering it in py
i thought that was a C/Python thing lmao
DEFINITELY DUDE
ive seen many libraries for it
its just that
i have a skill issue called not understanding
I mean python and C are going to be inherently better for machine learning
good start is there
its basically english
yo im trynna make it so that if a player opens their inventory an item is added to it, but its not working? Thoughts 🧐
Hello! is it possible to trigger a console command in an asynchronous methid?
It takes 20 minutes to learn python at maximum assuming you know Java already
why does it have to be async?
Well its on a websocket event
You can schedule to command during the next tick with the scheduler
SciKitLearn is a very good MachineLearning library
are you talking about their personal inventory?
Oh thats what I would want
?scheduling
I have a feeling somebody didn't study for something
that doesnt trigger InventoryOpenEvent unfortunately
😢
i thought it would lol RIP
yeah its clientside
btw
Oh interesting
it does trigger interact event tho sorta sucks
Yeah I just thought intuitively it was talking about the player lol my b
idk I only use scikit
like when clicked
I made an AI to fully predict my school lunch schedule
yes but you have to wait for them to click it lol
tbh I have no clue of the quality of this video but its short and if your cramming there is no time wasted especially if you only got like 20 minutes lmao any knowledge is useful for you at this point
🔥Start learning today's most in-demand skills for FREE: https://www.simplilearn.com/skillup-free-online-courses?utm_campaign=Skillup-AWS&utm_medium=DescriptionFirstFold&utm_source=youtube
This Scikit-learn tutorial will help you understand what is Scikit-learn, what can we achieve using Scikit-learn and a demo on how to use Scikit-learn in Pytho...
So if they open it with hotkey it wont activate!?
public void onOpenInventory(InventoryOpenEvent event) {
if (event.getInventory().getType() == InventoryType.PLAYER)
}
thoughts?
you can do it but it will never trigger
y
Client side
oh yeah
Server has no idea if the player is in the inventory or not
except when you click in it
Yeah
savage 🤟
They really don't need one for the game
fair
yeah but for devs specifically
you need to find another time to add your item to the inventory
they do stuff for modders all the time
Meh
More like for datapack developers
well in the past years moving more towards them yeah
can you tell more about what you want to do ?
make it so that if a player opens their inventory an item is added to it
you already said that
when they open their inventory for example a berry or block or whatever is put into their inventory
thats it
can't you add the item at another time like before that ?
i mean if its always gonna bethere when they open their inventory
just make it permanently in their inventory
yes
oh i see
unless there's a situation you don't want the item to be in the inventory, which is why I wanted more explanation
so your saying for go the event entirley and just add it
yeah pretty much
but have a way so they cant modify or move the item
then you should be good
ok thanks twins 🤞
if the item has to be in the inventory the all time you can add it in the PlayerJoinEvent
Here is the entire task i was told to do
the way it was worded im assuming it is when they open the inventory
but im not sure
to me that sounds like make a chest gui
"an inventory"
lmao
thanks twins
fr 💯
can't wait to see the fourteenth task
uh



Develop a plugin where if you shift 10 times in 5 seconds(after 5 seconds it expires), you will explode.
thats number 14 lol
what sorta plugin is this lmao
just a runnable
idk he gave me fifteen tasks and was like do these and i'll hire yo ass so im doing them 💯
I'm guessing it's not very well paid
Or not paid at all
idk im just bored during the summer so im doing this 💯
better to have some coding stuff on my resume if im applying to a computer science program for college
"Minecraft, level : expert"
you get it twizzy 🤞
i have like 4 java jobs behind my belt and they didnt accept me into uni lol
do u live in america?
it may be more competitive where your at
where I am it's less competitive there either is uni that accepts everyone or the schools that just look at math grades
also uni is free
ok so
- what iis a multilayer config
- what is a seed
- what is a l2
- what is it XAVIER or weightInit
- what is adam or an updater
- what is a convolution layer and what is a stride and a nOut
- what is an activation
8, what is a kernelSize
9 what is a softmax or a lossfunction
whats that
hmm it’s still not working
when i open the chest added to the player inventory
oh shit a brotha using the wrong event 🤦♀️
used an inventory open instead of click
What event get's triggered if you put an item into your offhand IN your inventory?
inv click probably
what would I put in place of "plugin" here?
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
you don't need to add an actual chest to the inventory to open a custom chest inventory
@EventHandler(priority = EventPriority.HIGH)
private void onRightClick(PlayerInteractEvent event) {
if (event.getAction() != Action.RIGHT_CLICK_AIR && event.getAction() != Action.RIGHT_CLICK_BLOCK)
return;
event.getPlayer().sendMessage(event.getAction().toString());
event.getPlayer().sendMessage(String.valueOf(event.getItem()));
}
why doesnt this get called when the action is right click air?
and it's called twice when it's right click block
1.18.2
built abt a week ago
it does
my bad
i figured it out
what was the mistake?
right clicking air with nothing doesnt call playerinteractevent
air with nothing means no interaction so not an interactevent ?
he already got it...?
still calls it twice when i right click a block tho
you have 2 messages?
2 messages
ah
when i have an item i see
only one time if you have an item?
i'll copy code and try to find the mistake
ye
java 17 or 18?
i dont think so
i was abt to joke about how u had a toString and then a String.valueOf until i realized its probably for null safety
omg is java 18 a thing lol
yeah it is
xd
no even java 7 would run that code
that's what i thought
same after that
did u run it?
i must craete a project real quick
no 1 ms
well yes
that's in the same tick
Anyone know how to get an item's nbt?
okay its building now. Let me just create a server then i test it
What is the int of the offhand slot?
ty!
so...
so a bug?
gonna throw exceptions ig to see where it's being called from
i know why
why?
If you do this without an item it will trigger for Main and Offhand
i fixed it by doing a hand check as the pic says
how did you do the handcheck?
huh?
playerinteractevent?
yes
1.18?
yes
idk then
For me it's working with maven
what was it?
some methods are still the same
anyone know how to fix not being able to see another player when teleported to another world?
What do you mean?
I'm trying to start a server that's a c/p of an example server but it c/p another server (which is in a different directory)
IOUtils : https://pastebin.com/HKbve2Yh
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.
if someone has an idea I would appreciate it
what is the problem?
what is c/p
yes...?
the debug at the beginning shows me it's server 1 path being copied
but when I log in it's server 2 map
well maybe its like a plugin. If you delete it while the server is running, it still works. Because the server make a temporarily backup of it and runs that.
You need to restart the server after that maybe
but if you restart the server will maybe override your 1 map to the 2 map
restart what server ? I don't understand
well its a plugin right?
both example servers 1 and 2 are off
and its copied?
it's always copying server 2 map regardless the path I'm putting
if I put server 1 path it copies servers 2 if I put server 2 path it copies server 2
maybe it never copies?
I tried starting manually server 1 btw and it works
if I start manually server 1 and log, it's server 1 map so no problem
if I start with the code it's server 2 map even tho debug says server 1 path
is there a way to view the inventories of offline players?
store contents on quit
that makes no sense to me
sure
what's your github username ?
Fluffeliger
isn't the server saving the inventory on quit anyway? Is there a way to access that?
süß
xd
is KN your profile pic ?
its maybe saved in the playerdata of the world but im not really sure. But then you have to read a .dat file
yes
done
doesn't that method return an Item stack
nope
wait
what does it return then
alright
managers/DServer.java
how do i disable Objects.requireNonNull
wdym?
what's the error then
use NBT API https://www.spigotmc.org/resources/nbt-api.7939/
in intellij when you type something that can create a null it annotates it
example:
wait let me just open IntelliJ
i disabled everything that has RequireNonNull in annotations and inspections
and nothing worked
this should be it but it doesnt disable it
idk
oh well i just got another problem that actually has to do about development
when i put more than 3 commands in onEnable the commands after just return the description of the command rather do what it has to do
do you put them in the plugin.yml?
ye
it returns the description so i did add it
lmfao
ironic
:>
still doesnt work
i did add it in plugin.yml before
none of the commands work anymore?
show me it
oh error
nevermind
ironic x2
xd
I got the API but the documentation is a mess, what's the method for getting an ItemStack's nbt? Do I have to parse the item stack to another data type first?
wait let me open IntelliJ the 1.000 time
ok so im getting an error: java.io.IOException: No such file or directory
im gonna paste the onEnable code and the file class in a minute
sure
And the error?
if i remember right you can jsut write NBTItem item = new NBTItem(ItemStack);
show it please
I need it as a string
wdym?
can I just parse it directly?
its in the link
(to a string)
there is a method in the NBTItem
I figured, but I'm asking what it is called, because I can't find it in the docs somehow
i dont know exactly just try it
imma just try .toString()
runtimeexception at lin 41
21*
thats what causing the error
so its something in the file class
but i cant figure out what
what is line 21?
i sent you 2 links
first one is main class and second one is the file class
and the main class at line 21 throws the error
i trusted your Description, is google gonna Swat me?
what?
yes
oh
yeah i told you
yes
yes
then Fix it
do you see your file yourself in your explorer?
wdym explorer?
yes im uploading it to my server
then your server
ew Windows 11
i can not downgrade :c
im not a toddler i know what im doing
ive been coding for a week and everything has gone perfectly
i am simply asking for help for this one error im getting that i cant figure out why it throws an error in the first place
not being aggressive btw lol
ok Big Man
Maybe @crude estuary has an answer :>
Maybe but i'm Busy Stealing Club Penguin Assets to Make my Own
Love it
this clearly isnt a help for development channel
It is, we do what we Can
your problem now => Your file isnt there? Right?
alright lemme rephrase everything ive been writing
excatly
catly i love Cats
xd
I will NEVER read it right again thanks
so im getting an runtime error: no such file or directory
im basicaly trying to create a file called "playerdata.yml" in the file class i sent
the main class is calling the setup() method in the file class but still throws an error
and also if the plugin file was not in the plugins folder it would not give an error
im not sure but maybe its because you done a "," ?
Watermark. just use md5's Paste
?paste
lmao ill just ask on the spigot website
alright my lord
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.
PbtGamer what are you stealing right now?
The Fair FLAs
It might be because access.getDataFolder() doesn't exist yet.
i also thought of that
Maybe this is not the Place
any way i can create it?
ouf
if you want to keep Talking, tell me on General
you can get the parent file of the file and call mkdirs on it.
that should work I believe
the actual folder of the plugin doesnt exist yet
should i just put getConfig().options().copyDefaults(); saveDefaultConfig(); before the custom file?
yeah
alright ill try
what are mkdirs btw? im new to java and spigot development
np
and my plugin seems to be working thanks for helping me out
@fallow violet do you know how to do it with NMS?
do what? @wind tulip
item stack nbt
I don't want nbt tags
I want pure nbt
pure nbt? Like if you run the /data command?
I found this in a hurry
https://paste.md-5.net/wipagosovi.java
From windows 11 to arch lol
Hey, I want to break a block for only one player and still make sure that player can move through the broken block, what's the easiest way to do this?
I've been looking at using ProtocolLib but I'm a total noob and have no clue how to and no threads online seem to have the perfect answer for me
or Just use Windowsfx
you mean only visible broken for him?
Yes but also passable, like when using sendBlockChange and setting the block to air the player can not move through the block
so its only gone for him?
Uhhh, no don't use Windowsfx as it's just a rebrand of Linuxfx. Which was recently exposed for leaking user data. :/
Yeah
I run manjaro
Simple installation and still arch
i have
Knew it, those Brasilians...
i use it right now
ok is it ok if i send you a screenshot of a question i put in another server
hello! I was wondering how I could acess the main class (Banevade) in this schedular. This is not an event class that implements listener.
in your main class make a static variable with hte instance and set it in the onenable. Then you can do Main.instance
Or pass an instance of your main class through via dependency injection.
Ill give it those methods a shot
would it look like this? sorry I am a newbie
basically
Yes
you can make it private and make a method. Looks better
does anyone have a config updater utility something that i can quickly steal?
would be good to make it private and create a getter tho
so people don't annoy you about it
I'm coding a plugin for a 1.12 server and I'm attempting to use Player#teleport to teleport a player between two identical worlds. (Don't ask why, long story)
My biggest problem is if someone is crouched between two blocks you couldn't normally get in between without crouching, or in the case of closed fence gates or sometimes with vines or such, they get teleported to the lowest "safe point" above where they're standing, which people can abuse to get out of the map.
I'm not sure if this is an Essentials thing or if it's something spigot does but Player#teleport will not allow players to teleport to places it deems "unsafe" and I want that not to happen. Is it Essentials messing with it or is it an inbuild Spigot thing, and if so, how do I fix it?
There's really no code to show because the problem lies in the teleport function itself and how to handle it but
Pretty sure that's an essentials thing.
I'm assuming I'd have to take this over to #help-server then? Because I need to figure out how to override it and remove that feature
spigot itself doesn't block any teleports
I figured as much, because that would be kind of silly
exactly
if you like to, you can teleport a player to y500000000000000000
which will most likely crash the client, but you get the point
Probably but I'm not sure if that's something that's easily toggleable.
doesn't essentials have a discord?
Do they?
Is it essentials or essentialsx?
I've seen some plugins do this thing where it will automatically rotate the players head slowly to look at a point (also the screen fades during this) and prevents the player from turning their head away while an interaction is going on. How would this be implemented
Cause I think essentialsx only supports back to 1.16.5 and is about to drop that soon anyways.
What does essentials have to do with the spigot teleport function you use in another plugin?
I think it messes with the PlayerTeleportEvent
I just found the teleport-safety option in Essentials and I'm gonna try to see if that'll fix it
I just wanted clarification that it's 100% not spigot and it seems like it's not from your guys' reactions so
ngl, if essentials messes with teleports from other plugins, thats kinda dumb
Why do u use essentials as a developper
Ig I'm about to find out