#help-archived
1 messages · Page 86 of 1
still nothing
can't join
Rip
ok
do i need a static ip for this to work?
@frigid ember @woeful mural
Should work with dynamic as well
@woeful mural @frigid ember
lol
@bronze marten what
ok and
then only ppl on your network can join
ppl connected to ur router, if u didnt open any ports
then how do i make it not localhost?
buy a server or open port
how do i open a port
first option recommended tbh
idk, depends prob on your router thingee
search for it xd
i have a custom interface from my internet provider
for the router settings
so there's no tutorial for it
that's why im asking here
because from watching all the tutorials
i already did what i think is needed to do
but the port is still closed
@bronze marten
I really don't know lol, could also be windows which is blocking the port, idk
Hi, i have a problem.
[Username] disconnected with: Kicked whilst connecting to Server: Failed to verify username!
Any idea how to fix this?
I am using latest 1.15.2 and i have bungecoord.
thats a plugin doing it
authme?
this is the error
java.lang.IllegalArgumentException: Name and ID cannot both be blank
at com.mojang.authlib.GameProfile.<init>(GameProfile.java:26) ~[patched_1.15.2.jar:git-Paper-284]
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:186) ~[patched_1.15.2.jar:git-Paper-284]
at com.destroystokyo.paper.profile.PaperMinecraftSessionService.fillGameProfile(PaperMinecraftSessionService.java:37) ~[patched_1.15.2.jar:git-Paper-284]
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:173) ~[patched_1.15.2.jar:git-Paper-284]
at com.destroystokyo.paper.profile.PaperMinecraftSessionService.fillProfileProperties(PaperMinecraftSessionService.java:30) ~[patched_1.15.2.jar:git-Paper-284]
at com.destroystokyo.paper.profile.CraftPlayerProfile.complete(CraftPlayerProfile.java:177) ~[patched_1.15.2.jar:git-Paper-284]
at net.minecraft.server.v1_15_R1.LoginListener$LoginHandler.fireEvents(LoginListener.java:313) ~[patched_1.15.2.jar:git-Paper-284]
at net.minecraft.server.v1_15_R1.LoginListener$1.run(LoginListener.java:212) ~[patched_1.15.2.jar:git-Paper-284]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_251]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_251]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_251]
i know its paper
but with the spigot i have the same problem
i found out that this server is currently down
sessionserver.mojang.com
Offline
its more of a bad user,are you running cracked?
anyone know when PacketPlayOutEntity is sent?
it seems like once my TPS dips anywhere below 18, lava and water stop flowing on my server, its very annoying bc i run a skyblock server and people cant make cobble gens. Please help!
buy a better computer/host
that sounds like you have a plugin doing weird things in a misguided attempt to stop lag
thats the thing
Having your TPS be below 20 is a sign the server is either badly coded or the machine is not powerful enough
And as I said yesterday, and as md5 just said, it's a plugin trying to stop the lag.
List your plugin and we might be able to help.
but the thing is nobody is experiencing lag, so it cant be that bad that it makes water and lava stop flowing
and i have a lot of plugins, im upgrading soon to fix the tps issue but here
They might not experience lag but the server still can't keep up properly.
i cant send a picture so can i just dm you
to send images here you need to get verified
@wanton vine you have the plugin ClearLag
I don't know if you need to look any further.
ClearLag does nothing to blocks
i looked in clearlag and it didnt say anything about lava and water
what plugins in your server work with blocks?
plz dont judge the amount, im getting rid of a good bit of them, these were mainly put in to test each one and remove one by one the ones I didnt enjoy, but I want the water/lava flow issue fixed first
If still try to get rid of ClearLag
It looks like the most obvious bet
It doesn't touch blocks but water flow isn't exactly a block
now if i delete the jar from a plugin, does it matter if i delete the config folder for it too? or will that not add any lag
@sick citrus
doesn't matter if you leave behind the directory it created
if you don't want to delete the plugin in case it isn't the one you are looking for. just add .disable to end of its name
smart, thanks!
Worldguard has config stuff for stopping water/lava flow
however, by default it doesn';t do that unless it has been configured to do so
there is also worldguard region flags as well that will do that
so if they modified the default region and added flags there, it can do it too
i enabled water and lava flow in the region already D:
then make sure it isn't disabled in the config. The config will trump region flags
could it have something to do with 1.12 players joining on my 1.15.2 server? i am using viaversion and viabackwards
bc one of the guys had a good point, the issue didnt start until he joined, hes on 1.12.2
could be, not entirely sure
EssentialsChat, ChatItem, AutoBroadcast
why do u have so many essentials installed
they all came with essentialsx
well no you manually installed them
well it came in a zipped folder and i thought i needed all of them
u only need essentialsx, rest is pretty much blergh
maybe spawn and geoip
but rest nah
so my name in chat is now showing up as ZNChano %deluxetags% : CHAT
i removed the deluxe tags plugin
and idk what to do
i looked in essentials and its not there
hecky
is there any way to get the height from an EntityType?
there's a way of getting the height from an Entity
this is probably really obvious but i can't imagine spawning an entity from the EntityType, storing its height and then removing the entity is a very good idea
World#spawnEntity(Location, EntityType) or something
it will return an entity
get the location from that
ahhh heck, if i have to i'll do so, but i was thinking there was some sort of workaround
oh wait
thanks though :D
Is it somehow possible to get an org.bukkit.Color from string? I.e. if I have GREEN in my database, I'd like to get Color.GREEN but I only get the string from the database
you already have the location
you already have the location
if you are spawning the entity with World#spawnEntity(LOCATION, EntityType)
seems to be fixed now
@wanton vine so.. ClearLag ?
Is it somehow possible to get an org.bukkit.Color from string? I.e. if I have GREEN in my database, I'd like to get Color.GREEN but I only get the string from the database
@woeful mural
Color.fromString()?
Not a method of Color :/ Guess I'll make my own method for that
Needs to be uppercase
Is Color an enum?
Sorry its valueOf
if so you can do Color#valueOf
Also catch IllegalArgumentException
It seems he's using valueOf on an instance
Rather than the static method
@frigid ember could try using getEntityClass()
its not
EntityType is an enum, but contains methods in the Enum
getEntityClass() is one of them which returns the entity class that the type belongs to
You can use reflection to get the static variable with a string ¯_(ツ)_/¯
Meh reflection
personally, I would just keep a list of the data for entity heights since a list already exists for such things
Is there anyway to create "custom" items in spigot using nms, similar to how you create custom entites?
whats wrong with reflection lol @sick citrus
it isn't always optimal and can be slower then other methods
well yeah
but you can cache methods
so you dont have to do class forname and getdeclr method
speeds up things greatly
Just slower than the rest and definitely feels more of a hack solution than proper coding.
and for the average call to reflection you wont notice it
depends really
everything dpeends lol
I already noticed you're a little bit of a troll, you don't have to remind us in every instance
😜
? ok
Generally should avoid reflection where you can though
should only be used if you have no better methods to do what you are wanting
I am just pointing out a solution for enum#valueOf on a class which has static methods
If you can avoid it, avoid it, that's all.
@sick citrus > Generally should avoid reflection where you can though
@keen compass
So basically
That conversation could have ended 5 minutes ago.
yep
But where would the fun be then?
that is where imagination comes in 😉
@woeful mural
If you want to use reflection just use
try {
Color color = (Color) Color.class.getField(string).get(null);
} catch (IllegalAccessException | NoSuchFieldException e) {
e.printStackTrace();
}
But what I would do is add the names to a hashmap and assign a color value e.g.:
private static final HashMap<String, Color> colors = new HashMap<>();
static {
colors.put("BLUE", Color.BLUE);
}
It's not always about the best solution, sometimes its also nice other solutions exist for the case you might need them. @sick citrus In the last few days I noticed you are always skeptical, replying on stuff thats not necessary and then circling the issue back to me which you basically started lol.
Just trying to help, if you dont like it, ignore
but I think this should stop here
@loud fox fixed it by removing some outdated plugins, I’m not sure which one fixed it specifically tho
Got my plugin number down to 64
nice
That number still seems high but you will see an improvement already
While true it isn't always about the best solution, and that it is nice to be presented with other solutions. You should always yield to the better solutions and make note that the solution you present may not be the best. We should always strive to provide the best solutions whenever possible and make aware that while other solutions exist there is caveats to them in using those.
Yeah I’m still trying to remove more, but it’s a good start
reflection has its place just for most cases its not the best to use.
The better solution will never be reflection
ah yes, if I wanna use nms and make my plugin cross-version compatible just create a class to each version with each import
Reflection exists for a reason, sometimes you can't avoid it
I'm looking to create custom items using nms/spigot, I know you can create custom entities using NMS so I was wondering if you could do something similar with Items?
For instance, if you wanted to dynamically do something without knowing what that something is because you can't know, reflection is the way to go,. Or there is something you want to do but there is no other way to do it but with reflection.
This is more of a netty question and not spigot.
Is it a good practice to send packets as serializable objects converted to byte arrays and then bytebufs? how could i send objects better or more efficiently?
would be better to turn them into byte arrays since that is the only way to send packets
so its serializable object -> byte array -> bytebuf
i just said that
...
you send ByteBufs in netty
too
I am just stating, that there is no other way to send a packet other then a series of bytes
bytebuf lets you write a byte array, char sequence
and int
and more
so there is a way
Id like to add a disclaimer to this channel.
CAREFUL: most of the answers you'll get here are written by people who don't know how to code.
what is more efficient
i want to send as small as possible
do you recommend zipping
not zipping
compressing
idk
?
Just wondering really
that doesnt answer
Netty packets
i said its unrelated to spigot
just send it off immediately when you can, packets are relatively small. But if you want the most efficient data types, its going to be byte because no matter the data you throw at netty, netty has to turn that data into bytes. But if you turn it into bytes ahead of time, that is less for netty to do.
i do
hi everyone i am creating a plugin that uses the nms code only that some classes does not let me access because they are private there is a way to access them
i convert the serializable object to a byte array
Also gzip the packets
and i write the byte array to netty
Does it rly matter afterall you can async send packets..
ingive it to netty
@floral isle ciao 😁
More efficient than zip altogether
@sturdy oar salve
should i gzip
bzip2
you can gzip packets, but I would probably not try to do so if the packet data is less then 64 bytes because there is no benefits to it since packets less then that size will be padded to that size anyways
You should gzip usually
hi everyone i am creating a plugin that uses the nms code only that some classes does not let me access because they are private there is a way to access them
You can do it with reflection, but some fields/methods are private for a reason, why are you working with them in the first place?
you can gzip packets, but I would probably not try to do so if the packet data is less then 64 bytes because there is no benefits to it since packets less then that size will be padded to that size anyways
@keen compass
True
its not more than 64 bytes
so i dont need it i guess
do i lose anything
doing it
Yeah no don't do it then
you waste cpu cycles in doing it with no benefits to size
like performance from the sender
if its less then 64bytes
I'd even say if it's more than 128 bytes.
@pastel basin
#4146 i creating an npc plugin like citizens
and some methods like getbukkitentity are private
you have to use Reflection
hi everyone i am creating a plugin that uses the nms code only that some classes does not let me access because they are private there is a way to access them
@floral isle https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/AccessibleObject.html#setAccessible-boolean-
@bronze marten that method has been removed from Java 9+
yes but i never use that
it's now trySetAccessible
ok thanks
why would you use 8
@sick citrus at 128bytes the packets get split up
just because the majority is stupid, doesn't mean you sould stay on java 8 forever
Java 11 is an LTS now, so I don't even bother giving support for 8
new java versions have some good features I take advantage of
^
ok
Java 8 suffers from not having AOT (Ahead of Time compiling) as well as suffers from optimizations done in later versions
Java 9 is when AOT was introduced
Like super fast gc? When I run minecraft on java 14 I get 50 more fps than with java 8
mk
lambda λ
?
that is because they optimized the G1 GC @pastel basin in java 14
I personally use GraalVM 11
I'm more fond of Rust nowadays
besides, towards the end of the year think its like September or November java 8 is going to be EOL
so eventually everyone will upgrade to java 11
well Spigot 1.8 doesn't have Java >9 support
There are stubborns like hypixel who doesn't likes newer versions
see
Hypixel doesn't count
it should
they probably not even rely on Bukkit's code
yes they do
leave them alone
Hypixel has custom servers
So while they might have bukkit code, they essentially have their own fork of it
well you are the minority
they use bukkit, im not sure if is spigot or a fork they made
but is definetely bukkit
it is a fork they made that they use
otherwise how else are they using Slime and Seaweed for their servers lol
wrong with what?
then play play.spigotmc.org bruh they even force latest 1.15
i accidentally had 1.15 thinking no diff lmao
spigot updates so dam fast
the server
latest snapshots
like bruhh
[Spigot 1.8.7] Send title method is deprecated. Do you know the method i need to use to replace this deprecated method ?
don't think you really need to worry about deprecated methods in old mc versions
I mean, not like 1.8 is going to get any updates XD
Is there a way to replace a recipe? With the Bukkit.recipeIterator()?
so just use whatever is available to you
Ok ok, thanks
should at the very least upgrade to 1.8.8
every version below that has big security flaws and 1.8.8 fixes some of those things
I'm looking to create custom items using nms/spigot, I know you can create custom entities using NMS so I was wondering if you could do something similar with Items?
I'm using 1.15.2 btw
was referring to someone else lol
You can create custom items, but really depends what you mean custom
I mean, you can create items with the API, with all kinds of lore and metadata etc
Similar to how you create "custom" entitles, where they are based on a parent item
why not just creating the regular item and changing the data after?
^
What if I need to add "Custom data".
use PersistentDataContainer
Metadata is not persistent and is reset when the server shuts down
my guy frostalf
Well I don't recommend usage of old versions, but at the very least use the versions that don't have big security flaws in them
Can I just use an ObjectOutputStream to convert a POJO into a byte array then just shove that in to an item?
Oh
Cause I already set up something similar
where I have a POJO
and I made a custom data type for that
that converts it into a byte array
and back
welp, I need sleep. You all have fun 😄
I was just wondering if there was a way to go "Full Custom" in a way
Because I'm unsure weather I could create a texture pack to add custom textures, similar to how Hypixel Skyblock texture packs work.
I never played Hypixel Skyblock but whatever Hypixel can do with items you can do
since servers use packets
@jaunty night making custom textures for items that are just different in names is very simple, I could show you how to do this and even change enchantment texture to see what your enemies have on their sword and armor
So it doesn't matter the type it just matters the name, although the name of the items I will create will be mutable, not static so will that be an issue?
i dont think so
it worked fine for me
i even made swords break when they have a certain amount of damage
like the texture was only half of a sword
Cause I will have a sword called like a Forrest Sword and that sword may have a large amount of prefixes to go along with it
not u
well
urs is nice too
but i didnt mean u
i was being sarcastic to @jaunty night
but urs is nice
I generally use java thread feature for my background works. After some search I found that some of usage of java thread may be dangerous and unsafety for server. So where should I use spigot scheduler and java scheduler? I'd like to know your ideas and experiences about it.
@frigid ember xD sorry but thx anyway
yes its dangerous if u access bukkit
@frigid ember Hey, my pfp from half-life. One of the most revolutionary video games.
(it was made in 1995)
@jaunty night i played black mesa its really cool 🙂
So If I use java thread for my database stuffs, it's safe to use right?
When you right click a block, I have a GUI that opens. (This GUI is managed in the InventoryClickEvent). How do I get the chest that was clicked?
I only use threads for tasks that may be heavy on performance and affect the flow of my software, so instead of running on the main thread and freezing the application when the task started just run it on a thread and if it fails and consume too much memory the thread is killed and not the whole application
Maybe I can use target block
inventoryopenevent?
When you right click a block, I have a GUI that opens. (This GUI is managed in the InventoryClickEvent). How do I get the chest that was clicked?
@remote socket Did you try PlayerInteractEvent and get the clicked block?
Store it somewhere and access it in InventoryClickEvent
I can just use target block
the player can always turn their head
@pastel basin How can they turn their head when in an inventory
Anyways, how would I get an ArrayList<int> of integers between X and Y
@pastel basin How can they turn their head when in an inventory
@remote socket If the server lag and the inventory doesn't open right away they will be facing another block
not everyone has 0ms of ping
Are there any mob hp bar plugins out there that are free?
If not how can I make one?
or see if the version matches
@tiny dagger well i set heap size to 10gb lol
i don't know why it crashed tho
the error might give an indication
i mean it sure would
well it crash because the timeout
Someone help me develop my minecraft java sever please
Talk with the fallback servers? So you'd probably need to have a plugin in the fallback servers as well
you can just use the bungeeutil API plugin
^
@tulip pendant please don't ask this type of questions here and hire staff within the releated spigotmc forum section.
:(
you can just use the bungeeutil API plugin
@cloud crater Can i use it via maven?
it works through maven yes
You may certainly ask support about spigot and bungee related questions DogLover. But there exist recruitment channels on the forum I think.
using api's is nothing bad, no good beating yourself up if there are open source Lib's* out there that will help massively 🙂
yup
Don't post that stuff here either Retrooper. I don't want to minimod but certainly this channel is for help.
#general Exists for off-topic related stuff.
https://www.spigotmc.org/resources/bungeeutil.8699/
@cloud crater Does it support 1.15? The page says up to 1.12
Depends what're your going to use probably.
Usage of Player would probably not break any mechanics?
why no respond dms conclure
not sure if the dev has added higher then 1.12 support
Retrooper spammy
but you can test.
@frigid ember that dm ss if funny 🙂
What method does one use to check if a string matches a regex in any place?
I guess you could use the equals method
no??
I have a RegEx , it's clearly finding matches, but both Matcher#lookingAt() and Matcher#matches() return false
Show your code
Your code I said
yeah that's what I was asking
Is there a method that returns true if any part of the string matches
or I'll just have to split the string by spaces and check each word
how about find() ??
Mhh, i guess I could use that.
Hi All, does anyone here have experience with Redis API? I can identify a players proxy if they are on the same proxy as another server and if they are not, but I cant figure out how can I send plugin message from one proxy to another
Is it possible with the Redis api to forward a plugin message to another proxy?
Never worked w/ it but it should be unless?
anyone know the perms for a default user to get this in essentialsX?
Caused by: java.lang.NullPointerException
at me.jameslloyd.ichest.events.ChestGUIClick.clickEvent(ChestGUIClick.java:71) ~[?:?]
if (e.getClickedInventory().getTitle() != null) {```
How can i not get NPE when doing nullcheck
idk let me check
yeah that did not help lol
might be another permission there too possibly
the website not the perm
is getClickedInventory null
my bad
yeah i know
but does not give you a default list of the 999 perms on the plugin
lmao
you can filter easily
ik
@remote socket I mean send more code
Because most cases where NPE appears it has to do with invoking undeclared fields.
@EventHandler
public void clickEvent(InventoryClickEvent e) {
Player player = (Player) e.getWhoClicked();
if (e.getClickedInventory() != null && e.getClickedInventory().getTitle() != null) {
if (e.getClickedInventory().getTitle().equals(plugin.chestMenuTitle)) {
switch(e.getRawSlot()) {
//blocks stored in iChest
case 20:
blockClick(e, 1);
break;
case 21:
blockClick(e, 2);
break;
case 22:
blockClick(e, 3);
break;
case 23:
blockClick(e, 4);
break;
case 24:
blockClick(e, 5);
break;
//exit button
case 31:
player.closeInventory();
break;
}
e.setCancelled(true);
}
}
}
I added to it
@limber moth it worked 👍
Also don't compare titles. It's better to compare references then Royal
lol i am getting so many problems i cant fix after debugging, can anyone help??
error: https://hastebin.com/lejinahisi.css
main: https://hastebin.com/atoyonejer.java
enchantment class: https://hastebin.com/otuyowotet.java
[15:06:06 WARN]: java.lang.IllegalArgumentException: Cannot set already-set enchantment
Idk what this exactly means but you're trying to re-register something or set something that is registered alr?
its really odd
public static void registerEnchantment(Enchantment enchantment) {
if (!byId.containsKey(enchantment.id) && !byName.containsKey(enchantment.getName())) {
if (!isAcceptingRegistrations()) {
throw new IllegalStateException("No longer accepting new enchantments (can only be done by the server implementation)");
} else {
byId.put(enchantment.id, enchantment);
byName.put(enchantment.getName(), enchantment);
}
} else {
throw new IllegalArgumentException("Cannot set already-set enchantment");
}
}
You're enchant id is most likely already registered or something
ill set it to like 200
and test
oh
found it
in the enchantment class it was registered with an id of 70 and in main 75
You should make a constant of the id
I mean the id is never gonna change so having it constant accesible is okay.
speed or velocity?
speed
i have made an event for when someone equips armor but it is not applying speed so
and i have tried a few different api on spigot which dont wanna work
You never registered speedenchantments listener?
did i not
not what I can see
lol how would i do it with an enchantment?
Bukkit.getPluginManager().registerEvents(speed, this);
the thing is
i tried that
and i said i had registered it twice
hmmm
lemme try again
hello, i had a minecraft server on bukkit 1.12.2, and recently i changed the version for SPIGOT 1.12.2, but since this changement, we can't PVP, break or build in survival.
can somebody help me ?
you have certain options now
to disable/enable pvp,and spawn protection
if its a friends only server,might as well op everyone to solve the issue
already did that, and its not
its a minigames server
so its breaking every games we have lol
hmm in that case why not simply go back?
because our TNTRUN plugin is working only with SPIGOT 😦
where can i find theses options on SPIGOT ?
to disable/enable pvp,and spawn protection
@vernal spruce
actually seems theyr in normal config
server.proprieties pvp=true spawn-protection=16
already did, (i have a spawn-protection set to 0 bc its useless to change it)
it seems like the players are in "survival" mode, but the survivalmod is like adventure modd
i can't even point at blocks
Thats a way of some plugins to block players from destroying blocks
might be one of them
i'm searching
Hmm this returns the classic DROPPED_ITEM entity? Returns: ItemDrop entity created as a result of this method
Talking about world.dropItem
i have a a
not about spigot tho just generally mc
why doesnmc name mc like this
1.8
1.8.8
not 1.8.1
and for the other versions
wat
It exists?
It definitely does ;P
where is it
in the launcher?
Same thing
these snapshots?
@subtle blade how would i go about storing a head texture?
by uuid of the player
do i create a fake player with and assign that to it?
its from
ok
wtf
didnt apepar for@me
appear
why doesnt optifine do for all
or spigot exists for all
spigot 1.8.1 doesnt exist
or does it
1.8.1 just example
couldnt find it thru maven for example i think
Correct. 1.8.1 server does not exist
ok
The protocol doesn't always have to change. That's why there's no 1.8.9 server
why can clients join 1.8.8
Sometimes it's just client-sided or just server-sided changes
So long as no packets are added, removed or changed, the protocol won't change
As far as 1.8.0 - 1.8.2 are concerned, they're under the same protocol specification. The server sees them as one and the same 🙂
why did craftbukkit add diff packages
for each version
like wth
wont it take years transferring the files too xd
why did they do that
i dont see one benefiting anything
It didn't. That's CraftBukkit
i wanted to correct just now
The vanilla server has proper packages. CraftBukkit relocates everything to a single package
To discourage use of NMS
Or at least keep developers aware that things are prone to change
Names change, things get mapped, things get patched
If you're able to write a PR to Bukkit so API can be added for what you're doing, I support that
whats pr
If there's no chance it's getting into Bukkit, reflection is iffy because it will only work on CraftBukkit implementations (or its derivatives)
pull request
Actually, will technically only work on CB anyways lol
ok
What was that bug that the server could access minecraft files
why did spigot do some changes to cb nms
Was a resource pack exploit Fatal
All changes made by CraftBukkit are denoted with CraftBukkit comments. As with Spigot
Guys
It's to state what's Spigot and what's vanilla
Hello everyone -quick help with Scoreboards
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.
directed to me?
I want to display data to the user that is only related to THEM - their kills, their deaths, etc. But, I also want to show team data (positions controlled, etc)
No
Each player can have their own scoreboard (Player#setScoreboard()) so you may create one for just them, insert data just for them. For any shared data, you have to pull it from some third source. You can insert whatever you'd like as a score
They're just Strings
I've tried multiple avenues to accomplish this - building a scoreboard for each player and registering a new team each time
just i saw u online and as ur staff on spigot u might know how the answer to these question
animals-every: 6000
animals-for: 1000```What do these do
oof
@subtle blade yes, but the issue is then that the player is not on the same team when you create a new scoreboard each time
Fore xample
?dogfacs
?dogfacts
Perky-eared dogs hear sounds better than floppy-eared dogs.
If I have 2 players. Player 1 joins team 1, player 2 joins team 2
where do u get the facts
or do you hard code them
team 1 and team 2 are registered independently on each scoreboard
It's not in the configuration documentation
?catfacts
Many people in China consider cats a "warming" food that is perfect to eat during the winter
Or clearer still, player 1 joins team 1 and player 2 joins team 1
wth man remove dat
Because team 1 has been registered on player 1's scoreboard AND player 2's scoreboard, the game does not know that these players are on the same team
So they do not show up as being on the same team in-game
Thus this is a problem
Team 1 on player 1's scoreboard is a different object than Team 1 on player 2's scoreboard
I need them to be on the same team. But when you try to pull from the same static scoreboard build, you cannot then show individual player data without showing that same data to all players on the team
Right... however is that not the purpose of the global scoreboard?
Yes
Sorry I'm not super familiar with the scoreboard API as others may be. I don't use it often
I have multiple "nations". Each nation is essentially a team.
Each nation(or team) has a population of players
All players in the server should see the same data
in terms of nations. For example, if a nation has 7 towns, then all players in the server should see that team 1 has 7 towns. But, all players in the server should not see player 1's kills
I cannot find a way to do this, and am starting to suspect I will have to use NMS w/ reflection
well isnt that nice,i have to use reflection to set a head to a non-existing player texture
animals-max-per-tick: 4
animals-every: 1200
animals-for: 100
monsters-max-per-tick: 8
monsters-every: 400
monsters-for: 100
villagers-max-per-tick: 4
villagers-every: 600
villagers-for: 100
flying-monsters-max-per-tick: 8
flying-monsters-every: 200
flying-monsters-for: 100```Does no one know what these do?
Where are you seeing that?
Is this a downstream configuration? Are you running Spigot?
i think its spigot default config
It's not. We don't have those options
@subtle blade Sorry to keep bothering - another question for you. Is it possible to assign multiple scoreboards to a single user?
afaik no 😦
eeh it works ```private void buildMedPack(){
ItemStack head = new ItemStack(Material.PLAYER_HEAD, 1);
GameProfile skin1803103601 = new GameProfile(UUID.fromString("f017c5f5-e70e-4b16-9cb7-a82fcb1af9c3"), "skin1803103601");
skin1803103601.getProperties().put("textures", new Property("textures", "ewogICJ0aW1lc3RhbXAiIDogMTU4OTcyOTE0Nzk5MiwKICAicHJvZmlsZUlkIiA6ICJhNmE3MzI2NjZhZTI0YjIwYWQyNmIzYWZkZWZjNmM1MCIsCiAgInByb2ZpbGVOYW1lIiA6ICJNeXN0aWNHYW1lck1hbiIsCiAgInNpZ25hdHVyZVJlcXVpcmVkIiA6IHRydWUsCiAgInRleHR1cmVzIiA6IHsKICAgICJTS0lOIiA6IHsKICAgICAgInVybCIgOiAiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS9lNTgwYzBlYWYzZTFkMGFlNWE0MmQ5NjY0MWJlZGMyNTFhZGQ2ZjA5NzI1NDI3OWJhYTJmNjI5OWNjZTYzMjcwIgogICAgfQogIH0KfQ==", "rXy8bq+RjMJiawajWDm2+N7jV+kCGwqYSmOLth5A7is0uyR8Aqe9DDcxUdAAdHJd+JOx5/KY9EmO8ExobQ0kt2sarJLlnkVQa3o+gEeadFj9DA6VwsWWki2qqAvgZQsQOe3w41UF9M3C96Z/EIBR8hZp8kG73WKwA3xQ9b6juk5PxDSGEuJbnpYZW5fxraOSmElMFqWJelU22z15I1nqk6aWzwa9WHh/ywX0Hy4BvqWvwqNhBoxHREwQ8TOLyairKxlo9YX/Q+0OaRHa120vynLKH2jtBH3qD2XUugnopyN4eoCos2uOkFE2T4zeBKkUSE10xNuMpowKXZlmXEi4qGh+KGcY1b284vvXX4Muztx8kxp+xSe5vAxVGSVqkRR7gt0yK1DCxlkgBCWERoNoBR81oNqON6Ild/rdhQBEZsTW/SuCsPTQa+GR6uOeNadyXSM6tSG8CAxaon0urrbNoy9rud3dQCrcwbkpzhdsQwaROWGhsdUaHfrSZ6z7wxHQTiAC8QLiy4NukyHfp5w3vMbUbs+6LCT774MdSo4hioCKalwHXfaDXHrXxPKjsfYCmDTRehBBioQpBakIv4vb3upWdo7WFgjzau83PljVP4lYfqaO3bktZtcLWT0VtYAbsbXH6JROrhNH1LIeGomUcP5ZjJeTYCc9IqbbvEV1oyQ="));
SkullMeta headMeta = (SkullMeta) head.getItemMeta();
try {
Field profileField = headMeta.getClass().getDeclaredField("profile");
profileField.setAccessible(true);
profileField.set(headMeta, skin1803103601);
} catch (IllegalArgumentException | NoSuchFieldException | SecurityException | IllegalAccessException error) {
error.printStackTrace();
}
head.setItemMeta(headMeta);
medpack=head;
}```
was that at me
look at that pile of shaite
the afaik no thing
Yes
also what does afaik mean
As far as I know
I've seen others use it & idk what it means
Ah
Gotchya
Well, I'm guessing reflection is going to be the only way to do this
What's the purpose of the teams?
I know it's per nation but like, why?
What benefit does the teams give you?
So the name above their head & in the tab list will be the color of their team
Ah
yeah - I want that bit, but I can't have that if they are not all part of the same team structure
lol wut
The way Teams are handled, whether it be through Craftbukkit or the actual NMS source, is not good IMO
You can blame vanilla for that
boy thats a huge error stack
@subtle blade Yeah I assumed as much
I was looking through their class & they have no setter for teams, which is insane to me
wut my brain hurts..
how can same thing throw a huge ass error on paper but not on spigot
wut
because they make changes?
specifically they make changes to the game profile stuff and actually expose it
so dropping a custom textured head on the ground on paper bricks it
fine by me
the focus was spigot so if any paper guys will use it too bad..
heya. as 1.16 will be here soon i wonder if we still have chunk-errors between versions like it used to be back in my days?
is downloading a cracked plugin off black spigot illegal?
what you think
How would I save an ArrayList of Recipes to the config? or just save it in general?
you are asking if decompiling and sharing a premium plugin is illegal..
god dammit outdated spigot again
just say yes or no please....
its pretty obvious that it is
Oh
ahm??
why are my medkits floating to narnia?
Item it = (Item) item;
it.setPickupDelay(Integer.MAX_VALUE);
it.setGravity(false);```
I cant yoin my Server
Thats strange why do i have to keep forcing a vector on a item to not float to narnia?
new BukkitRunnable(){
Vector v = new Vector(0,0,0);
@Override
public void run() {
if(!toCancel.isValid()){
this.cancel();
return;
}
toCancel.setVelocity(v);
}
}.runTaskTimer(pl,0,1);
}```
How to check if a packet has been sent?
@stuck goblet wat does it says
in what
clienr side or server side
or generally just netty
how would I save a ton of recipes that I made so when I restart the server they stay
They are randomly generated recipes but I want to be able to save them between restarts
im using grantx and luckperms and for some reason when i grant a rank it says it granted it but didnt actually grant it. any fix? this is an example of my ranks
Not sure I understand. Recipes will be registered whenever your plugin starts
Why do you need to save them?
I randomly shuffled all the recipes around but I want to save them because my friends and I want to do an smp with those random recipes but we don't want them to change between restarts
Right. Best option is to just find a format to write them to file and then read them accordingly
Really there isn’t another approach. They have to be written to file one way or another
ok
so I would have to make a different format for each recipe type? Like Shaped, shapeless, furnace, etc?
Internal Server Error @frigid ember
@frigid ember @woeful mural I fixed it.. turns out you DO need a static IP address
whats the best way to evaluate a string in java
is there a way inbuilt in java
c# has data tables
what about java
by best i mean efficient
java 8(dont hate on me)
What do you mean by evaluate?
I think you mean to turn strings into a more useful datatype, like a 2d array or a collection, etc. Is that right?
I also have my own question: anyone know how I can change what blocks a ravager can destroy?
Is it just mathematics in your string, or are you wanting to have actual code in there as well?
If you're looking to allow people to do something like paste executable code in books, I don't know of a native Java 8 mechanism for doing that. There are libraries that read and run code (javascript comes to mind), that might be helpful.
Oh, the compiler API is older than I remembered. It might work. BUT, you need to trust these code sources a lot -- you're allowing them to run arbitrary code on your server.
What does this mean: "Query - Incorrect magic!" <- just spams console with this
Hey guys, question about tile entities and client lag.
For some reason, I keep seeing new players join but instantly leaving. It "seems" like it doesn't happen often and when I ask players to go to /spawn to see if they get fps drops, they say they're "fine".
But I've been seeing this join/leave/join again more and I feel like it could be something wrong with the server. Too many entities at spawn? Some sort of server lag? (tps has been almost perfect for almost a month for us, though). Or is it some sort of client lag?
Any ideas?
So they could run a command that deletes everything on the filesystem, for example.
In our spawn, there's quite a few holograms, npcs, some signs, empty enderchests for design, a nether portal that's used for something else. I wonder if this could cause these join/leaves
But the holograms are set to not appear unless the player is near
Hey guys, how to I get a MapPalette from Color
49
48
public static void main(String args[]) {
System.out.print(MapPalette.matchColor(Color.BLUE));
System.out.print(MapPalette.BLUE);
}
Just out of curiosity, what causes the most lag in a plugin?
depends on the plugin
like I know that runnables can cause a ton of lag
but is there any time when they're fairly efficient?
When they don’t do something stupid lol
could you explain what causes the most lag with them?
i'm gonna take a guess and say loops with tons of entries is one of the causes
Anything that may take a long time to process is inevitably going to be taxing on a server
Yes
Though I made something recently that does structure detection based on the block a player is looking at and then drawing a box outline of particles around the target block and it doesn’t affect the server
It depends on how you implement it
Lemme find it (on my phone lol)
I'm just curious because I'm working on a core plugin for my factions server and I sometimes get the "is the server overloaded?" message
I am constantly having issues with BungeeCord. It's not working properly I think. It's crashing.
I got 2 VPS's on one there's a bungeecord server that connects to my hub. I've got another VPS that I just set a few iptable rules on forwarding 25565 traffic to my bungeecord VPS.
For some reason it happens sometimes that when someone joins or SOMETHING, I'm not sure. The BungeeCord server starts receiving "Query - Incorrect Magic" and it crashes my proxy server.
but looking back its probably because i'm testing the plugin on a localhost server off of my laptop with ~1GB allocated
the amount of ram shouldnt overly matter for a factions plugin
i cant imagine anything like that taking up more than 1gb
you're most likely doing some strange checks, or doing calculations with things in a suboptimal fashion
well its not the only plugin lol
i have Essentials, HolographicDisplays, SaberFactions, LuckPerms, Multiverse, PAPI, ProtocolLib, Vault, my custom enchants plugin, my kits plugin and my server's core plugin
like its not terrible
i've just noticed the messages
No toll on the server
idk, have you tried it with only the bare minimum for your factions core?
haven't yet
once again i dont think its a serious problem
but once i go to release it i'll make sure everything is good
and i only get the overload messages after reloading a few times
and i was really just curious to hear your opinions about what causes the most lag, so thanks 🙂
java.lang.RuntimeException: org.bukkit.configuration.InvalidConfigurationException: while parsing a block mapping
in 'string', line 62, column 3:
how do i fix this error when trying to start my server?
send a screenshot or link to a pastebin of your yml file
bukkit.yml or spigot.yml?
(this happened when trying to move from spigot latest to paper latest btw, might be asking in the wrong place)
ok now send a pastebin of your spigot config file "spigot.yml"
try moving the lines "merge-radius" and "exp: -1" to where the others are
like
the indentation should be the same
default:
merge-radius: 1
exp: -1
verbose: true
hopper-amount: 1
# etc
@velvet scaffold should look similar to this
fixed it thank you so much
no problem!
Ambiguous method call. Both
getOnlinePlayers
()
in Bukkit and
getOnlinePlayers
()
in Bukkit matc``` any clue why i get this?
It's an IDE warning because he's using Bukkit 1.7
ahh i see
or could be an IDE warning of using the two of the same dependencies
I'm getting an object in a class using the code:
private FactionsManager factionsManager = new FactionsManager();
``` but it returns null. I also have an instance of the class in my main class, so I tried that but it also returned null. The class doesn't have a constructor, so I don't know why it's returning null. If someone could help me that'd be great. Thanks!
https://paste.md-5.net/dofoxufiti.shell why are these values all 0
for (int i = 0; i < worldMap.colors.length; i++) {
Bukkit.getConsoleSender().sendMessage(String.valueOf(worldMap.colors[i]));
worldMap.colors[i] = 0;
}
because you set them 0?
Thats after I send the values to the console though
do you ever clear out the list?
No
then that would be why especially if you are re-using that list
you are updating the values in the list, instead might be better to just remove them? o.O
Anyone know where I should be resolving the craftbukkit api from? gradlew build isn't finding it, and I have this in my gradle repositories section:
`
mavenLocal()
jcenter()
// copied from https://www.spigotmc.org/wiki/spigot-gradle/
maven {
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
// As of Gradle 5.1, you can limit this to only those
// dependencies you expect from it
content {
includeGroup 'org.bukkit'
includeGroup 'org.spigotmc'
}
}
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url = 'https://oss.sonatype.org/content/repositories/central' }
`
These are the imports in my code:
import org.bukkit.craftbukkit.v1_15_R1.entity.CraftMonster; import org.bukkit.craftbukkit.v1_15_R1.entity.CraftRavager;
And in dependencies:
compileOnly 'org.bukkit:craftbukkit:1.15.2-R0.1-SNAPSHOT'
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Hmm, but I ran BuildTools successfully. java -jar BuildTools.jar
but you are also going to need to update your gradle file to point to that built version instead of trying to get it remotely since it doesn't exist remotely
Maybe buildtools only builds spigot by default?
API is hosted, but for NMS stuff the server jar is not hosted resmotely
I hoped the mavenLocal() line would pick up the local build?
yes BuildTools only builds spigot
by default
but you should only need spigot since it contains craftbukkit
oh, maybe Iv'e made this problem for myself by changing dependencies.
That was it. i changed the dependencies to compileOnly 'org.spigotmc:spigot:1.15.2-R0.1-SNAPSHOT' and it works. Thank you very much.
you are welcome
Should saving data (from Java) to a database be a blocking or non-blocking operation?
every 5 minutes
Preferably that wouldn't be blocking. IO should be async
Ok thank you
My server keeps crashing and players get "Failed to verify username" when trying to join it. Stacktrace: https://gyazo.com/f8712c7f058c959f5f0f6ef1991c8f1f
Any idea what might cause this?
not sure , but your map may have corrupted or invalid chunks?
Idk I've never seen the error "Failed to verify username" before, but got it on my survival server 2 days ago and today on my skyblock server twice :S
Its quite possible mojang has some services down
if your server can't contact mojang servers, it can't authenticate which gives you Failed to verify username
Hm I see
oof
anyone knows the plugin that sets all players on the server selected skin and they can't change it?
How do I put empty lines on scoreboards?
that is easy
just put an empty line
unless you're using scores to do it in which case good luck
jk
if you use scores
you can use color codes
how do i stop a ender pearl from colliding?
which is?
something with movingblock
nah
it errors saying spigot() isnt a method now
that disables all collision
yes that what i need
i dunno
its for hub
it might not be a thing
Depend on Spigot, not Bukkit
setcollidable i think
i have imported Spigot.
Also, yes, entities have a setCollidable() method
do you get a nomethodfound error?
or an exception
unsupported
or something like that
is there actually a setcollidablewithentities?
Material's aren't serializable are they?
aused by: java.lang.NullPointerException
at me.l3ilkojr.hubcore.Items.impl.EnderButt.getItemType(EnderButt.java:25) ~[?:?]
at me.l3ilkojr.hubcore.Listeners.PlayerListener.onEntityDismound(PlayerListener.java:169) ~[?:?]``` what could possible be null here?
@Override
public ItemStack getItemType(Player player) {
lore.add(StringUtil.format("&6GoldenPvP"));
lore.add(StringUtil.format("&5EnderButt"));
ItemStack itemStack = new ItemStack(Material.ENDER_PEARL, 16);
ItemMeta itemMeta = itemStack.getItemMeta();
itemMeta.setDisplayName(StringUtil.format("&5EnderButt"));
itemStack.setItemMeta(itemMeta);
itemMeta.setLore(lore);
itemStack.setItemMeta(itemMeta);
return itemStack;
}```
their name() is a serialization in itself james
Hmm well I basically want to serialize a RecipeChoice
i think you can implement your own serialization
Yeah I was kinda hoping private HashMap<Character, List<Material>> choices; Would be serializable
well it's not that hard i think to do it
i think you can use json
for better serialization
but as for yml
it's pretty restricted
do you guys know how to convert an object to bytw array and back WITHOUT serializable
like i want to be able to send an object HelloWorld class instance for example, and it has some serializable objects in it maybe, and i want to covert it toan byte array and convert it back by casting.
the reason i need this is in sending packets(not mc related)
i wanna send for example HelloWorld packet, but not have them have the same import
and same serialuid
is there a simpler way
or must i use serializable
Hello I was wondering is there a plugin where if a mob enters a certain area it would be killed. I use the region command and it stops them from spawning but they can still enter the area and i was wondering if there is a way to auto kill them when they enter the region.
hey if I have a method in my constructor for another method, does the code in the constructor run before the method whose constructor it's in ever runs?
I feel like it does right
How do I merge mobs in spigot?
Hey, so I've been getting this message, every time I reload my tablist plugin and whenever I swap to servers (bungeecord) that include more than 1 player. It kicks me from the game and says IllegalArgumentException : Team ... already exists in this scoreboard.... I have updated everything and made sure that my tablist plugin isn't the cause. I really don't know what else could possibly cause the issue, and i believe the only way would be that somewhere, somehow, a former plugins data has been stored that's causing this error. Any help would be greatly appreciated.
@twilit roost if you know about coding, use WorldGuard’s api and get region entry
nimsy send code?
stacktrace would be useful as well
try#catch
wym
just catching an exception isn't smart and wouldn't solve the problem
if you print the stack trace it helps you debug
^
@cloud crater is there anywhere we i can see some expiation about how it works ?
maybe you could show us where it breaks?
also methods starts with lowercase fierceeo
And use some repeating tasks perhaps?
@naive goblet
Yeah I figured that out but how would I actually merge them? I want the end result to be something like this https://www.spigotmc.org/resources/stackmob-legacy.61578/