#help-development
1 messages · Page 345 of 1
That's what I'm trying to do so it's more OOP lmao
One thing at a time
Currently have my own solution and @dry yacht 's merged, which makes rewriting hard enough as is lmao
What are you even making
While I can't say what exactly, I bugged you guys to fix https://www.youtube.com/watch?v=71qG38X3bcM originally.
The issue being that while it did hover between a specific set of locations (min-max Y coords), they weren't hovering in sync
why not exactly?
comm/server?
correct
Comm actually
oh
lmao
Someone told me its not necessary
Well that was unexpected
okay tbf I didn't think I'd get any offers either lol
they were wrong
I mean I don't think you wouldn't get any, I thought you wouldn't offer any services
Oh I do
Damn bro
Average services title
<relocations>
<relocation>
<pattern>com.google.code.gson</pattern>
<shadedPattern>codes.laivy.npc.relocations</shadedPattern>
</relocation>
</relocations>
thats correct?
tbf I don't think it would matter regardless lol
would be better under codes.laivy.npc.gson but yeah
Hey optic, what's your exact time you spent programming
in years
since you say 5+
3
Ok, still got the version error
NoSuchMethodException, like the version is wrong
I'd have to look back at my oldest available resource and do some math
I kind of know my exact date, not down to the month because my first projects are in the shadow realm by now
though roughly 6-6.5 years (recalculated lmao)

