#help-development
1 messages · Page 726 of 1
I've never had that happen to me
Join Game -> Player Info -> Player abilities -> Spawn Position -> Position and Look -> Entity metadata
This is how limbo handles it
join game?
the big packet?
this packet you fool
yea yea
With like a dzh or a y?
it's more of a xzh
wtf is a demension codec
Tf is that
uhh
it's a fun nbt tag
That Limbo loads from a 7k line json file lmfao
let me see how long it takes to read that in rust
Or the json that limbo loads out of
let me just try like that
https://nekobin.com/rihimoxizu
why does this happen? (only 1.20 has this issue)
how the hell does thie even work?
limbo has a parser that does shit
is something that happens only in 1.20, is so weird
i make a codec:
struct DimensionCodec {
dimensions: DimensionType,
biome: Biome,
}
struct DimensionType {
type_: String,
value: Vec<Dimension>,
}
like this?
it's an nbt compound
yeah
theres some parser library in rust
but how are the aligned
what is inside of what
that's what the json defines
let me look into that then
help plox
some bungee issue
channel pipeline is for the packets from what i know
id just look at this ngl
update bungee
alr on latest
yeah looking at that
what version is it for though
1.17
you cannot really
at least not with javas reflection API
oh
well instance checks yyou can obviously do
you cannot really extend a class with plain reflections api
Class.forName().isAssignableFrom(packet)
@quaint mantle
Bukkit.getServer().getClass().getPackageName substring 23 i think?
sorry for pinging once more, but there are 2 seperate fields. one for "Dimension Codec" and one for "Dimension". whats the difference?
good ways to create custom block and detect that is custom block?
just need database?
I've made this dimension codec successfully, but what is the dimension?
Compound({"minecraft:dimension_type": List([Compound({"name": String("minecraft:overworld"), "id": Int(0), "element": Compound({"bed_works": Byte(1), "logical_height": Int(256), "height": Int(256), "natural": Byte(1), "has_skylight": Byte(1), "min_y": Int(0), "effects": String("minecraft:overworld"), "respawn_anchor_works": Byte(0), "coordinate_scale": Float(1.0), "piglin_safe": Byte(0), "has_ceiling": Byte(0), "ultrawarm": Byte(0), "infiniburn": String("minecraft:infiniburn_overworld"), "has_raids": Byte(1), "ambient_light": Float(0.0)})})]), "minecraft:worldgen/biome": List([Compound({"name": String("minecraft:plains"), "id": Int(1), "element": Compound({"depth": Float(0.125), "scale": Float(0.05), "downfall": Float(0.4), "category": String("plains"), "temperature": Float(0.8), "effects": Compound({"mood_sound": Compound({"block_search_extent": Int(8), "sound": String("minecraft:ambient.cave"), "offset": Float(2.0), "tick_delay": Int(6000)}), "sky_color": Int(7907327), "fog_color": Int(12638463), "water_color": Int(4159204), "water_fog_color": Int(329011)}), "precipitation": String("rain")})})])})
tea donut
the donut
?
public static final String VERSION = Bukkit.getServer().getClass().getPackage().getName().substring(23);
maybe hashmap
i use this one
and if you want to save, yes probably database
or maybe block persistent data containers, (if they exist)
?blockpdc
Learn about CustomBlockData here:
https://www.spigotmc.org/threads/custom-block-data-persistentdatacontainer-for-blocks.512422/
oh
^
the same thing as yours
nms version probably
ok
thx
is this good idea?
set custom name of hopper to "Conveyor"
...
if customname of hopper is "Conveyor" then ...
What if a player renames it
why not use pdc instead?
cuz my method is easy
Easy != good
@echo basalt
your method is shit lol
every opne could just rename the item
you should NEVER have to check any inentory's name
show code
I pray you aren't using a new simpleboard every time you tick
Does CraftEvent#getRecipe()#getResult return a copy, the itemStack in the actual recipe, or the item stack that's a result of the current crafting? I want to apply a nbt tag to make it unstackable
thanks
As for if that is a mirror or a copy
idk
Imma guess copy since there is a setResult
other question
custom recipes require a 'exact' input (for custom items as input)
can i still flag the PDC in ItemMeta somehow without bricking the recipes, or do i need to do a check when an item is inserted into the crafting inventory?
exact means PDC must match too
darn
You would need to use PrepareItemCraftEvent to check if the item is what you want
k thx
hello, I have a problem with the custom crates plugin, when I try to receive a key, it tells me that it has arrived, but nevertheless I have nothing in my inventory, could you help me? Thank you
that makes all items crafted in that way have the same nbt
im assuming i have to also change it on craft
but which itemStack?
Could try that
no like, if i overwrite the recipe result, would that trigger for each item, or only once?
like shift crafting
I think it would be for the entire stack
idk I never really worked with the craft event
cuz the item needs 3 iron ingot but hoppet is more. i think this is pertty good
and i think that method is better than using pdc? pcd. just it is hard but my method is very good
idk this
i think if do like this then the method can be good method
on rename hopper:
if new name of hopper is "conveyor":
cancel event
ayo Skript
Good != Sensical
No idea what this is about but you should use the pdc to detect custom objects
Sensical != Fast
Looks like it
oh
i think the text can run in skript lol
(not intented. just english text to explain my idea)
You should always make a strict separation between UI and backend.
Dont use user-visible properties in your codes functionality.
And the name of a TileEntity is a user visible property
Especially when it comes to a property that not only a user can see, but also one that a user can change. You can change inventory names in an anvil
Hmm
I might be doing this lol
🙃
I need a scoreboard per player
Is it safe holding/storing Player interface as a field?
As long as you make sure to clean it up on disconnect
but not in collections
Map
It may prove useful to wrap those around a WeakReference object
^
What if I store it in a decorator?
How can i disable the activation of Sculk sensors and shriekers
you can use a weak reference and do cleanup on disconnect
And with entities?
Same idea
entities are different though
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/block/BlockReceiveGameEvent.html
I think this one
declaration: package: org.bukkit.event.block, class: BlockReceiveGameEvent
because they get poofed when unloaded iirc
Yes but if you hold the refrence it won't be GCed
Just like players
You can check if the refrence still actually points to an entity with isValid
ive tried this but it dosent cancel it [17:25:16] [Server thread/INFO]: CraftGameEvent{key=minecraft:sculk_sensor_tendrils_clicking} [17:25:16] [Server thread/INFO]: CraftGameEvent{key=minecraft:sculk_sensor_tendrils_clicking}cancelled
I previously did check if entity was valid and if not just removed it from the Map
Yeah that's an option
And with Players just removed them from Map on PlayerQuitEvent
Is it safe this way?
Also should be safe
Thank god 😄, cannot describe the nerves I just dealt with. I thought I had to redo all my projects 😪
IdentityHashMap when
what is this meant to do
If you’re using maven for your Spigot plugins (which you should do), it’s easy to make maven automatically save your plugin’s .jar in your plugins folder. There’s two ways of doing this: 1. The lazy way (not recommended) If you only work alone on one computer, you can just directly declare the output location in...
Already told you the order
Join Game -> Player Info -> Player abilities -> Spawn Position -> Position and Look -> Entity metadata
what is an "Array of identifier"?
P sure it's just namespaced keys
do I write the array as bytes in the reader
Look at how nms encodes it
uh
for now imma try just array as joined bytes
attacking from this distance causes neither a EntityDamageByEntity nor a PlayerInteractEvent. Does anyone know why?
Hey, I have a question, how could I link a CustomWorld with a CustomNether ?
portals you mean? Check when someone goes through a portal, there should be an event for that, and teleport them to the relevant coords in the nether, creating a portal there and linking it
why?
Your nbt codec is fucked
is this the right packet btw?
Wrong phase probably
so i tried to print out a playerEvent and it said 'static eventhandler list required'
can someone explain which event this might be
Wdym
Hi, how can I get the NBTTagCompound of an entity?
why would you need that
I would like to put that in a spawner
public static void setEntityDataInSpawnerItem(org.bukkit.inventory.ItemStack spawnerItem, org.bukkit.entity.Entity entity) {
net.minecraft.world.item.ItemStack nmsSpawnerItem = CraftItemStack.asNMSCopy(spawnerItem);
//store the EntityData in the nmsitem...
ItemStack updatedSpawnerItem = CraftItemStack.asBukkitCopy(nmsSpawnerItem);
spawnerItem.setItemMeta(updatedSpawnerItem.getItemMeta());
}```
I have this for now and I don't know if it's okay
Is there a list of all events that can fire when pressing left click?
or other option: is there a way to see all events that have been triggered?
@echo basalt dont u work a lot with events?
I'm being a mechanic with my dad rn
ah
?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. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
I got a command so its defined as
if (commandArg.equals("generatefloorent")) {
does that count as a sub command
or just the main command
I need help with nms :/
?paste
Today's not the day
what did I do
it separates it
Just ping me with your targeted questions and I'll do my best to answer
When I have the time
In like 3 hours
but I'd just do each command in a separate class
this gives me an idea tho
o so
in dm?
will I need to register those 2 as different commands in the main class as well as in plugin.yml?
let the guy be you should ask the coconut tree guy
yes to both
not in main if you use one executor
or the guy with the ground pigeon pfp
but if you do it in two classes
however
you need to register each /<command> you want to trigger
thats how its possible to do shortcut commands, it's not hardcoded in plugin.yml, though having them there certainly helps
I said ping not dm
ok
well then @echo basalt why do attacks barely outside player attack range not trigger as an PlayerInteractEvent
its like 1 pixel or smth
Prob a spigot check
could you show an exmaple?
The attack noise is clientsided
Yeah so
i need to run logic when a player clicks
if i dont get either a PlayerInteractEvent nor a EntityDamageByEntity event
i cant do that
mr moterius
PlayerArmSwingEvent
any1 can show an exmaple?
example
ah what i meant is
if you register command /a in your plugin, and in the comand handler check if command /b is run
it will never call it because it only listens to /a
so you need to register the handler to /b
which is why it's a good idea to just make separate handlers
its already listened to separately anyways
is it possible to make a new kind of itemstack class (eg Weapon) (then extend it ItemStack) and then do
Weapon someWeapon = new Weapon(item);
someWeapon.setRequiredMana(10);```
note this is pseudo code... so is this possible?
and then to add it to inventory do` player.addInventory(someWeapon);`
Don't extend ItemStack
well then another way i thought of is to just
// do bunch of lore and/or PDC shit
}```
alright
rocket science is easy. just be fast enough so that you keep missing the world while falling down
what is your issue=
dis
player swings arm, but neither event fires
you'Ll probably have to listen to incoming packets
You can also just try the animation event
pretty sure thats paper?
no
huh its not
declaration: package: org.bukkit.event.player, enum: PlayerAnimationType
what better itemStack.isSimular(ItemStack) or equals
alright, ill check that out and return when it doesnt work
oh ok
lol just almost accidentally committed this
Yall were right, thanks for the help
quick question
if i fire an attack twice in the same tick, are both counted, or only one?
no clue
damn
the problem is that i dont know if the attack already happened
the event fires always, so sometimes when i want and sometimes when i dont
strange naming choice, something like equalsIgnoreSize would be less confusing
or more verbose equalsIgnoreStackSize
like @tender shard here's context
I'm messing around with attack reach. I thought about just using the animation as anchor point, and cancelling the EntityDamageByEntityEvent, but i cannot distinguish between a normal attack and an attack called by the plugin in it
actually
about schedulers
do they run before/after events under guarantee?
I'm home for a lil bit
cuz i could just keep a static list of players/tick i already iterated over and just stop if i find a player that alrady been iterated over, then clear the list between the event phases
this should properly show the subclass' name right?
yes
Class#getSuperClass()
Isnt subclass is a parent class?
what
what
super is parent
I have a bunch of classes (Unit, Pair, Triplet, etc) and that method is declared in Unit, as Pair and Triplet extend that.
So I want the message to properly say "This PAIR (and not this Unit) is immutable"
hence I just do this.getClass().getSimplename8)
so I was thinking of making a command, a main command which really doe not have any use for the time being, and a sub command followed by it would that work?
commands:
generate:
description: Generates a basic floor with an entrance.
usage: /generate basic_floor entrance
aliases: [basic_floor, entrance]```
[22:07:03 WARN]: Caused by: java.lang.NoClassDefFoundError: javafx/util/Pair
[22:07:03 WARN]: at com.nux.meteoritehubpvp.item.items.PvPSword.<init>(PvPSword.java:44)
[22:07:03 WARN]: at com.nux.meteoritehubpvp.commands.PvPCommand.pvpTopCommand(PvPCommand.java:19)
[22:07:03 WARN]: at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
[22:07:03 WARN]: ... 20 more
[22:07:03 WARN]: Caused by: java.lang.ClassNotFoundException: javafx.util.Pair
[22:07:03 WARN]: at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
[22:07:03 WARN]: at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:101)
[22:07:03 WARN]: at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86)
[22:07:03 WARN]: at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
[22:07:03 WARN]: at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
[22:07:03 WARN]: ... 23 more
Getting this error, could it be due to my java version?
Sorry for copying it here lol, thought its a bit smaller
No, there's just no JavaFX present in the standard JDK
You can't use that Pair class
So in what JDK is it present?
I seemed to have installed on my system a jdk 1.8 which has the javafx
I enabled that and now everything works.
public BlockBreakListener(JavaPlugin plugin) {
loadUnbreakableBlocks();
ProtocolManager manager = ProtocolLibrary.getProtocolManager();
manager.addPacketListener(new PacketAdapter(plugin, ListenerPriority.NORMAL, PacketType.Play.Server.BLOCK_BREAK_ANIMATION) {
@Override
public void onPacketSending(PacketEvent event) {
Bukkit.broadcastMessage("sending packet");
}
@Override
public void onPacketReceiving(PacketEvent event) {
Bukkit.broadcastMessage("receiving packet");
}
});
}
When using this, nothing happens. When using the same but listening to PacketType.Play.Client.CHAT everything works.
Im trying to cancel the block break animation(only for some materials, so adventure doesnt work; maybe with interactEvent to set gamemode back to survival it could work)
How to recreate the world "world" with another seed while ingame ?
not actually, getClass gets overritten by the top class
the one that's at the end of inheritance
who use wg api 1.12.2
Hi
I'm getting issues with compiling an open source plugin (Gradle)
I tried from Intellij, it did not work
🤷♂️
Use Java 17
heeeelp
who know what worldguard version use for 1.12.2 for dependency
wth with this? i not found 6.2
minimum version this 7.0.0
but 7.0.0 not for 1.12.2
yup
np
make your own pair util
Bukkit.getPluginManager().getPlugin(world-guard-plugin-name) should work
and then casting it to WorldGuardPlugin
oh
how
this
work
pluginManager get plugin
not class
WorldguardPlugin not give class
wdym?
.
WorldGuardPlugin wgp = (WorldGuardPlugin) Bukkit.getPluginManager().getPlugin("WorldGuard");
edited
💀💀
Any ideas??
hey how i can "find onLoad metod" in worldguard api for registry flag
i mean where did they even get it from?
The break effect is calculated client side
You need the mining fatigue effect
Shit i deleted the code someday at 2am and dont have version history
like the code where i coded it with adventure mode
hi. does anybody have any experience with tiktok api to get data like likes, shares and so on? if yes, i could use some help. i have to make a plugin with tiktok api to get data of a certain video for example and check the data. any ideas or tips?
Is there detailed documentation over the EntityPlayer class? (package net.minecraft.server.level) 1.18.2 craftbukkit
net.minecraft is not CraftBukkit and no there is no documentation
?mappings other than
Compare different mappings with this website: https://mappings.cephx.dev
@eternal oxide
So?
That's still Mojangs code
A screenshot of the package layout won't change that
yes
declaration: package: org.bukkit.util, class: BoundingBox
ah yes yea
I'm trying to create an NPC the way I used to do it was:
// String name
// Location location
MinecraftServer server = ((CraftServer) Bukkit.getServer()).getServer();
WorldServer world = ((CraftWorld) location.getWorld()).getHandle();
GameProfile profile = new GameProfile(UUID.randomUUID(), name);
EntityPlayer player = new EntityPlayer(server, world, profile, new PlayerInteractManager(world));
But I migrated to 1.20 and I'm having trouble implmeneting this code:
- The
playervariable doesn't have a.setLocation(Location)method. - the
PlayerInteractManager(world)doesn't take aCraftWorldanymore it takes anEntityPlayer
?paste exists just so you know
If anyone can help me with this it'd be greatly appreciated.
Can i make a EntityRayTrace not go through blocks, or do i need to do two ray traces and compare exact hit positions for which one is closer?
how can i async / loop block for remove it after 5 seconds?
Not to my knowledge. You'll probably have to use a normal raytrace and filter by the ones you want.
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/World.html#rayTrace(org.bukkit.Location,org.bukkit.util.Vector,double,org.bukkit.FluidCollisionMode,boolean,double,java.util.function.Predicate)
a normal raytrace stops at teh first collision
entity or block
sooo the player, and i cant filter that with a normal trace
oh its missing the collisionmode isnt it
You can definitely filter entities
many arguments
See this
or use rayTraceBlocks, if you only want teh first block
Has anyone else encountered this?
?mappings
Compare different mappings with this website: https://mappings.cephx.dev
alright different problem, i have multiple events that can fire in the same tick, can i somehow sync them so that only the first one fired goes through?
*per player
hey! I am trying to create custom blocks using mushroom blocks, problem is that all instances of the block have the same block particles as the first custom block registered (stone). how could this be fixed?
I have already tried setting the particle texture in the model json file but that didn't work
Not really sure what I should be doing here, I opened it and saw that it does infact not include .setLocation and the PlayerInteractManager does infact need an EntityPlayer and that still doesn't help me actually get the NPC, if you can help me with that i'd appreciate it
are we in nms era
in that why i cant pickup items ```java
@EventHandler
public void respawn(PlayerDeathEvent event) {
event.setKeepInventory(true);
event.setKeepLevel(true);
final Player player = event.getEntity().getPlayer();
event.getEntity().getPlayer().spigot().respawn();
player.setGameMode(GameMode.SPECTATOR);
player.setCanPickupItems(true);
new BukkitRunnable() {
int count = 5;
@Override
public void run() {
if (count == 0) {
player.setGameMode(GameMode.SURVIVAL);
player.spigot().respawn();
player.sendTitle(ChatColor.GOLD + "Respawned!", null);
player.setHealth(player.getMaxHealth());
cancel();
} else {
player.sendTitle(ChatColor.RED + "Respawning in "+ count + "...",null);
count--;
}
}
}.runTaskTimer(Thehunt.getPlugin(Thehunt.class), 0L, 20L);
event.setDeathMessage("");
}```
any1?
https://paste.md-5.net/kehaciwace.cs
This code does not work at all as we defined it, and when we right-click on the item, it is deleted and the code is not executed, but when there is another slot, the code works and comes to slot 8 and puts an item, but when I click again, it is deleted.
package com.customplayercommand;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
public final class CustomPlayerCommand extends JavaPlugin implements CommandExecutor{
@Override
public void onEnable() {
}
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (cmd.getName().equalsIgnoreCase("createcommand")) {
if (sender instanceof Player) {
Player player = (Player) sender;
player.sendMessage("Hello you should create command");
String pcommand = args[0];
getCommand(pcommand).setExecutor(new CustomPlayerCommand());
if (cmd.getName().equalsIgnoreCase(pcommand)){
player.sendMessage("OMG THIS IS WORKING");
}
}
}
return true;
}
@Override
public void onDisable () {
}
}
Why is it not working?
(I know i'm bad dev, i'm just small spigotmc dev)
First never use commands in main class
You didn't register your command.
there's any other scoreboard api apart from Fastboard?
what
you mean in plugin.yml?
bro the plugin not working
not adding to the server
You should use ChatColor.COLOR_CHAR
specify utf in build.gradle
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
Both. One in the plugin.yml and one with the PluginManager.
wdym
the plugin not adding
is that gradle kotlin
yes
?paste the error/stacktrace
Read this, not sure what I'm supposed to do, I found a version that uses ServerPlayer for 1.20 I tried it and that isn't even something I can import? Not really sure what I'm supposed to do here I'd like explanations thank you
Meant to reply to this
Are you using the mappings?
?nms
why the player.setCanPickupItems isnt working
Already have it installed, that's how I got most of my other classes like EntityPlayer but the solution I found that fits for 1.20 uses that ServerPlayer which I couldn't find
Cause the player is still considered dead in that event. Set the value in the PlayerRespawnEvent.
u need mojang mapping for ServerPlayer ig
ServerPlayer has been in since around 1.16
ServerPlayer is the spigot mapping
Which is weird like I said because I don't have it for some reason.
you probably have mojmaps
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.20.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<classifier>remapped-mojang</classifier>
</dependency>
other way round
yeah you have mojmaps
ah
ServerPlayer is mojmaps
Explain?
it only suggests me these but no compileJava lol
although I do use the java-library plugin
try java.options
EntityPlayer is spigot, ServerPlayer is mojang
im using java @EventHandler public void forceItemPickup(PlayerRespawnEvent e) { Player p = e.getPlayer(); p.setCanPickupItems(true); Boolean bool = p.getCanPickupItems(); Bukkit.getLogger().info(String.valueOf(bool)); } and its always printing false
doesnt exist
that
try on the java task
Got it, Now I want ServerPlayer but can't access it. How do I do so?
Maybe try delaying it by a tick?
By using the mappings.
get the instance?
cast to craft player and call getHandle
gotcha, thank you alot
I think I found the solution. It's called "JavaCompile" and not "compileJava"
inventoryview#gettitle
InventoryView#getTitle()
and you shouldnt check its ur inv by title
Try make your event handler higher priority
yeah why do you even need the title?
Also what epic said
Compare instances, not names.
exactly 😄
https://paste.md-5.net/kehaciwace.cs
This code does not work at all as we defined it, and when we right-click on the item, it is deleted and the code is not executed, but when there is another slot, the code works and comes to slot 8 and puts an item, but when I click again, it is deleted.
Help meeeeeeeee
in that any1 know why its always false ```java
@EventHandler (priority = EventPriority.MONITOR)
public void respawn(PlayerDeathEvent event) {
event.setKeepInventory(true);
event.setKeepLevel(true);
final Player player = event.getEntity().getPlayer();
event.getEntity().getPlayer().spigot().respawn();
player.setGameMode(GameMode.SPECTATOR);
new BukkitRunnable() {
int count = 5;
@Override
public void run() {
Boolean bool = player.getCanPickupItems();
Bukkit.getLogger().info(String.valueOf(bool));
player.setCanPickupItems(true);
if (count == 0) {
player.setGameMode(GameMode.SURVIVAL);
player.spigot().respawn();
player.sendTitle(ChatColor.GOLD + "Respawned!", null);
player.setHealth(player.getMaxHealth());
cancel();
} else {
player.sendTitle(ChatColor.RED + "Respawning in " + count + "...", null);
count--;
}
}
}.runTaskTimer(Thehunt.getPlugin(Thehunt.class), 0L, 20L);
event.setDeathMessage("");
}```
Are lambda streams autocloseable?
even when i do that java @EventHandler public void d(PlayerMoveEvent e){ Player p = e.getPlayer(); Boolean bool = p.getCanPickupItems(); Bukkit.getLogger().info(String.valueOf(bool)); p.setCanPickupItems(true); }
https://paste.md-5.net/kehaciwace.cs
This code does not work at all as we defined it, and when we right-click on the item, it is deleted and the code is not executed, but when there is another slot, the code works and comes to slot 8 and puts an item, but when I click again, it is deleted.
nvm that doesnt fix anything
I just used \u00A7 instead of '§' now
? 💀
https://paste.md-5.net/kehaciwace.cs
This code does not work at all as we defined it, and when we right-click on the item, it is deleted and the code is not executed, but when there is another slot, the code works and comes to slot 8 and puts an item, but when I click again, it is deleted.
yep, the move event code above
Help meeeeeeeeeeeee:(
u not print after u set value lol
maybe move the log past set?
ah k nvm
😐
1.8.8
?1.8
Too old! (Click the link to get the exact time)
khob karan ina
I have no other plugins
bro
😂
https://paste.md-5.net/kehaciwace.cs
This code does not work at all as we defined it, and when we right-click on the item, it is deleted and the code is not executed, but when there is another slot, the code works and comes to slot 8 and puts an item, but when I click again, it is deleted.
ok lets swith to 1.2à
¯_(ツ)_/¯
[07:13:20] [Server thread/INFO]: true
[07:13:20] [Server thread/INFO]: true
[07:13:20] [Server thread/INFO]: true
[07:13:20] [Server thread/INFO]: true
[07:13:20] [Server thread/INFO]: true
[07:13:21] [Server thread/INFO]: true
[07:13:21] [Server thread/INFO]: true
[07:13:21] [Server thread/INFO]: true
[07:13:21] [Server thread/INFO]: true
[07:13:21] [Server thread/INFO]: true
[07:13:22] [Server thread/INFO]: true
[07:13:22] [Server thread/INFO]: true
[07:13:22] [Server thread/INFO]: true
[07:13:22] [Server thread/INFO]: true
[07:13:22] [Server thread/INFO]: true
[07:13:22] [Server thread/INFO]: true
[07:13:22] [Server thread/INFO]: true
[07:13:22] [Server thread/INFO]: true
[07:13:22] [Server thread/INFO]: true
[07:13:22] [Server thread/INFO]: true
[07:13:22] [Server thread/INFO]: true
[07:13:22] [Server thread/INFO]: true
ohhh, plugin version: 1.8.8 spigot, server vesion; 1.8.8 paper
?whereami
https://paste.md-5.net/kehaciwace.cs
This code does not work at all as we defined it, and when we right-click on the item, it is deleted and the code is not executed, but when there is another slot, the code works and comes to slot 8 and puts an item, but when I click again, it is deleted.
plugin ver : 1.8.8
I dont know protocollib sorry
is the packet being sent
maybe its a different packet
Isn't there Player#stopSound()?
😂
xd
بگو پاپر ببین چی میشه
https://paste.md-5.net/kehaciwace.cs
This code does not work at all as we defined it, and when we right-click on the item, it is deleted and the code is not executed, but when there is another slot, the code works and comes to slot 8 and puts an item, but when I click again, it is deleted.
paper xd 😂
stopSound isnt what you want, but setSilent(true) might be
how can i remove player colliding in 1.20
LivingEntity#setCollidable()
ok thx
yes
I thought #setSilent() was the equivelent of the silent nbt tag for mobs? That wouldn't remove other sounds like block steps or UI sounds or what not.
Unless that's what you're going for?
?whereami
https://paste.md-5.net/kehaciwace.cs
This code does not work at all as we defined it, and when we right-click on the item, it is deleted and the code is not executed, but when there is another slot, the code works and comes to slot 8 and puts an item, but when I click again, it is deleted.
Helppppppppppppppppp
fixed it. had to do configureEach { on the tasks.withType<...>
probably, but some of the sounds you mentioned (UI) are definitely client side
can you help me
ویدیو رو ببین کمکت نمیکنن میگم پاپر استفاده میکنی 😂
is this good ```java
@EventHandler
public void disableCollide(EntitySpawnEvent e) {
if(e.getEntity() instanceof LivingEntity){
((LivingEntity) e.getEntity()).setCollidable(false);
}
}```
bro still dont know how to calc? 💀
debug the code
all the entities that are on the map will still be collidable
Lol why need a lib, its simple 😦
U can look at this, he does the same https://github.com/PlaceholderAPI/Player-Expansion
now good ```java
@EventHandler
public void again(ChunkLoadEvent e ) {
LivingEntity living = (LivingEntity) e.getWorld().getLivingEntities();
living.setCollidable(false);
}```
no thats not how loops work
me?
yes
"Entities"
yes
get the chunk entities
@EventHandler
public void onChunkLoad(ChunkLoadEvent e) {
e.getWorld().getLivingEntities().forEach(livingEntity -> livingEntity.setCollidable(true));
}
?
seems good
okie nice
yeah but it'll do it everytime a chunks loads for all the world
so?
i'm pretty sure the chunk had a get entities method
not good?
yes but not living entities ig
just instance them
Inconvertible types; cannot cast 'org.bukkit.entity.Entity[]' to 'org.bukkit.entity.LivingEntity
hows ur code looking
@EventHandler
public void onChunkLoad(ChunkLoadEvent event) {
for (Entity entity : event.getChunk().getEntities()) {
if (entity instanceof LivingEntity livingEntity) {
livingEntity.setCollidable(false);
}
}
}
ok ty
update maven-shade-plugin to 3.5.1
https://paste.md-5.net/kehaciwace.cs
This code does not work at all as we defined it, and when we right-click on the item, it is deleted and the code is not executed, but when there is another slot, the code works and comes to slot 8 and puts an item, but when I click again, it is deleted.
plugins version: 1.8.8-R0.1-SNAPSHOT
.
or just press F2 to jump to the next error lol
https://paste.md-5.net/kehaciwace.cs
This code does not work at all as we defined it, and when we right-click on the item, it is deleted and the code is not executed, but when there is another slot, the code works and comes to slot 8 and puts an item, but when I click again, it is deleted.
plugins version: 1.8.8-R0.1-SNAPSHOT
no need to post the same message every 3 minutes
1.8 is old af
ok
این میشه گیییییی
Hello, what are net.minecraft.server.level.ClientInformation and net.minecraft.server.network.CommonListenerCookie in nms 1.20.2 please? and how to use ClientInformation when creating a new instance of ServerPlayer and how to useCommonListenerCookie when doing this:java serverplayer.connection = new ServerGamePacketListenerImpl(herobrine.server, new Connection(PacketFlow.CLIENTBOUND), serverplayer, CommonListenerCookie here... );
ClientInformation contains the client settings, like which view distance they chose
you can just use the constructor or do ClientInformation.createDefault() for default settings
https://paste.md-5.net/kehaciwace.cs
This code does not work at all as we defined it, and when we right-click on the item, it is deleted and the code is not executed, but when there is another slot, the code works and comes to slot 8 and puts an item, but when I click again, it is deleted.
plugins version: 1.8.8-R0.1-SNAPSHOT
okay thanks, and for CommonListenerCookie?
MariaDB has it's own driver, but MariaDB is compatible with MySQL so the driver should work just fine.
wow, this time you waited 4 minutes
trust me, nobody is going to answer at all if you just keep spamming the same message
calm down, stop sending it every few minutes. someone will answer you when they figure out your issue or want to
I got no idea what it is but you can just create it using CommonListenerCookie(createInititial(GameProfile)
XAMPP
maybe you should obey the rules and stop talking in random languages @vagrant stratus
CommonListenerCookie.createInitial(GameProfile) easy, thanks 😄
dont you use cockroach db
the always-forgotten libraries feature lets you use anything from maven central w/o shading it
😐
gay?
alex is gay, yes
are we discussing my sexuality here again?
if just get exp then use my method lol, simple af
no sorry
omggggg
whats wrong with being gay
please replay me
There is nothing wrong with saying this
1 - Decreasing population , .............................
can you guys move the discussion abuot my sexual preferences into #general pls
replay you what
send me message replay.
yee
what message replay
ok sorry 😊
oh that's hand.y I'd still use xampp, that way you'd also instantly get a phpmyadmin too
everybody gangsta until I'm low on time
where's the ppl that were pinging me 5x for nms help
my language low
can't you login without password as root?
not sure
what ver
wallah
thank you
Hello, how can I get logs of the bungeecord console ?
if bungeecord also uses log4j like spigot does, then this tutorial should be 100% applicable https://blog.jeff-media.com/how-to-read-or-block-spigots-console-output/
Spigot uses Log4j to log console output, hence making it easy to listen to incoming console messages, or to block certain console messages from appearing. Prequisities You need to have Log4J on your classpath. We simply add the dependency to our pom.xml using the provided scope, as Spigot already contains those classes on runtime: Create...
already tried, it doesn't use log4j
what does it use?
nothing
wdym? does it just throw messages at System.out?
then idk
How can I check if there is a nearby active conduit nearby and what its power is even if the player is not in water?
for him to see what dependencies there is
binary compatibility maybe?
oh that makes sense, I recently bookmarked something about creating bridge methods to avoid this
lmao thanks
also what kind of shitty quick fix is this
YES, my public method is not used anywhere. It's because it's a library, meant for others to use. Okay, I get it, IJ doesn't understand. But how is changing the visibility to private or anything FIX THIS METHOD NOT BEING USED
suppress warnings unused 💀
Hello, how can I get net.minecraft.world.level.GrassColor.a ?
https://mappings.cephx.dev/1.17.1/net/minecraft/world/level/GrassColor.html
version: 1.17.1, hash: 1a14d5fcd9
idk why but my classes look cursed
probably using get(double, double)
idk what to pass
?xy
Asking about your attempted solution rather than your actual problem
I want to set the fogColor of a biome
I'm following this tutorial
https://www.spigotmc.org/threads/how-to-create-custom-biomes.512105/
I use nms 1.17.1
ok and why do you need to get the int[] from the class?
to set for https://mappings.cephx.dev/1.17.1/net/minecraft/world/level/biome/BiomeSpecialEffects$Builder.html
net.minecraft.world.level.biome.BiomeSpecialEffects.fogColor
version: 1.17.1, hash: d83f668cf4
where exactly does it require you to pass in the int[]from above?
maybe this code is correct?
no, you're casting an int[] to an int
oh wrong link
https://mappings.cephx.dev/1.17.1/net/minecraft/world/level/biome/BiomeSpecialEffects$Builder.html
version: 1.17.1, hash: d83f668cf4
from what I see, the private static "a" field is just like a map that maps arbitrary numbers to an actual color
there is probably 0 reason to ever touch it, hence it's private
i might be completely wrong though
I'll use a custom color 😉
Currently trying to get a ServerLevel:
ServerLevel world = ((CraftWorld) location.getWorld()).getHandle();
Getting an error tho: https://paste.md-5.net/ivurifawuq.bash
The dependencies:
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.20.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<classifier>remapped-mojang</classifier>
</dependency>
what is your server version ?
?nms
follow this guide please ^
1.20.1
That's what I mainly used
Still encountering the issue tho
did you add the whole specialsource plugin?
or the pom.xml config ?
Yes, I'll recheck tho one second
If yes, did you change the version accordingly to 1.20.1 everywhere?
And if yes, did you compile using maven or Build ARtifacts?
you probably used build artifacts, rendering your whole pom useless
maybe I should mention that in my blog post
I assumed it's basic knowledge that if using maven, you must use maven to compile
I did do infact everything you said, it was a single typo in the pom.xml tho
ah ok so you got it fixed?
Not particularly now my pom.xml is having an error
?paste your whole pom
<artifactId>specialsource-maven-plugin</artifactId>
<version>1.2.2</version>
Alright
The versions are updated in the actual pom.xml ^
here's your issue
https://blog.jeff-media.com/how-to-make-maven-automatically-put-your-plugins-jar-into-your-test-servers-plugins-folder/ read this please
If you’re using maven for your Spigot plugins (which you should do), it’s easy to make maven automatically save your plugin’s .jar in your plugins folder. There’s two ways of doing this: 1. The lazy way (not recommended) If you only work alone on one computer, you can just directly declare the output location in...
do NOT change the output location in the maven-shade-plugin
and also, do NOT disable dependencyReducedPom
Many people who are using the maven-shade-plugin commonly set to false for reasons beyond my grasp. This is generally a bad idea, as it can lead to problems if you’re writing a library, and has absolutely no advantages. Here’s a rule of thumbs: If your project shades dependencies, it should create a dependency-reduced-pom.xml. The...
Ah
read both of these please, then adjust your pom, then report back pls
Alright, thank you.
np
TL;DR: Change the output location in maven-jar-plugin, and NOT in maven-shade-plugin
how can I create an instance of PlayerTextures? I for some reason can't find my buildtools folder to locate it's origin
declaration: package: org.bukkit.profile, interface: PlayerTextures
pretty much yoou cant, it probably gets created with the player instance
then whats the point of Bukkit.createPlayerProfile :/
After reading here is the modifications: https://paste.md-5.net/jolejuhiha.xml
Still getting the same error: https://paste.md-5.net/ivurifawuq.bash
pom.xml no longer errors
it has a getTextures method
it probably gets created with it
oh
if anything setTextures is to set it from another profile
you are still using the "unremapped .jar" for some reason
the message complains about "ServerLevel" which is a mojang mapped class
in spigot it would be called WorldServer
oh yeah haha, thanks
Sorry if I get this wrong but isn't this the point of:
<classifier>remapped-mojang</classifier>
that tells your IDE to use the mojang maps, yes
but the server needs the "obfuscated" .jar
are you using reflection or something
please stop your server. delete your .jar from the plugins folder.
Now in IntelliJ; run "mvn package" again and be sure that you did check the "export-to-test-server" profile before doing so
then start the server again
i didnt even see the profile
So the new thing I'd do here is just deleting the .jar and stopping the server
did you enable the profile already
Yup
yeah stop server, delete jar, start server
Alright
re-package before starting too
Alright
looks like you still got the old .jar there so it decides to load the old .jar as the new one might have a different name
that's my guess
btw for commons-io, you can set the scope to "provided" as spigot should already contain it
Oh alright
but yeah other than that, your pom looks fine to me
Everything works now thanks alot, sorry to bother!
great! you're welcome
now do you want to learn how to do NMS that works across versions? 😛
it's gonna be a long read haha https://blog.jeff-media.com/maven-multi-module-setup-for-supporting-different-nms-versions/
Hi there! Today I’m going to explain how to setup a multi-module project using maven to support different NMS versions. Important notes about this tutorial: Every step will have detailled screenshots using IntelliJ. I explicitly chose not to include everything as copy/pastable source code, but normal screenshots (you can click on them to show th...
I'm reading every single line of this blog
why do you hate buildSrc?
buildSrc is actually the only thing I like about gradle
over the top for ur average plugin
not really, I even use it for my PAPI replacer
https://github.com/mfnalex/PAPI-Replace check out this, only two modules, but everything neatly tidied up in buildsrc
if your build.gradle ever exceeds like 50 lines, you're doing something very very wrong
doesnt use version catalog 2/10
version catalog?
one sec
I'm always happy to learn new things
but I haven't read anything about that in the official docs
its inside default gradle as libs.versions.toml, but theres a plugin to make it yaml
i dont really see any improvements by doing it like that
/gradle/libs.versions.yml: https://paste.epicebic.xyz/fetuzadodo.yaml
/settings.gradle: https://paste.epicebic.xyz/lomoqosuje.rust"
/core/build.gradle: https://paste.epicebic.xyz/atekabakuj.lua
soo like having this issue
[Server thread/WARN]: java.io.FileNotFoundException: BloodRoom_c.schematic (No such file or directory)```
well the file is in the plugin floder but still I get this error do
```java
schematicMap.put("Spawn", "/plugins/pluginname/spawn_c.schematic");
do I try this?
its better for changing versions and stuff bc it would all be central in 1 file
hi epic
instead of spread across about many
btw this is the longest build.gradle I ever wrote - only 42 lines
?nocode
It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
oh
is it inside ur resources folder
and are you saving it
wheres it coming from then
why are you using paths relative to the server root instead of starting at Plugin#getDataFolder()
well the line of code you sent and the error have 2 different names so start at that
oh
that was just for an example
File schematicFile = new File(pluginFolder, schematicFileName);
do I
check it exists first
File schematic = new File("plugins/RemakeHypixelSkyblock/private_island.schematic");
no
o
how you do it is fine
file.exists()
as long as plugins folder is JavaPlugin#getDataFolder
hey look another shitty hypixel skyblock clone
FileUtils.copyBuiltInResources(this, getFile());
and fuck off
O o
Lmao bro didn't hold back for 2 seconds
He was very upset with his answer
yeah fuck you choco
you probably asked something once right?
fuck yuo for that
real chads only answer questions here, and if we have actual questions, we go to r/benzodiazepines and wonder why nobody knows the answer there
alex stop doing drugs
dude I got them prescribed by some random doc from croatia
yeah as I announced many times, I got this appointment at this anxiety clinic next thursday
if all goes well, I'll be a patient there in 8 weeks and then can live without any meds
but until then, let me take my prescribed meds lol
are you taking ur laptop
dont take them as often then
I thought about selling it for crack cocaine
how much
ill do 1
ok
bc i have to transport it to you
yeah it's fair ig
so once the rock is here, I'll give you my m2
which I btw benchmarked with cinebench and it ranked #8
full .m2?
m2 max 30 gpu cores 12 cpu cores 18 neural engine cores, 1024gb storage and 64gb ram
resolution is 3456x2234
on 16 inches
there's only one better version that has 38 gpu cores but that wasn't worth it because it had a waiting time for like 4 weeks
it compiles spigot 1.20.1 --remapped within 30 seconds
does anyone know if I can disable this IJ feature that shows javadocs as text?
it's annoying to have to click the "edit" button everytime I wanna edit them
taling about this
the hotkey mentioned only toggles it for the selected method, not for all
I got a gradle module that only exists for the package-info.java files, but the plugin complains about no classes being found - any way to fix this?
> Task :javadoc:javadoc FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
80 actionable tasks: 42 executed, 38 up-to-date
error: No public or protected classes found to document.
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':javadoc:javadoc'.
> Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): 'C:\Users\mfnal\IdeaProjects\cesspool\modules\javadoc\build\tmp\javadoc\javadoc.options'
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 17s
02:27:04: Execution finished 'build'.
Reader mode
where can I change that
what do you need help with @odd pier
bot command like ?nocode
using custom gui without custom font(define fonts in default.json) is safe? i think users can use it, but idk
just add "do not use custom fonts" in rule?
that's just javadoc
a package without classes does not really exist
it isn't a package per se
Emily
hi
No paper 1.20.2 (meganind)
Even aikar!?
I, n-no
Anyone know how I can go about deleting advancements fully then remaking them with whats in a config file
I got the creating part down but I can't figure out how to recreate them like delete them fully then create them
😂
Build tools?
Imma try on rtx 4090 i9 13900kf
Is there any way (preferrably through the Spigot/Paper API) to attract a mob to you?
yes, let me know pls
I doubt your rtx 4090 does any difference lol
paper has AI builtin, for Spigot you can use my jefflib library
TemptGoal
yeah probably not
ill let you know in a bit
How can I put text in a text display with 2 different colors? I am trying this:
textDisplay.setText(ChatColor.of("#008EA1") + newRole + ChatColor.WHITE + "(" + prevRole + ")");
where newRole and prevRole are just strings. If prevRole is "Imp" and newRole is "Monk", I would expect to see "Monk(Imp)", but instead I see "(MonkImp)".
is it possible to hide the player from himself only? like to look invisible for himself (i want the player to stay visible for others)
if yes im probably guessing some invis potion packet with nms
no?
uh
maybe entity destroy packet
or maybe invis potion for just the player himself
entity destroy might kill the player actually
it doesn't kill the player. it just unloads everything even the world
does PlayerToggleFlightEvent.isFlying returns if player was flying before the event or after the event?
Javadocs are pretty clear on this. It returns true if the player is trying to start flying.
ok thank you
Trying to make a recipe where the items required to receive the recipe must be a specific amount not just 1 but it doesn't work it only works if the amount is 1 unlike what the code says 32:
ShapedRecipe recipe = new ShapedRecipe(key, GetItem());
recipe.shape("EEE", "EEE", "EEE");
recipe.setIngredient('E', new RecipeChoice.ExactChoice(new ItemStack(Material.WHEAT_SEEDS, 32)));
Minecrafts crafting system doesnt support amount-dependent ingredients
Got it, thank you.
<dependency>
<groupId>com.sk89q.worldguard</groupId>
<artifactId>worldguard-legacy</artifactId>
<version>6.2</version>
<scope>provided</scope>
</dependency> - in this artifactId not exists vector class
what i can use
?askgoodquestion
What is your problem?
And if there is an error, please provide a part of the error
dependency for 1.12.2 worldguard api not exists
so I use it via artifactID
worldguard-lagacy
but
he not found vector class
The worldguard website has a section about dependencies:
https://worldguard.enginehub.org/en/latest/developer/dependency/
this is the problem for 1.12.2 it doesn’t exist
not found
so i use worldguard-lagacy
not worldguard-bukkit
java: cannot access com.sk89q.worldedit.Vector
class file for com.sk89q.worldedit.Vector not found
why would WE have their own vector class?
that is worldedit, is that included in worldguard?
Because it doesn't show me that
yeah, if I just depend on WG it doesn't allow me to use WE api
usually when connecting dependencies, worldedit is also included in dapandancy
Or is it necessary in this case separately?
wait, is it really necessary to add worldedit to the dependency? It’s just that I didn’t add it before and everything worked great (when worldguard-bukkit) but now it can’t find