#help-development
1 messages · Page 16 of 1
yes send a GET to it to the url you have, and read the JSON data returned back
Google is your best friend for this, you can do it in standard java without a lib
json = HttpRequest.newBuilder()
.GET()
.uri(new URI("https://sessionserver.mojang.com/session/minecraft/profile/" + player.getUniqueId().toString().replace("-", "") + "?unsigned=false"))
.build()
.toString();```
would this work?
and then the json stuff
wasn't talking to you lol
try and see
Json you can use spigots built in Gson library import
in fact if you wanna be fancy you can parse it against a pojo class that matches the data result
However, if you wanna use something else for json, then feel free to but gson is provided by spigot so it helps make your jar less bulky with more libs compiled into it
Does anyone know of a way to get your current project version from the pom inside of a plugin? I tried getClass().getPackage().getImplementationVersion() but it gives me null
plugin.getDescription().getVersion(). Though this assumes you replace a version property in your plugin.yml
which you should be doing
One of the possible answers for someone who doesn't know kotlin at all is to write the code itself, it's more practical, a huge time saver on some projects, not to mention the rich library of kotlin itself
alright thank you
Hey all I need some help with a very simple plugin i'm making.
The plugin works well, it's basically a /staff that shows the staff online, but when I do /staff it shows the following:
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
you need to do .getName() on the player object to get their name
I wonder
I think im doing that already @somber sequoia
this.staffList.add(player.getPlayer());
yep i misstyped
i meant to say .getName() after .getPlayer()
very sorry for that
Packets and shit
its all g, thank you
Im gonna edit and try it out. Appreciate it
Works, thank you ! @somber sequoia
Could be caused becaue the jar is not updated? https://paste.md-5.net/rewojikiqi.java
How does one send a text component using another (default.json is the default) font from a resource pack to a player
any ideas?
are there any PathfinderMobs that are not LivingEntities?
oh wait I'm stupid
PathfinderMob extends Mob extends LivingEntity
is there a way to add that funny enchantment overlay to a player head?
wdym?
the purple enchantment overlay
No I believe it's broken on heads
minecraft is broken in general
@rain masonwhat you could do is use a custom texture pack with a model for the item of the zombie head and use a data model tag and set it when giving the item, then you could add the enchantment glint
thats the way i would do it
alr, do y'all have any other idea on how to make the first head stand out from the other players? (it won't be all zombies it's just my skin)
no
use a different item 🤷
hmmm... you could used a image modifer API from online to add the enchantment glint
but that would be more complex
to modify the skin
Just use another item
i dont think they want 2 modify it, cause it has to have player heards
heads*
i could probably just use a nemtag or something idk, and add lore with the player's username
Where can we look to find out if a new version of Minecraft is a new revision? Like if 1.19.1 is 1_19_R2 or still R1
I want to load a world trough bungeecord only with packets, knows anyone how this works?
Look at the craftbukkit package
how dare you only use static!
i wanna be protected
Take a look at wiki.vg for how the packets work
Then implement and send them
I only make you private ^^
And you will not be used
Don't worry I'll save you with reflection :p
private final Human staticDev = new Human(HumanNullifier(useSecurityGuard: true))```
Okay, then I will initial you with a reflection too
You could try to add a fake enchantment effect, if that's possible for heads
I'm not sure whether it is or not
Okay, cool chat but I have to read into some packets now, sorry. if you want we can continue later 🙂
Is there an extra discord for bungee?
You're using a too old gradle version, try upgrading to the latest snapshot version
Hello, guys! Does NMS 1.19.1 same as 1.19 (1_19_R1)?
heh.. everybody is preparing to block minecrafts new report system
getEntityType is the same with getEntity#getType?
Well, I am a LuckyBlock dev and I am interested if I should add one more nms support for nbt
Thanks
So is it 1_19_R2 for 1.19.1 or still r1?
wait how do i save hashmap
as file
public void saveKingdoms() throws IOException {
properties.putAll(kingdomMap);
properties.store(new FileOutputStream("data.properties"), null);
}``` im using this, but im not sure how to customize the destination of that file
I wonder why the mappings viewer never works
Im needing help i have been more than 10m trying to figure how to update a mongo document using a POJO class
google it
Gotta be more specific than that
what did you try
Also what IDE?
oh
google it lol already found something
@last temple
change the version there (:
Okay im using a system called Pojo from mongo db, which likely use a java class acting as a Bson Document. But i dont know how to update the data on the db without creating it again. I tríed MongoCollection#updateOne() but its force me to cast it to Bson but i shouldnt cast it because i get an exception and my java class have nothing to do with bson
i feel like its /gradle-7.5.something-bin.zip
@last templeits actually /gradle-7.5-rc-1-bin.zip
i think
use screamingsandals' one
it is
ik what pojo is lmfao
how i can find the namespacekey from a specific craft
from minecraft or from another plugin?
Minecraft (Want unregister the: Iron Pickaxe -> Iron Nugget)
Pojo is a way of mapping data for mongo db. Its like you have a class which is used to save/update/delete is more like a model
.
this.getServer().removeRecipe(NamespacedKey.minecraft("rec"));```
You use findOneAndReplace usually
you do not need this btw
F to everyone who still has to use 1.16 NMS lol. It's sooooo weird to see all those fucking letters again after using remapped for months
this
thanks, but how can find specific key (if i want unregister other)
wdym spef key?
is there an event for liquid touching a block
Just use findOneAndReplace and you'll be okay.
what is "rec" in your message
Ok mime thanks brío, because using update One was forcing me to cast User.class into bson Document
Which have nothing do
I dont I know if I explain
@fleet comet Where can I find all the names of the recipes?
does minecraft use the exact item name for the rec 2?
Like I said I know what it is I've used it a lot. You have to do findOneAndReplace
you might have to manually find them
?
Thankssss man I was with this since last friday
😍
they may just be like iron_pickaxe though
you can try the item name
@slate delta
declaration: package: org.bukkit.event.block, class: BlockSpreadEvent
I would like to remove the recipes of furnace which transforms iron tools into iron nuggets in fact
That doesn’t say anything about liquids
oh
declaration: package: org.bukkit.event.block, class: BlockFromToEvent
u gotta manully find that then
😕
It’s BlockFromToEvent
Yeye
Ye
I got it the second time
how do i save the hashmap 2 a specific location?
public void saveKingdoms() throws IOException {
properties.putAll(kingdomMap);
properties.store(new FileOutputStream("data.properties"), null);
}``` im using this, but im not sure how to customize the destination of that file
PATIENT
Dont spam it every 10-20m
i cant just spoonfeed you
i was actually tryna rephrase it
If you want to your message get not lost open a thread on this channel
oh
how do i check if the item the player is holding has a specific name
Quite easy, make a file with the name in the location you want then do file.getabsolutepath
ohh my god ur a life saver lol
mike
Not sure if you can. Either make a wrapper with a from -> to or something else.
Because in my case im using a external location class
You'd need to have a method to serialize/deserialize it
Something like a codec right?
Store the location as a string then have a getLocationString and a parsedLocation method
is there a way to parse foo.bar as a Map? (so I can get all the keys)
That way it can be stored in the DB just fine and can be read as a location in the object
oh i dont like that
I find really ugly hahaha
So i use a custom location class which mostly contains string world, double x, y, z, float pitch and yaw
😂
And them a method like: Location toBukkit()
Just being able to save spigot locations without serializing it into a string
I believe it's called minecraft:iron_nugget_from_smelting, if you are still looking for it
Where i can find all recipes name key ? (thanks you)
I did a manual search for it
i'm guessing just look at the version's data/minecraft/recipes stuff
I used this https://www.spigotmc.org/threads/how-do-i-get-the-recipe-of-a-crafting-item.109239/#post-1178365
Search an interactive list of Minecraft blocks, items, mobs, entities, potions, ids and data values.
an IDE?
I dont think i understand what you need
ok ok
i need a place where can i find plugin coding ideas for beiggener
to work on my skills
There are no recipe namespacekeys 😕
?
Java skills or spigot?
java skill
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.
You have there some usefull urls
Yes that is how you must start you shouldnt start plugins without knowing the lang itself
😂
@sterile token i want find a list of all recipes keys for this.getServer().removeRecipe()
Oh ok
right
i thing i finded https://mcreator.net/wiki/list-vanilla-recipe-registry-names
This page contains the list of Minecraft vanilla recipe registry names:
I used this to find all recipes for an item: https://pastebin.com/DdJSK0AP
just change the item, it will output all types
ohhh
that's probably outdated
MC Assets is a browser for Minecraft asset files. Explore all Textures, Sounds, Models, Fonts, Shaders, and more from any Minecraft version, without having to extract the files yourself
and change your version
thank you everyone
that's how I found the iron pickaxe -> iron nuggets one
yeah almost any armor can be smelted into nuggets
it only told me the iron pickaxe one
anyways bump, kinda confused on how to do this
If you want all the keys get the configuration section foo.bar and call getKeys on it
oh cool thanks
There’s also getMapList
but that only returns yaml foo: bar: - something: false abc: def, - something2: true def: abc map lists, right?
like foo.bar (in this example)
^
I meant no new package name etc
Ah
well it's only org.bukkit.craftbukkit, but anyway 😄
Yeah the rest is fine as far as I'm aware
No revision, correct
Heya all
so uh I need to listen to system out prints
is there a way to do that
not in spigot tho
Heya, I've been coding spigot plugins for 2 days (I've got experience in other languages) and I've been able to to must stuff by just looking at the docs which is great :)
Only thing I'm struggling with right now is placing a wall sign when I right click my Iron pick toward a block, I'm using PlayerInteractEvent. Cheers.
class SpecialForwardingPrintStream extends PrintStream{…}
then
System.setOut(SpecialForwardingPrintStream.create(System.out));
oh i tried that
Didnt work?
Ugh how did you implement it?
frick it did that was another app
🥲
lol
You gotta be carful accidentally quantum entangling your plugin to other things
Original question: #1001922370132516895 message
New modified code and question: Last message in #1001922370132516895
If anyone is a math wizard i could use some help on that
Once I made a mistake in my plugin code and my fridge stopped working, it’s terrible
lmao
The fabric discord probably
Interesting, ty
is there by any chance mojmaps for 1.19.1 too?
Yes
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.19.1-R0.1-SNAPSHOT</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>
``` seems to not be working
Did you run buildtools with --remapped
what special source plugin?
thanks it works now
tried using without mojang remappings but just ended up with TONS of unmapped stuff
Yeah
Mojang may not always have the best names for stuff, but it’s so nice having them not change every version
And having the same names everywhere; Forge, Fabric and Spigot
Yep
there's this site, until it gets updated https://nms.screamingsandals.org/
package buildserver.main.listeners;
import buildserver.main.Buildserver;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Item;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryType;
import org.bukkit.inventory.AnvilInventory;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
public class inventoryListener implements Listener {
private final Buildserver plugin;
public inventoryListener(Buildserver main) {
this.plugin = main;
}
public static List<Player> renameItem = new ArrayList<>();
@EventHandler
public void onInvClick(InventoryClickEvent event) {
Player player = (Player) event.getWhoClicked();
Inventory inv1 = player.getServer().createInventory(null, 45, "§3§nAlle Welten:");
if(event.getClickedInventory().getTitle() == "§e§nMenü") {
if(event.getCurrentItem().getType() == Material.COMPASS) {
for (int i = 0; i < plugin.MAPS.size(); i++) {
ItemStack item1 = new ItemStack(Material.GRASS);
ItemMeta meta1 = item1.getItemMeta();
meta1.setDisplayName("§e" + plugin.MAPS.get(i));
List<String> lore1 = new ArrayList<String>();
lore1.add("§7Coming soon...");
meta1.setLore(lore1);
item1.setItemMeta(meta1);
inv1.setItem(i, item1);
player.openInventory(inv1);
}}
event.setCancelled(true);
if(event.getClickedInventory().getTitle() == "§3§nAlle Welten:") {```
if(event.getCurrentItem().getType() == Material.GRASS) {
Bukkit.broadcastMessage("1");
if(player.getItemInHand().hasItemMeta()) {
Bukkit.broadcastMessage("2");
String wname = player.getItemInHand().getItemMeta().getDisplayName().replace("§e", "");
Bukkit.broadcastMessage("3");
player.teleport(Bukkit.getWorld(wname).getSpawnLocation());
Bukkit.broadcastMessage("4 FINAL");
} else {
player.sendMessage("Its not working");
}
}
}
} else {
event.setCancelled(false);
}
}
}
Im trying to figure out why the second inventory when i click on any grass block doesnt teleport me or react at all. There are no errors of any kind and i've been on it for 30 minutes. Any ideas guys? ^^ Thx`
please post that to a paste site
- don't use inventory names for checking custom inventories
GRASS_BLOCK
GRASS is the thing on top of grass block
like tall grass, but short
1.8.8 :)
ah then idk
nice xd
I commonly make this mistake kekw
xd
I don't at this point
go it wrong dozens of times
I finally learnt
bro I am having hallucinations rn
My brain is too dumb to realize i shouldn't
I gotta go sleep
been awake for 17+hours
Where i intellij idea maven route?
?
You talking about your .m2?
No the maven bin folder
Probably the bundled maven that comes with Intellij
I'd expect it to be in the Intellij installation folder
No access to a pc so I can't check
well how else
store the inventory after you create it and check if it's the same one
so I've just started using NMS with mojmaps and when packaging i get this error
Basic element 'srgIn' must not contain child elements
it appears during the remap part, so did something go wrong?
Try updating special source to 1.2.4
same thing
Im trying to figure out why the second inventory when i click on any grass block doesnt teleport me or react at all. There are no errors of any kind and i've been on it for 30 minutes. Any ideas guys? ^^ Thx -Old text but now with pastebin
nice racism in the code
Don't compare inventories by their name
Your line 87 pom is cooked
huh yeah that doesn't look right
seems like IDEA had a mind of its own when i did a copy paste
there is no line 87
Not you
how else
We told you already
[00:01:22] [Server thread/WARN]: [Corpses] Task #2 for Corpses v${project.version} generated an exception
java.lang.NoClassDefFoundError: com/jeff_media/morepersistentdatatypes/DataType
at me.sebkuip.corpses.Ticker.lambda$tick$0(Ticker.java:34) ~[?:?]
at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:82) ~[spigot-1.19.1-R0.1-SNAPSHOT.jar:3554-Spigot-2183145-6da8266]
at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:415) ~[spigot-1.19.1-R0.1-SNAPSHOT.jar:3554-Spigot-2183145-6da8266]
at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1245) ~[spigot-1.19.1-R0.1-SNAPSHOT.jar:3554-Spigot-2183145-6da8266]
at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:394) ~[spigot-1.19.1-R0.1-SNAPSHOT.jar:3554-Spigot-2183145-6da8266]
at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1197) ~[spigot-1.19.1-R0.1-SNAPSHOT.jar:3554-Spigot-2183145-6da8266]
at net.minecraft.server.MinecraftServer.v(MinecraftServer.java:1013) ~[spigot-1.19.1-R0.1-SNAPSHOT.jar:3554-Spigot-2183145-6da8266]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:293) ~[spigot-1.19.1-R0.1-SNAPSHOT.jar:3554-Spigot-2183145-6da8266]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.ClassNotFoundException: com.jeff_media.morepersistentdatatypes.DataType
... 9 more
``` dammit, seems like something broke the MorePersistentDataTypes
you not shading it I presume ?
no you didnt
We did
.
i'm not sure how that works
i'm just starting out with NMS/mappings so it's all voodoo magic to me still haha
Shading isn't NMS. It's a non-minecraft specfic thing that a build system like maven can do
It includes the dependency in your jar so you can use it
?paste
how exactly does one go about it, never used it before
i assume it's edit something in the pom.xml
So uh i have this json, and i wanna take the "/viewauction beac42119eac467f8095cee8148e91de" from it
do u guys have an idea on what to do?
like that or what do you mean
I will get some sleep now. Read through that and ask here if you need any help
Yeah
it doesnt work
seems like just including that plugin fixed it. IDK what it exactly does but can't complain if it works haha
umm im trying to use the BlockBreakEvent but i dont think its being triggered because i added some loggers Bukkit.getLogger.info(String) and they aren't printing
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<relocations>
<relocation>
<pattern>com.jeff_media.morepersistentdatatypes</pattern>
<shadedPattern>com.shaded.jeff_media.morepersistentdatatypes</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
``` hope this should do the trick
did you register the event?
yes getServer().getPluginManager().registerEvents(new Events(), this);
and that is in onLoad() right?
no onEnable
or that sorry
changed the shadedpattern to match your package
otherwise that doesn't do anything
@Override
public void onEnable() {
saveDefaultConfig();
getServer().getPluginManager().registerEvents(new Events(), this);
getCommand("blreload").setExecutor(new Reload());
getServer().getConsoleSender().sendMessage(ChatColor.GREEN + "[BlockLimiter] Plugin Has Been Enabled!");
}
so something like <shadedPattern>me.sebkuip.corpses.shaded</shadedPattern> would work?
show your events class
could do like me.sebkuip.corpses.shaded.morepersistentdatatypes
ah okay that makes sense thanks
public void onBlockBreak(BlockBreakEvent event){
Bukkit.getLogger().info("1");
Block block = event.getBlock();
Location above = block.getLocation().add(0,1,0);
CustomBlock custom = CustomBlock.byAlreadyPlaced(above.getBlock());
if (custom != null) {
Bukkit.getLogger().info("2");
String namespace = custom.getNamespace();
if (Iaddon.getInstance().getConfig().getStringList("items").contains(namespace)) {
Bukkit.getLogger().info("3");
if (Iaddon.getInstance().getConfig().getBoolean(namespace.replace(":", "") +".can-float")) {
Bukkit.getLogger().info("4");
return;
}
above.getBlock().setType(Material.AIR);
custom.drop(above);
Bukkit.getLogger().info("5");
return;
} else Bukkit.getLogger().info("6"); return;
} else Bukkit.getLogger().info("7"); return;
}
that is where you are shading the dependency to, so I would put it into it's own package
missing @EventHandler
My code: https://paste.md-5.net/epilapequd.cpp (Messy as I'm just testing, this is called in a runnable every x seconds)
Video: https://imgur.com/a/M7lh5Ha
Goal:
I'm using this packet: https://wiki.vg/Protocol#Update_Entity_Position to update a fake ServerPlayer's location, I got the NPC walking however it is not following the path that I am desiring to make it go to
What im doing in the code, is attempting to split the packets up into multiple "steps", and send each "step" on a separate tick each time
The reason for this is making the raw number one block (4096) the entity will move at max speed on the client, but splitting it up across ticks is fine
I really just need help with the map, is there any wizards who have messed with this packet before as well as the math with it?
rq question, does dispatchCommand need to be run on the main thread
or can I run it async on some other thread
main
not another version. silly 1.19.1
Does anybody know how Feather client's rust proxied launch works?
how can i remove a block from the world
when i do that and replace the block under it the block removed reappears
Then you're doing something wrong lol. All relevant code would be helpful
code..
@EventHandler
public void onBlockBreak(BlockBreakEvent event){
Bukkit.getLogger().info("1");
Block block = event.getBlock();
Location above = block.getLocation().add(0,1,0);
CustomBlock custom = CustomBlock.byAlreadyPlaced(above.getBlock());
if (custom != null) {
Bukkit.getLogger().info("2");
String namespace = custom.getNamespacedID();
if (Iaddon.getInstance().getConfig().getStringList("items").contains(namespace)) {
Bukkit.getLogger().info("3");
if (Iaddon.getInstance().getConfig().getBoolean(namespace.replace(":", "") +".can-float")) {
Bukkit.getLogger().info("4");
return;
}
above.getBlock().setType(Material.AIR);
custom.drop(above);
Bukkit.getLogger().info("5");
return;
} else Bukkit.getLogger().info("6 " + namespace); return;
} else Bukkit.getLogger().info("7"); return;
}
i need to remove the loggers
why above?
its an items adder addon
and if the block under is removed then i need to remove the itemsadder block
I've a feeling this is to do with some weird client-sided block setting you have
prob
map( ProtocolConstants.MINECRAFT_1_8, 0x02 ),
map( ProtocolConstants.MINECRAFT_1_9, 0x0F ),
map( ProtocolConstants.MINECRAFT_1_13, 0x0E ),
map( ProtocolConstants.MINECRAFT_1_15, 0x0F ),
map( ProtocolConstants.MINECRAFT_1_16, 0x0E ),
map( ProtocolConstants.MINECRAFT_1_17, 0x0F ),
map( ProtocolConstants.MINECRAFT_1_19, 0x5F ) <-
Where can i find new 1_19_1 ids
might be itemsadder
I tried to follow viaversion but uh
If there's no specific id for 1.19.1, then it must match the id of the previous version
(notice how 1.10, 1.11, and 1.12 are also missing? Because they match that of 1.9)
Future and CompletableFuture is the same?
I see
CompletableFuture implements Future
What are doing with that?
oh ok i see
You get a few more methods from CompletableFuture (such as complete() ;p)
So is it the same right?
I mean, yeah. All CompletableFutures are Future, but not all Future are CompletableFutures
I thing that Feature get gives operations that are not ready
Can somebody judge my horrible addon system that uses reflection? https://paste.md-5.net/esuxebowut.java
Why are u using reflections?
i do my addon systems way differently ;-;
there true addons that way, instead of being another plugin that uses the mains API.. the main uses reflection to make instance of class on external addon jar via YML that contains info abt it, then runs a method that registers everything the addon wants to register 🙂
its so bad
it was itemsadder i have another question what block does event#getBlock() get for the event BlockPistonEvent
Mainly what does PAPI (PlaceholderAPI)
papi does that?
It returns the piston afaik
If you want the blocks it's pushing or pulling, you can listen for the BlockPistonExtendEvent and BlockPistonRetractEvent which both have getBlocks() methods
and do those get the block being pushed/pulled
and does getBlock().getLocation() get the original or the pushed/pulled loc
getBlock() is the piston, so that would get you the piston location
getBlocks(), with an s, will get you a List of pushed/pulle blocks
Does anyone know how I could get my to-do's from my Todoist and put them in a book page on Minecraft?
Is there an API or a plugin already made?
Hi, ım trying to make a throwable sword, and ı need to teleport the normal armor stand to the small armor stand exact like the screenshot. I made this picture on vanilla minecraft and its working perfect. but ı cant figured it out how can ı do that in spigot. here is the vanilla command:
execute as @e[tag=body] at @e[tag=small] positioned ~ ~-0.5 ~ rotated ~ 0 positioned ^0.375 ^ ^-1 run tp ~ ~ ~
so ı just have to translate this vanilla comand to spigot.
even if the pitch or yaw changes the normal armor stand still teleporting to the small one as like in the screenshot
https://prnt.sc/houACay_KAFY
Just use the vanilla command and run it via spigot
if ı do that ı wouldnt learn anything new
You already made the command in mc tho
thats just 1 little command ı already knew minecraft vanilla coding well but ı wanna open a server in the future so ım learning spigot
ı just have a throwable axe in vanilla instead. but making it in spigot is diffrent
Seems like it has a REST API you can query,
https://developer.todoist.com/rest/v1/?shell#overview
well i have no idea what that command does in simple terms so idk if i can help
just gonna get 1 block back and 0.375 block left of the small armor stand
thats all
and tp the normal armor stand to this location
I see that the Skull interface has the PersistentDataHolder Superinterface, how can I store custom PersistentData on it so I can retrieve it later?
why you do you want to reinvent the wheel?
Because running commands from your code is bad design and bad for performance
cause my vanilla throwable axe wouldnt work when there is more of them. spigot allows me to make it support multiplayer. I wanna make a server with fantasty weapons with some special powers that never done in any server. ı was doing fantasy weapons on vanilla singleplayer and people was loving it, then ı just said ı can make a server like that and get money with it
Yeah i forge tthat hahaha
I always forget that spigot is not multi threaded
So most of the time when doing that harcoded things tps goes down
well ı got some ideas to optimize it for lower lag (ı could be get it wrong cause of my english)
Just running .teleport on an entity is much faster than making the server execute a teleport command
anyone have any advice for this?
how do i add Experience points to spawnEntity Experience Orb?
Is there a way to find out how much XP an item is worth
declaration: package: org.bukkit.entity, interface: ExperienceOrb
where do i place it? :3
the spawnEntity method will return an Entity
so store it in a variable, then cast to the ExperienceOrb, then set the xp
you can just remove, no need for the check
It wont throw any errors if it is not present
also fun to note, if you have stuff you wanna do if it does actually remove something, #remove() returns a boolean 
Quick question. So let’s say I have a java server. One of the functions for the server is to listen sockets. Do I run the ServerSocket on a different thread to let the server still run and each socket in its own server? I don’t want to stop the main thread tho
So let’s say for a mc server
Use netty
Normal Java doesnt have a good thread per task api (until virtual threads with structured concurrency api releases)
bump
how do i store it in a variable?
alright thanks
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 thought it returned the object associated with that key or null
I believe collections return a Boolean
idk how :/
this is my first plugin :c
learning java helps
Probably should learn java
i just need help to add exp on spawnEntity
spawnEntity returns an entity, or the extract type of you are using the class rather than EntityType in the spawn method
The question is already answered, the issue is the lack of knowledge as you have jumped into Spigot before learning the language that Spigot is built on, meaning you will have a bad time understanding the extensive API, and will keep coming back with questions that would be solved by a simple basic knowledge of Java
You can then do with that returned value what you want
thats why i'm asking to learn here, the knowledge just doesn't get into the brain from nothing, if you dont wanna help just dont answer?
The issue here isn't with Spigot, it's with your Java knowledge
hence the ?learnjava
Get a random index from 0 to array size
ty
hence*
thanks
yw
any idea why it's telling me that the check is unnecessary 🙃
mfw
You dont need the contains check as remove won't throw an error if it is not in the map
ig
I like maps
i honestly have no idea what the difference between set and a list is
lol
cba to ever figure that out
Set is generally faster for contains operations as well
Set<Type> set = new HashSet<>();

