#help-development
1 messages · Page 1585 of 1
Ah
which is provided by mojang in their repo
Yes in “the gradle”
or just be a normal person, add mojang repo:
maven("https://libraries.minecraft.net/")
and 1.17.1's authlib
compileOnly("com.mojang:authlib:2.3.31")
life is great and you don't need to depend on impl for something that isn't impl only
Hum okay
Im here to remind of that post 4 years ago "spiget will add premium recources soon"
Nothing happend through these past years
For the BuildTools : "Error: Unable to access jarfile BuildTools.jar"
what post ? also there are a bunch of premium resources on spigots resource page no ?
You have no idea what spiget is
You need to run the command in the same folder as the BuildTools jar
And what's the same folder as the BuildTools jar ?
is it done or what
Where you put it
Is it don
Ah but you have to install the file? If yes, where can I do it ?
you know that spiget is not maintained by the spigot team right ?
like, one pretty good developer sat down and created it
in their free time
This is the best place i can find
All you need to do is download it
for what exactly
what are we supposed to do
if the feature isn't there, it isn't there
the project is completely open source
feel free to work on it yourself if you need it
Coming to spigot for help with spiget is like going to Linux for help with a lynx
Thats why im here to remind ppl
why
no one here works on it
this is not the "spiget" support channel
this is spigot
there is no one to remind
Is the download link in the link you gave me?
spigot/spiget - it is all the same
Link to download
Yes
Ok
https://github.com/SpiGetOrg there is the org
read through the code and enjoy
tho I doubt you will get anywhere with it
concerning how you don't seem to understand what spiget is and how it is related to spigot
Taking a look at ray tracing methods for the first time and I have this line set up
RayTraceResult ray = world.rayTraceEntities(origin, direction, 50, 0.1);
Problem is that I don't know how to start the ray tracing
Do I use a for/while loop?
you need the mojang api
And how i get it
^^
I already threw you the filled spoon
But there is errors
Like you understand anything better
dude. spiget is maintained by a single developer.
posting in here to "remind" people to work on an open source project
like
Like i didnt know that
Ah so
World world = player.getWorld();
and origin and direction are location and vector based on where the player is looking at
So any time a player instance is looking, a ray is being drawn?
Just coming in here to remind mojang to please release the new combat system and 1.8 combat gamerule
Didnt know thought it would be fine to post here
^^ this was as useful as your comment
but yea, if the feature isn't there yet I think you can just contribute it yourself
I didnt come here bc of me
I came here for someone
well, this is not how open source works xD If you need it and the maintainer don't have time, code it yourself
Never said he dosent have time
if they haven't implemented it yet it either isn't high priority or they do not have time
seems like a logical conclusion
@chrome beacon Done it but imports doesn't work
I never told them to or never said i was doing this im just here to help
For The one who needs it
oh so you are like a human reminder for the hypixel network developer
like dude i arleady told you, you dont understand anything
please enlighten me
wuts the issue
im not going to be repeating shit
idk carls came here to remind someone ? (apparently inventivetalent) to implement premium resources into spiget ?
lol
not straight up
so what else is up?
From what I am seeing the discussion between you two is going nowhere
it isn't xD
im not here to repeat shit or argue about uneeded things that i arleady answered
This conversation is almost as unneeded as spiget
damn xD
what is the default gravity in minecraft?
@quaint mantle Just to make it clear, you make yourself look like an idiot
give it up you two dont stand a chance
nvm it's working
make it three
Please stop I feel very intimidated by disembodied internet men
@hexed hatch you were a warrior that always wanted to be the best then ur prides have been taken and ripped to shreds
what the hell
this delivers more cringe than people asking how to register event listeners
@Mods pls kick that guy
@eternal night you were betrayed by the people you trusted and lost something that you cared even more than your own life
thanks magic 8 ball
Free fortune telling I suppose
lol ok
first a human reminder, now some trash internet "AI" fortune telling
How to create a Hologram without any API? Old Solution doesn't work anymore
Holograms are just named armorstands or effect clouds
If all this suffering made you to what you are now why dont let me put it to an end for you
Doesn’t take much to make them
They are usually done client side
i know but it doesn work, should i show my code?
Which would be a spawn packet and a meta packet
Go ahead
I think he means he’s using the spigot api
why are you even writing @quaint mantle? carl is a bot and doesn't even have a brain
^
Could be wrong, I don’t know why someone would be asking for plugin development help without using spigots api
im not a bot im a turtle with a brain
My boy that doesn’t sound half as eloquent as you’re thinking it is
whats the default value of gravity in minecraft?
It isn't some arbitrary constant to say the least
String[] Text = {ChatColor.DARK_RED + "Something", "", ChatColor.BLUE + "Discord: /dc", "", ChatColor.GRAY + "Website: joo", "", ChatColor.GREEN + "Stats: /stats", "", ChatColor.DARK_RED + "2019-2021 booo"};
Location hololocation = new Location(Bukkit.getWorld("world"), 18.500, 61, -17.500);
Holograms holo = new Holograms(Text, hololocation);
holo.showPlayer(p);
yes sorry i should mention that
Well looks like you’re making use of some sort of api?
you are a nobody
I know that Minestom had a really large convo trying to find out the vanilla formula for gravity, I guess this is where you should search at
wait
Looks like you’re going to have to learn how to send an entity packet to the player
package de.themoory.lobby.utils;
import java.util.ArrayList;
import java.util.List;
public class Holograms {
private static final List<EntityArmorStand> entitylist = new ArrayList<EntityArmorStand>();
private static final List<EntityArmorStand> entitylist1 = new ArrayList<EntityArmorStand>();
private final String[] Text;
private final Location location;
private final double DISTANCE = 0.25D;
int count;
public Holograms(String[] Text, Location location) {
this.Text=Text;
this.location=location;
create();
}
public void showPlayer(Player p) {
for(EntityArmorStand armor : entitylist) {
PacketPlayOutSpawnEntityLiving packet = new PacketPlayOutSpawnEntityLiving(armor);
((CraftPlayer)p).getHandle().b.sendPacket(packet);
}
entitylist.clear();
}
public void create() {
for(String Text : this.Text) {
EntityArmorStand entity = new EntityArmorStand(((CraftWorld)this.location.getWorld()).getHandle(), this.location.getX(), this.location.getY(), this.location.getZ());
entity.setCustomName(IChatBaseComponent.a(Text));
entity.setCustomNameVisible(!Text.equals(""));
entity.setInvisible(true);
entity.setNoGravity(true);
entitylist.add(entity);
entitylist1.add(entity);
//System.out.println("Entity: "+entity+" ID: "+entity.getId());
this.location.subtract(0, this.DISTANCE, 0);
count++;
}
for(int i = 0; i<count; i++) {
this.location.add(0, this.DISTANCE, 0);
}
this.count=0;
}
}
you are a emty trash
should be the important things
emty trash :(
Sounds like my spellings and your face have something in common
the packet is send to the player but its only the ArmorStand withouth any name or something
What's wrong in my Code?
is it possible to create a border like this, without it beeing a border? i just want to display it, but allow players to pass through it (to get to the black area)
if not a border, what else could i use to represent a limit?
Would particles do the trick?
hm
how do i call a method from a different class?
its similar system to skyblock, so making a wall of particles could cause a bit of lag, and if players have shitty pcs they might lag
you either make it static or create a new instance of it
Something like in https://youtu.be/zZei04XwJPs?t=202
hey, how can i fix this error?
ResourceKey<BiomeBase> newKey = ResourceKey.a(IRegistry.aO, new MinecraftKey("custom", "testbiome"));```
then I do not know if there is an option for this
oh shit thats not bad at all, do those particles keep falling? if i just spawn one line at the very top, would this make a wall all the way to the floor?
I don't know, I just skipped to the part of the video where a wall of particles was shown
@quiet icecan you help me with my issue?
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.
xd
unlikely
What's wrong there?
It doesn work
The ArmourStand appears with no name
What is the best way to save objects in SQL. Would I convert it to JSON and then save the json to the database?
Would it not be easier to use something like Gson instead of writing a class for each object i want to serialize and deserialize.
also, why is json in sql useless.
@EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST)
public void playerJoinEvent(PlayerJoinEvent e) {
Player p = e.getPlayer();
String name = p.getName();
Property property = SQLite.readSkin(name); //sql query
if (property == null) {
property = steve;
}
Property finalProperty = property;
((CraftPlayer) p).getProfile().getProperties().putAll("textures", Collections.singleton(finalProperty));
}``` how I can do it as Async?
how I try skins aren't loading
put it in an async runnable?
yea I try
How should i work with it? PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata(armor.getId(), armor.getDataWatcher(), true );
doesn't work
@EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST)
public void playerJoinEvent(PlayerJoinEvent e) {
Bukkit.getScheduler().runTaskAsynchronously(Main.plugin, () -> {
Player p = e.getPlayer();
String name = p.getName();
Property property = SQLite.readSkin(name); //sql query
if (property == null) {
property = steve;
}
Property finalProperty = property;
((CraftPlayer) p).getProfile().getProperties().putAll("textures", Collections.singleton(finalProperty));
});
}```
someone effect how I use normal runTask
without async all work perfect
how do you put the texture on the server?
@chrome beacon I tested to create a skull with an url of a skull but it's not working
to put emojis, put models with animations, modified interfaces, what needs to be done? is there an explanation on the net?
because the bukkit api isnt made for async
whats the best way to read from a json file?
How can i send a EntityArmorStand to a Player? My Code doesn work and idk why
PacketPlayOutSpawnEntityLiving packet = new PacketPlayOutSpawnEntityLiving(armor);
PacketPlayOutEntityMetadata packet2 = new PacketPlayOutEntityMetadata(armor.getId(), armor.getDataWatcher(), true );
((CraftPlayer)p).getHandle().b.sendPacket(packet);
((CraftPlayer)p).getHandle().b.sendPacket(packet2);
SOLVED
but how I can do it better?
@hybrid spoke Sorry for the ping, have you a solution for my skulls that doesn't work ?
still at the "cannot import authlib" issue ?
No
Use a Plugin channel?
?pmc
?
I doubt that the plugin messaging channel changed since it's inception
only in channel name
Blame md
hey, I want from an entity to look another entity, how can I do that please?
vector math 🌈
is this a good way of reading json files?
Reader reader = Files.newBufferedReader(Paths.get("config.json"));
JsonObject parser = (JsonObject) Jsoner.deserialize(reader);
token = (String) parser.get("token");
bc you need to send the particles to a player or do something others with it
or just spawn the particle into the world in the first place
yes but I'm really not sure of my code
but when i decompiled the function from code #2, it contains the code #1
but its create its in the world yk?
You have to do something with the Particle Object
perhaps that is what the .a() and .a(true) things do
I need help, I have an NPC plugin, but it wont save right, here are the classes:
Main: https://paste.md-5.net/ocaripasah.java (btw it says loadWorlds() twice, but I fixed it so the first one is loadCommands())
ClickNPC: https://paste.md-5.net/awululazaq.java
NPC: https://paste.md-5.net/sapayazaza.cs
Packet Reader: https://paste.md-5.net/itimapuyow.java
Join: https://paste.md-5.net/numanokagi.java
It shows in the tablist but not to the player after a restart
You have access to gson
Again
I tryed this don't work
gson hmm
Please use a NPC framework
I told you in helpchat already, it will save you a ton of time
Considering you said you spent 7 hours on it
ill go look somewhere else
that is what .a(true) should do
Hello why when perPage is set to 10
it sort fine like
1. User - 5 kills
2. User2 - 3 kills
3. User3 - 0 kills
but when it set to 2 for example it look this
Page 1:
1. User - 5 kills
2. User3 - 0 kills
page 2:
3. User2 - 3 kills
because your SQL statement does not sort itself ?
it simply returns the first x entries after the offset
sorting afterwards will only sort the found users (e.g. user 1 and 3)
oh right
Caused by: java.lang.IllegalArgumentException: location.worldwhy is this hapening
?paste
world flatland either doesn't exist or isn't loaded
you are trying to teleport an entity to a location that has a null world
hi, who knows why i cant use that classes?
import net.minecraft.core.IRegistry;
import net.minecraft.core.IRegistryWritable;```Errors:
```diff
- cannot access net.minecraft.core.IRegistryWritable
- cannot access net.minecraft.core.IRegistry```
did you check the dependency?
all my dependencies:
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.17.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>```
what are the access modifiers of the two classes?
Or rather said, interfaces
This isn't a dependency issue as otherwise there would be a less specific error along the lines of cannot resolve symbol "net.minecraft"
public abstract class```
whoever named that class like that should belong to jail
how can I fast load player skulls? (with uuid)
Anyways, I have no idea how this doesn't work
Unless you are viewing the wrong class, because convention is that anything starting with a prefixed I should be an interface
public abstract class IRegistry<T> implements Codec<T>, Keyable, Registry<T> {...}``````java
public abstract class IRegistryWritable<T> extends IRegistry<T> {...}```
I see
how could i make a patter of blocks like this? (each box is anywhere between 150x150 up to 500x500)
its random, within certain area
Why is this convention a thing if it isn't even used correctly
the only alternative reason I have in mind is J9 modules interfering, but that should technically produce another error
Cannot access usually means that the class is not public so I have no idea why the hell this does not work
Where as if the class is missing it would produce a cannot resolve xyz error
- Fill a plain
- Get N random coordinates
- Make sure that every coordinate has at least a distance sq of 500*500 to each other coordinate
- Generate a random number for the size (2 are also possible) for each coordinate
- Generate the patches
You should be able to just use some simple for loops if you want a level area.
step 3 might be hard to do if there are a lot of boxes on a non-enclosed space
If he checks every box then its a np problem
Though using some kind of noise algorithm would mean that boxes could overlap, so that isn't ideal either
open simplex noise would be a good idea. But tinkering with the resolution and frequency might be a bit too much for such a simple task
this could work, the only problem is that i dont see a way to generate new boxes, what i could do is generate X boxes within an area, save them and when a player claims them i just set the new owner
actually, using a noise algorithm means that the boxes don't need to be stored in memory at all to check for overlapping, so it could be used on an infinite space more easily
my idea was generate a new box thats in the corner of another 2 boxes, something like
Ayo is there a way to have a exe file without the dlls for it?
Save the middle of all generated locations. If you want to generate new ones then just generate new random locations and check it against the already created ones.
I would just add some regen limit.
but i didnt know if it was the best option
well, you can have it, but you cannot execute it without obtaining those dlls
This is like running a bukkit plugin without minecraft
ugh that's annoying
I would say that you create some kind of row/colum system where each row and colum is assigned a random width/height based on a noise algo.
Certainly overkill, but works
I don't wanna have to give someone the whole folder with all the dlls
Might be a good idea. With a random offset based on the rolled size.
You can probably wrap the dlls into one single executable.
hm
actually yea, a table-like system is perfect since that takes care of overlapping
That unpacks them into a common folder (like Roaming) on runtime and then starts the main application.
hiehgt is always from void to top, width is upgradable, so i would have to set the max as virtual island and then set the limit as the one the player has upgraded
so when they create the limit would be 150x150
Smile is back 
but eventually it could get up to 500x500
i made him come back
😎
lool
hm, so the width can be changed after populating? That complicates things
i might do waht you said of the row column system, with a random offset, thank you
is there a way to avoid destroying the base item in an anvil or smithing table?
with a 1 island in between, the space is enough
clone (and drop/do whatever with) the input item on the corresponding event?
Depends a bit on what you are trying to do. because this just sounds like a duping machine.
when a user takes the result out I don't want the original destroyed
I just don't know if that's possible
it is possible
You just need to listen for teh appropriate events, though don't ask me which events they are
all I'm aware of is intercepting the click event and cloning the base item
but yuck
Sure. Then just do what geol suggested. Clone the ItemStack and place it into the left slot. This has to be done one tick after the click event.
giving it back to the player is fine, that likely doesn't need a tick delay
This is a quick mock up:
@EventHandler
public void onAnvilClick(final InventoryClickEvent event) {
final Inventory inventory = event.getInventory();
if (inventory instanceof SmithingInventory smithingInventory) {
final int slotID = event.getSlot();
if (slotID != 2) {
return;
}
final ItemStack input = smithingInventory.getInputEquipment();
if (input == null) {
return;
}
final ItemStack clonedInput = input.clone();
TaskManager.runTaskLater(() -> smithingInventory.setInputEquipment(clonedInput), 1);
}
}
thanks, ya that's what I'm writing up. I hate inventory click event
I know that paper should have api for this so you do not have to use the inventory click event
That being said, you may or may not be using paper, so under some circumstances this isn't possible
I am
I just tried that but for me at least it still doesn't open. I'm probably doing something wrong though
run build tools locally and then import spigot instead of spigot-api
you cannot download it from the internet
oh yeah
well not directly
Depends on what variables
Depends if the plugin has an API or a singleton pattern. Some plugins use singletons with static getters for some of their manager classes. So it depends on the plugin.
Do I need to include all this in my artifact https://imgur.com/oYmGXi8 to wrap the dlls into the exe file
because I tried and seem to do nothing
There is no "best" approach. But you could just use the singleton pattern for your main class or the manager classes.
Whats the reasoning behind having two plugins?
I'm using this AnvilGUI library of WesJD but when I build the artifacts I get this error about the lib:
Error:(7, 26) java: cannot access net.wesjd.anvilgui.AnvilGUI
bad class file: /D:/Downloads/anvilgui-1.5.1-20210705.155110-3 (1).jar!/net/wesjd/anvilgui/AnvilGUI.class
class file has wrong version 60.0, should be 55.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
I assume I need to like downgrade the version or something?
as 7smile7 said, scrap all teh static and Singleton design
You can use the services manager
does anybody know why TAB plugin isn't working for me?
Good question man
yesterday worked perfectly fine, but today doesn't work at all
I even deleted it and put it back in, but still not working
what are some dependencies that you guys recommend?
Contact the developer, we didn't make the plugin so we probably won't be able to help you.
None
For?
java 16
just general plugin coding
spigot
Well the only thing I can think of rn is an item builder class / api
lol
you can keep your message we'll help it doesnt matter how dumb
I use one on almost every large pluign I make and it saves lots of time
the ones you need. we can't just say "use this and that"
Yeah
Depends on the purpose the plugin
ok, ty
hi
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.15</version>
<scope>compile</scope>
</dependency>```
noclassdeffounderror org/apache/commons/codec/binary/Base64
😦
I didn't quite understand
thx!
So I have a javafx project and I tried to wrap the javafx dlls into a exe file but it seems to do nothing. I may be doing something wrong but im not too sure.
how can I check if the player is currently using its normal hand or its offhand?
In the PlayerInteractEvent there is event#getHand which gives an enum that can be HAND or OFF_HAND but I want to get the slot in the PlayerItemConsumeEvent where this method doesn't exist
i was wondering how i could make it so when i step on the diamond block that it doesnt spam chat it only sends the message once, my code is ```java
@EventHandler
public static void onPlayerWalk(PlayerMoveEvent event) {
Player player = event.getPlayer();
int x = player.getLocation().getBlockX();
int y = player.getLocation().getBlockY();
int z = player.getLocation().getBlockZ();
Material block = player.getWorld().getBlockAt(x, y-1, z).getType();
if (block == Material.DIAMOND_ORE) {
player.sendMessage(ChatColor.AQUA + "You found diamonds! Perry is happy, goodjob!");
}```
just got this idea a few seconds ago haha
Im so stupid that i didn't think of that earlier
how would i add it in?
connection.send(Packet)
Add them to a list or something and then return if they're in that list
Is there any further documentation on this?
That's just what they're called in the Mojang Mapped JAR
It's the same thing just renamed
got it working! thanks
If you're using Mojang's mappings, yes
Not sure what they're called in Obfuscated/Spigot, I think Spigot mappings is the playerConnection.sendPacket()
playerconnection is now b
Why the name change?
All the fields got re-obfuscated in 1.17
Cause its mojang
Thanks!
np
That's why you use Mojang Mappings if you're working with NMS 😄
Although then you have to worry about re-mapping at build time which is a pain
why don't we use fabric smh
how to convert TextComponent to IChatBaseComponent?
What surprises me is that everyone tries bukkit on fabric, but none (to my knowledge) tried fabric on bukkit
for note:
pipeline = b.a.c
[INFO]: Named entity EntitySkeletonWither['test'/1626, uuid='ebd9894b-be4c-4b18-ac1a-592e3d5a2641', l='ServerLevel[world_nether]', x=766.50, y=88.00, z=300.00, cpos=[47, 23], tl=191, v=true, rR=null] died: test suffocated in a wall
when a mob dies, I get a message, what can I do to prevent it from being output?
#help-server i think
or it is code's problem?
I guess you can remove the name before you kill the mob
no, plugin dev
m.
ah yes, unnecessary bumping
🤔 wait someone refunded the $990 tip I got for a $10 thing I sell? I simply can't believe it wasn't a legit payment
wtf dude
?
method doesn't exists
?jd spigot
smh, no https
ye
that's right
but thats per-player, solves their problem
Hey! Quick question: I'm in the process of creating something that places a few blocks. Among these blocks are glass panes. I would like to work with multifacing for the glass panes in order to connect them with the surrounding blocks. I have already programmed the following:
Block glass = player.getWorld().getBlockAt(location);
BlockData glassData = glass.getBlockData();
MultipleFacing facing1 = (MultipleFacing) glassData;
facing1.setFace(...);
but can only indicate directions of blocks. Does anyone know how I can make it so that glass panes connect to the surrounding blocks?
?
can i set panic for villagers?
?jd
does anyone know how to coppy the config from resources to the plugin datafolder?
saveDefaultConfig
config.yml or a custom yaml?
config.yml
they probably want it done automatically, since nms already does it somehow
then yeah what lizard said
however there's probably no api method for it at the moment
bump
ah, JFX
it is a pain to get around imo, but why the hell would you put them into an .exe file? Usually you put runtime libraries within the jar itself
Or apply JFX's jmods onto the JRE (which you should have shipped yourself)
which of the values should I use?
is there a way to see if an entity has spawned based on its fields fight after running the spawn method (for instances where, say, it may have been cancelled during spawning)
detect nearest blocks
I want to use isValid but I've seen some false positives
yes but i mean which of them
what do you mean shipped myself?
Well, provide
Usually you install an OpenJDK alongside your jar when it comes to most consumer-based java applications
ew openjdk
You technically could just provide an OpenJDK distribution that has JFX installed now that I am thinking of it
Spares you from the entire pain in the first place
Basically you have a bootstrap executable/script that launches the main jar with the provided OpenJDK (that already has JFX installed)
Minecraft and Mindustry do that
Hell, most java games do that
Apparently though you can do it through intellij
Using IntelliJ as a bootstrap?
no
Does anyone have an idea what can lead to long inventory loads? I don't know why but on the main world "world" my inventories load (only where database queries are concerned) for at least 4 seconds, but on all other worlds it works immediately. I don't work with any world names in my plugin either.
You are running SQL queries on the main thread?
We love to see it
I use MongoDB and i need to query, for example, to query whether the player has different achievements.
If you can;t run it off thread you will always have delays
Thanks for the hint, but a bit strange that this leads to 4 seconds delays in the main world but not in the secondary worlds.
I would tend to assume observer error
does anyone know what to do next after running the 1.17.1 buildtools
also im in rasberry pi
That means? What can i do?
Code ?
Another question: And why did that not lead to any problems in the previous versions. There were no loading times on 1.16.5
There is no logical reason for only main world queries to be delayed so I'd have to assume, either you are doing something different in the code with main world, or you are using smaller inventories in other worlds. There must be some difference.
java.lang.ClassNotFoundException: io.morice.oneblock.utils.ScoreboardUtils
Are you using an API for ScoreboardUtils ?
And is that API on the Server itself aswell ?
I've searched my entire 46 classes and don't do anything with the "world", I'm a little desperate. Could it be due to another plugin? At the moment I am still using WorldGuard and WoldEdit in beta as well as Protocollib
Its always possible. Run with just your plugin to see.
Hey ! Does anyone have any experience with DI (with guice) I've been able to setup dependency injection within a plugin. However I'm working on a Core that other plugins could grab information from (such as player info) for this, I would need to inject stuff from my Core plugin to my other plugins.
Does anyone know if this is achievable and if so how ?
Any help would be greatly appreciated.
Well it says that it cant find the File, so something must be wrong with the exporting / implementing of the API
I try it, thank you
hmm weird
Try completely restarting the Server ?
Yeah sometimes /reload can fuck that stuff up, it's really rare though
I mean, it even tells you to restart server instead of reloading ^^
But who does that
flatland is not loaded as a world
what why not
a warld in my server
howdy do does anyone know how i would check if a player double clicks shift?
a Multiverse world?
yes
then its not loaded
how could i load it
as its an MV world, ask MV to load it?
oh
got it
lol
/mvload is a thing apperently
im still getting the error
nvm i think i got it
wait
what
ok how would i load a world with multiverse
public @interface PriorityEventHandler {
EventHandler eventHandler() default @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST);
}
If I use this annotation I've made so that I can reuse the values I pass often to @EventHandler, will Spigot recognize it when that annotation is nested in there? I ask because I don't have another plugin to test priority with.
via code just try new WorldCreator("flatworld").createWorld()
if it exists it will be loaded
?paste
?paste
whats this? what do you use it for?
or how is it called?
It’s an annotation for event handlers
Specifies some options associated with them
Hello. Does any one knows how get LoginResult class? It was at #bungee#connection#LoginResult, but now it is not. I want it to set skin on players.
Im making a plugin for 1.16, but want to use the raw iron block if the plugin happens to be running on a 1.17 server, how should I do this?
or rather, whats the best way to do this
does anyone know how to teleport someone to the end of a raycast even if the raycast ends at air
?paste
well, if the ray returned is null you could simply take the start location and add the direction multiplied by the maxDIstance to it
https://paste.md-5.net/regeyepoqe.java
anyone know why I am not getting the effects when I hit the Entity with the name Magmus
to get the "end of the ray" location
strings are compared using stringA.equals(stringB)
Genius :0
not using a == b
Hey, thanks for that. Do you know how I add it to Maven? I'm a little bit confused.
Or, is there a replace?
This is probably not the right place for that question
I believe they even have their own discord for Skript development
Why are you supressing deprecation warnings? they are there for a reason
only temporary

