#help-development
1 messages ยท Page 1758 of 1
That is true, but I'm new to plugin development and figured it would be easier to use a template for now
i deleted essentilas but they can still fly
Sus
why is all players fly while joining my server
how to fix it
please help me!!
stop spamming
Maybe disable the permission that says minecraft.fly
you already asked in #help-server wait for an answer
nothing changes on the server, but I already figured out that it is cause I'm using enum to store the messages. Could u advise what to do in order to fix it if it's possible?
enums are instantiated only once. can you show your messages code?
ofc
enums are basically nothing else than static final fields
yeah you'll probably want to transfer all the messages to a normal class
yes
most of the time, I simply create a class "Messages" that has some methods, e.g. Messages.getInventoryFullMessage() etc
and that method then just returns main.getConfig().getString("your-message-name") etc
do u make a method for every single message?
what can u advise to do
in some other plugins, the messages are static fields
well I'm not really sure myself ๐ I do it differently in every plugin
in the end, it doesn't matter whether you have a bunch of static fields that you can update on each reload, or whether you create a method for every message, etc
I would personally recommend using JSON for Message configs, but YML works just fine too and is a little easier ๐
I wouldn't use json because it's messier for the server admin
i think my litematica fucked it up
The main reason that I like it is because with how I set it up, the config auto updates when i add things
ummm
i think there is a modding discord
for that XD
I'm having troubles with specifying the version in my pom.xml. Spigot 1.17.1 works fine, but any other version (1.8.8 is what I want to target) is underlined in red and IntelliJ tells me it doesn't exist. Here's my pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>global.minecraft</groupId>
<artifactId>MinecraftGlobalAnalytics</artifactId>
<version>1.0-SNAPSHOT</version>
<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.17.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
just redownload it
How would I do that?
nah not talking to you
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.8.8-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
that should be all ya need for 1.8.8
Doesn't work, it's underlined in red
it's underlined because your local maven repo doesnt have that version yet
Changing the repository url doesn't fix it either
hit the "reload maven project" button and intellij will download it automagically
Thank you
np
I mean there are all available versions there
That worked! Thank you so much!
you're welcome ๐
https://github.com/instalab/her-majesty-php why can't we have this for spigot
Perchance is clearly superior to if
Also look at that sexy class system
lmao it doesnt make sense
how is "splendid" the same word as "break"?
I mean... echo -> announce makes sense
but how does break -> splendid make any sense?

