#help-archived
1 messages Β· Page 11 of 1
i'm not aware of a way to do it with the bukkit api (though there may well be one), but you can listen for the Player Digging packet, and update some flag based on whether the status is 'start', 'stop', or 'cancel'.
stop is when the player finishes breaking the block
cancel is when the player decides they don't want to finish breaking the block
hm alright
You may be able to use BlockDamageEvent depending on what you are doing
blockdamagevent tells you when they start, but not when they stop
Sooo.... The instructions for BuildTools says this:
The very latest versions of BuildTools will automatically download and install Git for you. Only grab it manually if you are having troubles!
...followed by stating several times:
Do not double-click BuildTools[dot]jar
...uh ok, so what do I do then? I'm getting conflicting messages here.
(apparently I'm warned for posting URLs because I said BuildTools[dot]jar)
it's not like you'll brick your system so might as well try double clicking it to see if it works
and if not, maybe download git bash Β―_(γ)_/Β―
I did, it does nothing
guess you download git bash then
So no one else has complained that the instructions are wrong?
I just hate not understanding why they say that
Well, I have a really weird server crash.
I don't expect anyone here to give me a solution but maybe someone knows a way to debug it: https://paste.jandev.de/uqowivezeg.coffeescript
1.8
That's also definitely not the whole crash log
@bronze pelican Either post full crash log inside the latest.log (Not crash report), or try TacoSpigot for 1.8.
That's actually the full crash @lusty vortex . https://paste.jandev.de/asumejidof.shell
Servers running fine, then it shows that nullpointerexception and is stopping the server
Probably a StellarSpigot issue
I've been hosting 1.8 since it came out
Never crashed on CraftScheduler
I mean it only happens with the new plugin in it but I can't imagine why it should be the issue ( For reference the only task I'm running: https://git.jandev.de/jan/brutalcollectors/-/blob/master/src/main/java/de/jandev/brutalcollectors/BrutalCollectorPersistenceTask.java )
Yeah I'm assuming he modified it
Yea it's line 373 which would be
Level.WARNING,
String.format(
"Task #%s for %s generated an exception", new Object[] { Integer.valueOf(task.getTaskId()),
task.getOwner().getDescription().getFullName() }), throwable);```
How are you scheduling the task? You doing anything weird?
I would just blame Stellar then tbh. He modified that class for sure.
It shouldn't be possible to throw an exception in that catch block unless something in the task field is null ,or the task it's self is null
Which it shouldn't ever logically be null. Unless of course someone messed with the class
That's something you'll have to ask the Stellar dev
Well doing that then
if youre not running spigot this isnt the place to be
From what I've heard, he mostly just tosses everything on parallel threads with no real thread safety
So who knows what he's done lmao
Yea you're right md_5, I thought it was maybe a general issue, but yea I'll contact the fork dev
doesn't matter if you think it might be a general issue or not
all my factions plugins dont work but my other plugins are fine, what do i do?
sounds like an issue with your factions plugins or the way youve configured them
i didnt touch the config, is it possibily automatically disabled?
I suggest you look at your logs
i did it doesnt show anything up with it
@fleet crane wait do i need to install massive core for factions to work?
I have no idea, I suggest you read the plugin page
yeah it says dont get massive craft
FactionsUUID?
No idea about that one. You're looking for a 1.15 plugin?
I'd suggest you just find an alternative until one works π€·ββοΈ
yeaah
You do not need MassiveCore for FactionsUUID
i cant find any
There's tons of faction plugins nowadays
@keen moth yeah ik thats why i dont know why it doesnt work
Is it RED in /pl
'Doesn't work' can mean a lot of things
it doesnt do the commands
the only thing that works is /factions
anything else doesnt work
And you have no error logs..?
nope
Are you absolutely sure..?
yeah
Your using MassiveCore factions?
no
oh
is there anything in the logs π€
oh
Check your console logs for any errors or warnings
π€
There are other alternatives with more features too: SaberFactions, SavageFactions
provide the logs
paste/hastebin please π
My guess is
You've got multiple faction plugins/versions
And they're interfering with eachother
No clue otherwise
Verify your account to post links
A file isn't found apparently
why though
i tried that 5 times
o
is it possible it disables the folder then it cant locate it because it goes offline or smth?
like can there be smth in the config that automatically disables it?
doubt drtshock will do much
The plugin was only updated after SavageFactions became big with features
@keen moth yeah i had saber factions beforehand and im on their server and they just said you need vault and saber factions which i did
my elytras are causing players to have elytra effects even after they no longer have the elytra in the inventory and they have been killed it requires a player file reset for them to go away any ideas?
For my BedwarsRel plugin, the holo wont update
@keen moth can you help me?
or else @golden vault
You should ask the author of BedwarsRel
who is that
Where did you get it?
at the website
Ok then go there and see how they want to be contacted.
i dont have a spigot one on my server hosting website
Resource staff help moderate Spigot regarding resources. If you need help with a specific plugin you need to talk to the person that wrote it.
ok
Hey how would i use the .setDurability() thing i wish for it to set my item to the durability which is just about to break how would i do this? gs.setDurability((short) 1); does not seem to work
you want it the other way round
max durability - 1
you can get max durability from the material
no
max durability - 1
where max durability is the max durability of the item, that you can get from the method in Material
yes
durability can be better described as Damage
and in fact is described as that in 1.13+
wonky
Help everyone
Thank you so much for describing the issue in such depth
@zenith palm can you help me?
?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.
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.
i need help wuth my spigot server
failed to obtain login start packet
kept spamming me
i did build with build tools
post your log
verify
?verify
!verify
Usage: !verify <forums username>
Anyone know how to get the destination slot of a shift click in nms?
Links enabled in here now π
wot
hint: your protocollib version isnt compatible with 1.15.2, update it
ok hold on
this probably shouldve been obvious from protocollib being plastered all over the log
what
sigh
xD
I very clearly said not just -1
poor md
;I
You can get the durability from the material
alcohol is key to great plugins trust me ik this is my first one ive got the knowledge
Material.getMaxDurability() - 1
Is this your Balmer's Peak π€
also your code wont work in 1.13.2+ because of the warnings given in the deprecation message of setDurability
Damageable.setDamage() π€
deprecation means read the damn docs
the world would be a better place if people did that
Last time I read the docs, getOnlinePlayers returned an array π
Im annoyed by how intelligent i am
subtle flex
i assume u wouldnt be surprised if i were to tell u i havent come any further except from the page and all appreciate it thx
Would I be crazy to use an enum like Operation.GIVE_PLAYER_MONEY with an instance of GivePlayerMoney.class in a field, so that a config with "givePlayerMoney" as a value could be matched to the enum then retrieve the GivePlayerMoney object? If it is not crazy is there a way to match "givePlayerMoney" to the properly named GIVE_PLAYER_MONEY?
ill ask again after several bottles and mental breakdowns @fleet crane if i still dont get it but thanks for the help i appreciate it m8
im thankful to myself i checked the rules before sending that
did you know you can have abstract enums @golden vault π
then you could put the GivePlayerMoneyObject code just as part of the GIVE_PLAYER_MONEY enum entry
at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) [spigot.jar:git-Spigot-ae72bf4-183139d]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(SourceFile:118) [spigot.jar:git-Spigot-ae72bf4-183139d]
at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:918) [spigot.jar:git-Spigot-ae72bf4-183139d]
at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:911) [spigot.jar:git-Spigot-ae72bf4-183139d]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.awaitTasks(SourceFile:127) [spigot.jar:git-Spigot-ae72bf4-183139d]
at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:895) [spigot.jar:git-Spigot-ae72bf4-183139d]
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:828) [spigot.jar:git-Spigot-ae72bf4-183139d]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_231]
Caused by: java.lang.NullPointerException
at com.earth2me.essentials.Essentials.onCommandEssentials(Essentials.java:389) ~[?:?]
at com.earth2me.essentials.Essentials.onCommand(Essentials.java:380) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot.jar:git-Spigot-ae72bf4-183139d]
... 17 more
help
essentials aint working
i cant chat
check your logs again
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:828) [spigot.jar:git-Spigot-ae72bf4-183139d]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_231]
Caused by: java.lang.NullPointerException
at com.earth2me.essentials.Essentials.onCommandEssentials(Essentials.java:389) ~[?:?]
at com.earth2me.essentials.Essentials.onCommand(Essentials.java:380) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot.jar:git-Spigot-ae72bf4-183139d]
... 17 more
I mean at startup
whats that
sure
[20:04:03] [Server thread/ERROR]: Error occurred while enabling Essentials v2.13.1 (Is it up to date?)
you need a newer version of essentials
i just installed latest EssentialsX from spigot forum lol
doesnt look like it
it definitely does not look like you installed Essentialsx
oh hold on
oof
I didn't know that, abstraction is one of my weaknesses. That would be great except that there is a whole package full of these Operation classes, spread across 3 different plugins. Before the plugin would have the operations defined in the config then it would Class.forName() them. But when the extension plugins told the main plugin what the extension classes would be It would log the "Plugin loaded class from other plugin which is not a depend softdepend or load before".
It's the Essentials from Bukkit
@golden vault just make the extension plugins softdepend on the main one?
that'll remove the warning
it does but the main one is what loads the classes of the extension after the extension tells it to. then the main one gives the warning
@fleet crane is spigot ur full time job
can't / shouldn't the extension be the one loading its own classes?
Out of curiosity weaves, since you mentioned all this before, what plugin is this? π
That is what I am trying to change it to doing, currently the config of the extension has strings that are also the name of the classes in the extension plugin that are passed to a method in the main plugin that does Class.forName() for those strings.
SignShop
just pass Class to the main plugin instead of String ?
Weaves are you the one who looks at premium resources
No
lol
I met the minimum requirements for resource staff. I don't handle premiums, you can relax.
π
Oh so @keen moth does?
Just wanted to say thanks. Havenβt submitted anything, but appreciate your work. π
md I would just do that if I was starting over. And I will be passing the classes once I make this update I am just not sure how to pass the classes referenced in the config of the extension when some of them are in the extension package and some are in the main package.
I would just do that if I was starting over.
I relate hard
I was thinking about using an enum in each plugin that all implement a common interface
just move the Class.forName call from the main to the extension?
or ignore the warning for now, its just a warning π
the latest release i have it printing a line that says to ignore the following warning from signshop
lol
Just wanted to say thanks. Havenβt submitted anything, but appreciate your work. π
@frigid ember np. it's a team effort from all of us to handle resource reports & approval π
I'm having a crisis i need someone to point out my foolishness
i have this is a yaml file
- 354,0,291
- 156,0,177```
System.out.print(config.getStringList("coord")); prints []
use config.get and see if anything shows
use a different delimiter instead of , imo. Could try @
did you load the config
YamlConfiguration#loadConfiguration
yes
this isnt the standard config.yml in the plugin folder so ill have to double check
but its worked successfully in the past, which is why im confused
i didnt make any changes to the path
what did you change
Here is some more context md: https://paste.md-5.net/tisorifeye.js
config likely isn't loaded
make sure you're editing the right config file also :p
SignShop is very static and string oriented
why do you need reflection
Is Class.forName() case sensitive?
yes
I found it
the folder was incorrect
changed the wrong one π€¦ββοΈ
you would think im brand new to this stuff by how often i jump here lol
is there any plugin where i can just claim land and so it displays on dynmap
not factions
just claim land
so there will still be griefing or whatever
i just want something to mark my territory on dynmap
Does anyone have any idea how long it takes for the verification private message to be sent to your forum account?
He was talking about it in another chat earlier xD
does anyone know how the cURL request from votifier gets sent?
Does anyone have any idea how long it takes for the verification private message to be sent to your forum account?
@crude dock try every 15 minutes again
Hello good, I read some posts that said that you could connect two different servers using bungeecord. Is this possible?
Kind:
host 1 -> bungeecord -> prelobby -> lobby ->
host 2 -> bungeecord -> spigot server
Or the other thing I ask if it is possible is the following:
Host -> bungeecord 1 -> prelobby -> lobby
Host -> bungeecord 2 -> spigot server
(They are the same hosts but with different bungeecord. Is this possible?)
do spigot servers support multiple resource packs?
a plugin i have sets a resource pack, but if i also want to specify another one in the server properties, will it override the one set by a plugin?
my end goal is to have both loaded
at org.json.simple.parser.Yylex.zzScanError(Yylex.java:474)
at org.json.simple.parser.Yylex.yylex(Yylex.java:681)
at org.json.simple.parser.JSONParser.nextToken(JSONParser.java:269)
at org.json.simple.parser.JSONParser.parse(JSONParser.java:118)
at org.json.simple.parser.JSONParser.parse(JSONParser.java:92)```
```java
public void set(String key, Object value, File jsonFile) {
Object obj = null;
try {
obj = jsonParser.parse(new FileReader(jsonFile.getPath()));
} catch (IOException | ParseException | NullPointerException e) {
}
JSONObject jsonObject = obj == null ? new JSONObject() : (JSONObject) obj;
if (value instanceof ArrayList) {
ArrayList<Object> array = (ArrayList) value;
JSONArray jsonArray = new JSONArray();
for (Object arrayObject : array) {
jsonArray.add(arrayObject);
}
jsonObject.put(key, jsonArray);
}
if (!(value instanceof ArrayList)) jsonObject.put(key, value);
writeFile(jsonFile, jsonObject);
}```
```java
public void writeFile(File jsonFile, JSONObject jsonObject) {
try (FileWriter fileWriter = new FileWriter(jsonFile.getPath())) {
fileWriter.write(jsonObject.toJSONString());
fileWriter.flush();
} catch (IOException e) {
e.printStackTrace();
}
}```
Can anyone help me fix this erro?
error?
obj = jsonParser.parse(new FileReader(jsonFile.getPath()));
its caused by this line when trying to save base64 inventories in JSON
Ew. JSONSimple lol
Best idea I would say is to have each texture pack on different items
Yea thatβs what I have rn
Iβm asking if itβs possible to have the server load 2 resource packs at the same time
resource packs or data packs
like server side data packs and resource packs sent to the client are 2 very different things
For example a plugin sets the players resource pack to resource pack A. Resource pack A has a custom carrot item. I also want Resource pack B to be loaded, so I set it in server.properites. Resource pack B has a custom apple. So if both are loaded, I get the custom carrot and apple. Obviously itβs more complex than just 2 items, since both resource packs I want loaded add many different things. Iβm asking if itβs possible to have both loaded like this?
Resource packs:)
I dont think you can make the client do that
merge the resource packs or have the user manually stack them
Oh ok I was just curious since I know you can set multiple on the client
I was curious if the server can do something similar
yes the server can, but textures obviously dont have effect on the server
so you're mixing terminology a little
all the resource pack set in server.properties does is tell the client to download it
for the client, not the server
Sorry, not well versed in server-lingo. I just mentioned the server.properties as an example of i could βpossiblyβ set 2 resource packs
But thanks anyway π
Iron why not use Gson
thanks md and Frosted for the help earlier, instead of using enums (holding objects) I have the extension plugin passing the operations objects to the main plugin and the main plugin checks that collection for existing external operations and uses them, then if it is not an external operation it uses the Class.forName() on its own stuff.
I'm not sure what the internals look like, but is the Class.forName being called once, or being called multiple times for the same class?
If it's being called multiple times on the same class, I'd recommend caching
Hello good, I read some posts that said that you could connect two different servers using bungeecord. Is this possible?
Kind:
host 1 -> bungeecord -> prelobby -> lobby ->
host 2 -> bungeecord -> spigot serverOr the other thing I ask if it is possible is the following:
Host -> bungeecord 1 -> prelobby -> lobby
Host -> bungeecord 2 -> spigot server
(They are the same hosts but with different bungeecord. Is this possible?)
@sudden compass
Any response to mine?
@keen moth im already committed to JSON lol
its a committed relationship
idk what the error means i believe its illegal characters but
its complicated
Lol ^
I mean it's an easy switch. Gson will automatically attempt [de]serialize objects for you.
Or, I could fix what i have lol
that too lol
GSON is probably better but for this project i really wanna go with JSON
I use gson in my lib
I have a util so I can just 1 line it all
gson feels like magic
you do need typeadapters for somethings
I have a wrapper for JavaPlugin
sorry misunderstood probably
which contains utils
Could i get that lib?
would be nice xd
You don't really need a lib for gson tho
yeah this just had other things I use
You just need to make your gson instance and use it. Append any adapters if needed
It's REALLY nice for data π
I use it for standalone loading, and use Jackson for jedis data
what is jedis
huh cool
I wonder how hard it would be to implement support for multiple dbs
like I use flatfile json rn
abstract it out
It only calls the forname method for each operation during on enable. I think it does call multiple times if the operation is in multiple kinds of shops but they are cached while the plugin is actually running
ok
Oh ok Weaves. I was just suggesting it cache the classes if it's attempting to use Class.forName in other places outside of of onEnable during the program's lifetime
Ya it's not that bad lol
everything is working great now?
Ya it has worked for years like it was. But now I don't have the annoying circular dependency message.
Now that I am maintaining the plugin I don't want users to have warning messages. Before 1.13 the message wasn't a thing.
Do the staff know each other irl? Like are you all friends irl?
Never met any of the others irl
Oh lol
Sighs bash - Question: In my server console when I type in the command restart, the server does restart, but in the console it does not show running any longer. Per chance is my ubuntu shell being awkward?
No, it's just the way restart works
The better option is to just use stop and run your server in a loop
Hello good, I read some posts that said that you could connect two different servers using bungeecord. Is this possible?
Kind:
host 1 -> bungeecord -> prelobby -> lobby ->
host 2 -> bungeecord -> spigot serverOr the other thing I ask if it is possible is the following:
Host -> bungeecord 1 -> prelobby -> lobby
Host -> bungeecord 2 -> spigot server
(They are the same hosts but with different bungeecord. Is this possible?)
mmm help?
if I try to spawn an entity in an unloaded chunk does the chunk load in async to spawn that entity?
I've already done it with no errors so I have to assume that's not the case
just wondering if it's sync or async
actually now I'm questioning whether I really did that, I am almost 100% certain I did
too tired for this
Ok, thank you md_5
public static long locationToLong(Location location) {
return ((long) location.getBlockX()) << 38 | location.getBlockZ() << 12 | location.getBlockY();
}
public static Location longToLocation(long packed) {
return new Location(null, packed >> 38, packed & 0xFFF, packed << 26 >> 38);
}``` I have this to convert a location to a long but it seems to not work after `z=524288` as the output on the other end is `-524287.0` it overflows for some reason at such a very small number
nvm i casted z and y to longs
well, now when z<0 x=-1
how can you comprime 3 double, 2 floats in a long, sounds impossible to me
also a world name
Did you write that yourself? seems a bit wonky
Someone sent it to me
I can suggest you a different packing you can try
That'll be nice :)
for signed integer 1 whole bite was for sign
@fleet burrow
Thanks, I'll try it out now
Works
nice!
could someone help me out with something?
I'm trying to learn making plugins with Intellij but even when i follow the tutorial as close as possible (https://www.youtube.com/watch?v=3EQ5G2Aodxg), it just doesnt dispose a .jar file for me.
Two possible mistakes I may have made are: screwing up the .jar file, or not fixing the LIB errors that I already got when I startet the program
id like to send an image of the yml file but I cant
is there a builtin way to just use brigadier directly?
can someone allow me start a thread in "Hiring developers" my name is CrispyCrumb
@knotty surge not sure, but checkout commodore by luck
yea I've had a look at commodore, just seems a bit meh
umm frosted u there lol
someone can gives me a plugin for the scoreboard?
hi, im looking for a plugin developer how do i make a thread in the forum?
These are the requirements
you have to create an account and then you have to use the blue "Post New Thread" button in the upperright corner in the correct section.
ty
it says my build is outdated, where can i download the up to date build? https://imgur.com/a/bh60o24
hmm anyone has idea how i can block cactus from being broken by blocks on grow or cancel the event when that happens?
https://www.spigotmc.org/threads/why-cant-you-post-here.14119/
@zealous yoke i can't post there, i have an account of more than 1 week old but not 20 posts
then you have to get those 20 posts
help people for example in Spigot Plugin Help
but dont farm those posts or spam
may i ask in #general ?
that is really not the right place
the channel is for the spigot server
than what can i do?
i rly can't help anybody with spigot so i don't know how to make those 20 posts
if are at the point where you want to buy or sell services related to spigot I suspect you have enough knowledge to at least help some people
how i can read forum in the web page?
i need help, with the comands blocks
in my server, becouse @p its not detectect
any @a @p @c ...
it's possible to give link or newest release of spigot
There is not a download link for spigot AF21
im solved, i removed essentials plugin, thanks
Hey, anyone here know how to make players spawn with a written book?
give them a written book on player join
You could get a plugin for it, like a essentials. Or use the PlayerJoinEvent if you know how to code.
im about to finish my server but i just have one issue someone help me
basically I have a GuiPlus set up and when players purchase something its supposed to give them an item but for some reason it doesnt give them an item and says "You do not have access to this command"
when im op it works
i have it trigger /give player item when they purchase something
any one maybe know simple way to return default vanilla names of items from Material ?
so example like "Grass Block"
not just GRASS
So, I've been looking into hoppers performance today and noticed that the way Bukkit (and thus Spigot) does the InventoryItemMove event puts a major load on the server even without plugins actually dealing with it.
In specific when the hopper tries to pull items (Mojang Method: tryTakeInItemFromSlot) from a container above will create an InventoryMoveItemEvent for every non-empty slot of the container until it successfully moves an item or no non-empty slot remains. That means, in the worst case a single hopper can throw 54 InventoryMoveItemEvents every single tick, without any item actually being moved.
Restoring Vanilla code reduced the performance impact of those hoppers in my (very simple) test setup by around 80%, not accounting for plugins.
Given that the plugins on my server that use this event don't even seem to assume/care for failed item moves I wonder if any plugin actually relies on this behavior. And even if one does I'd question whether that's worth the massive performance impact it has.
So... wouldn't it be better to just fire the event when an item has actually been moved?
(Also just created another test setup, a hopper trying to push into a container with non-full stacks will exhibit the same InventoryItemMoveEvent spam behavior)
sooo @vapid kindle what changes did you did on the spigot.yml file to have those results? or any other folder/file for that matter
none, I built my own version of Spigot
Ur own version?
well, a local fork
ok then but for us who can't do that xD do have any recommendation to try? XD cause i use a lot of hopper systems and that would be nice to test
well, it was more directed at the actual Spigot maintainers, I should probably open a JIRA ticket instead π€
is there an api for command like this: /title @s actionbar [{"text":"It's a test","color":"gold"}]
?
or it's packet time?
check the Spigot API, I recall something like that being there
In 1.8.8 etc you need to involve nms
Ok Player has method for that iirc
great thx for the confirmation
Player#spigot().sendMessage(ChatMessagePosition, BaseComponent)
yeah i saw it thanks a lot!
@shy shard thereβs no API solution
βGrass Blockβ is what Minecraft the client handles
You could take and copy the βMaterial.isBlockβ method and do something with that
Hi
Beehive.isSedated() is throwing a NPE π€
I can get other properties
but isSedated is null π€
NPE?
Hey guys. Sorry posted this in #general.
I was wondering. In the previous versions of the API, to check if a block was a furnace, you needed to check block.getType() == Material.FURNACE || block.getType() == Materia.BURNING_FURNACE
What do we use now ? Do we still use Material ? Do we use MaterialData ? BlockData ? BlockState ?
null pointer exception @normal swift
what's the "best" way
aa
@boreal tiger usually a NPE is not on the method's result but on the object
Weby I was using BlockState but maybe BlockData is the correct way now idk
so in your case Beehive is null
Show more of your code then.
wait I think I know whats wrong
NullPointerException is mostly unassigned fields?
oh wait I just read the javadoc
@naive goblet thanks
If we donβt initiate a field and later try to use it. It will result in NPE
NullPointerException is mostly unassigned fields?
@naive goblet could be
its says "True if hive is sedated" so maybe if its not sedated it returns null
Then show more of your code
tahts returning null
Remember booleans are a way to check success or failure
and the error
yeah it doesnt make sense to return null
@boreal tiger Spigot API?
yeah
Thatβs weird
isSedated is not in the spigot api
I can call the other methods sucesfully
Β―_(γ)_/Β―
it is
I mean if your server runs 1.15.2
nevermind
Not the patch version?
the patch version yh
@boreal tiger show more of your code please, cuz it could be loads of things.
isSedated returns a boolean primitive, so either true or false
^
never null
the instance of beehive is not null
^
Everyone can help me whit this please? https://www.spigotmc.org/threads/holographic-displays-error.429325/
https://hasteb.in/qamigata.java @subtle blade Its not null, I can get other properties
can we get a log of the error as well ?
that's BLockCampfire.java:177
^
wdym passing something stupid?
@thorny quartz Itβs hard to know but it be a cause of managing worlds or something.
should I not pass the block instance? @subtle blade
@subtle blade I just printed it before passing to that class
I still get an npe
Beehive seems to be BlockState and not BlockData or smtng
I am on phone so little hard to read lines in bin
there's two classes theres Beehive blockdata and blockstate
The NPE is as a result of NMS trying to get block information from a null world. IBlockData iblockdata = world.getType(blockposition1);
Is this bee hive placed?
can you please try to do Bukkit.broadcastMessage("Beehive null : "+beehive==null); ?
When do you run this code
on the PlayerInteractEvent
The beehive isn't null. It's an internal NPE
beehive is not null
aight
Okay so the block isn't placed yet, Attlantiz
oh
Events are called before
oh wait i see
You want to call this in a BlockPlaceEvent
nice
wait but I want to get the information after it is placed choco
if someone clicks a beehive thats already placed
anyone knows why i dont get verify message on spigot?
check that DMs are enabled
I do, I know its not a good idea, changing that soon
i have dms enabled
Can I see your listener?
sure
gaspercino, give the bot about 15 minutes or so. It may be rate limited
Lots of people verifying at once
@EventHandler
public void onRightClick(PlayerInteractEvent event) {
Player player = event.getPlayer();
Action action = event.getAction();
Block clickedBlock = event.getClickedBlock();
if (action == Action.RIGHT_CLICK_BLOCK && player.isSneaking() && clickedBlock != null) {
if ((clickedBlock.getType().equals(Material.BEEHIVE) || clickedBlock.getType().equals(Material.BEE_NEST)) && player.hasPermission("beesplus.beehive.view")) {
event.setCancelled(true);
Beehive beehive = (Beehive) clickedBlock.getState();
Bukkit.broadcastMessage(Boolean.toString(beehive.isSedated()));
guiManager.openGui(player, new BeeHiveInfo(beehive));
}
}
}
@naive goblet Oof i really need help π
the broadcast was for testing choco
Figured that was the case, yea
do you have any idea what the problem might be?
Trying to see if there's any reason that world would be null in this case
mhm
thats correct right, so i should recieve verify message:
https://i.imgur.com/zhUFRkh.png
For the sake of debugging, mind throwing in:
((CraftBeehive) beehive).getTileEntity().hasWorld() and printing that out?
sure
(for the beehive block state, not the data)
You should @frigid ember, but again,
give the bot about 15 minutes or so. It may be rate limited
Try again later
i tryed yesterday still havent got anything.
Some had to try 3 or 4 times
ok
which one should I import choco?
okay now it worked thanks choco for advice.
yup π
getTileEntity()' has protected access in 'org.bukkit.craftbukkit.v1_15_R1.block.CraftBlockEntityState'
π
@subtle blade i said yes two times and automoderator warns ne
me, what is that bruh
if people ask qs and i just say yes twice
it is considered spam
i tag two people, automod warns me
as a quote
@boreal tiger reflections maybe
Bot's a bit harsh, don't worry much about it. Doesn't do anything
Yea you'd have to reflect it. 1 sec
Ok
you mind sending it please? not very experienced with reflection π
Yea I got ya
Master Choco lmao
ah im trying to like disable cactus from being dropped when broken by block on grow and i still have no idea XD i did add physic event but idk how can Cactus transform into cactus and AIR into AIR XD
try {
Method methodGetTileEntity = Class.forName("org.bukkit.craftbukkit.v1_15_R1.block.CraftBlockEntityState").getMethod("getTileEntity");
methodGetTileEntity.setAccessible(true); // Maybe not necessary?
TileEntity methodGetTileEntity = methodGetTileEntity.invoke(beehiveBlockState);
} catch (ReflectiveOperationException e) {
e.printStackTrace();
}```
Oh wait lol
Don't remember if you have to set accessible private methods
If you don't, ignore that middle line
right
π
may i ask so:
Bukkit.getConsoleSender().sendMessage(event.getChangedType().toString() + " " + block.getType().toString());
either requrns AIR AIR
or CACTUS CACTUS
so im not sure how i could check if like CACTUS turns to AIR? and disable its drop?
event is BlockPhysicsEvent
Oh the instance
This is what happens when I'm not in an IDE. Pass your beehive state
ah right haha
Check how the method by decompile
done thx I'll print what you asked now
At least hasWorld() is public
And then if itβs a String param put String.class etc
@frigid ember if source block is cactus and material is cactus as well?
Or am I wrong?
hmm
(β―Β°β‘Β°οΌβ―οΈ΅ β»ββ»
org.bukkit.craftbukkit.block.v1_15_R1.CraftBlockEntityState
I COPY PASTED THAT TIME

Isnβt getDeclaredMethod better?
Does it exist?
Again not in an IDE lol
Didn't remember if it was just fields or methods as well
I'll try to find it one sec
If I get to know how to control my brain Iβll install an IDE in my brain
found the rror lmao @subtle blade
@boreal tiger try find the method name, method params, and the class path?
block and v_15 are switched xD
Or mb nvm
no such method now xD, let me try to find the method
Yea there's probably a declared method thingy
yeah yeah
getDeclaredMethod()
it outputed true @subtle blade
right?

for the hasWorld
That was the opposite of what I expected
or Class.forName ? Retrooper?
Well now I'm just confused
@boreal tiger Yeah itβs kinda simple (:
hahaha lmao
But it's passing this.world 
reeeee
i have another problem guys, so how could i check when cactus gets broken by block so far i have this:
@EventHandler
public void onBlockUpdate(BlockPhysicsEvent event){
Block block = event.getBlock();
if(registeredBlocks.contains(block)){
//Bukkit.getConsoleSender().sendMessage("Found the block..." + block.getType().toString())
Bukkit.getConsoleSender().sendMessage(event.getChangedType().toString() + " " + block.getType().toString());
if(block.getType().toString().equalsIgnoreCase("CACTUS") && event.getSourceBlock().getType().toString().equalsIgnoreCase("CACTUS")){
Bukkit.getConsoleSender().sendMessage(event.getChangedType().toString() + " " + block.getType().toString());
Location below = event.getBlock().getLocation();
Attlantiz I can try teach you rn how it works
but that just gets everytime cactus grow anywhere XD
Pls bin
The only possible way that can be null is if world was null but it's not and 
Are you on the most recent version of 1.15.2, Att?
No idm
Yea, give it another build so at least the stacktrace is up to date, I'll do the same with mine
@naive goblet sure let me jsut finish that, thanks!
@subtle blade π
give me 5min
Sounds good
Hmm you sure updating the build would do a differ?
(can remove that reflection by the way lol)
Yes because the stacktrace might differ from one version to the next if any patches were made
At the moment I think we're finding a CB bug
Or at least a CB oversight on a vanilla bug
I blame choco.
trying to do a pvp area within my survival world, where the server has pvp enabled in server.prop, but pvp isn't working.
mhm
Are you in spawn protection or do you have WG?
not spawn protection, I'm not a complete noob :P
WELL
when I finish building spigot, you want the stacktrace for the isSedated thing right?
and wg region set up for it has pvp allowed
Yes π
as did the global region
right, I'll ping you when It finishes
o/
Choco i have question so yesterday you recommended me to use BlockPhysicsEvent to check if cactus got broken by block on grow but now idk how i could do that and how i could disable it from dropping a default cactus.
Anyone know how to set up luckperms for bungeecord?
Pretty much the same as for spigot
but like
@frigid ember documentation exists
How do I make it so they have the same roles in each server
Database
Like MySQL or smtng
Then name bungee server βbungeeβ in the config in BungeeCord and when adding permissions to bungee you need to put server=bungee
@subtle blade here it is π https://hasteb.in/egoyifef.cs
or just use the /lp editor
lpb is for bungee i think
i recommend using pluginmesaging to so it syncs permissions faster
are we filling a bug in spigot issue tracker then?
I just don't know if I can be convinced it's a CB bug. The thing that's confusing me is that the line the NPE is being thrown on isn't possible
It's IBlockData iblockdata = world.getType(blockposition1); but we checked hasWorld() which is just a null check
mhm I can try checking on another event if you want
Won't make much of a difference I'm afraid
right
Going to sound stupid but do you want to run it one tick later?
sure
Doubt it will fix it but hey, worth a shot
I got the same thing :/
Okay... so at this point I'd say make your own check because I honestly have no idea
1 sec
https://hasteb.in/orubamim.apache this is the error stacktrace if you want π€·ββοΈ
for the run later one
can this be done with nbt?
the isSedated thing
Nah, Mojang makes the check every time. I'll write one, 1 sec
thank you π
Lemme actually open an IDE though lol
sure hahah
opens eclipse with ultra white gradient theme :o
i have question:
https://i.imgur.com/j7LyGHK.png
so i listen for cactus stuff either i get
AIR AIR
AIR
or
CACTUS CACTUS
CACTUS
is there a way for me figure out if cactus got broken by block on grow?
alright, what all could be blocking pvp?
server.properties is set to true
spigot.yml/bukkit.yml have no settings??
worldguard region __global__ is set to allow
no other region in the way
can't pvp in or out of the minigame... so not a minigame issue, as far as I can tell..
I think this will work fine, @boreal tiger
public static boolean isSedated(Beehive beehive) {
Location location = beehive.getLocation();
for (int i = 1; i <= 5; i++) { // Vanilla checks 5 blocks
Block block = location.subtract(0, 1, 0).getBlock();
if (block.getType() == Material.CAMPFIRE && ((Campfire) block.getBlockData()).isLit()) {
return true;
}
}
return false;
}```
@frigid ember You could check ItemSpawnEvent
It's at least a temporary work around while isSedated is being strange
but i cant check if cactus got broken....
I'll mess around with it on a server later
right, thank you π I'll try it
Wym
Could I contact someone from the administration in a private message?
@subtle blade there isnt a isLit method rip hahaha. can this be done using nbt?
for the campfire
oh oops
So, none of you have any idea what all could be blocking pvp from being allowed?
my bad lmao
;P
thanks
@subtle blade Could I write to you in a private message?
thats the actionbar
you could have a runnable check if there's a player where your looking at
and getting their display name if there is a player
@valid zenith https://www.spigotmc.org/resources/actionbar.4754/ maybe?
haha got the if got broken event working
?
Support 1.15.2
@valid zenith i dont think so sorry
is the one i could find on spigot, it cost 4.5 euro
hey! Im looking how to enable logging. My logs folder does contain a lastest.log file but it says that logging is disabled. How do I turn this on?
how is a plugin that sends strings to the action bar on an interval a premium plugin π€
well it sells so I guess there is demand
omg
hi!, i cant get dynmap to render anything. i do /dynmap fullrender world. and then it doesnt output anything. the stats shows 0 on everything. but if i do the command again it says is already in process. I have already done forceupgrade on all chunks and im running the latest dynmap and spigot
And its stays like this for hours. it never changes
Its when you update the chunks on the world to the latest version of the game
forces upgrading all chunks, used when transitioning from 1.13->1.14->1.15 etc
oh
if you don't do this it will upgrade chunks when they are first explored in the new version
even when upgrading it's fine to not do this, you'll just get a bit of a performance hit when people enter old chunks
also is there any plugin with /trade thats supported by vault in 1.15?
Yeah i was thinking if the old chunks interfered with dynmap but it didnt help
@frigid ember Mayby essentialsX
Ohh okay
is there a block state updated event?
Hi what you mean by block state update event? π
like an event fired after i updated a blockstate: blockstate.update()
Ohhh how do i see this information?
I did /wb trim and /wb fill 30 0 then once it finished i restarted and did /dynmap fullrender and once it finished there are still chunks that arent loaded in (i manually loaded every other chunk)
what do i do?
(note i did this 3 times already)
still doesnt show chunks on dynmap
tried going to the chunks?
thats just manually loading it all in
which i already did but i dont want to do it anymore
you'd probably be better off contacting the dynmap dev
depending on the server version, it could just be a problem with his plugin
Hello there guys!
Who could spend a little time with me and help me figure out, what the hell is wrong with me, my server and my understanding of how servers should work?
Short info:
Privat vanilla server, Spigot 1.15.2, ~10 not heavy plugins, and from 3 to 15 players online.
VPS: 1x (or 2x) 3.9-4.5 GHz CPU, 4gb (or 8gb) RAM. SSD.
The problem: low TPS and ~lags.
I have a huge text to explain my question, so.. I share it on pastebin)
https://pastebin.com/wVnraZ4W
I would be so happy if someone could help me with it, so please if you have some ideas, could you DM me or @vagrant rune here ?
its the vCore
lol
VPS's are decent but anywhere above 13-15 with 1vCore is eh especially on 1.15.2
you are using shared resources
so ofc its not going to be running well
he said he upgraded to 2 vCores
but yes
i agree
@vagrant rune can you run timings?
/timings paste
even 2 vCore's
uea
it won't really be enough
yep
maybe 5 more players then poop
I understand what is vCore, but..
the PLAN plugin, and >htop on my console sais that there are 40-60% cpu usage.
roosky i see
like, htop stats are:
1st and 2nd core load jumps from 0 to 80
@wanton delta not the actually rooo, but roo speaking)
AuthMe maybe is the most intensive
yea ive studied a bit of russian as well
what's in the castle
CPU and RAM usage statistics provided by me VPS dashboard panel:
https://prnt.sc/rxdz6j
@frigid ember some dark shit, sorry..
https://prnt.sc/rxdz6j
KeepChunk used only for 4 chanks for my.. "admin room" where are few command block are
Regarding the UNDER the castle chaos: it's the only one place on the whole server
multiverseCore ? If so.. I don't use it on the current server
I have a quick look for TIMINGS paste info and... need a bit time to read it deeply, but I see that WorldEdit and AuthMe Avg tps is in a yellow zone..
And next question is.. Players don't user WorldEdit at all. This plugin is blocked by permissions for them. How it could be that the WE tps are in the yellow zone?
AuthMe is a big contender on performance followed by just how chunks are handled on 1.15 and including your player count and using shared resources.
do you need AuthMe for any particularly like are you in offline mode?
and WorldEdit has things running in the background regardless of who using it
Nope
I'm using it only like LOGIN-plugins and save user logout location.
and WorldEdit has things running in the background regardless of who using it
@frigid ember hm, understood. thanks
ok then you really shouldn't need AuthMe, its just extra strain and annoyance for your players
agree. Thanks)
Mb any advice for other login-plugin?
Also, I have sinned on the CoreProtect - can it eat a lot of resources too?
Its properly maintained by the dev so not necessarily
looking at the timings it looks like server lag is mostly caused by Villager and Hoppers
hm, sounds quite logically
thanks I'll experiment with it)
hopper lag can be reduced with droppers on top
a lot of villagers usually mean iron farm... which is usually in spawn chunks
so not much i can say there
put Composters on top, they're better than droppers
yeah, figured that out myself yesterday. It has fewer inventory "slots" to check and by itself has no logic, so it's rather lightweight
dropper? composter? what) how dows it can help? how minecraft works?)
hoppers are constantly checking for items on top of them
a-haa
yeah, figured that out myself yesterday. It has fewer inventory "slots" to check and by itself has no logic, so it's rather lightweight
@vapid kindle
if you put a tile entity on top
they will stop checking
the best tile entity to use is composters
also telling WorldGuard to ignore hoppers might reduce it's impact as well
unfortunately https://hub.spigotmc.org/jira/browse/SPIGOT-2731 is a thing, so certain hopper setups will lag your server easily
iron bars are enough?
I see some of the players put iron bars on top of the hoppers
it must be a block with an inventory
Can I somehow alter a command I'm sending?
The quirk is that I can call any command, like, even Minecraft ones.
So I wanna like add come variables and functions into commands,
so I can call /tp Kitulous {rand -100 100} 0 0 and {rand -100 100} will be replaced by my plugin to a random number between -100 and 100. But I don't know how to modify the chat packet or whatever that is.
Is that even possible?
I tried googling but no result (maybe I googled bad)
does one get a role for boosting
I'll try that out rn thanks
basically, if a hopper has an inventory block above it it will try to pull from it, if there isn't it will try to pull in items on the ground (even if that's impossible due to normal blocks above it)
i keep forgetting how the event called
playercommandpreprocessevent ke something along thise lines
@stone oxide you can process it with PlayerCommandPreprocessEvent
and parse it yourself
mojang should probably update the behaviour check if the hitbox of the block on top is a full block :p
well, thanks a lot for all support.
I'll go deep to set up the "Aikars flags", and try to figure out what it is)
also... mb will find the AuthMe replacement
- fix hoppers
- telling WorldGuard to ignore hoppers
- fix "Aikars flags"
- find the AuthMe replacement
thanks a lot, guys!
also Villagers, there may be some options in the spigot.yml regarding activation/ticking of villagers that might help
Hey! I want to enable logging of the konsole but I can't get it work. can someone help me?
your console doesnt log to the logs/ folder?
no, the file that is there said that logging is disabled but that file is from last year.
latest.log
strange, otherwise i dont know. should be on by default
Idk if i did something wrong in the spigot.yml, or if something else is disabling it.
But I don't know what to look for. π¦
I even replaced the spigot.yml but nothing changed.
i wanted the parrot dancing but i do not want the sound playing
player.playEffect(location, Effect.RECORD_PLAY, Material.MUSIC_DISC_STAL);
player.stopSound(Sound.MUSIC_DISC_STAL, SoundCategory.RECORDS);
i use this but it work only for the first time, the rest of the time i run the function it never stop the sound
anyone knows why?
hm, also, guys, one question for the end
(and sorry for @ you)
@frigid ember grimaced upon learning that I have vCore!
so could you guys share your experience?
What would be better for my needs:
#1 - 2 vCPU of powerful 3.9-4.5 GHz,
#2 - kick off the hostings and made own server PC (with ~xeon E5-1620v2 3.7-3.9 GHz) and separete
@wanton delta
i know that the code libraryaddict will get u 30% off bisecthosting
lol
if youre interested in a dedi
ive heard good things
I got a horror story from one of the founders of the server I am on from them, it was 4 years ago
we switched to OVH after it
Kimsufi is a child company under OVH and they offer real cheap dedicated
worth checking out as well
mid-range is SYS
anyone using ovh here at the moment tho?
in a way yea
ofc, like additional server-only pc
I can put it in my work's office and we could launch there some file storage for our needs
So we could find a way to use it for some way beside the Minecraft.
But, would such a radical and +- expensive decision be justifyed?
*my host right now is OMGserv
GAME-4/8 plan, if you are interested in
who that
@wanton delta the parrot doesn't react to it even with the record sound category
I wouldn't do a minecraft server at home unless I knew everything I was doing
I am pretty sure it needs the effect packets
Hosting at home probably not worth it unless you have top internet speeds
Like, I'm seting up the VPS by myself, from installing and seting up DBs and so on. Does it enough knowledge?)