#help-archived
1 messages · Page 121 of 1
Is there a way to spawn a baby zombie without it riding a chicken?
zombie.setBaby(true)
could I make it so in the constructor of each enchantment I add Main.getInstance().getPluginManager().registerEvents(this, Main.getInstance())
without it riding a chicken?
zombie.leaveMount();
world#spawnEntity ?
save them in an enum
@open girder if you're using the static singleton you don't need to even have the JavaPlugin argument
z.leaveVehicle()?
static singleton?
for (Listener listener : ListenerEnum.values())
Bukkit.getPluginManager.registerEvents(this, listener);
@open girder
Main.getInstance is the static singleton
ah thanks
@sturdy oar how would that work exactly
you have an enum with instances of listeners
and you simply get them all with enum.values
wouldn't the be an enum class?
in my case i think that would translate to
for(Listener listener : EcoEnchants.getAll())
Bukkit.getPluginManager.registerEvents(this, listener)
i don't have an enum class but I don't need one here
now ignore the fact that it's red
but you would have all of them like this
since from your snippet it seemed like you didn't have any constructor argument
you could do it
so you'd have to do
for (ListenerEnum listener : ListenerEnum.values())
Bukkit.getPluginManager.registerEvents(this, listener.getValue());
for (Listener listener : ListenerEnum.values())
Bukkit.getPluginManager.registerEvents(this, listener);
I don't get how this works
oh ok
just making sure
should work
what's that casting 😐
assuming EcoEnchants has all of them
i can cast enchantment to listner because they all implement listener
ye
unless Enchantment is the vanilla implementation
just loop through Listener
it is the vanilla implementation
interesting
fair
well ok
setAI
Exactly why I said "nvm"
👍
does someone know a cheap host where i could host databases?
@sturdy oar any chance you have a .edu email?
OVH lmao
i have a school email , however it's not .edu
Nope I don't know any
rip
I'll try to get a VirtualMachine with Arch linux and put them there
it should be pretty much the same
@undone narwhal You still here?
is there any way to send commands from one server to the other server? for ex i have a lobby server and a bedwars server with a bw
plugin. So i can do /bw join (map) from the lobby server and get teleported to the other server and get teleported to the waitinglobby`?
what is the proper way to decrease an itemstack amount?
does anyone know how to access an array list that holds a string and get that specific string for the specific entity that has that string?
contains(string)
remove(string) returns a boolean if it was found as well
alright why does my IDE says 'can only iterate over an array or an instance of java.lang.Iterable' for the player.getInventory().iterator()????
well
so returns true or false?
it doesn't implement iterable then
*it
that method literally returns a ListIterator
maybe
anyway here is the reast of my ocde
but it's not a iterable class
that extends Iterator
it needs to have iterator();
Iterator isn’t Iterable
public void ImgCommand(final CommandSender sender) {
if (sender instanceof Player) {
Player player = (Player) sender;
World world = Bukkit.getServer().getWorld("world");
Location l = player.getLocation();
Collection<Entity> nearbyEntities = l.getWorld().getNearbyEntities(l, 8, 8, 8);
if (player.getNearbyEntities(5,5,5).contains(imgname)){
player.sendMessage(ChatColor.BLUE + "This is " + imgname + ".");
}
}
}```
I think
I see now why
getNearbyEntities is not a String list
What is your goal?
to get the image name of an itemframe
and detect where it is
by timing it and spawning and armor stand
thanks I figured out
then deleting the armor stand after it is finished
then you have to check for each entity in the getNearbyEntities if the type is instance of ItemFrame, and then display the entity.getCustomName() ?
that's it?
are you sure that could get the function that holds the names?
cause I also did this
imgname.add(name);
to add the string name
imgname.add(name);```
of the image to the array list
but I want to call it
the #contains method to getNearbyEntities isn't string, it's Entity collection
yeah
probably should delete that
well the one that's being defined before the other one
I'm lost lmao
if (sender instanceof Player) {
Player player = (Player) sender;
World world = Bukkit.getServer().getWorld("world");
Location l = player.getLocation();
if (player.getNearbyEntities(5,5,5).contains(imgname)){
player.sendMessage(ChatColor.BLUE + "This is " + imgname + ".");
}
}
}```
so something like this correct?
cause i'm asking
if it contains the imgname
What's imgname type?
it's basically
getting the args
of a command
that is placed
and naming an image after that
/af <nameOfimg> <UrlOfImg>
like this
getNearbyEntities is a Entity collection, you can't use a contains(String) method
Cause Entity is not a String
then what do i do?
heres my code
@Command(name = "ImgName",
aliases = {
"In",
"ImageName",
"ImageNameDetector"
},
usage = "/ImgName",
fallbackPrefix = "animatedframes")
public void ImgCommand(final CommandSender sender) {
if (sender instanceof Player) {
for(Player player : Bukkit.getServer().getOnlinePlayers()) {
for(Entity entity : player.getNearbyEntities(5, 5, 5)) {
World world = Bukkit.getServer().getWorld("world");
Location l = player.getLocation();
if(entity instanceof ItemFrame) {
ItemFrame itemFrame = (ItemFrame) entity;
if (itemFrame == imgname){
player.chat(ChatColor.BLUE + "This is " + imgname + ".");
}
}
}
}
}
}
@anyone
should this be able to work?
yes
no
it's for getting the imgname of na entity
what is that library with @Command annotation
ItemFrame instance cannot be equals to a String
swap the fors
ItemFrame == String
you should tell each player per item
it does not
not go through each world per player
itemFrame.contains(imgname);
No
That's okay..
if (itemFrame.getCustomName(imgname)){
player.chat(ChatColor.BLUE + "This is " + imgname + ".");
}```
something like this?
or am I wrong yet again
and money is not always the answer
itemFrame.getCustomName().equals(imgname)
oh
or equalIgnoreCase
i think thats being generous
we know
Mini gameslib isn’t working
I’m in 1.12.2
and have you contacted the plugin author
The command /mg just doesn’t show up
and have you contacted the plugin author
@torn robin they stopped working on it
does it show up in /plugins ? are there any errors?
i mean it's probably outdated then lol
does it show up in /plugins ? are there any errors?
He made it so you can use it in 1.12.2
we cant really help you, best thing you could do is get someone to update it
i mean if he's no longer active he can't really help lol
How do I do mini games in my mc server then?
use a diff plugin
min: 70.0```what does this actually mean. also is there a `max:` option
I have an errror
Caused by: org.inventivetalent.pluginannotations.command.exception.UnhandledCommandException: Unhandled exception while invoking command method in org.inventivetalent.animatedframes.Commands@797a6626#ImgCommand
it says this when I run it
which is weird
full stack trace?
define that?
but lemme see if it's getting confused by the command annotation
maybe I should
make a class
just for this command
brb
By full stack trace he means thats not the full error
Are there any spigot forks that do chunk generation on multiple cores? (And keep vanilla chunk generation)
Hm, that's strange. I run paper 1.12 and it seems like it's generating chunks on one core. At least I see that only one core at 100% and the others are at like 10-20% max
I am trying to teleport a horse to a location, it works fine unless there is a passenger on the horse in which case nothing happens. What I do to overcome this is call player.leaveVehicle then teleport the player and the horse and then adding the player back as a passenger, this method is buggy, sometimes doesn't work and spams the console with horse moved wrongly messages. any ideas?
yeah teleporting animals while something is mounted on them
is buggy
I think you can just get around it with dismounting the player, teleporting the player, teleporting the animal on player new location , then making the player mount the animal again
As I said, that's what I am doing, and this is also buggy
more of a general good practice question, currently I have my abstract enchantment extension class in a wrappers package. Should i name the package something else?
🤦 Paper 1.12
@sturdy oar I mean paper for minecraft 1.12. What's wrong?
Latest is not stable enough
basically you cannot at all use any other version than the latest
or
well you just cant
1.15 is not stable enough as I said. There are too much things to worry about. It's critical for anarchy servers
just because 2b2t does something doesn't mean you should too
also 1.15 is extremely stable
1.14 isn't but 1.15 absolutely is
also 2b2t is going straight to 1.16
PluginManager pm = Bukkit.getPluginManager();
pm.registerEvents(this, this);
remove the playerjoin
and make it just this
what
i never use player join
i just use
luginManager pm = Bukkit.getPluginManager();
pm.registerEvents(this, this);
PluginManager pm = Bukkit.getPluginManager();
pm.registerEvents(this, this);
i believe using playerjoin might limit the amount of events being registered
so if you make the thing send a log on the event
take damage
you wont recieve anything
try putting a info thingy into the event
Hi, looking for someone to help me with setting up crackshot custom crafting recipes? I've gotten to the point where it should work, but when I put in the correct ingredients nothing gets crafted.
I'm running on 1.15.
loc2.add(loc2);
Egg ee = loc2.getWorld().spawn(loc2, Egg.class);
ee.teleport(loc2);
ee.setShooter((ProjectileSource) turret);
Vector y = turret.getVelocity();
int x = 40;
ee.setVelocity(y.multiply(x/20));``` why isnt this working
how do i make Global in groupmanager?
@hollow thorn You need to provide more code and a stack trace.
does anyone know how many packet can a player receive from the server?
@iron summit In what context?
global groups *
@pastel igloo Use the default group in your perms manager.
currently I'm working on particle stuff, i found that player will be timed out if there're too many particles
So i would like to know the maximum amount of packet that a player can receive.
normaly i use PEX but i want to learn Groupmanager because i got a plugin that uses pex for (Kingdoms) and i want to set my staff ranks whit groupmanager
@iron summit I'd try increasing your packet compression in server.properties.
@hollow thorn You need to provide more code and a stack trace.
@errant python what?
@pastel igloo https://wiki.mc-ess.net/wiki/Group_Manager/Config
new BukkitRunnable(){
@Override
public void run(){
for(World w: Bukkit.getServer().getWorlds()){
for(Entity turret: w.getEntities()){
if(turret.getScoreboardTags().contains("turret")) {
for(Entity ent: turret.getNearbyEntities(5, 5, 5)){
if(ent instanceof Monster){
Location loc = turret.getLocation();
turret.teleport(loc.setDirection(ent.getLocation().subtract(loc).toVector()));
Location loc2 = turret.getLocation();
loc2.add(loc2);
Egg ee = loc2.getWorld().spawn(loc2, Egg.class);
ee.teleport(loc2);
ee.setShooter((ProjectileSource) turret);
Vector y = turret.getVelocity();
int x = 40;
ee.setVelocity(y.multiply(x/20));
}}
there the pointing of the entity works
but not the creation of the projectile
thx
but i dont understand anything :/ (im dutch )
mirrors:
# Worlds listed here have their settings mirrored in their children.
# The first element 'world' is the main worlds name, and is the parent world.
# subsequent elements 'world_nether' and 'world_the_end' are worlds which will use
# the same user/groups files as the parent.
# the element 'all_unnamed_worlds' specifies all worlds that aren't listed, and automatically mirrors them to it's parent.
# Each child world can be configured to mirror the 'groups', 'users' or both files from its parent.
world:
spawn:
- users
- groups
kingdommap:
- users
- groups
END:
- users
- groups
i got my 3 maps in there now
my groups are per world
but they dissapear when i change from world
and when i set a g: before my groups
@hollow thorn Try walking through your code. Say what each line does out-loud(its called rubber-ducking).
i get an error.log
@pastel igloo What error do you get?
If I have a plugin file (jar file) how I can extract this file back to project?
pastebin?
@ripe ledge Use something like JD-GUI to read it, or a decompiler.
@pastel igloo Sure.
can u help me with the cuberunner plugin
Egg ee = loc2.getWorld().spawn(loc2, Egg.class);
ee.teleport(loc2); this shouldnt break it should it
@ripe ledge http://www.javadecompilers.com/
when i do setzone command it tell me a error that internal error occurred while performing this command
@hollow thorn Loc and Loc2 seem to be the same locations.
not spigot related, but does someone know how can I write something with a height of two cells in excell?
@fossil shoal Merge the cells.
@ripe ledge http://www.javadecompilers.com/
@errant python Ok thanks
plz answer my q
@digital pebble I need more context.
@hollow thorn I think you are teleporting the item to the same place by the looks of it :/
shouldnt prevent its existance though
how to see
How can I create a scheduled Bukkit runner event that cancels when the player switches to another item?
@fossil shoal Merge the cells.
@errant python thanks I'll try
@hollow thorn That is true. Is it spawning inside the turret?
@ripe ledge http://www.javadecompilers.com/
@errant python How I am using this
what is mean by context and how to get it
@hollow thorn But loc2 is the center of the turret entity, right?
@ripe ledge http://www.javadecompilers.com/
@errant python What to choose
In the code you posted I cannot see you moving those crodinates.
i did loc2.add(loc2)
loc2.add(loc2); this changes the coordinates
and if it was inside the entity
then where are the particles
@hollow thorn Location.add(double x, double y, double z), ok, are you right next to world center?
@ripe ledge Any of those work.
in cube runner plugin when i do /cr setzone cuberunner command it tell me a error that (an internal error occurred while attempting to performing this command)
@hollow thorn Location.add(double x, double y, double z), ok, are you right next to world center?
@errant python i use a projectile launching plugin that uses the same method at the same coordinates so i dont think so
@digital pebble Id contact the plugin developer.
@hollow thorn Oh, if your using an API to launch it, then I really don't know man. I thought you had created all the methods :/
i created the method
im not using an api
i used the same code to move a coordinate
"i use a projectile launching plugin"
Ok, sorry I didn't understand.
@hollow thorn To be honest, I think you try and get the spawn working with hard coordinates, once your sure everything else is working, then move to dynamic coordinates, if you have not already.
i have got aplugin to work with spawning chickens
i have got aplugin to work with spawning chickens
@hollow thorn Cool! Then try and replicate the results with hard coordinates. Sometimes you forget about dependancies when ^C ^V'ing your own code.
What does he have a problem with?
@ripe ledge The result won't be the same
a decompiled code will never be equal to the one that you wrote
it can be very similar, but funny stuff like for examples enum turns into classes extending Enum
this is not paper discord
ill fix it after work
but you can stop accessing chunks async 😉
thats only way that message prints
Well.. talking about async
I've been modifying my code and I've noticed a thing
i was printing out some messages for debugging, and the sender is "pool-10-thread-2" does that mean the messages are being sent from a thread which is not the spigot main thread?
That also seems to be the cause of my issue because the command are not being dispatched
it can be very similar, but funny stuff like for examples enum turns into classes extending Enum
@sturdy oar So I can't extract a plugin jar file back to a project?
but how
i'll provide a sample with my own project
If I decomile It's create a lot of folders
you need a decompiler
Luyten is good
may I ask
why are you trying to get a project from a JAR
did you lose the repo or something lol
I want to try edit a plugin
And check If I can edit a plugin I made only with the jar file.
you can't edit a JAR file
I know
I mean using the JAR file
and decomile it
So how I can edit a plugin
this seems like a XY problem
XY?
What?
My
then why don't you have the source code?
I just want to try edit only with jar
check If I can edit a plugin that I have only the jar file of the plugin
you can
bytecode manipulators
tools to edit the jar's bytecode
they're not easy to use if you don't know what you're doing
Ok thanks
i suggest Recaf
How I download this?
how do i modify an existant command
for instance i want to make /time set bad
but how would i do this without overriding the old command
ehm... i think you don't?
so would i have to overrite the old command
so what do you think
/execute order 66
should do
no
im paying shockbyte 15 a month for the 6gb but they arent responding to my support tickets
and it's going to be cancelled
i tried beastnode but they had a ssd size limit and weaker ram plans
Dont touch mcprohosting it is a scam
even though i know their support is amazing
They pay a big youtuber to get popular and then offer horrific hosting
i'd host on a vps too
if i knew a good site for one
There is or Serverpro (The support there is AMAZING, they always answer on mail in like 30 min)
And there is ShockByte (Support less better, but I thing they are more cheeper)
@frigid ember
yeah im currently on shockbyte
Ok
my main problem is the god awful slow support
If you want you can try serverpro
i'll check it out
yeah beastnode was like that
https://server.pro/
Take
i tried switching to them then i found out about the size limit
What the problem with the size limit?
For server?
Storage or RAM?
the ram for the 15 dollar plan was 4gb vs shockbytes 6
so i couldnt run ftb on it
storage
on their budget plans
This is the plans on server pro:
you could just use your own pc
the premium plans dont have a limit but they have like no ram
yeah but i dont want to leave it on all the time
Server pro is bad
Why
Why? They offer free hosting, they're going to be bad
wait what
@frigid ember I am using a MEDIUM server on server pro And I have 20 GB Storage, not 4
Plus the actual valid points i cannot tell since im on mobile
i meant ram on beastnode was 4
5 was the storage limit
how much is that?
your price
thats not bad
i'm running a 1.15.2 spigot
but i want the option for ftb
which requires more ram
forge
Ok yeah you need a lot of RAM for server with mods
But what is the server?
Survival?
@frigid ember
semi survival on the spigot
but i'd probably do continium or infinity evolved
on a ftb
What?
are you familiar with ftb?
I know it's a mod pack, right?
it's a total revamp really
a very famous mod pack
tons of mods
yeah
but it takes a lot of ram
How much players you want to be in your server?
not many. 6gb is the range im looking for
on average
15
15 players that gonna play a lot and load a lot of chunks?
or players that gonna be at the same place
Because more chunks the server load, the more the server is heavy (Storage)
I thing you need like 6-10 GB RAM
@frigid ember
for your server
But now it's 20 GB Storage
on server pro
I thing It will be enough else you gonna create more worlds then the Overworld, Nether, and TheEnd
anyone experienced with bungeecord channels? in particular with PluginMessageListener
yeah
going to stick with them for another month
only need about 8-10GB of ram for a forge server
would recommend a dedicated server though if you want a forge server
they are relatively cheap
my personal experience with OVH is random network dropping for some user (Some can join, some can't )
no personal experience for Contabo
sounds like you didn't use their montreal DC
there was a while back a couple of years where they were upgrading their hardware for network stuff
lasted about 2-3 months but nothing too serious as far as outages went
contabo is good if you're okay with some CPU steal and don't worry about ddos
cpu steal?
yup
Was hoping you would elaborate in what you mean by that
type top in linux
see "St" stat
its cpu steal
percentage
if it's higher than 0, your provider is taking some of your CPU for other clients
you mean their RTM software is buggy?
Remote toolkit management
Highly doubt they are stealing cpu cycles without using some VPS because unless you have a beowulf cluster it isn't going to be very effective
then its not stealing CPU
every VPS has to share CPU cycles
unless you have physical processors for each VPS
probably a monitor for stats collection for the webpanel
even md_5 talks bout CPU steal
such as network, cpu cycles etc
yes, how else do you intend to control your VPS
even dedicated boxes have web panels
otherwise how can I hard reboot a dedicated server?
But webpanels use IPMI
When developing a command in a Spigot plugin, how do you make it comply with a permission system?
I'm pretty sure it is CPU steal, even influxdb has a statistic for measuring CPU steal
Unless you are guaranteed a physical processor to yourself, there is no way to prevent sharing cpu cycles between VM's
physical processor isn't the same as cores either
you should google about it or something, you're talking without knowledge
I am talking from personal experience because I setup servers all the time
Then you should know that sharing cpu cycles is something you can't prevent unless you have a dedicated processor
@frigid ember just create a report stating you want it deleted
ok
I don't know how it's done, but they do it, I contacted contabo support to reduce CPU steal and they did it, performance got better
they probably just gave your VM a higher priority
which just means you get more time with the cpu cycles
Well the only other thing I can think of is they were just limiting the amount of processing power alloted
You can term it cpu stealing, but I can tell you that isn't an accurate way to state what was being done
that's how everyone seems to be calling it, Linux itself having a stat called st, which stands for steal contributes to it
st is a simple terminal implementation for X
since I don't use such a terminal odds are it was just buggy or just had too much resources dedicated to it
what you run for ssh has nothing to do with the terminals available on the server
I should say what you choose to run for a client
There is multiple terminals usually in linux depending on the distro you decide to use
Can someone code review this small tasks thing I made? I know it can be improved greatly I'm just not sure how
should probably include a link 😛
nah that's just the name of the project
it just so happened it fits with the task thing though lol
is this the best way for implementing a permission system in a command? ```java
if (!sender.hasPermission("plugin.commandname")) {
sender.sendMessage("You don't have permission to run this command.");
return false;
}
but I intend to make something using the riot api, so I picked a random league of legends item lol
should return true if you want to send your own message @wanton sigil
otherwise it will send 2 messages
try {
return scheduledFuture.get();
} catch (InterruptedException | ExecutionException err) {
err.printStackTrace();
return false;
}
Oh gotcha
I wanted something here to have it timeout
Hi guys, I'm developing a plugin but I have errors :/, like the commands I have before worked and now they don't, it doesn't tell me any error in eclipse or anything
But having it timing out threw loaaadds of timeout exceptions
yeah, i was catching and printing
I set the timeout as a flat constant + the delay passed in
but it would still timeout every time
well not sure why you would want it to timeout
incase it gets stuck pinging the API or something
unless you are tying to remove stuck tasks
in which case you need to just kill it then XD
harder to do if you just have the main thread though
easier to implement with multiple threads
but you have two ways to do it. Either a soft terminate or hard terminate. Soft terminate you just implement a variable that the task checks to see if it should continue to run
a hard terminate is where you use other methods to kill it
i'm currently doing a soft terminate right?
I think so, hard terminating is not always easy to implement and doesn't always work depending how the task is stuck
yeah
i just don't want the program to freeze up
since it's a fixed threadpool size
Hi guys, I'm developing a plugin but I have errors: /, like the commands I have before worked and now they don't, it doesn't tell me any error in eclipse or anything. I hope they help me because I'm pretty frustrated
if they all get stuck then the program breaks (i think, at least that's how it works)
@balmy sorrel not really giving much to help you with
in that case you could just resort to reloading your plugin @dusty topaz which is equivalent to just nulling everything
It tells me this when entering eclipse
ewww node.js
highly don't recommend using such things in plugins, but whatever up to you. But it is telling you that it can't find node.js
What do I do, sorry, I'm new to this plugin
you install nodejs
and add it to your path
or consider using IntelliJ and not messing with node
Where do I install it and how do I put it?
i think google can help you with that
I don't recall eclipse needing node.js though o.O
Yes xD
what events do i need to check to detect if the item in the main hand of a player is switched or removed?
if you are not able to fix it, you could try using a different IDE @balmy sorrel there is IntelliJ and Netbeans. Both are decent alternatives to eclipse.
hey does anybody know of any texture packs which retexture horses as dragons? I found an interesting one but its for 1.10 and I need 1.15 compatibility.
or alternatively how to get 3d models in as textures for items?
@frigid ember I researched what you were talking about. The ST value in top, you were mis-understanding its meaning.
I was accurate in what I was telling you, essentially all ST means is that there is another process using the cpu cycles. It isn't really stealing, but just means something else is occupying more of the cpu cycles
so it could just been a VPS using more cpu cycles then it should have
someone else occupying your cycles
without your explicit permission
that's called borrowing I guess
its not your cycles
well I'm renting em
all the VPS's have to share cycles, not sure what you don't understand with that o.O
Have a question, may I ask on the Discord if someone wants me to present their plugin? I'm doing YouTube
even multiple cores share cycles with each other as well
that is why I keep stating unless you have an explicit dedicated processor
you have no choice but to share the cycles
I know that
but some providers share less
some more
and contabo has low prices due to how much they share
well sure, there is a variety of implementations out there to control how much cpu time each process gets
but they are all not perfect. Some better then others. Some free others cost money lol
mainly has to do with the Hypervisor being used to provide the VM's
on ovh it's 0 - 0.1 CPU steal usually, whereas on contabo it's usually 1 - 10
Well ovh uses an OS hypervisor like ESXi
I would imagine contabo took a different approach is probably using something like VMWare or KVM instead
yup they use KVM
which are both not OS Hypervisors, but software hypervisors
anyone have a good way to detect minechat and similar clients?
why you need to detect them?
but pretty much tp them in sky if they don't fall for few mins, detected
a good way for detecting minechat is checking if the player is moving 😛
make them move before they can chat when they join the server
Have a question, may I ask on the Discord if someone wants me to present their plugin? I'm doing YouTube
@unkempt heron ??
no
we do ranks based on playtime and while we have an afk kick already, I hope to specifically detect chat users
I have a couple I maintain if you want present them, but it might take you some time since they are API's 😛
@sleek ivy do you only have 1 server or multiple?
the afk kick is for any user, but before I decide how to handle them I need to be sure I can detect them
I use chat clients a lot to be in multiple servers at once and have automated stuff like private msg notifications, so I find it really useful and not using it for unnice stuff
1 server right now, but that may change
well if you end up with a hub server, disable play time on the hub, and make it required to move before able to join a server
and then just implement a network wide chat 😉
solves everyone's problem in that manner
their playtime doesn't increase, they get to still chat like they want to
I am sure there is plenty
sadly I allowed afk time counting for too long in my server, would be unfair to disable it now after people have 100s of hours xd
I'm not pleased with the one we have so I'm open to recommendations
But, I am always a fan of allowing players to do something instead of punishing them because it doesn't align with what you are wanting lol
i just use redis to send msgs to bungee then bungee send it at proxy level to all players
I'm not saying I'd punish them, just need to detect it so I can adapt correctly
Well, you know what I meant lol
it isn't punishing, but your players think it is if you remove the ability to chat XD
just making sure I'm clear, not you
ya
chat but no playtime, easy to do because the playtime system is custom
really the only effective way to detect such things is if they are moving or not
some clients can move btw
another way you could probably do it, but probably would cause their client to crash is to open an inventory XD
if you open an inventory for the player, you could detect if they closed it or not within a certain amount of time
if it isn't closed odds are its a chat client
can't walk either if inventory is open
that's a good idea, chat clients ignore inventories and keep chatting while inventory open
The client can send movement and chat packets while inventories are open
movement packets are generally ignored if an inventory is opened. the exception is teleporting
If you have an anticheat you can block them from moving with the inventory open
Nope
Incorrect
^
Well, then the server should not allow movement. Guess could make a pr for it lol
😐
ping
it didn't always used to be that way
A number of anticheats patch it already
Yeah it always was that way
That's why anticheats have been patching it since like version 1.3
Kevin_ do you want to hear another fun cheat that many don't know?
I promise I know it
Yeah I know I'm an anticheat dev
If you do that and move my anticheat will ban you instantly
what bout ping @gleaming helm
the sad thing is that those things should be implemented by the server, not by developers
@frigid ember Regardless of ping, packet order is the same. If you open inventory, then move without closing it, then obviously cheating.
ooh
what's wrong with mules lol
good thinking
It's not public. It does have some checks that can handle stuff like what you're talking about but it doesn't do dupe detection
It was primarily designed for detecting ghost clients on PVP servers.
is there no type of "user agent" info that clients send to the server on connect?
Which it does insanely well
user agent?
As in, detects more autoclickers than AGC
you mean forge, vanilla etc.?
mc wasn't designed for it
@sturdy oar Mules are attached to specific players. So what you do is fill the mule with items you want to dupe. Have another person open its inventory, original player owning it logs off. Now you can take the items out and close the inventory. Original player logs back in and didn't lose the items.
but forge sends a packet under some conditions
detecting movement and inventory stuff seems hacky, I can, but I wish clients would just identify themselves
doesn't Paper patch that?
Not that I am aware of
Paper patches some of it I think, but I'm not really sure
ban mules i guess
Yeah that's what I did
but it isn't only mules you can do it with
that sounds like worst design ever
Actually on my server I have some checking going on for anti-dupe
the .mule system
it is actually easy to handle that scenario though
just not sure why the server doesn't lol
So like if you dupe an item it'll actually detect that duplicate items exist. It has a unique key that only exists once. If the key appears twice it deletes the items
guess I will add that to my list of PR's for 1.16
It's of course not that simple and the keys are actually stored in a distributed system and it's made to be incredibly efficient, but that's the concept.
do you have any public plugins? 😮 @gleaming helm
the way to handle the mule scenario is to not allow the mule to despawn if the inventory is opened or close all inventories in regards to the mule if it does despawn.
I only do custom dev work for high profile servers
nothing recent? 😦
Anything else I find isn't worth my time
wait how do you find these servers
I just ban mules and other storage bearing entities. Too much risk and my players aren't going to need them.
I have a lot of connections in that space
so I have 3 things to do for 1.16 it seems. 2 minor pr's and 1 large pr. The large PR is going to be allowing bungee and mc server to communicate via unix sockets 😄
I get recommended a lot to server owners from other people I've worked with and such
imma need to start as well
Unix sockets would be cool but like unfortunately...... I mean.... multi machine distributed system......
TCP is more efficient in that sense......
But yeah I'd use it if I didn't have multiple machines
Well that is really the only ideal time to use unix sockets lol
I used to use file watchers for communication in same machine
but I mean, you can do other things with it as well though if unix sockets are allowed
I'm using unix sockets already for some aspects of communication
for instance, you can transport the communication using NFS which would allow all servers to not be bound to the tcp stack directly IE, don't actually have to have the server listening on an ip.
My pubsub system runs an instance on every machine in the network, so I'm using unix sockets to talk to that
@keen compass I've already got my entire network in a VPN setup so
ah so you already have something similar then
Plus the way I'm doing load balancing
It just wouldn't make sense to use unix sockets
well, my pr isn't exactly to replace what people already have. But rather give more options that are easier to implement 😛
mmm I disagree with the statement that unix sockets are easier
Also, most people tend to mess up iptable stuff when they are running multiple servers on the same system with bungee
using unix sockets solves that
For a beginner? no way
It's just a really foreign concept for a beginner to understand
But you're right about the iptables thing
Actually as a bit of a research project I wrote a scanner that scans all 16k servers in one of the server lists
Ran it overnight
Woke up to find a ton of servers with MASSIVE holes, some pretty high profile
(they were all individually emailed, dw)
do you mean nmap?
probably 75% have nothing blocked, 20% have some blocked but still big holes, and the rest are good.
like custom built scanner thing
security is really weak in servers usually due to the nontech people running them
well nmap is really amazing tho, it can basically do everything
Yeah it's quite disappointing
@sturdy oar No, it can't check for weak database passwords
I would even bet that the same amount that block nothing also respond to everything as well as don't use SSH keys at all
I didn't probe for ssh auth
it requires kinda much work to setup good security, I still throw 5 hours at it from time to time when I think of possible vulnerability
So idk the number on that but
I can tell you that a lot of them don't firewall anything
yeah, it isn't just minecraft server's that suffer from that
imagine if everyone removed root access and installed fail2ban
in general there is many servers that block nothing
fail2ban does fuck all if you have ssh keys
root access isn't exactly bad if the password is insanely complex
just use SSH key access
shouldn't allow root login
why password with is bad
b r u t e f o r c e
You shouldn't allow root login either
I use it for everything
just because you can't log in as root, doesn't mean you can't use root btw
it can't be bruteforced if long
Because a password has WAY less entropy than a 4096 bit SSH key
you can always do su root if you really must use the root account
You can't even THINK about brute forcing an SSH key
If an attacker sees ssh key, they give up immediately
you can't really bruteforce 16+ char passwords with current technology
You can
you can if the characters repeat
I can guarantee you
Your password can be broken
The human mind is terrible at generating entropy
good luck on it then, I'm pretty confident
And it's even worse at remembering entropy
I'm talking bout random ones
If you can remember your password, a computer can break it
That's a good rule of thumb
And if you can't remember it, a computer still might be able to break it.
with 2Ghz of processing power you can generate and test 2-3 million passwords every 5-10 minutes
You're forgetting about gpu acceleration ^
Now that's really only useful if you recover a hash but
well I am just giving like kind of the low end side
Look. Just bottom line is
I use 36 char passwords for my vps users
Don't use password auth
that even with not much processing power you can still generate and test a lot of passwords in a short amount of time
If you can control it, disable password authentication and use keys only.
I have a new node setup guide that I wrote for my current network. Step fucking 3 is to disable password auth
How can I detect if a player dropped an item from the main hand? I tried using PlayerDropItemEvent, but the inventory that the player has is updated already so I can't loop through it.
if you have any repeating characters in that 36 character password, it doesn't increase its overall strength
why not
more tries
If the repeating character is an entropy-adding randomly selected character then it's fine
If the repeat has any kind of non-random logic to it whatsoever it adds almost no entropy
all my passwords are random
it is hard to explain why it doesn't add more strenght. Sure it increases the length of the password, but it doesn't increase its complexity
Then you're probably fine, but here's the thing. SSH keys are also randomly generated and contain WAY more entropy than any password. You likely aren't memorizing your passwords anyways, you don't have to memorize an SSH key either. You just put it on your hard drive in a specific folder, and log in. And your SSH client literally authenticates you without typing in a single thing.
Also @keen compass if a randomly generated password has a repeat, the repeat is entropy-bearing
This isn't crypto, this is probability and statistics but ok
I'm just not into using keys due to not having the experience with them and prefer having long random password entries instead
passwords are part of crypto. Even if the password itself doesn't encrypt anything
You'll thank me later
I mean if someone cracks a long random password, they're far more dangerous to the world than you
@keen compass Crypto generally refers to how data is encrypted, decrypted, signed, verified, and all of the algorithms and theory associated.
Most of crypto involves that yes
but you still learn about the inherent weaknesses involving passwords though
as well as strengths if you must use them
@frigid ember The thing about passwords is you have to type or paste them every time you want to log in. Your experience will be way better with keys. You just issue the ssh command, select a user, address, port, and you don't even have to type or paste a password, you just log in.
hey guys. needed a little help. I'm trying to switch from Essentials balance to Economy++ 1.8.0 for it's job and salary features but it doesn't replace essentials. It just shows a different balance with it. How do I switch over?
@keen compass Most of crypto you learn in college is about the algorithms and the mathematics, not about the human side.
Although
Nobody's arguing that
The human side isn't important
I don't paste my passwords, they're auto typed
So ok I don't see the hangup to use keys then
You'll have the exact same experience with security that is n times better, where n is a number larger than the amount of stars in the observable universe.
literally.
well that only matters if you're trying to protect yourself from alien technology
I am
The entire security world shuns password ssh auth. And it's for a reason.
The reasons which I have provided.
If you don't want to listen, don't complain if something happens.
I've done a lot of research about this which tells me that 16 char passwords are currently safe, only in future you'll need 32 char instead
@frigid ember once you experience how quick passwords can be generated and tested you will probably want to avoid using them lol
I've done a lot of research that says 2048 bit ssh keys are going to likely be secure for the next 100 years or until shor's algorithm is functional enough to crack a key of that size. And 4096 bit keys are still an option for the extra paranoid who are okay with waiting an extra quarter of a second for identity verification.
Nothing beats raw crypto
for instance, a very very fast way to test passwords against ssh, is to use multiple processes and connections. For every connection it exponentially increases the speed in testing the passwords.
No, it linearly or logarithmically increases the speed
The server can only handle so many requests per second
@keen compass
yup but how will you test a 16 char, even if it's done offline, billions per second won't be enough
I agree with the point you're trying to make but that's false information
@frigid ember 16 character password only has at most a few billion combinations
Wrong again
wrong
assuming a key set of 64 chars (which is less than actual), we get 64^16 possible combos
well it depends on the amount of characters you have to choose from
Which, by the way, is WAY FUCKING LESS than 2^2048 combinations
@keen compass Your estimate is only true if you're choosing from 16 characters
google says 10,000,000,000,000,000.
@frigid ember That's a very low number cryptographically speaking
yup
Go look up what 2^2048 is
but it's uncrackable currently
79 octillion with Kevin's math
It's not my math, it's the math of crytographic geniuses
Didn't bother to verify the amount of characters so I assume it is accurate
Well I meant the numbers you provided
i see no point in going for 2^8192 combos, it's just paranoid
Also no hardware supports a key size that large yet
Max you can get consumer grade is 2^4096
2^2048 has no name for the amount of numbers it has XD
4096 bit cryptography for RSA
I think 256 is the limit one should go for
2^2048 has 617 decimal digits
So we're acctually talking about a different type of crypto here
This isn't so straight forward
With that 2^2048 number, the only valid ones are the ones who are the product of 2 prime numbers
how long did it took you to learn all these stuff
Well, I was just calculating how large of a number it is. Which is 617 digits long XD
When we talk about 256 bit crypto we're talking about symmetric key. In AES's case, that is, any possible number works
yup I'm talking bout AES specifically
hey i'm having an error with my code
I personally use elliptic curve keys
but RSA is still good too
384 bit elliptic curve keys are equivalent to 4096 bit RSA keys
org.bukkit.command.CommandException: Unhandled exception executing 'imgname' in org.inventivetalent.pluginannotations.command.AnnotatedCommand$BukkitCommand(ImgName)
here it is
i'm trying to get an entities custom name
this is the code im using
public class ImgNameCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (sender instanceof Player) {
for(Player player : Bukkit.getServer().getOnlinePlayers()) {
for(Entity entity : player.getNearbyEntities(5, 5, 5)) {
World world = Bukkit.getServer().getWorld("world");
Location l = player.getLocation();
if(entity instanceof ItemFrame) {
ItemFrame itemFrame = (ItemFrame) entity;
if (itemFrame.getCustomName().equals(imgname)){
player.chat(ChatColor.BLUE + "This is " + imgname + ".");
}
}
}
}
return true;
}
}
ECC is faster than RSA but less supported by legacy hardware
line?
Yep
@keen compass
me?
yes you
ok
I don't have a problem in not supporting legacy hardware though @gleaming helm lol
Or do you want the item inside the iten frame
so ECC keys work just fine for me 😉
thats why i said getCustomName