because it's something someone might say when exiting a conversation (loop)
How can I detect when a player rights click on a block?
PlayerInteractEvent
yeah okay
^ this
be sure to check the hand otherwise your code runs twice
What do you recommend me for error handling? LBYL method or EAFP
whoa
declaration: package: org.bukkit.event.player, class: PlayerInteractEvent
only run your code when it returns EquipmentSlot.MAINHAND
ok
reason is:
the event gets called twice on every right click
once for the main hand, once for the offhand
like this?
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
Player player = event.getPlayer();
if (event.getHand() != EquipmentSlot.HAND) return;
if (event.getMaterial() != Material.LECTERN) return;
CityUtils.giveEmeralds(player);
}
How do I set custom scoreboard criteria
current ones are:
declaration: package: org.bukkit.scoreboard, class: Criterias
Can anyone help here is the logs
im bad at debugging lol
ok gimme a sec shall i send all classes?
#getBalance() method is returning null
hmm
maybe use player.getName() instead of (player)sender
Depends if it accepts a String or a Player
that has caused problems in the past
If it accepts a Player
a string should work too so yeah ill have ago
Does anyone know how i can disable spawn delay without disabling other delays in essentials?
no idea maybe ask in ess's discord?
ah ok
yeah dosnt work what now?
Show me the method
you gotta upload it to some repository
e.g. I have one, but there's tons of other repos you can use instead too
you can use mine if you like
DM me
another alternative is to use jitpack but tbh they suck
- Make sure you register your event handler
- Cite from spigot javadocs: "Plugins should check that hasLocalizedName() returns true before calling this method."
and 3: "it aint workin" is not a valid description, please state exactly WHAT doesn't work
print some text when the event gets called
also print some text to check whether your if statement gets executed
try printing localized name to check if it's right
like
@EventHandler
public void onEat(PlayerItemConsumeEvent e) {
e.getPlayer().sendMessage(e.getItem().getItemMeta().getLocalizedName());
}
i'd recommend using PersistentDataStorage to check it instead of name, @quaint mantle
uhhh
ItemStack icon1=KitsConfiguration.get().getItemStack("1.icon");
if (e.getCurrentItem().getType().equals(icon1.getType()))
it isnt working it used to work fine btw
If I set an item to setInvulnerable will it stop burning in lava and breaking on a cactus?
some detailed explanation?
spigot docs: "When an entity is invulnerable it can only be damaged by players in creative mode." so probably not
remove "()"
So I can't make an item not burn in lava?
sure it is :o
by probably not i mean that it's probably not gonna burn, but to make item not burn in lava you can use this: https://www.spigotmc.org/threads/stop-item-from-burning-in-lava.397664/
from post:
@EventHandler
public void on(EntityDamageEvent event) {
if (event.getEntityType() == EntityType.DROPPED_ITEM) {
event.setCancelled(true);
}
}
@EventHandler
public void on(EntityCombustEvent event) {
if (event.getEntityType() == EntityType.DROPPED_ITEM) {
event.setCancelled(true);
}
}
this code will prevent ANY item from being destroyed by cactus or lava
seems i have your problem now
when i wanna describe my problem i accidently remember that i missed somewhere else but when i wanna go and check where did i missed i forget where it is :i
if you want only specific item's just edit listener code
but it depends on version
code above may not work on some MC versions
Which versions?
not sure, ill check
1.17?
ok my problem fixed i found where was my problem i just forgot something
also this should work, but i don't tested it in game, you may try it:
@EventHandler
public void onEvent(EntityDeathEvent e){
if(e.getEntity().getType() == EntityType.DROPPED_ITEM){
e.getEntity().setHealth(20);
}
}
the JVM don't lie
java virtual machine ๐
This is not 100% about Spigot, but is there a way to make seperate namespaces inside namespaces?
Like
there are different categories of mcfunctions
This is about datapacks btw
leme try smth
PDC is love
can someonehelp me?
eh?
can i get bungeecord tech support?
Could not connect to a default or fallback server, please try again later: io.netty.channel.ConnectTimeoutException
when i joine the bungee server
no
see
my config
they are same Country as me only diferent city
hey, i'm trying to deal with tile entities in my small worldedit clone experiment, but for some reason the call to Chunk#b(TileEntity) results in a stack trace with "Attempted to place a tile entity --- where there was no entity tile!"
anyone have a clue as to what might be going on? how do tile entities work, and what does my code do, or rather, what doesn't my code do, that causes the tile entity to not be placed properly?
/*
* row[z] = IBlockData
* ch = chunk
* fHandle = Chunk#f(TileEntity) method handle
* */
if (row[z].isTileEntity()) {
row[z].remove(world, pos, row[z], false);
TileEntity tileentity = ch.a(pos, Chunk.EnumTileEntityState.c);
if (tileentity == null) {
tileentity = ((ITileEntity)row[z].getBlock()).createTile(pos, row[z]);
if (tileentity != null) {
ch.b(tileentity);
}
} else {
tileentity.b(row[z]);
try {
fHandle.invoke(ch, tileentity);
} catch (Throwable ignored) {
}
}
}
same error
ohhh i think i figured it out -- the block isn't being set because something is broken
oh
I wanna cry.. I try to change a NPC skin with a command : It work once ! (the player see the npc changing skin) but when i do it a second time it come back to steve (when i logout then login the skin is applied but not in real time) some have uncounter this problem ?
public void setSkin(String url) {
Bukkit.getScheduler().runTaskAsynchronously(Histeria.getInstance(), () -> {
Skin skin = new Skin(url);
GameProfile gameProfile = npc.getProfile();
gameProfile.getProperties().removeAll("textures");
gameProfile.getProperties().put("textures", new Property("textures", skin.getTexture(), skin.getSignature()));
System.out.println("propertie applied");
for (Player player : Bukkit.getOnlinePlayers()) {
removeNPCPacket(player);
System.out.println("Sending packet to player " + player.getName());
DataWatcher watcher = npc.getDataWatcher();
watcher.set(new DataWatcherObject<>(16, DataWatcherRegistry.a), (byte) 127);
PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata(npc.getId(), watcher, true);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
addNPCPacket(player);
}
});
}
private void removeNPCPacket(Player player) {
PlayerConnection connection = ((CraftPlayer) player).getHandle().playerConnection;
connection.sendPacket(new PacketPlayOutEntityDestroy(npc.getId()));
}
private void addNPCPacket(Player player) {
PlayerConnection connection = ((CraftPlayer) player).getHandle().playerConnection;
connection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, npc));
connection.sendPacket(new PacketPlayOutNamedEntitySpawn(npc));
connection.sendPacket(new PacketPlayOutEntityHeadRotation(npc, (byte) (npc.yaw * 256 / 360)));
Bukkit.getScheduler().runTaskLater(Histeria.getInstance(), () -> connection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER, npc)), 1);
}
}```
why do i get this error when trying to use buildtools : ```'C:\Users\sedoy\Desktop\minecraft\plugins' is not recognized as an internal or external command,
operable program or batch file.
Exception in thread "main" java.lang.RuntimeException: Error running command, return status !=0: [C:\WINDOWS\system32\cmd.exe, /D, /C, C:\Users\sedoy\Desktop\minecraft\plugins,BUILDTOOLS\BuildTools\PortableGit-2.30.0-64-bit\PortableGit-2.30.0-64-bit.7z.exe, -y, -gm2, -nr]
at org.spigotmc.builder.Builder.runProcess0(Builder.java:919)
at org.spigotmc.builder.Builder.runProcess(Builder.java:850)
at org.spigotmc.builder.Builder.main(Builder.java:220)
at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27)
Mhm
do you pass the if condition ?
Does the if work
to slow ๐
Quick question. I'm updating an old plugin and there's usage of player.getItemInHand() != null as a condition. Did this mean if the item in the hand was air or was there actually some other reason it could have been null? (or was it simply not possible to be null?)
no item in hand so check if air too
do your "work" message inside the if ?
Well I mean, as of 1.13.2, it's annotated with Nonnull, so I guess only check if it's air or should I just completely remove the that check entirely?
I've already dealt with that as well, just wasn't sure about a "replacement" for the null check or if I should just remove that entirely
well can't see what's cannot work on your code
do you handle somewhere EntityPotionEffectEvent ? and cancel it ?
It will return air instead of null then
well don't know
Adding custom players or text to playerlist
NPC Change skin
how can i turn for example
location: "59.5, 87.0, 15.60"
to
double x = ..
double y = ..
double z = ..
i mean seperate the commas
why not split it into 3 values
save your time
location-x:
location-y:
location-z:
String[] splitedLoc = string.replace(",","").split(" ");
int x = Integer.parsInt(splitedLoc[0]);
...
...
but i think the better way is to store inside your yml this yml x: 59.5 y: 87.0 z: 15.6
and just get int
Is vector serializable?
location:
x: 59.5
y: 87.0
z: 15.6
Thats too verbose
isnt it
can i have some help:
when i create module for nms version, which spigot version i should import, for example 1.16.4 and 1.16.5 has same nms version: 1_16_R3, but what spigot version i should import in maven?
1.16.5 ig
if they worried about size they could just do
location: "59.5|87.0|15.60"
dont forget about locales and commas
| look ugly
location: "59.5:87.0:15.60"
Why cant you Just use a comma with space
locales
1,05 = 1.05
oh ok
always used dots in decimals
ItemStack potion = new ItemStack(Material.POTION);
ItemMeta meta = potion.getItemMeta();
meta.setColor(Color.RED);```
Why does setColor give error, Cannot resolve method 'setColor' in 'ItemMeta'
Because ItemMeta does not have a setColor method
How could I make it so I can set it a colour?
Is this right,
ItemStack potion = new ItemStack(Material.POTION);
PotionMeta meta = (PotionMeta) potion.getItemMeta();```
That should work
Does \n work for an item lore?
Donโt think so
For me?
Mhm
So I just have to add another line of lore by adding another lore?
lol it just disappeared
SetLore takes a list
anyone know a workaround for that entity glitch that screws up entity positioning if you teleport them too frequently
you got an example of that glitch?
uh
basically im removing mob ai and just teleporting them to the locs of a vector
it works fine with particles, but mobs are weird and it takes ~5-10 seconds for their position to update to the correct one
hmm
it's fine
i ran into it a few weeks ago and just thought it was a common bug or smth
no
I'm having trouble using HologramAPI from Holographic Displays plugin
I can't figure out how to delete every hologram created
HologramCommand line 58
HologramsAPI.getHolograms(plugin).removeAll(HologramsAPI.getHolograms(plugin));
plz help me
Have you tried iterating over them instead of removeall
its 'unmodifiable'
exception tells you the issue
the API likely has a supported way to remove holograms
Oh wait you are just doing removeall on the list. You want to delete them
yes
but how?
Like this maybe?
Collection<Hologram> holograms = HologramsAPI.getHolograms(plugin);
for (Hologram hologram : holograms) {
hologram.delete();
}
Yes
i read this somewhere, but i dont really understand it
can i grab pitch/yaw from a location datatype?
so in the SQL, my table would need a blob datatype, right?
Yes
read javadocs
Location#getYaw()
Location#getPitch()
:(
Yeah iirc. Usually I go with base64
ah, ok, then ill go with base64, since im more familiar with base64 then messing with blobs
technically, base64 would just require a text datatype right?
Yeah
hm... so disadvantages and advantages
but.. Why do you need it in a database
What plugin reveals players cords in chat?
Is there a way I can tell if a player has changed their name since the last time they logged on?
you can look on the user cache but that data expires, so you would have to do it through your own methods most likely
alright, I was thinking I could take the players uuid and compare it to the data in a db
and if the playername associated is different than switch it, but that seemed a bit inefficient.
yeah all you really need is uuid and name in a db
if its sql or something it should be fast enough
dont think theres any other faster way of doing it
yeah, I think it should work now, dont really wanna change my name to test it though
heres the code I am implementing, do you think this should work? java final Player player = event.getPlayer(); String playerName = DatabaseUtils.getPlayerFromUUID(player.getUniqueId()); if (!Objects.equals(playerName, player.getDisplayName())) { DatabaseUtils.addUUID(player.getDisplayName(), player.getUniqueId()); }
looks fine to me
never seen anyone use the Objects.equals on strings interesting lol
your DatabaseUtils method names are a bit ambiguous
How do I support multiple spigot versions? I want to support Spigot 1.8-1.17
player.getDisplayName() can be altered. Use player.getName()
oh yeah and that^
thanks
you want official mojang name
yeah I didnt make those methods, they were meant to be easily recognizable
for nms use reflection, and use the lowest version api
What's NMS?
net minecraft server
non spigot-api stuff
if you don't know what it is yet, don't worry about it
I use latest api ๐ But I still support down to 1.8.8 lol
then you sorta have to keep track of what methods carry down
I specified 1.8 and tried to load the plugin into a 1.17.1 server and it gave me an issue saying that it doesn't support it because it's 1.8
idk i dont work with multi version plugins you would probs know more than me
can you show the error
yeah modules are easier to work with
[20:30:27] [Server thread/ERROR]: Could not load 'plugins\MinecraftGlobalAnalytics.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: Unsupported API version 1.8
at org.bukkit.craftbukkit.v1_17_R1.util.CraftMagicNumbers.checkSupported(CraftMagicNumbers.java:304) ~[spigot-1.17.1.jar:3273-Spigot-3892929-376edf4]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:141) ~[spigot-1.17.1.jar:3273-Spigot-3892929-376edf4]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:394) ~[spigot-1.17.1.jar:3273-Spigot-3892929-376edf4]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:301) ~[spigot-1.17.1.jar:3273-Spigot-3892929-376edf4]
at org.bukkit.craftbukkit.v1_17_R1.CraftServer.loadPlugins(CraftServer.java:409) ~[spigot-1.17.1.jar:3273-Spigot-3892929-376edf4]
at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:233) ~[spigot-1.17.1.jar:3273-Spigot-3892929-376edf4]
at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1010) ~[spigot-1.17.1.jar:3273-Spigot-3892929-376edf4]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:305) ~[spigot-1.17.1.jar:3273-Spigot-3892929-376edf4]
at java.lang.Thread.run(Thread.java:831) [?:?]
if you remove api-version in your plugin.yml i believe it won't whine about it
Already tried that
thats just a warn
API version only exists past 1.13
Any one an recommend good scoreboard
I found real and animated scoreboard
Is that best on spigot offer
Or am i wrong
Donโt ask in multiple channels
does anyone know how much bytes an itemstack blob takes up?
i need to know in order to allocate the correct blob datatype for my SQL table
I imagine that varies greatly
what do you recommend? would a tinyblob be enough? or would i have to use a normal blob type?
im trying to add custom items to the game, so that would include items with enchantments, and probably lots of lore
is there a datatype that is dynamically allocated for blobs?
honestly, i think ill just go trial and error
ill just continue with my plugin, and if my database runs out of memory, ill just increase the blob datatype size
What database system is it
sqlite3, using jdbc as drivers
I donโt think SQLite even differentiates between blob types
really?
oh maybe because im reading sql docs not sqlite docs: https://www.w3schools.com/sql/sql_datatypes.asp
yea i think your right
really straight forward datatypes
Dynamic typing
java.lang.IllegalArgumentException: Data cannot be null```
happens for the other permissions aswell, the plugin works fine but the error just bugs me and fills up console
```permissions:
minealerts.alerts:
slowchat.use:
slowchat.bypass: ```
It expects properties if you define a permission I'd assume
Oh, because no reason exists to define permissions in your plugin.yml unless you're adding those properties
You should define them
With just a description at least
That way stuff like luckperms can tab complete them
Anyone know why whyen i spawn this its invisible
package xyz.fragbots.sandboxend.entities
import net.minecraft.server.v1_8_R3.EntityEnderDragon
import net.minecraft.server.v1_8_R3.PathfinderGoalSelector
import net.minecraft.server.v1_8_R3.World
import org.bukkit.Location
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld
import org.bukkit.event.entity.CreatureSpawnEvent
import org.bukkit.util.Vector
import java.lang.reflect.Field
class CustomEnderDragon(world: World) : EntityEnderDragon(world) {
init {
try {
val goalB = getPrivateField("b", goalSelector) as MutableList<*>
goalB.clear()
val goalC = getPrivateField("c", goalSelector) as MutableList<*>
goalC.clear()
val targetB = getPrivateField("b", targetSelector) as MutableList<*>
targetB.clear()
val targetC = getPrivateField("c", targetSelector) as MutableList<*>
targetC.clear()
} catch (ignored: Exception) {
}
}
fun start() {
getBukkitEntity().velocity = Vector(1.0,1.0,1.0)
}
private fun getPrivateField(fieldName: String, `object`: Any): Any? {
val field: Field
var o: Any? = null
try {
field = PathfinderGoalSelector::class.java.getDeclaredField(fieldName)
field.isAccessible = true
o = field.get(`object`)
} catch (e: NoSuchFieldException) {
e.printStackTrace()
} catch (e: IllegalAccessException) {
e.printStackTrace()
}
return o
}
companion object {
fun spawn(location: Location) : CustomEnderDragon {
val world = (location.world as CraftWorld).handle
val dragon = CustomEnderDragon(world)
dragon.setLocation(location.x, location.y, location.z, location.yaw, location.pitch)
dragon.isInvisible = false
world.addEntity(dragon, CreatureSpawnEvent.SpawnReason.CUSTOM)
dragon.start()
return dragon
}
}
}
kotlin is at the point where I cant even understand what it's doing anymore
What about it is confusing?
don't understand why half those things are there
Probably just my bad code
the issue is probably you havent registered your custom entity, follow a tutorial or something
Oh that would make sense
not clear why you need a custom subclass for what you have written though
Would it be possible to control where the dragon moves without nms?
using nms != making a custom subclass though
unclear what subclassing is doing here
Nothing really, in what scenario would you want to use a subclass versus just using getHandle?
where you actually override a method
So i wont need to do that for changing how it moves?
not on the basis of the code you currently have
How would I make the dragon fly to a block, would it be a pathfinding goal?
Quick question, so If I start a runnable all inside a method, then after the runnable I have another piece of code. Will the other piece of code wait for the runnable to stop running or will it schedule the runnable and the next piece of code at the same time>
?
The latter
You mean a BukkitTask right?
Correct
Iโm pretty sure it runs 1 tick later
It doesnโt
The runnable would run one tick later not the rest of the code in his function
It runs right after the runnable is scheduled
I donโt know where I heard it from
If you just did Bukkit#getScheduler#runTask that would run on the next tick i believe
So for example
public boolean doSomeTask(){
boolean[] successful = {true};
// RUN SOMETHING FOR 5 MINUTES
new BukkitRunnable() {
@Override
public void run() {
if(!somecondition){
successful[0] = false
}
}
}.runTaskTimerAsynchronously(plugin, 0, 20);
return successful[0];
}
So the return would run right after the BukkitRunnable is scheduled or it will await for it to finish>
?
It would run right after
also that function seems wierd, what you're returning doesnt have the same type as the function defines
Yeah yeah my bad haha messed up
There
So it wouldn't wait for the task to end right?
Correct
Still wrong, you're returning a boolean[], an Array of booleans
when the function defines itt o be a boolean
Why do you have an array of 1 Boolean anyway
^
Because the successful boolean is outside the runnable and will need it later to return something I guess
I don't like using AtomicBoolean either
That doesnโt work like that
You should just make an object that stores the boolean
Your method will return the value in the array, the runnable never sets a value you can use.
That's basically an AtomicBoolean
If you want to return something later you need to use futures
Or use a callback
sure
you mean make it final or what exactly do you mean?
I could help you better with context
So I have been making a class that when it is instantiated, the constructor just calls the start method of the class. On the start method it is just calling methods and making sure everything is setup correctly before it can continue. One of these is ran by a BukkitRunnable so I need to make sure everything went okay before proceeding to the next method. I need to make sure everything in that runnable went correctly before starting the next one which is scheduled exactly 60 seconds after the previous one. So I need a boolean that will define if it was successful or not. If its not it will just terminate the whole thing, if it was it will just be saved to a Set so its not accessed anymore but just for checking.
the object will be saved to the set ***
Its actually surrounded by try and catch and it catches any errors with returning just false
but the thing is that at the end if it was successful I want it to return the value of the boolean to see if it continues or not.
Then you need a future or a callback
I'm guessing making a private final variable that will just be checked before proceeding to the next one?
Probably a future
How can i make a command with subcommands?
Is it possible to get the inventory after a click on InventoryClickEvent without a runnable
You switch the behavior depending on the first argument of the command
Technically just use MONITOR priority
no monitor is still in the event though
Yes but no mutations should by convention happen in MONITOR thus the event state should be preserved so unless youโre doing something that needs to be pedantically coordinated after one tick it should work perfectly fine using MONITOR.
no real way to have it after without a runnable afaik
monitor is theoretically after the event has been fired and possibly mutated so Iโd say it works fine there "getting the inventory"
Hey can someone help me with a plugin
I packed the plug-in LobbyLeave from BukkitTNT on my bc server and entered the standard and admin group in the bungeeconfig and also transferred the correct name of the server to the lobby leaveconfig, but this error message always comes up "When executing this command is a Internal error occurred, please check console log for details. "
@help
Why would you use packets for this, thereโs an api
Type cooldown into the javadocs
I am developing a plugin that uses LunarClient's "BukkitAPI" to ban LunarClient users from the server, but they are not banned even though they are running and participating in LunarClient. What could be the problem?
LunarClientAPI.java#isRunningLunarClient: https://github.com/LunarClient/BukkitAPI/blob/master/src/main/java/com/lunarclient/bukkitapi/LunarClientAPI.java#L124
"Code details"
@EventHandler
public void onJoin(PlayerJoinEvent joinEvent) {
Player player = joinEvent.getPlayer();
UUID player_uuid = player.getUniqueId();
LunarClientAPI api = LunarClientAPI.getInstance();
/*
ใLunarClient
*/
if(api != null && api.isRunningLunarClient(player_uuid)) {
player.kickPlayer("Kick");
}
}
So iwent through all the wiki on spigot then what should i do after that to learn more
is the event registered
ok, thank you.
Already registered.
sounds like an api issue then contact the dev
Somebody answer this
learn more about what?
try to add some delay it can take a while to update list
add 1 or 2 tick delay
1 tick = 50ms
not always
wdym
tps isnt always 20, so it can vary
that doesnt change the fact that 1 tick = 50ms.
Could you explain?
every tick is 50ms. if your operation or smth else comes over this 50ms, the tick will "expand", what is called a lag spike. mh, maybe not expand, its more like "out of tick". after that little excurse it will try to continue in time. so not the tick time varys, the ticks amount does
anyone a bit deeper in java than me, question for you: How the heck does a perfectly working plugin just decide to break one day
if server jar isnt updated or anything
define "break"
suddenly bunch of exploits
exploits or exceptions?
mhh, there could be several reasons
one day the plugin decides to color red in plugin list
what kind of exceptions?
i dont have that problem atm
im just asking in general
if a plugin works perfectly 1st day and it completely dies in the 2nd day
so maybe it failed to load something. a missing file, corruption, anything else what just broke
or it fucked itself by loading something wrong
moving anything
caches not empty
thats a good one lol
@plush crescent try to give a delay to kick the player.
maybe 3 ticks or more, also put a debug message to make sure
About spigot coding
more of a general java question here than a spigot question but if i create an ArrayList in Main.java how do i properly pass that arraylist through and allow it to be edited by another class? ive already tried passing it through as a variable but i'm getting a nullpointer
There are plenty of good ones on youtube
Depends on the context. You could pass it through a method parameter or access it theough the instance of the class
Whats the use case?
Any suggestions
toggle command and the same array needs to be able to be accessed by multiple separate classes
public class Main{
public List<String> myList = new ArrayList<>();
public void onEnable(){
new MyCommand(this);
}
}
public class MyCommand{
private Main main;
public MyCommand(Main main){
this.main = main;
}
public void onCommand(){
main.myList.doWhatever();
}
}```
something like that
thats a very basic version of it
is there a reason behind not creating the array in onEnable{}?
Itโs just an example do it however you need to
so i think i basically tried this same thing and it wasn't working either let me re-type it all maybe theres a typo....
brb
Make sure your access modifiers are correct
Ideally you will have one class to handle that list, but that really depends on what you gonna do with the list.
@drowsy helm am i not able to ArrayList array1 = main.wpurgeArray;
in the child class
If you initializing the list on onEnable then you'll receive NPE exception.
it isn't being initialized in onEnable its in the Main constructor
show code
public ArrayList<String> wpurgeArray = new ArrayList<String>();
@Override
public void onEnable(){```
in the child class:
private Main plugin;
private final SQLLogger sqllogger;
public TogglePurgeBlock(Main plugin , SQLLogger sqllogger){
this.plugin = plugin;
this.sqllogger = sqllogger;
plugin.getCommand("wpurge").setExecutor(this);
}
ArrayList array1 = plugin.wpurgeArray;```
TogglePurgeBlock is initialized in onEnable{}
TogglePurgeBlock togglepurgeblock = new TogglePurgeBlock(this , sqllogger);
in Main.java
hello
anyone know how to configure a fireball so it can actually fireball jumps?
we're using the bedwars 1058 plugin
somehow it doesnt make u jump
the tnt jump works it was default, i didnt set it up
Just access it on the method, don't put it in the field.
any help?
learning by doing
since you just want to know more about spigot, i assume that you already know java. therefor it shouldnt be too hard
@summer scroll so rather than specifying plugin.wpurgeArray.doThings() everywhere i wanna use that array shouldnt i just be able to ArrayList array1 = plugin.wpurgeArray;
just like you can int blockx = b_loc.getBlockX();
Idk why it's giving you an error I need more information, but you can just make it a local variable instead field.
i feel like theres something im missing ugh lol i feel dumb
First of all: You should never expose data structures. Dont make them public and dont write getters for them.
hello
.
do you know
Is this a programming related question?
uh
@gilded pond it seems like a plugin configuration question for a plugin that already exists which is why its been ignored
If not then this is your channel:
#help-server
๐
oh wait really?
@gilded pond yeah this channel is for coding issues in creating plugins you mentioned an existing bedwars plugin and while ive never used bedwars the question you asked seemed more like a configuration issue w/ that plugin than you asking how to fix code in one of your own plugins
@lost matrix the data inside the array is not sensitive its just for a toggle command and holds nothing but uuids of people who have the toggle turned on
is this a functional issue or more of a security practice thing
uh, its not really in the configs folder and some people keeps telling me to change the velocity and i dont really know how they just say change velocity and leaves
Doesnt matter what the data structure contains. Exposing it will lead to bad design choices, confusion and hits your applications robustness.
@gilded pond i dont know anything about bedwars as i said but unless you're coding your own plugin which it really doesn't seem like you are or youd know it, you should ask the developer of bedwars your question or maybe #help-server
Yeah like I said, ideally you will have one class that handle the thing, and never expose the list itself.
if you had multiple classes reading and writing from/to the same array what would be the 'ideal' way to handle that use-case then
In theory you should be able to just do something like this:
plugin.wpurgeArray.get(1);
Or
ArrayList<String> list = plugin.wpurgeArray;
list.remove("Something");
But i strongly advise against that
Ill give you an example
list.remove("Something");``` this is what i've tried and i get a npe
Thats the stuff that happens if you expose datastructures like this. Some error sets it to null or throws random elements in it.
public class ToggleManager{
private final List<UUID> list = new ArrayList<>();
public void toggleOn(Player player){
list.add(player.getUniqueId());
}
public void toggleOff(Player player){
list.remove(player.getUniqueId());
}
}
```Something like that, and all you need to do is pass the class. Encapsulation.
@lost matrix so i should basically chock it up to weird behaviors due to bad overall structure more or less
@summer scroll so lets say you have another class DifferentClass.java that also needs to be able to see what's inside ToggleManager.list
No, it's not static, you need to pass the class with DI.
public class PlayerTrack {
private final Set<UUID> trackedPlayerIDs = new HashSet<>();
public boolean isTracked(final UUID playerID) {
return this.trackedPlayerIDs.contains(playerID);
}
public void track(final UUID playerID) {
this.trackedPlayerIDs.add(playerID);
}
public void unTrack(final UUID playerID) {
this.trackedPlayerIDs.remove(playerID);
}
}
Then
public final class SpigotSandbox extends JavaPlugin {
private final PlayerTrack blockPlayerTracker = new PlayerTrack();
private final PlayerTrack someOtherTracker = new PlayerTrack();
@Override
public void onEnable() {
// Pass the trackers to other classes here or write getters for them
}
}
sorry ๐
@pastel stag you don't want other class to directly access the List.
instead you can minimize with method for specific goals.
for, security purposes? or optimization or just bad implementation in general
for example to check if the uuid is exist on the list or not.
i see what you are saying just curious now what the real life downside is
Lets assume your Listener needs the tracker:
public class SomeListener implements Listener {
private final PlayerTrack blockPlayerTrack;
public SomeListener(final PlayerTrack blockPlayerTrack) {
this.blockPlayerTrack = blockPlayerTrack;
}
@EventHandler
public void onBreak(final BlockBreakEvent event) {
final Player player = event.getPlayer();
if (!this.blockPlayerTrack.isTracked(player.getUniqueId())) {
return;
}
player.sendMessage("You are tracked!");
}
}
Then you would pass this PlayerTrack instance in the constructor of your Listener when you create it:
public final class SpigotSandbox extends JavaPlugin {
private final PlayerTrack blockPlayerTracker = new PlayerTrack();
private final PlayerTrack someOtherTracker = new PlayerTrack();
@Override
public void onEnable() {
final SomeListener listener = new SomeListener(this.blockPlayerTracker);
Bukkit.getPluginManager().registerEvents(listener, this);
}
}
it will be hard to maintain the code, and in the future if you keep updating it, it will make the code not readable.
Btw this is called dependency injection or just DI in short
I have getters for a lot of collections
Iโm bad ik, I should probably return immutable copies
You should try and prevent that in your next project ๐
@lost matrix @summer scroll well thank you guys for the assistance ๐
np, good luck!
I even distanced myself from returning copies of my encapsulated collections as it makes the separation of concerns a bit harder.
I need the list for tab completion
Ah i see
I guess I could make a method where I pass the tab complete args and return a list<string>
dependency injection for collections ๐
No. Bad ForteenBrush ๐
Somebody does this for sure...
oh ๐ง
Does anyone know how I would loop through these values with SnakeYAML?
spawn-points: # property with type string list
- # (1) list item 1
- 'x:y:z' # (2) list item 1
- 'x:y:z' # (2) list item 2
- # (1) list item 2
- 'x:y:z' # (2) list item 1
- 'x:y:z' # (2) list item 2
List<String> points = new ArrayList<>();
List<List<String>> pointLists = <config>.get("spawn-points");
pointLists.forEach(list -> list.forEach(point -> points.add(point)));
```Or something like that.
Right. Thanks.
np
hmm still havent fixed it smh
should .forEach().forEach(key ->) work? ๐
bruh optifine internal shaders cause rendering problems
all shaders break glow effects
try it. I said "something like that" lol
how can i get the net.minecraft library to work
<repositories>
<repository>
<id>spigot-repo</id
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.12.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
add this to your pom.xml and replace the versions
?bt
what is this even?
I do it sometimes when I want to components to rely on high level abstract data structures, then I pass the concrete data structure class through the constructor when instantiating.
So wouldnโt say itโs always bad
One is the shaded version when shaded into mc server jar
how do i get the nbt tags from an item in a player's inventory
idk why but i cant use .getTag
wait ill send screenshot
nvm
somehow it works now
but thanks
oh
can you give an example?
im really bad at understanding things
ignore the public ArrayList smh
uhh i guess google is your best friend
okay i gues
i still dont get it
say i have an nbt
bottle:1b
on an item "bottle"
i go
NBTTagCompound tag = bottle.getTag();
now how do i check
I still have to fix my item nms class
if bottle:1b exists in the tags
?
if the tag exists or something?
yeah
loop through the tag.getKeys()
but thats what i am confused about
are the keys the nbt data itself
or maybe just an index
like this and check if it instanceof the thing you're looking for
if you want a string
I was gonna just copy mine and send it but I have to fix it xD. Because for some reason NBTTags are LinkedTreeMaps instead of normal fucking objects like String, Double, List etc...
xD
okay lemme try
the keys are maps i guess
oka
If I run tag.get(key).getClass().getName() it returns the LinkedTreeMap class lol
Ill show my code later
Hey, I've been attempting to add fawe into my plugin with no luck at all. Can someone help?
i still think craftItemStack.getTag().getKeys() returns a list
any error messages? and btw this is something for #help-server
can someone help me?
I packed the plug-in LobbyLeave of BukkitTNT on my bc server and entered the standard and admin group in the bungeeconfig and also transferred the correct name of the server to the lobby leaveconfig, but this error message always comes up "When executing this command is a Internal error occurred, please check console log for details. "
i think..
I'm trying to add it into my plugin like the API part
uhu
So, it says here https://github.com/IntellectualSites/FastAsyncWorldEdit-Documentation/wiki/API-Usage#gradle---fawe-core to use the link, I add
maven {
name = "IntellectualSites Releases"
url = uri("https://mvn.intellectualsites.com/content/repositories/releases/")
}
Into my script and it throws errors saying it can't find it etc
can someone help me?
I packed the plug-in LobbyLeave of BukkitTNT on my bc server and entered the standard and admin group in the bungeeconfig and also transferred the correct name of the server to the lobby leaveconfig, but this error message always comes up "When executing this command is a Internal error occurred, please check console log for details. "
restart ur ide it helps if its IntelliJ
it just downloads all things again
I've tried this yesterday and today same problem
how
you have both of them?
can i show how many players it is in a ntt bungee server?
and i think you have to soft-depend it
light mode ahh
can someone help me?
I packed the plug-in LobbyLeave of BukkitTNT on my bc server and entered the standard and admin group in the bungeeconfig and also transferred the correct name of the server to the lobby leaveconfig, but this error message always comes up "When executing this command is a Internal error occurred, please check console log for details. "
plsss
github..
yeah u need dependencies{--}
well check console
ok i hate gradle lol
use maven lol
maven > gradle
๐คฎ
it say nothing wrong
:/
they add ()'s but adding those break it
Hello, do anyone know any guide about creating a schematic?
I mean, to create a construction with a command for example
And it can't find the things ahhh
litematica :kekw:
is that a plugin or a guide?
a mod :kekw:
oh boy, this is a whole new level of gradle errors https://paste.bristermitten.me/kixypypece.sc
just use worldedit
i mean, like an skyblock plugin... You can create a construction (island) that is predefined
i understand
i dunno how those skyblock islands work tbh
i haven't found nothing
havent they all different worldborders while in the same world? ๐
My skyblock plugin is the reason I'm reworking my ItemNMS class xD
should i use NMS for creating an island for example?
can someone help me?
can someone help me?
I packed the plug-in LobbyLeave of BukkitTNT on my bc server and entered the standard and admin group in the bungeeconfig and also transferred the correct name of the server to the lobby leaveconfig, but this error message always comes up "When executing this command is a Internal error occurred, please check console log for details. "
pleeeeeeeeeeeeeeeeeeese
is sending an error to the console
Depends. How many islands per certain time, how many blocks etc...
check the console and see what is wrong
no
i don't understand NMS at all
so i don't know
how can i make it show under my npc how many players it is in my otther bungee server?
probably need a holographic for that
cant i use placholder?
if you want it under your npc, you better use a holographic
and then you can probably use placeholders
can someone help me?
I packed the plug-in LobbyLeave of BukkitTNT on my bc server and entered the standard and admin group in the bungeeconfig and also transferred the correct name of the server to the lobby leaveconfig, but this error message always comes up "When executing this command is a Internal error occurred, please check console log for details. "
heeeeeeeeeeeeeeeeeeelp please
i know but what is the thing i type like %total or yea yk%
yea what value i put?
Hey I have an issue
ZUser.java:80
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (args.length == 0) {
sender.sendMessage(MaxiCity.chat("/broadcast <message>"));
return true;
} else {
StringBuilder message = new StringBuilder();
for (String arg : args) {
message.append(arg);
}
MaxiCity.broadcast(plugin.getServer(), "&6&l----------");
MaxiCity.broadcast(plugin.getServer(), "&6&l" + message.toString());
MaxiCity.broadcast(plugin.getServer(), "&6&l----------");
}
return true;
}
This is my broadcast command but if I type /brodcast Hey everyone how are you?
It will display
----------
Heyeveryonehowareyou?
----------
Any idea how to keep the spaces?
Add a space after each string
i think you are using nms for the npc interact event?
So I do this
message.append(arg).append(" ");
instead of this?
message.append(arg);
Mhm
well every arg is grouping into one string
it is something with an playerjoinevent
message.append(arg).append(" ") and later stringBuilder.toString().trim()
I am clicking on the npc and it sends me to the world and it is suppost to change the number abow the npc the total players but it gives me the error
ok thx
do you have a ZUser.java file?
line 80 it says
you are probably sending packets to joining players
and using a duplicated handler
cant you just use String.join
how?
what dir?
i dunno
he can
Does anyone know why this does not work.
skull.setOwningPlayer(Bukkit.getOfflinePlayer(UUID.fromString(rang.get(id))));
it works on the test server
but on this server nothing works with Bukkit.getOfflinePlayer()
Probably because you're not updating it
/znpcs lines 1 &4LifeStealSMP &ePlayers-online-&7(&a%bungee_ScardCraftLifesteal%)
this is right ?
what is namespacedkey, like I have seen it in so many spaces, and even tried researching about it, but it is really confusing for me, it would be really helpful if someone can explain it for me in simple words, pleaseeee!!!!!
Itโs a key thatโs specific to your plugin
Just like how minecraft has keys for everything, like minecraft:stone
Minecraft is the namespace, stone is the key
ohhhh
oh is see, so minecraft:stone is a namespacedkey right? or is it just a example that u used to compare to explain? @young knoll
Yes
it is
The first part is
for example, you can use a command like /pluginname:commandname
pluginname:commandname is a namespacedkey; The plugin name would be the namespace and the command name the key, hence namespacedkey
How to set horizontal and vertical knockback multiplier?
Entity#setVelocity
i get the error: java.lang.NullPointerException at java.util.UUID.fromString(UUID.java:197) ~[?:?] at com.tyko.knockitv2.ranking.Ranking.set(Ranking.java:51) ~[?:?] at com.tyko.knockitv2.commands.SetHeightCommand.onCommand(SetHeightCommand.java:33) ~[?:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot.jar:git-Spigot-dcd1643-e60fc34]
code:
String name = Bukkit.getOfflinePlayer(UUID.fromString(rang.get(id))).getName();
Could anyone help me please
yeah but how to set horizontal multiplier
Set the X and Z components of the Vector
Send the full code & error
?paste
try using Bukkit.getPlayer(UUID.fromString("uuid")).getName();
Looks like your map doesn't have a value of the ID @elfin talon
i have changed but dont work
Hello, I noticed that you can place water with the RIGHT_CLICK_AIR action if you point your courser on the last block that is possible to reach, without "selecting" a block to place the water against, which kind of creates glitched water if you cancel the event. That water does not spread but you can collect it with an empty bucket. If you place a block where the "glitched water" is, it will just disappear.
Anyone knows how I can prevent that a player can place "glitched water"?
p.setVelocity(p.getLocation().getDirection().setY(0).multiply(2);
It doesn't increase player vertical velocity by 2
0 * 2 = 0
It sets the Y value of the Vector to 0
So how do I multiply existing Y by 2?
Don't set it to 0..
Yeah but the existing?
You already have the existing, you're overwriting it by setting it to 0
So just don't do that
But how would I just multiply Y
and X
seperately
with different values?
@hasty prawn
?
Get the values, multiply them separately, and then use setY and setX
Or multiply by another Vector that has the ones you don't want to change as 1
So if you have Vector(2, 3, 4) and want to multiply the X by 2, multiply by Vector(2, 1, 1) which should yield Vector(4, 3, 4)
Alright cheers
epic
Uh I have an issue.... very weird
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getHand() != EquipmentSlot.HAND) return;
if (event.getMaterial() != Material.LECTERN) return;
// Check if player is in the correct region
giveEmeralds(event.getPlayer());
}
It's supposed to execute the method giveEmeralds only if the player right-clicks on a Lectern
but it doesn't, it only does it if the player right clicks with a Lectern in his hand
Use getClickedBlock().getType() instead of getMaterial
ok thx
Check the click type too.
i got returned this error
public static String colorize(String text) {
return ChatColor.translateAlternateColorCodes('&', text);
}
my color class ^
Text is null
any solutions?
ServerSelectorItem line 43
oh
itemMeta.setDisplayName(Color.colorize(this.getName()));```
Yeah this.getName() must be null
how is it null?
Doesn't exist in the config
it does tho .-.
"Nagivation"
i wrote that correct
Well then your code is wrong, cause it says "Navigation"
Btw Navigation is the correct spelling, not Nagivation
i know
i wrote it wrong in the config file
Yes
idk how i didnt notice that, sorry for bothering
Theoretically coding in Kotlin should work for making Spigot plugins right?
since it just compiles to Bytecode
and runs on the JVM
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
oh ty
yes
Kotlin can compile to jvm bytecode and it some of its functionality can be similar to Java even more with annots like @JvmStatic etc
do you guys know if there is something that gets legacy text from a component in kyori?
Donโt you still have to shade Kotlin
Wait wym? I mean they do have a legacy serializer module
Is mongoDB or MySQL better for databases in minecraft?
but can it deserialize?
ty didn't know it was called like that, thought it was something like bungee components
Is this a server or development question?
i going to use it in my spigot java plugin
They r used for different type of data afaik
You should probably support MySQL.
Those are easily relational
btw is it just me or is SQL really hard to visualize?
So MySQL
can anyone help what does these errors mean?
yer imports are fucked up
waht can i do to fix it?
Idk sql looks super Simple to me
oh ye SQL is simple
I just can't
visualize what it does
I can understand it but I can't make a mental model of it performing actions
I canโt really think of how to store an inventory to sql
1 table row per item I guess?
serialize it to bytes and store as blob
but what if you only need one item at a time?
what can i do to fix this?
I figure one item per row is less ugly than one giant blob
well, then do a table
[InventoryId, Slot, Item]
(oh btw I don't know SQL conventional shit for plugins)
(like, are you supposed to create a new table within a plugins db or a my-plugin db or are you not supposed to create a new db)
can you have nested tables
I dont see whats wrong with storing inventory as fat blob
But with SQLite you can just make an entire new db
Those hostings are dumb
Still, if you want to support as many users as possible
thats why h2, hsqldb and sqlite exists
there's like 50 different databases it annoys me
and each 1 is slightly different
MySQL, MariaDB, PostgreSQL, SQLite, MongoDB, etc.
and they all have separate drivers
this is why dependency loaders are fucking beautiful
Well SQLite is local isnโt it
ye it's flat-file
Indeed
I think spigot already has the drivers for MySQL and SQLite
really?
Mhm
For mysql yes, but extremely outdated
How can I put a skull to a player skull. When the player is offline.
How can i spawn a specific number of entities?
ArmorStand circle = (ArmorStand) player.getWorld().spawnEntity(new Location(player.getWorld(), 100, 100, 100), EntityType.ARMOR_STAND);
i spawn here an entity
but how can i spawn more?
for(int i = 0; i < amount; i++)
oh
I mean, there is no inbuild method for it if that is what you are asking
does anyone knows how a daily reward system works?
like you join the server back after 24 hours and you get a message that says you can claim a reward
maybe with a runnable?
if you want a daily reward you could just check the date
if not , just save when they claimed
and check if its been 24 hours @tardy delta
like comparing to System.currenTimeMillis()?
for example yes
or is there a better way?
so i would only check that on join?
ah because i was thinking of sending them a message when they could claim it
in that case i guess i would need a runnable
well yea, but in that case it would be pretty easy
just have an async runnable thats runs like once a minute
Async performance optimization multithreading ๐ก
i mean, no reasons to do this task async. That'd probably lead to the problems with concurrency. Async doesnt means that its always better
Please enlighten me how this will lead to problems with concurrency
All it does is check a timer and send a message
so im reverse engineering NMS for a little bit
and i need to convert NMS ChatColor enum to Bukkit's chat color enum
is there any built in methods to do that?
nvm
found it
CraftChatMessage.getColor(#EnumChatFormat)
How can I handle permissions with my plugin?
What does Each permission can have multiple attributes. mean? What are the attributes?
hi,i have a problem, i have a friend that created a server with spiggot,and when i try to connect,it spawns me in void,and after a minute or something like that it automatically kicks me
and he can`t teleport me,or if he kills me from console it happens again,i spawn and fall in void constantly
can someone help me?
does anyone know if the wither armor effect is client sided?
Hey guys, how can I show a custom message at the bottom of the screen? (Like when you seat a boat)
Are we talking about action bar?
I think yes
When you seat a boat, you get this info message above your belt bar
And i'm seeing servers showing custom messages there
Hmm I donโt know if thatโs actually action bar but you could achieve something very similar with sending an action bar.
Player#spigot()#sendMessage(ChatMessageType.ACTION_BAR,component); might be what youโre looking for then
non topic related but why do you guys do # instead of . sometimes
you need to add a permission message
Type#method(paramName)
A way to show what method we mean
Similar to javadoc Ig
also how to make a player sit down
Is what I did good to setup permissions?
https://pastebin.com/3scPy0g2
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Define good
im tryna make like a chair plugin for my own and i only figured out on the right click detection but i havent know on how to make the player sit down
well, will it work?
You need to make the player ride an invisible entity
Have you tried?
ooh
Because I'm trying to setup "roles" and if someone has a "role" then it can have specific permissions.
First I did the permissions and now I'm trying to see how can I setup the "roles" and their permissions

