#help-archived
1 messages · Page 199 of 1
how much lag does this produce? (not very much im assuming)
No not really
The events are going to get called regardless of whether or not someone is listening to them
That's true, thanks for your help!
Hey
Do anyone know
how to commit a ECLIPSE project in GITHUB without making it inside the folder of the project in github?
hahhaa
Its a Maven Project btw
does anyone know if there is an issue with creepers not being scared of cats in spigot 1.16.1? i've built a farm that isn't producing 6x the amount as its vanilla counterpart. mob spawning in spigot, in general, is fine. the creepers are just not running to their doom and despawn instead. thoughts?
what do you mean that there should be an issue? are you saying, based on the screenshot (i don't understand the code), that the code alludes to there being a problem?
ok, so based on the pathfinding code, there isn't an issue?
I think so, I'm currently trying to cancel EntityItemPickupEvent on villagers, to prevent them from being willing to breed in the first place.
mobGriefing can be turned off.
trying to avoid it, because i still want mob griefing otherwise
So, another question regarding best practices:
if the entity associated with picking up the item is a villager, set cancelled to true.
Do note that villagers that already picked up food will still breed.
If I want a user to enter a color/format code in the config and I am parsing that string, what should I do if somebody enters something other than colors?
Extract the color information from what the user entered? Discard the input and use a default?
public void onEntityPickupItem(EntityPickupItemEvent event){
if(event.getEntity() instanceof Villager) event.setCancelled(true);
}
You can do
ChatColor.translateAlternateColorCodes('&', StringToTranslate);
You can do
ChatColor.translateAlternateColorCodes('&', StringToTranslate);
@neon epoch I know I can translate it, that's not what I am after.
Translate, strip check length
whats the difference between
getEntityType() == EntityType.VILLAGER
AND
event.getEntity() instanceof Villager
Not terrible much
So I want the user to enter a color that gets used frequently in messages and gui and stuff, basically a way to customize the gui.
Which means that string they entered will get copied often
So if they enter "&6", that should not be an issue to copy. If they enter "&6sometext&lblabla", that should not work. I know how to strip the color, I want to use a regex to detect if the input is valid. The question is what should I do if the input is invalid like above. Should I just shorten it to "&6&l", should I use a default, should I discard the input entirely and use no color at all? (of course I'd inform the user)
@rich quest go into your server files and delete the world's name, probably called "world", and it is in a folder in the main directory of your server
@frigid ember just out of curiosity, why is instanceof faster? Isn't the property check with an emum just an integer comparison?
How can i change villager breed willingness?
Entity#getType() and an instanceof check do two very different things
Right, that's why I was a bit confused lol
EntityType == vs Entity instanceof serve two separate purposes. While entity instanceof Zombie will encompass villager zombies and husks, entity.getType() == EntityType.ZOMBIE will not
instanceof ensures that a type is or is a subtype of the type on the receiving end of the instanceof
@neon epoch You might be better off trying to cancel their breeding attempts
Zombie is extended by Drowned, Husk, PigZombie, ZombieVillager.
So checking for instance if Zombie can be any of those.
However, EntityType.ZOMBIE is just the actual zombie
Well, covered by Choco already, RIP
...
public EntityType getType() {
return EntityType.CHICKEN;
}
}```
@frigid ember
A quick search shows that there's no easy way to do it. You'd probably have to deal with NMS unless I missed something.
doesn't seem like there's anything much going on
pretty sure it really is just an int comparison
@wise flame i did that, successfully for that matter, but they are still willing to breed, and still giving off particles showing such
correct
Whenever a villager tries to breed, try calling villager.setBreed(false);
but theyre constantly giving off particles because theyre willing to breed, but their EnterLoveModeEvent is being cancelled, so they just try again
ok
ill give it a shot
should work
We don't see baby villagers trying to have children and they have that flag set
lol
be sure you want this though
you probably can't reverse this easily
@frigid ember when i place a cat and creeper in that way, i get that behaviour too so no issue with that. however, when i build a creeper farm, that works as intended in vanilla, it doesn't in spigot. some creepers happen to wander off to their doom but most don't. it's as though they don't register the cats.
@neon epoch above warning
wdym you cant reverse it easily
@neon epoch a shenanigan you could try is emptying the inventory of the villager because iirc they need a certain amount of food to breed
Ok, here's where I'm at, I want to clear the villager's inventory whenever they pick up anything, or try to breed, but I can only get their inventory if it is an AbstractVillager object, how do I take e.getEntity(), and change that to an AbstractVillager?
If it's of that type, you can cast it as such, schmiffy
AbstractVillager villager = (AbstractVillager) entity;
Eclipse is telling me that AbstractVillager cannot be resolved to a variable, I have it imported, and everything.
on what version?
Villagers were abstracted out like that in like 1.13. Whenever the wandering trader was introduced
Why would you want to downcast?
?
Villager extends AbstractVillager
Oh, because I cannot access its inventory unless it is abstractvillager
So if you check if its of type Village you should just cast to Villager
Wait that doesnt make sense. Villager extends AbstractVillager that means it inherits every method
i was trying to make a spigot server but it says there is another program trying to open the files at the same time
So do i need to make a villager object that is the event entity casted to villager, then go from there?
@frigid ember Whats the exact message?
@neon epoch Yes i would try just using the Villager interface. Although i find your bug weird.
java.lang.RuntimeException: java.io.IOException: The process cannot access the file because another process has locked a portion of the file
at net.minecraft.server.v1_16_R1.MinecraftServer.loadWorld(MinecraftServer.java:345)
at net.minecraft.server.v1_16_R1.DedicatedServer.init(DedicatedServer.java:219)
at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:810)
at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$0(MinecraftServer.java:164)
at java.lang.Thread.run(Unknown Source)
So why can I not cast e.getEntity() to villager
Hello!
void sendTitle(@Nullable String var1, @Nullable String var2, int var3, int var4, int var5);```
What do `var3`, `var4` and `var5` for? Which delay, which ...?
Ok, thanks!
@frigid ember Weird. Did you try to start the server before? Try restarting your pc
But why did you respond extremely fast like you know I will ask about it? 😄
@neon epoch You can cast Entity to Villager if you have checked it before
That is not a valid java statement
whats wrong about it?
if you want me to assign that value to a villager object, i can, the error will still be the same
You need to define a new variable that stores the casted object
Why cant you just access the inventory with Villager#getInventory
Im not sure why, but eclipse isnt importing villager.
thats why these issues are happening
Does Villager override the getInventory method?
He suggested that because that's what was asked for ...
So. I'm working on figuring out how to delete a world without multiverse.
I know that I need to unload the world and make sure to remove my references to it so garbage collection eats it, then delete the world file, then make a WorldCreator to make a fresh overworld
What happens to players in the world?
How do I make sure players will spawn in a newly created overworld by default?
@neon epoch define a new variable and post the eclipse warning pls
I had things double imported, and i had imported both abstractvillager and villager, for whatever reason its fixed
@wise flame If you unload a world then it would make sense that every player in this world gets thrown to the server spawn. If not they get probably just kicked
@neon epoch Let your IDE handle the imports. I have not imported packets by hand for ages (last time when i worked with OpenGL srtatic wrapper)
How would I get the location to the right of a player
ok thanks
You first have to define "right".
So you can get the direction the player is looking at -> convert to BlockFace -> get next 90° BlockFace (rightFace)
-> get Block of players feet -> Block#getRelative(rightFace)
Ok ty
Is it bad practice to use commandblocks to store literal strings?
I don't see any drawbacks but im not sure
is anybody experienced with votingplugin and know how to do cummulative rewards ?
u don't have to be experienced lol just do u know how to do cummulative rewards
I have no idea why this isn't working, to preface, I'm trying to prevent my players from breeding villagers. When I cancel EntityEnterLoveModeEvent, villagers should stop looking at each other, and giving off heart particles, correct?
mrschmiffy idk about that but have you tried setting the chunk limit of villagers?
or maybe try disabling the baby villager mob
or i just kill the baby villager as soon as its spawned. ill give it a shot, thanks.
sounds time consuming to me
@timber pike What do you mean by that... If you program a plugin you should never have to save Strings in command blocks. That would be a very bad practice.
Hello, quick question, is it possible to have a method executed rather than a command that executes our method, because it's really not clean to do like that. If this is not possible, is it possible to add this feature to the bungee api? (I can make an issue on github if needed)
oh
ok lol
What do you recommend I do?
I'd rather not read from a local file unless that's my only option
@silent pulsar Pls elaborate. A command is literally a method.
Yes, but we have to register it in the .yml plugin.
@timber pike What do you want to achieve?
and create an class witch implement CommandExecutor
it's not clean to do that :/
Im storing item meta in a command block then giving the item to the player based on what it is in the command block so a command block might contain
crossbow true true false BINDING_CURSE 1
it's not clean to do that :/
@silent pulsar There are a lot of frameworks that let you register commands wihtout the plugin.yml
I for example use aikars ACF (Annotation Command Framework) its a bit hard because you need to have more
java experience but that would be a "clean" way. (Although i dont understand why the default method is not "clean")
@timber pike And you want to do that per chunk or why do you need to store it in a command block?
well its just easily editable in game, and its easy to link up with a button since right now the command block is just ~ ~-10 ~ away
i just dont know if its bad to do
I have never ever seen anyone do that and you should def avoid command blocks on a production server...
You can however use signs or a book if you want to edit stuff ingame... Also the normal way would be writing commands to interact with your plugin
I've seen anvils too, then you just get the itemmeta of the object, and get the name
You cant store data in anvils
Oh I was thinking of a temporary way to have the user enter a string not through a command, sorry
signs would work i guess
Oh yes. Thats possible. But a bit complicated
im just implementing a kit sort of system im not sure how to link one button to another command
but if i know that the sign is going to be ten blocks below the button or one block above its easy to link them together
You coudl just use the PlayerInteractEvent and check if he clicked a button. This way you can add functionality to every button you like
yeah i am
but how do i know what button goes to what
does that make sense?
all i know is that its a stone button
Or even better you just place a chest below the button and then copy the chest content into the player inventory
:p
also while you're here
is there a reason the spigot community uses yml instead of json?
or is that a java thing
Spigot has a build in FileConfiguration api that uses yml
I for my part only use json and the provided Gson from google that is also build in
👍
If you only use this for your private server its fine
any reason why it wouldn't be for production?
though yeah this is only going on a private server
So you place a sign on top of your chest with a secret code on it.
This way you can just click a button and check 4 blocks below for a sign and check the code
If it is right you go on block lower and get the chest content.
This way you prevent random ppl from placing a chest 5 blocks below to just copy every content
mk
But that is still NOT safe. Someone with a wallhack can just read the sign
yeah its fine the risk is tolerable to the project
Ok
thanks a lot lol
np
Shouldn't cater to hacked clients
They're cheating. That's not something you can predict
If they can cheat in the vanilla game, expect them to cheat your plugins too
Ah you can use §e§a§e§a§e CODE etc as the color codes are all hidden i think.
The player would only see the yellow CODE and would not be able to reproduce the full String
I mean the proper way would setting a persistentDataTag on the chest anyway but if he wants a quick simple solution this is fine
ish
He is just making a button that give the items in a chest?
But that is still NOT safe. Someone with a wallhack can just read the sign
@grim halo cant you just lock the chest
If i have a TNT block, is setting it to air and spawning a primed tnt the only way to "activate" it?
@Override
public void run(){
loc.add(loc.getDirection());
DustOptions eee = new DustOptions(Color.fromRGB(0,255,0),1);
world.spawnParticle(Particle.REDSTONE, loc, 0,eee);
if(loc.getBlock().getType()!= Material.AIR)
cancel();
for(Entity ent : getEntitiesByLocation(loc, 0.545f)) {
if(ent instanceof LivingEntity) {
if(!(ent.equals(me)))
((LivingEntity) ent).damage(10, me);
((LivingEntity) ent).setFireTicks(10);
}
}
}
}.runTaskTimer(Bukkit.getPluginManager().getPlugin("StaffWeapon"), 0L, 20L);``` when i do this instead of the loc going forward it either stays in the same space ofr has a wierd extended spasm
...
@sturdy oar there might be a tag for ignited?
Here's a (potentially dumb) question, what does PAIL actually stand for when renaming fields/methods? 😄
This is what vanilla does
a(world, blockposition, (EntityLiving) entityhuman);
world.setTypeAndData(blockposition, Blocks.AIR.getBlockData(), 11);```
(a being a method to summon a primed tnt entity and play the sound)
so first it summons it, then it sets block to air?
So, yes...
oh ok cool
Yes, though order of operations doesn't really matter
There are various ray-casting methods
@crimson sandal I don't think there's really an official definition. I've always believed it to be "Please Add In Later"
loc = loc.add(loc.getDirection()); works but loc.add(loc.getDirection()); doesnt
where can i see how many posts on spigotmc i have?
i dont see th like post on my profile
On your profile, left hand side under your profile picture, "Messages"
forum posts. Though don't go around posting random nonsense, that's post farming ;P
Try to actually be contributory to threads. Help others in Spigot Plugin Development or Spigot Help, etc.
okay thx
@subtle blade That makes sense I guess 😄
Was my best estimate as to what it meant but I'm sure md would know
I've just not cared enough to ask lol. Please Add In Later at least made sense to me in my mind
It could be that he wanted some synonym to "Bukkit" and figured "PAILS!"
Lmaooo I think I prefer that 😄 😄
does someone have any idea of what this means
how do i get the weather of a location
i think the entire server has the same weather
if it's on a mountain it could be snowing
but its technically "raining"
how do i get the weather of a location
@hollow thorn world.isThundering()
something like that
or isRaining
right. if it's raining, the entire world rains
^^
hey how do i register an event in the onEnable () method if it is in the same class?
for some reason i cant get the ifRaining thingy i can only get the duration of the weather
hey how do i register an event in the onEnable () method if it is in the same class?
@violet aspen this
hey how do i register an event in the onEnable () method if it is in the same class?
@violet aspen this
i have
show code
or isRaining
@sturdy oar isRaining doesnt exist
i cant find anything to check if it is raining
getServer().getPluginManager().registerEvents(this, this);
@violet aspen i think like this
i have
PluginManager pm = Bukkit.getPluginManager();
pm.registerEvents(this, this);
hrm does your class implement Listener?
yes
but it still doesn‘t work
public and void?
do you recieve an error
yes
@EventHandler
public void onBlockDestroy(BlockBreakEvent event) {}```
no
they look like that?
yes
can i have a pastebin lol
wait
dont you just love the mc codebase lol
why do they do that stuff
snowing == raining
just in snow biome
and y value
raining + snowy biome == snow
pastebin.com/RgCtvGcg
@violet aspen this is the full code
btw is It normal that if i get a block location, and spawn a primed TNT at that block location, the Primed tnt will actually not spawn there?
i dont see an onEnable method?
also the class should be called Settings not settings
depends on where you're spawning it, Viper
class names always start with an uppercase
keep in mind that a block's position is 0, 0, 0 relative to that block. The bottom left most corner
it is kinda offset
oh ok sry im a Beginner
Everything works except for the event
I'd blame that likely on the condition instead. That event should be called and it likely is, though that condition is most likely false
oh, wait, yeah it is lol
player.getInventory().getName().equalsIgnoreCase("Settings")
player.getInventory() is the player's inventory, not the one it has open
^^^ check that its not with the event code
how do i make it so if i click an item it runs a command
also if it still doesn't work then it might be CommandExecuter and EventListener conflicting for some reason
ok
you can just test whether its firing by putting a line of code that says in chat like "I work" or smth
oh yeah lol
You want to check the clicked inventory's name. event.getClickedInventory() (which can be null if clicking outside of it)
Also, does creating a new thread cause commands to run twice?
that's a very vague question lol
lol sorry
if I create a synchronized runnable to do a countdown does that cause a command like /give to execute twice?
because that's what im observing
i don't know if its something else though
ah lol now it works thanks
whats the difference inbetween isThundering and hasStorm
why
but surely when you have a storm you have a thunder
not always
where can i create posts where other can write sth
it can rain without there being lightning
?forums
fuck, thought there was a command for that
?spd
i think he means vice versa
Aye
if there's lightning there's a storm
How can i get the latest maven bungeecord build?
Because directory listing is forbidden with the repo url
well yeah but i don't think this is always gonna be up to date
@frigid ember do you know kotlin?
Any ideas? It's only some imports that cannot be resolved
My bungeecord server‘s icon is glitching only on 1.16+, anyone have any ideas on what the problem could be? Btw I did update my bungeecord to support 1.16
it turns white or into the default icon, sometimes even has the original icon really small in the top right
can someone help me
i need ideas
I feel like I'm missing something with the bungeecord config for MOTD's. The MOTD in the listener is overriding the MOTD for the specific servers.
Is there a flag or something that is doing this?
Am i dumb or is there no way to get the ConsoleCommandSender Object in the Bungeecord maven repo
do server icons have to be jpg or can they be png?
png
how do i capatalise each word of a string
and remove certain charcaters
its called server-icon.png
.toUpperCase() and .replace(str1, str2)
.toUpperCase() and .replace(str1, str2)
@grim halo wont that make the hole string capital letters
Yes
https://paste.md-5.net/axamikuhif.java
This code won't kill anything, right? I haven't done much with File so I'm always hella nervous
how do i remove a character from a string
@hollow thorn String#replace to replace something, String#subString to get a a substring
@gusty comet Just use
if (sender instanceof getProxy().getConsole()).
@frigid ember Main.getConsole() is just the normal CommandSender
Also that does not work with Java syntax
How would I get the blocks in between two locations? For example in the picture, the two black concrete blocks are the two locations and the red stained glass blocks are the blocks I want to get
@frigid ember substract 1 block loc from the another then normalize it and raytrace it back to the other block
I need help
time to look up how to use raytracing
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.
pog
hi PulleQ
thank you @tiny dagger
ray tracing
tracing rays
is exactly what it sounds like
Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask doesn't work
yes
you probabily wanna look into how vector normalise stuff
Ik how to do everything else
it just spams like it was normal while (true) loop
I've just never used raytracing
Then you gave it an interval of 0
}, 0L, sec * (this.getConfig().getLong("Interval"))); these are numbers on the bottom
sec is 20
it looks liek this in config
#this is example
Interval: 60
It's possible you're simply using it incorrectly. Posting your code would be a good start
?paste
And what do you expect it to do exactly?
that's how the friend sent me it
I kept it cause changing it did nothing
ok I changed it to long and removed the cast
That's unlikely to change much.
What you can do is calculate the period beforehand and output to make sure you have the same number you expect.
But I'd like to ask again:
And what do you expect it to do exactly?
to execute the list of commands every period of time that the user specified in the config
But that's not what you're talling it to do
You're telling to execute every command every time the task gets run
I want to execute the list of commands in config (I will move them to the seperate yaml file when it will work) every time it waits a delay set by the user
but it just ends up executing a list of commands I think every tick or sth
it was cleanmotd that was messing with my server's icon
but it just ends up executing a list of commands I think every tick or sth
yeah every tick
how do i create a scoreboard
get a plugin that has a scoreboard, maybe quickboard
ah
does anyone know how to make it so players cant push each other?
im assuming its with the scoreboard but im not sure on how to do this
Turn the delay value into a variable and then print it to check its right
ok
@soft grove You want to
a) store your list of commands outside the scope of the scheduled task
b) run one command within each
In order to do so you'd need to keep track of your position in the list and reset it to 0 when you reach its end (or you could probably use some pre existing collection that does the roll for you)
there is something wrong with the value ig cuz it returns zero
Are you sure the config.yml in your plugin's folder contains the "Interval" key?
Hello i need help or advice.
yeah
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.
i install GroupManager and have only one world my original but no nether and end world... to config what do to..
config.yml
Interval: 60
getLong
plugin.getConfig().getLong("Interval")
replace getLong with getInt
it still returns 0
how do i make a normal scoreboard objective
how do i get back the score i stored in there
because thats for mking the display
ok I fixed it
how do i create a normal vannila player scoreboard which works
I got String and parsed it into Int
the way it does in vannila
My Servers bStats is not working
It is not tracking on anyones plugin
No
It only tracks data when I first start my server
and then it stops
This is how its like
bStats is enabled
It does this on all graphs
and Pie charts dont show it
It is doing it on Server chart
This is happening on all plugins that have bStats
once a day
at 16:30 I restarted to add a plugin
It does this on every bStats plugin
} catch (ClassNotFoundException e) {
// minecraft version 1.14+
if (logFailedRequests) {
this.plugin.getLogger().log(Level.SEVERE, "Encountered unexpected exception ", e);
}
I see this in the bStats metrics java file
Hello! Why does this not work for me? I am trying to tell the player another player's location
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
public class Main extends JavaPlugin{
@Override
public void onEnable() {
}
@Override
public void onDisable() {
}
public boolean onCommand(CommandSender sender, Command cmd, String label, Player[] args) {
if (label.equalsIgnoreCase("location")) {
if (sender instanceof Player) {
Player player = (Player) sender;
Player getLocPlayer = (Player) args[0];
if (player.hasPermission("location.use")) {
if(args.length == 0) {
player.sendMessage("Usage: /location <player>");
return true;
}
player.sendMessage(ChatColor.GREEN + "" + getLocPlayer + "'s location is:" + getLocPlayer.getLocation().toString);
return true;
}
player.sendMessage(ChatColor.RED + "You do not have permission!");
return true;
}
else {
Player getLocPlayer = (Player) args[0];
sender.sendMessage(ChatColor.GREEN + "" + getLocPlayer + "'s location is:" + getLocPlayer.getLocation().toString);
return true;
}
}
return false;
}
}```
how do i create normal scoreboards for storing information
@ripe oasis You can not cast a String to a Player
You also haven't registered the command.
ok
bStats doesn't update immediately.
ok
I have had no data for 5 hours and 30 mins
It is confusing
and Its the same for all plugins
JavaPlugin is instance of commandExecutor. You dont need to implement it anymore
bukkit 1.2.5
🤔
is it possible to detect wether a chunk was unloaded clientside by a player meaning if a player unloaded a chunk on his screen but another one is still in it
You can detect the chunk packets that get sent to a player. There is one that sends the chunk and one that "unloads" it for the player.
You cant actually check what player triggered a chunk unload as the chunk only gets unloaded if the server feels like it.
But you can keep track of what player sees which chunk.
quick question, is there an event that occurs when a entity gets scared of something?
Like a villager getting scared of a monster or something like that
i can't find anything
Damn, that's too bad
and yeah i'd already tested EntityTargetEvent but it requires the entity to target another entity
how can you best query whether an inventory is full
how do i create normal scoreboards for storing information
@hollow thorn
Read the javadocs
Is it allowed to create a directory outside of plugins folder with spigot?
I mean, it's not not allowed
You can do that if you'd like though it's generally discouraged
Hi, I am trying to create custom items by creating a class that extends ItemStack. When I add that item to an inventory and get it again using PlayerInventory#getItemInMainHand, any instanceof checks to see if it is the class returns false. Is there any way I can fix that?
And most people won't be happy with 13GB of memes suddenly in a folder on their desktop
Hi, I am trying to create custom items by creating a class that extends
ItemStack. When I add that item to an inventory and get it again usingPlayerInventory#getItemInMainHand, any instanceof checks to see if it is the class returnsfalse. Is there any way I can fix that?
Probably not possible, use persistantDataContainer
How would I use it?
Been out of the loop on 1.16, is there an API for making full RGB chat messages (or a Spigot guide)?
Three questions. 1) what event is the best to turn on/off game rules (like fire tick, fall damage, etc)? 2) How would I be able to stop player's from burning in lava (I thought fire damage would do it, but it doesn't? 3) I want to check if a player is standing on a beacon and only a beacon, and if they are do something. What would be the best event for that?
Thx. And is there a agreed upon standard of how it's written in configs?
&x&r&r&g&g&b&b
Kk.
And yes it is pain
That seems horrible
A lot of plugins just do &#rrggbb
Yh, I think ima do that.
how does it know when it ends? 😂
6 values
^^ hex is always the same length
That's general hex notation.
So whenever you're saying the hex of something, you'd put it like #xxxxxx. That's a general thing not an MC thing as well.
What about the game rule's not damage related (i.e. ANNOUNCE_ADVANCEMENTS, DO_DAYLIGHT_CYCLE, etc.)?
What do you mean event?
Game rules?
I don't think there is an event for when they are toggled, but you can use PlayerCommandPreprocessEvent to listen for them I guess
yes sorry typed that too fast @subtle blade
No event necessary. See World#setGameRuleValue() (or setGameRule(), can't quite remember)
But that doesn't tell you when they are changed
Unless you use a repeating task to check them
Oh is that what he wants?
I just want to turn like daylight cycle, weather, advancements, all off
Yeah you can do that with World#setGameRuleValue()
Should I do that in onEnable()? When I looked quickly on JavaDocs I found WorldEvent
Sure. You could definitely do it onEnable() if you'd like
Iterate over all the available game rules and loaded worlds
okay thanks!
Hi, I am trying to create custom items by creating a class that extends
ItemStack. When I add that item to an inventory and get it again usingPlayerInventory#getItemInMainHand, any instanceof checks to see if it is the class returnsfalse. Is there any way I can fix that?
And why wouldn’t it work?
how do i create normal scoreboards for storing information
@hollow thorn
You can't extend ItemStack
Well, you can, but it won't work as you expect
Bukkit makes copies or mirrors of NMS item stacks
PersistentDataContainers on its ItemMeta
how do i create normal scoreboards for storing information
Modifying its NBT to your desire
What I do is store a string in persistantDataContainer and then use that string to get a CustomItem from a map
Ok
Store a byte array
of what
how do i create normal scoreboards for storing information
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
thats for qui
also please don't spam your question
What do you mean "Storing information"
like normal usecase?
You can use a per player yml file, database or the PersistantDataContainer on a player
storing information as in the way people use scorboards in vannila
literally a score
what are you trying to store @hollow thorn ?
a number
I mean yeah I guess you can use a scoreboard
like how many blocks they've broken?
Make an objective, then use objective.setScore
.setscore doesnt exist
you need to create a scoreboard and then create an objective
i did this Scoreboard Defcon = Bukkit.getScoreboardManager().getNewScoreboard(); Objective objective = Defcon.registerNewObjective("Defcon", "dummy", "e");
Which is a bit confusing
i read it it doesnt help
I already sent a tutorial on making scoreboards and how to update them
Does a PersistentDataContainer persist after the item has been placed down?
nice.
Placed down as a block? no
Oh
In an itemframe, chest, etc, yes
Ok
You would have to transfer the data to the block
tbh that tutorial is really good for beginners to understand lmao it's what I used to learn
If it's a tile entity they also have a persistentDataContainer
If it's a normal block you will need something else
Entity vehicle = world.spawnEntity(loc, EntityType.BOAT);
((CraftEntity) vehicle).getHandle().setInvisible(true);```
Doesn't make the vehicle invis
😕
You'll need packets
Boat can't be invisible
but they do have to sit in it at the same time
so they can move the way they want
and take the mob with them
the mob will have to follow the location of the boat
@EventHandler
public void onPlayerMobInteract(PlayerInteractEntityEvent e) {
if (e.getRightClicked() instanceof (anymob)) {
Player pl = e.getPlayer();
Entity ent = e.getRightClicked();
World world = e.getPlayer().getWorld();
Location loc = e.getRightClicked().getLocation();
Entity vehicle = world.spawnEntity(loc, EntityType.BOAT);
((CraftEntity) vehicle).getHandle().setInvisible(true);
ent.setPassenger(vehicle);
vehicle.setPassenger(pl);
}
}```
the mob
yes.
but thats not possible without protocollib
at least thats what people said
so they told me that I should try this
now its 'ent.setPassenger(vehicle)'
but it should stay there(stick there) and the mob should follow the location of the boat
You will 100% need protocollib or nms to make it look half decent
Best you can do without it is teleporting the mob to an invisible horse the player is riding
but that'll have a difference in height with most things I believe
That's why I recommend making NMS extensions of each entity and modifying them to be controllable
NMS would be only one version right?
You can make it multi version with a bit extra work
ok
than I'll do that
smartest thing would be to make it which the latest version than right?
not 1.8
on which I currently am xd
i edit my score board how i do bal?
{player's balance} not working for me
i use with kiteboard
kk ty
iliketocode
after i dowload Placeholderapi
all time i do /pl i got kicked
please help
no
but when i do /pl
is just kick me
oh is show me error
intenral....
wait i copy paste the error
oh
i want send picture
can you unblock me please
is what is show me when i do /pl
i mean first is kick me to minehut lobby
that might be a feature of Minehut
it's not your server they're probably blocking you from executing the command
```[22:38:05] [Craft Scheduler Thread - 32/WARN]: [PlayerServer] Loaded class org.apache.commons.io.FileUtils from AdvancedBan v2.1.9 which is not a depend, softdepend or loadbefore of this plugin.````
is ?
I think it's a great place to start a community, however, definitely not the route you want to go to open a real server. One thing I really hate is they don't allow you to download files from your sever.
@ripe token thats an issue you have to bring up with Minehut there is little we can do about how they configure their servers.
Hey everyone. I want to make a Time Manager plugin that essentially schedules a method to run every x seconds to add to the time. My question is how does minecraft do this normally? Does it add a second to the time every 20 ticks?
could someone good with Maven help me find the dependency for MongoCrypts
org.mongodb.crypts
How would I save a list of worldnames to the config.yml dynamically? Something like this:
worlds:
worldone:
speed: 1
worldtwo:
speed: 2
Well eZ
thank you
I can't join my server, it pops with this. But when I /plugman disable all It lets me join. Also, others can join for some reason :/
https://gyazo.com/532d1d9c279493afbf3716e145a0ba44
Shouldn't really be using plugman anyways imo
I just wanted to find out if it was a corrupted world, plugin, or what
Yeah
I've tried removing 20+ Anything like Featherboard, ProtoclLib, ViaVersion, I've removed but still not letting (only me) join
Server version?
For some reason, ViaVersion is back but I deleted it via FTP on FileZilla a few hours ago ???
I've also tried deleting my playerdata but no luck
I've been trying to look for solutions for hours to learn from this but I'm just going to try to backup plugins.
Could I make a toggle ableoption of the viewing of banners through a plugin
Banners?
Yea
Technically yes
The server I play on uses a lot of banners and players lag from tile entities
So I was thinking I could add an option for viewing banners
You can technically filter packets and remove banner blocks although it's kinda of a mess
Although i’m not entirely sure how how to get started
Yeah I was thinking of using ProtocolLib’s api to do that
But I don’t know how to remove the actual banner blocks
But I guess if I get the plugin to stop sending the packet that might fix lag. Just might be ugly lol
Server is online, I'm getting spammed thishttps://hatebin.com/dkzbjemcrs
I think one solution is to filter the chunk data clientbound packet
But there may be others
I’ll look into that
Any solution that requires me not hooking into another plugin is good lol
How do you I check when a player is banned?
Code, I want to check when a player is banned and do a specific thing, example, broadcast that the player was banned
player.isBanned
^
or offlineplayer.isBanned
[18:31:20 ERROR]: Error occurred while enabling VulcanCore v3.0-SNAPSHOT (Is it up to date?)
java.lang.NoSuchMethodError: com.mongodb.client.internal.MongoClientDelegate.<init>(Lcom/mongodb/internal/connection/Cluster;Lorg/bson/codecs/configuration/CodecRegistry;Ljava/lang/Object;Lcom/mongodb/client/internal/Crypt;)V
at com.mongodb.MongoClient.<init>(MongoClient.java:346) ~[?:?]
at com.mongodb.MongoClient.<init>(MongoClient.java:205) ~[?:?]
at com.mongodb.MongoClient.<init>(MongoClient.java:194) ~[?:?]
at com.mongodb.MongoClient.<init>(MongoClient.java:155) ~[?:?]
at vulcanprisons.iron.vulcancore.mongo.MongoManager.<clinit>(MongoManager.java:10) ~[?:?]
I fucking hate mongo lol
Stop using it if you don’t know how to use it
Ok thanks!
probably but generally support is best directed towards authors and their means of support
Nice..
so what plugin are you looking for
Thanks
return server.getBannedPlayers().stream.filter(o -> o.getUuid().equals(p.getUuid())).orElse(false);
Smh
Here is where punctuation matters. There's a difference between
"Check when a player is banned and do a specific thing"
and
"Check, when a player is banned, do a specific thing"
Would player.isBanned return true by the time the PlayerQuitEvent is fired?
I'd imagine so, yes
When I join this happens, https://gyazo.com/c61c6c1fe5bc1673e3ab027e03fb57b6 & https://gyazo.com/30b25e7f160883e5d8c2d141ceaa2191
It's only me and on this account as well
I'm on a VPN anyways
nice, how is pebblehost going, heard it was good
Also, I've already done that countless times and I've removed a lot of plugins
Pebblehost is fine so far, dosen't let you store your backups on their servers though
oof
It's only me though ?
Could use Java 14 and enable it's informational null pointers 👀
I'm on 1.8
It pops with this now [Disconnect] User 4r8 has disconnected, reason: Internal Exception: java.io.IOException: Error while write(...): Broken pipe
I've looked up this issue and found a bunch of posts about it but I haven't found a fix for me
It dosen't make sense because I backed up all plugins to when It was working fine as well
Could it be client side? My other acc works though
Nope
I used Plugman to disable them though
I have these three api docs from their website
https://worldedit.enginehub.org/en/latest/api/concepts/regions/...
need help with world edit patterns
Hey! Is there a way I can check why my animals can't procreate? I mean, you can feed them to have the baby, but the baby never spawns
How do I log that event?
oh, I have to do a plugin for that purpose
If you are monitoring, use MONITOR
tbh I have 0 idea about Java
Thanks for the tip tho, maybe I'll take a general look to Spigot's plugin development
Yes, I do
Didn't change any __global__flag tho
let me check
is it possible to be limited by my entity limit settings?
Could be
Well nope, I don't see any flag that could be restricting it
sup
im running a 1.16.1 beta server, im looking at the console and see the memory usage is doing a weird pattern
is this a problem with the beta?
(1) 1.16.1 beta? (2) That's the garbage collector doing its thing
cool, nothing to worry about?
wdym by beta
manualy set the 1.16.1 release in buildtools so I got newer than the latest flag
oh, sure, though I wouldn't really consider that beta
but yeah, that's just normal
nothing to worry about
The GC periodically cleans up memory that isn't being used anymore
yeah I just noticed it was only going when the memory got full usage
and then diped to 0
should I switch from java 8 to java 14?
If everything works yes
Why is this error occuring?
com.destroystokyo.paper.exception.ServerInternalException: Attempted to place a tile entity (net.minecraft.server.v1_15_R1.TileEntitySkull@439e39f4) at 109,70,4 (Block{minecraft:air}) where there was no entity tile!
Source line: e.getBlock().setType(Material.AIR);
oh
You seeing the issue here? Cause I am
Yes. Google is your friend
How would I get every stone block in a specific area
How do I hide the skeleton's bow?
That's not Spigot Development
I'm trying to make a skeleton completely invisible but I do not know how to hide its bow
Does someone know how to do it?
@craggy jolt it's old, but the way to do it is most likely the same https://www.spigotmc.org/threads/how-do-i-remove-the-bow-from-a-skeleton.44002/. Please do some basic research before asking your question. Literally copied and pasted your question and it was the first link.
no way I've literally been searching for an hour. I tried typing everything except that lol
Thank you bro
"spigotmc how to hide a skeleton's bow"
I checked it out but its not what im looking for
I want the skeleton's bow to still be there but just invisible
ya know
Packets 🤔
either that or making a custom entity might work (you might run into the same issue tho if you create a custom skeleton)?
hmmm how do packets work. I looked it up and I still don't have a clue
Most of what you'll need will be here, https://wiki.vg/Protocol
Other than that if you prefer visual learning, I first learned how to create packets and send them with CodeRed's NPC tutorial. If you search "spigot coding with packets" on Youtube you're sure to find something
How can I make it where is someone is holding an item they get an effect? Like if someone is holding a special sword they get regen?
try listening for the event where u swap items
and then check if item issimilar to special sword
then add potion effect
and then maybe when they switch off of it u clear it?
That sounds good! Imma take a shower than learn how to do that lol
ah found the name of the event
it was PlayerItemHeldEvent
although if they pick up the sword without swapping items, or get it from a chest then it wont trigger
it might be better to go with a runnable? but idk how performance intensive that is
Pretty sure that is far better than runnables
I'm trying to get Minecraft's server.properties manager so I can modify a thing, but all the documentation talking about it is referencing old stuff.
No I didn't.
I don't want this to be version-dependent
so this is complicated and slightly annoying
I'm trying to set the default world btw. Afaik, the only way to do that is by modifying levelName
Whenever I log off in a certain world, and I try to log back on, it pops up with this https://gyazo.com/c61c6c1fe5bc1673e3ab027e03fb57b6. But I'm confused because It lets me join when I have all the plugins unloaded???
Narrow it down to a certain plugin?
I've tried that
When I log off on any other world, It works fine with or without the plugins
64 I think
Ok, thanks!
I use VARCHAR(64) when I store them in a database and I’ve never had a problem
Ok, thank you!
UUIDs in string form are 36 characters - 32 hexadecimal and 4 hyphens
Ohh ok thanks!
Why does the world look like this every time I join? I'm pretty sure this only happens in this world too
Why do mobs pause for a bit every so often after you hit them?
Maybe it's just my shit ping lol
Is there a plugin or a way to make it so that hostile mobs are passive until you hit them?
I have a world which according to essentials GC, has 26k entities in it and was causing lag. I have attempted to run a ,/kill @e and that only removed 4k. Is it possible to find and remove the remaining 26k entities?
Okay maybe this is some kind of 1:30 AM mistake, but I cant figure out why this code inevitably causes an internal server error when I attempt to access the memory down the line in the plugin
I have an array of Objects called drugs[]
This is where I initialize it:
Drug drugs[] = new Drug[18];
@Override
public void onEnable() {
config.addDefault("joinMessageEnabled", true);
config.options().copyDefaults(true);
saveConfig();
for(int i = 0; i < 9; i++) {
drugs[i].name = config.getString(Integer.toString(i) + ".name");
drugs[i].nameFormatted = config.getString(Integer.toString(i) + ".nameFormatted");
drugs[i].effectLineOne = config.getString(Integer.toString(i) + ".effectLineOne");
drugs[i].effectLineTwo = config.getString(Integer.toString(i) + ".effectLineTwo");
drugs[i].sellPrice = config.getInt(Integer.toString(i) + ".sellPrice");
drugs[i].buyPrice = config.getInt(Integer.toString(i) + ".buyPrice");
}
getServer().getPluginManager().registerEvents(this, this);
}
This is my config.yml:
joinMessageEnabled: true
'1':
name: Coca
nameFormatted: Coca
buyPrice: 0
sellPrice: 0
effectLineOne: ''
effectLineTwo: ''
'2':
name: Meth
nameFormatted: Meth
buyPrice: 0
sellPrice: 0
effectLineOne: ''
effectLineTwo: ''
'3':
name: Cocaine
nameFormatted: Cocaine
buyPrice: 0
sellPrice: 0
effectLineOne: ''
effectLineTwo: ''
'4':
name: Shrooms
nameFormatted: Shrooms
buyPrice: 0
sellPrice: 0
effectLineOne: ''
effectLineTwo: ''
'5':
name: Heroin
nameFormatted: Heroin
buyPrice: 0
sellPrice: 0
effectLineOne: ''
effectLineTwo: ''
'6':
name: LSD
nameFormatted: LSD
buyPrice: 0
sellPrice: 0
effectLineOne: ''
effectLineTwo: ''
'7':
name: Weed
nameFormatted: Weed
buyPrice: 0
sellPrice: 0
effectLineOne: ''
effectLineTwo: ''
'8':
name: Opium
nameFormatted: Opium
buyPrice: 0
sellPrice: 0
effectLineOne: ''
effectLineTwo: ''```
is there something I'm doing wrong as far as how I parse this file?
you aren't initializing drugs[i] to a new instance of Drug.
oh
Why do you have a list called drugs?
its a drugs factions server
Ok then
Does anyone know a plugin or how to give a mob another name row (like a hologram), here is an example:
I don't know if they use an armor stand, a scoreboard etc... and it looks hella cool.
same code as just above, did that fix, now everything is null
is there something else wrong with it?
check your console, it should point towards the line triggering this error
@daring oracle Size 1 or negative size slime riding the entity
and an armorstand riding that
To show name
Is there maybe a plugin for that?
probably, just use the power of searching
Chunk loading / unloading is absolutely horrible in 1.16+, does anyone know anything that can be done to help fix this issue? Spigot wants everyone to run latest but how can servers be asked to run 1.16 if the server is just too badly optimised
dev.barone.RetroDrugs.Gui.initializeItems(Gui.java:33) ~[?:?]
dev.barone.RetroDrugs.Gui.<init>(Gui.java:26) ~[?:?]
dev.barone.RetroDrugs.Main.onCommand(Main.java:54) ~[?:?]
those are the lines you are interested in
look them up on your code
some value you are passing, or object you are using, is null
yeah
ik its the values in drugs array
I already knew that
same code as just above, did that fix, now everything is null
what's line 33 of initializeItems and show your updated code?
^
one sec
public void initializeItems(Drug drugs[]) {
System.out.println("[RetroDrugs Debug]" + drugs[0].nameFormatted);
for(Drug drug : drugs) {
inv.addItem(createGuiItem(Material.DIAMOND, drug.nameFormatted, drug.effectLineOne, drug.effectLineTwo)); //Line 33
}
//inv.addItem(createGuiItem(Material.DIAMOND_SWORD, "Example Sword", "§aFirst line of the lore", "§bSecond line of the lore"));
//inv.addItem(createGuiItem(Material.IRON_HELMET, "§bExample Helmet", "§aFirst line of the lore", "§bSecond line of the lore"));
}```
the println() prints null
Alright, next check line 26 of your gui class
public class Gui implements Listener {
private final Inventory inv;
public Gui(int rows, String name, Drug drugs[]) {
// Create a new inventory, with no owner (as this isn't a real inventory), a size of nine, called example
int size = 9 * rows;
inv = Bukkit.createInventory(null, size, name);
// Put the items into the inventory
initializeItems(drugs); //Line 26
}
lastly, line 54 of your Main class
whatever you passed there is null
thats the root problem
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if(command.getName().equalsIgnoreCase("drugs") || command.getName().equalsIgnoreCase("d")) {
Player p;
if(sender instanceof Player) {
p = (Player)sender;
sender.sendMessage("[RetroDrugs] Opening drugs menu.");
Gui gui = new Gui(2, "Drugs List", drugs); //Line 54
gui.openInventory(p);
} else {
sender.sendMessage("This command can only be run by a player.");
}
return true;
}
return false;
}```
i don't see the drugs array being intialized anywhere within your method
one sec
is it a field?
public class Main extends JavaPlugin implements Listener {
FileConfiguration config = getConfig();
Drug drugs[] = new Drug[18];
@Override
public void onEnable() {
config.addDefault("joinMessageEnabled", true);
config.options().copyDefaults(true);
saveConfig();
for(int i = 0; i < 9; i++) {
drugs[i] = new Drug();
drugs[i].name = config.getString(Integer.toString(i) + ".name");
drugs[i].nameFormatted = config.getString(Integer.toString(i) + ".nameFormatted");
drugs[i].effectLineOne = config.getString(Integer.toString(i) + ".effectLineOne");
drugs[i].effectLineTwo = config.getString(Integer.toString(i) + ".effectLineTwo");
drugs[i].sellPrice = config.getInt(Integer.toString(i) + ".sellPrice");
drugs[i].buyPrice = config.getInt(Integer.toString(i) + ".buyPrice");
}
getServer().getPluginManager().registerEvents(this, this);
}```
why are you using brackets for here Drug drugs[] = new Drug[18];
well i could just do Drug drugs[18] I suppose.
that didnt work either
well actually that wont even compile lol
your initilaiizing the Drugs class, so you need to be using parentheses
not brackets
And unless you have a constructor that contains an int parameter you cannot pass anything to that class
that's an array initializer @high mantle
funnily enough i've done java for like 3 years and i've never seen that until now
im a c/c++ person mostly lol
we dont have lists in c, unless you make them
Optimization wise, am I better off with an Array or a List? If it's fixed size I'd imagine an array right?
you can use either
Object[] array = new Object[16];
or
Object array[] = new Object[16];
there's no difference
I believe the bottom one is called a c style array initializer.
the bottom one is what I'm familiar with so probably
like I said i rarely use arrays aside from varargs and even then I usually convert them to Lists
its just so much easier to work with
how would you go about this with a list
Dudes, I'm new to Java programming, I have a fast question... I'm using IntelliJ, when I build my project, it's a 32mb jar
and it's just a print test lmao
You are shading the whole spigot server in then...
okay got a question... 1.8 help isnt supportet i know... i am creating a scoreboard with bungeecord. If i use it on 1.16, on create it shows this error:
On 1.8 it works perfectly. so how should i format my scoreboard? idk anything about json tbh
whoops
Isn't compile supposed to just use it for compile purposes?
Do you use the mcdev plugin or maven?
if im correct you're not creating any new instances of the class, you're just making an amount of indexes
maybe that's it?
if not then i seriously don't know. there are lot smarter people than me
i just came on to ask a question lol
Where can I see that dependency file? Can't see it
Its your pom.xml
And with maven you dont use jar files from your system and you dont export the project by hand
I am attempting to generate a world the moment a player places a metadata sign, then paste a schematic inside it using the ConsoleCommandSender and WorldEdit to create the lobby. It is an empty world, the class used for chunkdata is as follows.
public class VoidWorld extends ChunkGenerator {
@Override
public ChunkData generateChunkData(World world, Random random, int chunkX, int chunkZ, BiomeGrid biome) {
return createChunkData(world);
}
}
This generates like normal, but whenever the consolecommandsender attempts to load and paste the schematic at the specified coordinates, it comes up with the error "the world was unloaded and the reference was unavailable" (error log at the bottom of message) that points towards these lines:
Bukkit.dispatchCommand(console, "/schematic load bedwarslobby");
Bukkit.dispatchCommand(console, "/world bedwars" + i);
Bukkit.dispatchCommand(console, "/pos1 " + spawnCoords);
Bukkit.dispatchCommand(console, "/pos2 " + spawnCoords);
Bukkit.dispatchCommand(console, "/paste");
all variables used for the dispatch command are here:
World world = Bukkit.createWorld(new WorldCreator("bedwars" + i).generator(new VoidWorld()));
Location spawn = world.getSpawnLocation();
String spawnCoords = spawn.getBlockX() + "," + spawn.getBlockY() + "," + spawn.getBlockZ();
ConsoleCommandSender console = Bukkit.getServer().getConsoleSender();
I assumed the world was loaded upon creation, but I guess not. How would I get this to occur?
https://media.discordapp.net/attachments/690470011382267904/736266595130933298/unknown.png?width=789&height=677
holy
this is a repost because no one answered it a couple nights ago
Ok I'll take a look, thanks 7smile7
a massive block of a message...
its only because its a bunch of references
ah
so i looked into it myself, and it works fine until i unload and delete a world
im pretty sure its the unloading that causes the issue
man 1.16 is so weird sometimes
ye
createWorld creates/loads the world
Now that I'm thinking, nevermind I' not using Maven, I just used it to generate a offline javadoc
I manually imported the API
(I don't have a pom.xml)
Ok then you build an artifact right?
yes
np
well thats weird then. WorldEdit doesn't seem to think so even though I just made it
if I were to unload then delete a world, then soon after create a new world with the same name, would that cause worldedit to trip up?
maybe it looks at it via name, and when i unload the world it remembers that unloaded world name
regardless of if its actually a new world or not
Referencing a world by its name and then re creating it completely on runtime just begs for problems.
Also why dont you use the worldedit api?
because all i can find is their project managers and i don't use that
does anyone know a flag or plugin that disables certain armor types, and items with enchants inside a world guard region?
What do you mean by project managers...
maven, gradle, etc
its also easier just to make the console run the command
Might not work with WE
Yes but then you run into problems like that. With the api you could reference worlds by their uuids
true
Your problem could be the cache that is used for something like /undo yields a world reference or name -> world link
No idea... just increment i every time a world gets created
I have no idea why you would want to create/delete so many worlds at runtime anyways...
the idea is to have a world per lobby, since the game mechanics can get a bit intensive
A world per lobby of a minigame?
the game lobby
"the game" lobby?
ok
so there are hub lobbies in other servers - the one im in doesn't have that since we're not big enough for it to matter, but it does matter when it comes to fps/performance, so its important that all game sessions are in their own world
for there are multiple signs, each one intrinsically linked to their specified world, and when right click it sends the player their to the game lobby, where they wait until they have enough players to start
therefore i need to create a way that's easy enough for them to create these lobbies and allow players relatively easy passage to these lobbies.
when the sign is broken that world is unloaded to prevent a session lock error happening, then the world folder is deleted
Then your plugin is for personal use only?
it is private yes
Then just create 3 worlds per game at the start and link the signs to them.
but how badly can a world be damaged?
🤔
I recommend only storing the damaged blocks in a deque
I mean it is possible to create worlds when the sign is placed and remove the worlds when the sign is destroyed but if you need to use to dispatch commands to use worldedit you should not try to tinker with worlds like that.
not sure but wasn't world unloading making leaks?
i'm sure for example i store location
a plugin unloading that map
Depends. If you are carefull then not.
could still be kept by a plugin
just for having that location reference
tho
locations are weakreferences now
Does a location hold a strong reference to a World? let me check.
it does not
but that doesn't mean other plugins don't use worlds
in different ways
thats how i link my signs to their worlds
