#help-archived
1 messages · Page 111 of 1
@final osprey windows has trouble deleting files that have other open file handles
not many know kotlin for scripting
You can use Ruby 🤷♂️
to support other scripts for modding in my game
oh youre suddenly telling us what you want
@opal marsh i know that but why does it cause the server to hang and restart?
graalvm is the new thing
@final osprey so if anything else is opening the files while the server is running, it could mess with stuff
i mentioned already
idk if u checked that out yet
this is second time i mentioned
@final osprey here, I'm gonna take it to dms lol
@opal marsh i agree
Hey does anyone know if there is a way of setting the view distance per world? I've tried ((CraftWorld) world).getHandle().spigotConfig.viewDistance = 3; but it seems to cause some wonkyness and chunks have a hard time loading
Why doesn't it let me make premium resources?
?premium
public void Corazon(PlayerInventory playerInventory){
if (playerInventory.contains(Material.getMaterial("minecraft:structure_void"))){
}
Which variable shoud i put to put player.setHealth(24)?
Like
Player player = (Player) ..... ;
@wanton delta you might want to look into how this plugin does it: https://github.com/froobynooby/ViewDistanceTweaks
@azure finch I'm confused on what you're asking. Where are you calling the function from?
?
this is a function you've written, yes?
I want to give more health if a player has an structure void
you can add a Player parameter to the method
How i do that?
Are you able to have an Asynchronous task with 2 Task Timers within?
@azure finch https://stackoverflow.com/questions/17837117/java-sending-multiple-parameters-to-method this is how you can send multiple parameters to a method if that's what you're asking
Ty im literally starting srry
@ashen stirrup do you have an async task and within that task you're registering two task timers? I'm confused
@azure finch no problem. I don't know of any off the top of my head but I'm sure there are many members here who can direct you do a good Java book
countdownRun = true;
new BukkitRunnable(){
@Override
public void run() {
new BukkitRunnable(){
Location animation = location.clone().add(0.0, 33.0, 0.0);
@Override
public void run() {
if (countdownRun){
animation.subtract(0.0, 4.0, 0.0);
animation.getBlock().setType(Material.CHEST);
animation.clone().add(0.0, 4.0, 0.0).getBlock().setType(Material.AIR);
} else {
this.cancel();
}
}
}.runTaskTimer(MineTropicalSupplyDrop.getPlugin(MineTropicalSupplyDrop.class), 0L, 20L);
new BukkitRunnable(){
int countdown = 0;
@Override
public void run() {
if (countdown != 8){
location.clone().getWorld().spawnEntity(location, EntityType.FIREWORK);
countdown++;
} else{
countdownRun = false;
this.cancel();
}
}
}.runTaskTimer(MineTropicalSupplyDrop.getPlugin(MineTropicalSupplyDrop.class), 0L, 20*4);
} }.runTaskAsynchronously(MineTropicalSupplyDrop.getPlugin(MineTropicalSupplyDrop.class));
the syntax is a little hard to read with discord's formatting and wrapping but as far as I can tell, that should work fine
is it not working for some reason?
@opal marsh I don´t know how to make the parameter 😦
@azure finch I'll dm you
What do I put for api-version? IDE says it needs to be a string, though forums say it needs to be an integer (1.13, 1.14, or 1.15). Just confused
1.13, 1.14, and 1.15 are not integers. can you link to the forums you're referencing?
to directly answer your question, put the version of the api you're using in your pom.xml
so for "1.15.2-R0.1-SNAPSHOT", I'd put "1.15"
https://www.spigotmc.org/wiki/plugin-yml/
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/plugin/PluginDescriptionFile.html
Both of these just says to use 1.13, 1.14, or 1.15. IDE is telling me it needs to be a string yet it's a number. I'm just going based off directly from the links
do both of those links say 1.13 is a number
@Nullable String getAPIVersion() Gives the API version which this plugin is designed to support.
I'm saying that my IDE is saying that it's a number. My IDE is yelling at me so I'm basically just asking if this is right
api-version
The version of the API you want to use.
1.13, 1.14, and 1.15 are the available versions.
This will signal to the server that your plugin has been coded with a specific server version in mind, and that it should not apply any sort of backwards compatibility measures. As a result you will also need to make sure that you have programmed your code to account for reading of older configurations, data, etc... .Each server version can decide how compatibility is achieved, unknown or future versions will prevent the plugin from enabling. As of the 1.14 release, the api-version 1.13 is still allowed - however future versions may drop backwards support based on this version.
Example:
Code (YAML):
api-version: 1.15
I imagine either works
don't worry about the message but if you want, I think you can probably just wrap it in quotes so it's a clear string
assuming the number can be cast to a string and that's how it works
1.15 and '1.15' probably both work, i'd stick to just using the number format
i have a kit plugin, but i need to give player a way to redeem money
i have vault
i just need the command
can you elaborate on what you mean by "redeem money"?
sorry i am italian, not very good at english. i mean some sort of paper sheet and when you right click on it, it gives you money
if you're using Essentials, you can modify the worth.yml file to enable selling paper
though that would enable selling of all paper, not just the paper from the kit
i am not talking of paper, it could be every block
ok, whatever, i'll use commands.
How would I go about making a sort of pets-plugin where you can spawn and get a mob to follow you around?
you may need to either use NMS (or reflection) or the Paper api to do pathfinding
you mean my api 😛 I did the pathfinding one lol
is it just me (I'm almost undoubtedly doing things wrong) or is the persistent metadata api really obtuse to work with?
I can't find a way to make a string list serialize directly to the string list nbt tags
and yeah, I know, I can just serialize it as a byte array and use that
it's also pretty annoying being unable to query keys and unable to check if a removal was successful
hey does anyone know how to detect an item frame?
in what context? in a chunk?
are you talking to me?
yes
well in a radius
and i want a hologram placed there but i do not know how to do that
and i've tried multiple times
and scoured the internet in search of an answer
so
I would appreciatte the help
🙂
the naïve approach I would take is to get all the item frames in the world (https://hub.spigotmc.org/javadocs/spigot/org/bukkit/World.html#getEntitiesByClass-java.lang.Class-), then use a removeIf predicate to check if the distanceSquared between the location of the item frame and the center of the radius is larger than the radius squared
np
I will tell you if I have any problems or errors many thanks!
Someone knows a plugin or something the make the players on server in like 1.15.2 to be able walk into other players? (Like most of the serveres)
if you're using paper, you can set enable-player-collisions: false in the paper.yml
if not, https://www.spigotmc.org/resources/no-collision-with-patch-only-spigot.26347/ looks like it will work
you mean my api 😛 I did the pathfinding one lol
@timid valley I mean, he would use both apis, but am still infected with the bad spigot names, when I hear pathfinding I still think of mob goals...
Hey i dont mean to ask for the 3rd time but is there a nice way to set a view distance per world
did you check out the source code I linked?
by api no, config file yes
well spigot doesnt have an api for that
When i use that method aikar, the chunks seem to have trouble loading
If u look at my msg
I try to alter the config when creating a wod
but, there is a method deep in the nms source you can call to change view distance
changing what you linked isnt the right way
you do have a copy of the server source code right... ?
yea
open the file ChunkMapDistance
and inspect the methods to find the one
im not at code i cant find it for you 😛
its going to be a one letter method name with a single int parameter
no i meant like is that gotten from world or smth
no its literally a function that "changes view distance"
i think youre not understanding me
no I am, your not understanding me
you want to change view distance, you need to call the function to actually change the view distance
correct
i was just confused if ChunkMapDistance was a variable you got from a getter
world.getChunkProvider().playerChunkMap.distanceSomething
actually it might live in player chunk map
yea thats what im seeing
oh, the method is literally setViewDistance
is there a way to do notes in my config.yml file?
notes
I'm new to working with Bukkit worlds in plugins, would the Bukkit.getWorld() parameter be the filename or the world name inside MC?
Also do I have to load it before teleporting?
world name
ideally the file name should also be the world name
and if it's not loaded yes
new WorldCreator("world").createWorld();
Ok thanks!
👍
does anyone know how to get entities within a radius?
I would welcome the help!
😐
anyone there?
I think you can make BoundingBoxes, not sure if they're in Bukkit though
Yeah don't do that
@pallid turret are you talking to me??
Yes
Well how do you want to check the entities?
well i want to check
By another entity or a location in the world?
if there is an itemframe in a radius of a few blocks
Ok
because i'm using the animated frames plugin
What do you want to use to check the radius?
well the player
yeah
because they're executing the afcreate command
a straight line from the center to the circumference of a circle or sphere.
Ok, I'm not sure if an itemframe is an entity
Let me make an example
because i'm using the animated frames plugin
and want to make a hologram for an item frame
because the image needs a name
so they know which image they're deleting
or replacing
this is the last part
of my editing for now
for(Player player : Bukkit.getServer().getOnlinePlayers()) {
for(Entity entity : player.getNearbyEntities(x, y, z)) {
if(entity instanceof ItemFrame) {
ItemFrame itemFrame = (ItemFrame) entity;
//Do your code here for the itemframe
}
}
}
@strange grove
@pallid turret
I have a problem!
(Player player : Bukkit.getServer().getOnlinePlayers()) {
for(Entity entity : player.getNearbyEntities(1, 1, 1)) {
if(entity instanceof ItemFrame) {
ItemFrame itemFrame = (ItemFrame) entity;
ArmorStand holograph = (ArmorStand) ((ItemFrame) Entity).getWorld().spawnEntity(((ItemFrame) Entity).getLocation(),EntityType.ARMOR_STAND);
holograph.setVisible(false);
holograph.setCustomNameVisible(true);
holograph.setCustomName(ChatColor.BLUE+"hello!");
}
}
}
Ok, I don't think I can really help you with the ItemFrames though what is it?
well
the hologram isn't spawning!
and i'm confused why it isn't
``(Player player : Bukkit.getServer().getOnlinePlayers()) {
for(Entity entity : player.getNearbyEntities(1, 1, 1)) {
if(entity instanceof ItemFrame) {
ItemFrame itemFrame = (ItemFrame) entity;
ArmorStand holograph = (ArmorStand) ((ItemFrame) Entity).getWorld().spawnEntity(((ItemFrame) Entity).getLocation(),EntityType.ARMOR_STAND);
holograph.setVisible(false);
holograph.setCustomNameVisible(true);
holograph.setCustomName(ChatColor.BLUE+"hello!");
}
}
}`
Ok, I haven't messed with Holograms, sorry!
it's all good
if you don't know
how to do holograms
i'm a newb myself
but thx for your help for most of the way!
hey does anoyne know what is wrong with my hologram?
I would apprecciate the help thx!
@anyone?
hmm
Our small server suddenly started lagging due to CPU. We think it's too many turtles from a turtle farm. When just one person on the server, we're seeing frequent "Can't keep up! Is the server overloaded" messages. Installed spigot and looking for any tuning docs. Also, the commands like /whitelist <username> aren't working with spigot. Known issue?
if there's many turtles in a small area, you can try decreasing max-entity-collisions in spigot.yml
@lusty basin
whitelist add (username)
Am I able to hide entities from other player? -> I am the only one, who can see them
Thanks for the suggestions! Can I edit spigot.yml and reload without restarting server jar?
I recommend restarting instead of reloading
Can anyone help me find out why I can't copy a world and load it? Here's my code so far:
I'm trying to copy it to the main directory so I can load it, the problem is I have a map and want it to reset after each event
Or before
If there is a way to make a world not save when created again that would also work I think
Good evening, I was told that with AuthMeReloaded I could hide the password at the time of / login by * in a way a streamer mode. Except that I've been looking for a day and I can't find it. Does anyone have the solution?
@remote ore as far as I'm aware, that's not possible without a mod. I don't think it can be done with packets alone
Hey guys, what causes this?
I'm only using citizens and plugins that are my own, but I don't send any messages out like this
the entity is removed
@opal marsh
I don't understand because a lot of big servers have this security except that there is no need to launcher to join their servers so there are no mods?
did you player.remove()? 🤔
No
@remote ore can you give an example? I've never seen this before and I'm almost completely certain a plugin can't modify the chat box (without the chat/command suggestion fancy chat)
@opal marsh I haven't played crack for a long time and therefore I no longer type my password. In this case, could you explain to me how to do so that the premiums do not need / login and that the cracks login as before?
It's a plugin?
that's just saving the session, nothing special there
that's a completely different issue than hiding the password when /login is typed
https://wiki.vg/Protocol#Chat_Message_.28clientbound.29 This is the only chat packet I found and it says it's clientbound
sessions:
# Do you want to enable the session feature?
# If enabled, when a player authenticates successfully,
# his IP and his nickname is saved.
# The next time the player joins the server, if his IP
# is the same as last time and the timeout hasn't
# expired, he will not need to authenticate.
enabled: false
# After how many minutes should a session expire?
# A player's session ends after the timeout or if his IP has changed
timeout: 10```
you have to enable sessions
Seems like it @remote ore
Can anyone help me find out why I can't copy a world and load it? Here's my code so far:
https://hastebin.com/atazosobof.java
I'm trying to copy it to the main directory so I can load it, the problem is I have a map and want it to reset after each event
Or before
If there is a way to make a world not save when created again that would also work I think?
It works thank you very much
I have another problem, all the players see that when I connect : > [01:52:38 INFO]: [AuthMe] The user iFlyf_ has 2 accounts:
[01:52:38 INFO]: [AuthMe] §7§aiFlyf_§7, yungsoul_.
it looks like by default, sessions will expire after 10 minutes so you may want to bump that number up
I'm not familiar enough with AuthMe to know for sure but I suspect your other problem might be caused by a name change
My brother and me are the admin of the server. We have the same IP and it write that always when me or my brother connect
in that case, you need to increase the max accounts per ip setting
it's probably just a regular notification
try toggling this: # Should we display all other accounts from a player when he joins? # permission: /authme.admin.accounts displayOtherAccounts: true
It works perfectly thank you !
Hey guys, what causes this?
@frigid ember you have chat disabled on your client lol
Oh alright,
thanks
for (ItemStack item : p.getInventory().getContents()) {
if (item == null)
continue;
ItemMeta meta = item.getItemMeta();
List<String> lore = meta.getLore();
if (lore == null) {
continue;
}
if (NBTEditor.getItemTag(item, "price") == null) {
p.sendMessage("no price");
continue;
}
for (int i = lore.size() - 1; i > 1; i--) {
lore.remove(i);
p.sendMessage("lore changed: 1");
}
p.sendMessage("lore changed");
meta.setLore(lore);
item.setItemMeta(meta);
}
p.updateInventory();
Hey guys, I have this in inventory close event, but when I close the inventory the items only update the lore if I click then and put it back into my inventory
The last picture is after I click it and put it back into my inventory
Hi! I'm trying to make a Bungee plugin, so I need help to execute a command in the BungeeCord console from another server, because I'm making a plugin with a GUI and click events, so I need when the player clicks an specify item, plugin gets the BungeeCord console and execute a command in it. Rather, I'm making a BanGUI
@remote ore the plugin you are looking for is FastLogin
I only learned about that plugins existence when we broke it lol ;3
gotta love the hacks some plugins do
it like hooks the login process to try to authenticate as an online-mode=true session for offline mode servers, so if a real mc account joins they auto login
@timid valley you talk about the "streamer mode" or when I don't have to write /login for connection?
login thing
to let legal accounts bypass authme and only make illegal players have to /login
“illegal”
yes, stealing software is illegal
It works I just have to switch false an option
Not all offline players are illegal
yes they are
🤔
if you own the game, why wouldnt you login to your legal account?
Not illegal to use your own auth servers 👀
@ Aikar this is MY favourite plugin
https://www.spigotmc.org/resources/entitytrackerfixer-fix-1-14-4-1-15-entitytick-lag.70902/
You bet your ass it forcibly injects its own entity tracker implementation into the server!
for some reason this: public void openInventory(final Player player) { Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() { public void run() { final Inventory inv = worldsAddedToGUI(player); player.openInventory(inv); } }, 1L); } is returning this [19:13:27] [Server thread/ERROR]: Could not pass event InventoryClickEvent to FreeBuildTools v1.0 java.lang.NoClassDefFoundError: com/voidcitymc/plugins/freebuildtools/WorldsAddedToGUI$1 at com.voidcitymc.plugins.freebuildtools.WorldsAddedToGUI.openInventory(WorldsAddedToGUI.java:95) ~[?:?]
run a clean build of your plugin
private final static HypixelSkyblock main = HypixelSkyblock.getPlugin(HypixelSkyblock.class);
Hey guys, is this correct use of static if I only want to use it once?
Why would you make it static when you could just call the function and make it a variable, and why would you only want to call it once?
It’s a very efficient/fast method
@frigid ember
@plush river when I get the Rank I'm using rank manager
public Rank getRank() {
Rank rank = main.getRankManager().getRank(rankKey);
if (!rank.getKey().equals(rankKey)) {
rankKey = rank.getKey();
}
return main.getRankManager().getRank(rankKey);
}
It doesn’t look like it needs to be static in that context @frigid ember
alright, so @plush river would this be correct?
private final HypixelSkyblock main = HypixelSkyblock.getPlugin(HypixelSkyblock.class);
Yeah, that should work
Anyone know how to fix a corrupted chunk
Hey guys, why don't people use private constructors on main classes? I thought there weren't supposed to be multiple instances?
yo what do y'all think about this
https://www.mc-market.org/threads/591489/#post-4535735
is it a scam or nah ^
@frigid ember doesn't seem like it
Some websites even offer completely free web hosting with custom domains and free certification, so I wouldn't be surprised if they offer $0.75
But seems like they've only been up for a few days
some websites offer complete web hosting?
could you tell me those websites
most free websites have a lot of issues with them
Hey guys I have a somewhat "complicated" question. I am running a modded 1.12.2 server using sponge and sponge plugins. Since I started a vanilla server and using spigot for plugins I've ended up purchasing some plugins that I really love and would like to run them on my modded server.
How would I go about running spigot on a forge server legally? I'm asking because I've made sure to follow the EULA and being a server owner during the Mojang bukkit DMCA debacle I don't want to jeopardise my server(s).
What is the best way to display current world size to players? I mean the most optimized way in terms of performance
...and also players count
There is an event when someone set the command inside command block?
I'm getting a super strange error!
Null pointer exception on this line:
OfflinePlayer[] offlinePlayers = Bukkit.getOfflinePlayers();
Is this possible in any context at all>
I mean
Why do you need the Offline Players list?
That means Bukkit is null right?!
Oh
I made a lib for commands
I use it for player auto completes
Bukkit can't be null, we have to chec khow the getOfflinePlayers works
Oh, then I'm going to do some search
Oh, you're right, there is a line on the stack trace above that
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.getOfflinePlayers(CraftServer.java:1622) ~[patched_1.15.2.jar:git-Paper-273]
Anyone know the NMS call to get the preferred tool to break something
@pastel fox Bukkit#getOfflinePlayers calls server.getOfflinePlayers and this method has a @NotNull annotation ^^
Can you please give me the whole error stack trace?
@undone narwhal sure, just trying something
It could also be SlimeWorldManager because it patches the server jar
In fact, now that I think about it
It doesn't save player data soo
damaged model tag isn't working on 1.13+?
I've tried it on 14 15 and snapshots, game just ignoring it
There is an event when someone set the command inside command block?
Hey guys I have a somewhat "complicated" question. I am running a modded 1.12.2 server using sponge and sponge plugins. Since I started a vanilla server and using spigot for plugins I've ended up purchasing some plugins that I really love and would like to run them on my modded server.
How would I go about running spigot on a forge server legally? I'm asking because I've made sure to follow the EULA and being a server owner during the Mojang bukkit DMCA debacle I don't want to jeopardise my server(s).
Any help on this?
not aware of anything past 1.7.10
oof that sucks 😦
@pastel fox for the love of everything great please never use that method!!
md_5 can we deprecate/spam console warnings for getOfflinePlayers() 😦
aka, load every player data file off disk blocking for long time
if you got a long lived server with literally over 100k files there, bye bye server using that
might be useful for imports tho
imports?
its better to keep record of players in an external db, even sqlite on disk is fine
like i have tab completion for "give me offline players who's played in past 90 days who's name starts with Ma"
bogo
Anyone seen this error before?
nope Id open a bug report
I will make a video to show when it happens.
Whenever I die while riding an armor stand it errors.
You can kind of see that I am sliding weirdly when I die.
Hey guys, what's the best plugin to stop flying in a vanilla server?
I mean the flying module from stuff like impact, WWE
Hi everyone. Im kinda new to plugin dev and OOP coding in java (few mounth), same to git.
I am interested in question related to version control itself. I can't find anything that will help me how to understand what kind of changes affect your version. Like, in minecraft you have versions, like 1.15.2, 1.6, snapshots, beta, alpha...
So, my question is that I simply don't understand what kind of changes makes you understand how exactly to change version identifier. For example, I have version 1.0 and I made some changes and I don't understand is it 1.1 or 1.0.1 now.
I will be grateful for answering my question. May be there is some literature about it or document also.
Sorry if I wrote to wrong channel.
You should start with version 1, unless you know that the first version you "release" is incomplete in some way.
As to how you increment the versions, that's up to you, but use the major, minor, build numbering as a guide.
It's not necessary to have every version you commit to source control as another version - you'll soon have a very large version number indeed. You only need to increment the version number (in some way) when you release a new version to the outside world.
So If you make a major change move from version 1.0.0.0 to version 2.0.0.0. If you make a smaller change move from 1.0.0.0 to 1.1.0.0. If you make a minor change then go from 1.0.0.0 to 1.0.1.0 (you fixed some bugs).
From StackOverflow
thank you
You should start with version 1, unless you know that the first version you "release" is incomplete in some way.
As to how you increment the versions, that's up to you, but use the major, minor, build numbering as a guide.
It's not necessary to have every version you commit to source control as another version - you'll soon have a very large version number indeed. You only need to increment the version number (in some way) when you release a new version to the outside world.
So If you make a major change move from version 1.0.0.0 to version 2.0.0.0. If you make a smaller change move from 1.0.0.0 to 1.1.0.0. If you make a minor change then go from 1.0.0.0 to 1.0.1.0 (you fixed some bugs).
From StackOverflow
But where minor ends and major starts? xD
Okay. Thank you very much!
is it necessary to check item != null && item.getType() != Material.AIR
I use it a lot
(more accurately item == null || item.getType() == Material.AIR)
its probably not a bad idea
the API is a bit inconsistent
most things should just return null
but a couple things return air
I will say though if the method changes it will be a change from AIR -> null
niceeee, good to know
so if it works at the moment with just null, you can leave it at that
👍
@fleet crane change from air to null or null to air? It seems like the inventory API was changed from null -> air recently
in 1.8.8 you can get null items from the inventory but in 1.15.2 it was changed to return non null items and return AIR items
unless I'm mistaken
oof it looks like I'm wrong, I seem to remember somewhere giving back non-null items which used to give back nullable items 0.o
/**
* Gets the ItemStack at the given equipment slot in the inventory.
*
* @param slot the slot to get the ItemStack
*
* @return the ItemStack in the given slot
*/
@NotNull
public ItemStack getItem(@NotNull EquipmentSlot slot);``` it was this, looks like md was right, my bad
hi everyone i am developing a plugin for holograms and i would like to add the possibility to create floating heads like floating items but i don't know how to do with usernames instead of base64 encryption
You want to set textures with usernames ?
Ah yes the famous base64 encryption
best encryption too
ok I give you an example so you understand better
you see that there is a holographic item and I would like to do the same with custom heads
@undone narwhal yes
Shut up all
Marc have you tried searching online how to change player_skull owner? If I well remember there is a simple method to set texture with player name
What kind of plugin are you making btw? Just a basic hologram system?
@undone narwhal no this is a custom made plugin for my server
Okay :)
ummm
Could you send code @floral isle ?
AHHHHHH
I think I know what you want
Uhhh
That's quite hard
You need to find the class for custom skull
Or create the itemstack
And use SkullMeta
And create a dropped item from that ItemStack
Or just set the skull in the helmet slot of an armorstand
Or just set the skull in the helmet slot of an armorstand
@undone narwhal He would then need edge cases for that,
So for regular items he would use dropped items
Or
ok i want to create a comand like this /dh addline stone item:head %player_name%
@floral isle Okay
How do you display items?
Do you put it in the armor stand's head?
no i using packet
Ahhh
@proven lotus Edge case ?
Then use packets to create an armor stand
@proven lotus Edge case ?
@undone narwhal im dumb don't mind me
@floral isle I tried last month tons of methods for spawning no gravity dropped items with nms. This is really really hard (i never succeed)
So i stronly recommand you using armorstand head
@undone narwhal i need only a method for give a texture to floating head
Just take your Itemstack instance
Get the ItemMeta cast it to SkullMeta
And search for a method like setOwner, set Player or smth like this
ok i must go thx for the help
K
bye
Have a nice day
Shut up
????
@atomic rapids can I have your attention here please
@frigid ember keep screaming and saying "shut up" without any reason
He is being rude
Where is the plugin prefix set? I'd like to change it
You can change it in the plugin.yml if you're talking about the log console
Or if it is in the chat, depending on the plugin you're talking about
packet4.setEntityID(entityID);
packet4.setHeadYaw((byte) 150);
packet4.sendPacket(player);
WrapperPlayServerEntityLook packet5 = new WrapperPlayServerEntityLook();
packet5.setEntityID(entityID);
packet5.setPitch(270);
packet5.setYaw(150);
packet5.sendPacket(player);```
Hello someone can help me and I have a fake ArmorStand for the player and the problem is now, I want to turn the ArmorStand head yaw and pitch, but they are not rotated
You can change it in the plugin.yml if you're talking about the log console
@undone narwhal ty
Does anyone know why this is an error
Go to your "Project Structure" > "Module" and check the language level.
You can c the language level on the bottom left.. lmao
where?
And even if I read that it wouldn't mean anything to me
None of my plugins have had this issue before
But i'm new to java
anyone here know how to skript?
just write english sentences
Does someone know how to make the plugin work when using tab completion but the user loads it on older versions? (1.12.2)
I get errors from Brigadier when I try to load my plugin into 1.12.2
Do you use the TabExecutor service ?
I implement CommandExecutor, TabCompleter for all of my commands
I use Commodore
from Lucko
but the thing is that I'm not loading the completions
if the version is higher than 1.13
although i get stuff like that when one of the commands get executed
Oh, it's not a basic commands, okay sorry
I think i'll prob. have to contact Lucko discord if nobody knows here
If you use Commodore service yes.
Well, duh
1.12 doesn't have brigadier
So you are SOL
Don't support 1.12
I mean, could try shading brigadier and invoking it manually and shit
But that seems like a giant hassle
Hey, my server started running out of memory and players started to get kicked to the lobby. Ram usage issue until I restart. Any ideas how to make this clean?
Maybe a plugin causing this memory loss
Sure, but it sounds like its storing useless data
Is it caused by one of your plugin or a sownloaded plugin?
No.
How can you be sure it isn't?
It displays something like Internal Exception . . failed to allocate 229376 bytes of direct memory ( used 1028154858)
When? Some other errors lines ?
Most likely one of the plugins causes memory leaks
How can I find wich ones
oh boy.. is it possible to return a boolean from a bukkitrunnable?
hmm?
@vernal spruce If you want to get the result of a task, use a callable object
@hoary parcel the thing is that I don't get why it's not working on 1.12.2
I'm not calling the method that uses brigadier on 1.12.2 i think
jeez i hate jumping from async to normal
You include a class that tries to load brigadier
oh
@vernal spruce check out taskchain
It's designed to remove all the fricton of jumping between sync and asking
Minecraft players should really consider updating their game to the last game version...
@sturdy oar Still the bible stuff?
ahah no
the bible doesn't work as well with older versions tho
because Bukkit is missing GSON
I don't know how many KBs it is
it's weird how they only started adding GSON after 1.12.2
there are so many things wrong with trying to support older versions
So just don't
I don't understand why there are so many people always using 1.8 1.9 etc
Thx Hypixel and all these big networks not "updating" their servers
Not really
You don't write plugins for hypixel, do you?
So no reason to follow what they do
I didn't mean that. Just meaning that keeping 1.8 supports discourage the users to update and all the new minecraft features post 1.8 can't be used so why the players would like to update?
it was a while till people moved from 1.7.10 but we managed to move on
All changed since the pvp update right?
well
i feel like this is an issue that we offer support
just like with 1.7.10
devs moved on because it had good additions
so did the servers
Yep right
Yes I actually like this new pvp, even if I was an old school soup pvp player ^^
And making plugin all versions compatible becomes really tiring
ehy, how do I get to display the usage of a command (the one stored in plugin.yml)?
I remember there was some bukkit command to do it
i dunno how that works
no...
i don't mean from the code
i mean like /usage <command>
something like that that should be in bukkit
i can't seem to find it on the wiki
no...
help plugin works
but it does not display the usage
it only sends the message
with the available commands
yeah i don't
Is someone here familiar with the TerrainControl plugin?
Does anyone have like an image to help with InventoryActions?
the new combat system is better for server performance as there is less hits to register
does anyone know how to edit the messages of a plugin without there being a messages.yml file? I dont see one generated, and there is no way to edit the messages in the config.
How is this possible that my server gets below 13 tps when cpu usage is only 20% and I have 4-6 gb of unused ram?
single thread power?
single thread power?
@tiny dagger I have i7 2600k on my server with 40-60 players online
Is that really single thread issue?
Isn't it enough for 40-60 players?
it might be enough for 40-60 players but not normal abusing ones
anyways, anyone know how to edit messages without their being an actuyal messages.yml
But it's using 20% of the cpu. Is there a way to split things into threads?
what
tuinity
what tuinity
not sure how stable it is tho
if you want to use more threads , you'll probably want to get off spigot
if you want to use more threads , you'll probably want to get off spigot
@sturdy oar is there any good alternatives?

it's used to cry on because low tps^^
I'm already using paper
@wind dock I know a website for editing strings in a plugin without config
Is someone here familiar with the TerrainControl plugin?
wait so what do i do in there
Can anyone help me find out why I can't copy a world and load it? Here's my code so far:
https://hastebin.com/atazosobof.java
I'm trying to copy it to the main directory so I can load it, the problem is I have a map and want it to reset after each event and I'm not really sure how to use Bukkit's File management to do it, I think that would work though it doesn't
Or before
If there is a way to make a world not save when created again that would also work I think?
@frigid ember Can I change the commands in there as well?
I haven't tried, try it
arligth
Does anyone have experience with the LuckPerms API?
Already looked 🥱
They have nicely written API documentation, what else do you expect 🤷♀️
My question was does anyone have experience with the LuckPerms API not where is the API documentation though..
Hello, i'm trying to make a Bedwars minigame plugin, and i'm currently creating my item generators, and it behaves kinda strange :
The generators in each team's base all generate the first resource, but only one generates the second resource
There is only one of the 4 diamond generators (in the corners of the map) that is working
There is only one emerald generator at the center that is working
Ater searching why for almost 2 days I still don't know why some are working and others not :/
I'm using Spigot 1.15.2 if it can help
is there a better way to manage timed tasks that don't consume an entire thread?
Ok, quick query - can you run 2 bungeecord networks on the same machine?
Actually, nevermind. When you sleep a thread it is freed up to do other stuff. It doesn't sit there & wait for the sleep timer to finish.
Stupid
Guys help please, i have a FFa server. But My sprint stops for a moment when someone hit me
some called this with sprint bug
any code to do with sprinting
there are only plugins on the server
And they basic plugins world edit multiverse, ...
what version?
Spigot or fork?
Hello, I have a problem on my server. The Builder can not destroy or build in the map. I don't have Essentials AntiBuild and don't have WorldGuard. I don't knwo why anybody can help me please
@hallow surge 1.12.2
Spigot
@frigid ember I have : AntiCheatReloaded ; AuthMe ; bStats ; ClearLag ; CrazyAuctions ; Essentials (only EssentialsX ; EssentialsXChat ; EssentialsXSpawn) ; LuckPerms ; NoFall ; NoHunger ; NoWeather ; PlaceHolderAPI ; PluginMetrics ; ProtocolLib ; Shop ; SkinsRestorer ; TAB ; UltimateKits ; Updater ; Vault ; ViaVersion ; WorldEdit ; zChat
İ have 20 plugins but they are known
@frigid ember I only delete the .jar but it don't works. In the file Essentials I don't know what I have to delete
to just remove EssentialsSpawn
Okay it doesn't works
I cannot destroy if I'm de-opped and not Admin
I don't know the permission to let my Builder destroy or build in the map
this is not working
CraftWorld cannot be resolved to a type
is imported
i use version 1.12.2
Does anyone know how to set groups with LuckPerms? There's very little information on how to do so, from what I've seen, from what I've found directly from the LuckPerms API usage documentation, it doesn't seem to work.
Group group = api.getGroupManager().getGroup(nextRank);
user.setPrimaryGroup(group.getName());
api.getUserManager().saveUser(user);
This doesn't seem to be working for me.
?
Why not?
Why though, there's an API.
Oh, why
Hello everybody, I have a little question about the infrastructure: I have several mineraft servers with bungeecord and everything is fine. With this a database.
Do you think it's better that each of my servers connect to the DB via spigot, or that my servers send message plugins to Bungee who will take care of retrieving the info in DB?
Also the caching, is it better that I do this under Bungee or via Redis?
I'm setting a group
And using dispatchCommand is unreliable - with the API, you can check if the group exists etc.
But then it just becomes unreliable
How would you check if a group exists or not?
Without using the API
How would you know if a group exists or not
Could try and use the Vault API
Apparently LP is different to GroupManager and PEX etc.
I'll give it a go
And just use dispatchCommand to set groups
While using the API for checking groups existance
Luckperms-citizens-worledit-HubThat-PlaceHolderApi-ClearLag-AdvancedBan-Viaversion-worldborder-commandpanels-holographicdisplays-viabackwards-multiversecore-,worldguard-citizenscmd-luckpermschat-deluxehub-essentials-kitpvp-simplefreeze-tab
Guys i have SPRİNTBUG on my 1.12.2 spigot server. How can i Fix it ?
Is there away I could override default Minecraft mobs with my custom ones (1.15.2)?
Yes, you can create a Class that extends the Mob's class, then you can use the @Override annotation to override the methods/properties.
Hello, does anyone know if it's possible to have coloured command arguments like minecraft default commands? I haven't seen a plugin do it and found nothing on the api or forums
Wat
wow that's sick thanks!
@worthy forge that's done via brigadier, mojangs command lib
Spigot doesn't allow you to use it
Cause reasons
The fork that shall not be named has a nice API for it
For me the TabCompletion did it
And there is commodore, a lib by luck that allows you to use brigadier in spigot
That's really not the point pixlie
Brigadier is so much more than just color
Like, it turns red if you enter a Boolean where it expects a number
Oh that's sick man thanks
And there is commodore, a lib by luck that allows you to use brigadier in spigot
@hoary parcel thats nice, it has the other feature I was looking into which was this sort of suggestion on how to fill the argument but it's not an actual valid value that you can use
this, because images speak better
That's brigadier too
Commodore should handle that
Acf does too btw, but brigadier support for acf isn't in master yet
Reeeeee at aikar for that, he took over my PR ^^
guy im having a problem with animals in my 1.13.2 bukkit server
it always despawn even the tamed and nametaged animals
this happen when i restart the server
i'm trying to install BuildTools but getting this error message, what should i do?
$ java -jar BuildTools.jar
BuildTools requires at least 512M of memory to run (1024M recommended), but has only detected 247M.
This can often occur if you are running a 32-bit system, or one with low RAM.
Please re-run BuildTools with manually specified memory, e.g: java -Xmx1024M -jar BuildTools.jar
@frigid ember disable-sprint-interruption-on-attack
default: false
description: Determines if the server will interrupt a sprinting player if they are attacked.
What is this settings ?
Can it help me ?
$ java -jar BuildTools.jar
BuildTools requires at least 512M of memory to run (1024M recommended), but has only detected 247M.
This can often occur if you are running a 32-bit system, or one with low RAM.
Please re-run BuildTools with manually specified memory, e.g: java -Xmx1024M -jar BuildTools.jar
@trim gull looks like you're out of ram
lol
how do i free up ram lol
13.9 gb usable
ight so there are 99 background processes running so thats probably my problem
yea
39
thats weird
yea
i'm just running chrome and task manager rn
ok
try closing all java processes in task manager
those Java SE Executable processes or whatever they're called
is there a way to do that all at once or do i have to individually?
a neat trick
is it u go into task manager
and
just type in "java" on ur keyboard
theres no actual text box in task manager bit it will take you to the first process that is named "java"
so if i went into task manager and typed "discord" on my keyboard it would automatically take me to the discord process
and u can just press the delete button on ur keyboard to close them
guy im having a problem with animals in my 1.13.2 bukkit server
it always despawn even the tamed and nametaged animals
this happen when i restart the server
Where can i ask a question about permission, to know if i can do something ?
Like an email address to ask question
Guys how can i write on spigot forums ?
Create an account ?
Hello, How I can get Sound about a block ?
In Spigot 1.13.2 I do this but isn't fonctionnaly in 1.15.2
public Sound getSound(Block block) {
try {
WorldServer nmsWorld = ((CraftWorld) block.getWorld()).getHandle();
net.minecraft.server.v1_13_R2.Block nmsBlock = nmsWorld.getType(new BlockPosition(block.getX(), block.getY(), block.getZ())).getBlock();
SoundEffectType soundEffectType = nmsBlock.getStepSound();
Field breakSound = SoundEffectType.class.getDeclaredField("q");
breakSound.setAccessible(true);
SoundEffect nmsSound = (SoundEffect) breakSound.get(soundEffectType);
Field keyField = SoundEffect.class.getDeclaredField("a");
keyField.setAccessible(true);
MinecraftKey nmsString = (MinecraftKey) keyField.get(nmsSound);
return Sound.valueOf(nmsString.getKey().replace(".", "_").toUpperCase());
} catch (IllegalAccessException | NoSuchFieldException ex) {
ex.printStackTrace();
}
return null;
}```
Oh thanks
@white kite i'd recommend just manually doing it
@native vault depends on the question
@torn robin For the context,
I change the block with AIR but i want play the break sound but lot of blocks use BLOCK_METAL_BREAK
yep, so I would recommend just doing it manually for the most common blocks
@native vault depends on the question
@torn robin it's to know if i'm authorized to post a specific ressources
If you wanted to play the sound you could do Block#breakNaturally() and then place the block straight after. This is a bad way of doing it, but its also good to avoid reflection.
@native vault would you mind asking here? I don't think that's really necessary to email about
but Please only use the support email address, tmp-support@spigotmc.org for questions that require admin intervention. Typical wait times for a response are on the order of one week. would be the email
Ok thanks you for info
Ok, i will ask it here.
I have CasualProtector (premium plugin). But, the plugin need Protocollib.
I want to remove the dependency.
Such as the plugin author is banned from everywhere, the plugin isn't continued.
So: can i post it, even if i'm not the first author ? Can I sell it ?
no
it's someone else's work
you wouldn't even be allowed to give it away for free because it's a premium plugin
Even if i edit the code, like a reload ?
yes, even if you edit the code
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
unless you can get into contact with the author
@torn robin i will try to contact him
@torn robin Yep but I can't do this manually for all blocks
good luck Elikill
I know paper cough has a smexy feature to get the block break sound
Hello ! I try to do
String requete = "INSERT INTO playerstable (name, rank, coins, firstconnection) VALUES (\""
+ player.getName() +"\", \"player", 0, " + new Timestamp(System.currentTimeMillis());
Statement statement = connection.createStatement();
statement.executeUpdate(requete);```
But i get a syntax error ;-;
nice SQL injection attack right there
Don't worry about that
you have a few "'s that aren't 'd
are you sure that's intentional
(also does this even compile?)
wait I found my error omg
yay
Yes this compile
plz used PreparedStatement
Well sir,
except if the player name contains # or something like that, there will be no SQL injection
Futhermore
it can't cuz
Mojang
You know.
Yes
@grave narwhal I'm back, and i'm still having the same problem and getting the same error message
$ java -jar BuildTools.jar
BuildTools requires at least 512M of memory to run (1024M recommended), but hasonly detected 247M.
This can often occur if you are running a 32-bit system, or one with low RAM.
Please re-run BuildTools with manually specified memory, e.g: java -Xmx1024M -jr BuildTools.jar
what?
Instead of doing java -jar BuildTools.jar do java -Xmx1024M -jar BuildTools.jar as build tools needs more memory.
okay
i think that worked
Loading BuildTools version: git-BuildTools-975b734-112 (#112)
Java Version: Java 8
Current Path: C:\Users\kathe\OneDrive\Desktop\Minecraft Server Spigot.
Please do not run BuildTools in a Dropbox, OneDrive, or similar. You can always copy the completed jars there later.
is that what it's supposed to say?
thats weird i thought i uninstalled one drive
the folder is just on my destop
strange
maybe because onedrive backs everything up?
Does anyone how to escape emoji's in bbcode lol
one drive has been uninstalled, ill restart my laptop to see if that keeps it out of the way
@bronze marten [plain][/plain]?
it still say onedrive
When I do:
String requete = "INSERT INTO playerstable (name, rank, coins, firstconnection) VALUES (?, ?, ?, ?)";
PreparedStatement statement = connection.prepareStatement(requete);
statement.setString(1, player.getName());
statement.setString(2, "player");
statement.setInt(3, 0);
statement.setTimestamp(4, new Timestamp(System.currentTimeMillis()));
statement.executeUpdate();```
I have no error, but it doesn't add the player
is your connection to the database valid?
did u set your connection to manual commit?
Also i suggest you using a UUID instead of a name.
ye u can store uuid as BINARY(16) and then just UNHEX `uuid.toString().replace("-", "");
why would you do that if u can just use binary(16)
whatever of this currently
Cause binary data in databases is often meh
its more efficient though
Well, ideally your DB would support an 128bit integer
How can I change the passenger of a armorstand for seconds without getting dropped?
Hello I have a problem :
[21:29:21 WARN]: [Essentials] Task #625 for Essentials v2.17.2.0 generated an exception
java.lang.NullPointerException
I don't know why
could you post a full stacktrace?
you talking to me? Any plugin that lets enchant sword with books of shaarpness 6?
remove XMPP
Anybody know the permission for destroying ? https://image.noelshack.com/fichiers/2020/23/2/1591127416-azzazqqqqq.jpg
@torn robin With your thread, I have this error
java.lang.ClassCastException: java.lang.Float cannot be cast to net.minecraft.server.v1_15_R1.SoundEffect
full error?
PlayerInteract line 114
and what is SoundEffectType.y?
Yes, you can create a Class that extends the Mob's class, then you can use the @Override annotation to override the methods/properties.
@red kernel This is the way to create a new custom mob but how do you override default mobs?
any idea how to get the primed TNT entity that breaks a hanging entity? I'm using HangingBreakByEntityEvent and the event remover is of type player which is really odd
in discord you can metion people, any idea of how to achive that effect with a plugin? Example: "Hello @cakelover24" where cakelover24 would be in a diffrent color than the rest of the message.
hey, is posible use Bukkit methods in a BungeeCord plugin or vice versa?
@torpid field you can use the AsyncPlayerChatEvent to get the message and modify it
@gloomy thorn you have to use a messaging channel, you can't directly call methods: https://www.spigotmc.org/wiki/bukkit-bungee-plugin-messaging-channel/
ok ill look into that AsyncPlayerChatEvent @opal marsh ty
It's your link for the 1.14 but isn't work in 1.15.2
if another plugin sets the chatcolor of the player to something like &a will chatcolor.reset reset the chat color back to &a?
@torpid field are you talking about the message content or the message formatting?
Why my Builder can not build the spawn help me please. I give his role all the essentials.build perm but he can not build! Damn help me please
if another plugin sets the chatcolor of the player to something like &a will chatcolor.reset reset the chat color back to &a?
It uses the reset colour code (r), which is basically white with no formatting as a regular message would be
@remote ore check the spawn protection setting: https://minecraft.gamepedia.com/Server.properties
You can use ChatColor's #getLastColor() method to find the last colour code used
Trying to address poor server performance under spigot. Getting lagged on CPU, not memory. With just one player, server can even crash. I think we have too many turtles and farm animals. Do these specs look sufficient for a 4-person server?
-- System Details --
Details:
Minecraft Version: 1.15.2
Minecraft Version ID: 1.15.2
Operating System: Linux (amd64) version 4.14.173-137.228.amzn2.x86_64
Java Version: 1.8.0_252, Oracle Corporation
Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 1681218136 bytes (1603 MB) / 2418540544 bytes (2306 MB) up to 2863661056 bytes (2731 MB)
CPUs: 2
JVM Flags: 2 total; -Xms1G -Xmx3G
Player Count: 1 / 20; [xe['Speed707'/728, l='world', x=-36.35, y=69.00, z=-206.51]]
Data Packs: vanilla
Is Modded: Unknown (can't tell)
Type: Dedicated Server (map_server.txt)
@lusty basin nothing looks wrong with the specs (missing cpu type I think) but a timings report would be more helpful
@opal marsh I don't understand, look : spawn-protection=16 but my Helpeur is a weight of 18 but he can not build
wtf
@remote ore when you say "weight" I assume you're referring to ranks in a plugin. This is a vanilla setting, it knows nothing about plugins. Read what it says on the wiki: "Determines the side length of the square spawn protection area as 2x+1. Setting this to 0 does not disable spawn protection, but protects the single block at the spawn point. A value of 1 protects a 3×3 square centered on the spawn point. 2 protects 5×5, 3 protects 7×7, etc. This option is not generated on the first server start and appears when the first player joins. If there are no ops set on the server, the spawn protection is disabled automatically."
Set it to 0 and you should be good to go
@opal marsh That's good but I want that a "normal" Player can not destroy but a Builder can build
@remote ore so make sure normal players don't have "essentials.build perm" if you're using essentials protect or get a more advanced plugin like WorldGuard
Thank you @opal marsh
How can I get a timings report? I typed /timings on in the console and get "unknown command". Following the directions here: https://www.spigotmc.org/wiki/how-to-take-a-timings-report/
@lusty basin in a console, commands aren't preceded with a "/", you just type them out without the /
Hello guys, my newest 1.15.2 SpigotMC server seems to disconnect players connecting to the server after like 24 hours with the message [User Authenticator #50/WARN]: Exception verifying Player java.lang.IllegalStateException: AsyncPlayerPreLoginEvent cannot be triggered asynchronously from primary server thread. Any clue what causes this and how to debug this?
When killing the main thread using Ctrl+C a Thread 2 spawns to save the world saves and gets stuck and unresponsive as well.
Is this due to the fact that it's still a snapshot?
Cool. Thanks, @opal marsh . The timings report suggests lowering view distance. I think that could help a small amount, but a week ago we didn't have lag and view distance was the same as it is now. The main thing that has changed is we have like over a hundred turtles now.
@lusty basin I would lower the xmx to 1G if I were you though, that solved the issue for me, I have similar specs
@lusty basin yep, the server tick definitely appears to be overloaded by entities, likely turtles. Can you grab the latest version of paper and try? I believe it has several pathfinding optimizations (turtles pathfind to their beach I think) and it has a newer timings version that gives more details
Thanks @odd ermine & @opal marsh -- I'll lower XMX memory value and also look into paper. I set the default view to 4 and even with nobody connected to the server, I'm seeing:
[21:00:04] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 29477ms or 589 ticks behind
@lusty basin are the turtles in spawn chunks? that would explain why it's still lagging with nobody online
for small, vanilla~ish servers, I typically disable spawn chunks
I'm not sure how many chunks the turtles are from spawn. Could be fewer than 200 blocks away.
Nobody on and both processers are bouncing up to 99% utilization.
This is an AWS Medium EC2 instance, btw.
when accessing an inventory how would i make it so if someone tries to click on the item, it just goes back to its spot?
public void gui (InventoryClickEvent event) {
if (inventory clicked equals my gui inventory) {
event.setCancelled(true);
}
}
thats the sudo code
thanks! and ya i got it
when installing spigot, i've put that start.bat file into the same folder as the spigot.jar, but when I double click it I get this message : Error: Unable to access jarfile spigot.jar
Press any key to continue . . .
@trim gull did you rename from spigot.1.15.2.jar to spigot.jar?
How can I find out how many players are online in the bungee through a Spigot plugin?
Please ping me/@ me when you answer :D
oh, now it says "failed to load properties from file: server.properties" and "failed to load eula.txt". Does it need to be in the same folder as an already set up vanilla server?
nevermind
thats my fault
Anyone have any clue on the "Exception verifying Player java.lang.IllegalStateException: AsyncPlayerPreLoginEvent cannot be triggered asynchronously from primary server thread." error? It's bugging me out
yes, but it only says hwo to get the count of a specific server, I need the global count
or ALL to get the global player count
oh thank you
is there a way to send a player a message in like, the middle of their screen?
might be a dumb question haha
@tiny pebble yes, spigot has an api for this or you can use packets if you need to support plain bukkit: https://www.spigotmc.org/wiki/send-title-to-player-packets/
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new ComponentBuilder("Title to send").color(ChatColor.AQUA).create());
who can help me rn?
you're gonna have to be a lot less vague than that
ah thank you!
another question i have is if there is a way to get the next message sent by a player? to check for it?
maybe an event?
you can store a flag either on the Player object using the bukkit metadata api or internally using a HashSet of uuids and check if that flag is set when the next chat event occurs, then reset it
hm hey?
Support what you need to use. Don't bend over backwards for CraftBukkit support, especially because it in and of itself is not supported
is there a way to make the tropical fish upright
if its not in water
packets or anything else or if there is a pose for it
I have a feeling that's a client-sided thing
Kind of like the parrots and dancing
Would be happy to be wrong, but 
i was afraid it would be that way 😭
any idea how to get the primed TNT entity that breaks a hanging entity? I'm using HangingBreakByEntityEvent and the event remover is of type player which is really odd
to anyone searching and coming across a similar problem, I "solved" it by finding the nearest tnt entity with a fuse of 0 ticks
is there a way to disable grass
in what context? during worldgen?
like i have a big area and the grass looks super ugly; so yes after worldgen
worldedit....?
if it's after worldgen, worldedit would he helpful
ty
any way to get the keys stored in a PersistentDataContainer?
No, but it probably should have a getKeys() method
dang :(
private static final Configuration config = TankuPlugin.getInstance().getConfig();
@EventHandler
public void onPlayerMessage(AsyncPlayerChatEvent event) {
String warpName = event.getMessage();
String str = "warps." + warpName;
config.addDefault(str + ".x", event.getPlayer().getLocation().getBlockX());
}
Anyone know why this isn't writing to the config? This could be a java error, I don't know. FYI I'm not an expert at Java 😛
I think you may want to use config.set instead of addDefault
following that, call saveConfig()
Solved my performance problem, btw. Ran this command:
/kill @e[type=minecraft:turtle]
Thanks, that worked!
CPU is back down to max of 10% on either CPU.
And that performance problem was triggered by 96 turtles alone.
Material air = Material.Air;
ItemStack block = createWarp.getItem(11);
if (block.getType().equals(air)) {
// stuff
}
The if statement always results in a NullPointerException.
I'm just trying to check to see if a space in the inventory has nothing in it. How would I do that?
Hello why my players can not use enderchest in spawn? In don't use spawn-protection they can break blocks in spawn
@tiny pebble we'd need to see the createWarp.getItem(11); method
@remote ore what protection plugins are you using?
It's an Inventory.
public static Inventory createWarp = Bukkit.createInventory(null, 27, "Choose Item Type");
@opal marsh I use all EssentialsX plugin and WorldGuard but I don't configurate for protection any of them
@tiny pebble iirc, Inventory objects return null when there's no item. I'm not completely sure
@remote ore remove essentials protect and stick to worldguard. make sure the "use" flag is set to allow
I could try if (block.getType().equals(null)) although my IDE always says it's false?
That didn't work, still NullPointerException hmmm
Null check block
if (block != null && block.getType() == Material.AIR)
Or ||, depending on what you want
Same problem still with the entire line even after changing it
@opal marsh I don't use essentials protection. I have to make a zone with WorldGuard?
Like spawn protection with worldguard?
@tiny pebble what does the full stack trace look like?
@remote ore yes, create a worldguard region and ensure the "use" flag is set to allow
ah hold on let me redo the code lol i was screwing with it
@opal marsh https://pastebin.com/eWck0LrY
what's at WarpInventories.java on line 75?
if (block != null || block.getType() == Material.AIR) {
Whole class would be nice
Both Listeners and WarpInventories
I'm calling the use of fields before they're initialized
so i gave default the essentials.warp perm but it says i have no warps which isn't true
the || is the problem. if the block is null, it will check the type
@frigid ember make sure they have the essentials warp list permission
Yea, it should be block == null || block.getType() == Material.AIR. The != null before was for an && condition
essentials.warp.list?
yes, I believe so
ty
Listeners.java - https://pastebin.com/DQx4xd1f
WarpInventories.java - https://pastebin.com/ZNVr5RGe
I tried that @subtle blade, though then it disabled the else that came after when I placed an item within the area it was checking
it still says no warps avaliable
do they have access to the warps? essentials.warps.*
Yea, it should be if (block == null || block.getType() == Material.AIR)
do they have access to the warps? essentials.warps.*
@opal marsh do i need the star?
Alright, then when I put an item in said slot it's checking, how do I have it enable the else statement since before it didn't? If this is a simple Java question sorry about that
@frigid ember only if you want them to have access to every warp. otherwise essentials.warp will work. depends on "per-warp-permission" in the config: https://essinfo.xeya.me/permissions.html
If an item is in that slot, the else will fire
Didn't last time though I'll try again, maybe I did something wonky before
The else will be called if block != null or if block.getType() != Material.AIR
it says essentials.warps.* isn't a option
essentials.warps. is though
and yes i want everyone to have perms to all warps
@opal marsh WorldGuard on my plugin file is in .jar but he don't create a config file
else didn't fire so it must've been something else I've done wrong. Thanks for the help though! I'll try and see what I did
you still have essentials antibuild and protect. make sure the worldguard jar file is in the plugins directory
since it's 1.8, make sure you have the right version
if I am setting up a spigot server, do I need to configure the bukkit.yml file? Are CraftBukkit and Spigot servers different?
you can if you want to but it's not required
bukkit and spigot are different. spigot is a fork of bukkit and bukkit plugins should be compatible with spigot
alright thank you
i'm getting a failed to bind to port error message when I run the start.bat file
what port? are you sure there's not already a server running on that port?
i was running a vanilla server before but i've deleted all the files from that