#help-development
1 messages ยท Page 607 of 1
i would love if that existed but i wouldnt use it enough to make it
If you press F3 and look at the top left side on 3rd line, there is your server name (eg. "Paper" server), you can modify these with packets? but how?

Look at this https://www.spigotmc.org/resources/f3name-edit-your-server-brand-in-debug-screen.58997/
Can someone explain why "owner" is null?
public class CustomPet extends Sheep {
private final Player owner;
public CustomPet(Player owner) {
super(EntityType.SHEEP, ((CraftWorld) Bukkit.getWorld("world")).getHandle());
this.owner = owner;
Location spawnLocation = owner.getLocation();
this.setPos(spawnLocation.getX(), spawnLocation.getY(), spawnLocation.getZ());
}
@Override
protected void registerGoals() {
System.out.println(owner);
this.goalSelector.addGoal(1, new TestGoal(this, owner));
}
}```
you could modify your server software
You probably gave it a null value
I also output the owner in the constructor and it was not null there
or that super call, calls the register goal
That's actually a good idea, so I gotta build my paper jar?
I mean
But if I do that, then I'll be stuck at the same version and will have to rebuild the jar each time there is a new major update
yea
yeah that's the downside
this only makes sense if you actively think of maintaining a fork
whats the default volume and pitch of a sound being played
which, easier than you'd think, paper has some pretty great tooling in place for that
cuz you passed a null player
yeah it does but how can i fix that issue
no the super call is the problem it calls registerGoals
I'm guessing that should be it? player.sendPluginMessage(plugin, .....);
github.com/zubiden/F3Name/blob/master/src/main/java/ua/coolboy/f3name/bukkit/packet/ReflectionPayloadPacket.java
but i dont know how to fix that
yea
Try leaving register goals empty and then adding the goal after the super call when owner is set
Not sure if goals are locked in some way
but you can try
okok
In Java, how can i have a class with a superclass, where a function init of the child class is automatically called after the parent and child constructors are finished?
I do not want to explicitly call it in the child constructor. Instead, the parent should somehow call it, so that whoever writes another child class for my ParentClass doesn't have to remember that he must call that function himself.
In this init function i want to be able to use class variables and variables that were assigned in the child constructor:
public class ChildClass extends ParentClass {
private byte WHITE = MapPalette.matchColor(255, 255, 255);
private byte BLACK = MapPalette.matchColor(0, 0, 0);
BufferedImage defaultButton;
public ChildClass(Player player, ItemStack map) {
super(player, map);
try {
defaultButton = ImageIO.read(Objects.requireNonNull(this.getClass().getResourceAsStream("/images/DefaultButton.png")));
} catch (IOException e) {
e.printStackTrace();
}
}
@Override
protected void init() {
// I want to be able to use BLACK, WHITE and defaultButton in here. This init function should be called after the constructors are finished.
}
}
How can i achieve that?
i tried making a setup function that is called before the init function, where you can put the stuff that is now in the constructor. But in Java, these lines in the class head
private byte WHITE = MapPalette.matchColor(255, 255, 255);
private byte BLACK = MapPalette.matchColor(0, 0, 0);
will only be called AFTER the parent constructor is finished. So when i call setup() in the parent constructor, that doesnt work.
a parent class can not access fields in a child class unless explicitly passed to the parent
The parent doesnt need to access the child fields
yeah that works
do you know how to clear standard goals
ok
what fields of the child class would the parent class need? i dont rlly get your point
Maybe you misunderstood the question?
The parent has no knowledge of your init method as that is only in the child class
you see the @Override?
the init method is also in the ParentClass
its an abstract method
I didn;t
xD
So, in short: I want to call a function of my child class after the child constructor (and parent constructor) is finished. Without explicitly calling it in the child constructor.
yeah not going to happen
Or after the parent constructor is finished. I wouldnt mind not even having a child constructor
if you call it in the parent it will run before your child finishes
but that doesnt work either, because this
private byte WHITE = MapPalette.matchColor(255, 255, 255);
private byte BLACK = MapPalette.matchColor(0, 0, 0);
is only called after parent finished
if you don;t want to call it in yoru child it will never be called
When I just leave the method empty, I get an error:
net.minecraft.ReportedException: Ticking entity
at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1317) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:388) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1200) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1017) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.ai.goal.PathfinderGoalEatTile.h()" because "this.bY" is null
at net.minecraft.world.entity.animal.EntitySheep.U(EntitySheep.java:137) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
...```
is there no way to do it? I heard spring has some @PostConstruct annotation, so how the frick did they implement that then?
there must be a way
why are you so insistant you don;t want to put init() in your child constructor?
because i make this for other people, and they might forgot to put init in the child constructor
i want to make it as simple to use as possible
i wouldnt mind using reflections and stuff, if theres a way doing it with that?
and just have them put the stuff in the child constructor?
yea, that works ig
yes, if you can;t trust them to call an init() at teh end of the construtor