Map<String, String> map = new HashMap<>();
{
map.put("a", "b");
map.put("c", "d");
map.put("e", "f");
}
Set<String> set = new HashSet<>();
{
set.addAll(map.values());
set.addAll(map.keySet());
}

@young knoll
Perfect
bump, have made 0 progress on this
will Bukkit inventories save contents by default?
or does one need to cache the contents when the inventory closes?
as long as you hold a referance to it, the contents should stay
so clarify something in your code for me
Is this thread safe? https://imgur.com/a/ZUzWW9f
blocksPerTick*Delta/Distance
using dimensional analysis
that means
you get a final unit of Blocks/Tick
Uhmmm, for reading i beileve yes
Im trying to get a listener for if someone drops an item ontop of a specific block but I cant seem to get it working
The Drop detected fires but not sure how to get the other part working
the minus 1 is probably 2 much
And delta would be, i assume the start to finish locations distance differences on x/y/z axis?
Yes... but why are you doing this async? You're leaving out a crucial part of that loop
And onEnable() no less. That's going to be scheduled and run a tick after plugins are enabled
The rest of it is just checking if a player has OP and if they do, kick them
oh hahaha i didnt even see that sliver up there
thats what im reading
Yeah, if that's all you're doing, you have no reason to do any of that asynchronously, or in a task at all
Just put the for loop in your onEnable() ;p Skip the task entirely
Ooh right, ty!
Ngl im and the worse possible ever at math
What variables are getting pluggin into this equation? Its a relevant location so it can only be so high before it throws an error
blocksPerTick
that is a measure of velocity
meters (m) per second (s) for simplicity
then you multiply it by a distance (final - initial)
then you divide it by a distance (distance)
Using dimensional analysis, this means your final output is a speed
oh wait
that would make sense because youre sending many packets
Well thats the thing
i think theres a floating point issue going on here
what i would do
is that i would multiply by 4096 at the very end
blocksPerTick * (vector.getX() - vector2.getX()) * 4096) / distance -> (blocksPerTick * (vector.getX() - vector2.getX()) / distance) * 4096
also
make the distance a double
that will cause rounding errors
overall the code is fine, its just that your use of parathesis and order of operations may be causing some rounding issues
Im trying to divide the said packet into said 10 (eg 10 packets, its what blocksPerSecond is for, its basically for spreading out the packets over a specific tick time) because when you call a whole block movement in a single packet the entity just moves at lightning speed
no floating point right here
Okay i can take a look into this, distance a double, yeah makes sense actually
420
well thats the inflated value
shorts wont have any decimal places
you would need to divide that by 4096 to get the relative distance again
How in an item drop listener can I get that this dropped item is ontop of a chiseled quartz?
Or is a PlayerItemDrop the wrong listener to use
@ParametersAreNonnullByDefault
public SpiritualAltarListener() {
SpiritsUnchained.getPluginManager().registerEvents(this, SpiritsUnchained.getInstance());
}
@EventHandler
public void onDrop(PlayerDropItemEvent e) {
Player player = e.getPlayer();
player.sendMessage("Drop Detected");
Item item = e.getItemDrop();
Location location = item.getLocation();
location.setY(location.getY()-.25);
player.sendMessage(location.getBlock().toString());
if (location.getBlock().getType() == Material.CHISELED_QUARTZ_BLOCK) {
player.sendMessage("Drop Works");
}
}
Atm It is most defintely not getting that block xd
(the send messages were just so I could see what it was getting)
Like so right? going to test it right now
yep that seems ok to me
every x ticks, get the entities above that block, and see if any of them are the items you want
if true, continue and etc
wouldnt that not be great on performance if there were alot of these?
depends
you could make the timer every tick or every second
its not a super heavy comptuation
you would need literally thousands of them for it to make a big noticable impact
id recommend just checking once per second
that would not be very intense
alr
honestly this baffles me at this point
it just.... slightlyyy drifts off
and then endlesslessly gets worse and worse
ok
I had this same problem trying to move an npc
I spawned a particle when the npc should be
And it was blocks away
oh hey, i got it i think
oh?
Found no solution
Yeah packet locations are relatives
normally
What i was doing
Was to move an npc
In a straight line
And it suddenly got slow
Thank you, i was spending hours on this cause i suck at math x)
what worked?
not an entity move
how u fix it?
I was doing movelook
I think it was the location from setPost
look in the code im get blockPos
which are typically ints not doubles
These move packets are strange
and it reminded me of that lol
OH
that has to be oooold
1.17.1
new PacketPlayOutEntity.PacketPlayOutRelEntityMove(this.entity.getId(), (short) ((int) k), (short) ((int) l), (short) ((int) i1), this.entity.isOnGround()); is what i decompiled lol
I was doing it when 1.17.1 was latest
it was weird cause he would always like be on the block but.. swerve off of it it was weird lmfao
private static long encode(double var0) {
return MathHelper.lfloor(var0 * 4096.0D);
}
private static double decode(long var0) {
return (double)var0 / 4096.0D;
}
public Vec3D decode(long var0, long var2, long var4) {
if (var0 == 0L && var2 == 0L && var4 == 0L) {
return this.base;
} else {
double var6 = var0 == 0L ? this.base.x : decode(encode(this.base.x) + var0);
double var8 = var2 == 0L ? this.base.y : decode(encode(this.base.y) + var2);
double var10 = var4 == 0L ? this.base.z : decode(encode(this.base.z) + var4);
return new Vec3D(var6, var8, var10);
}
}
public long encodeX(Vec3D var0) {
return encode(var0.x - this.base.x);
}
public long encodeY(Vec3D var0) {
return encode(var0.y - this.base.y);
}
public long encodeZ(Vec3D var0) {
return encode(var0.z - this.base.z);
}
basically its just directionals
so if you call (0, 0, 4096) it tells an entity to move one full block forward
oh okay xD
i wish the packet supported speed
you have to regulate the speed by division and spread it out across ticks which is mad weird, so speeds basically done as blocks per tick lol
packets say max distance is 8 hm
but it supports way bigger 🤔
OH
no it doesnt
lol hes gone
banished
shadow realm
forgot about the overflow to negative
once larger than 8 block gap, you use the teleport packet
there is PacketPlayOutEntityVelocity which forgive me for not using mojang mappings lol
well n o nvm
i dont rly need to bother over 1 block for rn
since pathfinding i has is one block at a time idk why im bitching about 8 block limit 
i mean for most use cases 8 blocks in a single packet is more than enough
quite the distance
oh wtf i was afk and it came back to me
i just watch him run away 500+ blocks in the air and then hes just. there
anyways ty for help :))
Any ideas on why I could get Caused by: java.lang.NoSuchMethodError: 'double java.util.Random.nextDouble(double, double)'? according to what I found the method is J8 and my server is on J16 :/
anyone know what the Remap for PacketPlayOutEntityMetadata is?
what do you mean by "new config string"?
just have a new element in an array for each food
with all its variables
ClientboundSetEntityDataPacket
Fantastic website by the way: https://nms.screamingsandals.org/1.19
awesome thankyou
How do I make sure that the particles im spawning aren't shooting off when they spawn?
private void tick(@Nonnull Block b) {
Location l = b.getLocation();
Collection<Player> players = b.getWorld().getNearbyEntitiesByType(
Player.class,
l,
2
);
if (!players.isEmpty() && isComplete(b)) {
l.getWorld().spawnParticle(Particle.END_ROD, radiusLocation(l), 1);
l.getWorld().spawnParticle(Particle.END_ROD, radiusLocation(l), 1);
l.getWorld().spawnParticle(Particle.END_ROD, radiusLocation(l), 1);
l.getWorld().spawnParticle(Particle.END_ROD, radiusLocation(l), 1);
}
}
private Location radiusLocation(Location start) {
Random random = new Random();
double X = start.getX() + random.nextDouble(1 + 1) - 1;
double Y = start.getY() + random.nextDouble(3);
double Z = start.getZ() + random.nextDouble(1 + 1) - 1;
start.set(X,Y,Z);
return start;
}
```like these particles are flinging off the moment they are spawned and i dont know why
is it possible to make a player put down a clicked item?
anyone have any ideas?
(are you talking to me or brandon)
Add a bunch of zeroes to the spawnparticle params
Set the data and all the offsets to 0
That's... not the solution to their problem
But async particles are indeed a good thing
Anyone know how to set a TextComponent or an Adventure Component to a bossbar?
what are those 👀
Any good resources for doing that or just google xd
As that would probably be a good idea
?workload
bruh
idk the command
7smile7's tutorial on workload distribution helps
you can run the runnable async
How can I get the current minecraft day?
From the world
How? I tired World#getTime() & World#getFullTime() and it didnt return the right day count
?jd-s
From the docs it looks like you'll need to do some math
hmmm, I can get the approximate right time but not the exact right day count :/ looks like ima need to do more testing, thank you mike
Nevermind im dumb, I was using World#getGameTime() rather than World#getFullTime()
For anyone wondering the math to get it is simple its World#getFullTime()/24000
Alright guys im stuck.
for(GUIItem guiItem : mainGUIItems) {
if(currentGUIItemIndex >= 16) break;
List<String> itemLore = new ArrayList<>();
ItemStack itemStack = guiItem.getGuiItemStack();
ItemMeta currentGUIItemMeta = itemStack.getItemMeta();
if(guiItem.hasExraLore()) {
List<String> extraLore = guiItem.getGuiItemLoreExtra();
if(currentGUIItemMeta.hasLore()) {
for(String originalLoreLines : currentGUIItemMeta.getLore()) {
itemLore.add(replacePlaceholders(originalLoreLines, cadiaBees.hiveLevelManager.getHiveLevel(hiveLevel), container));
}
}
for(HiveLevel hiveLevels: cadiaBees.hiveLevelManager.getHiveLevels()) {
if(hiveLevels.getHiveLevel() > hiveLevel) {
for(String extraLoreLine : extraLore) {
String newLoreLine = replacePlaceholders(extraLoreLine, hiveLevels, container);
itemLore.add(cadiaBees.colorUtil.color(newLoreLine));
}
}
}
} else {
if(currentGUIItemMeta.hasLore()) {
for(String originalLoreLines : currentGUIItemMeta.getLore()) {
itemLore.add(replacePlaceholders(originalLoreLines, cadiaBees.hiveLevelManager.getHiveLevel(hiveLevel), container));
}
}
}
currentGUIItemMeta.setLore(itemLore);
itemStack.setItemMeta(currentGUIItemMeta);
hiveGUI.setItem(currentGUIItemIndex, addGlow(itemStack));
currentGUIItemIndex++;
}
This is my code for generating my gui items. For some reason the first time the gui is opened, it populates the right info then it starts duplicating after
https://i.gyazo.com/88cf9d16103d1f758c7a8a65d0bd9dfe.mp4
The "Extra" lore is the stuff relating to what you get with each upgrade and its supposed to disappear as you upgrade.
what is guiItemLoreExtra()?
and is guiItem.getGuiItemStack just returning the same item
because that will be your issue
just clone it
Block#isBlockPowered()
Hey guys I got an question I work on new plugin right now and I have to deal with a lot of data that often used
Now I stick with MySQL
What would be the best thing to do to load all the data to cache on server start up
Or each time request to do a change
depends what sort of data is it
I expect that it can reach up to 200 requests per second
For example I will store a list of users who are allowed to open a specific door
So each time asking for it would be fine ?
What type of data
You can cache data for online players
String by int int int (x y z)
(String player uuid)
Did I understand the data type question correctly ?
Imma google what are data states not really sure tbh
If the data is being saved, or being read
Don't allow other servers to modify it during the process
Cache online players, you might wanna have a fixed thread pool or sth where you update the db data of any player whose data in memory got modified
how would I load a custom head? this is my code, but it just loads a steve head
i also don't want to use NMS, as my server uses ViaVersion
viaversion doesnt affect nms lol
oh wait I forgot to profl.setTextures i'm guessing
viaversion just translates the servers packet to the client's version you doing nms wont affect taht at all
oh
I think I might just load all the data each time
Since I don’t collect per player
It’s per block placed
well, is there any way to load the custom player head without using nms?
Let me rephrase the initial question
About memory I have a dedicated server so it’s not a big deal I pay it I abuse it xD
Coreprotect clone
caching all of that would be horrible
Basically
Yeah why not use core protect?
But anyway you probably wanna cache data in active/loaded chunks
Or sth
anyone know any tools that will let me upload and edit skins with a signature and texture string?
how can i listen for
someone placing an item on an itemframe
oh nvm HangingPlaceEvent
Loading Chunks will not change a lot I have a player base of 200-300 players on 2000x2000
Do you think requesting would work just fine ?
I mean I would really try to keep it cached
Cause you dont want latency affecting your players post login ideally
Sorry for a silly question, but is it possible to somehow build 1.2.5 Spigot in 2022 or it is gone forever with that DMCA thing?
Yeah
I don’t want a player to break a block and just after few seconds get the owner
Not sure how bad it can be
Resorting to lazy loads (loading on post login) is only when the data is taking up enormous amount of space, which seems not to be the case for you
Space in memory won’t be issue
200-300 users isnt much generally speaking when it comes to backend (altho it might be for a single server instance)
It’s a single world server
So I don’t see reason why load cache by chunks
So loading everything on start would be the best soluation ?
I thought you required a more scalable management model
Myeah
Try it to begin with
If it doesnt fit you, do some lazy loading and put it into the cache
I’ll actually take a look at coreprotect source code
Even thought it works differently from what I need
But it supposed to store a lot of data
The "Extra" lore is the stuff relating to what you get with each upgrade and its supposed to disappear as you upgrade, its for like "dynamic" lore? that repeats based on X.
guiItem.getGuiItemStack gets the ItemStack from my GUIItem Object
replied to the wrong person
I’ll see what coreprotect Dev would say about the idea you gived me
does guiItem.getGuiItemStack() return a copy?
if not, that's likely the reason you're getting repeated lore lines.
assuming you call that code more than once
I added spigot & minecraft-server to my pom.xml, but still can't access GameProfile, how can I fix that?
<id>minecraft-repo</id>
<url>https://libraries.minecraft.net/</url>
</repository>`````` <!--Mojang -->
<dependency>
<groupId>com.mojang</groupId>
<artifactId>authlib</artifactId>
<version>3.5.41</version>
<scope>provided</scope>
</dependency>```
thanks
for custom player heads
yeah, i'll probably keep it as GameProfile for now, until I found something that doesnt use NMS
nope
/**
* Create a Skull with a texture using the new PlayerProfile
* Post 1.18.2
*
* @param id UUID to assign the skull.
* @param name a name for the skull
* @param texture a Base64 texture String
* @return Skull ItemStack
*/
public ItemStack getHeadByProfile(UUID id, String name, String base64Texture) {
ItemStack head = new ItemStack(Material.PLAYER_HEAD);
PlayerProfile profile = Bukkit.getServer().createPlayerProfile(id, name);
try {
profile.getTextures().setSkin(new URL(getURLFromBase64(base64Texture)));
SkullMeta meta = (SkullMeta) head.getItemMeta();
meta.setOwnerProfile(profile);
head.setItemMeta(meta);
} catch (MalformedURLException e) {
e.printStackTrace();
}
return head;
}```
private String getURLFromBase64(String base64) {
return new String(Base64.getDecoder().decode(base64.getBytes())).replace("{\"textures\":{\"SKIN\":{\"url\":\"", "").replace("\"}}}", "");
}```
Thats setting heads using PlayerProfile rather than GameProfile
^^^
a sample head String texture = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYTlmMTFjMGQ0OTdmMjI3MDg5Y2JmNjE0NjAxMTA5Y2FmNjE1NDUzOTQwZWY1ZjY0ZWJiMTc3OTU3ZTRmYTZlNSJ9fX0=";
yes
gonna try out your code
i made a wrapper for the NMS pathfinder goal class, so that one can easily extend / implement custom pathfinders goals without NMS. However I had to split it up into one NMS "executor" per NMS version, and an abstract class for the actual thing I want people to extend. I wonder if there's any better way
CustomGoal abstract class: https://github.com/JEFF-Media-GbR/JeffLib/blob/master/core/src/main/java/com/jeff_media/jefflib/ai/CustomGoal.java
NMS executor for custom goals (e.g., here's 1.19): https://github.com/JEFF-Media-GbR/JeffLib/blob/master/spigot_1_19_R1/src/main/java/com/jeff_media/jefflib/internal/nms/v1_19_R1/ai/CustomGoalExecutor.java
yeah, exactly, that's why I don't understand why my code didn't work but their apparently works
how unexpected!!
doesn't even throw an error, which is weird
because it should've put the "§r"+name
probably
oh wait I found a bug
ok nevermind that bug fixed it
that's weird
I guess it really only works with the try catch
or maybe I just had the wrong base64 value in my old code? don't really know
so your base64 getter isnt working then
can anyone explain what Vector direction is?
a vector is like an "arrow" in a coordinate system and the direction is simply the direction it is pointing to. for example the direction of your player's location is the direction where you are looking at (pitch, yaw, roll)
ok thx
i didn't need have a base64url getter in my old code, just the raw textures.minecraft.net url + the code
visual vector representation
this code thingy
oh god that hurts to look at
idk how but my brain imagines 6 2D views of the vector
that's a weird perspective if P is supposed to really be 1,1,1
also a quick question, is there a way to make the TabCompleter return an "error"? something like vanilla commands
camera angle is like 30deg
brigadier
alr gonna search it
It’s the vanilla command system
so uh
i have this json: https://paste.md-5.net/aqabasiruh.json
i need the "/viewauction beac42119eac467f8095cee8148e91de""
i thought about getting it as a string
then .split("/viewauction ")[1].split[" "][0]
spigot has built in gson lib
oh thought it was haha
i dont think this json is correctly formatted
Oh is it Mojangson?
no
{"type":"flip","data":"{\"messages\":[{\"text\":\"\\nSNIPE: §5Spiritual Juju Shortbow §6?§6?§6?§6?§6? §a16.5M -> 19.3M \",\"onClick\":\"/viewauction beac42119eac467f8095cee8148e91de\",\"hover\":\"?HPB: 10\\n\"},{\"text\":\"§7 sellers ah\",\"onClick\":\"/cofl ahopen 5c0aaaeda6b44a6a8a908d04488e10db\",\"hover\":\"§7Open the ah for the seller\"},{\"text\":\" ? \",\"onClick\":\"/cofl dialog flipoptions beac42119eac467f8095cee8148e91de\",\"hover\":\"Expand flip options\"},{\"text\":\"\\nHPB: 10\",\"onClick\":\"/viewauction beac42119eac467f8095cee8148e91de\",\"hover\":null}],\"id\":\"beac42119eac467f8095cee8148e91de\",\"worth\":2832200,\"cost\":16500000,\"sound\":\"note.pling\"}"}
but i need the json inside "data"
oh
Just parse it as json then get data and parse contents?
Ah data is mojangson
o
no im getting that from another mod
im working on a forge mod
rn
another forge mod prints some data every few moments and i need that data
Use the TagParser to parse that in to a compond
that isnt a spigot project tho
and idek whats tagparser
hmmmm
Can't find it?
ngl i dont know what that does
nah im not in intellij rn im just building some info ill start coding later
alr ill see what i can do with that
Sup, dudes, dudettes, and everything in between. I've been looking for about two hours. Is there any API in Spigot that can make a block emit light, for example a custom lantern?
wait are you asking to block light emission or emit light out of a block?
You can place this wherever you need I guess https://minecraft.fandom.com/wiki/Light_Block
1.17+ tho
How to speed up Projectile without messing up direction?
multiply the velocity vector
ye im doing that
but on long distances it always lands little bit to left/right
which just messes the direction
Hey, I'm currently updating my plugin to 1.19.1. Weirdly my commands only work if I prefix them with the plugin name:
/myplugin:mycommand works, but /mycommand doesn't (Unknown or incomplete command).
I haven't changed anything in the code and it worked fine in 1.19. I've tested other plugins that were already updated to 1.19.1 and their commands seem to work fine...
Any help would be appreciated 🙂
Make sure the server is up to date
I just built it 5 mins ago
Do you have two plugins that add mycommand
I don't think so, but that was my first guess too
But wouldn't it complain in the logs though?
I even renamed the command and it still didn't work
I also tried it with a completely fresh server
and with craftbukkit instead of spigot
I made a plugin where in the config there is a number that changes and the saves it as defaults option, then with a command it adds to the config a thing, but on reload it keeps deleted, how to prevent that?
save your config after changing it
do you save after adding the thing
Hm how are you registering your command
Already done that.
getCommand("command").setExecutor(new MyExecutor());
Hm not sure then
I used saveconfig() method, should I try this?
try { config.save(config.getCurrentPath()); } catch (IOException e) { throw new RuntimeException(e); }
saveConfig should work only if u are using default config.yml
just do MyPlugin#saveConfig
I'm using config.yml
therefore it should work
And saveconfig() method doesn't work
I mean
it keeps deleting the things I set in the file
Except the defaults
Did you forget to load the file
Im multiplying direction with speed
if speed == 1 -- goes perfectly straight
if speed > 1 --goes slightly to left/right
any clues why?
?configs
How are you multiplying the speed? From the direction?
See this wiki page on how to use custom configuration files: https://www.spigotmc.org/wiki/config-files/
I read many times, the first time I did was 4 months ago.
this.setDeltaMovement(this.getDeltaMovement().multiply(this.speed,this.speed,this.speed));
wtf is deltaMovement
is this nms?
@EventHandler
public void onShoot(ProjectileLaunchEvent event) {
event.getEntity().setVelocity(event.getEntity().getVelocity().multiply(2));
}
this works perfectly fine for me
makes all projectiles twice as fast without any left/right offsets
yep nms
even tho if its long distances? ( 50+ blocks )
well I just set speed to 2
works fine
but im using speeds high as 10
yeah, I just set the speed to 20x and it seems to be working fine
nms velocity vector
how would I detect when a player finishes editing a sign?
SignChangeEvent
^
alr thanks
when I launch custom nms projectile, sometimes its visible, sometimes not
any clues why?
Uhh great question
I've had issues with nms projectiles taking turns to a specific offset before, but not with visibility
can't it be bcs or rotation?
since snowball in my case is just 2d img
but how could I make it visible for everyone in game
there can't be some universal rot
oor I could spawn 2 snowballs at same time, one having yRot 0 , second having yRot 90
that sounds a bit wasteful
if you want to have a 3d model uhh
well what I used to do was just create an item
and give it the specific velocity for a thrown projectile
and do raytracing and collision checks
oh damn I dont want to redo whole code again .. 
that's part of the developer cycle
:)
man I miss doing fancy projectile stuff
and playing around with custom mobs
do you want to help me ? 😄
imagine if this hateful thing was in the actual game
i have lots of custom mobs that needs to be created
dont send this to mojang
I created one mini boss
it has 2 attacks
I did it through nms pathfinders
custom nms entities with custom pathfinder goals
that shit scared me
even have a "Pathfinder Injector" class where I just call some stupid stuff
in every version
PathfinderInjector.inject(Zombie.class, zombie -> new PathfinderGoalWhatever(zombie));
:)
or with plain nms and bukkit,
CreatureSpawnEvent
EntitiesLoadEvent
Cast to EntityInsentient (or Mob with mojmappings) and change the selectors
I created whole custom entities for this..
funky
I've been working on a zombies minigame lately
zombies respect clientsided blocks :)
yeah if you read above, it's a util I made
I can't really bother cleaning it up and sharing it
🥣
ah
Use mojmaps
~you have the nms visualizer
use nms remapping
👀
I use paperweight on groovy 
this is just a entity
without any pathfinder goals
I forgor I can just do that instead of cancelling events lol
you absolute chump
lol
