#help-development
1 messages · Page 1284 of 1
sigh, another one of those, good luck I suppose
no point in trying to support all those except make more work for yourself 😉
yeah
oke but why can't see my 1.19.1 and i compile it
https://gyazo.com/daa337b0e3abbf9dd4411248fe020a07
a tnxs now its working
How can I apply the cooldown effect to 1 stack of items, but not others of the same Material/type without having to resort to tricks like using a different material, but texturing it the same in a texturepack?
I've tried player.setCoolDown(<ItemStack>, <Length>), but it applies it to all of them
isn't cooldown item component based now or am I crazy
There is a component for that, yes
It's the same as all the other spigot api versions
but with 1.12.2-SNAPSHOT as the version
What components? If you mean itemmeta I've tried that, but if it's something other than those 2 no
Also, is it applying to items of the same material other than the itemstack itself a bug or intended? It seems to imply the prior in the docs:
void setCooldown(ItemStack item, int ticks) { /* ... */ } // Set a cooldown on the specified item for a certain amount of ticks.
void setCooldown(Material material, int ticks) { /* ... */ } // Set a cooldown on the specified material for a certain amount of ticks.
What do you mean by that? If you mean getting the spigot version you have to change the spigot plugin version to smth like this (I think this is a valid package, can't check rn):
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.12.2-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
If you're using an IDE like IntelliJ IDEA or Eclipse it may install it for you
Yeah they don't really know what they're doing
Is this the real FBI?
They're in my DMs atm
olivo what crimes did you comit
Who? Not me right I'm not in anyone's DMs
ItzAbood69
guys does anyone know a plugin to create cinematic views? play.wynncraft.com uses those but I cant figure out how to
Yes indeed
Can you not arrest me pls?
Maybe you could try ReplayMod, extract the data (if they use smth like JSON that should be easy enough) and then execute some of the interpolation yourself?
It's open source so you can take as much as you want from them: https://github.com/ReplayMod/ReplayMod
You could probably just copy the camera movement
I haven't paid my parking ticket today because the fine for the parking space right next to the hotel is lower than what the hotel asks for per day lmao
mh i see, so thats smth wynncraft made up themselves
Sure, if you teach me how to make the delay work for only 1 item because MC is being annoying rn 🙏
20€/day for hotel parking space and 18.5€ ticket fine for parking wrongly
Lmao
Fools
The best part is: I didn't even get one
Maybe, but since you messaged in #help-server I assumed that you wanted an example of how to do it in your own plugin
A quick google search brings up this which probably does what you wanted: https://www.spigotmc.org/resources/cinematicstudio-cutscenes-creation-tool.88671/
no yeah i already looked it on google, but since i didnt find anything close to it, i though maybe people would know some niche plugins
ill make that too then i guess
Hm what's missing from Cinematic Studio?
btw how'd u do it with components
I SWEAR that plugin was NOT in my google search...
ill see, i just need a way to play a cutscenes to all players in the lobby
If it's part of the MC NBT updates I haven't played a while so I have no clue about it
Didn't even know they added entity resizing recently which is pretty cool
ic
That still doesn't explain why
^ doesn't work though
Is this like a genuine bug that I should report since it's triggering for all items despite it being possible to trigger for just one using this new NBT method?
Or am I genuinely just missing smth
Did you apply a cooldown group to the UseCooldownComponent
Also, what about the ItemMeta based method I found and tried here which didn't work for some reason: #help-server message
I believe that is required
Searching it up doesn't bring up anything which makes sense since it's UseCooldownComponent is currently marked as unstable
How'd I do that
Tried using it here: #help-server message, but I wasn't aware that I'd also have to create a group on top of that
Look's like the group's primarily for linking multiple items together and isn't necessary for this since the reason why I'm doing this is for it to work for just 1 item
The original code here uses UseCooldownComponent
Well presumably if it doesn’t have a group it’ll just apply to all items of the type
Idk I haven’t tried it
file creation/loading issue
I am a little stuck, I have my plugin fully working locally, but when I throw it onto a pebblehost server it gives me problems
it is somehow creating an inaccessable file called <pluginName>/players/<playername>.yml instead of creating <playername>.yml inside the <pluginName>/players folder
is this something that anyone already has theories how to solve? I can share code as needed.
rn it's just applying to nothing
but it should already have a group for that one sole one
tbh I should probably avoid it anyways
it's experimental and while it should work and be supported soon, I'd really rather not
especially since there should be a function that does it already
how are you creating the file
@chrome beacon i have now this error
https://gyazo.com/7eb469f034ca9a89348be2c3f7cd1eee
I mean if you don’t want to even try setting a cooldown group then ¯_(ツ)_/¯
in the absence of a group, the cooldown affects the material as a whole
EchoConfigSection is a configurationSection wrapper
File file = new File(ChatHookPlugin.getPluginInstance().getDataFolder().toString()+"/players/"+player.getName().toString()+".yml");
EchoConfigSection config = new EchoConfigSection(file);
and then later I save it via config.save()
there are several issues with this
first, you are assuming the file separator char to be /
use File.separator or File.separatorChar
it can be different on different systems
ahh, that is probably my solution then
toString is also not ideal here
or just use Path#resolve instead, or the File constructor with the varargs
I had tried \ and /, didn't event think about generic seperators
either use Path ^ or use the File constructor that accepts a parent file and a child path
The file constructor should replace the / for you
can i get help https://justpaste.it/gbp1m
that's a horrible paste service
why
I am not sure what your problem is, it says it built the thing successfully
but the plugin not loaded
cosmic sans
how did you even copy the font over
I just copied the text
I didn't know discord preserved format like that lol
I assume they are some wacky Unicode characters
The POM for org.apache.maven:maven-plugin-api🫙2.2.1 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model
can you explain your scenario or maybe with screenshot ?
Tried it with and without a group (there's already a default group)
It doesn't apply it to the material as a whole
It applies to nothing rn
Could u give me an example on how would I created the NamespacedKey so ik how to do it properly for this in specific?
i cant send a screenshot here
?img
Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.
Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org
im trying to compile a plugin to another version but when i did do the src abd evrey thing its give me worng jar
Yep it’s ARABIC-INDIC DIGIT ONE/TWO/etc
U+0661
you are not showing red area
pom. xml ans gitignore and plugin. yml and main class
final ItemMeta poppedTotemMeta = poppedTotemItem.getItemMeta();
final UseCooldownComponent cooldown = poppedTotemMeta.getUseCooldown(); // Not null since it isn't nullable
cooldown.setCooldownGroup(new NamespacedKey(plugin, "unique-itemcd")); // Not sure if there's a specific way to do it so I'ma assume not
cooldown.setCooldownSeconds(20.0f);
poppedTotemMeta.setUseCooldown(cooldown);
final ItemStack newPoppedTotem = new ItemStack(Material.TOTEM_OF_UNDYING, 1);
newPoppedTotem.setItemMeta(poppedTotemMeta);
plugin.getServer().getScheduler().runTaskLater(plugin, () -> {
player.getInventory().setItem(poppedTotemHand, newPoppedTotem);
//player.setCooldown(newPoppedTotem, poppedTotemType.getPoppedTotem().POP_EFFECT_DURATION);
}, 1L);
This doesn't apply it to everything of the same material as you guys said it would, but rather applies it to nothing. This is true with or without setting a group.
sometimes intellij not refactoring package names after you change their names with "refactor"
maybe your problem is about import or package ??? idk
this just happened to me
so what should i do
intellij recognize old jar as dependency in this scenario
maybe we can see your import statements ?
@sly topaz @chrome beacon sorry for the ping, but would you guys have any ideas for this?
@young knoll said they've never used it before so idk where to go from here
I also have never used it before
try with commands first, they're just components
if that works, then translate that to whatever API calls you need to make ig
idk how to use MC commands I'ma be honest
I mostly do regular programming not MC stuff lol 😅
now the proplem where in pom. xml or what should i change to be work
send first of 10 line of your main
i want to check that if im correct
ops
?paste use a paste instead
alr i got. it from github
and /src/main/resources
use git clone
i did
interesting.
I'm crazy
I'm trying to make it meaven
iv a jar of plugin but another version Does it help me?
you can still make it work if you move these packages correctly
you have to set your dependencies
public Integer boundsRadius[] = {0,0,0,0}; // x,y,z, radius
into the trash
don't bother building it
where i can find it
you need buildtools first of all
i tried to do it but it will be some gray codes
yeah than?
if they are using spigot-api you dont need buildtools
if im correct
you have to find
im speaking general
i didnt observe this project
i did and i wish i hadn't
Why is it using the wrapper type too
What is this madness
dose jar of plugin helps me for anything
it doesn't seem like the author knows about primitive types
or not
he is php dev
everything looks to be a wrapper
Maybe they are just too advanced
Primitive types? Pfft what do you think I am some sort of caveman
@trim quest Can I benefit from the jar file? I'm trying to find the libraries for the plugin but I can't find them.
add 1.16.5 spigot api as dependency in your project
I have been trying for 3 months
im trying to compile it another version but yeah i did do spigot api 1.12.2
BuildTools isn't required if you just depend on the api
there's just a 2 differents blocks
all of plugin
evreything good but there's some gray codes make the plugin not. work at game
well, which classes are you missing?
how can i know
by compiling it and seeing the errors it throws
there's no erors
but its not work
you have to observe code for example he have sqlite, then you have to add sqlite connector for example
then you're not missing any classes or libraries
Spigot has the SQLite driver built in
just get a plugin off spigotmc or smth
Why are you even trying to compile that specific one from Github
im using mysql, didnt know this
old. plugin u cant find it on spigot
I believe it also has the MySQL driver built in
someone's first plugin from 2016 without any build tool definitely shouldn't be your first pick as your own first project
That doesn't answer the question
Why that plugin specifically
atp you're better off writing the plugin yourself
cz this is the best one i find it than there's many servers it use it for 1.12.2 i talk with thwm and they said compile ot from github like what we do
I doubt many plugins use that
LGTM
this is my plugin?
not. my
its our now
i'm surprised he used an int there
I wonder why so much is commented out
It’s like they were still working on it but then decided to throw it on GitHub and die
but how there are some people compiled. it
the state of affairs for 1.12 servers must be incredibly desperate
no its fine
@chrome beacon i have now this error can you say what is wrong
https://gyazo.com/7eb469f034ca9a89348be2c3f7cd1eee
as vcs2 said you dont need to start someones project, first of all you have to build your java knowledge. Maybe someones project is too advanced to you or he is fallowing bad practices etc etc.
Sending text as video ☠️
but i really want this plugin 🥹😂
I prefer to send videos as text
anyways looks like it can't find one of your modules
make sure the dep info is correct
you can always pay someone with the time and know how to build it
Looked at some issues and it seems like some people are saying that using the "Player" (attached to HumanEntity) functions route is the best, but it doesn't work so I started an issue for it:
https://hub.spigotmc.org/jira/browse/SPIGOT-8059
oh yeah item use cooldown and cooldown are two different things
i wonder which one this is
one of them refers to the attack cooldown that causes you to do less damage per hit unless you let it "charge" back up
the other refers to the use cooldown that has a different indicator, for e.g. throwing ender pearls
which one is HumanEntity::setCooldown(ItemStack, int)
You’d think that would be the one to trigger the component version
But I have no idea
maven or gradle which build tool you want
im trying to refactor this plugin for you
my guess is that this is a "library" the author copy pasted into the project in whole, but only some parts of it are actually used by the project
for example i don't think a slot machine plugin is going to need an Arena class
You’d have to check the source of CraftHumanEntity to see what it does
there's a arsna class
which is unused, yes
ty
because the slot machine plugin doesn't use it
<33
setCooldown sets the shield & pearl cooldown as well
so they're the same thing
that doesn't sound right
It's attached to the player so the player one would absoultely make more sense
@trim quest do u need a jar of a plugin i have. for a 1.13 and 1.8 to 1.10
I took a look and I think I could fix it once I get confirmation of whether the issue's a documentation or code issue
I think and hope that it's a code issue
It would be misleading and tbh a bad function if it weren't
anyone The important thing is that it works
this plugin is very messy btw 🙂
im not gonna refactor it @potent crescent I'll just try to make it work
Wait why does your 1.20 module depend on the root of the project?
yeah thats what i want thank u
lol
@trim quest this plugin from 2015
so?
There are plugins from 2015 with good code as well
also 1.16 did not exist in 2015
so it's definitely not
so what should i change then?
remove it
time to try it and see
idk I've been going crazy for 3 months trying this thing alone
yes thats works tnxs
now i need to see to fix my import net.minecraft.network.protocol.game.PacketPlayOutEntityMetadata;
?mappings
Compare different mappings with this website: https://mappings.dev/
its not big deal for normal java dev.
did u make it 1.12.2?
i make it for 1.16.5
as described in github
iv one for 1.16
iv jar of 1.16 and 1.8 to 1.10
1.16~1.13
wtf
ahh shit
can u change it to 1.12.2? its just rename a two blocks @trim quest
ok
thank u bro <33
you are welcome
i didnt test it but at least you can keep develop it.
tyy ❤️
alr thats make it easy
Did I tire you out?
im sry
i will delete this repo clone it
because its not my code
💀 bro nuked all references to the original author
why would you do this if you were gonna delete the repo in the end lol
let me test it first or?
fair enough
just clone it and test locally
Don't rush just a minute
you are your own at this point
i wont refactor
kk
u can delete it
❤️ thank u uhelped me to much
Spigot developers here, you can get better service from them than me
♥♥♥
is there a way to check if a listener is registered before registering it?
I have a list of listeners that may already be registered, some coming from another one of my packages. When I register the full list, some of them, already being registered, register twice and fire every event twice, was just looking if there was a way I could check if they were registered before registering them lol - cause idk if its better just unregistering them just to be safe before loading them in the full list
mmmm hello you 2
chatgpt ass response 💔
fudged it, this works lmao
if (HandlerList.getRegisteredListeners(plugin).stream().map(RegisteredListener::getListener).anyMatch(v -> v.equals(this))) {
Bukkit.getLogger().severe("EVENTS ALREADY REGISTERED");
}
That is an interesting assumption that you are making, BananaRobot29498. I am most intrigued about what may have led you to say that!
how to make ravager rideable as a horse
Ask for his consent
PlayerInteractEntityEvent -> add player as passenger
Though you’ll need NMS to make it controllable
Why not just unregister your listeners and register them again instead of checking whether they’re registered
Then again, a listener accidentally being registered twice sounds like a code smell to me
Lmao
i compile a plugin and evreything is good but in game the plugin is not work how can i know why?
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
Does it throw errors? What does not work?
no there's no erors
Plugin features not working
Does it load?
yesh it there and green
We cannot know what your feature is and what exactly is not working
ZxSlotMachine plugin and i compile. it to 1.12.2
main. class?
anything you would think would help us diagnose the issue
is it your plugin or did someone else make it?
no seone make it search abut it in yt zxSlotMachine plugin
1min
is there a reason why you have to manually compile it instead of using a precompiled jar?
yp im on 1.12.2 and the plugin jar made for 1.8~1.10 and 1.13~1.16
💀
if all you did was recompile for 1.12 without changing any code it will not work
it explicitly says that it is not compatible with 1.12, if you need it to be you have to modify the code somewhere to make it compatible
i chanded i
g
are you able to execute the /zslot command?
send code of what you changed
yb
Material.CONCRETE instead of Material.WHITE_CONCRETE
Material.WALL_SIGN instead of Material.SPRUCE_WALL_SIGN
is that all?
These errors were present.
i would also just confirm the plugin works on 1.8 and 1.13 just to make sure it's not an issue with the plugin itself
yes its work i tested it
i would ctrl+f any instances of WHITE_CONCRETE and SPRUCE_WALL_SIGN in case it checks any of those as strings or something
it shouldn't because if it does that's just bad plugin design but mabye
i think there's something i need to change it. but idk where is cz there's no erors
depending on what IDE you're using you could either use ctrl+f or ctrl+shift+f to do a project-wide search
if you really want to you could grep or ripgrep it
anything there is eror?
any instances of WHITE_CONCRETE and SPRUCE_WALL_SIGN
no there's not
then i'd just debug specific features until you can get them working
there's probably a reason why 1.12 isn't supported
can i dm message cz here i can't send a image
?img
Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.
Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org
what am i looking at in that image
LMAO
red point
is it. normally
you can disable it it doesn't really matter
it only matters when you're running in debug mode
ale so how can i find the erors
if you're able to compile successfully you don't have any errors
again
there's likely a reason why it doesn't support 1.12
because it's not as simple of a fix as just changing two things
i doubt it uses reflection but if it does (and just throws away the errors for some reason) it might be that
just debug specific features or methods until you are able to figure out what's causing the issue
either:
- there are runtime errors, but the plugin author throws them away (which is really bad design and makes it difficult to debug)
- there are other compatibility issues like methods not doing what they did in older versions or dependency plugins not working in 1.12
Does anyone know why when you teleport a player to a Location with yaw and pitch, after a plugin or server restart the player always faces south?
Shouldn’t be the case
Players should be spawned at the same location and facing they were at when they were kicked
You probably have a plugin doing that, make sure to test only with your plug-in on the server
already did, i set the spawn and after i reload the plugin it always make player teleport facing south
World world = instance.getServer().getWorld(instance.getConfigManager().getSavesFile().getString("spawn_teleport.world"));
double posX = instance.getConfigManager().getSavesFile().getDouble("spawn_teleport.x");
double posY = instance.getConfigManager().getSavesFile().getDouble("spawn_teleport.y");
double posZ = instance.getConfigManager().getSavesFile().getDouble("spawn_teleport.z");
float yaw = instance.getConfigManager().getSavesFile().getFloat("spawn_teleport.yaw");
float pitch = instance.getConfigManager().getSavesFile().getFloat("spawn_teleport.pitch");
p.teleport(new Location(world, posX, posY, posZ, yaw, pitch));```
Can we see the config
spawn_teleport:
world: world
x: 231.40538757873907
y: 51.0
z: 1350.6964772372255
yaw: 0.0
pitch: 90.0
what direction should they be facing?
Wouldn’t that always teleport one south? It is 0 degree yaw
any direction i faced while running the command /setspawn
Though it should also make them look straight down to the ground if I got my facing correctly
yeah that's what im thinking
Show the code for setspawn
something's wrong with your saving code then
it happend too
instance.getConfigManager().getSavesFile().set("spawn_teleport.world", p.getWorld().getName());
instance.getConfigManager().getSavesFile().set("spawn_teleport.x", p.getLocation().getX());
instance.getConfigManager().getSavesFile().set("spawn_teleport.y", p.getLocation().getY());
instance.getConfigManager().getSavesFile().set("spawn_teleport.z", p.getLocation().getZ());
instance.getConfigManager().getSavesFile().set("spawn_teleport.yaw", p.getLocation().getYaw());
instance.getConfigManager().getSavesFile().set("spawn_teleport.pitch", p.getLocation().getPitch());
instance.getConfigManager().saveFile(instance.getConfigManager().getSavesFile(), new File(instance.getDataFolder(), "saves.yml"));
p.sendMessage(Color.Colorize(instance.getConfigManager().getMessageFile().getString("spawn_set")));```
try using Player#getYaw and #getPitch
also i would cache the player's location because it creates a clone every single time you call getLocation
and it also makes the code a little cleaner
Also, use constants
it saves on the file when i set the spawn but the plugin don't read the yaw and pitch
Well, that doesn’t quite look to be the case considering your config file is always facing south and down
just run /setspawn
spawn_teleport:
world: world
x: 235.6768466165851
y: 51.0
z: 1355.0127248121617
yaw: 88.70868
pitch: 1.5377898
when i do /plugin reload it stopped reading the yaw and pitch when player use /spawn
and always face south
That sounds like you’re resetting the config somewhere, yeah. Config values don’t just get reset
no the reload is a sub command of my plugin and "/plugin" is the main one
oh i see
i wouldn't name my root plugin command to just "plugin" but that's besides the point
I’d recommend looking at how other setspawn plug-ins work, there’s bunch of them in spigot
is not named plugin, i just called it that so you can understand
the same issue happens when you restart the server?
oh ok thats good
We could probably find what the issue is if we could see more of how the config manager works but it’d take forever by looking file by file
yeah
Either figure it out by looking at other plugins source code or put your source on GitHub so it is more easily navigable
ctrl+f "spawn_teleport.yaw" and "spawn_teleport.pitch" and see where you're changing it
Config manager:
public class ConfigManager {
private final Main instance;
private final FileConfiguration configFile;
private final FileConfiguration messageFile;
private final FileConfiguration savesFile;
public ConfigManager(Main instance) {
this.instance = instance;
this.configFile = saveConfig("config.yml");
this.messageFile = saveConfig("message.yml");
this.savesFile = saveConfig("saves.yml");
}
public void saveFile(FileConfiguration configuration, File file) {
try {
configuration.save(file);
} catch (IOException ex) {
ex.fillInStackTrace();
}
}
private FileConfiguration saveConfig(String configName) {
File file = new File(instance.getDataFolder(), configName);
if (!file.exists()) {
instance.saveResource(configName, false);
}
return loadConfig(file);
}
public void reloadConfig(FileConfiguration configuration, File file) {
try {
configuration.load(file);
} catch (IOException | InvalidConfigurationException ex) {
ex.fillInStackTrace();
}
}
public FileConfiguration loadConfig(File file) {
YamlConfiguration configuration = new YamlConfiguration();
try {
configuration.load(file);
} catch (IOException | InvalidConfigurationException ex) {
ex.fillInStackTrace();
}
return configuration;
}
public FileConfiguration getConfigFile() {
return configFile;
}
public FileConfiguration getMessageFile() {
return messageFile;
}
public FileConfiguration getSavesFile() {
return savesFile;
}
}```
saves.yml:
> spawn_teleport:
> world: world
> x: 235.6768466165851
> y: 51.0
> z: 1355.0127248121617
> yaw: 88.70868
> pitch: 1.5377898
Just put the code on GitHub
Navigating through code trees posted on discord messages is just painful lol
real
Here’s a plug-in if you want to take example of it
speaking of always spawn, i should make an update with some fixes
is it possible to change the biome of an area after world generation? I have tried using World#setBiome and Block#setBiome thorugh a command, and neither do anything...
uh that's not a vanilla command?
what does /version say?
Maybe it’s /fillbiome
looks like there's a packet to resend the whole chunk now
1.21.4-214-main@894631f
*chunk biome
so, not spigot
api is 1.21.4R0.1-SNAPSHOT
my server is a paper server, but paper is still a fork of spigot... right?
or was their split drastic enough to make major methods not work?
could be, who knows
alr
cause idk if its better just unregistering them just to be safe before loading them in the full list
I honestly don't know what you're doing but unregistering an event shouldn't really have any funny side-effects
then again, if you need to unregister events outside of disabling functionality, I feel like there's something wrong out there in that code
looking at NamespacedKey#fromString(String) and NamespacedKey.fromString(String, Plugin) ... if i call fromString("foo:bar", null) (or fromString("foo:bar"), will i get a NamespacedKey whose namespace is foo and key is bar ? a fully formatted key with null default namespace seems to be the only case that isnt documented (however, null is documented to technically end up in the minecraft namespace)
im looking on Stash and it looks like it should pan out that way, just wanted to know if anyone knew the answer before i went ahead and tried it
fromString("foo:bar") this 1 will def path bar to the namespace/group foo
not sure abt the former one where u pass null as well
fromString(String) just calls fromString(String, (Plugin) null) so it should be the same
ah alr then
well its just it could very well be the case from version to version, or platform to platform that it differs
hm
i mean im just saying, dont take it forgiven that the first delagates to second as that is an impl detail more or less
ye
i was really just looking to replace my usage of the constructor NamespacedKey(String, String) so ide would stop yelling at me for @Deprecated
🥲
its for inter-op with a mod and im using its namespace instead of plugin's for registries
SuppressWarnings
although tbh i dont need to really be storing any of it since im just a basic I/O system
i simply do not like to
once i actually get maintainer status for this project im just going to completely gut this class specifically LOL
any idea what the event is called for shulker_bullets (or projectiles in general) being destroyed by lava?
I tried entity combusts, doesn't get fired
I tried entity killed, dies, damaged, despawns, none of them trigger
nvm Im switching to fireballs
nvm fireballs have an impossible to remove fire effect...
Anyone know any projectiles that don't slow down over long distances (even when gravity is off)? Snowballs slow down, fireballs don't and neither do shulker bullets, but the latter 2 both have other issues
If you don't want snowballs to ever slow down, simply set their motion every tick
how do I know what velocity I need to give to the snowball though, I don't know their initial velocity after a few ticks?
and how do I get every snowball in the server
When a snowball is spawned, store its initial motion into some PDC
Then World#getEntitiesByClass and set their motion based on the PDC value
I would store them in a data structure and not fetch them every tick.
What is @undone yarrow trying to do in the first place? 😄
an airstrike with explosive projectiles
I ditched snowballs because they slow down and they have some funky knockback mechanics to explosions, so I switched to shulker bullets which don't slow down, but they sometimes magically disappear (no event detects that), and I can't hide them, so I switched to fireballs but they're always on fire, so now I'm back at snowballs...
How about you use display entities?
they don't detect collision
I put the display entity on the projectile as passenger
If the ground doesnt change while they are flying, you can get the block they should explode at very cheap.
Unless you really need dynamic collision detection, in which case a projectile or falling block is viable.
the ground does change
that's the main issue with display ents
hm a falling block? Maybe. nvm they slow down just like snowballs
Im looking for a packet that let rotate player pitch/yaw without locking the player movement and screen, i already tried teleport flags but they always lock the player
trying to simulate a smooth recoil
I created true virtual projectiles for a skill system once.
Just a short ray trace each tick towards the next position for collision detection, then teleport or call onHit.
isn't raytracing every tick for multiple entities kinda heavy on performance? (entities can be 100's of blocks away from the nearest block in their facing direction)
Will be really hard with 20TPS. The client doesnt interpolate the movement, so you would have to send 2 or more packets, and that will feel really janky for the client.
Never saw it in my profilings. rayTraceBlocks is quite affordable if you dont overdo it. Projectiles do something very similar each tick anyways.
Some servers have managed to make the recoil very smooth with nms packets
If you go this route, lmk. I can give you a starting point
pretty sure I stole some crazy raytrace code once
oh yeah @lost matrix now that my abilities system is done
wanna compare approaches?»
Yeah sure 😄
recoil is kind of supposed to be sharp and immediate
well, at least the initial kick; if you want to slowly "pull back" the crosshair to where it was before recoil, that's going to be difficult to do smoothly
still doable if you do it really slowly but that might just make aiming even more difficult
?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.
have you tried tossing salt over your shoulder
Is there anyone who makes custom plugins? dm me
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
cant updates like these work from config or without a restart?
https://github.com/SpigotMC/BungeeCord/commit/5b05934fe8df1aaf928ab1d644ee6a5650d431d7
You have insufficient privileges to post here.)
Contact someone offering their services
I can't change plufin icon after uploading??
Enable 2FA
and risk shitting the bed if something in the protocol changes or typing the wrong thing?
what the best way to drop a Item without them "flying" away?
world.dropItemNaturally lets them fly away (even if i set the Velocity to a Zerovector)
world.spawnEntity doens't allow them to stack
What do you mean it doesn’t allow them to stack
there just seperate item entites, not a stack of them
im trying to code a bedwars spawner
have you tried dropItem instead of dropItemNaturally
yeah
dropItem shouldn't add any velocity to them
if you're spawning them slightly inside a block they'll erratically get pushed out of it
lol, dropItemNaturally doesn't add velocity to the item, and it simply calls dropItem
it just adds some random value between -.25 to .25 to the passed location
least misleading api method
is that so, I would've assumed it duplicated the HumanEntity#dropItem behavior
ngl i have no idea what dropItemNaturally is meant to do after seeing this
Drops an item at the specified Location with a random offset
yep, okay checks out
why is this method needed lmao
eh, if people haven't complained till now, it probably means it simulates the behavior well enough for nobody to care lol
well, nevermind that. Someone did complain at some point about it but for a different thing: https://hub.spigotmc.org/jira/browse/SPIGOT-7960
so apparently this is also how vanilla does it on its dropItem methods
that's odd, i use it a lot and it looks like it spawns with a random velocity to me
It's a very old method
though with that being said, it's probably still viable API because the details of the offset applied to an item when it drops from a block is a server implementation detail
how do i make blast prot not affect wind charges
you can just not enable it in the config then?
just use transfer packets to dump your players to a limbo/lobby while your proxy is restarting, if you're afraid of losing players because of network-wide restarts
unless you have something terrible and dumb on the proxy it should restart in like ~20s anyway
yea that would be good idea, but the players need to have minimum version like 1.20.4 or similar
wonder if anyone tried to optimize server startup by using things like CDS and custom java runtimes
I ended up just setting the velocity of the snowball to its initial velocity every tick. I just saved the snowball entities somewhere, and I saved their initial velocities on each individual snowball. Should be pretty performant and it works nicely. Thanks for the help though!
limbo servers are cheap enough that you can just have one for each version you support deployed honestly. There's limbo servers out there that take barely any resources
ye but you dont have transfer on 1.19, 1.9, 1.8 etc
well, in that case you just got to use good old proxy transfer and partial restarts
or protocol class in the config
not a sensible solution really
why have the option in the first place if it's gonna be disabled?
you could multiply the damage by the same multiplier blast prot reduces the wind charge to negate it
how?
it deals damage?
i thought it just gives you velocity
Emily already explained, it is just a way for someone to blow up the proxy accidentally
the player on broken protocol would just get kicked right?
I have no idea, I have never used a wind charge so I assumed it did lol
if it does velocity then just push the entity when it hits them I guess
you could modify the enchantment itself to not apply to wind charges in some way I bet, just not all that practical to do
wind charges are technically explosion knockback
is there an event for knockback or something
there's the EntityKnockbackEvent, yeah
alr
there's also the EntityKnockbackByEntityEvent which may be triggered in this case as well
Im looking for a packet that let rotate player pitch/yaw without locking the player movement and screen, i already tried teleport flags but they always lock the player
but when you dropItemNaturally it spawns in the middle but goes in some directio n
Hi,
how do I add items attribute in 1.21?
it seems like I need an AttributeModifier but it's supposed to be deprecated since 1.21
'AttributeModifier(java.util.UUID, java.lang.String, double, org.bukkit.attribute.AttributeModifier.Operation)' is deprecated since version 1.21 and marked for removal
AttributeModifier damageModifier = new AttributeModifier(
UUID.randomUUID(),
"generic.attack_damage",
5.0,
AttributeModifier.Operation.ADD_NUMBER);
meta.addAttributeModifier(Attribute.GENERIC_ATTACK_DAMAGE, damageModifier);
thx
i believe the way to do it in modern versions has a NamespacedKey instead of a UUID
lemme double check
declaration: package: org.bukkit.attribute, class: AttributeModifier
use that constructor instead
yeah thx a lot it was what i was looking for
is there a way to programatically know if a block emits light? without having to manually check the material or something
I believe there's a method on BlockData if I'm remembering correctly
If 0, doesn't emit light :p
[WARNING] The POM for org.eclipse.jgit:org.eclipse.jgit:jar:5.13.2.202306221912-r is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] Error injecting: net.md_5.scriptus.DescribeMojo
java.lang.NoClassDefFoundError: org/eclipse/jgit/errors/RepositoryNotFoundException```
Any ideas? Trying to compile 1.21.6. Made sure I have the latest BuildTools too
Maven version?
3.9.6
it's what's automatically downloaded
No idea. Delete ~/.m2/repository/org/eclipse
Different error this time.
Tf
Which console are you using?
playstation 3
gamecube
playstation 1
I basically want to change Minecraft's fishing mechanics and I want to make player not confused when fishing. Is there in any way to make a FishingHook never got bite?
Solved by setting the min and max wait time for the FishHook
Has anyone reported yet that placing an item this way or using setItem(EquipmentSlot, ItemStack) kicks you from the server with this error?
https://pastebin.com/b8dbWCwQ
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.
What version?
lasted 1.21.6
CraftBukkit version 4509-Spigot-d5ca3f8-58bf15a (MC: 1.21.6) (Implementing API version 1.21.6-R0.1-SNAPSHOT)
when you create new classes do you usually guys use constructors only for field initialization and put everything else under static factory methods or do you initialize fields with some logic inside the contructor?
Depends
You ask a lot of questions where the answer is "depends" 
Generally speaking you should keep your constructors relatively clean. Factory methods are useful if you want different preset ways to construct an object that make things more clear with a method name
If you don't need that clarity, then the factory methods are just there for syntax sugar, which is fine too. But keep logic out of your constructors where possible
put all of the logic in the constructor @worldly ingot /s
Is it possible to change the shadow on block displays? See the img, the bottom left face is much darker than the other 2. I'd like for the entire block display entity to be the same brightness everywhere.
for what do you need a constructor if you have static
field initialization
i dont have fields, i only have local variables
then you dont need class at all
correct
sommer just writes in C 
my whole plugin is decorated with native
my man is masochist
That’s handled on the client side. Even if you set the maximum brightness, it will still have that shadow if I’m not mistaken
im just trying to achieve nirvana in OOP
probs the nerdiest thing i've ever said
tbh
I remember it because I had the same problem when making mods, so it’s probably impossible to do with plugins
Well, at least if you're making a mod, you can absolutely change the lighting of an entity lol
But yeah you're pretty SOL when it comes to entity lighting from the server
Yep
what about shaders?
using a resource pack
could that change it for specific blocks?
Does anyone know how I can execute a command or get the entered data? I still don’t know how this Dialog stuff works
That should work
I only know it’s possible, but I wouldn’t know how to do it
You can use placeholders in the run command action. $(pro) would replace with the value
So for example, new RunCommandAction("tellraw @a \"$(pro)\"") will be either tellraw @a "test true" or tellraw @a "test false" based on the user's selection
Conversely, you can use $(first) to get the value of the first key
If dialog system of spigot and paper is different then a wrapper is needed ig
right?
It will be. Adventure will make their own
But there's no guarantee that even API added into Spigot since the start of this year will match what's in Paper
They don't pull from upstream anymore
they said they would for major things
Yeah but what constitutes major. What one developer considers major may not be for then
It's a dice roll
it's just pain
That's why I stopped making public plugins lol
Killed my motivation. Or at least what remained of it
so I assume you are making them for a server network
for paper I will now need multiple maven modules for any minor change
this dialog api looks so awful
Hello I search an java developper for a custom plugin.
I'm french
For more detail mp discord
I'm at Hypixel, yeah
I see 👀
It's the last Minecraft job I'll do
great
Going out into the real world after this lol. I want out of MC
are you happy at hypixel
it's a bit more "real" in the sense of it's a huge network
but it's still minecraft at the end of the day
Yeah I'm fulfilled right now. Definitely the most real and the best I've been treated in the industry, bar none
So I'll stay here as long as I can
how long have you been working there?
Nov of 2023, so a little over a year and a half
I'd appreciate hypixel a lot more if they hired me :p
jokes on me they'll never reply
Is it possible to use commands registered by plugins, or does it only allow vanilla commands?
Never mind. It does work with commands from other plugins
Yeah anything
If the player can run it, it's allowed
You don't have to use a command though if you don't want. You can use a custom event, which just sends a packet to the server. You can listen for it using the new event. PlayerCustomClickEvent
Of course you can use a command as well, but if you were making a command just to listen for user input, you don't have to do that anymore
Amazing. Thank you very much
it is never wrong to try
only the ones who try can succeed
That's true. I applied with the assumption I wouldn't make it lol
How can I drop multiple Items without them flying away but still stack?
dropItemNaturally() and setVelocity(new Vector(0,0,0)) doesnt work, since they won't stack
dropItem()
you want to make them fall right down?
doesn't matter actually
just wanna make a simple bedwars spawner tho
can't be that difficult xd
LOL I have that exact method here
ohhh
would you mind helping me? :c that issue is so stupid, it can't be that hard xd
I can tell you that this should work
weird
now do you mind telling what "isn't working"?
they won't stack
do they have same nbt?
how do you share code in dc?
only mine yeah
but they don't block anything like stacking items
thats not what i wanted to do sorry haha
ItemStack itemStack = new ItemBuilder(Material.GOLD_INGOT)
.setDisplayName("§6Gold")
.build();
Item dropped = Objects.requireNonNull(current.getWorld()).dropItem(current.clone().add(0.05, 1.2, 0.05), itemStack);
dropped.setVelocity(dropped.getVelocity().zero());
dropped.setItemStack(itemStack);
dropped.setVelocity(new Vector(0, 0, 0));
dropped.setUnlimitedLifetime(true);```
ahhhh thank s
but i don't think that affects the stacking procesS?
but that is certainly not the problem
yeah i suppose
server settings maybe?
everything else just stacks normally
they stack in my inventory tho and also when i Drop them manually as a player
they only wouldnt stack if they are not the same itemstack
what is the ItemBuilder (just wondering)
is that the entire code?
ohh something I've coded 5 years ago, just the most basic and average thingy
for the Itemstack? Yesy
for the dropped item
do you only see 1 line?
try simplifying the logic/item creation process until it's just dropItem(new ItemStack(Material.GOLD)) and see which part when removed causes it to behave as expected
at face value what you're doing should work
what if you try creating an ItemStack using normal method e.g.
ItemStack stack = new ItemStack(Material.BARRIER);
world.dropItem(Location, stack);
but since it doesn't, you need to get your hands dirty
i.e. fuck with it until it works
my first suspect would be your itembuilder, but try it and see
yes I agree
perhaps post it here
the only thing that the builder can do is to change some meta/nbt randomly
but then it wouldn't make sense that he can stack it in his inventory
if it's the same item coming from the same builder
i don't think so because I create that Item once and use it over and over again
either way, give it to us so we can debug this through
Idk why they wouldn't stack then
?paste
ItemBuilder?
si
have you tried this
not yet
try it
and make sure to reload/restart the server!!!
don't haha on it. my last 5h of debugging was because i forgot to use the other constructor of my object and was wondering why it was still the old logic
i. was. in. pain.
it works
only thing i changed was to use clone() on that itemstack and remove that second Velocity and the unlimitedlifetime
could it be the unlimitedlifetime then
possibly
i dont know how it would affect the stacking
i probably don't wanna know tho xd
thanks guys x3
.clone is also convenient in a lot of cases you wouldn't thought
never used it before actually
How can I prevent my snowball projectiles from catching fire?
I tried the entity combusts event, and tried cancelling it but that didnt work, so I tried setting fire ticks to 0 during the event but that didnt change anything either
you could also try setting the duration in the event to 0
not sure if that event is even called for projectiles
yeah me neither
Probably a dumb question, but with getCategory being deprecated would someone be able to provide me an example of what they meant by using tags to identify whether an entity is undead or not?
And no, I'd really prefer not to evaluate against a manually created list of undead entities since I'd like it to update with the game and what the game identifies as undead
scoreboardtag probably? not sure
bit jank but https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Tag.html#ENTITY_TYPES_SENSITIVE_TO_SMITE ?
declaration: package: org.bukkit, interface: Tag
Tried that and it returned nothing
I also tried using namespacedkey to see if that's what they meant, but no
Don't see any UNDEAD grouping or how to get it from an entity
get the entity type and see if the tag includes that entity
and smite works against all "undead" mobs
oh ic I didn't know that
thought it might've been monsters in general
something like Tag.ENTITY_TYPES_SENSITIVE_TO_SMITE.isTagged(entity.getType())
Thanks I got it
Works perfectly
https://pastebin.com/jY8fr9Xr
players without op cant open inventory
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.
Oh no abusing the inventory holder api
Anyways the code you sent doesn't seem to be the cause of your issue
?gui
why is it bad?
It is
But changing the fire duration inside the event doesnt change it
And neither does cancelling the event
Hey guys I've written a few premium plugins that i sell on another website but I'm thinking of adding and selling them on spigot as well! However, I use an obfuscator (present in the allowed list). I was just wondering what the proper process of adding a new premium obfuscated resource. (I meet all requirements to uploading one)
You're using the api in a way which is not intended
I think you just have to state which obfuscator you use and any flags used so it can be reviewed properly.
it depends on whether you're on paper or spigot, in spigot it is bad on paper it is the inteded way to do GUIs
i saw this example in paper docs and also some spigot threads, so i can easily check in which inventory click event is present
paper has modified it to make holders not as bad to use
yeah but people don't like hacky ways here
im on paper actually, maybe problem in this?
?whereami
if you're on paper it is fine, but that's also a reason to ask for support on their server instead
we've recommending you to switch code that is perfectly fine on their platform
i just dont thought that it can be a problem
anyways, i'm a proud InventoryHolder user on spigot myself
that isn't something to be proud of, you're making the performance of your users worse by doing that
i have no users, i'm aware of the inventory copying on update lol
the reason it is bad is because getting the holder of inventories which are backed by a block will create block state snapshots, which isn't a free operation. Paper fixed this by making the getHolder method have a boolean as to whether it requires the block state snapshot or not
would be dope if i could find a guide for how they want it
anyways, we're striving away from the original issue
so, doing this:
@EventHandler
public void onClick(InventoryOpenEvent event) {
// this below is bad on spigot because it'll create block state snapshots
if (event.getInventory().getHolder() instanceof MyCustomHolder holder)
// meanwhile in Paper, you can get away with it by doing this:
if (event.getInventory().getHolder(false) instanceof MyCustomHolder holder)
// however this overload doesn't exist on Spigot so you'd be making your plugin incompatible
}
it's most likely not the inventory, but where it is opened
no, i dont know why, but PlayerInteractEvent not working with no op players
so it's the interaction with the inventory, not that it does not open for them?
no, it should open inventory if u shift + right click on block
if i op myself all is working
i have 0 permissions on plugin
can you show us the full context please? your interaction event and stuff?
ok
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.
i dont really know what to show u bc its just simple event
logger not showing in console if im not op, if im it shows
i disabled another PlayerInteractEvent's but no result
does any other interact event cancel if the player is not op?
because the code you provided looks perfectly fine and should work as long as all conditions are met
problem that event not even triggered
do you have worldguard or something
because logger stays in the first play
there might be a region flag disabling interaction
right, third party plugins could cancel the event from reaching yours
have only coreprotect, protocollib and skinsrestorer
coreprotect is a rollback plugin, shouldn't be the issue
i will check another events
@native bramble try in a clean server
put just your plugin and try it out, that way we can rule out it being other plugins interfering
if the log isn't being reached at all, it could also be the listener not being registered, make sure to register it properly
well, it has to be registered, since he gets the log message, when he is op, as he said
so i bet there is some other event preventing the current handler from being reached if he is not op
lol some other playerinteractevents also not working
on new server all works fine
what it can be?
well, it might just be a plugin interfering then, try putting coreprotect in, with the same config and all and see if that interferes
or remove coreprotect from the other server and check, either way works
working with coreprotect
maybe i need to review my plugin, like i have some trash code that brokes the server?
well, that I can't know but it is weird that it works fine on a clean server
you could check all the player interact event listeners
Arrays.stream(PlayerInteractEvent.getHandlerList().getRegisteredListeners())
.map(listener -> String.format(
"[%s] %s - %s",
listener.getPlugin().getName(),
listener.getListener().getClass().getSimpleName(),
listener.getPriority().name()
))
.forEach(log -> MyPlugin.logger().info(log));
log this somewhere and check each class
uhh
so guys i making a dropkicking move
are we able to change the player pose
im gonna use it in the dropkicking
depends on what you mean by pose
i dont think theres an API way to do it but you can send packets to make the player look like they're sleeping or crawling for example
sleep pose.
take a look at this packet https://minecraft.wiki/w/Java_Edition_protocol/Packets#Set_Entity_Metadata
you're gonna need NMS or a lib like protocollib or packet events to actually send the packet
but index 21 is the pose of the entity, which you can set to 2 for sleeping
alternatively, you can use libsdisguises to eliminate any protocol/nms dependency by creating a disguise from the player, setting setSleeping to true, and briefly applying it to the player
this is a bit more involved than just sending a packet, but it offloads maintenance to someone else, which is nice
if you're gonna use nms, then just use the setPose method on nms.Entity
that method hasn't changed in ages so it'd be fine to do it reflectively
if you're using paper then there's is an API method for it, Entity#setPose
oh i didn't even know that existed
good to know
people really need to stop looking at the protocol page when using protocollib
but the plugin name doesn't help
someone should make mappings.dev but for the different packet names these libraries use
loool
Does anyone know how to read the data from CustomClickAction from the new dialogs? (does it call an event?)
Yes there's an event
declaration: package: org.bukkit.event.player, class: PlayerCustomClickEvent
🙏
\o Does Minecraft (I guess API) have any limit for downloading a texture ?
I wanna know if I should implement some limiting or if I can just spam the thing
For record, I have all URLs already "downloaded" I would just need to download the textures themselves
For skulls?
well I already have the URL from skulls but I need to download the textures in bulk
In my own program for other purposes
i have never come across a rate limit
Does Bukkit#getVersion work reliably for detecting the NMS versions across paper and most other forks, specifically if they all include the part (MC: 1.x.x), in spigot it seems to work fine.
Mojang has an API limit on profile lookups if that’s what ur asking too
nope, specifically only downloading the textures
I know about the profile lookup limit
Hi;, found a weird bug i'm not sure how to even fix... I'm using the InventoryClickEvent to do gui stuff, and at some point i do player.closeInventory(), to close the gui (logic, right?).
I also got a InventoryCloseEvent that checks if the user forgot an item in the gui, to try and give it back or drop it in the world.
Here's the weird part, i send a debug log once i clicked on the item to close the gui, before i even call the actual player.closeinv..., and for some reason, before i even CALL the player.closeinv, i got another debug log from the InventoryCloseEvent, how??
//InvClickEvent
if(clicked.equals(iu.exitbarrieritem())){
plugin.getLogger().info("check1");
p.closeInventory()
//InvCloseEvent
plugin.getLogger().info("check5");
//Console
[Pluginname] check5
[Pluginname] check1
I already tried to delay it using runtask and runTaskLater 1L, same result. Anyone got an idea?
Most likely a temporal rift in your cpu
Throw an exception and check out the stack trace, see what is invoking the method
It could possibly be something external
i mean it's really as basic as that, but sure i'll see what a trace can show up, thanks for the idea
after doing a thread.getStackTrace, all i got is that my InvCloseEvent is indeed called before i even call player.closeInventory
InterfaceListener.onInvClose(InterfaceListener.java:262) is called before :
InterfaceListener.onGuiClick(InterfaceListener.java:66)
Smells like you have something else that is closing the gui
Bukkit.getScheduler().runTask(plugin, () -> p.closeInventory());
it's litterally the only closeInventory i got in the ENTIRE code
so i don't think it's that, unfortunately
oh that is interesting, this should run a tick later in that case :D
Thread.dumpStack() hater
like i said, even using that, the InvClose event is called before, no idea why
i'm gonna start putting getLogger.info after every single line of code, i'm bound to have the good one xd
And if you remove that close inventory call ? :D
bruh
lmfao
gonna start using that
I had some util method that does this but in a shittier way I think :D
whoof this is code is now mine, thanks lol
ok so you were right, something else IS closing the inv
only problem is that i don't have a single player.closeinventory in the entire code
- is your testing server running any other plugins ?
- are you restarting the server when testing the changes ? /reload should not be used!
holy fuck your right
well, if something else is closing the inventory, it will pop up in the thread stack dump
I feel like player.closeInventory just tells the client to close the inventory and then the client send info about that to client
so the info about who truly closed the inventory may be lost
yeah but it still would show what plugin called the player.closeinventory in the first place, no?
if the thing works as I described, then no
well fuck xd
yup, it works completely fine now
well fuck, if you use a barrier to close your gui's, be sure to check for it AFTER checking it's indeed your own inventory gui xd
I have set up a Minecraft server with 4 different gamemodes:
Each gamemode has its own world with a dedicated spawn point, and I want to keep it that way. However, I want to add multiple worlds under each gamemode. For example, under Skyblock, I have additional worlds like Skymining, Skycombat, Skywoodcutting, Skyfishing, and Skyfarming.
My goal is that when players type the command /spawn in any of these related worlds, they are teleported to the correct spawn point for that gamemode (e.g., the main Skyblock spawn), no matter which of the sub-worlds they are in.
Currently, only Skyblock has multiple worlds set up as sub-worlds, since the server is still under development. The server version is 1.21.4.
I’m looking for a way to configure or use plugins so that /spawn works consistently and directs players to the proper spawn location depending on which gamemode/world group they are in.
closeInventory closes the inventory on the server side and that triggers the event, it sends a packet to the client to exit the menu, but the client does not signal the server back
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/nms-patches/net/minecraft/server/level/EntityPlayer.patch#893-895
would be nice to see what that stack trace looked like
[13:58:35] [Server thread/INFO]: [EnchantingEX] [java.base/java.lang.Thread.getStackTrace(Thread.java:2451), EnchantingEX-1.0-SNAPSHOT.jar//fr.infinitystudios.enchantingEX.Listeners.InterfaceListener.onGuiClick(InterfaceListener.java:66), co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80), org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70), io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54), io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131), org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628), net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3208), net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:69), net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:14), net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:29),
net.minecraft.server.TickTask.run(TickTask.java:18), net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:155), net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24), net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1448), net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:176), net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:129), net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1428), net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1422), net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:139), net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1379), net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1387), net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1264), net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:310), java.base/java.lang.Thread.run(Thread.java:1583)]
here, not sure if that's what you want, but that's what i was getting
that's not in an inventory close event tho?
?paste
that as well pls
lol i can't use it, "error adding document"
ohoh
i was doing a plugin.getlogger on a Thread.currentThread().getStackTrace()
Sorry if i messed it up 😅
just call Thread.dumpStack() lol
anyway, other plugin was interfering, problem is solved
Does that mean if I have a manipulated client I can ignore that packet and keep the inventory open to take items out? Or is that inventory instance destroyed on the serverside in a way that trying to take out items causes errors?