?jd-s
?whereami
there is spiget (https://spiget.org/)
Also spigot api is opensource afaik
Thanks
wasting some time when I'm updating the same plugin on multiple marketplaces
so I would be good if I automate this process
I don'T think there is upload apis
Really?
I mean, spigot doesn't maintain that product
its a third party app running that does not seem to have that function
Bingo ๐๐ผ could probably get one would just need to pay someone to make it properly
Will check if the same problem is with other marketplaces
how can i convert player to livingentity
It's not in an xenforo thing
Xeneforo 1 specifically
Still don't know why so many marketplaces choose xenforo
you could get a lot more benefits if making your own
Yes but that takes a lot of time
Spigot ๐ isn't ๐ a ๐ market ๐ place ๐
How is it called?
Website for plugins?
yeah but I need net.minecraft.world.entity.LivingEntity (org.bukkit.entity.Player extends org.bukkit.entity.LivingEntity)
I see
Youโll need to convert to the NMS player then
((CraftPlayer)yourplayer).getHandle
How do I get the nms player
spigot website is not a marketplace. It's more of a resource hub for minecraft server administrators, plugin creators, etc..
Trhna figure out how to say this you did better than me so ^^^^^
lol xD
is there a mob goal that kills an entity only when it is attacked (similar to the iron golem)?
Is there a free weather API?
I'm synchronizing the time and weather with the minecraft world
I mean weather from the real world?
Yeah
I assume there are probably more then enough free weather apis ahahagag
I doubt, maybe google maps api has sth, but else I highly highly doubt its gonna be free
yeah a lot of them are free but they require registration and all of that bullshit xd
Simple and fast and free weather API from OpenWeatherMap you have access to current weather data, hourly, 5- and 16-day forecasts. Historical weather data for 40 years back for any coordinate. Weather maps, UV Index, air pollution
and historical data
Yea but that isnโt a problem?
"subscribe"
As long as it does not cost?
Open-Source โ๏ธ๏ธ๏ธ Weather API with free access for non-commercial use. No API Key required โ . Accurate weather forecasts for any location. Open-Meteo provides high-resolution open data ranging from 1 to 11 kilometers from national weather services. With a user-friendly JSON API, integrating weather data has never been ea...
Make your server start a game of Pokรฉmon go and then read the weather from there
Oh look there, goksi found it
I'll have to contact them I guess? xD for the commercial licence
thanks
XD
I haven't played that game in so long
A plugin that syncs to real world time and weather would actually be kinda neat
Yeah
I've found a better API lucky me https://www.weatherapi.com
WeatherAPI.com free weather API and weather data and Geolocation API (JSON and XML) for hourly, daily and 15 min interval weather, historical data, bulk request, astronomy, sports and much more.
1 million per month
I imagine making it public would be hard
Unless you paid or you made users set up their own account
Yeah I'll probably use it for myself
my server
But I could make it public too but that would require me to think through how api calls are going to happen and when
I wish I had the money to throw at premium API keys for random stuff
What if someone is in a different timezone and always play in the day or at then night?
I was thinking about doing something akin to weather formations
Could make a lot of cool plugins with that
Then F for them
:p
Regional rain and whatnot for funsies
It was per biome
so basically they will always have night or day.
The one I sent Is oss, so you can probably selfhost it if you plan to use commercially
Depends on the time of day they play
and would be unplayable
Just float some numbers across the map in a shape and anyone in those x,z coordinates get rain
I said it was a neat idea, not necissarily a good one :p
You could instead just make days much longer
say x10 to go from 20min -> 200min
There is always a workaround
mhm
The only thing about syncing to real world weather is that MC doesn't have many options
sun, rain, storm, snow
No fog or wind
I think you may be able to do fog in new versions
Since fog is controlled by the server view distance now
Yeah
how to set the player exp level directly without repeat x: setPlayerExp(1.0);
im not using skript its just for showing what i mean
iirc player.setLevel
Was abt to type that
player.setLevel(expLevel);
player.setExp(0); // "0" xp at expLevel
iirc? wdym by that
if I recall correctly
oh ok
whats the diff?
in the annotation locations? First and last accept null as an arg, second return can be null
ah nah i mean the top and bottom setters
one is an OfflinePlayer, second is a PlayerProfile. You can create a PlayerProfile without needing an OfflinePlayer
The profile version is for using custom textures
Then yeah offline player is fine
wait will this throw some exception if the getter returns null?
or the SkullMeta will be just null
It will be null
epic
pls send more code
no i need to code that
every pixel that is perfect red
changes to a colour that it needs
I cant tell why
yes im all ready doing it
At work I just made this overlay system
damn you are so much better at coding than I am
bois my ChunkGenerator#generateCaves(...) isn't called
all the other stages are, noise, surface, bedrock, ...
i've cloned MultiverseCore and for some reason i can't get intellij to properly index the project, inspection is disabled even though sdk is defined, and due to that the files are just seen as .java files, no separation between classes, interfaces, etc
anybody knows what this could have been caused by?
I hope you're being sarcastic
im not
I have been coding for only 1 year
u look like 5+
i have a year in coding, technically on like 8 months and mines decent
Guys I have this code right
I call berginscoreboards from somewhere else then it just loops until running doesn't return true
Works great on my server
But I put it on another server and it just doesn't run at all
The only difference between them is that my server is 1.19.4 and the other server is 1.20.1
diminishing returns ยฏ_(ใ)_/ยฏ
Add debug lines until you figure the problem
?conventions ;/
i've technically been coding since i was eight (well if we don't count Scratch then since ten lmao) and i can tell you i don't know shit
some people with 2 years of coding experience are better than those with 5 years
it depends on the person
There's always more to learn
true
aaa
that makes sensse
meta is PotionMeta
how to check if color is red
help me
wait so meta.getColor().asRGB() returns like this
23 50 231
no I want to check if
color
is red
byte color = bytes[y2 * image.getWidth((ImageObserver)null) + x2];
this
convert it to a awt color or a hex then
how to convert byte to awt color
have you considered using google
Ok I will google
you can use the and operation
(perform a bitwise and operation with byte value to remove the sign extension -> obtain the corresponding position integer value)
int byteValue = 123; // eg. byte value
int intValue = byteValue & 0xFF;
0xFF is a hexadecimal representation of the decimal value 255. its frequently used to work with bytes or integers when working with binary data/bitwise operations.
0x00000000 is just 0
ok so i want to spawn a display text and push it but display entities dont tick so i cant do that, i tried making it ride an armor stand and pushing that instead but the display text is positioned in the armor stand's head and i need it to be on the ground, what could i do?
Mythic mobs is a god send
Invisible, invincible and aome sort of -1 block offset?
display entities do have the translation but the issue is that when using the center billboard it follows the player's pivot in a weird way
Or be big brain and disguise as am invisible silver fish
oh man
Lmao
Lmao good luck in ur bodge job journey
i mean in my code
?paste the whole error and class
can you send the class on a seperate paste, so line numbers match up
ur error isnt an issue with the command, its an issue in ClassRegistrationController
line 48
if possible
its issue is the constructor, im guessing its trying to make a new instance of the sub class too
could probably just add a blank constructor, or just make the runnable a different class in a different package
It would just be invisible I assume
hi coll
?paste
I am getting an error when trying to send this packet on a 1.19.2 spigot plugin. https://paste.md-5.net/lokudewacu.cpp
Anyone know how I can stop this error and make it work?
This is the error I get:
you have a 1.19.1 dep for 1.19.4 paper
1.19.2 probably used revision 2
Oh, sorry, yeah, it is .4
Which was revision 3 I think lol
how do I make it 1.19.4
change the dep
Update your imports
yea I tried doing this and its not working
did you run buildtools for it
I tried changing 1.19.2 to 1.19.4 on here but it didnt work
I did use buildtools
should I do buildtools 1.19.4 again?
you havea a 1.19.2 nms dep for 1.19.4
do I just needa do buildtools again as 1.19.4?
have you ran it once before?
Run buildtools for 1.19.4, yes
And make sure to use the remapped flag if you are using that
Hey i want to have a player click a specific Item and then open a sign interface where the user can type some stuff into it
How do I open such an interface?
I already got a PacketListener to achieve reading this stuff. How can I open such a inventory
hii , is there a way to prevent an arrow from colliding with players? its an arrow used to just hit blocks , and i need it to not damage or interact with players at all. is that possible or should i just go for a raycast and do it that way
Yeah there is
kinda forgot to say.. what is the method to do so?
ProjectileHitEvent is what you're after
would i just check if the arrow hit the player , then cancel it if it is?
You have to check if event.getEntity() is an Arrow, and if it is,
then check if the shooter is a Player, and so on
yeye ik , but if i cancel the hit event , will it keep going until it goes through the player?
or will it bounce off/get stuck
I'm not sure, but you can get the arrow and still manually remove it, right after you cancel the event
If the event is cancelled the arrow will bounce back yeah
oh okay
You can remove the arrow manually right after you cancel the event with arrow.remove()
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Entity.html#remove()
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Arrow.html
declaration: package: org.bukkit.entity, interface: Arrow
declaration: package: org.bukkit.entity, interface: Entity
when i use gradle to initialize a project should i choose "basic" or "gradle plugin"?
basic
alr, thanks
I think
gradle plugin is most likely for making gradle plugnis
ah okey
gradle plugin is for when you want to develop a gradle plugin itself, rather than a project that uses gradle as a build tool
oh i see
also is it fine to copy the build.gradle listed in the wiki guides? there is no docs for cli setup so im trying to set it up from there
(and changing the version of spigot, of course)
generally its fine, depends on your needs..
alright, thanks
which one do you mean?
looks fine
hm alright
have you used gradle before? because for spigot plugins, maven is a lot easier once you'll need NMS
i have used it in android app development
alrighty
but nothign really advanced
like basic apps like stuff that gets apis and lists responses, or just copies of websites
i make
my suggestion is to always use maven when doing spigot stuff, imho it's much easier, and if you ever need NMS some day, there's only an official maven plugin, but no official one for gradle
but if you already know gradle a bit and don't need NMS, then gradle is fine too
alr, thanks
In a ServerBoundPlayerDigThingy packet is there a way to tell if they break a block because it has the action as FINISHED_DIGGING when it breaks but when u instabreak the block with haste / efficiency it only sends the start digging thing
do you mean it doesn't open at all, or it closes after one tick or sth?
how are you opening it? what does register() do / how does Menu.java look like?
btw, is your spigot archetype fine to use? last update was 6 months ago so im not sure if its outdated or not
yeah it works fine, just the additional dependencies might be a bit outdated
alr
is there a way to know when a player has the click hold, and when he releases it?
(out of containers, just with his bare hand in the air)
no
listen for the click event and check if the player's y level is lower than -64
what's the event?
?javadocs
PlayerInteractEvent -> check if action is RIGHT_CLICK_AIR
shush
fuck off
rule 1. don't give bad advice
sorry
what is the difference between Server.getWorld(string) and Bukkit.getWorld(string). They both seem to have the same use, but what's the difference?
Bukkit.getWorld is a static accessor. Server#getWorld is an instanced
ah, i see
tl;dr it's the same
Bukkit.XY is mostly just calling Server#XY
Is there a way to bypass the excessive velo of an entity
'Excessive velocity set detected: tried to set velocity of entity #114 to (54.3273305427885,-22.52995691759456,29.93445357690365).'
why would you want to give an entity a speed of >1k blocks/s in the first place
After I waited for my turn and carefully listened what you said, and with me being certain that I can speak for others as well, I greatly appreciate your post and I hope that you will do equally well in the future!
You just broke rule 2. :(
Pretty sure they removed that warning from the newer versions
I think the limit was 10? Just max it at that before you set it
cries in 1.8
It's 4 not 10
whenever i use a class from spigot
- my code editor gives me errors saying that "org.bukkit.x" does not exist
- when i run mvn package, i get errors saying "cannot find symbol" for every spigot class/type/method i use.
i barely even wrote any code, the only thing i did was create a new server instance, get the configuration file using getConfig and get the world from the server instance... this is my code https://github.com/SupaSibs/chest-randomiser
i used mfnalex's archetype to set up spigot plugin fyi
Cursed Java
i think the > and ? are swapped...
Hello, I'm trying to run the plugin directly in the RAM memory, and I succeeded. However, the getResource function is not working properly, and I can't access anything. When I try to return the directory where it's located, it returns /tmp/<plugin_name>. Is there any way to access the resource through this directory and load the configuration in the root folder where the plugins are located, and so on?
oh wait that's the joke
wait what why is it a warning not an error
WHA
but it looks wrong
lol
its basically
if(health > 2048){
setHealth(2048);
} else {
setHealth(health);
}
getDataFolder() >>> /tmp/<plugin_name>
wth
whenever i use a class from spigot
- my code editor gives me errors saying that "org.bukkit.x" does not exist
- when i run mvn package, i get errors saying "cannot find symbol" for every spigot class/type/method i use.
i barely even wrote any code, the only thing i did was create a new server instance, get the configuration file using getConfig and get the world from the server instance... this is my code https://github.com/SupaSibs/chest-randomiser
i used mfnalex's archetype to set up spigot plugin fyi
You dont have spigot in ur .m2
he's depending on the api which should be automatically resolved
oh i forgot to run mvn install lol
im big dummy
hold on wut the mvn install is giving me the same error
have you install maven correctly
ok one sec
How do I make a magic wand that throws bone meal when I click the left mouse button
I mean i saw this thing but i dont really know how to use it
just started learning
yes
Ok, theres an event "PlayerInteractEvent"
It returns the type
check if the even is rightclick block
thne check if the player is holding the wand
then get the block
3.6.3, same thing as i wgetted
Gib error, when you try mvn clean install
i have already made a wand that explodes target blocks
alr
but i dont know what to use for bonemealing
get the blockstate
and you should be able to set it to be grown
for trees youd need the following
declaration: package: org.bukkit.event.world, class: StructureGrowEvent
i am trying to make it just simple bonemealing like making flowers and grass
?paste
i used mfnalex's archetype to generate the project btw
what
well the thing i assigned related to bukkit is the version which i chose 1.20.1
like this....?
try putting the following in the dependency instead of the one already there
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
so what do i do with it....?
but you should be able to edit it now
I'd guess that it suggests you to use Math.min
idk if im dyslexic but it says 1.20.r0.1
how do big servers handle time shown in f.e. scoreboards? Is it based on player's timezone? Or is it based on the server timezone?
and how would one get the players timezone?
You don't need nms
You can get with default spigot?
But yes technically you could use ip to estimate the users timezone
Or you could ask them
Have fun with that though, timezones are wack
API's that does that for you are almost always wrong
Gl finding timezone of someone geolocated in Russia
Yes
Yeah, Russia have 12 timezones
You need reasonable accuracy
Guy in germany randomly has US timezone
the thing behind is that we most likely want the ingame time to be the same as the real life time. But that means if f.e. our server is located in germany it will almost alwasy be night for the american players who join in the afternoon
guy in france has same timezone as brazil
guy in britian has same timezone as newfoundland
What are you talking about
colonial empires led to timezones not working for many nations
britian and france still have many random islands
and france has french guiana
oh yeah
I ate ur butter
something like this..?
i dont really know how to use it
i mean i tried
but ya
Just get the block and call applyBonemeal
The face shouldnโt really matter, just use up
that is what i was about to ask
how do i exactly write the face
yep
lets go just tested it works! Thanks!
hey I am receiving an out of bounds exception if I want to read out the lines of a sign with a UPDATE SIGN packet
event.getPacket().getStringArrays().getValues().get(0)
Does anyone know a solution?
i just upgraded to latest java and mvn, same issue
exact copypaste of the same error
In a ServerBoundPlayerDigThingy packet is there a way to tell if they break a block because it has the action as FINISHED_DIGGING when it breaks but when u instabreak the block with haste / efficiency it only sends the start digging thing
broooooo f meeeeeee
I mean I know BlockBreakEvent is still fired when Instamining
So there must be some kind of packet
yeah
anyone?
ok ima try tomorrow
getStringArrays and Strings is both 0
why?
My vector launches the mob twoards the playe
on the floor
i want ti to fly up
๐ฆ
declaration: package: org.bukkit.block, interface: Sign
The problem is , that sign is not a real sign
Its for a GUI yk?
It openes an sign ui
you type a name
and i receive it
i think you might need nms
yeah thats why i am frustrated
nms?
net.minecraft.server
wdym by that?
hear
its kinda old
but it should explain
nope i dont fully understand i am sry
Ah
found my solution
This wont work....one class is not avalible anymore
Because sign GUIs are meant to be attached to a sign
So when they arenโt thing are a bit weird
Also signs got a big change in 1.20 which means itโs a bit of uncharted territory atm
I am using 1.8.8
๐
yeah i want to programm a minigame and I want 1.8 PVP like Hypixel
ye
ur gna have to use packets
idk why
but i just have a hate for packets
Theres nothing wrong with them
i just dont like them
My entire console rn:
[00:06:21 WARN]: Excessive velocity set detected: tried to set velocity of entity #172 to (0.7911693290430605,6.0,0.611597165445977).
[00:06:21 WARN]: java.lang.Exception: Stack trace
[00:06:21 WARN]: at java.base/java.lang.Thread.dumpStack(Thread.java:2282)
[00:06:21 WARN]: at org.bukkit.craftbukkit.v1_8_R3.entity.CraftEntity.setVelocity(CraftEntity.java:213)
[00:06:21 WARN]: at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
[00:06:21 WARN]: at java.base/java.lang.reflect.Method.invoke(Method.java:578)
[00:06:21 WARN]: at co.aikar.commands.RegisteredCommand.invoke(RegisteredCommand.java:152)
[00:06:21 WARN]: at co.aikar.commands.BaseCommand.executeCommand(BaseCommand.java:577)
[00:06:21 WARN]: at co.aikar.commands.BaseCommand.execute(BaseCommand.java:513)
[00:06:21 WARN]: at co.aikar.commands.RootCommand.execute(RootCommand.java:99)
[00:06:21 WARN]: at co.aikar.commands.BukkitRootCommand.execute(BukkitRootCommand.java:81)
[00:06:21 WARN]: at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:146)
[00:06:21 WARN]: at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:666)
[00:06:21 WARN]: at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1189)
[00:06:21 WARN]: at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:1001)
[00:06:21 WARN]: at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45)
[00:06:21 WARN]: at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1)
[00:06:21 WARN]: at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13)
[00:06:21 WARN]: at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
which one?
I'm trying to place a RUINS structure in my world using the built-in structure classes. However, it looks like none of the structures are being registered? I've tried registering the RUINS structure and viewing the loaded ones, but it's showing an empty map:
Bukkit.getLogger().severe(Bukkit.getStructureManager().getStructures().toString());
Bukkit.getServer().getStructureManager().loadStructure(Structure.TRAIL_RUINS.getKey());
Bukkit.getServer().getStructureManager().loadStructure(Structure.TRAIL_RUINS.getStructureType().getKey());
Bukkit.getLogger().severe(Bukkit.getServer().getStructureManager().getStructures().toString());``` (this prints empty maps)
Therefore, my placing of the structure is failing:
``` Bukkit.getStructureManager().loadStructure(Structure.TRAIL_RUINS.getKey()).place(getCenter(),
true, StructureRotation.NONE, Mirror.NONE, -1, 1, new Random());```
Does anyone have any idea on what I'm doing wrong?
There are ChatTypes, ChatComponents but no Chat
Are you inserting the structures?
also what veresion
Spigot 1.20. When you say insert what do you mean?
declaration: package: org.bukkit.structure, interface: StructureManager
That's whta I'm using yep, though it looks like the bukkit and server StructureManagers don't have the default Minecraft structures loaded by default, and my attempts to load them return a null structure
Ah interesting, now it's loading the rest of the minecraft structures, but the TRAIL_RUINS are not there. Even though that's the one I'm specifically asking it to load:
Bukkit.getStructureManager().loadStructure(Structure.TRAIL_RUINS.getKey(), true);
Bukkit.getLogger().severe(Bukkit.getStructureManager().getStructures().toString());```
Pastebin of structures: https://pastebin.com/7ZQ9gUe4
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.
Actually it looks like it only loaded the village, bastion, and nether fossil structures. I wonder why?
ive got another problem
I saved an Object with the Spigot YML api and now this pops up:
theres nothing there
yeah i cant send my error
just get verified to send screenshots
oh hi mfnalex ๐
LANGUAG
hi
when im trying to put cusotm message when server is stopped in bukkit.yml i use ยง symbol for color codes but when message is displayed i get those smiling face symbols in the text
why is that happening
I am contacting you guys tomorrow
ok
thx for your help anyways
heh
how does ยง turn into ๐
send msg
?paste
you are subtracting a unit vector from a location vector to obtain the direction
yea
I'm making a custom item that's a smoke grenade, and right now I'm suffering from two issues:
-
Through each "cycle" (the particles have to be reimplemented to get the desired duration) the radius gets larger, even though I assign the
smokeRadiusvariable only once. -
If I were to throw more than one grenade at the same time, each grenade's smoke area would alternate with each other. I thought it would be because of variables I assigned outside of the else if statement, but it's not (to my knowledge)
your direction vector is wrong
wdym
remove the normalize
I want to yeet the boss at the player
i can't read spigot docs because cloudflare thinks im a bot
Hey Bedless, I've tried this:
Bukkit.getStructureManager().loadStructure(Structure.TRAIL_RUINS.getStructureType().getKey(),true);
Bukkit.getStructureManager().loadStructure(Structure.TRAIL_RUINS.getKey(), true);
Bukkit.getLogger().info("Structures: " + Bukkit.getStructureManager().getStructures());
But am still just getting an empty map: Structures: {}
do you mean your boss flys upwards?
Probably an issue with using .setY(1)?
he said his boss is helicopter
so most likely it goes upwards
thats what I'm guessing too, but he need to confirm
in the meantime maybe you could help me
Hey, has anybody got any idea how you can make it so that only one player can be in a multiverse world at one given time? Thanks ๐
Definitely because of the .setY(1) maybe try lowering it?
increase teh Y vector towards positive but ny by 1
check if players inworld larger then 1 if not deny
so id go about like 0.5
don;t setY, add to Y by a small positive value
ok
im suffering with using custom message when my server is shutdown/stopped it displays some random smiling emojies https://paste.md-5.net/bolizefuqe.coffeescript any help ?
do i still remove thenormalize?
blyat go to #help-server
no
last value shoudl be 0
do i create a new vector?
new Vector (0,0.1,0)
Who assaulted our usernames
why am i B...
heh
oh
streamer mode
burh
this is what i got now
what speed are you setting?
1
ok, it should now hop 1 block
Hi, could someone help me I try to config dependabot but it doesn't work when I want to update spigot-api. If I understood correctly I have to config maven central for this to work?
add maven dependency for spigot
ex:
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.8.8-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
thats 1.8
It is already the case but as soon as I launch the search for update I have nothing
did you add a repository?
Yeah
THATS PAPER
Itโs a GitHub bot that updates your dependencies
YEE THE CHILD
isn't dependabot that annoying github bot that harrasses you if you use any dependency with a known exploit?
?fork
SpigotMC maintains the Spigot server. If you are using a fork of Spigot (such as Paper, Airplane, Purpur, or other derivative works), you should seek support in the appropriate Discord servers.
Oops i try with paper too
I can;t help with dependabot as I generally ignore it. Exploits are not really a thing for spigot plugins
99.9% of exploits in libraries require direct server access to exploit
I have no error I just don't have the dependabot pull request while with the other dependencies it works
It can't detect if there is an update
quick question there is a mod thats bugging with guis with "softclose", any idea how i would check/detect this dont think its firing the InventoryCloseEvent
This works with all other dependencies except spigot
is that script?
Wdym?
or fabric
Is it some sort of setting or something?
fabric mod used for duping but it bugs with guis
using a softclose but it doesnt fire the InventoryCloseEvent
Not to correct place to ask about fabricmods
Use there api, when a player tries joining a world, check if the player count is higher than 1, if so send them back to world of origin
no, i need to patch it on my server
Thanks
Thanks anyway
Get a player profile
I don;t talk to bots ๐
bro
lol
Wdym
Idk the exact methods to do that
what spigot version?
I canโt even look at documentation
1.19.4
you already know how to create a normal skull I hope
Yes
get teh meta, cast to SkullMeta. That has a setOwner method which takes an OfflinePlayer or a PlayerProfile
the recent documentation will work for you since those methods haven't changed
he can't look at javadocs as Spigotmc thinks he's a bot ๐
probably using a vpn
or he's a talkative bot
but, I don't remember the api docs being behind the cloudflare either o.O
im not
package index
yeah i cant access that either for some reason
it just doesnt load
but its not cloudflare
seems like you might have some kind of connection issues
dns issue then
open a command prompt and /dns flush
ye
flushing dns will force your system to regrab the dns records
command not recognized
yeah
ipconfig /dns flush
ipconfig /flushdns
do a ipconfig ? and find the dns flush
nice
but still not main site
main site is behind cloudflare
yea
may need to reboot to relase all cache
but the api docs are not
yeah cloudflare isn't letting me through
yeah the ip you have must have been flagged by cloudflare at some point
so not much can really be done for that
I need an efficeint way, of making a armorstand follow an entity, should i tp the armour stand or is there a better waay
i may have done lots of webscraping in the past lmfao
Can you modify entity behavior without the entity being an NMS entity..? bees are naturally stupid and just fly off without detecting flowers near them and I gotta lead them to a flower by going to them and holding a flower, then leading them to the flower 5 blocks from their hive ๐
but on different sites
need nms i think
to change the ai
ugh.
tp'ing is really the only way unless you disguise an entity as an armor stand and make use of its AI
yes
Yes
yay, integrated way to make it follow
you will have issues with the riding if the entity goes into water though just fyi
because water causes entities to dismount
can i force cancle the event
yea
i cna just check if water
then start tp
reduce server lag ๐
What the difference between
and
does it even make a difference
there is no difference
the reason that exists is for legacy reasons
how can i send block updates client side only? I know sendBlockChange exists but it seems to be deprecated.
How do i make an armor stand invicible
if its not invisible, the same way you make any other entities invicible
then nothing can kill it except the server if its invisible
cus in spawn command for normal mc, it doesnt make it invicble
good to know
armor stands exist that way to allow holograms ๐
I know because I helped make holograms a permanent thing in MC ๐
but this is why we now have display entities in the most recent versions ๐
nice ๐
HoloAPI right?
Yep
that is the one I helped create and was the first
and then holographic displays came along, was so nice to compete against them and them against us
I wish to become something actually important :[
ultimately holographic displays won out when armor stands came along because HoloAPI required 2-3 devs to maintain, and the other two left and it was such a large project that to do it by myself wasn't really feasible but it accomplished a goal at least and that was to make Holograms popular and it helped do so, so much that Mojang was forced to keep holograms as a feature ๐
you will
wasnt it foss?
Indeed it is
Noice, thanks for the ease now xD
Im still on 1.8
but i appreciat
the work
originally before 1.8 holograms relied on horses for the horse age bug
and when mojang randomly publicly stated they were going to patch that bug, that is when everyone started messaging mojang about holograms were going to be ruined if they do
and so Mojang created the armor stand with the ability to be invisible lol
which is why the Armor stand is an entity
I never expected that something that seemed so minor would become so popular and that I would be part of that lol
Ye, im working on a T5 spider slayer for hypixel sb
Also, holographic displays I think it was a year or two ago finally managed to implement all the features holoapi had
the last feature they managed to get implemented that HoloAPI had was touch holograms ๐
even though it was open source, many couldn't wrap their heads around how it was actually done
Nice
ye
What is the best way to tell if a player is in a specific gui? I want to make sure that no items can be taken from the gui and am currently doing this with a HashSet of players who are in the gui (adding them on open inventory and removing on close) but this doesn't always work
player.geinventoryview
compare the inventory object with the custom inventory object you have
its 1am rn and im writing spigot code
I did not know this was a thing- thank you so much
Story of my life ๐
maybe I should start on a custom implementation lol
wdym?
have 2 different implementations I want to make
well the first one will implement the bukkit api, but the server code would for the most part just be custom except for a few things to maintain vanilla aspects
This is my custom event rn xD
second one, is basically a true self load balancing implementation
second implementation would not be compatible with bukkit plugins, which is fine because it isn't for people who need to rely on such things anyways
What event get triggered when i stab smth with my fist
is it playerinteractatentityevent?
ok
if there is an entity you hit
as a kid i always thought they were the same
Lol, no they are very much different. HoloAPI was probably more advanced and cleaner in implementation then holographic displays even today
get clicked position and then quick maths
a vector of 0 isn't going to go anywhere
do you still work on it
HoloAPI at the moment is defunct. Whenever I decide to update it, it will stay that way unfortunately. But its open source so you are free to fork it etc
might have issues with finding the related dependencies and all that
i use holographicdisplays i think
most of the dependencies can be found between the developers git repos in their code form ๐
or decentholograms
I think what helped propel holoapi to being popular was that all the developers that worked on it
were also Bukkit Dev staff members at the time
including myself ๐
oh
forgor abt u
soz
target.setVelocity(target.getVelocity().setY(10));
wdym
the |
yea
it doesnt like existing
on scoreboard
my guy
target.setVelocity(velocity.multiply(5).setY(10))
seems correct
Im usign the same code
if it doesnt work, then vectors suddenly changed
and i dont think that happens quickly
iam not sure , but i don't think you need to create a new Vector .. not sure but try it anyway
Does anyone have experience placing default structures using the StructureManager? I'm trying this but loadStructure returns a null Structure:
Bukkit.getStructureManager().loadStructure(Structure.TRAIL_RUINS.getKey(), true).place(getCenter(), true, StructureRotation.NONE, Mirror.NONE, -1, 1, new Random());