#help-archived
1 messages · Page 130 of 1
A very slow/ugly solution would be to store a set of all handlers for each event type and loop over it whenever PlayerMoveEvent occurs but this would be slow
If there aren't that many listeners it won't be slow
not like anyone is going to make 10+ event listeners right?
Hello, I have a Minecraft Network with RPG, HCF, Factions, Survival, Practice and Minigames. I'm using ViaVersion and ViaBackwards (they're put in the Travetine[BungeeCord]) but I want to litmit the version of the RPG to be 1.9+ and of the Survival to be only 1.15.2
Can someone tell me a plugin that can do that (I've seen that in other networks but I'm not sure how they made it) or how to do it in ViaVersion.
~ Thanks in advance! DM or TAG me if you can help. :)
@mint sky
oh thats you
the cache didn't update the new name
the server that you want 1.9+ just make it so, don't allow the older versions to join.
same with the 1.15.2
they'll just be unable to connect
mind joining in a call
ok np
do you want to know how to do it with vaiversion etc
send me a fr so I can tell you the details
honestly if I can't help you then someone else may be able to here - is there a way for you to send them here?
ok
so
This is a Minecraft Network, but we want to have different versions for every server but ViaVersion and ViaBackwards are in BungeeCord modules(folder) because we dont want to put them in every server plugin folder as it makes the server a little bit lighter to run because we're running kinda low on ram(We have and FiveM server so...). And the problem is that we cant modify the ViaVersion because it will modify it for every server in the network
I've read up on the VV and VB docs and if you want per-backend versions you'll need per-backend VV/VB that's about all you can do
This means to put VV and VB in every server?
whichever you need, yeah
I'm getting an issue where nobody can connect to my server. Everyone is getting "Failed to verify username".
can you send a screenshot of the console errors it throws?
I've just done a reboot, I'm waiting for it to happen again. When it does, I'll send
Oh, here, looks like I sent it somewhere else before
java.lang.IllegalStateException: AsyncPlayerPreLoginEvent cannot be triggered asynchronously from primary server thread.
funky plugin
I'm also getting this, but I don't know where to get help for it
seems to want to synchronously run an async event (?)
[10:18:02] [Server thread/WARN]: [Essentials] Task #18 for Essentials v2.17.2.0 generated an exception
java.lang.NullPointerException: null
at com.earth2me.essentials.xmpp.XMPPManager.updatePresence(XMPPManager.java:146) ~[?:?]
at com.earth2me.essentials.xmpp.EssentialsXMPP.updatePresence(EssentialsXMPP.java:113) ~[?:?]
at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftTask.run(CraftTask.java:81) ~[server.jar:git-Spigot-a99063f-fad2494]
at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:400) [server.jar:git-Spigot-a99063f-fad2494]
at net.minecraft.server.v1_15_R1.MinecraftServer.b(MinecraftServer.java:1036) [server.jar:git-Spigot-a99063f-fad2494]
at net.minecraft.server.v1_15_R1.DedicatedServer.b(DedicatedServer.java:406) [server.jar:git-Spigot-a99063f-fad2494]
at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:984) [server.jar:git-Spigot-a99063f-fad2494]
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:824) [server.jar:git-Spigot-a99063f-fad2494]
at java.lang.Thread.run(Thread.java:834) [?:?]
I mean... It looks like after a server reboot it's working
Soemone's playing rn
But there's still this issue here
do you use XMPP
just delete all the essx plugins you don't use
Geo, xmpp usually go first
idk if you use spawn/chat but those are useful
Hi guys there's a method for colorize the players nametag
We use spawn and chat, yh
antibuild can go too
unless you like preventing literally everything without the proper perms
I've already dealt with that via LuckPerms, so...
LuckPerms is the 👑
The editor's cool
but you can remove the entire plugin and the problems go away with/without perms
I like that I don't have to do anything to set prefixes except add a permission lol
yeah it's epic
np!
Okay, nope
I was wrong
I think it's a plugin thing but I have no idea which plugin
Is there somewhere I can upload my logs to? This is really long
Hello
No
@woeful shore hey you. Get out of my life ._.
(Can my nickname be changed btw, to show my new spigot name instead of the old one, thanks)
https://imgur.com/RNcgoXl also I get this everytime since then. I know this is somewhat firewall rule violation, but i swear I do not touch anything on the site
Anyone know some good libs to make sql easier lmao
https://github.com/PatPeter/SQLibrary this is good
Tried aikars version? https://github.com/aikar/db
Does anyone know the packet in protocollib to send another gamemode
I found it on wiki.vg but i have no idea how its called in protocollib
how do I accurately get the target block?
From? @remote socket
A player
Are you using an event?
I want to get the block the player is looking at, but it's often 1 block incorrect using #getTarget()
Are you using an event?
No, commands
Are you using getTargetBlock?
Have you tried getTargetBlockExact then?
One could be 1,5324232312 and one could be 1
int vs double
also if i'm correct blocks position never gets rounded
so 1.9999 would still be 1
It floors
really?
Yes
Do you guys suggest to work with distances squared, or not?
trying to compare relative distance between two points in space
yes
I mean i would have to test performance though
calling Math.sqrt should not be an expensive task
since it uses native calls
It is less expensive to square (val * val) the other value which you are comparing to
is this a spigot plugin that you're making?
indeed
why don't you use the Location class?
well i could
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Location.html#distanceSquared-org.bukkit.Location- It already has one built in
I could also use Vector
use Location and #distanceSquared
I'd have to instantiate a new location for every packet though
that's pretty uhhh
oh nvm
What is Position? is it nms?
oh it was just an interface basically replicating Vector
i guess i'll stick to Bukkit API
yeah, that's always better
use Location and #distanceSquared
then when you want to compare also square the other value (no need for the Math.pow, just use val * val)
@bold anchor thank you, that is what I was looking for
hi patri9ck
👀
Hi, is it possible to move players to a temporary server while restarting the main server and moving them back after the main server funished restarting? I now there is movemenow plugin, but it doesn't move players back as far as I know
Should be possible, but I don't know a plugin that does that
It's so common so I think someone already did it, but I couldn't find any plugins like that
Surely someone has
finding them is probably the hardest part lul
Guys what is the problem ? http://prntscr.com/t0qody
wtf why would you use Paper 1.11
either update to the latest mc version or get the right worldguard version
Oh
¯_(ツ)_/¯
1.11? Yeah it is o.O
İ use 1.12.2 spigot
in the screenshot it seems like 1.11 paper
But player has a sprinthit on every hit
Ah that stacktrace says otherwise lol
with horrible terminal font
Hi, I have a rather tough question... How to say.. I would like to disconnect a player from my minecraft server (Spigot side), but not kicking him out. This way the player will not be connected to the server anymore, but the proxy will prevent his disconnection.
Would you know how to do that?
@sturdy oar can i use 1.9 version ?
As in moving them to a different server? ;p
Plugins dont support ? Fendi ?
@cerulean musk A majority of plugins refuse to support any version of their plugin that targets a server version under 1.15
The player no longer takes a load on the Minecraft server (Spigot). It just keeps loading on the proxy
I know this is possible,
Is there any reason you don't wish to use 1.15.2?
pvp!!!!11!
No, he's using 1.11 already
Also pvp can be replicated relatively well on the newer versions, you only really lose blockhitting
İdriz i Want to 1.9 pvp mechanics 1.15.2 = 1.11 pvp mechanics ?
1.9 pvp mechanics...
are 1.15.2 mechanics
there has been no combact update since 1.9 lol
only thing were shields, but you can easily block them if you don't like them
@cerulean musk 1.15 and 1.9 pvp mechanics are the same.
But for example when i join cubecraft on 1.14.4+ i hit some a far
Maybe they have custom reach?
Can anyone help us
We have a problem
When we starting server
we tp on loc and server get shutdown
provide full stacktrace
can i open it?
sec
Has any had the issue of when they set up nuvotifier+votingplugin that it logs the votes on the websites but not logging it to the player ingame for rewards? im not sure how to fix this.
both are the recently updated versions
Which website is it logged on?
Did you allow the website to contact your votifier server, did you configuee where to send the votes. Etc
Currently using planetminecraft and minecraftservers.org , both are config'd correctly
I’d suggest updating to 1.15 that might fix the issue
this server was worked above year
Yeah I’m not sure why 1.12 would be used anymore
and not have a problems
my friend input this
execute @e[type=item] ~ ~ ~ /summon item 1336 64 -930 {Item:{id:"minecraft:beetroot_seeds",Count:1,tag:{diamond:1b,display:{Name:"Gravitator"}}}}
Yeah I’m not sure why 1.12 would be used anymore
@gleaming helm 🤷♂️ you see when this discussion arises like 3 times a day its kinda boring
and server get crashed
Why would he do that?
commands block were disabled but
iam youtuber
and we recording
sry for my english
hes testing this command
What was supposed to happen?
why the execute?
if you have to summon 1 item
im not getting the purpose of that command tbh
The player no longer takes a load on the Minecraft server (Spigot). It just keeps loading on the proxy
@lament wolf Not sure if you've solved this already, but I've looked a bit and found https://www.spigotmc.org/resources/bungee-reconnect.16429/ and https://github.com/TyphoonMC/TyphoonLimbo
@west pulsar Any reason you are unable to update?
Ideas on how to improve this? 🤔
by pasting it it's already improving it
WE recording videos on this server above 1 year
and built so many structures
and command mechanisms
Do you not have any backups from before you ran the command?
iam having map backup
I have a release schedule for videos, I can’t record 4 hours. Therefore, I went to ask if there is any solution to this problem.
several chunks crash the entire server, is it possible to restart them?
would anyone know a plugin for reporting players in my server and when theey get reported it will send a message in my discord server
Whats up with the eye pfp’s
imagine not having a panda as a profile picture
👀
can't catch me not having a panda profile picture that's for sure
Put that fuckin Mickey Mouse shit @steady cedar
duckduckgoing
@torn robin well i have done alot and i havd discordSRV but i dont think i has report system
Can someone explain to me what DownstreamBridge and UpstreamBridge is?
In what context?
Bungeecord
Hey everyone! Does anyone know of a good plugin to play with friends?
Anyone knows why, when entering a boat, the VehicleEnterEvent is fired twice and the VehicleExitEvent once?
Possible that's a bug
well, that for sure 😛
I see no recent tickets on the matter, so I encourage you to create one if you can reliably confirm it
Latest version, include a test plugin. You know the drill
?jira
so I guess it's not a known flaw, gonna take a look at the Spigot code first then, thanks
I don't remember. Is that a Spigot-exclusive event? Or Bukkit?
Bukkit it seems. I'm thinking of entity mount and dismount events which are Spigot-exclusive
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/vehicle/VehicleExitEvent.html
I wonder if the getVehicle returns the boat though
whack
it also didn't seem to affect other vehicles, tested Minecart and Donkey
you know if net.md_5.bungee.netty is outdated or something like that ?
I can find it on last version
I tried to do import net.md_5.bungee.netty.PipelineUtils
With
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.15-SNAPSHOT</version>
</dependency>```
then, couldn't import?
No the package doesn't exist
diiidd you declare the repository
Yes yes
Yes
?
So investigating further it seems like the player tries to enter the boat twice, with the second attempt the server dismounting you from the boat...
That's the proxy module
Which as far as I'm aware, is not depended upon by the api module
It's like when depending on the Bukkit API, you won't see CraftBukkit or any server internals
hello!
I'm looking for a lucky block plugin, witch doesn't throw any errors in the console.
just search it
witch
yeah pipelineutils isn't part of the api
you'll have to do the bungeecord equivalent of NMS
As in, include the entire bungeecord jar as a dependency
shade it in 👀
👍
No no don't shade it
Please don't shade it
If you shade it, you're a despicable human being and should burn in hell
Hello. I have just started a minecraft bungeecord network, but does someone know a permissions plugin, prefix and suffix plugin etc. for the chat and the permissions?
Luckperms is a great permissions plugin
Yes, but you need a MySQL databse for that, but what is that?
You dont need a sql database unless u want it proper crossserver?
owh okay, ill just watch some tutorials on youtube there are plenty of them
omg it works
I feel like i'm god
LOL this fucking meme
Oh sorry, a bit of blocking of text going on
Which as far as I'm aware, is not depended upon by the api module
@subtle blade So how am I suppose to do to be able to use the proxy module ?
As in, include the entire bungeecord jar as a dependency
@gleaming helm
@lament wolf
Yea
Ok so
Don't show me the imports, show me where they're actually used
Because the imports don't actually matter
All of those APIs have changed
Anyone know any reasons why tab complete might not be working? Like, commands are still red. Players have the correct permissions but I can't think of any plugins that might be causing issues
alright
And then let intellij suggest the new imports
I don't think the methods have changed
Oh I didn't see that Kevin participated in the conversation, sorry
It says rename reference
Alright
Block#getBlockData is still a thing
@rapid yacht
Import for door is org.bukkit.block.data.type.Door
It's red
And wallsign is org.bukkit.block.data.type.WallSign
also red
uhhh no those should be working for you
As in, include the entire bungeecord jar as a dependency
@gleaming helm So how can I do this on Maven 🤔
Sounds like a dependency problem
@lament wolf Add bungee to your maven repo with mvn install:install-file
Works on my machine @rapid yacht , not sure what to tell you
That's weird
What is the parameter of this cmd @gleaming helm ?
I have to download Bungeecord ?
then do mvn install:install-file Bungeecord.jar ?
for wallsign, it wants me to create a perimeter, "WallSign"
@rapid yacht It's happening because the wallsign class is not in your build path properly
I don't know what's causing this.
Anyone know any reasons why tab complete might not be working? Like, commands are still red. Players have the correct permissions but I can't think of any plugins that might be causing issues
Do you have it disabled in the spigot.yml?
@gleaming helm what is that -Dpackaging=<packaging> ? I tried with the command mvn install:install-file -Dfile=<path-to-file> -DpomFile=<path-to-pomfile>, but no effect, there is 'reload' maven command or something like that perhaps ?
Okay, I think I figured out why the VehicleExitEvent is bugged with boats.
And by "figured out" I mean I found this ticket where md_5 explains what's wrong https://hub.spigotmc.org/jira/browse/SPIGOT-5562
use packaging jar @lament wolf
It's enabled and set to 1 was 2
@gleaming helm ???
how do i get access to the teleport player command/what is it?
well how are you trying to do tab completes
So I'd chalk that up to a vanilla bug, Syd
it's definitely weird behavior, but since it's weirdness is only apparent within the CraftBukkit implementation I'd say it's worth fixing. Especially since it's a rather simple fix
all you'd have to do is not eject someone from their current vehicle when they try to start riding the vehicle they're already on
Instead, I'd pass the hand to the enter event
Or rather, yeah, perhaps yours might be a better fix
don't think the hand would work, since it's boat+player specific behavior while entering vehicles can be done with virtually any entity
but trying to enter the vehicle you're in is probably nothing you'll ever try to do in a legit way
I think the issue here is that it's client sided. It's still going to send two entry packets
and you're going to receive an exit packet and entry packet from the client. Regardless of whether it's ignored, they're still sent
Yes you can stop the events from being called but I'm not sure it's all that worth it as you're then introducing inconsistencies with how the event is being called
This seems like something Mojang would have to fix by not sending that exit/entry packet from the client
In spigot.yml where it has tab complete
tab-complete: 2
send-namespaced: true
what my patch is currently doing is just preventing the second entry. On my testserver I didn't notice any side effects, so it doesn't seem like anything happens to the client that it's not expecting
What I advise doing is do some testing on the server. Confirm which packets are being sent when right clicking the boat and why. If it is the case that 3 packets are sent (entry, exit and entry in that order), then file a bug on the MoJIRA
because there's no reason for the off hand to be sending an exit and entry packet if the player has successfully entered the vehicle
it's sending PacketPlayInUseEntity
Well whatever is sent that shouldn't be lol
tbh. I'd want it to be fixed sooner than later, so creating a PR sounds like a faster solution than praying Mojang fixes it eventually™ ;D
especially since it's not really having adverse effects on vanilla MC
(and since I don't want to verify it's still an issue on 1.16 pre-releases)
What's the difference between PlayerInteractEntityEvent and PlayerInteractAtEntityEvent?
At has the position at which the player interacted as a vector
If you don't need the exact position the player clicked on an entity, use the parent one
afaik At is called but listeners for both are called, yes
Don't think At has its own handler list
oh it does. Gah I don't know how event propagation works lol
both are called damn it! ;P
Hey Choco 👋
👋
Hey, sorry for asking such a big and complicated topic though does anyone know where I can get started with AIs? I want to attempt making custom bosses
How could I use a config.yml file to let people input an integer/string for a field in one of my classes?
@rotund orbit you can add a config.yml file to your resources folder and add it in there, then on startup do saveDefaultConfig();
basically where your plugin.yml is
@twilit orchid you'll have to be a bit more specific than that
¯_(ツ)_/¯
ewww dark theme
@wheat summit take a look at PathfinderGoals
yes
it's a method from Plugin
hence, must be called from your class extending JavaPlugin
Ok thanks a lot!
for AI you need to go into NMS territory
that method is just a simplified way to save config.yml embedded file designed for bukkit plugins
if you desire to save embedded resources yourself you could do stuff like this
@vapid kindle What do you mean by NMS?
Ok, what's bad about it?
Introspection?
It's a hell to make it proper crossversion
Also methodnames might change each version
That's great then,
Right now all I have though is this:
public class PigTest implements Pig {
}
Implementing methods adds a lot of stuff I'm not sure about
Also there isn't a constructor included
Would somebody please explain to me what a pipeline is?
a set of data processing elements connected in series, where the output of one element is the input of the next one
I've seen that definition, too, but I don't understand it Fendi
@wheat summit NMS means you're leaving the realms of the Bukkit API and instead tinker with the actual implementation of the server. This will typically require some reflection and/or result in a plugin that only works with a single version of Minecraft or even Spigot/CraftBukkit
Oh ok thanks
Is there any other way to make a custom entity with an AI besides NMS then?
yes
so basically, it's rather advanced stuff that requires some expertise
Paper has a pathfinding API
Oh ok thanks
I use Spigot, would it still work?
Also where could I find it/the dependency?
I don't know, probably not since it's on paper?
Also where could I find it/the dependency?
@wheat summit https://github.com/PaperMC/Paper
Flamong Normally you have access to the NMS from spigot (unless you use maven)
Well
well, if you use a Paper API you can only use that plugin on Paper. Alternatively there might be other APIs as a plugin for that stuff you can use
Ok thanks
Using BuildTools, the server is installed to your local maven repo
Maven works fine
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.15.2-R0.1-SNAPSHOT</version>
</dependency>```
Adds spigot as dependency to your plugin, you have to have built it yourself first though
It already is a dependency
For some reason though I get classes like Zombie instead of stuff like EntityZombie
That may be NMS though ^
It is
Ok
How would I add NMS as a dependency? I'm not finding anything online
I see BuildTools though wondering if there's a Maven Dependency
like above, note the artifactId is spigot, not spigot-api
Or reppository
Ohhh
Ok I think I see now
Could not find artifact org.spigotmc:spigot:pom:1.8-R0.1-SNAPSHOT
Hey, does anybody know why the color of a teamprefix doesnt also apply on the playername?
org.bukkit.scoreboard.Team#setPrefix() still leaves the player name in tab white
I know Team#setColor exists, but that doesnt allow double colorcodes like bold + red
tried changing the spigot-api to just spigot in the dependency fiekd
Didn't work though ^
I think there's a misunderstanding about Build Tools @wheat summit
This isn't a dependency
You have to install it
@bronze marten IIRC Teams created via the Bukkit API add a §r at the end of the prefix/start of the playername
Oh ok
ill see where that comes from & see if I can bypass with reflection
I think this limitation doesn't apply to teams created/modified via vanilla commands, so it should be possible with reflection
maybe just overriding CraftTeam#getPrefix
is there a way to make it so that you can climb up any block as if there was a ladder on it?
I see they do some spooky stuff when converting the chatcomponents
Ok I downloaded BuildTools now and ran it
Absolutely
So after I save the default config, how do I go about extracting other values from it @harsh anvil?
Bukkit.getConfig().getString/double/list etc
then you pass the path
so if your config has
somekey:
somevalue: true
you can get it with the path "somekey.somevalue"
@rotund orbit
hey guys I downlaoded vehiclesplus lite on spigot and protocol lib, but Im getting this error
:/
anyone?
Seems like you are using some incorrect versions of something
oh
Based on the packages it looks like it has multi-version support but not 1.15
So it just wont work on 1.15 :/
sad
wait- will the pro version work for 1.15, since the pro version has 1.15 under tested versions while the lite version does not?
this is my config.yml, but nothing gets saved when I start the plugin up
So I downloaded BuildTools and ran it, I see a Spigot folder which inside has CraftBukkit which also has PathFinderGoals, how would I add it to a maven project?
@rotund orbit have you called saveDefaultConfig in your onEnable?
How are you building your jar? Did you save the config.yml?
@undone moat check dm now please.
Um this boot(which is supposed to be the vehicle for vehiclespluslite) is still stuck in my server even though i removed the plugin...
any idea how to get player heads that look like this?
Custom resource pack
^
um does anyone have an answer to my problem
its really annoying
because you cant place/break anything around it
in a pretty big raidus
It's probably some armour stand
Stand next to it and make that radius 2 or something. 15 might do some damage lol
Did you kill it?
minecraft:kill @e[type=!Player,r=3]
Ah, been a while since i used the command sec
I just did /kill @e
Lol
any idea how to get player heads that look like this?
That is very cool
Mobs are gonna respawn right :/
Because it would be bad if all mobs are just gone from that X D
That would be what @e is
wierd
and is the reason we suggested a radius lol
because I tried doing /replace air
./set air
and that didnt work :/
so did setting the area to bedrock
WorldEdit doesn't kill entities iirc
Apparently it is minecraft:kill @e[type=!player,distance=..4] in newest version
Unsure if it killed all your itemframes too.
https://imgur.com/RNcgoXl I get this everytime since then. I know this is somewhat firewall rule violation, but i swear I do not touch anything on the site
Anyone identified what i did to get firewall violation?
Did you do something sketchy so cloudflare denied you?
Make sure you're connecting with https and not http
I saw lock so i thought he was using https
Yeah
Mobile android browser, I'm unfamiliar with it lol
Really..
So, did you do something sketchy?
No ofc i did not
Here're what i did not do
- Using vpn
- Using spigot on igconito
- Changing login back and forth in 1 day
The issue is you're using a VPN most likely
I didn't even have vpn on any days yesterday and it's still working
We block several hosting providers due to DDoS attacks from their network
Ah, md's alive
Well that's a relief. I was ready to take over the project
I mean what?
The block isn't always active
I've had captcha runins using the public 4g of my cell provider, not directly been blocked though.
You shouldn't have an issue just using your own connection though if you're in China that may be an issue
I'm in Vietnam
You should be ok just not using a VPN then
I did not use it for the past days...
Uhm.. says here you can identify if you are the site owner
Well, are you?
site owner
Ofc not, dude...
Bad time for joke btw
Do you think I'm laughing? I'm not laughing. You're the owner dude
I guess no one can help then?
No you're stranded dude
What is spigot how do I buy minecraft server modded how use spigot
?
Do you think we're google?
Stroke?
How can I change the item that the player is currently holding in their cursor? My current code does not change the item. I've tried two methods, both shown in the code.
https://hastebin.com/uxozireyef.java
The code is being activated, as determined by a Bukkit.broadcastMessage(); inside of that method
Did you ask for their consent first?
I'm using NMS and when I tried to make a custom entity and summon it, it is invisible, I'm not sure why though, I can also hear it, can anyone help please? Here's what I for so far https://hastebin.com/eqepihuyuy.java
You haven't sent packets
Oh, what packets would I need to send?
Oh ok
Do you know if there's a better place to ask NMS related questions or should forums be my best chance?
You'll just have to be patient until somebody with more experience in that stuff can answer your question here.
@steady cedar I didn't do anything to you just yet and you're already harassing me like hell, wtf is wrong with you
I highly doubt you need to. Just google it and a few threads should pop up
@fleet crane anything yet?
Hey guys, I was wondering if I can set the scoreboard score of an entity that's not a player, more specifically an armorstand? I'm on the 1.15.2 version of the API
Here's my debug code
if (args.length == 1) {
World currentWorld = Bukkit.getWorld("world");
for (Entity nearby : getNearbyEntities(new Location(currentWorld, 0, -1, 0), 1)) {
if (nearby instanceof ArmorStand) {
ArmorStand armorStand = (ArmorStand) nearby;
if (armorStand != null) {
if (armorStand.getCustomName().equalsIgnoreCase("rand")) {
Random random = new Random();
Objective objective = Bukkit.getScoreboardManager().getMainScoreboard()
.getObjective("rand");
objective.getScore("rand").setScore(random.nextInt(Integer.parseInt(args[0]) + 1));
return true;
}
}
}
}
}
}```
Scoreboard scores are just strings, not players
It hasn't been player entries since like, 1.9
So I not only can't set the in game score of an armorstand, but I can't even do that with a Player?
@subtle blade That right?
No, just use the UUID of an armour stand.
getScore(armorStand.getUniqueId().toString()), set that
Oh, that makes sense
The scores aren't restricted to just players anymore
They can be any string you want. Any string can have a score
Oh my god you're a life saver!
Does anyone know how I can get the Mojang link of the skin of a player? Like this one: http://textures.minecraft.net/texture/eb7af9e4411217c7de9c60acbd3c3fd6519783332a1b3bc56fbfce90721ef35
Is there any way I can override the /me command?
just remove it in commands.yml
If I were to do that and then create a /me command, wouldn't people run into trouble if they downloaded my plugin?
Just register your /me command
Commands are registered under a plugin namespace, though yours should take precedence over that of vanilla's
[Prism Daemon] ---------- Detected server process in a crashed state! ----------
[Prism Daemon] Exit Code: 137
[Prism Daemon] Out of Memory: true
[Prism Daemon] Error Response:
[Prism Daemon] Server process detected as entering a crashed state; rebooting once more.
[Prism Daemon] Server marked as STARTING
[Prism Daemon] Checking size of server data directory...
[Prism Daemon] Disk Usage: 1031M / 70000M
[Prism Daemon] Ensuring server file permissions.
[Prism Daemon] Running server preflight.
[Prism Daemon] Starting server container.
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)
:/home/container$ java -Xms128M -Xmx1024M -jar server.jar
[Prism Daemon] Firewall rules has been successfully added.
what does that mean
i barely have any plugins
[Prism Daemon] Out of Memory: true
You might be out of memory?
like i said i have like no plugins
wth
i have essentials, world edit and luck perms
plugins aren't necessarily using up a lot of memory
bruh i didnt change anything else wtf
how much RAM does your server have? It seems like you only allocated 1GiB
How many players were online? What's your view-distance?
maybe allocate more memory?
oh ffs
im assuming its titan renaming ptero
titan doesnt give you jdk overhead on small plans, only larger plans who use my GC flags.
so if you pay for 1GB, youll need to use like 756M
if you pay for 1gb, you don't actually get to use 1gb
for Xmx
you have to reduce Xmx to a a decent amount under your max memory, we usually recommend 1-2GB reduction but since you only have 1GB.... uh.... can't really do that
total memory usage = Xmx + Native (Including JVM Overhead) + OS/Container usage + FS Cache. If your host gives you 4GB, you have to share that 4GB over all those things. So you can't give everything to Xmx
if you're struggling with configuring the memory, i suggest opening a ticket with host to have them help set memory for you in a way that works for your plan.
TitanNodes is decent, I work with them on admincraft about memory and flags there.
they will know what to do
@timid valley too smart lmao
i get it tho, but im kinda broke haha
its hard to sustain a server
Is it possible to have your account removed from the website? I'm from the EU
oh no we've got another "GDPR" despite all information being publicly available
Report your own account to request deletion but it won't be instantaneous
In fact I think there are like 60 reports of just account deletions right now
lol
oh no we've got another "GDPR" despite all information being publicly available
I'd prefer my alias isn't displayed anywhere on the website as it's associated with my IRL identity.
Also, I thought canadians were supposed to be polite /s
Anyways, thanks for the help
It's enough to make you want to change your name to just emoji and special characters. People would be too lazy to google you
You'd think it would have made sense not to do that in the first place, but y'know
😛 Here we are
Does anyone know how to copy a file from the resource folder and then create a new file from the copied file into the plugins folder?
JavaPlugin#saveResource()?
Let me have a look at the java docs
InputStream inputStream = plugin.getResource("artifacts.json");
if (inputStream == null) return; // I will do better checking here...
try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream))) {
artifacts = gson.fromJson(bufferedReader, type);
} catch (IOException e) {
e.printStackTrace();
}
``` This is the solution that worked for me.
wot
That snippet doesn't do what you initially asked for
That just pulls it from the jar
That's loading the file contents into artifacts, not saving it to the plugins folder
I want to upload a plugin translation
Where can I
I saw someone did it in the forum as a post
https://www.spigotmc.org/resources/skywars-traducido-en-espanol.30537/
Can I do the same?
No
Where could I
That plugin should actually be deleted lol
Talk to the author. Ask them to externalize their strings and make a language file
Is there any api/library typically recommended for that type of functionality?
Imma start translating Skywars Reloaded
Surely you can work with them as well and supply them with a default file they can distribute with the plugin
Is there any api/library typically recommended for that type of functionality?
@red zenith Languagy something like that
a plugin
From Spigot? Not really. I wrote one a bit ago and it's somewhat decent but never publicly released it
I know it doesn't do what I initially intended it to do.
"This is the solution that worked for me."
In the context of what you asked, it didn't make sense, because we did not see anything indicating that you were saving the file to your plugin's folder.
I actually wanted to load it into memory straight away.
If for some reason, you wanted users to be able to configure it then, I suppose you could save it to your plugin folder, and then read from that file, if it exists, otherwise read from the file in the jar
I'd still recommend saving it to your plugin's directory and reading it from there
If for some reason, you wanted users to be able to configure it then, I suppose you could save it to your plugin folder, and then read from that file, if it exists, otherwise read from the file in the jar
For this reason
Only if it didn't exist, save the default one again
This is the data driven ideology that you should definitely be using, especially if you're working with creating artifacts
I can only imagine server owners would want to make their own
Yeah the servers owner are going to create their own artifacts inside a user interface rather than edit it via a file. Will definitely save the default data to a file in the plugins folder.
Whether it's done in a UI or not, it still has to be written somewhere lol
Can't load from your plugin's resources every time and expect user changes to be included
I will run you through the process of how I intend todo it . Feel free to tell me what needs to change:
1. Default artifacts.json stored inside resources folder.
2. Copying the resources into a new file into the plugins folder (If the artifacts.json doesn't exist)
3. Reading from the resource folder and deserializing it into a hashset.
4. Players manipulate the hashset by adding/removing elements.
5. OnDisable serialize the data into artifacts.json
One issue I know with this system that if the server crashes the artifact data isn't saved.
Physical artifacts themselves are done through persistent data containers so that isn't something I need to worry about.
is the user able to edit the file on disk while the server is running, and then issue a reload command? or is the only supported way to edit it via in game?
Only way is via editing it in game because OnDisable whatever has been done on disk will be overwritten via serializing the hashset to the artifacts.json file.
Well, you can still have a command that would reload the contents of the json file; that wouldn't trigger onDisable, would it?
Typically what I do with my configs, which are yml, if I edit a property in game through a command or action, then I set an 'isDirty' flag. I have a scheduled timer that checks that flag every tick or so, and saves it, instead of waiting until onDisable, or saving at the moment a change occurs.
so i have a question, how would i make a plugin save data on the specified data base
I think there's a tutorial or two on the forums/web site that shows you ways of doing that.
Do you have source code so I can take a look at an example? 😮
ok am gonna check thanks frost
Rather than having a scheduler I could do it on a world save (only check for one world on the event)
Is someone going to help me with the access denied now or no...
Need some help... Just got into making plugins today and came here for a help to fix an error
[21:50:51 ERROR]: Could not load 'plugins\MYFIRSTPLUGIN.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: Unsupported API version 1.15.2
at org.bukkit.craftbukkit.v1_15_R1.util.CraftMagicNumbers.checkSupported(CraftMagicNumbers.java:276) ~[patched_1.15.2.jar:git-Paper-353]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[patched_1.15.2.jar:git-Paper-353]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:397) ~[patched_1.15.2.jar:git-Paper-353]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:305) ~[patched_1.15.2.jar:git-Paper-353]
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.loadPlugins(CraftServer.java:360) ~[patched_1.15.2.jar:git-Paper-353]
at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:234) ~[patched_1.15.2.jar:git-Paper-353]
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:908) ~[patched_1.15.2.jar:git-Paper-353]
at java.lang.Thread.run(Thread.java:834) [?:?]
did you try api-version: 1.15
yes I have, I saved and then rebuilt and then ran, same error
Thank you for the suggestion though
What are you using to build
Do you have the Minecraft Development Plugin
Yes, yes I do
You should build with maven or gradle
^
alright...
If you don't have a preference Maven is easier
I don't really have one other than I do not know how to set up Maven
Maven isn’t necessarily easier, it’s just more common right now in the MC community.
Yeah I won't argue it i've used gradle for forge before lol but it's been a while
any other ideas on how to fix the issue I am encountering or no...
if not thats ok
You need to recreate the project using the Minecraft Dev plugin and select maven or gradle as the build tool
It's including the wrong plugin.yml most likely
wait
Build system usually fixes errors like the one you sent
I think I was rebuilding it wrong...
give me a second
it worked
ok
instead of going to build then rebuild
I did this
I went to build, clicked on build artifacts and then clicked rebuild on a different pop-up menu
I would reccomend switching to build system especially if you want to use dependancies or have portability for building
how would I do that exaclty. (first time doing anything)
Does anyone mind speaking with me for a few minutes in dm and helping me a little with protocol lib usage?
I am experienced I have just never used the API I usually do standalone
but in this case
thank you!
I reccomend creating a new project following those instructions, and copying your existing code over manually
Yup
thank you for the link!
Np
you as well
thanks 🙂
Guys help how can I give permissions to open a startup script?
Im using root user in contabo
its a vps
I think it was something like chmod or something like that
chmod +x ?
Open you mean execute?
So could anyone help me with protocol lib and creating armorstands that teleport every 1 tick
I want to do it with packets
that way im not killing my server
due to entities
like one player alone can spawn 30
so I would rather do packets
anyday
Hey guys, I want to make an "invisible" parkour. When the player is at a certain distance from the next parjour block, the block will appear for him, and disapear if it is too far. What is the best method to use ?
- Build the parkour with barrier blocks and send a block change ?
That's sounds like a pretty good solution to me
Cool thanks
Is it a good idea to downgrade from 1.13.2 to 1.12.2 because of performance?
It's almost never advisable to downgrade software
Have you tried running paper or another higher performance fork?
SlimeWorldManager doesnt seem to be working: https://pastebin.com/N7sqssdp
Are you using a wacky fork?
fork of? 😅
Of spigot
@umbral shoal is there a "caused by"
Like did you paste the entire error or only part of it
i pasted it in its entirety
the thing loaded anyway but it really didnt do anything
Well it won't, it failed to modify some classes
Yeah never seen this before
There's only one version
I'd post an issue on their github
alright ty
I don't have any opinion on it. But I recommend you using Velocity
I wasn't sure first time, but once I first tried it, just fell in love
1.8->1.15.2 support?
Yes
Does Velocity blocks nullping, and other expolits that FlameCord does?
First time I used velocity is when I ported my entire bungeecord plugin with a complex load balancing and movement coordination system over to bungeecord in about 15 minutes
And yes
null ping and shit won't work on velo
Does spigot and paper plugins work with velo?
Like Luckperms Bungee
Paper and spigot plugins work on spigot and paper
I'm pretty sure that there is a Velocity LuckPerms version
Paper works just perfectly with Velocity (@see modern fowarding section)
Update: There is a LuckPerms version for Velocity
Velocity looks so much different than BungeeCord
I'm actually reading the configuration page
Ps: There is a actually plugin to support Bungee plugins but I do not recommend it. There are tons of plugins compatible with Velocity (proof that's the future)
And more and more are supporting Velocity now
Velocity gang
What is the reasons that you prefer velocity for?
Perf is way better, no known security bugs, actively maintained, ....
Kevin what lib/framework/stuff you use to communicate through all the servers ? Rabbit, Redis, Custom, ... ?
I'm using redis
Might move to RMQ or Kafka later
Won't go custom on that component though
Okay thanks, I'm about to start a network structure and wanted to use Redis + Mongo
Redis+Mongo is a good choice
That like matches 80% of my stack
100% of the super critical stuff
Sounds awesome
But don't expect other people to be able to run your code lol
kevin is a system design smart guy
yes
@frigid ember back off
Kevin_ is real smart
i'm serious lol
????
I already tried to explain my structure to my devmate and it was carnage ^^
I am not trolling
Where was that?
@gleaming helm Does Velocity have an anti-bot solution?
I promise this isn't a who asked joke lol
It does not, you'll have to add one yourself @lusty vortex
Kev whats your github
you don't want that
^
dude's got some really good stuf
and then also
some really bad older stuff
but at least he didn't skid it
Yeah I have some really bad old stuff
😐
Like embarrassingly bad
no, you don't, your older stuff is your current stuff
for me that project you guys always JUDGE ME on is embarassing
no this code is on another fucking level
But I don't harass people for that.
yeah lol at least none of my code is skidded
smae
😎
I have no public project
that is skidded
im creating an enderchest plugin with extension rows but my ec opens onplacement
he didn't say public code
how do I stop this from happenning?
if i take code, i give credit
and its open src
@frigid ember setCancelled
I had a public project but then I added guidance code that is too good and now if I make it public I get a ride to prison
So.......
😐
u said thats private
send mea public one
😐
i know
I can send you the rocket simulator without quaternions and the guidance controller
Bruh if I make that public I get sent to prison
another project
In the US we have this thing called ITAR
do u want my public code retrooper
Yeah not minecraft related tho so it's unlikely you would understand them