#help-development
1 messages ยท Page 489 of 1
so?
all times in Spigot are ticks
@chrome beacon ?
?jd-s
How do you get all blocks from ChunkSnapshot?
Try using Java 17
ok
or a non-bundled version of git
ticks
how do i make a method that accepts code in the constructor?
it doesn't resolve
i meant in the parameters
same answer
public void yourMethod(Runnable codeToRun) { codeToRun.run(); }
How are vector values stored and obtained using FileConfiguration?
any reason why getAsString wouldnt be working ๐ญ
Or better, lets say I want to be able to store something like
configElement: x, y, z
configElement2: x,y,z
Is just doing string* the best idea?
Bukkits vector class is ConfigurationSerializable
config.set("vector", vector)
But how does it look in the file?
?tas
Dream
config.save();```
Interesting
So
new Vector(0,20,0)
lower-corner: !!org.bukkit.util.Vector {
}
No data
What am I looking for in the stash?
it should have data
yep, no idea what to tell you, it should have its data there
I'm currently in kenshi so can;t test it myself
Hmmm
getasstring in item mata works so well (def isnt red! )
Yes but then why no data
this.addDefault("autoLink.south.region.lower-corner", new Vector(0,20,0));
this.addDefault("autoLink.south.region.upper-corner", new Vector(0,20,0));
Why would addDefault not work if nothing is there
No, but you can use a shulker for a block outline
if you addDefault you need to copydefaults(true)
The argument is still a object
Yes, it's copying
Set overrides, I will try
autoLink:
south:
region:
lower-corner: !!org.bukkit.util.Vector {
}
upper-corner: !!org.bukkit.util.Vector {
}
Empty
With a set
And yes, I'm deleting the lines every time
Just in case
you have some fuckery going on
kms anyone good with nbt api?
If you want to outline a block you can spawn a shulker in it and give that the glow
?pdc
Ok so
This is crazy
lower-corner: !!org.bukkit.util.Vector {
}
upper-corner: !!org.bukkit.util.Vector {
}
But if I do
this.get("autoLink.south.region.lower-corner")
10.0,20.0,1.0
How is the data possibly stored but not visible
I'd test it myself but kenshi will kill my PC if I blow too hard
I think zack is
But I mean, idk why he would get diff result
It's 3 lines
19.3
com.mojang.authlib.ProfileLookupCallback error with builds on maven
i runned buildtools
for my nms veriosn
Use maven authlib lib
what?
it is just in the pom.xml
?paste
java -Xms1G -Xmx1G -Dlog4j2.formatMsgNoLookups=true -jar -DIReallyKnowWhatIAmDoingISwear "%p%" nogui
Nice so
Mine doesn't
And yours does
I actually just remembered server is using pufferfishPlys
yours looks odd. It looks liek yours does not know the Vector class
I'm gonna ask them directly
I was going ot ask if it was json or something not yaml
Running PFP
This server is running Pufferfish+ version git-PufferfishPlus-41 (MC: 1.19.3) (Implementing API version 1.19.3-R0.1-SNAPSHOT) (Git: 6dbab15 on HEAD)
Yeah asking them directly
Ok so different question anyways
What's another way to store x y z
In 1 line
Cause I can't have 5 lines per vector
String and split?
yes
Yeah I've done that before
Well without parsing I don't think there's another option
You can use teams to give the shulkers color too
with luckperms it uses {prefix} and replaces it with the prefix
how would i reference that in another plugin
placeholder api
interface with Vault so you support all permission plugins
or that
i have that though
/papi ecloud download Luckperms
then you can use %luckperms_prefix% in a papi supporting plugin
How can I get a list of users advancments ?
is there a way to make it support it in a way since it doesnt work with the one im trying to use it in
why does it return 0 if I break with a netherite pickaxe?
damagers:
netherite:
axe: 10
thats not a config section so damagers.netherite wont work
try it without -
the -makes it a list, can either make it config sections or read it as a list
okay
I'm trying to loop all chunk's blocks and I wanted to get spawner spawned type, how can I do that? I'm looping through ChunkSnapshot so there is only BlockData.
you only need check tilestates
Do I need to use the Chunk object? Because I don't see any methods like that on ChunkSnapshot
public List<CreatureSpawner> getAllSpawners(Chunk chunk) {
return Arrays.stream(chunk.getTileEntities()).filter(CreatureSpawner.class::isInstance).map(CreatureSpawner.class::cast).collect(Collectors.toList()); //newer Java .toList();
}```
how can I get random number from it, like '1' or '2'?
Right, so I'm using ChunkSnapshot because I want to do it in async, but in order to get tile entites you need to use Chunk, which means I need to do it in sync, correct?
ThreadLocalRandom.current().nextInt(from, to);
yes, entities are in Chunk
thanks, how can I get size of Configuration section?
damn okay, thanks!
so int size gives error
getKeys(false).size
so im new to java programming and i wanted to make a "/heal' command like "/heal Player_Name" but i have no idea how to work with args
damn
let me test it
so args.+1?
for some reason
override fun onCommand(p0: CommandSender, p1: command, p2: String, p3: Array<out String>)
and not override fun onCommand(sender: CommandSender, Command: command, String: String, args: Array<out String>)
if (args.length == 1) {
Player player = Bukkit.getPlayer(args[0]);
if (player == null) sender.sendMessage("Player not online");
return true;
// use player
}
fuck all the toturials ๐ญ
p3.length dosent exist
๐
but if i do p3.get(0).length it exists
i love you kotlin
๐ญ
thats getting the 1st entry most likely
Its p3.size
not the length of the array
i hate my life
hmmmm
i want it to be like
val targetplayer = something idk how to do that ๐
and then
if(!args.get(0).isNullOrEmpty){
targetplayer.health = 20.0
}else {
sender.sendMessage("not enough args")|
}
do if (args.size ==1)
god no args.get(0).isNullOrEmpty <- never
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.
what does args.size == 1 do?
alr
if(sender is Player) {
if(p3.size == 1) {
sender.health = 20.0
}
}
note: p3 is args
is this the code?
got i hate kotlin
but probably
you are probably gonna do better coding in java then using kotlin when you know how to convert java code
i want that "p3.size == 1 that 1 to be in an variable and then do if(p3.size == variable) {
variable.health = 20.0}
my internet
help
my messages arent sending
oh nvm
how do i do dis?
fuck
like
thisis the code in java
val targetedplayer = Bukkit.getPlayer()
you just need to convert it to kotlin
val targetedPlayer = Bukkit.getPlayer(); it has a red line under getPlayer()
it takes an arg
so
getPlayer(String)
it says "name" bru
where does it say name
you need to pass args[0] if the size is 1
another case of you will be better using java not kotlin
if(sender is Player) {
val targetedPlayer = Bukkit.getPlayer("");
if(p3.size == targetedPlayer) {
sender.health = 20.0
}
}
ight
it erros
the if(p3.size == targetedPlayer) is yello
w
args are the hardest thing to learn(for me)
what is the issue
@Override
public boolean onCommand(CommandSender sender, Command command, String alias, String[] args) {
if (args.length == 1) {
Player player = Bukkit.getPlayer(args[0]);
if (player == null) {
sender.sendMessage("That is not an online player");
return true
}
player.setHealth(20.0);
player.sendMessage("You have been healed!");
return true;
}
if (sender instanceof Player player) {
player.setHealth(20.0);
player.sendMessage("You have been healed!");
return true;
}
return true;
}
thats the java code
i could prob make it better but i cba to open an ide
kotlin is ```kotlin
override fun onCommand(sender: CommandSender, command: Command, alias: String, args: Array<String>): Boolean {
if (args.size == 1) {
val player = Bukkit.getPlayer(args[0])
if (player == null) {
sender.sendMessage("That is not an online player")
return true
}
player.health = 20.0
player.sendMessage("You have been healed!")
return true
}
if (sender is Player) {
sender.health = 20.0
sender.sendMessage("You have been healed!")
return true
}
return true
}
i- i have to learn args ๐ญ
its 12 am in the morning
ima save this for now and take a break like holy shti
shit
be happy its not 12pm yet
my plugins saves locations in this file how can i tp a player there now
config.getLocation
this is what i tried but it didnt work
why are you creating a new ConfigUtil every time
as the name says utility classes should not be instantiating, looks like you might want to change that name
bc thats not a config section
that is just a locatiojn
config.getConfig().getLocation("hub");
If you store locations in your config you must be 100% certain you never touch your config (via code) before onEnable
no static access
okay
The Configuration API is a set of tools to help developers quickly parse and emit configuration files that are human readable and editable. Despite the name, the API can easily be used to store plugin data in addition to plugin configuration. Presently only YAML configurations can be used. The API however was designed to be extensible and allow ...
its not the config its a different file
any config which stores locations
any1 can help pls
u need to shade kotlin stuff in
by ignoring warnings
huh ?
Guys, does anyone know how to update DISPLAY_NAME with the name above the player's head? I tried 'EnumWrappers.PlayerInfoAction.UPDATE_DISPLAY_NAME', but it only updates on the tab
public PacketContainer updateDisplayName(Player player, String newName) {
PacketContainer packet = new PacketContainer(PacketType.Play.Server.PLAYER_INFO);
packet.getPlayerInfoActions().write(0, EnumSet.of(EnumWrappers.PlayerInfoAction.UPDATE_DISPLAY_NAME));
WrappedGameProfile gameProfile = new WrappedGameProfile(player.getUniqueId(), newName);
packet.getPlayerInfoDataLists().write(1, Collections.singletonList(new PlayerInfoData(
gameProfile,
player.getPing(),
EnumWrappers.NativeGameMode.fromBukkit(player.getGameMode()),
WrappedChatComponent.fromText(newName)
)));
return packet;
}
try this
public void updateDisplayName(Player player, String newName) {
EntityPlayer entityPlayer = ((CraftPlayer) player).getHandle();
DataWatcher dataWatcher = entityPlayer.getDataWatcher();
dataWatcher.set(new DataWatcherObject<>(2, DataWatcherRegistry.c), Optional.of(WrappedChatComponent.fromText(newName).getHandle()));
PacketPlayOutEntityMetadata metadataPacket = new PacketPlayOutEntityMetadata(entityPlayer.getId(), dataWatcher, true);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(metadataPacket);
}
mm
im just trynna grab an nbt
trynna jcheck if the item has an nbt
atleast smth works
But why?
You shouldn't have to interact with nbt directly
Can someone help me?
I have this method
https://paste.md-5.net/oteloqoneh.java
But when I run it, I receive this exception:
https://mclo.gs/7aaLTnn
Line 127 of ConnectionHandle is in the paste (condition.await(20, TimeUnit.SECONDS);)
lemme explain
my plugin is a spawner stacker
but we base everything on nbts
so for example
i right click a pig spawner on a pig spawn
to make sure its a pig spawner
it checks the nbt
mm its just itemmeta
lemme show u
I use https://www.spigotmc.org/resources/nbt-api.7939/ when I need to use NBT, it's quite good
Preconditions.checkArgument(item.getType() == Material.SPAWNER,"item type must be a spawner!");
try {
ItemMeta meta = item.getItemMeta();
String nbt = meta.getAsString();
nbt = nbt.split("ShopGui:\\{EntityId:\"")[1]
.split("\"")[0]
.toUpperCase();
return EntityType.valueOf(nbt);
}
catch (Exception ex) {
BlockStateMeta state = (BlockStateMeta) item.getItemMeta();
SpawnerExtractor extractor = SpawnerExtractor.of((CreatureSpawner) state.getBlockState());
return EntityType.valueOf(extractor.getType().toUpperCase());
}
}```
theres also a varient off that you can shade in
i was having some trouble adding it
also i didnt want to add another dependency
as it worked perfectly before idk why it shouldnt work now
You should. If someone has made the job, why should you do it again?
Due to it being a public plugin players shouldnt have to installed 10+ dependencies
i try to keep it super user friendly
theres one you can shade in
But as EpicEbic mentioned, you can shade it
Agh, I can't help you in gradle
all the docs are on the github
i just move to gradle to ๐ญ
i mean theres gotta be another way besides using nbtapi
why not just use pdc?
Yes, using spigot nbt api or reflection (I guess)
I would use reflection or directly use nms
mm
ill take a look at that
I actually wouldn't use any of them
But stills a choice
It's an item
Spigot doesn't recommend the use of nms nor reflection unless completely necessary
Plus I think it's against mojang TOS
its not ?
Yet you recommended NBT API
Why would it
which you can and already are gettign BlockStateMeta, then getting a BlockState
Ah I was looking for that
Idk, I don't think mojang likes that somebody touches nms classes
That BlockState then casts to CreatureSpawner
and you have acces to getSpawnedType()
Then Spigot and all mods would be against tos
I said "I think"
Anyway, even if it's not against mojang TOS, using nms or reflection should be the last choice always
nms and reflection would be faster than NBT API
But yeah use the API as Elgarl said
lmao
Yes, but an update might break the plugin
i wonder why getAsString isnt working
maybe because importing org.bukkit.Bukkit isnt working ๐
no cap
all bukkit
Just like an update can break NBT API
โ ๏ธ
Not if you use the one that spigot provides
Yeah I was talking about NBT API not spigot
Or if you use another API that relies on spigot API
NBT API relies on reflection
And I don't say that NBT API won't break, but I mean, nms or reflection should be the last option
Yeah I'm aware
Uh im not sure if i should ask it here but i didnt find anywhere else to do so: So i made a plugin its a free plugin and i want people to download it the problem is idk how to really advertise plugins well Any help?
You can always pay a youtuber to showcase it
Though really the best way is to have a good spigot page and activly pushing updates
Oh and have patience
Maybe, but Spigot has a bit of a special arrangement with Minecraft.
So I have a plugin with 98,000 downloads, and another with 75,000 downloads. The key is patience. If you are looking for instant popularity, you won't find it making ordinary spigot plugins. But if you make something high-quality that is user-friendly and configurable, people will use it. When it gets used enough, hosting services will start displaying it in their plugin options. That gives your content a real boost.
alright
Best thing you can do is keep it up-to-date and bug-free.
its bug-free and up to date and user friendly so i hope to see it growing
its my first release
It may be worth noting: My 98k plugin is from 2016. My 75k plugin is from 2021 (IIRC). Find a need, fulfill the need. Instant win.
Nice! If you ever come across a tough spot, always feel free to reach out. I for one have been at this for over 11 years. We're always happy to help.
well i have 10 years of java exprience im just fairly new to releasing any of my content
i do enjoy using the spigot api to make cool things
thanks for the help tho
Nice. Well good luck! DM me a link to your profile, I'll take a look at your plugin and maybe give it a test run in my server if it's something I can use.
ok
@tall furnace what areur plugins?
What's the problem?
I see the red dot... but I do not see a written error.
k
// World Edit Wand
ItemStack wand = new ItemStack(Material.WOODEN_AXE);
ItemMeta wandMeta = wand.getItemMeta();
String wandName = staffConfig.getString("items.wand.name");
wandMeta.setDisplayName(ChatColor.translateAlternateColorCodes('&', wandName));
List<String> wandLore;
wandLore = staffConfig.getStringList("items.wand.lore");
for (int i = 0; i < wandLore.size(); i++){
String wa = ChatColor.translateAlternateColorCodes('&', wandLore.get(i));
wandLore.set(i, wa);
}
wandMeta.setLore(wandLore);
wand.setItemMeta(wandMeta);
player.getInventory().setItem(staffConfig.getInt("items.wand.slot"), wand);
Give me onJoinEvent method with line numbers, if you can
this is in a method thats called in onJoinEvent
Which line is line 65?
String wandName = staffConfig.getString("items.wand.name");
its weird right?
bc the code is ok
and im doing the same with all the items in the inventory
and only getting error in that single item
Only that item, not the others?
Why is it even trying to invoke CharSequence.length? I'm not seeing anything of that sort here
Well, a "this.text" is what's causing the NPE that creates this issue
maybe that will not work with world edit
That wouldn't create an NPE though. W/E just uses a normal, everyday wooden axe.
Can you pastebin or hastebin the entire class?
Yes
coming
?Paste
how it was?
?paste
OOOHHH I found it I think
You imported org.bukkit.ChatColor. Wrong ChatColor for the ChatColor.translateAlternateColorCode method. You have to use the bungee api chat color class.
Delete the import and reimport the bungee one or use the full namespace for the ChatColor class reference.
thanks
Np np
okay
I never even use it; I just type ยง.
Now for public plugins, I get using the ampersand, because some people don't know how to type the section symbol.
Non American spotted
lets see
Nope XD I am in fact American.
Hoa tf do you type the section symbol it's impossible unless your literally mad and have the unicode value memorized
And if you do have the unicode value memorized your taking extra steps
...maybe ah du
omg it was a sout
[alt+0167]
Yeah most people don't have the unicode memorized
As well as that just being extra work
It's easy when you're used to it.
its literally working in one but no in the another
i really fuckin want a way for me to add custom accents to letters on my keybaord, bc i have power accent from power toys i can just hold a key and press left/right arrow
https://paste.md-5.net/epetefihek.java
https://paste.md-5.net/ekasaronig.sql
https://paste.md-5.net/xaxokudoro.java
SQL is the error, any ideas why this happend?
Huh, that'd be cool.
how can i set the player, including their armor, invisible?
have you read error ?
You can entirely hide everything about a player. I think it's playerWhoIsLooking.hide(playerToBeHidden)
is it like Bungeecoord:main?
In the playerScoreboardEvent
try and see
Good luck guys I gtg for a while
didnt work
Does anyone know a tutorial where it teaches you how to set up a Kotlin project forcreating minecraft plugins?
Google your question before asking it:
https://www.google.com/
?bing
Bing your question before asking it:
https://www.bing.com/
I tried lol
Don't use Kotlin
There's one YouTube video and a spigot post, but I'd like to know if there's a better way
agreed
I can bet that you will have a lot of issues because you cannot find a lot of documentation and/or personal support
Ideas?
Same documentation just kotlin syntax
That is if the kotlin person
A) can read java
B) the person is capable of reading documentation
If one of those aren't true they are in for a rough time
And also, support
Also the real talk
What's even the benefit of kotlin for our work?
Noone has ever explained that well to me imo
Just seems like an alternative language with no specific "this is why it's better to use"
Null safety or whatever
And extension functions but that's it
public abstract class Config extends YamlConfiguration {
private final File file = new File(Nao.getInstance().getDataFolder(), getFileName());
private static YamlConfiguration config;
public YamlConfiguration getConfig() {
if (config == null) {
config = this;
}
return config;
}
public void loadConfig() throws Exception {
if (!file.exists()) {
Nao.getInstance().saveResource(file.getName(), false);
}
this.reload();
}
public abstract String getFileName();
public void reload() throws Exception {
super.load(file);
super.save(file);
}
public void save() throws Exception {
super.save(file);
}
}
This is a abstract class that im extending to files i need to create, scoreboard.yml, messages.yml and stuff and everytime i access something like that its giving me an NPE
Such as: [18:10:53 ERROR]: Could not pass event PlayerJoinEvent to Nao v1.0
java.lang.NullPointerException: Cannot invoke "String.contains(java.lang.CharSequence)" because "message" is null
at me.nao.placeholders.ReplacePH.replaceAllPlaceholders(ReplacePH.java:15) ~[Nao-1.0.jar:?]
at me.nao.listeners.OnJoinEvent.PlayerScoreboardEvent(OnJoinEvent.java:65) ~[Nao-1.0.jar:?]
("message" is from a config file made with that abstract file)
I'm shaking with excitement
Preconditions#checkArgument go brrr
(no semicolons)
but theres no keywords like extends or implements its just a :
i got a full hcf core in kotlin
but i dont understand anything
lol
Lol
that literally is not it
U don't but while new tool kit cause of there being a new shiny hammer that comes with it lol
*don't buy a new
What's a datatype that can only hold unique values but not in pairs
Like a hashmap
set
Yes, it is
Coroutines
Functional types (first class functions+higher ordered functions)
Inline functions
Extension functions
Operator overloading
Infix functions
Null safety semantics
Closures
Just providing the necessary ig
what comes to my mind
Java doesnt have coroutines?
damnn
How can I delete leftover packet holograms
J21 provides virtual threads
usually we prefer using paste for long stuff
?paste
Why is there just a random 7?
ScoreHelper: https://paste.md-5.net/omuwiciyof.cpp
Join Event: https://paste.md-5.net/avevomidic.cs
There
i remember someone from jetbrains said kotlin coroutines will also benefit from loom
gonna be fun to see how
also on Kills*
Well there were some jvm adjustments, maybe thatโs what they referred to
maybe
Try moving the &7 to right after the :, and put the space between it and the placeholder.
Okay
is it open source?
nope
i can't find modern ways to use kotlin to create these plugins besides a really small lib with 100 github stars
do you use java
its the exact same setup, you just use kotlin instead
yes
To like set the jvm compiler optipn etc
do you guys use jdk 19?
and then u shade kotlin standard library
17
most of us stay on lts, 17
18 if i need newer versions
17 is goated rn
what's the alternative for coroutines in java?
cuz i know virtual threads are java 19
futures iirc
19 provided them as preview
or sth
Not actual release
No its not futures
Futures are a java lib thing
i borked chat pgt
would you guys say that spigotis a framework?
its a API for me
It's more of an abstraction layer
bc is just interacting with the server
why is it so hard to add a custom accent to a letter for power toys
how reliable is chatgpt for learning about it?
0%
i used chatgpt like 2 months ago when i was starting
its code was shit
i learned alone
and now i dont use it for coding
imma send something and u tell me how good/bad it is
just easy to check on javadocs
i used to use it for typescript and it was pretty useful
Dvd, its not the classic type of framework, but I mean you could say it is one in a broad sense Ig
well, its useful
Decent, just dont copy paste blindly
Try to understand what gpt gives u
I wonder if we've spoken before
i used to be good at skripting
but i am also proficient in kotlin
and make a code based on that
i normally check on events
and the support isn't that great
but then i just write it myself
Well if uโre proficent in kotlin uโre proficient in java and c# and vice versa id say
But ye nice nice
java is just annoying lol
Occasionally gets on my nerves fs lol
System.out.println() -> println()
Well thing is gpt isnโt always right
So thats why its good to think critically
At least is not cout >>> bla bla bla
at least is not
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.plugin.java.JavaPlugin;
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class MyPlugin extends JavaPlugin implements Listener {
@Override
public void onEnable() {
// Register events
getServer().getPluginManager().registerEvents(this, this);
}
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
// Open the GUI when the player right-clicks an item
if (event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) {
if (event.getPlayer().getInventory().getItemInMainHand().getType() == Material.STICK) {
openGUI(event.getPlayer());
}
}
}
public void openGUI(Player player) {
// Create a new GUI frame
JFrame frame = new JFrame("My GUI");
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.setSize(400, 300);
// Create GUI components
JPanel panel = new JPanel();
JButton button = new JButton("Click me!");
// Add components to panel
panel.add(button);
frame.add(panel);
// Register button click event
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
// Perform some action when the button is clicked
player.sendMessage("You clicked the button!");
}
});
// Show the GUI
frame.setVisible(true);
}
}
this is some chatgpt java based code for a menu, is it ideal?
lmfao
int main(){
std::cout << "Hello World" \n;
}
Its abysmally delusional
dont make me cry
please
What did u ask to get that code?
create me a gui minecraft plugin in java lol
Ah
obviously i could've used a better prompt, but i'd assume it'd give like the most ideal way at the time
https://www.spigotmc.org/wiki/creating-a-gui-inventory/
I'd assume this would be best practice lol
Yeah, I just hope there isnt an actual source code project where they used awt shit for minecraft guis
My first hello world application
I assume youโre the compiler, interpreter and runner of that language
Yes, but the best part of that language is that everyone is able to understand it
๐ข
use
7smile7
is
just
beautiful
his
gui
mdoel
this
can still be worked on
Please, write messages in a single line ๐ข
but is a decent start
Yea its a decent way to architecture it
No sorry, $69 paypal now
do you guys prefer maven?
Nope
i got
I like gradle, probably since I use it a lot for my micro applications
but in theory maven is pretty nice especially since the new version release
worked in one
yes
when?
like i bought a val acc
and then i couldnt log in
yesterday
and well
Why?
idk
That reminds me when I scammed a friend by selling him a fake val acc. My friend end with 0.07 dollars
U wanted to smurf or just have some cool skins?
cool skins
Send a packet to despawn entity
(Peak)
that friend of yours sound so beautiful
He is actually ๐
LAN
Got their feet pics
damn
so the stuff is
i gotta rank from silver 1 to gold 3 at least
without 20 dollars
:(
Despawn the entity

LAN stands for
Lolis
And
Northems
froma spigot post
i can finally type ยง easily
Oh thatโs interesting
no it doesnt
It is
Did you know lolis are not legal? ๐
So local area network is just a lie , i see
Even though they might have like +500 years
there any api for scoreboards?
Yes, it does not exist
Everything is WAN
Spigot api lol
Or just nms ig if u prefer that
(I do but most dont)
fast board iiiiiiiirc
dont wanna make hard work ๐ช
TAB has a decent api
love tab
fuck the owner tho
?bing
Bing your question before asking it:
https://www.bing.com/
Must be you
WHAT DID I DO
You broke bing ๐
Ask ms support
Isnโt bing based on previous searches etc
With a bit of luck they will only take like 3 years
like most search engines
yes
I think not
Shame ms
Microsoft intentionally placed that error for you there, so you can call them and they know your phone number
I've would done the same ๐

Now that I got people attention, can someone help me? ๐

Huh? How
Send a packet to destroy the entity
With the same entity id as the one u used to spawn
[CODE REVIEW] Post Code or Review Others
Not if someone sends shitpost every day
No epic
I can change it
its gonna disappear in 2 weeks
I will send shitpost every week
The same exact post, every week
someone knows JScoreboards?
?
But I need to specify the entity
Yep
Then how lol
How do u spawn the entity?
From?
then restart the client
Well relogging will work
It's not a packet hologram
its not a packet hologram
Or the thing spawning it is still spawning it
You can tell if it's a packet hologram by using the kill command
If it gets removed by killing, it's not a packet hologram
/kill @e[type=armorstand,r=5]
To kill within 5 blocks
Might need to use minecraft:kill if a plugin overrides the kill command
shouldnt it be ..5 for 5 locks
Not sure about the locks
But i suppose it would depend if you want a straight line or not
R is for radius and will do 5 blocks in all directions
Yeah but in a single direction
#1100941063058894868 is the place for code reviews. Remember to read the pinned message!
this can be a forum
Are you medic TF2?

I wrote https://github.com/zerodytrash/TikTok-Live-Connector
In java
Should i open soirce it?
I was gonna release a plugin that connects to tiktok
But i dont really care to do so anymore
nah keep that shit away from java we don't need any TikTok programs ruining our ecosystem
๐
Anyone who knows how to use the citizensAPI, would really appreciate if you would check out this thread. Thank you!
https://www.spigotmc.org/threads/citizensapi-spawn-an-npc-with-skin.602139/
Farm rods project complete, moved to portable chests but one issue. PlayerPickupItemEvent is deprecated. Any fixes?
I just seen the event is deprecated but I seen this. InventoryPickupItemEvent which can be used for hoppers and stuff. Which will be useful when I get to the hopper plugin. Lets see what I can do with this
What does the documentation on the deprecated class say?
EntityPickupItemEvent??
Thanks
Teach a man to fish ๐ฃ
Average Paper user
Is there a way to edit .class files just for easier readability?
I think I have saw in some tutorials some guys being able to edit the .class files again for easier readability
Also all this is for IntelliJ IDEA
I got another issue. What causes a itemstack to go back in inventory after attempting to drop it on the ground?
.class is the compiled bytecode
are you sure you know what you saw
are you talking about decompiling to source in IDEA?
you're not supposed to edit .class yourself
I cannot find the cause
I tried everything
Probably an event
/ plugin
I looked thru the events and I did not see the cause, it only happens when I have the Portable Chest GUI open
You might be right about the event
๐
I think this was the one
Can BungeeCord detect player using spigot command?
Yes
ive a question regarding World.rayTrace. is raySize parameter sort of like accuracy? and whats the default value of it
What does the docs say about it
raySize - entity bounding boxes will be uniformly expanded (or shrinked) by this value before doing collision checks
There you go
but i dont know the default value
It's whatever the entities bounding box is + whatever you enter
The default value is 0
will getLastDeathLocation return the players current death location when accessed from a PlayerDeathEvent?
unknown but likely as it can't be canceled
will T&S ig :P
?bootstrap
Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.
Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163
light mode eclipse is my weakness
you should really be using Maven or Gradle and then import the org.spigotmc:spigot-api:1.19-R0.1-SNAPSHOT dependency from the spigot repo
?maven
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
boy i love components
what error
Thats on eclipes?
I added it using external jars in classpath
Need anymore info?
no
looks like the wrong jar
@eternal oxide Downloaded from here
Weird
jar looks ok
it does not in fact return the current death pos if called in a PlayerDeathEvent @eternal oxide
good to know
so uncancelable but not yet upto date
ye
Its been so long since I didn;t use maven I've no idea
run a clean on your project
Umm, wha do u use
Eclipse
How?
Project menu -> clean
I use eclipes too
does it work?
no
then no idea
Use Maven
it handles all the dependencies for you. no manual importing jars
Is that a diffrent software than eclipes?
no, its included with Eclipse
you start a Maven project instead of a Java project
What should my group id and artiface id be
if you don;t have a domain me.spiderunderyourbed or whatever name you use and artifact use the plugin name, all lower case
so me.PLUGIN_NAME
or com.PLUGIN_NAME
for group id
Wait
Heh
I know about artiface
so for domain it should be me.USER or com.USER
artifact will be your plugin name, all lowercase
I still need a group id
I have told you both of these TWICE now
Ok so lowercase plugin name twice
for both option
no, READ what I write
I'm not telling you again
read back what I already told you more than once.
Im using onutillities for both options
since thats what you said I think
no I did not
groupid is me.whatever
artifact is your plugin name but all lowercase
Is there any resources for maven spigot development?
?maven
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Right, do I essentially do everything you do with a regular spigot project
Nvm
no i do not
fill the pom.xml in as that link tells you
from now on never manually import ANY jar
I need 1.17
so change it to 1.17 or whatever version you want
I can just request that from plugin.yml
right?
if its like 1.18 I can add to plugin.yml i want api version 17
Maven is just a build system. It is similar to using the ide built one which that is typically the ant build system. Reason it may not feel the same is because your ide was taking care of making the build file for ant for you where as with maven it is mostly your job to do that
As far as programming goes it is the same
@wet breach
Do you mean jdk version of java?
What? I mean at the root of your project you usually add a plugin.yml file
Oh just create a directory called resources inside the src directory
And then toss the plugin.yml in there. maven will automatically put it in the root of the jar
Well first off you put it inside the test directory
That is the incorrect location. And modelversion refers to the pom.xml
Im editting the pom at the root of the project
Do you not have the maven plugin for eclipse?
I just made a maven project? isnt that what your talking about
Well i dont use eclipse so cant say if there is additional plugins for maven for that ide
I personally use netbeans
When i create the project there was the test directories
Is there anything unsual here that you dont see happening on netbeans
for my project
Yeah you dont need the test directory unless you intend to make some testing stuff for the project. Its safe to delete it.
Ok, now how do I fix those errors?
And ill put the yml in the resources directory
Modelversion refers to the top line that outlines what xml version standard it is using
Can probably look at some random maven project to see what it is suppose to be
I did
^ example maven config
is what i copied
Src main is where everything should be at. Sorry i misled you on that. Forgot there was that dorectory
There is a main folder inside the other src directory too
which is confusing
So it should be src/main/resources. Everything in resources will go to the root of the jar. Src/main/java. Is where your java class files will reside
The exisitng resources at the top of the project, not the folders at the bottom
Well one might have been in the test directory
Give me a few minutes. Clocking out from work
Ok, ping me when ur back
Anyone?
I am back now.
Right, so I just create the yml in main resources
Correct