public ChunkData generateChunkData(World world, Random random, int x, int z, BiomeGrid biome) {
return createChunkData(world);
}
```I'm creating a void world using the code above...
How can I make it so all chunk biomes are jungle?
Tried that but it doesn't set all biomes to jungle
hmm I mean, its possible you might need nms for this
i am bored what should i do
How can I change it on chunk generation though? if I use NMS the chunk already exists.
create a brainfuck interpreter in brainfuck idkidk
Not talk in the development channel while adults are trying to help people
hmm thought the generator stuff was just adapters to nms
It should be actually... But I mean like if I do CraftWorld.setBiome(x, y, z, BiomeJUNGLE) those chunks are already generated and I would have to get the x and z manually.
Rather then in the generator.
please no
i dont know brainfuck
im making a world gen rn, conclure is right
just make sure you go through all x,y,z
for(x in 0 to 16) for(y in 0 to 256) for(z in 0 to 16) {
biome.setBiome(x, y, z, Biome.JUNGLE)
}
Something like this (Pseudocode)
its nice when you just have a couple lines of logic so you dont have to indent 4 times for one line
"we need everything one line so the developers can have a hard time reading" - BanePig
I just extract a method
so i know this is possible i just need guidance
im trying to set a boolean in a command and then refer to it in the main class
its fully possible
you'd do something like:
class Main {
private boolean property;
public void setProperty(boolean b) { property = b; }
public boolean getProperty() { return property; }
void onEnable() {
new Conclure(this);
}
}
class Conclure {
final Main main;
Conclure(Main main) {
this.main = main;
}
@FakeEventHandlerIdkButSomething
void blah(SomeEvent event) {
main.setProperty(false);
}
}
yeah
well the problem with urs
is that the variable unbreakable is scoped to the method onEnable
it only lives and is reachable within that method
ahhh
also the method notBreakable() always returns true, once you made that local variable unbreakable into a field, return the field instead of just true
like:
class a {
boolean b;
public boolean c() {
return b;
}
}```
hmmm
so like
private ProtocolManager protocolManager;
public boolean notbreakable() {
return notbreakable();
}```
so more like
public boolean notbreakable {
return notbreakable;
}```
pretty sure as soon as you call that method your server is gonna crash instantly
it will
i forgot the error
Stack...
was it StackOverflow?
return notbreakable;
}```
?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.
idolp more like
class Main {
boolean unbreakable = true;
void onBreak() {
if (unbreakabe) {
new BukkitRunnable()...;
}
}
}```
or smtng
ahhh
oh i thought he has a variable inside his main class
and i thought he was trying to get it lmao
lol ye
alright cool
thought this was general for a sec
BTW, sorry for noob questions, but why world.b(Class<? extend EntityLiving>, PathfinderTargetCondition, EntityLiving, double, double, double, AxisAlignedBB) can't find custom entities, that were added to the world before server restart?
just saw this! thank you!
you want to despawn the entity for the player i think
You're destroying it, you have to make a new entity
probably not loaded yet
You might be able to re-send the same entity object if you kept it? Not really sure how it handles that.
why would that be the problem tho isnt he only destroying it for one player?
¯_(ツ)_/¯
so i have this but IntelliJ Is saying the final Main main; might not have been initialized https://paste.md-5.net/ocewoxivud.java
Yeah tried that to but without the y since its chunks
you have two constructors
well you need the y?
show
oh i forgot to send-
you didnt initialize it
No!
let this be a lesson in not using deprecated methods
well
without the new constructor
wait no-
thats not a constructor
not what i meant
yk what i mean haha
i pulled an all nighter
no
// Main class
@Override
public void onEnable() {
getCommand("name").setExecutor(new MineableCommand(this));
}
// Mineablecommand
private final Main main;
public MineableCommand(Main main) {
this.main = main;
}
and dont name it main
name it your plugin name
🥄
yeah-
wtfff is my keyboaaardd not registerinng key presses
wrong channel
its right but i dont understand
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
I used 0 in the y slot I didn't not add it lol
then you're only going to get the biome at y=0
wat
wat
wat
That makes no sense lol a biome goes to block height
final = cannot be reassigned
read the article in full / learn java
Hmmm ok I'll retry it. Thx
they are loaded, my 1st idea was that they changed class back to the vanilla one, but when i created event to print class name of right clicked entity to chat, it was ok, so i don't have any idea now
are you sure they're loaded when the method is called?
even if a chunk has been loaded sometimes the entities within the chunk have not been
sooo
is Bukkit.getServer().getCommandMap() like, not a thing?
im just wondering because it is on skript-reflect (java code in skript), but is not in my .java
despite having org.bukkit.command.CommandMap imported
skript-reflect
pretty sure thats a paper thing
that makes sense
i just looked, yeaha
skript-reflect is shit but if your using it and it works on spigot im pretty sure it might of added it itself lmao
nah im not using it anymore
I even tried to change b() to a(), so it should find also unloaded entities, but still nothing
i only use it to eval something in java really fast
i.e; /eval player.sendMessage()
Is skript reflect not about reflection
and if i spawn new one next to the old one, it finds the new one, but not he old one
even when the old one is nearer
im pretty sure it uses reflection lmao to call java methods but idk
Does anyone know a working version of https://haselkern.com/Minecraft-ArmorStand/
One that actually shows the items
that does work
its just your doing something wrong
you might of selected the wrong version
public ChunkData generateChunkData(World world, Random random, int x, int z, BiomeGrid biome) {
for(int c1 = 0; c1 <= 15; c1++) {
for(int c2 = 0; c2 <= 15; c2++) {
for(int c3 = 0; c3 <= 15; c3++) {
biome.setBiome(c1, c2, c3, Biome.JUNGLE);
}
}
}
return createChunkData(world);
}
``` Doesn't work.
ples give variables actual Names
What version did you choose? I don't think I need to change that to see a simple diamond sword
No
Can you screenshot what you're seeing?
what version of mc your using?
Does that even matter?
yes
alright 1.16
max y is 15
I don't care about the nbt, I'm talking about the website itself.
Not the command or anything version related
Oh yeah. Still doesn't work
yes
oh
it doesnt show the items in the editor
so you will just have to hope and pray it works
It worked. Gotta optimize it now thx.
bump.
how can i unregister an event listener object?
pretty sure there is a method but idk where it is
Event#getHandlerList#unregisterEvent - Example: PlayerQuitEvent.getHandlerList().unregister(Listener)
HandlerList.unregisterAll(listenerObjectHere);?
mm what if the listener is listening to more than just the PlayerQuitEvent?
i think so yeah
Then just use unregisterAll() which will unregister ALL event listeners
that will just unregister the quit event?
Yes, as an example, you have to pass it a listener though, or the plugins instance.
declaration: package: org.bukkit.event, class: HandlerList
ok thanks
Do anyone know of an API when using their username, it returns their full uuid and not the trimmed one? I can't find one to use
doesnt the trimmed one still work?
idk
how can i send a command argument with spaces? using quotes?
How can I rotate armor stand head using packets? Since I'm spawning it using packets
File#exists
im using FileConfiguration config = this.getConfig();
boolean exist = config == null;
is there no event for stripping logs? ive been looking through the api and google and can't find anything
stripping logs ?
right clicking on a log to get the stripped form
so like
getting a command via getCommand() is NOT inefficient, yes?
however
in a different class, where i have Main.getInstance() as a thing IN THE MAIN CLASS
the return value of Main.getInstance().getCommand("kick") is null... even though "kick" is a completely registered command
Is it in your plugin.yml
completely registered command
yes
the command WORKs, its just trying to get the information about the command
(usage, description)
Is getInstance null
no
works everywhere else
and in the class, its a getCommand() issue..
im not sure where im going wrong though?
public void onTab(PlayerCommandSendEvent e){
if(e.getPlayer().isOp()) return;
for(String cmd : new ArrayList<>(e.getCommands())){
if(cmd.contains(":") || !e.getPlayer().hasPermission("command." + Main.getInstance().getCommand(cmd).getDescription())){
e.getCommands().remove(cmd);
}
}
}
why are you not registering your command in your onenable?
bruh
who said im not
Main.getInstance().getCommand("kick")
bruh
bruh
I thought you were registering it by getting an instance of main lmfao
yeah I was about to say haha
and as seen here... appearently its null?https://paste.md-5.net/watanoyehu.sql
lms
whats lms
let me see
Cannot invoke "org.bukkit.command.PluginCommand.getDescription()" because the return value of "com.ankledev.nectar.main.Main.getCommand(String)" is null
yes
you need a constructor
new Command(string) ?
that wouldnt matter lol
Yes it would?
Why not
because im getting the command's description
and comparing it to the player's permission
because plugin.yml doesnt want to work properly
but you're getting the commands description from the main class aka from your plugins yml
Gets the command with the given name, specific to this plugin.
a constructor.. like new Command(cmd) ?
get an instance of your main class
public Main main;
public Class(Main main) {
this.main = main;
}
yeah that's what getInstance() does i think
yeah it does
okay cool
Also the description can be a long string
That would be a weird permission to have...
Well for yours maybe
plugin.yml didnt want to work idk why /shrug
But you seem intent on checking all of them
to filter the ones where they dont have the permission ( description ) out of auto-completion
lots of people make them nothing or "A command that does z, y and z"
yeah lol
i guess while we're here i might not even need to check their permss
so i've had this issue, i'm registering the command
List<String> commands = Arrays.asList("spawn", "discord", "say");
Commands commandsClass = new Commands();
commands.forEach(c -> {getCommand(c).setExecutor(commandsClass);})
s
commands
and i have them in plugin.yml
etc.
when i give the commands permissions, they dont show up in auto-completion at all?
despite me having the permission to run them? and the permission specified?
and im not op??
hello
Did you try relogging
hi
many times
how do i check if in my config no string provided
i can show this issue if you want lol, its super weird
example
ID: ''
you check for null
Or empty
many times
for some reason im having weird gui issues, but ik its probably just me being bad, but just wondering,
So when i have a gui and make it close than open a new gui, from clicking an item with in the gui, how can i make it so only the new items appear? and not break the previous and the new gui with all the items from the previous and new gui?
paghes]
pages
you cant just open a new one
can this if (annChannel != null) return; ?
okay but how can i make pages???
I made they mistake when I was a noob and it drove me crazy
you're returning if it IS set?
oh
if (value != null || value != String.empty)
i want to check if the string is empty or not
so use else
if (a) {
} else {
}
wait just wondering, why cant i just close the inv and reopen it??? Why are pages so needed??? :?
i have a class called EventListener bc I have multiple events id like to listen in on but whenever I try to refer to it in my main class (Bukkit.getPluginManager().registerEvents(new EventListener(), this);) i get this
required: com.mcbt.rpgpackets.Main
found: no arguments
reason: actual and formal argument lists differ in length```
Main Class:
https://paste.md-5.net/jarapotizi.java
EventListener class:
https://paste.md-5.net/egebozuyod.java
am i using the wrong thing to refer to my eventlistener or is this a syntax error? I'm very confused haha
probs an mc thing but it breaks the menu
what if i add a delay to it?? so it closes the menu than like 15 ticks later it opens the new one??? will that still break it terribly??
doesn't fix it
tried that as well
..... mc is weird.....
yeah
okay well, since i never dealt with pages before, how can i go about this?
Thank you,
np
wait... dont tell me i need to recode the entire gui...
do i need to recode the entire gui again??
for the second one
or can i just "tab" it all forward?
ok so the 1st one i can have it as it is yes?
than for the 2nd one make it a "page" like thing?
yeah
Alright cool, good thing i didn't start working on the uh, 2nd one yet,
ngl im probs gonna have to recode the entire gui system in itself..... since the plugin itself is all done through a gui..... :/
can i ask
hm?
yup
after i reload the config, do i have to restart the server ?
restarting the server after reloading the config just makes the server reload the config & the plugin,
bump (idk if just saying bump is rude but i saw someone do it so hi)
i have it directly in the project folder
where is it at??
if the plugins starts then its in the right place
i.e; Nectar > plugin.yml
^
alright
i've just seen it in different places
i.e;
Plugin > mainclassarea > plugin.yml
so i was just wondering like
why arent the permissions working in it?
do u have the permissions setup into the plugin?7
like example:
p.hasPermission("test.use"){
}
ngl i think ppl who can make ranks are cooollll
also, do u like,
do u have the right perms into the ranks?
gonna be real with u i think i might need to recode the entire gui system i made, xd
yes
it's a "smart" system
it just gets the enum name of the rank, i.e; "REGULAR" and lowercases it
hm, thats weird then,
and adds it like, nectar.regular
well its just my localhost server for dev purposes
but yes
i've tried everything
seams something like the hive would have...
😳
r u opped??
no lol
do u have the * permission on accident with in ur name?
no
hm, ok, thats kind of weird then,
the * permission isnt actually a real permission iirc
the * perm is just op tbh,
its op but without u getting the msg saying u been opped.
so like, anyone know why the commands arent showing up
how do i get a config value with datatype boolean
String.valueOf(boolean);
drag and drop ur plugin.yml onto where it says "Nectar"
bc where it is rn, is kind of where nothing will work, but the plugin will register.
what
drag the plugin.yml file to where it says ur project name
oh yeah maybe it'll work this time
not like this ? boolean isEnabled = config.getConfig().getBoolean("Config.Global.enable");
oh idk then
:O
did it work?
like, i tried it everywhere
if (getConfig().getBoolean("bossbar")) <- example,
and it WORKED in /src
xd
np <3
so actually i lied
what i just sent should automatically detect on weather its true or false in the config.
oh?
now the commands show no matter what, i have Regular rank currently and i can still see staff commands
which code lol
Oh,
u can disable tab complete.
i dont want to though, it's easier to do that but it isnt efficient tbh
oh,
so thats true ?
ok gimme 2 sce then
oof
that will detect if its true or false in the config.yml
yes i want that
i want to do like, if its false it will return
if(boolean) return;
`code here`
}```
or do this,
i prefer to cleanly return lol
lol
well its true,
ok so yeah
if u try so many methods with the equals true or false, it can bug out,
uh wdym?
Oh LOL you disabled tab complete compeletely,
lol
whats ur code for this lets see if i can try helping u fix it
which code