#help-archived
1 messages Β· Page 205 of 1
maybe check where spigot reads spigot.yml
that will help you
but you will need source code of spigot for this
build tools can help you
or maybe choco when he is online
I'm making a minigame and I'm wondering where is the best place to teleport a player back to their spawn if they die? I've tried PlayerDeathEvent and PlayerRespawnEvent and both do not work. The location exists because they are teleported once the game begins. In PlayerRespawnEvent I added System.out.println(); to verify the code is being reached and it is, however, the player is not teleported upon re-spawning.
first of all you dont know how events work
you can get world's spawnpoint and teleport there
PlayerRespawnEvent will do
and you can always set an option for spawnpoint
both will
you can change location by setLocation in that events
wdym I don't know events?? I created a location and I can teleport players there when the game begins. The problem is when they die I can't use player.teleport(location) again to bring them back to their spawn point.
?paste
I'm getting a 403 error resolving my spigot-api dependency, is it a problem with the server or is it just me?
nvm I'll just go to the link manually
declaration: package: org.bukkit.event.player, class: PlayerRespawnEvent
setRespawnLocation
I'll try that now, but why doesn't teleport work?
ah i was sending right now π¦
:p
if they died
rubber
You can respawn them
and registered the listener
and then teleport
when you respawn they will teleport to default spawn point
so its not what you want
change spawn point of world for one time
or you can set respawnlocation in respawn event everytime...
@frigid ember yes as I stated in OP the event works I added println() statements and the code is reached the player.teleport() isn't working in that event. I'm going to try setRespawnLocation now.
I'm going to try it now give me a sec
note that debugging void method wont help you
yes much
π
I know what System.out.println() is for I added it to see whether or not the player.teleport(location) was being reached or not.. setRespawnLocation worked it was just the fact you can't teleport them on respawn.
does anyone know a plugin to sync the spigot console to the bungee console
setRespawnLocation worked so it works? @unkempt ridge
i didnt understand is it worked but looks like he has a problem
but he probably dont knows how to tell
when he sends we will got it
yes but he isnt sending it
thats the thing
hes just saying idk how to do this and trying this when not learning java/spigot
its her problem π
@fair abyss because i need a command to run on a spigot server that runs a command on a bungee server
the BlockExplodeEvent isn't working for me
@EventHandler
public void onBlockExploded(BlockExplodeEvent bee) {
System.out.println(bee.getBlock());
}
so you dont need syncing ? @ionic hound
looked through the docs @wraith moth ?
i looked no info for tnt
what about the docs?
declaration: package: org.bukkit.event.block, class: BlockExplodeEvent
yea?
entityexplodeevent will work for sure
@fair abyss i just need a command to run a command on bungee from a spigot server
yes it worked, and I don't need you telling me "I'm not trying to learn java/spigot" @frigid ember all I was asking is why the teleport method wasn't working in RespawnEvent which is a valid question.
@ionic hound this means you dont need sync π
yes
i just need to run a commad in spigot and it runs a command on bungee
but great, it works
fuck you just answered same π
i was developed a plugin for that
but you can code your own
it should really simple
or check spigot for this
so is the blockexplode event broken?
i donot know java or spigot @fair abyss
BlockPlacing works
it just turns into entity
ahhhh
and entity is exploding
thanks for clearing that up @fair abyss
so its entity explode event
no
did it print tnt in console?
didn't log anything
@ionic hound i will check google for that
@frigid ember like i said its some interesting π
i was had this "issue" when I started to coding
i have tried command sync but it does not work
cus "Last Update:Dec 18, 2013"
it will abs wont work for sure
i can code for you it will be really ez
but its 3:34 am here
the sun will rise in 2 hours
soo its bad time for you π
you would code a plugin for me
that i could run a command on a spigot server and it would run it on the bungee?
yep
Thankyou so mouch
a simple bungee plugin will help you
so you wont need to install the plugin to all servers
@wraith moth the event is just trash
it doesnt print anthing when tnt explodes
the event doesnt even fire
@fair abyss can we move to a pm ?
cus tnt exploding isn't a block explosing
@ionic hound i can code it when I back home;
i mean when the sun rise i weak up go work back home later than
shouldnt matter kingOf0?
something explodes
should print 1
System.out.println("1");```
yes
but when tnt explodes something explodes
and the event doesnt seem to know something is exploding
"BlockExplodeEvent only fires when the explosion has an unknown source.
If the source is known like when a player explodes a TNT, an EntityExplodeEvent is fired."
val59000
2015
simple google
i just need to run a command through the concle on a spigot server then it runs the command on the bungee
yes?
a boat
so wont i need a plugin on the spigot server to ?
which people still have to be able to use
could you tell me pls
cuz im struggling with that
wate how will a spigot server run it then?
Running commands from the Spigot server console will not execute on a bungee server / bungee plugin.
yes but if you register a command for that in bungee
Nope
and it can run in bungee console
does any1 knows how to make boats invisible when they still have to be able to be used
why?
If you run a bungeecord registered command in the Spigot console (as he is saying) it will not execute at all.
i know that bungee commands are not real command and not work same as spigot commands but it should work from console or player
Player is irrelevant
hello, I am the owner of the server that needs the plugin. I had my admin @ionic hound ask, is anyone able to bring it into a group dm?
Executing a command that is registered in bungeecord from a Spigot console will not execute the command code at all.
how can I check if a block is a glassblock?
@tender quarry hey dude
if(block.getType() == Material.GLASS_BLOCK)
just ask your question here @frigid ember
does any1 knows how to make boats invisible when they still have to be able to be used
are you crazy
Nah
nothing will be happen if you dont write anything
That's not how proxies work
i think evetyone knows that
The proxy intercepts commands from a player which does not relate at all to the console
That's not his question. You are relating something that is not relevant to his question.
so it just means i just have to send the command package to bungee directly from a spigot server
not a big deal
@tender quarry if it was that simple I think I would've found it
or just with plugin messaging
there is no such material "GLASS_BLOCK"
Not if there are no players online
meh
Try GLASS?
i think he wont use when no knows online
there is only BUILDABLE_GLASS whatever the fuck that means
It might only be me, but I like to develop systems that work all the time. Not just in certain circumstances.
@ionic hound
the codebase of bukkit is getting me frustrated
what
will you use it when anybode is online
no
Yes
Depends on the situation dude
no it is just for my server
I am providing the most efficient and correct way to do something. If he choses to use your way because it meets your lower standards, good for him; go for it.
using redis will make it like another plugin
im not here to give extremly best plugins
just use my sql
and plugin messaging isnt the trashest way
my server host does not have redis
why is GLASS not a material type?
when I log the block.getType() on the explode event it prints GLASS but there is no such thing as Material.GLASS
if i was writing a paid plugin and my customer wanted the best, i will write the best.
but in this situtation am just trying to solve his problem for free
is bukkit still in progress?
So....my opinion that I gave was not free? DM for my paypal
i not mean that
@fair abyss I just need it to work
i dont like too "just need to work" idea
i understand
what was your version?
1.15.2
let me try it
i dont know exact what changed in messaging api but it should work in 1.15
note that it wont work when no one is online
that is fine
will it work if the console sends the command?
@fair abyss it does not work
so you will have to wait me like 18 hours
maybe i can forgot to came here
tag me 18 hours later
@wraith moth just look for bukkit servers on google
What API event is triggered when an arrow hits TNT block?
i tried EntityInteractEvent but that doesn't trigger on TNT
Anyone here knows about Ubuntu, dpkg? phpmyadmin? installing packages? im having some issues
sudo apt get install
I know
but
Im having more issues
Im getting this big error message after trying to install mysql-server
There is no arrow land event. Troll? Looks like maybe EntityChangeBlockEvent would work. Im going to test it.
is there a way to get the old 1.14 trading-system in 1.16 back?
Okay, back to testing that one.
Thought you just wanted the arrow hitting the ground. Yeah, the entity change one will work. I'm looking at the call lol
Worth noting that's just for flaming arrows, right?
Else, yes, you would have to listen for a ProjectileHitEvent and ignite it yourself as non-lit arrows do not ignite them and will not call that event
@fair abyss I found the repo, its all good.
The Bukkit team is no more
Spigot maintains Bukkit and CraftBukkit. You're here lol
md_5 is the maintainer, I'm a frequent contributor. If you want to ask questions, you're welcome to
does any one have a plugin that sends players to a server based on permision. I want to have a donar only lobby
er... Choco, https://i.imgur.com/ogOMgXa.png
From the same person I mentioned a couple days ago to you π
Does anyone know how to inflict a potion effect on a player once he is attacked by a certain entity?
EntityDamageByEntityEvent, check damaged and damager type accordingly, LivingEntity#addPotionEffect()
if (event.getEntityType() == EntityType.SPIDER) {
Spider spider = (Spider) event.getEntity();
Player player = (Player) event.getEntity();
if (event.getEntity() instanceof Player) {
if (event.getDamager() instanceof Spider) {
player.addPotionEffect(new PotionEffect(PotionEffectType.POISON, Integer.MAX_VALUE, 3));
this is what I have
Im pretty sure I set everything correctly but it is not working
public void EntityDamage(EntityDamageByEntityEvent event) {
This was above the if statement
does any one have a plugin that sends players to a server based on permision. I want to have a donar only lobby
PeterYeet, you are casting to player before checking if its instanceof player.
Your whole code logic needs fixing. You are casting the same .getEntity() to both spider and player.
@craggy jolt
I tried checking the instance of the player before casting but that still did not work
What should I do instead?
Instances should be before casting
so im getting this error that an event has to be called synchronously
it's a custom event
o
yeah
it's false by default
@craggy jolt
Thank you so much @green cedar it work phenomenally! I greatly appreciate your help dude!
Where can I get support for general server issues?
Two questions:
- What made world#regenerateChunk not possible anymore?
- Is there any way to copy a block exactly along with it state etc?
I need help running a spigot server
I can't get the file
idk how to get buildtools
for what version do u need a spigot.jar file for??
1.8.8
yes?
Damnit im a need to dm u it
ok......
anyone know an entity control plugin
no.
Anyone know how to stop a ExplodeEvent from breaking a block?
Does removing the block from the blockList do it?
yes
Documentation is neat
And reading the question fully before answer is also neat
Jesus Christ hold up
Actually no that might work
got the same question
How would I play a sound? I've been trying for so long and just can't figure it out. :/
World and Player should have sound methods
Don't know the exact name though, probably playSound or something
Player.playSound(Player.getLocation(), Sound.BLOCK_NOTE_BLOCK_PLING, 1F, 0F);
Like that?
Probably
Keep in mind pitch goes from 0.5-2
Don't know which argument there is pitch though
Oh wait playSound is static?
Yeah you need to use your player variable instead, not the Player class
Alright you're welcome
Is it just me or is there no way for me to ignite a TNT Minecart from the API? π€
does anyone know of a plugin that can set players health per world?
I mean... damn
Hey i need my plugin deleated how can i deleate it.
by deleting system 32
Report it and ask for deletion
ez fix
@wheat mirage @frigid ember
Draft API means the method can change in the future
Itβs apparently only implemented for Shaped Recipes
by deleting system 32
@high mantle
just in case anyone is somehow whooshed, this is a joke. please don't.
You can always delete the message
And yes there are people who might do it
that is why i put the notice
and if you do that still
then it is no longer my problem
You still were the guy who said it
so im in control of people's actions?
You give th bad practices
typo?
@quick arch Any idea why Recipe choice can't be implemented by plugins?
Got a javadoc for it?
The server would blow up according to Choco
Ahh yes you need to use the precraftingevent rather than recipechoice
What does @NotNull mean?
its like
3000 errors
in all one hell of a package
sometimes i dont understand how the thing gets to my code
i have no idea
@NotNull means you cannot provide a null argument
or it will show up as an error
newer versions of minecraft may have implemented this im not sure
why does it cause so many errors though?
it also cannot be potentially null
and how tf did it get there
it has to be 100% not null
no way to be null
newer versions of minecraft may have implemented this im not sure
@buoyant path
huh okay
fork?
basically altered version of spigot to enhance performance and allow for easier development
Huh
you probably arent but they are good to think about
your compiler will assess if it could be potenitally null
and if so
it will cause an error
isnt spigot a bukkit fork?
essentially I guess?
yeah, it changes a lot
but spigot still isnt the best out there, obviously its good, but the devs here have a large amount of work, so there are other nonrelated devs who spend time on enhancing it
lol
i keep getting this when i run my commandhttps://hastebin.com/utokalifin.bash
code
https://hastebin.com/tuvifenesi.java
well you werent meant to use it in that class
have you looked at BukkitAdapters documentation?
also those naming conventions π€’
PrisonMines should be the name
and you should ideally move the command to another class
but that is not related to the issue
it will help in the future though
is inventory#equals reliable ?
I want to check that in the inventoryclickevent
but Idk if it works
like what?
actually it will not
because inventories have no form of unique identifier
so if they had the same contents
it would confuse them as the same
idk
upload it as a new one maybe
ok
@frigid ember then send the link when you have done it
Is there a simple way to do a levelling system? I tried using mysql but it seems very clunky. I need the level to be accessed from multiple plugins.
Aha
Ok, I'll just use the xp bar and see if that works
What do you mean by a levelling system?
Nice
how do I make constructors of instances with unlimited args of the same type? like my reflection supports only 2 different args when the second one is supposed to be an unlimited array (im not wording this well)
What I'm doing:
Object packetPlayOutPlayerInfo = getClassNMS("PacketPlayOutPlayerInfo").getConstructor(getClassNMS("PacketPlayOutPlayerInfo").getDeclaredClasses()[2], getClassNMS("EntityPlayer");
what it needs to support
public PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction var1, EntityPlayer... var2)
getClassNMS just returns a Class<?> object
Itβs an array internally
how do I make an array out of a Class<?> tho?
ah, I must use my fivehead yes
Could ehm Array.newInstance(entityPlayerClass,0).getClass()
Probably
Oh wait iβm dumb
No wait no
Wait yes
No
O_O
which class? the packet?
cause it also takes an Iterable<EntityPlayer> instead of an array
thats its other constructor
Show me the class
sorry my internet is about to go, could you give me 5 mins? sorry
assuming you mean the packets class https://hatebin.com/ltrbmvjnub
Yeah, okay so this works fine Array.newInstance(Class.forName("me.jantuck.AClass"),0).getClass() Yeah, okay so this works fine Array.newInstance(getMNMSClass(βEntityPlayerβ, 0).getClass()
stupid internet, I tried it and I'm getting this java.lang.ClassCastException: [Lnet.minecraft.server.v1_8_R3.EntityPlayer; incompatible with java.lang.reflect.Array
anyone know much about https://www.spigotmc.org/resources/goldencrates-1-14-1-16.48732/
@bold anchor
well then that's just a player
not an array
unless
wait
that's array
is different
?
you need to cast to Object[]
I have an issue where the player keeps the crate key after using it and I'm trying to figure out how to make it disappear after use
I'm using reflection. I can't do that
okie
good luck then
ohh
getObject
you don't need to look into the array do you?
I'm trying to access the first constructor using reflection on this packet
assuming you mean the packets class https://hatebin.com/ltrbmvjnub
You didnβt do ut coorectly wtf macho
wdym?
Replace getNMSClass(βEntityPlayerβ) with
Yeah, okay so this works fine Array.newInstance(getNMSClass(βEntityPlayerβ),0).getClass()
thats what I did?
Report it abhiram
Then wait
Object handle = player.getClass().getMethod("getHandle").invoke(player).toString();
//PacketPlayOutPlayerInfo info = new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER, (EntityPlayer) ((CraftPlayer) player).getHandle());
Array players = (Array) Array.newInstance(getClassNMS("EntityPlayer"),0);
Array.set(players, 0, handle);
Object packetPlayOutPlayerInfo = .getClassNMS("PacketPlayOutPlayerInfo").getConstructor(getClassNMS("PacketPlayOutPlayerInfo").getDeclaredClasses()[2], players.getClass()).newInstance(packetEnum, players);
Donβt cast it to an array
how do I set values to it then?
You donβt set the values og that areay
Or well you do
But you need to pass it without changing the type
I'm confused, wouldn't I just be sending an empty array then?
Omg, if you donβt have the required knowledge to use reflection donβt. Go use protocollib
alright I'll just have another look on google, thanks for the help ig
Donβt cast it, refer to it as an βObjectβ
abhiram did they upload your same JAR, or they "copied it"?
because if they just used your ideas, that's.. not illegal
So, remove the cast and make it an object and it should be good @left plover
oh, I'll try it, thanks
Hou probably want to set the 0 to a 1 if you are adding something to the areay
Need help with this please https://www.spigotmc.org/threads/error-when-i-run-a-command.454471/#post-3894775
i keep getting this when i run my command
https://hastebin.com/utokalifin.bash
code
https://hastebin.com/tuvifenesi.java
ye
people already helped you there @sage summit
thank you β€οΈ @bold anchor
Smh
okAy plS I've only just started trying reflection and since have only had experience with invoking and instantiating new methods ;-;
Donβt use it then
ive got to start somewhere
The instructions for getting Spigot makes no sense
Git is a prerequisite, but:
The very latest versions of BuildTools will automatically download and install Git for you. Only grab it manually if you are having troubles!
Except one of the very first instructions is:
Open your terminal if you are on Linux, or git bash on Windows.
I need the thing to run the thing that gets me the thing to run itself. I- Uh- What?
just open it with the normal windows terminal
Hi :o)
i think this is either perms or ess
when i try and break something it says im not permitted to interact with block
Do you use a permissions plugin?
Yes!
If you need or want it you will need to add a premissions plugin to allow building/block interaction
Well.. 'fix' would be subjective! :o)
hey, i'm french, and my english is bad, can i have a french assistant ? please
Hello, π i installed Luckperm and created a group. Next i gave the group the permissions with lp group user permission set permission murdermystery.join.* true. But when i try to connect in murder the error message shows up " you dont have permissions murdermysterie.join.*
Attempting to retrieve all files including sub folders files and such...
List<File> accessibleFiles = new ArrayList<>();
for(File f : c.parent.listFiles()) {
if(f.isDirectory()) {
accessibleFiles.addAll(Arrays.asList(f.listFiles()));
}else {
accessibleFiles.add(f);
}
}
```But if there were multiple directory files inside the file would this still add them?
Ex;
`path/to/file/Main` - Contains 2 folders and 1 file
`path/to/file/Main/Folder1` - Contains 1 folder and 5 files | `path/to/file/Main/Folder1/Sub` - Contains 1 file
`path/to/file/Main/Folder2` - Contains 2 files
You need recursion for that.
Yeah was hoping I didn't.
But i think apache commons has a method for that. Let me check if its shaded into spigot
I always fuck something up with that lol
Didnt find it... But i just wrote this (should work):
public List<File> getAllFiles(File mainFolder) {
if (!mainFolder.isDirectory()) {
throw new IllegalArgumentException("File has to be a folder.");
}
List<File> fileList = new ArrayList<>();
for (File subFile : mainFolder.listFiles()) {
if (subFile.isDirectory()) {
fileList.addAll(getAllFiles(subFile));
} else {
fileList.add(subFile);
}
}
return fileList;
}
is there any way to compile a maven project to another directory
i really wanna build it to the plugins folder
@idle zodiac Yes
how do i do it?
Didnt find it... But i just wrote this (should work):
Was already writing out a new method. Thank you.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<outputDirectory>/my/path</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
One example. Maven jar plugin
thanks!
Will the client ever send it's IP address to the server through it's connection like http?
Yes you see the clients ip for the first time in the AsyncPlayerPreLoginEvent (if you dont use bungeecord)
Will the client ever send it's IP address to the server via packets?
yes, theres no other way to send
Do you want it per mail?
@grim halo yes. I want the USPS involved
So if I made a proxy server out in the cloud, the server still know the original IP
mcserver
Anyone got any idea why I stop receiving packets in my client? It happens only in my server, I don't know where to dig to fix that
I connect, play for a minute or so, and my client just stops receiving packets from the server, I can't see any update in my game, but if I do type, for example, it appears in my server console
till it exceeds the time out time and disconnects me
Any plugins?
well yeah, around 40 plugins
@patent monolith If the client uses a proxy then the server wont know the original ip of that client. That is kind of why proxys exist.
what version of bukkit
I just swapped to paper-114 to try out the anti X-Ray, but happened with spigot as well
@grim halo so the original IP is not sent through packet data?
@spark phoenix did this start happening after you installed a plugin?
Hmm, kinda
@spark phoenix which plugin?
I can only think about StackMob
@patent monolith If the client uses a proxy then the server only sees that proxy ip... There would be no point in using a proxy if you could just get hold of the original ip
and SimpleAdvertising but I doubt it's related to a message-sender plugin
@spark phoenix try temporarily removing them anywya
anyway*
And then test
@grim halo will the client send the server's IP through the packet data?
there is no point in the client sending the server its own ip...
But the server will (in the handshake) send its own ip to the client
Well just in case, because I remember playing with http once and it sent the server address in the headers
is there a way to stop ops from having a red name?
So I didnt know if mc did the same
@left turtle Yes if you disable it in the plugin that causes this. Admins dont have anything by default,
is it ess plugin?
thanks
Error:java: Compilation failed: internal java compiler error
how can i fix this error
@fossil thorn intellij?
@fossil thorn have you tried https://stackoverflow.com/questions/42966889 ?
These software names XD
Paper
Bukkit
Spigot
Sponge
CubeMelon
Whats next raspberry?
Hi so I have a custom mob that I want to spawn on a specific location, using a runnable. This is the code so far:
WorldServer world = ((CraftWorld) Bukkit.getWorld("world")).getHandle();
Location loc = new Location((World) world, 5.0D, 66.0D, 153.0D);
CustomZombie zombie = new CustomZombie(loc); // 5.0D, 66.0D, 153.0D
Bukkit.getScheduler().runTaskTimer(Main.getPlugin(Main.class), () -> {
System.out.println("Got here");
world.addEntity(zombie);
}, 100, 20);
Now what's happening, is that I get an error on the Location loc line. I perfectly know why, I just don't know how I could convert the WorldServer world to a normal world so I can make a location off of it. Can someone help me?
Donβt do that
world.SpawnEntity(loc, zombie)
Yeah u need to install Rasberry script do u know Pyhton?
*Python
He is casting something he shouldnt
Yea that was a quick fix from the IDE.
@frigid ember I can't get the location therefore I can't do world.SpawnEntity.
@frigid ember please stay on topic. If youβre not asking or helping someone take it to #general
@frigid ember What are you even talking about? Do you have a question?
You spawn it on a specific location
So why can't you?
If you know the specific location you can
Cause getting a location requires a World not a WorldServer
@grim halo Nothing its just these software names XD
Oh you'll want Bukkit or Spigot for that
Oh yeah install FoRgE MoDS
I prefer CubeMelon Myself
You should use Buycraft if ur planning on hosting with Apex or Sponge
Whatever you do dont use Paper
What's next, raspberry?
thatβs has nothing to do with spigot development therefore itβs off topic.
Yes I know its just hilarious
I dont rly get the point. Do you want to name them "program_01", "program_02" etc?
In web dev its the same. Ther is Vue, React, Atom, Spring... etc.
Hmmhhh which sounds more comprehendable to the programming community, ScriptForm1 or ScriptForm2, nah u know what...
Just call them Ruby and Python cuz that makes sense
Me:.......,
any1 runs anarchy servers?
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.
When saving a String in a YamlConfiguration it doesn't escape apostrophes so when they get read back in they disappear
If I want a command for my good quality Minigame server lobby and the command is to kill all entities (including players and npcs) forever with no tick delay how would I write that
i need free plugin for 32k enchanted swords? so that id you place shulker with them or you have them in your hotbar they revert. But you can bypass it with dispesners or hoppers
loop through all entities on the server and kill them @frigid ember
What server software is good for 1.16, I'm talking runs fast, is efficient, supports all the plugins I need, cheap?
@crimson sandal Iβm not sure if itβs the most efficient way, but you could just use a different symbol and when itβs sent to the player replace that symbol with an apostrophe.
@frigid ember thatβs a completely opinionated question check the forums. No matter who you ask youβll get a different response.
nice help lol
@digital ledge I canβt help you because I donβt know of a plugin itβs not that I was ignoring you I only answer questions I can answer. Your best bet is to search under resources on the forums.
ok
Does paper have an implementation of world#regenerateChunk()
world#regenerateChunk() should not be used anymore. There are so many bugs with trees and structures etc
@wheat mirage Maybe there is a xy problem?
?xy
Asking about your attempted solution rather than your actual problem
So why do you want to regenerate chunks?
To regenerate the map from griefing periodically
And yeah, I've thought about other options
Loading a mimic world is an option
WorldEdit does it that way
But given how fucking atrocious spigot chunk loading is
Think I'll pass
I hear paper has re-implemented async chunk loading
To some decent extent
May be worth looking there I feel
I want to use vanilla spigot, but it just isn't viable for serious server distributions it seems
I dont think this will help as you cant load a world async
wdym by that?
Like in: "Does every world have its own thread" or "can worlds be loaded async"
But either way the answer is no. The only important part of the game that is async is chunk loading on paper
@wheat mirage There is a plugin that lets you roll back certain worlds or actions from certain ppl. Its called CoreProtect
Resource Hog
Configurable, but still
I'd rather implement the worldedit solution
And save the bloat
Last time i used CoreProtect it was pretty decent.
Was like 3 or 4 years ago but still.
is anyone here familiar with the Custom Crafting Recipes plugin?
Does anyone know how to make a mob shoot fireballs at a player every few seconds?
I know you have to get the mob location and the player location and spawn the fire ball where the mob is
I am currently trying to set a player's spawn when they step on a block. However, I can't find an extension of player that would set his spawn location. I see "setBedSpawnLocation" but I'm assuming that wouldn't work...
but what is the event for spawning the fireball and what would the order of the code be like
And I'm also not trying to set the world spawn location, rather just the player's.
Does anyone know, in bukkit.yml, which settings for the mob spawn rate holds the guardians and which the fish?
water-animals: 3
water-ambient: 5
i suppose water-ambient is for guardians etc and water-animals are fish?
its just players are running guardian farms and it causes quite a tps loss
want to lower these
how i skript command /unbreak
and i do /unbreak wooden_pickaxe is give me unbreak wooden pickaxe how i do that?
My terminal says error after I do the chmod a+x build.command
line 1: {rtf1ansiansicpg1252cocoartf2513: command not found
line 2: syntax error near unexpected token }' line 2: \cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fmodern\fcharset0 CourierNewPSMT;}'
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
does some1 know a way to do this:```java
Entity vehicle = world.spawnEntity(entloc, EntityType.BOAT);
((CraftBoat) vehicle).getHandle().setInvisible(true);
this one doesnt work...
any1? ive been struggling for a long time with this
@ripe token I donβt know scripting but Iβm sure theyβre are more than enough tutorials you could fine online to create and listen for when a player executes the command and when the do spawn an unbreakable pickaxe in their inventory
@frigid ember Extend EntityBoat and make a custom boat that is invisible
There is no default constructor available in 'net.minecraft.server.v1_16_R1.EntityBoat'
public class Driving extends EntityBoat implements Listener{```
@steep smelt are you on Windows?
@grim halo
is someone able to hop in vc and gimme a hand w/ my plugin?
@balmy sentinel no on macOS
mhmm the only thing I can think of is if chmod is different in zsh than in bash? All macs unless you didnβt update yours use zsh now instead of bash. I know nothing about zsh. Are you sure you copied the start.command correctly?
@frigid ember You should not let your custom entity implement Listener.
Create a new class. Let it extend EntityBoat and implement the constructor that suits you.
@balmy sentinel yea mine is in bash should I try to make it use zsh?
public class CustomBoat extends EntityBoat {
public CustomBoat(org.bukkit.Location location) {
super(((CraftWorld) location.getWorld()).getHandle(), location.getX(), location.getY(), location.getZ());
this.setInvisible(true);
}
}
@frigid ember There you go. Thats a custom invisible boat using nms
love you
Also. Have you tried giving it the invis potion effect?
@steep smelt thatβs a personal preference Iβve been using bash for so long I donβt want to switch to zsh. Things I would check is if you copied the start.command right, and check if the account youβre on is an administrator. You can check if you have the file execute permissions by navigating to the directory of the start.command file and execute the command ls -la
Btw not quite sure how to spawn the boat...
@grim halo hey, are you able to gimme a hand w/ a problem im getting when trying to create a custom yml file when you get a free moment?
Sure go ahead
are we able to jump in vc so i can stream my screen?
Entity vehicle = world.spawnEntity(entloc, CustomBoat.CustomBoat);```
how would I call the boat xd, this way of calling it is not working :/
Im wondering if anyone knows of a plugin like this that exists?
TP for players, but has a 5 second standstill cooldown, cannot tp while monsters are nearby, and links to vault economy (cost / tp) ?
essentialsx?
partically cannot tp while monsters are nearby is what im looking for
would be cool if this existed somewhere!
if not I could just make the standstill longer I suppose to ensure nothing is attacking someone long enough to get away easy
maybe you can make it
id like to, no idea how to java yet πΏ
try this https://www.jetbrains.com/academy/
@grim halo how would this be done in the new class
this.setPosition(locx, locy, locz);``` I need to get these from my event in my other class
double locx = e.getRightClicked().getLocation().getBlockX();
double locy = e.getRightClicked().getLocation().getBlockY();
double locz = e.getRightClicked().getLocation().getBlockZ();```
@frigid ember The constructor i gave you takes Location
Of the custom boat class
but it needs to be placed at a certain location
It takes an instance of org.bukkit.Location. The basic location you get everywhere
Location entloc = e.getRightClicked().getLocation().add(0,1,0);
Entity vehicle = world.spawnEntity(entloc, EntityType.BOAT);```
it needs to be placed at this location
EntityType.BOAT should be the custom boat
Ok maybe this a xy problem. What do you want to do with the boat?
no so I should call it somewhere right?
im tryna spawn it at a location of an entity
Location entloc = e.getRightClicked().getLocation().add(0,1,0);
which is this location
this is in my event in my other class
Ok but why do you need to spawn a boat at a location
for the plugin xd
Whats the big picture
Or do you want a plugin that just spawns random invis boats
no xd
Oh ok. And a ArmorStand would not work because it does not react to the input right?
I can't drive an armorstand can I?
Have you tried a LivingEntity like a horse or pig?
when a boat does not have gravity you can just drive it in the air
Because you can make them invis pretty easy
will cause different in height @grim halo
maybe a pig would've worked
horse wouldn't
think a pig would still fuck it up when riding a bunny
or flying a bat
Ok interesting. So this looks like it is a bit more advanced as you need to create a custom entity, register it and handle server restarts etc (Otherwise it would just be a normal boat again)
I think you should google something like "spigot spawn custom entity" and see where it gets you. Because this is not easy and you will need nms for this to work.
Yes but had trouble understanding how to pass instances via a constructor so i had my doubts.
From earlier this month, I'm having the same issue as this:
(CastoloGR)
my villagers wont change profession in my server. I summon them with the egg, place down the lectern, they pickup a job and then wont change
nms is the very last thing you should use. It breaks fast and it breaks nasty.
I would recommend you to set this project aside for now and think about making some basic plugins to get a better understanding of java and the SpigotAPI.
thats what I did for a long time xd
now im starting to do some difficulter things
but if I save everyone who accesses a mob into a hashmap
and check the hashmap with PlayerJoinEvent
remove them at VehicleExitEvent
and remove the old boat onjoin
and add the custom boat onjoin
it will work I think
I assure you that this will not work (not quite)
why wouldnt it?
My PlayerInteractEvent listener seems to be fired twice for each interaction. I've registered the WrenchListener() once π€
are u checking for right click action
if so check which hand too
cuz it fires twice, once for each hand (mainhand and offhand)
anyone know how to get command sync to work?
Hey, does anyone know if itβs possible to auto-update a configuration file? Say I have config version 1.0 and I make changes to the config, making it config 1.1 - how can I automatically apply the changes (like adding config values?)
uhm...
I'm trying to use ChunkMaster to pregenerate chunks, and this is my first time using it.
I started a pregen of 20000 blocks 10 minutes ago, and ever since, it has been stuck at 0% and 0 chunks have been pregenerated.
Does anyone know why and how to fix this?
Use Chunky, https://www.spigotmc.org/resources/chunky.81534/
@strange roost recommends it π
it's true
both chunky and my WB are significantly faster than chunkmaster in its current state
Oh... I looked in the config and pause-on-player-count was set to 1... whereas I had more than 1 player online.
huh... Chunky?
it's brand new
It's using PaperLib's async chunk stuff π
Does it integrate with dynmap?
no, you'll need to use my WB if you want those kind of features
but for purely pregen, chunky is fastest
fullrender, yeah
Does anyone know how to make a mob shoot fireballs at a player every few seconds?
I know you have to get the mob location and the player location and spawn the fire ball where the mob is but what is the event for spawning the fireball and what would the order of the code be like
There is no event. You need to have a runnable that ticks the mob.
After x ticks -> get mobs target -> check if null -> if player shoot fireball
And pls. I know its tempting and i see it at least once per week, dont use anonymous runnables like
new BukkitRunnable(){doStuff}.runTaskTimer() or something similarly obnoxious
btw i think you can just spawn the fireball at a Location and it will fly in the direction vector of the location. But dont quote me on that.
Pretty sure you have to apply the vector
Ill test it rly quick
It just flies in the direction vector of the location.
And it's at 7597 chunks.
that's 121552 blocks (the 7.5k chunks)
It has to go through 400,000,000 blocks
._.
actually should be more cause I didn't count negatives in π€
isnt the value a radius? So more loke 40k * 40k chunks
oh
wait
square(20000 / 16 * 2)
yeah... your giving it a lot of blocks
thought you said this was fast @strange roost?
Its as fast as it gets. I looked at the code and its basically the same as i use for my personal chunk generator
oh ok
square(20000 / 16 * 2) = square((20000 / 16) * 2)
Its only what you wrote if it was square(20000 / (16 * 2))
Thats the amount of chunks
^^
that's a lot of chunks
Thats a ton. If you dont use async chunloading you will be there a while. Whats the cps? I get around 51cps on my machine with my code
Why not use BukkitRunnable?
wait so basically I spawn the fireball in the location of the entity and then the location of the player and then spawn the fireball right
I also need to make a tick to time the fireball
You need to create a vector that points from the entity to the player.
Just make sure to normalize it.
Wait ill write you an example...
Just to be clear. I'm updating my 1.15.2 survival map to 1.16. I've already done this actually, but I kept the 1.15.2 world folder, and all the player data inside of it. Is this an issue? I've not really noticed problems, although there are some annoying console spam issues sometimes
is it about bee hives or something
Not sure actually, but I just want to make sure this is okay to do. I noticed the player data files get re-created in the playerdata section. I'm just wanting to make sure no one loses any of that player data
The cps...
from the update
chunks per second
public void shootFireball(LivingEntity shooter, Location target) {
Location headLoc = shooter.getEyeLocation();
Vector direction = target.toVector().subtract(headLoc.toVector());
direction.normalize();
Location fireballSpawnLoc = headLoc.clone().setDirection(direction).add(direction);
World world = fireballSpawnLoc.getWorld();
world.spawnEntity(fireballSpawnLoc, EntityType.FIREBALL);
}
This shoots a fireball from the shooters head to the target location.
[12:27:51 INFO]: [Chunky] Task running for world. Processed: 14808 chunks (0.24%), ETA: 144:03:06, Rate: 12.0 cps, Current: -1245, 1058```
It stays around 10cps .-.
?
I would send you my chunk generator but its not quite ready yet...
Hope chunks will get removed from minecraft and instead it loads everything without chunks to do not cause memory leak
Thanks for the example man I appreciate it!
@rare prairie If minecraft removes chunks then the game would be literally unplayable
But how would I make sure that every witch in the world can shoot a fire ball at the player?
@rare prairie If minecraft removes chunks then the game would be literally unplayable
no, there is another way to load worlds more fastest, like on server startup, it loads everything (entities, generating things etc)
You need to track every witch that spawns or gets loaded. Put them in a set. use a runnable and tick them.
Maybe you should use a Map<Witch, Long> to track when the witches shot the last time (the long is the unix timestamp)
@rare prairie Sure if you have 2TB of RAM and want the server startup to take 2 hours you can just do that.
Actually you could do that just now.
If you want i can write you a quick pluigin that forceloads all chunks of a world on startup.
np. look at -> EntitySpawnEvent and ChunkLoadEvent to get all witches. Just make sure to unload them again
@rare prairie Sure if you have 2TB of RAM and want the server startup to take 2 hours you can just do that.
no need 2TB, only 50MB, there is async threads in C languages
π€
I'm not okay today, don't believe me, it's just a joke what I'm wrote
Ok i was just about to go on a rant
I was thinking of using entity spawn event but I do not know how to incorporate that event into the code
and why do i need a chunk load event if i am using the creature soawn event?
You also need the ChunkLoadEvent. I think if a witch gets loaded like this then the spawn event will not fire.
Oh i see because the witches can load in when the game starts up and not spawn
Nope that looks fine.
20 cps are around 512000 blocks per second
o
But where would I put those events? there is already a public void how would I incorporate the events into the code? Sorry if my question is stupid I'm new to this lol
Oh if you are new to this then you should start with something simpler...
^ Don't be like me and get into making an extensive plugin
https://www.youtube.com/c/TheSourceCodeTutorials/playlists
Here you can find a playlist that gets you started
bro thats literally the video im watching right now for the runnable lol
"custom"???
modified
nms
i tried spawning it dosnt work
i googled it says no need to register entities if the version 1.14 +
public CustomBoat(EntityTypes<EntityBoat> type, World world) {
super(type, world);
Boat craftBoat = (Boat) this.getBukkitEntity();
this.setInvisible(true);
this.getWorld().addEntity(this);
}```
I created a modified boat
```java
net.minecraft.server.v1_16_R1.World nmsworld = ((CraftWorld) plloc.getWorld()).getHandle();
CustomBoat boat = new CustomBoat(EntityBoat , nmsworld);
boat.setPosition(loc.getX(), loc.getY(), loc.getZ());```
I want to spawn it here but `EntityBoat` is not recognised :/
Is Chunky the fastest of all the existing chunk generation plugins?
?
?
public CustomBoat(EntityTypes<EntityBoat> type, World world) {
super(type, world);
Boat craftBoat = (Boat) this.getBukkitEntity();
this.setInvisible(true);
this.getWorld().addEntity(this);
}```
So Im creating a custom boat
```java
net.minecraft.server.v1_16_R1.World nmsworld = ((CraftWorld) plloc.getWorld()).getHandle();
EntityTypes type = EntityTypes<EntityBoat>;
CustomBoat boat = new CustomBoat(type, nmsworld);
boat.setPosition(loc.getX(), loc.getY(), loc.getZ());```
And I want to spawn it here but the type `EntityTypes<EntityBoat>` is not recognised
NMS
@vital copper
uh...
That's a class
Fix the annotation dependency
To get the registered type get it from the registry
how ;|
https://i.imgur.com/wkgiX4j.png
That's gradle's way π€
add repo
`Required type:
EntityTypes
Provided:
Registry
<org.bukkit.entity.EntityType>`
EntityTypes type = Registry.ENTITY_TYPE;```
ENTITY_TYPES doesnt exist
@quick arch
Yes.
i donk know how add
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>16.0.2</version>
It should be something like that for maven
π€
Your type variable should be a registered instance of EntityType<CustomBoat>
NMS EntityType
hmm
Yes @quick arch is correct.
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>16.0.1</version>
</dependency>
I've made TileEntities in Forge before which work similarly I think
EntityTypes type = EntityTypes.BOAT;
CustomBoat boat = new CustomBoat(type, nmsworld);```
Gradle sounds like something you cook on.
this doesnt give errors @open ibex
gradle, good
gradle is too complicated
Well depends on your contructor code, but that doesn't look right
no thought so too
public CustomBoat(EntityTypes<EntityBoat> type, World world) {```
Should be EntityType not EntityTypes
its NMS
Yes
Guess it depends on the mappings
Spigot mappings are different from mcp mappings after all
Ok I'm looking at in now and mcp EntityType contains all the registered vanilla types
So if EntityTypes is the Spigot mapping then it should be fine
Ok
Even if it doesn't give you an error and the boat summons, it still might not work correctly because your EntityType would be parameterized with EntityBoat instead of your CustomBoat
But if you make your own EntityType the client won't know it exists so I'm not quite sure why you're making a custom entity in the first place
how would I make my own EntityType
if I could just make a boat invisible
it would be very easy
:/
Making a new entity won't make that work
Because once again the client won't know about it
Boat invisible? So you can interact with it but not see it?
It seems like a texture pack would be the easiest way but the player might not put it on
and I dont want to do it with a texture pack ;|
With some packet manipulation you could make the client think the boat isn't there unless the player is right next to it or in it, but it wouldn't really be invisible
I don't think you can make it completely invisible without a texture pack or using mods then
@frigid ember what exactly is your end-goal here?