Jun 25, 2017 being the first resource
(So yeah I don't mean day exact, I mean rough range lmao)
i found the exact message @young knoll told me to make my bot in jda instead of node
@young knoll you little evil-
if the file exists, it should not write in but recreating another one with name-1.txt, name-2.txt... how can I do?

well
Well, this is when I uploaded the first resource to spigot, you can do the math. I'm busy lol
a simple approach is to just
var i = 0;
var file;
while(true) {
file = new File(getDataFolder(), "codes" + i + ".txt");
if(!file.exists()) break;
i++;
}
lmao
don't use this
I am tired as fuck
Node is cursed
please don't use that
5 something years
Close enough
I am tired as fuck
hi tired as fuck, im ebic
ebicpic is fuck, im tired
ah
I was going to tell you to use the dead python api for discord
But apparently it’s not dead anymore
was about to say
how do you remember what you were gonna do
9 months ago
i dont remember what half of the stuff on my todo list is
and i made it 8 hours ago
I was referring to 5 minutes ago
oh
What's the sound enum of breaking ore blocks like iron or emerald blocks?
Gonna be fun
Also @dry yacht I'm stupid, that was not quite it, but useful nonetheless given I'm going to make the API public and I'd bug you for these sorts of things to get some examples anyways lol
Going off the references, A player right clicks a block, the armor stand then hovers above said block between a min/max Y coordinate.
The code I've provided originally would cover this, but is incompatible with the current impl, though so is a lot of the plugin lmao
Look into the SoundGroup class
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/SoundGroup.html
declaration: package: org.bukkit, interface: SoundGroup
they use stone iirc
I meant ore_block, k found it BLOCK_METAL
How's that not compatible? You'd just pass the clicked block's location to my update method, xD.
min/max y coord
actually
I might just have low braincells after dealing w/ this for so long, I'll resend the original method
Why do i get NBSP when i use String.format?
Code:
public static String formattedMoney(Integer money) { double doubleMoney = money; return String.format("%,.0f",doubleMoney).replaceAll(","," "); }
Most of my time coding today has been on this one issue lmao
You could just change the y axis behaviour if it's not supposed to be symmetrical around the provided location
if (moving.get(armorStand)) {
Location next = current.clone().add(0, 0.1, 0);
armorStand.teleport(next);
next.add(0, .1, 0);
subLine.teleport(next);
if (current.getY() >= start.getY()) {
moving.replace(armorStand, false);
}
} else {
Location next = current.clone().subtract(0, 0.1, 0);
armorStand.teleport(next);
next.add(0, .1, 0);
subLine.teleport(next);
if (current.getY() <= end.getY()) {
moving.replace(armorStand, true);
}
}
This would have to be replaced to work with the lines as well
Uhm, what's lines real quick? I thought it was n = 2 in your case.
Correct, for the above code. The top line is the armorStand variable and the bottom is subLine
moving.put(hologram.armorStand(), false);
Location currLoc = hologram.armorStand().getLocation();
Location highestLoc = Utils.getLocalCoord(0, 4, 0, currLoc).add(0, 0.001, 0);
Location lowestLoc = Utils.getLocalCoord(0, 2, 0, currLoc).add(0, 0.001, 0);
hologram.armorStand().teleport(start);
movementTask = new BukkitRunnable() {
@Override
public void run() {
applyToLoc(hologram.armorStand().getLocation(), highestLoc, lowestLoc, hologram.armorStand(), hologram.getLineBelow());
}
}.runTaskTimer(plugin, 0, 1);
So what the code should do is move the lines between two locations.
In this case, it's the currLoc + 4 on the Y axis, and currLoc - 2 on the Y axis
i.e. this
err, roughly anyways
Red being the highest point it should go, yellow being the lowest point again regardless of where "orange" is
With this code :
private ItemStack createLegendaryShield() {
ItemStack shield = new ItemStack(Material.SHIELD);
ItemMeta meta = shield.getItemMeta();
meta.setLore(Arrays.asList(ChatColor.YELLOW + "Item Légendaire"));
meta.setDisplayName(ChatColor.GOLD + "Bouclier légendaire");
shield.setItemMeta(meta);
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
Player player = event.getPlayer();
if (event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) {
ItemStack item = player.getInventory().getItemInMainHand();
if (item.hasItemMeta() && item.getItemMeta().hasDisplayName()
&& item.getItemMeta().getDisplayName().equals(ChatColor.GOLD + "Bouclier légendaire")) {
if (!player.hasPotionEffect(PotionEffectType.HEAL)) {
player.addPotionEffect(new PotionEffect(PotionEffectType.HEAL, 1, 2));
player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 15 * 20, 0));
player.sendMessage(ChatColor.GOLD + "Vous avez utilisé le bouclier légendaire.");
} else {
player.sendMessage(ChatColor.RED + "Le bouclier légendaire est en cooldown.");
}
}
return shield;
}
}```
I have this error but i dont understand : ';' expected
?paste
you cant have a method in a method
Yes i know but i dont understand where to place the eventhandler
Isn't this javascript land?
like this ?
yeah
i.e. relevant to the orange block's location
Oooooooh, man, if I only knew that from the get-go, xD.
Tbf this all needs impl'd in a public API anyways so 🤷♂️ no harm done
Saving ourselves both time lmao
How are the two locations being defined? Are they constant over the lifetime of the hologram, or are they also subject to change?
In this case, constant.
If we took into account it being turned into a public API, who tf knows
anyone know if JavaPlugin.getResource needs the extension or not
Better to treat it as subject to change, I can always pass in the params needed regardless of if they're constant or not
iirc it literally just does some checks and called class().getResource after
guess its time to tas
@dry yacht I'll revert back to the original (but broken) code and show some better examples
That would in essence just be a single location plus a height above that, as the locations would be constrained to lie right above each others anyways, right? So it could also be easily done with my approach, xD. Just a small change on the y change behavior.
I believe?
Once I've reverted I can just show you, and you'd most likely be able to get a better idea lol
Possibly an encoding issue
Make sure your project encoding is set to UTF-8
Like in pom.xml?
Yes
Or just make sure that whatever code editor you're using isn't inserting NBSP's in place of space chars
I can run that snippet fine and it works as expected
that doesnt apply to compiling iirc
Yeah, it is also set to UTF-8
But i can run it like this
public static String formattedMoney(Integer money) { double doubleMoney = money; return String.format("%,.0f",doubleMoney).replaceAll(",", "SPIGOT"); }
and its still making a fuss
What if you just do replace instead of replaceAll
wat
Ur probably using format wrong
@dry yacht There are some slight issues with the original code, e.g. not centered but nonetheless
https://youtu.be/JqidnDEHq8w
What if you don't replace at all? What's the result of that?
Same thing :/
Are you sure you execute the updated code? Could you just add a sysout right there to see if that shows up? We'd know for sure then.
You mean like this?
Yes
I'm sure String#format is used wrong then. I hate the method myself tho, so I'm not sure what's wrong with it's invocation.
Any reason you're formatting money the way you are by the way?
There is a DecimalFormat for currency
NumberFormat.getCurrencyInstance(Locale.CANADA).format(400000)
No, i just want it to have a space at the place NBSP shows up, but i am open to use whatever works
yea, this pretty much shows what I'm trying to achieve lol
canada
Or is it different in that language? Looks like Swedish but I'm uncultured lol
Nah i can confirm that in all of europe its the same
20.000.000,67 €
that is worng
i think i may have accidentally perma locked my server and i dont know how to undo it
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:522)
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:420)
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:306)
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1122)
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:303)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.io.IOException: The process cannot access the file because another process has locked a portion of the file
at java.base/sun.nio.ch.FileDispatcherImpl.write0(Native Method)
at java.base/sun.nio.ch.FileDispatcherImpl.write(FileDispatcherImpl.java:68)
at java.base/sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:132)
at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:76)
at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:67)
at java.base/sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:285)
at net.minecraft.util.DirectoryLock.create(DirectoryLock.java:29)
at net.minecraft.world.level.storage.LevelStorageSource$LevelStorageAccess.<init>(LevelStorageSource.java:398)
at net.minecraft.world.level.storage.LevelStorageSource.createAccess(LevelStorageSource.java:323)
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:520)
... 5 more```
20,000,000.67 is orrect
Nope
yep
Just looked up the DIN norm
uk use that then
?paste
It shouldn't be, first , is delimiter for hundreds and.0 means 0 digits after decimal dot
I want it to be formatted:
1 000 000
100 000
10 000
1 000
100
https://paste.md-5.net/biraxucusi.java
I have this error som1 can help me pls line 77
It's basically C formatting
you dont have a method called createLegendaryShield
https://prnt.sc/uqDZB100m0Dp. this is the code that i ran that ended up locking the server in this state
here
F
is there any way to fix
Is it same class
i see... uk being uk again
Can you send whole class, not just snippets
the shield method is in a sub class
its not right ?
move the method to be in the same class as the rest
whouldnt i get an error ?
does anyone know how to fix this (sorry for reply but it got skipped)
why?
i try what u said 2s
Delete the lock file in the world folder, if I'm not mistaken
also triple checked @dry yacht and yea, the most recent video shows what should actually be done.
I'll keep the entity one and re-work it into the general API once I get the plugin working lol
Probably Something#hoverEntity or however I handle hovering in the library lmao
Alright, well you should have all the information you need, don't know how else to help you other than to write the api myself, xD. Which would also not be an issue, just something I'd have to do tomorrow.
I believe all that needs changed is the scheduler, which you can make sure is done properly tomorrow.
I need to work on something else for now lmao
hello, how I could check if player have item in eq and if not then make certain things?
I tried
if (!player.getInventory().contains(backpack)) {
but then on each action plugin make that ;/
Anyone knows a good java 8+ http client and websocket library?
Not sure what you mean. What's an eq? When do you want to perform something? On state change?
I can't wait to make this into a proper non-shit library and never have to worry about the main code again lmao
inventory of player I want to make that when player don't have ItemStack Item anywhere on inventory then send command
I just yesterday played around with this one: https://mvnrepository.com/artifact/org.eclipse.jetty.websocket/websocket-javax-server/10.0.0
Hi, I'm trying to detect when a block is broken indirectly (e.g. a torch is broken because the block its on breaks), can't figure out how to do it. I can detect WHEN it happens by using a BlockDropItemEvent listener, but I cant get the actual torch block/block state. Is there anyway to do this?
else if (!player.getInventory().contains(backpack)) {
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "cosmetic unapply BACKPACK " + player.getName());
You mean when the player removes the backpack from their inventory? We are talking about a state change from having it to not having it, right?
yeah exactly when player remove the backpack item from their inventory then make a command
you would do basically
String[] strings = s.split(",").stream().map(s -> s.replaceAll("\\s+", "")).toArray(String[]::new);
Rating out of 10?
11 actually, as it "just worked", lol.
so any resolve here?
https://paste.md-5.net/omulimebis.java
https://paste.md-5.net/hirikekoko.java
That's basically what it looks like. I'm using it for a binary socket
The code's still a spaget as I'm still prototyping tho.
Well, I'm not sure if it's actually that easy. There are many cases in which a player's inventory contents might change, like pickup, drop, click, death, programmatically, etc...
An observer for the inventory contents would be cool, but I don't think the API provides such a feature.
Without advising any hacky solutions, you probably just need to listen to a bunch of events and check if the item causing it is your backpack.
hm
not quite what im looking for
i just want something similar to what java 11 has but in java 8
ohhh okay so that's what I think of at first that it will not be that easy but surly first tried with everything that came to my mind and second is ask but okay thank you
What are you trying to do tho? It's pretty much just a normal websocket, it adapts the receive method call based on which parameters you specified.
Yeah, they kinda really miss a feature for inventory change events.
i need an http client AND a websocket but it's not for advanced stuff so the java 11 one is simple enf. I just want something similar for java 8
https://goksi.tech/ can anyone think of better way to to this, because it looks kinda cursed to me
I'm trying out what you sent me earlier
but I can't use it correctly : I put it in a utils file to use it everywhere, I'm a bit lost
anyone know of a config updater library? one thatjust needs a plugin instance of whatever else that doesnt require files to be changed? like i can add stuff to the config.yml in resources and those get added to any already generated config?
if not what would be a good way to approach making one
i would just get both configs from resources and from file, then iterate trought resources config sections and if fileconfig#hasSection(ResourceSection.key) (or whatever) continue, if no, just set with value from resources
migh not be best solution, but can't really think of other
i was thinking like get the config from JavaPlugin, get the InputStream with getResource() and just convert that to YamlConfiguration/FileConfiguration somehow, then do the loop stuff
yeah, that is basically what i said
ah lol
iirc you can use inputstream into YamlConfiguration#load or whatever its called
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/configuration/file/YamlConfiguration.html#loadConfiguration(java.io.Reader) yeah there is overload for reader
looks like its got a reader method so i just need to convert
manage to say the same thing at the same time lmao
yeah just new InputStreamReader(stream)
just googled that lol
Hello, when i right click with this shield
private HashMap<UUID, Long> cooldown = new HashMap<>();
private ItemStack createLegendaryShield() {
ItemStack shield = new ItemStack(Material.SHIELD);
ItemMeta meta = shield.getItemMeta();
meta.setLore(Arrays.asList(ChatColor.YELLOW + "Item Légendaire"));
meta.setDisplayName(ChatColor.GOLD + "Bouclier légendaire");
shield.setItemMeta(meta);
return shield;
}
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
Player player = event.getPlayer();
ItemStack item = player.getInventory().getItemInHand();
if (item.hasItemMeta() && item.getItemMeta().hasDisplayName()
&& item.getItemMeta().getDisplayName().equals(ChatColor.GOLD + "Bouclier légendaire")) {
if (!cooldown.containsKey(player.getUniqueId()) || cooldown.get(player.getUniqueId()) < System.currentTimeMillis()) {
player.addPotionEffect(new PotionEffect(PotionEffectType.HEAL, 1, 2));
player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 15 * 20, 0));
player.sendMessage(ChatColor.GOLD + "Vous avez utilisé le bouclier légendaire.");
cooldown.put(player.getUniqueId(), System.currentTimeMillis() + 30 * 1000);
} else {
player.sendMessage(ChatColor.RED + "Le bouclier légendaire est en cooldown.");
}
}
}
}```
I get the effect but when its in the second hand its not working how can i made it working in the second hand
getItemInOffHand
how i verify he's right clicking with it ?
?interactevent
The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.
For example, only executing code if the main hand was used:
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
return; // do not progress past this point |
}
// provide functionality
}
thx
There's also https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getAction()
declaration: package: org.bukkit.event.player, class: PlayerInteractEvent
App name for diagrams please
Something extra, take in care that OFF_HAND is know as the hand for placing blocks and also as the hand for putting the shield
What determines whether a class for a block in CraftBukkit inherits from CraftBlockData or CraftBlockState?
?jd-s
?paste
Yeah, I understand that, but not very helpful. I'm looking to contribute to Spigot, so I'm trying to learn more about how it is structured
https://paste.md-5.net/xuvahoputi.java (Main)
https://paste.md-5.net/dilepoqewu.java (class)
Someone know how i can make the speed leggings working ? cause when the player equip it it take time before giving the effect and when he remove it the effect arent clear ..
?paste
https://paste.md-5.net/yuwomepewa.rb
I have this error too
hey, custommodeldata is not working in my server, the server is running Paper version git-Paper-307 (MC: 1.19.2) (Implementing API version 1.19.2-R0.1-SNAPSHOT) (Git: 476ef25)
when i do something like "/give @s minecraft:apple{CustomModelData:1} 1" it says " Unknown item name: minecraft:apple{custommodeldata:1}."
add a space between the material name and the NBT data
ok
thank you, it worked
man this atlas system is a pain in the ass
np
Wich is the cover angle of a shield? 180°?
is there something other than model engine for custom models for mobs?
Lucidchart
does anyone have a clue as to how you're supposed to make custom inventory skins for mc 1.19.3?
I just can't get it to even try to load
sort of
a bit less iirc
like 110-150
I forgor
custommodeldata for some items, then you make the texture bigger than the actual item would normally be
I know the trick
I had it working
then 1.19.3 broke it
I guess I have no clue, seems like it is no longer working for previous versions so I probably messed something up
uhhh
Actually I need to check if a damage was behind, when the player is shieldied
What about damager.getLocation().getDirection().angle(victim.getEyeLocation().getDirection()) ?
should work
in that case 180 is fine
I did some debugs
the avarege values goes from 0 to 2.5 max.
and the problem are that these values increases only from the laterals
try damager.getLocation().angle(victim.getLocation())
I mean, the angle() method can return 0 if you are behind the player, and even if you are front is 0
it starts increasing only when you are next to the player, so idk
I kind of forgot how to do it lmao
uh do you meant damager.getLocation().getDirection().angle()
the location object hasn't an angle() method 😦
You need to use vectors
I know that
You need 3 vectors
damager.getLocation().getDirection().angle(victim.getEyeLocation().getDirection())
But has some problems tho
mh?
Doing it wrong give me like 30 minutes to show you
At work currently and about to clock off
But i will show you the math formula for using 3 vectors for this
ok..
Actually, someone cleaned up what i was going to do. So yay free time
If((AxB * AxC >= 0) && (CxB * CxA >= 0 )) {
//If check passes B is between A and C
}```
Why is this important? Well you can get the location of victim. Then get a point behind victim. Then you have the damagers point. Compare damagers point to the other two. And you can tell if they are behind
Api has a util method to turn locations into vectors
This should hopefully resolve your issue without trying to compare angles and directions lol
Lines
So in words the equation is as follows
If vector AB times vector AC is equal or greater then 0 and vector CB times vector CA is equal or greater then 0 then line B is in between lines A and C
And i misspoke earlier. Need 4 locations. The 2 entities and 2 locations to rear sides
Which you use 2 locations to form a vector
So victim and 1 location to side rear and then opposite side. Then victim and damager. Then you can compare the vectors with above formula
Its not hard. The two points to rear side you can just subtract from victim and move over a block or two. You just want to ensure those rear points make it so the damager is in between
But that is the simplest math using vectors for this without using raytracing or angles lol
Dont let this intimidate you. Give it a try, do some researching and learning if need be. And if you still need help come on back and show your progress or what you came up with thus far. This is how you learn
And with that. I am now clocking off from work and going to drive home so be back somewhere like an hour
Can I use something like PVector from the processing library to create a vector with xyz axis even if I’m not drawing and am just using it in a plugin?
Why not use Vector from bukkit
That'd be much easier for compatability with other objects
Otherwise you'll need to make a method to translate a PVector into a Vector
Than use the Vector output of that method
Well I’m coding something with processing and am going to transfer it over to a plugin so I thought it would be easier.
Well can you? Yes. Should you? Depends.
I guess you could just create a new location then store it in a vector, right?
Beware of GC
Java is good at identifing short-lived objects, but unnecessary allocation still takes it's tall
If you can avoid allocating stuff without creating an overhead somewhere else, you might want to use the other approach
The pvector?
Or vector?
I’ll just use pvector, see how it goes. Then swap to vector for compatibility sake.
Well if you go PVector <-> Vector <-> Location you'll have a tremendous issue
Bukkit's vector should be used for velocities and directionality where as Bukkit's Location class is meant for storing positions (since it also stored the world)
What PVector is used for should be known to you - up to you to decide whether it is to be used over bukkit's classes
nah I got stuff to do
but basically
if you're already using your own data class
no point in keeping it as a table
Anyone know how .schem files hold nbt & the block types?
WE might use a different, but similar specification
thanks
how do i alter the position of a player in tablist? i wanna make them last. i tried adding them to a team "zzzzz" for it to be last (alphabetical order) but it didn't help
is it possible without packets?
related code (no errors, nothing changes at all and the player remains at where they were):
public void makePlayerLastInTab(final String player) {
if (latestTeam == null) return;
latestTeam.addEntry(player);
}
// onEnable
final Scoreboard scoreboard = Bukkit.getScoreboardManager().getMainScoreboard();
if (scoreboard.getTeam("ZZZZkwfake") != null) {
latestTeam = scoreboard.getTeam("ZZZZkwfake");
} else scoreboard.registerNewTeam("ZZZZkwfake");
// invoking in onJoin
plugin.makePlayerLastInTab(randomName);
https://paste.md-5.net/ezaxebikod.bash
Any ideas why this happens?
what happens
Looks like it has to be declared public
literally thats what that link is for bruh
make it public?
also just stated it
here:
That moment when you request help and are already pissed off if it doesn't arrive two seconds later, xD.
I guess the java.lang.IllegalAccessException wasn't obvious enough, right?
I ain't pissed off, I realized the error later.
But my man can't read or smth.
alright it still does not work
i made sure that the method is getting called and the addEntry is getting called too
it still won't do though it seems
addEntry takes a player by name or an Entity by stringed UUID
@echo basalt say hello to my favorite method in the entire plugin
that's my manager which keeps neutral mobs angry
Reminds me of tellWitnessesThatIWasMurdered from nms
where is that placed?
Villager
you can tell this is old code
gotta decrease reputation somehow
if it was written in 2022 it would be tellWitnessesThePlayerIsSus
yeah my code does exactly that? unless i'm super brain dead rn, i pass in the name
be sure it is their actual name and not a UUID if a Player
unmodified name. so raw name from getName() of Player
it is indeed their raw name
maybe i should've clarified that i'm talking about a fake player created with packets
then so long as all players involved are using the same scoreboard it should work
that's what i'm thinking
um a packet only Player will not be able to be added to a Scoreboard
not unless you create it server side
have to add to world
goddammit
well what if instead of putting the fake player to the bottom i'll put the real ones to the top hm
or manually send teh scoreboard packets
i'll try that
i want to avoid packets as much as possible, creating a player was enough for me lol
yeah it did not work
?paste
is that class included in essentials? i assume so
Which class ?
user ex thing
yes it is
whats the keybind by default to optimize imports in ij
Ctrl alt l ?
nvm
idk mine is this
thats reformat
yeah
that only works on hover
yeah i said nvm
for me its optimize
i have key promoter x so it should say the keybind let me try
it did not
is there even one?
you can set it as an action that runs when a file gets saved
i dont want it to be automatic to prevent messing when working on fork
I have this error :
https://paste.md-5.net/gifiguxida.sql
With this code :
https://paste.md-5.net/repinemifi.java
som1 know how i can fix this ?
try to Class.forName the classes that are missing
mismatched essentials version/ essentials dependency version?
how is verify this ?
oh thats a thing too
or EssentialsX
yeah 😄
ignore it
oh map::merge is a thing
reload maven
playerBalances.merge(uuid, amountPerMinute, Integer::sum) or smth
merge give the money ?
its a combination of put and get, should check javadocs
okk i check this
what's a good way to check if the player is falling (aka in the air & is not flying)? is checking y velocity > 0 enough?
it should be yVelocity < 0, negative is down and i would check if the player is flying or has fly enabled as well
otherwise going down in creative or something might be counted as falling
thanks 🙂
oh and i'm trying to think of a way to get the closest non-air block below the player and i have literally no idea how to do it
the idea of just subtracting Y one by one and checking if it's air sounds too goofy
Hello, guys can anyone please give me an idea about how to make a plug-in that allows me to add and edit an arraylist into a yml
whats the difference between File.seperator and File.pathSeperator
I made one but for some reason when I reload the server, the yml file with the arraylist gets erased. I mean; before reload (class: name: x) after reload (class: name: ‘’ )
File.pathSeparator is used to separate individual file paths in a list of file paths. Consider on windows, the PATH environment variable. You use a ; to separate the file paths so on Windows File.pathSeparator would be ;.
File.separator is either / or \ that is used to split up the path to a specific file. For example on Windows it is \ or C:\Documents\Test
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
how i use this ?
Class.forName("com.earth2me.essentials.api.UserDoesNotExistException") I think, off the top of my head. btw make sure that your plugin gets loaded after essentials (you gotta depend on it in plugin.yml)
okk
Is my plugin.yml right ?
isnt it depends ?
looks good to me
yeah its not
i'm trying to think of a way to get the closest non-air block below the player and i have literally no idea how to do it. the idea of just subtracting Y one by one and checking if it's air sounds too goofy, do you have any ideas?
so i edit it like this ?
the way you have is fine
hey epic
do you have any idea on how to do this?
i'm contemplating creating a method and actually subtracting one-by-one
might be able to ray trace and check for air but other than that no idea
sounds way too complicated for such a small task
ah man
i mean ray tracing is not a lot of code thankfully
but still
Damn, this is so trippy, haha
man made obs screen in minecraft 💀
goofy ahh
I'm streaming my desktop with the WebRTC API, xD.
Imagine coding minecraft in minecraft
you code for minecraft? i code in minecraft
imagine your internet dying then
Good tradeoff tho, as you can just live in minecraft forever then, xD.
wtff
so cool
https://paste.md-5.net/xuvahoputi.java (Main)
https://paste.md-5.net/dilepoqewu.java (class)
Someone know how i can make the speed leggings working ? cause when the player equip it it take time before giving the effect and when he remove it the effect arent clear ..
how do i setup IJ to auto restart the server when i build my plugin (gradle)?
rn i have an action that launches the server
and build action that builds directly on server
You can use configuration, look at these: https://stackoverflow.com/questions/18402675/run-configuration-to-debug-bukkit-minecraft-plugin-in-intellij-idea
are varshorts even used in the protocol?
bungee's defined packet has read/write methods for them
varshort? I don't believe so. Shorts are
That being said, the protocol supports it. It's just data. So if developers want to make use of varshorts for some reason I don't see why not
so im using github packages and im having this issue of not shading other libraries, though it does at package phase, it just does not at deploy phase
public static int readVarShort(ByteBuf buf) {
int low = buf.readUnsignedShort();
int high = 0;
if ((low & 0x8000) != 0) {
low = low & 0x7FFF;
high = buf.readUnsignedByte();
}
return ( ( high & 0xFF ) << 15 ) | low;
}
Well it exists in Bungee
also don't understand what's happening with the #readUnsignedShort() call
shouldn't it be #readUnsignedByte() like with varints/varlongs
this looks like a 3 byte number
how can i shade in deploy phase?
i need to shade in both deploy and package phase 🤨
Phases always also call their predecessors, so deploy already called package, you already shaded. Might be that you're deploying the wrong artifact. You probably need to add a classifier when shading which you can then explicitly deploy.
I use this to deploy into a local directory. You'd just have to apply something similar to your maven plugin. If I wouldn't use the classifier, I'd also get the non-shaded artifact copied.
to use the API of a plugin from its jar file, I import it from Project Structure > Modules > Add JARs
I have to do something else to use it afterwards?
dont do it like that, use maven
or gradle
I use maven but the plugin in question has no repository
they have api, but didnt provide way to use it 🤔
and on the discord it says that "You need to import the old fashioned jar"
https://blog.jeff-media.com/manually-installing-jar-files-to-your-local-maven-repository/ but looks like alex's site doesnt work atm
lmao
thank you I will wait
@tender shard ^
i believe alex is dead
alternatively use file:// repos
e. g.
<repositories>
<repository>
<url>${project.basedir}/deps</url>
<id>local-potemkin-repository</id>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>empty</groupId>
<artifactId>modlauncher</artifactId>
<version>999.0.0</version>
</dependency>
</dependencies>
Might also be <url>file://${project.basedir}/deps</url> if you want to be safe
nice thanks
yeah
hes swapping his vm stuff to another datacenter
one sec ill find the stuff
mvn install:install-file -Dfile=JARNAME.jar -DgroupId=groupid -DartifactId=artifact -Dversion=ver-Dpackaging=jar
The layout within your deps folder would then looks somewhat like that:
.
└── empty // {group}
├── log4j // {artifact}
│ └── 999.0.0 // {version}
│ ├── log4j-999.0.0.jar // {artifact}-{version}.{type}
│ └── log4j-999.0.0.pom
└── modlauncher
└── 999.0.0
├── modlauncher-999.0.0.jar
└── modlauncher-999.0.0.pom
the .pom files are not required per-se but can be useful from time to time
I'm working too much with maven resolvers...
is it possible for the plugin to delete the jar containing itself?
heh?
the plugin deleting itself from plugins directory
it can if you make it do that
might not work on windows computers
what i wanna do is make an auto updater for my plugin, and after downloading the new version i wanna delete the current, how can i do it so that it works on all machines?
put the new version in /plugins/update
the server will remove the old and move the new
should reload tho
i have error:
getDatabase() in nick.nick.nick cannot implement getDatabase() in org.bukkit.plugin.Plugin
how to fix it
in console or intellij
intellij
?paste the class
you have a method in a method
You don't put methods in methods
?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.
i only need to fix this error ( getDatabase() in nick.nick.nick cannot implement getDatabase() in org.bukkit.plugin.Plugin )
Learn Java it'll fix your issue
Your issue is inherently syntactical. Which learning Java will help you with
I figured it out I think, it's not a var short it's a 3 byte varint, and 2^21-1 is the max packet size so it's used for reading the packet length
Also your violating naming conventions please learn Java
Nick.nick.nick
What's this path bruh
I would straight forward suggest learning Java before coding a plugin
^
Because happen the same when cooking, You cannot make a cake without experience and also reading the recipy before
So please before coding something in any lang, you first must learn the lang where You are coding
.
With that being said, i need suggestions for creating a queue for redis. So when a payload is received it queue it and once u call the get for the payload Will renove it from the queue
hello. How do I "rotate" a BlockData based on a BlockFace?
declaration: package: org.bukkit.block.data, interface: Rotatable
this is a Rotatable, not a BlockData
Cast the BlockData
and before that check if the block is rotatable?
Likely yes
There's also this one https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/data/Directional.html
declaration: package: org.bukkit.block.data, interface: Directional
is there an API method to check if it is rotatable?
you dont need one
why not
Because inheritance is a part of Java that does not need an additional API implementation
sooo im good with this?:
BlockData blockdata = block.getBlockdata().clone();
if(blockdata instanceof Rotatable) ((Rotatable)blockdata).setRotation(direction);
How can i use the meta.spigot().setPages(BaseComponent) in NMS?
yeah but you dont have to cast like that
you can do it like I did and then rotatableBlock will already be the casted variable
oh is that literally a j17 thing?
sad
I am on J17
oh well there you go
but I directly set the data, not save a boolean
rotatedBlocks.add(new SchematicBlock(center.getBlockX() + x, center.getBlockY() + y, center.getBlockZ() + z, blockdata));
I am doing that here
thats my own API
lol
but like doesnt it also clone it when casting it normally?
idk
but sadly this seems to not work
yes because if the cast makes a clone then it doesnt apply the rotation on the original blockdata
thats why I said i wasnt sure
no I was just referring to how java works presumably
BlockData is blockdata, thats not on me. Im just saving a BlockData in my class :D
uhm what
so the cast clones the blockdata, so that setRotation will affect the clone and not the origin blockdata. Thats what u mean?
ahhh ok
yes thats what I was referring to
well but then how do I reapply it to blockdata instead of Rotatable?
Can anyone tell me how to add condition on full Armor set required in executable plugin (custom Armor)
Yes
i did like that but server doesnt do anything
Oh Thanks ♥️
cannot find setBlockData
BlockState != BlockData
thats Block
not BlockData
I do not have a Block anywhere there lol
blockdata = rotated;
what about that? XD
uhm
How can I customize(colors, and re-design in general) the default help page in the ACF library?
for (SchematicBlock block : this.getBlocks()) {
it can't
its literally relative and non-existant in the world
later
player.sendBlockChange(new Location(center.getWorld(), block.getX(), block.getY(), block.getZ()), block.getBlockdata());
that isnt persistent
I know but it needs to work with that too
Placing is:
center.getWorld().setBlockData(new Location(center.getWorld(), block.getX(), block.getY(), block.getZ()), block.getBlockdata());
wdym?
sendBlockChange has BlockData
and as you can see, it shows it on the Client
if you reload or restart that block will disappear
yes and? This is a temp-menu
if you click that block it will disappear
it is an editor menu and will place the Block when the player confirms it
the server does not need to do anything
it just needs to rotate the block DATA
not the Block itself
explain
not possible
needs to be accessed without being visible
and I know that sending BlockData-Rotations does work
should i use bukkits async task or completablefuture for downloading files?
Do I really have to take a random block in the world and use it as a temp-block to transform a Rotatable to blockdata?
either honestly, i tend to use CF’s but it’s up 2 you
ok thx
also can i use plugin's logger in CFs?
Guys how can I create a plug-in that stores an arraylist of a class in a yml file and allows me to add an object of that class from the yml or from in-game command
Hey guys help me pls
Why i ve got this error?
21:10:52 [SEVERE] Could not pass event WORLD_INIT to ArmlixSkyGeneration
java.lang.ClassCastException: org.bukkit.craftbukkit.CraftWorld cannot be cast to net.minecraft.server.World
at net.doh1221.Listener.onWorldInit(Listener.java:12)
at org.bukkit.plugin.java.JavaPluginLoader$48.execute(JavaPluginLoader.java:777)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:354)
at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:217)
at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:151)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:344)
at net.minecraft.server.ThreadServerApplication.run(ThreadServerApplication.java:13)
I just want to cast CraftWorld to World from nms
@EventHandler
public void onWorldInit(WorldInitEvent e) {
this.world = (World) e.getWorld();
SkyGrid.chunkGenerator = new ChunkGenerator(world, 1);
}```
getHandle
?
how can i disable a plugin after a specific CompletableFuture is done without blocking the main thread?
For disabling plugin you can use Server#getPluginManager()#disablePlugin(name)
yeah, but i shouldnt use the api in async code,right?
https://paste.md-5.net/awumaviduc.java Main
https://paste.md-5.net/ajagatezep.java Generator Class
https://paste.md-5.net/emovogimeb.java World Listener
but where i should use it?
Yes its called getHandle() the method
cast World to CraftWorld and .getHandle()
I need World from CraftWorld
you need CraftWorld to have access to getHandle
It already CraftWorld
You need to cast it first
fix your ( )
?
( (CraftWorld) e.getWorld() ).getH...
Oh
Have you learnt how to code Java before? Im not wondering to be rude. Because from personal experiences i wouldnt code without learning Java
Thank you, imma try it this way because right now I tried coding it but when it saves the rule in the yml I can’t edit it from in game because it just erases the arrributes
Of course yes
Even when I reload it it just erases the attributes values
ohright, my bad
Yes sure, but can’t share it right now because I’m not home :c but I can at night
Would you mind if I sent you a friend request?
Imma try it anyways!
mmm still no way to rotate the blockdata
might have to overwrite the String-Data manually
hey uh i have problems comparing uuids
so i have uuid a which is equal to 8667ba71-b85a-4004-af54-457a9734eed7 when printed
and another uuid which is also equal to 8667ba71-b85a-4004-af54-457a9734eed7
So comparing those returns true, however i have an if check if (a != b) Do something
and something happens (it shouldnt)
am i doing something wrong?
i compare UUID objects btw

no no I read that I am just confused if kacper really meant that
I always thought they had a bit of java knowledge 😅
Hi, I wanted to ask a general java question, I'm using java 11 with threads on a cpu with 64 cores and 128 threads to run the best with threads on my app how many threads i should use?
(i tried 128 th and works very well but I wanted to ask for be sure and have some more knowledge about that)
I mean, only really makes sense if your app actually scales to that level in terms of parallel execution
usually throwing more threads at the problem does not solve everything
unless your code base is specifically designed to work that way
its an app for scanning my network and try all the ports an possibility of exploit
seems with 64 to work even more faster (3 minutes and scanned half of it)
im half coding half watching mma today
He? No JDA is written in Java
not jda
ohh Ij integration
No maybe you ar eusing another plugin
I have decompiled the one im using and its fully written in Java
How to compile a plugin to make it to have less size?
I tried packaging it, but not all the repository was used
Stop watching this fake mma anyways
It ruins your brain
Well in that you should shade less dependencies
how
But most of the time your plugin must depend on all the dependencies
my plugin has 14mb
LOl
Kotlin code also decompiles to java
Its really huge plugin
it s not
You are probably also using one by alpaca
but I compiled it with
are there dependencies that youre not actively using in your code but that needs to be provided, otherwise you can use the libraries section in your plugin.yml
use maven to compile
dunno if thats maven
Arent you using maven or gradle?
maven
oh fuck he knows
som1 know how i can make gold armor to have more durability ?
where are those problems
Also what the heck is your problem
You have to edit the atributes if im not wrong
I don't understand
do you have any exeample or docs about that ? bc i try to change the meta but its not working
im using maven
oh ok, can you send your pom please
?paste
nvm fixed it
uh none?
here @sterile token
how do you haev 14mb with only those
idk, I m just using the default maven build configuration
Sqlite is much, not sure if exactly 14 but yeah
Well he doesn't have provided scope
thats probably the cause of the big size then
how can I use sqlite included in spigot?
Just add <scope>provided</scope>
is there any real way to store list of items in a relational database, or is it just a no go?
Serialization/deserializtion, the most used is base64
Yeah.. but that kinda goes against SQL and the whole concept
So well, you will have to make your own serizator/deserializator
Because i dont think there is another way
Its more or less the same
not really..
Because for serialization/deserialization still need to use base64 cuz of how itemstack works
im talking about basic strings,
if I were to store itemstacks I would probably destructor it more
but json is ugly
i wish there were more database types that were like
relational but like
not
ehh
item stack can be serialized to byte[] and saved as blob in sql iirc
What bas64 does 🤔
serialize and deserialize an object into a string
bad description of base64
as that isn't what base64 does
i described it for the context
I mean, technically it serialises bytes into text 🤔
my wrong then
the funniest byte-to-text encoding scheme for sure tho
100%
Hey, I would like to combine spigot and bungee plugins into a single jar. I saw a few posts on the forum, but they didn't metion anything related to maven.
Here is how my current build config looks like: https://pastebin.com/h9S8ih7j
I know I could replace the mainclass for the other one which is net.hardgaming.mc.hardgamingplugin.bungee.plugin.HardGamingBungeePlugin, and that would work just fine... but I really don't want to have two jars, I am lazy. Is there a standard way of doing this?
I already have the .yml s in place, so that should be already ok, just wondering how can I make maven work with this
Lol i would short that package id
its too long
Maven doesnt care if you are building for spigot/bungee, so i dont really understand your quetion?
net.hardgaming.hardgamingplugin.bungee.Class
hardgaming.hardgamingplugin
Yeah what i told him
Too long
I would call it like:
<domain>.<plugin name>.[<module name>]
Wouldn't I have two main classes?
How should I specify that to maven
you dontneed to
Maven doesnt care that, its only an enviroment for bulding
So I don't even need to specify one of them, or do I
maven only cares about artifact and group id
Just nee din plugin.yml
plugin.yml tells the spigot/bukkit main class, bungee.yml tells the bungee main class
How basically relocation works?
I mean, not on theory, but technically how I have to write the relocation
maven or gradle
Maven
For example, what do I have to do with the exclude fields?
cool, thanks, but it needs to be set right?
What?
the mainclass
its simple maven just need a gorup id and artifact, then nothing else
in plugin.yml or bungee.yml yes
maven doesnt care about that though
if you dont need to exclude anythingyou dont need them
What you should do is then create the plugin.yml and bungee.yml in your case
<package>
-> bungee
- TestBungee
- TestSpigot
So then spigot main class: <package>.TestSpigot and bungee <package>.bungee.TestBungee
Yeah, I know about that and already have it in place, I was thinking that I may need to edit the build for my plugin pom 🤔 . I am packaging many libs of mine into it
unless you made it modules no need to modify pom
just was confusing to have a mainclass declared in the pom that could not be the same as the one from the ymls, but I guess from what you are saying that I can just leave it as is since it is only used for building but does not really affect the package
where are you declaring mainclass? that isnt needed
the only place that needs it is plugin.yml or bungee.yml
in the pom.xml
here is my project structure
I am using maven assembly to merge all those into a single jar
and that I think asks for mainclass
in which plugin section relocation goes to?
the shade plugin
?paste your pom
those things shouldnt be in plugin
you need the maven shade plguin
the entire section is on the link i sent
as so?
wdym
can i cancel blockbreakevent without client seeing air for a moment?
yes
ty
never mind, got it working removing the mainclass 😛
I will paste the pom anyways
previously I had the archive -> manifest -> mainclass inside the maven assembly plugin config, but that is not needed
anyways, probably bungee / spigot do some reflection magic
Bungee and Spigot uuid, do they change? Or the uuid asigned by bungee is the same as the uuid from spigot?
right thanks
Why are you using assembly maven plugin?
Any specific reason for ItemStack not having NBTData (Altought it should have) when retrieving it with PlayerDropItemEvent#getItemDrop().getItemStack(), any other related events like PlayerInteractEvent return the ItemStack with NBTData which is very weird 🤔
Hey, whats the difference between paper plugin and spigot plugin? Which one should i use and why?
same thing basically
Not much, a paper plugin using their methods won't run on a spigot server.
A spigot plugin will run on a paper server.
spigot compatible with paper
paper incompatible with spigot
but if you make a plugin use spigot api
yeah and here ofc you wont get paper suppport, because this is mostly spigot comm
how can I edit the name above the player head?
setCustomName and setCustomNameVisible dont work
it doesnt display the new name
ok
i cant import mythiclib and mmocore api need help
What have you tried?
i followed introduction from this link
https://gitlab.com/phoenix-dvpmt/mmocore
https://gitlab.com/phoenix-dvpmt/mythiclib
except Compiling MythicLib part that i dont understand
How do i get on right click of a specific item event?
?interactevent
The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.
For example, only executing code if the main hand was used:
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
return; // do not progress past this point |
}
// provide functionality
}
check the getAction of that event.
destroyed? like broken?
By what
a player
a entity
a bed+
why I cant find the CraftPlayer of PlayerProfile classes in spigotApi?
Cause it's not part of the api, but the server implementation.
for example when stone is digged by player
BlockBreakEvent
There is none, maybe PlayerInteractEvent, but not much else.
basically i want block progress to be reset to 0 all the time
(something like bedrock)
PlayerInteractEvent then
yes
Some event catch when player use elytra?
i can still break it
@EventHandler
public void onBlockInteract(PlayerInteractEvent event) {
if (event.getAction() != Action.LEFT_CLICK_BLOCK) return;
event.setCancelled(true);
}
BlockBreak?
same effect when cancelling that one
Hm?
What are you breaking it with?
Then the interact event should work fine.
You can always send a blockchange to the block if it’s some graphicsl glitch ur thinking about
Hello, its me again, lmao. I wanted to ask how to make my calculations Async(Using BukkitRunnables). I need to use some arguments and also, the method has to return an ArrayList<>
Yeah nah.
That’s not how concurrency works.
You can have a look at this to write easier chains https://github.com/aikar/TaskChain
cancelling BlockDamageEvent doesnt actually stop the animation tho
i want either to cancel the animation or make breaking the block never stop for the player
Try just sending a blockchange or update the physics on the block.
when canceling the event.
does this thread still works: https://www.spigotmc.org/threads/how-to-sqlite.56847/ ?
?tryitandsee
Then use somethign else
I don't know if that's even possible, as the client plays that animation clientside. Only the breaking animation of others would be interceptable. You could try creating such packets and spamming the player with them tho, xDD.
fine ill try it
https://bukkit.org/threads/change-block-break-time.299960/
Also just found this, so I guess the server can actually dictate how long it takes to break a specific block. If you don't want this to apply to all players, you're likely gonna have to intercept block updates and chunk updates tho.
That is pretty smart indeed. Just going to be a bit tedious to manage it so that it only applies when breaking specific blocks, xD.
Block doesn't matter in my case
Because the logic is location specific
Shit I need to find the person who was able to achieve this
Question, how come commands that I attempt to register dynamically are simply not registered despite the code being called?
public static boolean register(SimpleCommand cmd) {
if(isRegistered(cmd.getName()))
return false;
if(cmd.register(NMSUtils.getCommandMap())) {
REGISTRY.add(cmd);
NMSUtils.syncCommands();
return true;
}
return false;
}```
The nms utils are this btw: ```java
public static CommandMap getCommandMap() {
return ((CraftServer)Bukkit.getServer()).getCommandMap();
}
public static void syncCommands() {
((CraftServer)Bukkit.getServer()).syncCommands();
}```
Registry is simple a map of names and the command instance
and what is SimpleCommand#register
The function you're looking at above
Simpelcommand inherits Command
And as such calls the register function present there
no reason for that function to be static then, anyway when do you actually add command to CommandMap ?
never worked with that part of api, so its just assumption, is it possible to somehow replicate spectator mode only for that tick, or changing gamemodes only when that event fires
nvm, didn't know there is Command#register
I tried that, no luck sadly
Progress doesn't reset after the tick
Hey, i just started programming but already fighting myself threw erros, can someone help me? I have the complete code from the spigot starting to code website
public class CommandKit implements CommandExecutor {
@Override
public boolean onCommand(Commandsender sender, Command command, String label, String[] args) {
if (sender instanceof Player) {
Player player = (Player) sender;
// Here we need to give items to our player
// Create a new ItemStack (type: diamond)
ItemStack diamond = new ItemStack(Material.DIAMOND);
// Create a new ItemStack (type: brick)
ItemStack bricks = new ItemStack(Material.BRICK, 20);
// Give the player our items (comma-seperated list of all ItemStack)
player.getInventory().addItem(bricks, diamond);
}
return false;
}
}
and my erros are:
For command.registratiom You should do it via Command Map
what do you mean, can you say it in beginner language :D ?
so, the command is registrated already in the onEnable
like 5 years ago the beginnings so no
But wait wait, i'm clnfused