#help-archived
1 messages · Page 113 of 1
public static BlockFace setSignFacing(Block b, , BlockFace face){
if(!(b.getState() instanceof org.bukkit.block.Sign))return;
org.bukkit.block.Sign sign = (org.bukkit.block.Sign) b.getState();
if (sign.getBlockData() instanceof org.bukkit.block.data.type.WallSign) {
org.bukkit.block.data.type.WallSign signData = (org.bukkit.block.data.type.WallSign) sign.getBlockData();
signData.setFacing(face);
sign.setBlockData(signData);
b.setBlockData(sign.getBlockData());
sign.update();
}```
found this
Idk if its right?
1.12+ i think
Rip lmao
because there wasn't blockdata before
do you guys recommend skript?
Nah just learn java
Is there a method for checking if current thread sync or async? Like the Swing isEventDispatchThread
@tiny dagger Yeah i set the material data but none of them work unless its 2
and 2 is north
so
well I fixed it with just block data
thats cool lmao
anyone familiar with bedwars?
if so, does anyone know how to fix this annoying issue that only 1 person can pickup items from the gen at the same time
If I forgot my password and also forgot my email
How tf do I login?
@subtle blade
How do you forget your email? lol
Because I only used my username
would you be able to help me
I have multiple emails I use to create accounts
So try each one
I tried
There's a forgot password button as well last I recall
Yeah but I don't know which email it sent too
don't tell me you forgot the passwords to your email accounts too lol
No
I know that
But I have all my passwords saved on firefox
And it hasn't been working for 13 weeks
Could you see what email the account is assigned too?
if so, does anyone know how to fix this annoying issue that only 1 person can pickup items from the gen at the same time
oh ans also i forgot to mention but if you know a fix please feel free to tag me.
thank you :>
does anyone know how to access something thru a diffrent public?
and i want to know how to access an entity thru there
so it would be much appreacciated if someone could aid in my quest
hello?
@anyone?
plz respond
this is needed
😐
Hey guys, which one is better?
private List<ItemStack> soldItems;
this.soldItems = new ArrayList<>();
or
private List<ItemStack> soldItems;
this.soldItems = new ArrayList<ItemStack>();
private List<ItemStack> sold = new ArrayList<>();
The type argument is inferred by the compiler as of Java 7. Specifying it twice is redundant.
In fact, your IDE should warn you if you are doing that lol
Is there a possible way to check if the player pressed “Q” on their keyboard without a item in their hand
No. Key binds are not sent to the server, only the result of said keybinds
i.e. Q isn't sent, drop item is sent
@tawdry venture if (Thread.currentThread().getName().equals("Server thread"))
I know but I thought since Q is for drop item you know
If you have no item in hand, it won't send a packet to the server requesting to drop something
Okay thanks
Quantum that's definitely not the way to go lol
Chocolate is the best person
eh no one responded to him so I thought I would give it a shot
Only way to check for threadedness would be in an event and checking if it's async
(Event#isAsync())
is there something wrong with my method?
Just not accurate nor is it ever a great idea to compare against a thread name for logic
how is it not accurate exactly?
Minecraft isn't single threaded in that it has just one thread. World generation for instance runs on another set of threads last I recall while still technically being a blocking operation
If I'm not mistaken, they're still part of the server thread
anything that is not running on the server thread is considered async to my understanding
for example it would not be safe to access any part of the non-thread safe api from one of those worldgen threads
Any way for me to check delay between space bar presses whilst on an entity with ProtocolLib? I’m guessing I store a systemtimecurrentmillis in a hashmap and when they press it again check if they are in the hashmap and then compare if curenttimemilis - hasmapvalue <= 500 then do my code?
Wait did I just answer my own question
now is there a good use case for checking if the current thread is the server thread? probably not
maybe if you are a library it could be useful for checking if other plugins are using your api correctly, as spigot does itself
hello, I have a problem with the menus we can duplicate items do you know how to fix this?
Hey me chocolate did I answer my own question? o-o
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/spigot/browse/CraftBukkit-Patches/0007-Async-Operation-Catching.patch#244
spigot itself uses almost the exact same technique for that purpose, actually
It doesn't compare against name ;P
true
@subtle blade did I answer my own question above?
Yea pretty much
that's a pretty abstract question
I feel like only you can know if you have a satisfactory answer
Wow I’m so smart but stupid at the same time
So i had to use a backup of my world because the normal version got corrupted somehow, but the seed wasn't saved.
When i do /seed it says 0
I know the seed, but idk how to insert it because only the chunks loaded in the backup are able to be seen
Bukkit.isPrimaryThread exists too, but, some level of odd behavior there last I recall
Ah, that's the method I was trying to think of
but all threads are the primary thread if the console is stopped?
I knew there was one and I was trying to look for it in the docs but couldn't find it lol
that's questionable
Yea, that's the "odd behavior" aspect
during shutdown
common bad area is during a watchdog crash
I know that I used to see many issues with deadlocking in a watchdog timeout due to that caveat
I'm not sure why "All bets are off" should mean "return true"
why are people using that method anyway
I'm still not seeing a super practical use case
A common example is code which needs to be ran on the main thread
If primary thread, run, else, use the scheduler
so you want to have a sort of thread safe api even though it's not really thread safe
seems a little counterproductive to me
Not really aiming at "thread safe API"
It's more for dealing with cases where code may be called from another thread, and you need to determine if you're on the correct thread for that
any existing solution for pushing resource updates to spigotmc programmatically? I'm looking to incorporate it into a github action pipeline
Nerd
yes
I did some looking around and I didn't find anything so I'll probably just make my own
spigot forbids automated access to the site
beyond that, it's just the xenforo resource manager
is there a rule that specifies that? I checked prior to asking and I only saw that automated access to forums wasn't allowed
The resource manager is part of the forums.
Seems like the bleeding effect in MCMMO plugin is affecting sweeping edge in a way so that it only works when the bleeding effect stops. Anyway around this?
got the same forum bug from 5 years ago again where publishing a resource update gives me a 500 error...been doing this too long lol
any reason for the 500 in particular? is it a cloudflare problem?
it's a "xenforo loading tens of thousands of profiles in their entirety all at once" problem
also hell yea goat pfp gang rise up
Seems like the bleeding effect in MCMMO plugin is affecting sweeping edge in a way so that it only works when the bleeding effect stops. Anyway around this?
disable the bleeding effect? contact the dev?
How do I contact a dev? Sorry I was referred to the server so I'm new @worn temple
contact the dev of mcmmo. No idea why you were referred here
Lol idk why either, I told him it would be no use. Thank you for your time
Every time I try to join my local hosted server I get this error
Im gonna get a paste rn
https://pastebin.com/S9mZTgYE
if sweeping edge relies on the attack timers, then that would prooobably be why
Is the error player location related?
that's generally down to plugins hooking in the networking stuff throwing exceptions
Ive removed all plugins to debug and I still get the error
You'd need to enable debug logging then
it was either in there or the one in server.properties
Ive enabled both
ah, yea, one in spigot.yml should do it, it flips the logger level
K, here is the new paste: https://pastebin.com/riTEerQe
I just had a question, since Snapshot 20w17a has been released, how close can we get to color-precision? I'm assuming just about nearly anything since they release RGB values such #xxxxx <- corresponding to whatever color you choose.
Now with precision would achieve live-videos via Item Frames + Maps in the latest snapshot be logically speaking possible? Because I know you can assert pictures, and gifs; how about a possible live-video for example displaying a twitch stream in Minecraft via Frames + Maps?
as far as I'm aware, the rgb changes apply only to the chat protocol
yeah
Hey md_5, general question here
Instead of me reflecting into every net.minecraft class while working with nms & just “guessing” what a .a() method does, is there a better way to do this?
Surely Bukkit & Spigot teams, and yourself for example, didn’t waste hundreds of hours just guessing your way to the products that exist now
Wait so the RGB would only be possible in Chat? No Holograms, Scoreboards, Menu Titles, etc? 🤦♂️ 😭
still a neat addition
I mean sorta... Kinda ruined the hype. I was hoping to make cool Hologram Gradients, Item Name Gradients, Lore Gradients, etc.
Properly coloring each letter can make a neat gradient effect.
true, I'm sure there will be some very cool additions when this comes out
like better chat coloring
so we have more colors available for formatting purposes
no, despite being called "chat", the protocol applies to multiple text-based game elements: https://wiki.vg/Chat
Hello, so I have this int array
int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31 }
Is there a way besides using loops that I can just fill up all the values 1-31?
a loop is your best bet. is there a reason you're avoiding one?
No reason, just wondering if there was a way like int[] { 1-31}
You just want a shorter way?
I just wanted to know if there was a better way
Like something built into java already that I could use
@upper hearth like there is a ```java
Arrays.fill(arr, 18);
What are you trying to do? Wdym "fill up all the values"
I'm trying to fill it up with the values 1 - 31
So the final product looks like this
int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31 }
Oh you said you "had this array"
So I thought you were working with it lol
Why are you working with Arrays anyways, why not Lists?
int[] array = Ints.toArray(ContiguousSet.create(Range.closed(1, 31), DiscreteDomain.integers()));
I've found the solution
12345678910111213141516171819202122232425262728293031
18 milliseconds12345678910111213141516171819202122232425262728293031323334
0 milliseconds
Why am I getting this output when I do this?
public static void main(String args[]) {
StopWatch stopWatch = new StopWatch();
stopWatch.start();
int[] array = Ints.toArray(ContiguousSet.create(Range.closed(1, 31), DiscreteDomain.integers()));
for (int i : array) {
System.out.print(i);
}
stopWatch.stop();
System.out.print("\n" + stopWatch.getTime() + " milliseconds");
StopWatch s = new StopWatch();
s.start();
int[] sd = Ints.toArray(ContiguousSet.create(Range.closed(1, 34), DiscreteDomain.integers()));
for (int sf : sd) {
System.out.print(sf);
}
s.stop();
System.out.print("\n" + s.getTime() + " milliseconds");
}
It says the second one took 0 milliseconds
Caching
First one will take a bit because it's creating each object, in the second run it's just using the cache. Welcome to Javas amazing caching system (that's not even sarcastic, it's great)
Alright, thanks
anything that doesn't get rounded down to 0ms is an insanely long time for populating a simple array
please, just use a loop, I beg you
if your use case really is this simple, there is no better way
is there a way to debug your code when using the Spigot API
Guys, i have a simple question:
Can a cheat client edit the value of the player.getVelocity()?
they can't directly edit the value per-say but the client can tell the server their velocity and if its within reasonable values the server will accept it
So instead of the server validating all client requests and maintaining full control over the player’s state, it just uses loose constraints?
what is the community convention for naming a second player variable?
p2
In what context? Source, target?
"target" if the player is target(?
yep
that
Sender and Receiver
hi guys i have a question there a method for fast convert old minecraft ids?
Are you talking about data in a world or how you refer to items ?in code
no block ids
What version are you going from -> to?
1.15.2
From which version?
1.12.2
the project is a world generator i have forked that from terraincontroll but is for 1.12 i want to rewrite to 1.15.2
you can see here
I know a lib which is just awesome
There are different ways you can manage that, it just depends upon how specific your code is
XMaterial
XMaterial allows you to convert id / name for both versions
Doesn’t mojang provide some kind of api for conversion?
no because mojang are stupid xd
haha
How do you use NMS ? (Can't you do a CraftItemStack#asNMSCopy ?)
is a world generator i use class CraftWorld
for all versions
Oh damn, you'll have to remake it so
BlockManagerV1_8
I think
if you see the code you can understand
and sorry for my english i dont speak it very well
I thought there were some pretty significant changes with all of that in 1.14; the generation that is?
i miss block ids
Are you French?
Do you need to create a new implementation to replace https://github.com/founder05/AWG-Bukkit/blob/2984e61fa52e2673292e17cd4ebb36af488bc829/src/main/java/me/marc_val_96/bukkit/advancedworldgenerator/BukkitMaterialData.java
That appears to reference block ids and data
and when i configuarate the .bo3 files i can use the new blocks
ok but the nms conversion
i miss block ids
@opal bay what the hell
no
block ids were a nightmare, just wish they'd done it a while ago, the conversion was a mess.
that's true
md_5 do you have an idea of when the entire legacy system will be removed from Spigot
When all plugins updated 😂
August 9th, 05:14:36.3334 GMT 2020
Hello, I have a question, I need to get all commands on the server, default and custom, anybody know how to get it except in spigot.yml, 🙂
CommandMap
That will get you all the commands registered, will have to do a bit more if you want to also get subcommands as well
but, should work for your purposes 😉
I don't think you can look subcommands
Expecially considering how many plugins handle them
yeah, will need some voodoo reflection stuff to do it
There is no concept of subcommands in bukkit
Cause that would be too easy to work with
Bukkit only registers root command literals into brigadier
How the hell does ACF register subcommands
I have a multi-module maven project, which I think I've configured improperly.
I have separate modules for each mc version, a core module which is used by each of the mc modules and a dist module which bundles the core/mc modules into one jar.
Whenever I run mvn install - I have to install core, then the mc modules then the dist, otherwise the changes I've made to my code aren't included in the dist jar.
Should I be setting the scope for the core module in the pom for each mc module as compiled?
Currently I have the scope set to 'provided'.
Does anyone run spigot/bungeecord servers in tmux? How can I keep all the servers automatically start when stopped? I mean start single server if it's stopped or the tmux session if it doesn't exist. I mean, I know how to do it, but maybe someone has a perfect setup prooven over the years
well for screen it is relatively simple
ps aux |grep -F -v grep|grep -F -v SCREEN|grep -F --quiet $JARFILE
maybe can modify that for tmux
I don't think I can do the same with tmux
hallelujah, seems like I've sorted out that build issue, and now per player tab list is working with the per player sidebar scoreboard
Or maybe I can, but how do I restart single servers inside the tmux session
Just a simple while true?
maybe create a service? what distro are you using?
@red zenith ubuntu 18. So it's systemctl
https://blog.lazyhacker.com/2015/03/automatically-start-minecraft-server-on.html
@red zenith that's exactly what I was looking for. Thanks
how to make multiple help lines ( i mean # ) in the spigot config
You mean like this?
https://www.tutorialspoint.com/yaml/yaml_comments.htm
guys how can i disbale world join quit messages ? for bungeecoord
What is the best way to log to console and having the ability to use colors?
Log console?
*print to console
You mean like this?
https://www.tutorialspoint.com/yaml/yaml_comments.htm
@red zenith yes
Let's say
ChatColor.GOLD + "[warning] " + message
@bitter tendon getLogger.warning(Chatcolor.GOLD + 'variable of message or message')
I have a Vanilla structure, and I am able to load and paste it with NMS, but I cannot seem to get its dimensions. Here's what I'm trying: ```java
private double[] dimension;
public DefinedStructure structure;
/**
- Load a structure from a packaged NBT structure file.
- @param name - The structure name
- @param permutation - the permutation of the structure to fetch
- @return NMSStructure - The structure object
/
public NMSStructure(String name, int permutation) throws IOException {
DefinedStructure structure = new DefinedStructure();
structure.b(NBTCompressedStreamTools.a(main.getResource("struc/" + name + "/" + name + "_" + permutation + ".nbt"))); //Load structure from packaged NBT file in /struc//*.nbt
this.structure = structure;
NBTTagCompound tag = structure.a(new NBTTagCompound());
this.dimension = new double[] { tag.getList("size", 3).h(0), tag.getList("size", 3).h(1), tag.getList("size", 3).h(2) };
}```
I just get all zeroes in dimension...
If anyone here is familiar with NMS, what am I doing wrong?
Alright, thanks @pearl pawn I will try
@pearl pawn It works, but no color: It shows º where the color is
it depends highly on what terminal it is
some may support colors some may not
or what logging software
Alright, thanks @pearl pawn I will try
@bitter tendon you should learn java first and also it depends by the cmd that you are using
i know that color on cmd works on 1.12+
i don't know on 1.8
@pearl pawn um... I do have other plugins that print color to console
So it is possible
@pearl pawn um... I do have other plugins that print color to console
@bitter tendon --log-strip-color in your start
after you declared the server file name
like:
java -Xms1g -Xmx1g -jar server.jar --log-strip-color
Suggestion: try to use powershell for utf and colors
Dont remember which but in one of version you can combine red "ş ı ğ" message to console
Ajaj powershell bad
i use Hyper or the new Winows Terminal
https://gist.github.com/frostalf/74d662a4bf381ad4ba2679bc537c4595
@kind crow
@keen compass I don't like screen, but thanks. Maybe I can change some things in it to work with tmux
Does anybody know how to fetch an item from an NBTTagList
NVM, figured it out..
the function is e() not h()
https://gist.github.com/frostalf/74d662a4bf381ad4ba2679bc537c4595
@kind crow
@keen compass how do you access the server's console on this setup?
Staff I'd like to report a user for making false claims, threatening to dmca..
Also they stole their whole plugin
See sunny two can play at this game
That's not the place to do so
Who is "he"?
hi. i'm making a gui shop.
i want to disable drag and drop only in the gui i made. not in other guis.
is it possible...?
public class GUITesting implements Listener {
@EventHandler
public void GUITest(PlayerDropItemEvent event) {
Inventory inventory = Bukkit.createInventory(null, 9, "gui testing");
inventory.setItem(3, new ItemStack(GOLDEN_AXE, 1));
inventory.setItem(5, new ItemStack(Material.IRON_AXE,1));
event.getPlayer().openInventory(inventory);
}
@EventHandler
public void CancelInteract(InventoryInteractEvent event) {
event.setCancelled(true);
}
}
You can do event.getView().getTitle().equals()
You can also compare the clickedinventory to your shop inventory
ok ill try it. thx
anyone familiar with bedwars?
if so, does anyone know how to fix this annoying issue that only 1 person can pickup items from the gen at the same time
Seriously, all help would be greatly appreciated as this is literally the only reason i wont be able to publish my server :(
i made a bedwars plugin and i never had that issue
unless you mean like in everyone from the team in the radius picks up the same item
in hypixel; four of us stand on the gen and only one of us picks it up (most of the time) until they move away
What is a maven project?
||test for me||
@tiny dagger
quick question how do bit masks work
eg:
0x01 On Fire
0x02 Crouched
0x04 Unused (previously riding)
0x08 Sprinting
0x10 Swimming
0x20 Invisible
0x40 Glowing effect
0x80 Flying with elytra
would (0x01 | 0x02) result in a bit mask that would make the player appear on fire and crouched?
if not, how can I combine two bits to match what I expect?
from the looks of it, I think so
I think they are flag bits for each state
just performing an or on all the flags you want would I guess do the trick, but you can easily check no?
yeah I'll have to check
00001 on fire
00010 crouched
00100 unused
01000 sprinting
10000 swimming
seems to me it would be valid to just or them lol
@kind crow it creates a screen named mc-survival
with a little bit of tweaking you can actually make that service script dynamic and capable of loading up servers without creating additional service scripts 😉
Hello, I have a problem. I use WorldGuard for my spawn protection but my Builder can not build or break. His name is Dridox98. Here's all the region flag :
Does anyone know a Plugin where I can have multiple custom join messages when someone joins? So, each join message is different?
@kind crow it creates a screen named mc-survival
@keen compass I don't think its so easy to switch screens as in tmux. It has fancy tabs and stuff
if anyone knows how to upload an IntelliJ Project with multiple modules on Github please mention me because i'm having some issues.
hi
so
I downlaoded somehting off blkc spigot and i read some stuff about it being pirated content and there being virues, is this true?
Im fereaking out rn
Please help
I dont want to get viruses and pirated content
I deleted it
but I already like
ran it on my server
and its been on my pc for like a full week
plz help
You downloaded it from where? Black Spigot???
Then I hope you'll get a virus. If you want a premium plugin just buy it, not crack it
i mean it looked kinda shady but i thought it was just a branch of spigot or something
@undone narwhal I didnt know it was a premium spigot
I literally searched it up
and that was first result
What did you expect from a website like Black Spigot
Even in the name 😄
Im sorry
just
what do I do
please help
Ill never do something like this ever again
What's the plugin?
guishop plus
It was uploaded by a staff member
but idk
if that makes any differenc
Searching Gui shop plus online doesn't give black spigot link
It's the 13rd result
So what's exactly your problem? You're anti virus said there is a virus ?
no
but
I read on reddit
and pirated content
I just dont want a virus and that stuff
You ran the plugin on a VPS or on your computer?
my pc
I mean for the time I had it it SEEMED to work and do the thing it was meant to do but apparently that doesnt mean its not a virus
im scared
If you don't want a virus on your PC then try to not download stolen/leaked plugins 😂 Black Spigot is also well known for it's third party connection to their servers.
Even so, the chance of getting hacked by a minecraft plugin is a little bit low. If you want to be a little bit more safe then download an antivirus and scan the .jar file with virustotal before you run it on your PC.
Of course the safest way to get a plugin on your hands is from official websites ONLY.
what are the official websites?
thats it?
https://dev.bukkit.org
https://www.spigotmc.org
https://www.mc-market.org
Of course spigot is the most trusted one
o ok
how about songoda? I downloaded from them once
or is it another black spigot website...
Songoda is fine but personally i never liked it that much.
@tiny dagger You read minds ?
why not?
The timings of songoda's plugins don't say good
whats wrong with it?
many of the plugins made are known to be badly coded
and it's not me who says it
but much more intelligent people
oh
Not to mention i think that they're not even open source
Problem: My bossbar only shows 1.0 and 0.8
bar.setProgress(ManaManager.getManaOfPlayer(player) / 100);```
use doubles
If my mana is for example 80, then it goes empty
@bronze wigeon
Based on Songoda plugins i never trusted Songoda. Their plugins are 80% decoration and 20% bad coding (idk if anyone else agree with that but this is my opinion)
worked, thanks xd
Schedule a runnable every 50ms or 1L?
how do i do that
This is the problem on my Skyblock server
Everytime someone is at their island, more than 150 mobs spawn on their island
How can I make it less?
try limiting mobs per chunk
how do i schedule a task
And how to do that?
How would I change the MOTD from a plugin?
Also @median swift Those are Entities, not Mobs, Entities can also be items on the ground or other stuff
Then how about the mobs?
Hello! There would be a problem with my user account. I changed my location but it hasn't been updated on google's site preview. Could something be done about it?
how do i schedule a task which uses bukkit api
Bukkit.getScheduler().schedule x
where X is the Type of Task you wish to schedule.
or look at the list of possible methods on the SJD
Do you know how to use google ?
Do you know how to use google ?
@undone narwhal no i use bing
after reading the anime on google chrome
and i couldnt resist using no u
how do i set the owner of a projectile
Bukkit.getScheduler().schedule x
where X is the Type of Task you wish to schedule.
@frigid ember will it work using the BukkitRunnable
thingy
.runTaskTImer()
What are you trying to do exactly and I'll try and help you out
make a working turret
I'm pretty sure several people suggested in the past to not use Bukkit. instead reaching into your Main Class via Singleton or Dependency Injection
Main.get whatever then you can reach into the .getServer() method.
in that .getServer() method you're able to schedule an async repeating task.
im using bukkit runnable
euanPC are you familiar with OOP?
object oriented programing?
Correct.
using bukkit is not bad tho :d
and OO stuff i do use
Okay good.
also i could use itemframes
for what?
If you want to create a turret your goal is to essentially schedule a task to spawn an entity / spawnArrow method from the World object and aim it towards your target location.
turret vector substract player location normalize multiply by 2 👀
I believe even an easier method would be if the player is riding such turret
for the actual turret
player.launchProjectile
does that work with entities
I think only stuff which extends the Projectile class
You could try though
how would i get if a player is collided or on a honey block
google, ddg and bing do not help
i guess because the block is smaller than normal
you could just get the block at the players location
but the block doesnt have a block id
movingblockposition method
and see if the material is = to honey
that's what handles collision
kind of stupid
its like netherwart, neither have block ids 😦
Nethwart has a Block ID
115
but essentials says no 😔
Honey I couldn't find though.
what is the movingblockposition?
movingobjectposition?
Hello, does the "BlockExplodeEvent" event works to detect a block being exploded, or should I use something else ?
that tells whats at that position
the entities have 1 method that you can override
and do your stuff instead
Oh
if you're over 1.12*
that should technically be the handheld item
like why the door block is 64 but the door item is something else
or im confused
with bungeecord if i have the firewall set up right i wont need any auth plugins if bungee is online mode?
It's always recommended to use Auth plugins for an extra layer regardless lol.
Firewalls dont mean your account's secure, it's still good to have it.
Is there any way, to make a spigot Server use less Storage?? without a lot of performace drops
There's a ton of ways.
What are my Options?
Depends, what your current specifications?
less storage?
simply limit the map size
and ur good
thats the main storage eater
@frigid ember Some Intex Xeon Processor with 96 GB of Ram and a 1 TB SSD (this is already full), cant limit map Size due to Anarcy kinda Server
@vernal spruce I know, but I am not able to limit these
its gonna store even more shit
It's not a big deal, but do you have good server start parameters?
@vernal spruce I ment delete Coreprotect Data
buy a bigger storage you cant rly downsize a server..
check how much the coreprotect data
occupys
@vernal spruce But I already have a 1TB SSD, so it is not that easy
you can get a block without using id using block.getMaterial
@vernal spruce over 200GB
also how do i extend a cmd
also why bother using an ssd for that?
theyr already just speeding through everything not rly a need to load things faster..
@vernal spruce access times, becasue if not chunkloading is quite slow with 70 Players...
Could you tell us why it's full with 1TB? Identify why / what is full about it
well you can delete all that data however keep in mind ur losing things in case of possible exploits
another anarchy server..
things get messy about them..
@frigid ember Coreprotect over 200GB, rest MapSize
@vernal spruce Yes it is really messy, if you dont fix exploits
you can delete coreprotect but keep in mind you wont have backup..
@vernal spruce Thats the Problem
not rly its just minecraft vanilla limit
I need a backup
CoreProtect isn't necessary on an Anarchy server? everything's allowed?
Anyone know how I can set a player's nametag?
wich goes to like what 3000k mapsize?
well you can still keep a history of the server nermin
@frigid ember yes, but I could loose a over 6 year old map, even with backups
without CoreProtect?
up to you,tbh idk why people bother with anarchy
not rly popular
or.. buy online storage
@frigid ember Yes, external Backup, but Coreprotects helps me patching exploits and all that stuff
store that coreprotect data then clear it..
You could just store the current CoreProtect data in another place ^ and insert a new fresh one.
The old still exists; but out of context in a way.
@frigid ember Yes, but what if I need to acess the old one, can I just somehow delete the one from 4 years ago but kkeping the "newer" one?
Don't delete anything.
also isnt the 1.16 update breaking anarchy servers?
@frigid ember over 6 years runtime is also inpressive lol, so just buy new storage?
but over 700GB of map data is also a lot
as dont think minecraft can swap between hard drives
how could you afford 96gb for 6 years I can barely afford 8gigs lol
hes most likely running own machine
@frigid ember Yea, but the 96 is also kinda tight....
so he pays upfront..
you own the server at home?
It is a own machine
well you can either do that or..
make a decision to wipe on 1.16
as its gonna break it anyway
@frigid ember Not directly, but i have quite fast acess to is (a friend of mine has a Server room in his house)
damn lucky lol
@vernal spruce It is not going to break
@vernal spruce No, a lot of people said this when the nether update was out (the one who added quartz, but you could just convert the files)
wouldn't the new chunks of nether be new?
yes, but they changes the world generation too, just a hard boarder
there are a lot of hard boarders onmy Sever, due to new Version of the Game
But anyway: no way to savely delete Data?
not without breaking something,you can store the old data but it will also be a bit spicy if you havent thinked in long run and precompressed data each year..
There is no precompression, that would not be possible due to slower chunk Loading and so on
but the Backups are compressed
couldnt u preload / gen chunkjs with 1.15 / current version
compressing a single folder on a entire Minecraft Server is kinda hard
tbh i would suggest just getting a hdd
a 5tb hdd might be the best thing..
alot cheaper than a ssd also..
as you dont really need that ssd
@frigid ember try Preloading over 700Gb ob Chunk Data... not going to work
@vernal spruce HDD is sadly to slow
well that was the only option I could think of
you can buy good ones...
@vernal spruce Still the tiny random files are slower on HDD, and a Minecraft Server is based on them
or if you have money stored go for idk.. 2tb ssd if you can find one
@vernal sprucesecond 1 TB SSD with raid
basically ur pretty fk when it comes to this problem..
this is why I asked
no, I cant
you could just transfer onto a 2nd drive
Anyone know how I can set a player's nametag?
@frigid ember The entire Server is kinda hard, Spigot does not support 2nd Hard drives
Scoreboard Teams or listen for the Packet @icy cosmos NamedEntitySpawn
tried having 1 for world data and 1 for coreprotect?
that's probable ^
i think you can request this special feature to coreprotect dev
@frigid ember how?
@vernal spruce good idea
I don't spoon feed, that's the worst thing; I was a victim of that for a year; you have to learn.
I know yeah
I found this class on github
But I am not too sure how it's correctly used
starting up with "class on github" is very discouraging 😂
lol
also why packets?
I tried the Coreprotect external drive, but a HDD was still just to slow, the Databank was buisy and the Ram usage shot into the sky...
the current scoreboard api is more than enough to do
tried with an ssd for the coreprotect?
@vernal spruce Then just run it in Raid and have a bigger entire disk.
if you can find a bigger ssd go for it
but the price will most likely skyrocket..
thats the sad thing about coreprotect
it wasnt rly designed for this..
@vernal spruce the Price is not that much of a Problem, but it is just that I have to reset the whole Server
most protection plugins werent designed for this..
wich would take a while
public static void changePlayerName(Player player, String prefix, String suffix, TeamAction action) {
if (player.getScoreboard() == null || prefix == null || suffix == null || action == null)
return;
scoreboard = player.getScoreboard();
if (scoreboard.getTeam(player.getName()) == null)
scoreboard.registerNewTeam(player.getName());
team = scoreboard.getTeam(player.getName());
team.setPrefix(Color(prefix));
team.setSuffix(Color(suffix));
team.setNameTagVisibility(NameTagVisibility.ALWAYS);
switch (action) {
case null:
team.addPlayer((OfflinePlayer)player);
break;
case UPDATE:
team.unregister();
scoreboard.registerNewTeam(player.getName());
team = scoreboard.getTeam(player.getName());
team.setPrefix(Color(prefix));
team.setSuffix(Color(suffix));
team.setNameTagVisibility(NameTagVisibility.ALWAYS);
team.addPlayer((OfflinePlayer)player);
break;
case DESTROY:
team.unregister();
break;
}
}
you mean move the hole server?
Would that be what you mean @frigid ember ?
welp thats a block of code
@vernal spruce I know, but it is the CoreProtect Plugin, and other Anarcy Server have TB of data on this Plugin
that's some messy code I'd clean that up if I were you.
yeah.. not much he can do,even if he updated to a new compression system the old data is at risk when changing to the new one..
@vernal spruce means just a new SSD i cant get at the Time due to COVID 19?? great
welp not much you can do
I am running out of Storage (10 GB or so left)
@frigid ember not that it works though
it will eventually fill up as well dont forget..
what do you mean? whats wrong
@vernal spruce But the post in our country Strikes and the shop are mostly closed
@vernal spruce Thats a few PB, so no worries
idk 2b2t i think already reached that
dont think they went that big with storage though
@vernal spruce no, this Sever has still under 1% of the Map generated
Minecraft Map is really big
well you could...
make ur own loading system
one of the talented devs might take a offer for that
@vernal spruce I am not good at Programming such complex thins, and even if I can do it, it HAS to be stable
basically loading/unloading/saving on different disks based on player locations
idk there might even be one out there not sure
as its not a common problem
I just programmed a fiew basic Minecraft Plugins, so I do not have experince, and normally you would buy a new drive or delete map
yeah its above avg dev
There's definitely compotent developers who can make such; request.
It is not common, because they just buy new Hardware
theres a limit to what hardware you can buy
@frigid ember But is is way more expensive that buying a good SSD
eventually its too much to handle
It's probably worth it on the long run
not rly a feature like that can go for like idk
@vernal spruce yes, I know, there is also a Playerlimit, and Raid helps you out a lot
200$ and a experienced dev most likely would make it
its not rly omething godly to make
@vernal spruce 150$ for another SSD (500GB)
if theyr familiar with chunks theyr already good
yeah but how will you acces that storage
but I have to convert the 700GB Map as well
I got a 120GB ssd for $25 on Amazon @edgy pendant
@pastel condor I need read and Write Speed, and not the less expensive junk
What speed?
anyway im off gotta work on a damn skill plugin
ok, bye
for extra help
asking the b2t2 owners might help you
as they are more familiar with these kind of issues
Do you have lots of players on your server? Why would you need something that fast?
@vernal spruce actually I tried 2 week ago, no response
@pastel condor 68 Players average
Anarchy server?
@pastel condor yes
Anarcy Server 200+ GB Coreportect (I need them) 700GB map 1TB SSD 10 GB left
@pastel condor only have 96 GB, not able to chache anything with this much players
Cant delete World files
Mind if I ask, how are you making money to pay for all this?
Does your server have a store?
@pastel condor yes, I have a wating room with payment for faster Acess
1TB SSD thats all
I mean why not use a desktop ssd as plan B for now?
@pastel condor Dont have any, Post strikes due to COVID 19, and stores are closed....
Amazon?
delivery strikes
Rip
Maybe setup a temporary world border?
@pastel condor What with Bases/ Players outside the boarder?
maybe temp Map and then the old back?
Yeah you could do that
But I dont know how long this Lockdown and the strikes are, so
hard decision
It is going to be full the next Week
so....
public void registerNT(Player player){
Scoreboard scoreboard = Bukkit.getScoreboardManager().getMainScoreboard();
if(scoreboard.getTeam(player.getName()) != null){
scoreboard.getTeam(player.getName()).unregister();
}
CachedMetaData metaData = Hub.getLuckPerms().getPlayerAdapter(Player.class).getMetaData(player);
String suffix = metaData.getSuffix();
Team team = scoreboard.registerNewTeam(player.getName());
team.setPrefix(ChatColor.translateAlternateColorCodes('&', suffix));
team.addPlayer(player);
}
Delete old data
you can delete old core data
@frigid ember How, I dont know
Because over 4 year old CoreProtect Data is useless
will delete data older than 360 days
Yeah
@frigid ember It is so much, that the Server freezes and then Crashes
this is the Problem
when purging?
yes
I see
Its over 200GB of data, accessed in a tiny time...
you need to have double the coreprotect space to be able to purge
@frigid ember next Problem
No, too slow speeds, just Uses ton of Ram and then freezes and causes a lot of Lag
and you could use it without mc server, it's sqlite database, so could get a developer to make purging go through without crashy mc server
o
well that's pretty crazy situation here
@frigid ember true, but i am bad at Database dev
sqlite not meant for such things
And I dont have a dev
I could help you, but 200gb is outside my capability kinda, my internet really slow
Mine is too slow too, but Server Internet is fast
500kb/s
1,5mb /s for 5 People
is it a vps or dedicated?
dedicated, cant run vm on this scale
I'll try research bout sqlite stuff and see if something could be done
thanks, having the Problem since my dataWarning went off (1 month ago, 95% usage)
btw using Linux, so no Windows solutions!
yup I don't even know how to work with windows xd
@frigid ember I had it in School, so i even have Windows on my PC, but Linux is way better
server version btw?
I have windows on my PC, but all my programming affects Linux only
no, Linux Mint, due to makig acess easier
what mc version?
1.15.2
I'll pm you
Hello, does the "BlockExplodeEvent" event works to detect a block being exploded, or should I use something else ?
Hello, so I rank (as an enum Rank) a player in my plugin et put in too in Metadata. But when I want to access it from another plugin, where there is too exactly the same enum Rank, it doesn't work. I did it:
public static Rank rankByData(Player player){
return ((Rank) (getMetadata(player, "rank", Core.getInstance())));
}
public static Object getMetadata(Metadatable object, String key, Core plugin) {
List<MetadataValue> values = object.getMetadata(key);
for (MetadataValue value : values) {
if (value.getOwningPlugin() == Core.getInstance()) {
return value.value();
}
}
return null;
}```
Any idea ?
@cursive flax yep it works
@lament wolf You should use something else to use the rank of the player like a database, a socket or something else. How do you save the Rank in metadata? Do you put a string or the enum value?
the enum value
value.getOwningPlugin() == Core.getInstance() is your problem
@wanton delta So what I should do ?
@undone narwhal I have a db where there is the rank as string, but I doesn't want to overload it,
you should debug
debug what value.getOwningPlugin is, and what Core.getInstance is
chances are, theyre not equal.
im also questioning that use of ==
what is Core.getInstance @lament wolf
It's the instance of my main class that extends JavaPlugin @wanton delta
show me the code
Of what ?
what is
Core.getInstance
public class Core extends JavaPlugin {
private static Core instance;
private HikariDataSource hikariDataSource;
public Title title = new Title();
public Moder moder = new Moder();
private PluginManager pm = getServer().getPluginManager();
@Override
public void onEnable() {
instance = this;
getServer().getMessenger().registerIncomingPluginChannel(this, "channel", new PluginMessageListener());
getServer().getMessenger().registerOutgoingPluginChannel(this, "channel");
initSQL();
initServer();
}
...
}
That's the singleton design pattern I believe
that isnt the method Core.getInstance
so
I would recommend using .equals instead of == (unless im wrong, it just feels like .equals would be a better option. you can try == first though)
second of all
I would recommend using JavaPlugin.getPlugin(Core.getInstance().getClass());
You can use Redis, or if it's in the same server just implements your core plugin
(yea, this method in general is not that great)
(would be better to just load the player's rank when they join the server from the db)
^
stupid question, but what does redis do? When I googled it I didn't get a stright awnser
it's just a caching agent
you would want to use across multiple machines I believe.
So if i have server a with message 1 and server b, i can send message 1 to the Redis server, which broadcasts it
Server b has a listener for the message type, so it will receive the message and do something with it
oh cool
its useful for transfering players accross servers
or server spinners that automatically start/stop servers based on their needs
or say you have a server-wide shop that needs to have the same items, and you have an external application that updates the shop every day
like Hypixel Skyblock 😛 ^
The application can send a message saying "the shop updated" and all my servers will grab the new data
not really like that
another example would be a booster system
say your minigame lobby has a booster active, it will broadcast that to the main hub so when you are choosing a server, you can see that it has a booster active
Does jedis just “work” on spigot? Or does the server owner have to set it up
wish that’s was on the tutorial 😔
Yea I tried learning Databases in the past it's difficult but it's got to sink a ton of times for me to absorb the information.
too many servers 😅
Redis is like Mysql
You need a redis server to be running just like you need a mysql server to be running
I see
oh cool
ehy does someone know
why is SQLite preferred over H2?
(ignore the fact that is already shaded into spigot which is of course one of the reasons)
it's syntax is almost the same as of mysql
I ate too much SQL for today
SQLch Belch?
I need help
I am creating a world and when I am teleporting to the world it dont tp me and put this on the console:
https://pastebin.com/mPZDvXeb
Someone can help me?
pretty self explanatory its a Null point error
I'm using Jobs4.15.11 https://www.spigotmc.org/resources/jobs-reborn.4216 Is there a better Jobs plugin than this?
Hi , i have a problem , in my server , the builder can build but he can not break blocks and any permissions are for breaking blocks. Please help me that's really annoying
got worldguard on?
@frigid ember
can I bump a spigot thread?
@frigid ember Yes for sure
/region flags global
look there
with __ before and after global
two underscores
@frigid ember
That doesn't work :/
the command?
yes
could be flag or flags
weird
Yeah tha'ts weird it say to me /region flag [-e] <id> .......
let me hop on and try it real fast
it should show a menu that you can click on to allow different world guard permissions globally
yeah but that's not work for me
not flag
and i'm in a 1.8 ver
flags
Yes
yeah idk then =/
maybe it wasnt added then
im on a 1.15.2
oof
you should still be able to do it the other way
Yes ?
for example "/region flag spawn mob-spawning deny"
that sets a flag on the region spawn
to deny mob spawning
Okay
so just look up different flags on google
and find the one which might be the culprit
Okay thanks for help
hope it works out
Thanks
does anyone know how to access an entity in another class?
I would love the help!
@anyone?
hello?
*sighs in sadness
hello?
yello?
anyone
😦
be patient
i can't help you with that but people are active and helpful on here
just need to wait
@strange grove This chat is a desert of people who have no clue
Hey, im using PlayerJoinEvent to add some stuff to a player pipeline but its sometimes empty
Do i need to use PlayerLoginEvent or something like that
maybe i did some mistake
nevermind it was a cache issue
Can someone help me with something? (On spigot of course)
DM me
@me ??
@ripe ledge You should state your situation here, that way all of us can help you, it's what this channel was made for
Checking world.getnearbyentities should also catch any armorstands
`World world = (World) sender;
world.getNearbyEntities();`
so something like this
?
right?
@vernal spruce
tho
i am getting an error with the location stuff
I do
Location location
but then it underlines location
@strange grove ask again and I can help
ok
well
i'll show you
`World world = (World) sender;
world.getNearbyEntities(Location );``
World world = (World) sender; world.getNearbyEntities(Location );
What do you actually want to do?
well
I want to get the armorstand
i'm using holograms
and I want to delete the hologram
once I detect it
it will go vamoose!
So put the entity in a list or something?
I guess so
If it's between restarts you could consider a yml
well im using a command for this
Either use a hashmap, arraylist
What?
``World world = (World) firstFrame.getWorld();
Location location = (Location) firstFrame.getLocation();
ArmorStand hologram = (ArmorStand) world.spawnEntity(location, EntityType.ARMOR_STAND);
hologram.setVisible(false);
hologram.setCustomNameVisible(true);
hologram.setCustomName(ChatColor.GOLD + name);`
What method are you using to create the entity?
World world = (World) firstFrame.getWorld();
Location location = (Location) firstFrame.getLocation();
ArmorStand hologram = (ArmorStand) world.spawnEntity(location, EntityType.ARMOR_STAND);
hologram.setVisible(false);
hologram.setCustomNameVisible(true);
hologram.setCustomName(ChatColor.GOLD + name);```