#help-archived
1 messages · Page 78 of 1
Yes
Wel
Use matts framework
how do find out who placed a block in mc
And use Gradle
also, not maven clean package
omg
it's mvn clean package
Don’t use maven
is it possible to use maven clean package?
InventoryGUI says to use maven...
Use gradle
Jesus
Well imagine having to write more than 2 lines to import a dependency
it's just throwing NoClassDeFofouroN erreoro all the while
Oh yeah
You need to shade it ig
?
Edit this to change the output of the command!
wat
yea its mvn
lol
Like if we have some framework classes you may have to clone those into ur own project when processing the jar
@idle zodiac answer my question
otherwise i cant help you
idk if i use maven clean package
i literally havent a clue what i'm doing
i'm using pipes to build it
its what InventoryGUI said to use
yes
your project will be in your target folder
no, type clean package there
clean just removes the target folder
oh
package builds a jar
clean package cleans it and creates it
there wasnt an option for clean package
package would also be enough
install additionally adds it to your local repo if you need it in other projects of yours
you can type it
by yourself
it just built the Pipes
and if you are making a public API and deploying to a repository then deploy will do that as well
then take a look at the target folder and you can use the jar where no "original" is
?
Edit this to change the output of the command!
literally
that's already shaded right?
yea
paste it
you should have two jars in the target folder
where is the link
which link?
are you drunk?
I discovered a public economy plugin with Vault shaded into it. A user was having trouble with a shops plugin because it couldn't detect their Vault economy. No wonder
what are you talking about? which hastebin link?
that's a pom
yes
it's literally called 'target'
you should add the spigot repo also to maven but it will probably also work that way
?
Edit this to change the output of the command!
um, by the way
esy
where is your spigot dependency in your pom?
not necessarily
no you don't
but it would be much better
so
if you are attaching the library with intellij it's fine
add it to your server
i just want to make sure inventoryGUI isn't declaring a compile dependency of spigot which is being shaded into your plugin
and test it
the same exception?
no
or a new one?
but i cant use piepesporjk.jar
it only shows "iptsje k maven: tihepekdo." or whatever
frpom whreje ei did irt before
ItemStack item = new ItemStack(Material.POTION); item.setDurability((short) 8197);
set durability is depreciated and doesnt work... how do i give a player a specific potion type
use itembuilder
or whatever its called
stop
oops
wronoogo omrooeotor
OK there is still a noclassdeffounderror
hwat isethee
stop
fuck
item builder wont work for me facepalm haha i need a vanilla solution
because im loading the type of potion from config
rtepi
plugin.getConfig().getString(itemname + ".Type"); lol
Whut
i'm trying a shaded version of the ijores o od
buti['k nto sue if its triofng iowork
You can still make an ItemBuilder for that?
gn haha
Ok gn
sorry im a little new and libraries arent my thing
basically im creating an item stack with potion.. or splash potion or whatever
and i need
to add a type to it
like
to change it from an unobtainable potion to lets say an instant health potion
Make a potionbuilder extending the itembuilder
example?
You have an ItemBuilder class?
i really feel like a noob!! haha js is my thing not java
It’s fine 🙂
Edit this to change the output of the command!
?
Edit this to change the output of the command!
Edit this to change the output of the command!
?
Edit this to change the output of the command!
https://github.com/WTPGaming/OMZP/blob/master/Versions/1.1.2/Source/com/wtpgaming/omzp/v15/Commands/OMZPCommand.java
if you mean something like this then yes
wait thats super old
player.chat("/omzp givegui "+player.getName());
}else if(Bukkit.getPlayer(args[1]) != null && args.length == 2){
player.chat("/omzp givegui "+args[1]);
}else if(Bukkit.getPlayer(args[1]) != null && !args[2].equalsIgnoreCase("gui")){
try{
String arg = args[2];
ItemStack item = new ItemStack(Material.getMaterial(plugin.getConfig().getString(arg+".Type")), 1);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', plugin.getConfig().getString(arg+".Name")));
item.setItemMeta(meta);
Bukkit.getPlayer(args[1]).getInventory().addItem(item);
} catch (IllegalArgumentException e) {
player.sendMessage("The item identifier "+args[2]+" does not exist");
}
}else{
try{
String arg = args[1];
ItemStack item = new ItemStack(Material.getMaterial(plugin.getConfig().getString(arg+".Type")), 1);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', plugin.getConfig().getString(arg+".Name")));
item.setItemMeta(meta);
player.getInventory().addItem(item);
} catch (IllegalArgumentException e) {
player.sendMessage("The item identifier "+args[1]+" does not exist");
}
}```
my current "item builder" if thats what your refering too
oh thanks haha
class ItemBuilder {
ItemStack stack;
ItemMeta meta;
public ItemBuilder(ItemStack stack) {
this.stack = stack;
this.meta = stack.getMeta();
}
public <T extends ItemBuilder> T withLore(String... lore) {
meta.setLore(Arrays.asList(lore));
return this;
}
public <T extends ItemBuilder> T withName(String name) {
meta.setDisplayName(name);
return this;
}
public ItemStack toItemStack() {
stack.setItemMeta(meta);
return meta;
}
}
class PotionBuilder extends ItemBuilder {
public PotionBuilder(String name) {
super(name);
}
@Override public PotionBuilder withLore(String... lore) {
return super.withLore(lore);
}
@Override public PotionBuilder withName(String name) {
return super.withName(name);
}
public PotionBuilder withColor(Color color) {
if (meta instanceof PotionMeta) ((PotionMeta) meta).setColor(color);
return this;
}
@Override public ItemStack toItemStack() {
return super.toItemStack();
}
}
Might be some error
But yeah was from mobile
Ah lots of them alr
oml java master right here
But u get the point
i can find em yeah
The constructor for instance of PotionBuilder
okayyy..... i thinnk i get it
Hope so took a while to write :0
How long does it usually take for the support team managing the support email (tmp-support@spigotmc.org) to respond?
Just wondering if anyone here ever went through this process and if so how long it took.
i have a question
For some reason the dates resultset is reset to 0 after each iteration of the first while loop
Even though i have not used dates.beforefirst()
Hello!
I've been having a constant issue with my AvatarCreatures plugin that causes Ravagers to not rotate while in motion. I have it explained in detail here: https://trello.com/c/OKbAdMda
If you happen to find a possible solution, please DM me, comment on the Trello board, or send me a ping here 🙂
Thanks!
If you are requesting help, your best option is to make a thread on the forums like everyone else does.
And Also Post your Code! and Not A link!
unless its long then you pastebin or hastebin
@cloud sparrow this is a help channel, why cant they
this is why this channel exists
also that is some ugly code @wraith dew
you think that's ugly code? i have seen some really messing spaghetti in the minecraft dev universe
public static everywhere, methods longer than 400 loc
it is @marsh nova
He in-lines his annotations too and I hate him for it
I know it's bad, i'm just saying there's a lot worse
yeah no shit
How many ms should building a gui take?
why do you need to know that
likely none at all considering that, ideally, your GUI should be mostly cached
impossible
If your items are static and non-dynamic, you can create it once and reopen it
Or at least re-use those item constants
All of the items are dynamic
Well, the more dynamic items you have, the longer it will take to construct. Can't help that
Wdym really bad
how is that bad
like what do you expect
why do you need it to be faster, whats the reason lmfao
Well still, its almost like instantly
its not 30%
you should learn percentages before doing java
15ms is 30% of 50ms
lol
not really, anyway the more shit code you have, the longer it will take
"the more shit code you have"
send your current code in a bin
send your current code in a bin
@brisk mango lmao
you shouldn't need a calculator
@subtle blade The reason all the items are dynamic is mainly because each player can have their own language selected
I'd figured that was the case
Not to mention that in the lore and name it displays states, placeholders and other fun stuff
Do you cache these languages?
I do cache all the messages
You're not pulling from file every time you want it right? lol
No
Alright I'd have had to beat you 
And even pulling from a file, Bukkit's YamlConfiguration caches everything
In a Map, yea. Though you could always be using another file type
Assault isnt the answer 😩
Yeah
But the language file doesn't have children
like child memorysections
@subtle blade excuse the half translated messages
It's a wip so I don't have translations yet
what you can always do is spend a few minute to make your own config API using snakeYaml which uses a ConcurrentMap instead, so that you can access your config async
which could help depending on what you're doing, although GUIs are not the best application
I don't have a problem with files, I cache everything on startup
but I only worry on how much of an impact can a few ms have
micro optimizations
jeez dude what monstrosity i created ```if(args[0].equalsIgnoreCase("area")){
temp.clear();
if(args.length>=1){
if(args.length>=2){
temp.clear();
temp.add("create");
if(args.length>=3){
temp.clear();
temp.add("mobName");
if(args.length==4){
temp.clear();
temp.add("mobLimit");
}
if(args.length>=5){
return null;
}
}
}
}
}```
tab completer so hard jeez
oh dear
Yea you don't have to do 90% of that lol
Create constants for your suggestions if you can
oh yikes
as ugly as it is somehow does the job
tbh idk
there arent many guides around for this stuff
so im firing in the dark basically
private static final List<String> ARGS_2_VALUES = Arrays.asList("create");
private static final List<String> ARGS_3_VALUES = Arrays.asList("mobName");
private static final List<String> ARGS_4_VALUES = Arrays.asList("mobLimit");
// in your tab completer
if (args[0].equalsIgnoreCase("area")) {
switch (args.length) {
case 2: return ARGS_2_VALUES;
case 3: return ARGS_3_VALUES;
case 4: return ARGS_4_VALUES;
}
}
return null;```
This should accomplish the exact same thing
Get creative with it 😉
hmm much cleaner i agree
I try to keep things mostly clean though even that one can be cleaned up a bit. Thing is, a lot of my values are dynamic
(the constant creation of new ArrayList<>() for instance - this is some old code)
also a quick nice case 5: return Arrays.asList("");at the end
No reason to. It will default to break then fall through to the return null
If you have more args, return null at the bottom of the switch
it will start pointing to the players name..
Ah, then yea. Create an empty constant
Or, rather, Collections.EMPTY_LIST
There is one already
oh boy its gonna take a while to auto complete all the commands
Takes a bit of creative thinking to get it clean and efficient but the more you do it, the better you get
Also, StringUtil.copyPartialMatches() is your absolute best friend
(It's a Bukkit utility class)
In this exact case where you only have one argument it's no big deal, just return the one value. Though when you have more than one, return a partial match
bad ideea? ```package me.Stellrow.HuntingGrounds.commands;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
public class AutoCompleteChoice {
private HashMap<Integer,List<String>> args = new HashMap<Integer, List<String>>();
public void addArg(Integer arg,String complete){
args.put(arg, Arrays.asList(complete));
}
public List<String> returnArg(Integer argToReturn){
if(args.containsKey(argToReturn)){
return args.get(argToReturn);
}
return Arrays.asList("");
}
}
Ehm, I mean
to have a "manager with these"
Sure? But again, Collections.emptyList()
return Collections.emptyList();
Yep
wouldnt it do the same? or does it already have a pre-created list
It's a constant, yea
oh yeah would save something at least
It's the generic-safe alternative to just doing Collections.EMPTY_LIST but you can probably return that as well if you'd like
Preference in this case
It's some old API but there's also really just no good way to implement it tbh
private static final List<String> ARGS_2_VALUES = Arrays.asList("create");
private static final List<String> ARGS_3_VALUES = Arrays.asList("mobName");
private static final List<String> ARGS_4_VALUES = Arrays.asList("mobLimit");
// in your tab completer
if (args[0].equalsIgnoreCase("area")) {
switch (args.length) {
case 2: return ARGS_2_VALUES;
case 3: return ARGS_3_VALUES;
case 4: return ARGS_4_VALUES;
}
}
return null;```
@subtle blade What's your opinion on switches?
Use 'em when they make sense
Would love to be able to do return switch(args.length) in this case but switch expressions are Java 11 lol
Would love to be able to do
return switch(args.length)in this case but switch expressions are Java 11 lol
@subtle blade wait what
you can do that in Java 11?
Ye
How fast is that performance wise?
return switch (args.length) {
case 2 -> ARGS_2_VALUES;
case 3 -> ARGS_3_VALUES;
case 4 -> ARGS_4_VALUES;
}```

ooo nice
How fast is that performance wise?
Cause I know for instance Java 8 streams are slow (in comparison to normal iterators)
Ehhh not necessarily. Depends on how you use em
Streams are maybe slower than a foreach loop but they have their advantages
Yeah
and they are not really that slower
Its better than a for loop imo
When writing definitely
its shorter, allows you to write an easy lambda
The issue is when you make use of a stream where a for loop just makes more sense
For instance, two calls to filter generally implies you should be using a for loop
Have to be mindful that some operations iterate the entire collection so calling it twice will iterate that collection more than is necessary
They have their time and place
@subtle blade heard brigadier mentioned for tabcompleter
Wdym iterate the entire collection, thats what litterly for loop does too
what does that do?
I mean in a for loop you can make those two filter calls in just a single for loop
if (something && somethingElse)
Brigadier is Mojang's command library that Minecraft makes use of. It handles tab completion in nodes. Every sub command is a node and has its own execution, suggestions, etc.
Bukkit doesn't expose it because it shouldn't be considered Bukkit API as it is not stable
Oh god
What do you think of this?
shopManager.getShopItems().stream().skip(pageSize * currentPage).limit(pageSize).forEachOrdered(shopItem -> {
Bukkit doesn't expose it because it shouldn't be considered Bukkit API as it is not stable
@subtle blade It's not stable?
It's not held to the same standard as Bukkit's forwards compat
It's an independently maintained library
@subtle blade also how come every list has to be final const
Just for the sake of not creating a throwaway object if you don't have to
For dynamic tab completion (which I do for registerable objects), you have no choice but to create a new one. Though all your args are constant every time you tab complete so you can create constant fields
3am coding lmao, I didn't realize until today
why would you ever make collections constant
For dynamic tab completion (which I do for registerable objects), you have no choice but to create a new one. Though all your args are constant every time you tab complete so you can create constant fields
@subtle blade How does minecraft handle tabcomplete when they type more than one character? Is it now clientsided or is it still server sided?
static collections is so bad
static collections is so bad
@brisk mango not at all
not if they're immutable
If they are final and static it's not a problem
final and unmodifiable
yeah but if you would have just static collection
anyway why make it a constant still?
why its not enough to just do
private final IdentityHashMap<String, String> players;
public ClassName() {
players = new IdentityHashMap<>();
}
depends on the use case
no reason to make collections a constant
Servers send list of commands (including tab completion - it's part of the nodes) to the client, handled from there
sometimes you don't need multiple instances
yeah it was just an example
private static final Set<DamageCause> aoeDamageCauses = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(DamageCause.FIRE, DamageCause.FALL)));
there you are
a constant collection
should be uppercase
Dude, use an EnumSet lol
EnumSet.of(DamageCause.FIRE, DamageCause.FALL) 😄
k is still a dumb thing being created? ```if (args[0].equalsIgnoreCase("mob")) {
switch(args[1]){
case "create":{
switch(args.length){
}
}
}
}```
you see my big brian decided to have alot of subcommands with subcommands
this is so shit way to do this
dont use switch for this
im not sure if it ignores the case
anyone knows if the team prefixes not showing up bug is fixed?
by that i mean "/hg mob" has create(wich also has name/entityType)/setgear/setname/delete
basically a spaghetii
just do
if(args[0].equalsIgnoreCase(string)) {
if(args[1].equalsIgnoreCase("")) {
}
}
yeah just make an if inside of an if
will look better than that switch
i will have 100 lines worth of shit
and will be
?
Edit this to change the output of the command!
switch does not ignore case
i mean it does the job
you can just switch (args[0].toLowerCase())
switch is fine for the job
I use switch for sub-commands all the time
if(args[0].equalsIgnoreCase("mob")) {
if(args[1].equalsIgnoreCase("create")) {
if(args.length < 7) {
player.sendMessage("name/entityType/setGear/setName/delete");
return true;
}
final String name = args[2];
final EntityType type = EntityType.valueOf(args[3]);
}
}
or just do String#toLowerCase
switch(args[1]){
case "create":{
switch(args.length){
case 3:
return mobCreate;
case 4:
return mobType;
default:
return Collections.emptyList();
}
}
}
return mob;
}``` looks ugly but perfectly does the job
for the record that is not what i do
https://github.com/PaperMC/Paper/issues/3344 bug with spigot not paper, just posting here so someone notices i guess
if its spigot why its on papers github?
^
well i thought it was a paper issue and made the issue on paper's repo
and it is a paper issue but its on spigot too
HUH?
Bug with spigot not paper
sends an paper link
its a paper bug but its on spigot
no you probs have brain damage when you cant even tell what you need
Can I upload an installation Jar to a Spigot Resource? Insted of the plugin Jar?
For config purposes?
I use it so that the user can select the desired functions in my plugin. It then copys the desired file into a folder from my domain
Dont think you are allowed to upload anything that isnt a straight up plugin
Well do you think you would run a stranger's jar file?
Oh ok. Thank you.
thats about as vulnerable as opening an random .exe file
running unknown plugins isn't any different to launching random .exe files
Hi, when players go to overworld with creative mode, then get back to survival world, their inventories are now the "creative inventory" rather than their survival inventory. Is there a fix to this?
Decompiling java is way easier than x64
for some reason on my server anyone who joins automatically has every perms including being able to op themselves but in my permissions files i cant find anything that would cause this
Players have their creative inventory in survival mode
Looks like the creative and survival inventories are muddled up when changing worlds
so im useing crazy enchants and my players have hit the limits of their enchant amount but they dont have any of the new enchants on them how do i fix this or what is the command to fix this
can anyone help please
so if i have 2 proxies. both proxies communicating using redis. if i wanted to then send a player in one server a message from another server. but the other player was also connected on a diffrent proxy. would i still be able to use bungee plugin channels in spigot to communicate with players on diffrent servers although they are on diffrent proxies?
@craggy tundra wats the prob
is spigot down again?
anyone know how to turn someone's glow off if the plugin isn't installed?
Yeah. Spigot is down.
The new spigot theme is there!
is it good?
How do I stop a player from glowing if the plugin isn’t installed anymore
Anyone else keep getting this?
spigots down
Don't think so, but every 1-2 page refreshes it will give me a 502 error
they got ddosed the other day so idk
Nothing that anyone here except md_5 can do about it.
and I don't really think he can do much about it depending on if its still that sorry excuse for a human being enjoying clicking that button, You just have to deal with it and wait until the guy gets bored.
He won't stop
He been doing this for other websites
Oh it is being attacked? 😁
He done it on another website for a month
Until they payed him
And who is this guy?
He'll never get paid here lol
Senior
He has on the discord
He got banned
Senior is his name?
Yes
If he expects money from any staff here, He is an even bigger moron
What a tosser
Anyone here reckon they could teach me how to shade on maven. I've tried a lot of guides and manuals but i cant seem to get it working
Never pay idiots money, they think they can do it to everyone
Well I hope somebody fries an egg on his router
Well I think he will keep going
Until the staff decide to do something about it
The Home Page Is Completely Broken
Cloudflare should be doing something about it
Or the host, not sure how it works exactly
He has bypass
For the ddos protection
Needs to be fixed then
CloudFlare is not that good, It has its perks but it also has vulnerabilities. You have to pay to get decent ddos protection
and no he doesn't even have bypass, he uses something he pays for, we talked to him. he is a moron
I Also Can't Verify Because it says it can't find my account
If he thinks he will get payed then I'm sorry but he is fucking delusional 😂
a person like that doesn't know how to bypass ddos protection and make their own ddos program
Indeed
anyway #general , there no questions being asked anymore
except the one asking to shade something in maven -> @marsh hawk
anyone else have a problem where they want to code a plugin but dont know what
Anyone here run a network and experienced a big DDoS attack?
I mean for fuck sake, how am I meant to do shit when I can't use the site?
You just don't, You wait literally
This has been happening for a few days no, I ain't got time to wait
You are getting into the complaining portion of things, #general for that stuff. md_5 definitely is already aware of the issues
Any thoughts on using AWS for server hosting?
I need to update RedisBungee but I can't access the page to download it
Can't even use the website on my dedicated server xD blocked however
yes but complaining here ain't going to do anything, you just have to literally wait
^
Well I hope the wanker gets karma
He literally said he has it set for weeks
He is fucking annoying
Thinking he will get paid, this isn't how it works I'm afraid
ok so #general would be nice
Lewis then the owner got to step in
and fix this shit
Whatever then if that makes you feel better
how do I allow players to interact with armorstands? the use and interact flags are already set to allow but it doesnt work
gives me the "Hey!" error
./rg flag <regionname> interact allow
doesnt seem to work
it works but sometimes it stops and then I have to turn it off and on again
you should ask in WorldGuard discord, it's probably a bug
they have a discord?
can I just turn off the worldguarding aspect of worldguard?
just keep regions?
how do I make mobs not move when spawned? In other words, when a blaze spawns from a spawner, or a ghast for example, I want them to not move at all, just simply spawn and sit there. How do I acomplish this?
Does anyone know how to examine a error report log?
how do i check if item has a lore and then if the lore contains a string?
i tried if(item.getItemMeta().getLore() != null && item.getItemMeta().getLore().contains(ChatColor.GRAY + "Telepathy I")) { return; } but no worky
Anyone know how many characters you can have in a Text column for SQL
Im on my phone wait a second @true anvil
ok
if(!item.getItemMeta().getLore().equals(null) && !item.getItemMeta().getLore().equals(ChatColor.GRAY + "Telepathy I")) @true anvil
Should work, not tested
But think about the following problem: what if there is more than 1 meta?
it didnt work oof
it return you a List, loop it, and check
If its a list then convert it in a loop
why are you using .equals with a list of string
also you should check if the lore isEmpty. I don't remember if spigot check it for you or you have to do it by yourself
with a string?
you should be using contains lol
getLore().equals checks if it is equal to another list<string>
also you need to check if the item doesnt have an item meta
so
if (item.getItemMeta() != null && item.getItemMeta().hasLore() && item.getItemMeta().getLore().contains(string)) {
//do stuff
}```
Oh yes .contains ist used for lists lol my bad
Anyone know what characters Base64Coder does not use?
I would like to store serialized inventories in SQL for pvs
and then just split the string
by a character which is not used in serialization
Also u cant check null with .equals, sorry
hey guys im building up a server and i need a couple of plugins i tried many and most doesnt seem to work
@timber barn what experience do you have with this kind of stuff? lol
i need a plugin for the tablist of players / a plugin for WILD command and a plugin for setspawn
I'm sure a lot of the plugins you have work, you just aren't using them correctly?
Im tired and at work ok @buoyant path 😭
Lol
but the thing is i have multivrse core and when i do Wild it do wild on the world im in like if im in the world named spawn and i do wild i do wild in that world and not the original overworld
Tbf i have like 5 years of experience and am coding a server with 2.4k members in our disc
Ð
would that work in SQL?
Weird splitter tbh
I mean
You can try, if u set ur table to utf-8
I kinda need to do it like this
scalability with file systems excluding mongoDb is bad lol
Do you HAVE to but them together and store them in 1 row??
Well I want an unlimited amount of them, so prob
that seems like a lot of work
Ill try out the Ð or something lol
lol
If that doesnt work out (or as intended) i would stick with the new row per inventory
So you are creating a pv plugin?
@buoyant path § this is non-ascii
Looks better than the Đ
Đ reminds me of Đogecoin
Can someone help me with shading a plugin into my intellij project?
I'm using gradle
I'm so lost rn
@idle zodiac have you deleted the current artifact and made a new one yet?
IntelliJ forces you to do that whenever shading to maven/gradle
you can shade with intellij on Project Structure -> Artifacts
OK
@pastel basin ?
I've never got that to work
It throws a NoClassDefError or whatever
@idle zodiac Remove the artifact from project structure then make a new one with dependencies, even if you already have it, you have to make a new artifact. I learned this the hard way lol
ok...
or simply click the + button and add the dependency you want
I'm so lost
so
I made a new artifact
for my plugin
then what?
I need to shade in a gradle script thing
*maven
maven or gradle?
that's what i'm trying to do
i literally haven't a clue
i haven't done this before
it's sad, i know
with maven you can use maven-shade-plugin
how tf do i do it lol
Ill send a few screenshots give a min
OK thanks
whenever i see pom
with my font
and i'm tired
it shows up as something quite fun
but whatever
then what your gonna do
click the - button
then click the +
and do
add with dependencies
then put it wherever you want it to export
oh
fuck my life
Rip
So, I'm trying to shade the https://github.com/Phoenix616/InventoryGui into my project
because if I don't
it throws a NoClassDefFoundError
so in my pom, do i build https://github.com/Phoenix616/InventoryGui or my project?
@buoyant path
OK, sure
thanks
So I created a new artifact, now what?
How do I set the version and artifact id?
and group id
i'm so sorry
Idek xd
@idle zodiac is that github a plugin or just a api resource?
if its a plugin just drop it in the plugins folder, add as dependency in plugin.yml and in the pom.xml
Is it possible to change the color of the usage from plugin.yml that onCommand calls when returning false
Why cant I create Items with dangerous enchantment levels?
So how would I use
i mean it even says ItemStack.addUnsafeEnchantment..
he's not coding, he looking for a plugin to do those stuff.
What version are you using?
If you use 1.12.2, try Itemizer
1.8
well good luck
Already did
You use command to enchant or book?
command
have OP?
unsafe-enchantments: true?
yes
then you shouldnt have a problem with it
but its still imited to vanilla behaviour most likely
you cant add silk touch to a sword..
It will allow me to enchant some things
it just lets you add unlimited enchant level
You can, I don't remember how essx enchant work, normally I just use plugin that customize lore and stuff they always come with enchant command that works
It maxes my explosive at X, my sharpness at 10
No higher
levels
Like sharpness 29 for ex
but it will enchant to that then change to 10
allows, then it will change to 10
there is most likely a limit somewhere in the config
Maybe minecraft itself prevent it, check what plugins you have currently and its config
not rly saw enough times
sharpness XX,minecraft debugs itself with unreasonable level by having the enchant in namespacedkey
what could it be in
like enchantment.minecraf.sharpness.level129 or things like that
try create the items through a command with nbt tags
and see if it does the same
nope just changes back
try a fresh server only with essentials
and do it there and see if its spigot/essentials fault
public class Claim {
private final long data;
public Claim(Chunk chunk) {
data = ((long) chunk.getX() << 32) | (chunk.getZ() & 0xFFFFFFFFL);
}
public int[] deserialize() {
return new int[]{(int) (data >> 32), (int) data};
}
}```
Hey so I am saving chunks at the moment and need a way to efficiently reference a claim to a uniqueid or player. What would be the most efficient way to go about this?
what's data for
data is a concatenation of the chunk coordinate (x, z) into a long with bitwise
I mean to be honest, If I would have done it, I would just have saved the UUID into the claim
Part of the long or as a seperate variable?
just as another variable
cause I don't see how that would work
you can also use PersistentDataHolder to save 'stuff' on entities
That doesn't sound very efficient to me.
although it's not the best way
Any one know of a boss plugin?
Also if I store a claim object with a chunk and uuid attached to it
and a player has a 1000 claims
Then it would save 1000 uuids also...
Would rather make another object with one unique id and a set of claims
yeah maybe another object that stores a list of Claims and has a UUID
I think you can ask to I-S here
he is the developer of PlotSquared so he should know how to properly make claims\plots and stuff
Is it ok to tag him?
I don't know...
I sent him a message
I feel like tagging someone (who is not a part of an ongoing conversation) is like saying "Come pay attention to me! My time is more valuable than yours!"
Why I sent him a message >.<
I figured 🙂
I guess the best way to approach this is to just create a separate object with a unique id and a map of the data. Don't need to be ordered so yeah
No not at all
Not in this instance at least
Since the data is going to be stored locally
no I was talking general
Supporting MySQL is very important in my opinion
like I've already implemented PostgreSQL and SQLite , but I feel like many still use MySQL
well yeah claims can use JSON or SQlite
If you want to look into mysql then I recommend Hibernate or apache cayenne. It is whatever you prefer I guess.
what's hibernate
Hibernate is a library for object relational mapping.
well I already use HikariCP
That is a connection pool not an ORM 😮
I know, i just have no idea of what I could achieve with Hibernate
List<Painting> paintings3 = ObjectSelect.query(Painting.class)
.where(Painting.ARTIST.dot(Artist.DATE_OF_BIRTH).lt(LocalDate.of(1900,1,1)))
.select(context);
``` It simplifies the way you can query data. Formats it much nicer with code rather than Query language
This is an apache maven example
hi i tried to make a hellow plugin on eclipse when i went to make the yml file a window popped out to choose wich text editor to choose and i picked plain text the plugin doesnt load it says the yml file is invalid
oh it's like a thing for making SQL syntax easier
Yes ^
well at the moment my table is basically a 2 column with UUID and INTEGER
so no really need for it
make sure it is saved as .yml and not .txt
I guess I could use it if it gets more complex
Yeah then I would 100% not worry about an ORM xD
yes i typed plugin.yml
I don't really use eclipse but it is strange that an IDE would prompt you to open an external editor rather than just a built in one >.<
I honestly find eclipse bad
there are much better options such as Apache NetBeans or IntelliJ Community
so what should i do
I recommend switching to IntelliJ and searching on google on how to setup a java project on it.
ok
or edit the file outside Eclipse
There are enough resources online to help you.
IntelliJ in my opinion is easier to use then eclipse
yes just the first plugin tut i found was with eclipse
then the tutorial is damn old
ye its from 2017
I honestly love NetBeans
although IntelliJ may be easier to use
and has more features
thx then im gonna get intelliJ
Can anyone help me dig up cannot find it or be botheredMinecraft Server Website which is 7.4-7.6mbs?
on the spigot site
are there any plugins that change how EXP works? I use Epic Enchants and some books cost 4000 EXP and currently my scoreboard displays EXP in a very weird way
There is a difference between levels and points. 4000 Xp points is a little bit more than 50 levels
how do i make a dabbing armour stand
to make a dabbing entity
XDDDDD
that will chase the nearest entity
are you having a laugh
well the armor stand you can create with mcstacker or smth
you can run cmds in spigot
it might be better to make it as a datapack
ok?
@frigid pumice what placeholder should I use for my EXP then?
i dont know, what your problem exactly is, so i cant answer that question properly. But showing the levels is for the user probably the better solution.
Hey
I'm trying to synchronize the Lobby's permissions with RankUP using MySQL from PEX, but I had already tried with LuckPerms, and I also couldn't... I managed to synchronize the Lobby with BungeeCord, but I am unable to synchronize BungeeCord and Lobby permissions with RankUP!
@frigid pumice what placeholder should I use for my EXP then?
@wanton vine scoreboard
@hollow thorn Huh?
can you explain what you mean?
My Plugin is disabling because apparently Vault is not detected, however when I use vault, it says that it is already initialized!
I don't know whether it's to do with FAWE or smth
ji i got intelliJ why does it only export the plugin.yml
@frigid ember What do you mean?
after i artifact it theres only the plugin.yml
Make sure you depend on vault in your plugin.yml @idle zodiac
Anyone can help me?
I'm trying to synchronize the Lobby's permissions with RankUP using MySQL from PEX, but I had already tried with LuckPerms, and I also couldn't... I managed to synchronize the Lobby with BungeeCord, but I am unable to synchronize BungeeCord and Lobby permissions with RankUP!
np
,_,
apparently there is an NPE at line 65
its setting a variable
my brain
let me try movingf the var declaration int othe tryu
nope
what
oh
ok
my connection is null
let's fix that
why inteliJ only export yml file
they support more than just yml files xD
I need help. a friend lost his spigot account, did his email and password change some way to recover it?
no i try to export to a jar file but it export only the yml for some reason
Wdym export
what?
What's the best way to get a block a player is looking at, #getTargetBlock()?
And if so, can anyone tell me what that means.
Cast to set material
👍
How would I check if an entity is stackable or not. Google only comes up with WildStacker results which isn't what im looking for.
Basically I wish to filter entities to only be items / blocks and they must be stackable
if (entity instanceof Item) {
ItemStack itemStack = ((Item) entity).getItemStack();
if (itemStack.getMaxStackSize() > 1) {
//do stuf
}
}
Is this the most efficient way?
Yea
So i've been experimenting with the Bukkit YAML Api.
but I haven't seen a proper way to load a list of objects
getStringList
idk what to do
So the list cotains strings?
Wait
Im at work sorry, so strings it is?
@frigid ember you need to set up inteliJ properly
i made it export but it says it doesnt contain a yml file
You need a plugin.yml file
so i do
Inside /src
ohhh
Not inside the package
but i did put it in src
Those objects are represented inside my code
as this
I think I'll have to use other APIs because unless I'm missing it, the current API doesn't allow me to directly return a list of Objects of a specified type
if anyone here knows how to do this , thanks
What kind of objects?
I mean yaml 1.1 only supports so much when it comes to saving
You see that class above called 'WordMatcher'
I basically need to get a List of those from YAML
So you are saving objects?
If you want to save Java Objects, just serialize them
as long as it can be serialized you can store them and then get them back and should work in obtaining it as a list
so I need that class to implement ConfigurationSerializable?
Should be just Serializable
hi
you should serialise and deserialise data, not objects
are you using online-mode
yes
wdym
that's what he means
so how to fic
literally
that's bungeecord documentation for you
can you send the link out?
your spigot servers need to be in offline mode and bungeecord: true
and your proxy needs to be in online mode in order to authenticate
the authentication happens on the proxy, not the spigot servers
so i need to do what to fix the skin
Ok I'll implement the interface and add serialVersionUid then see what happens
it is generally best to use ConfigurationSerializable if the object you want serialized is part of the API. IE itemStacks for instance, but if the object you want serialized is not, just go with Serializable since YAML supports serializing java objects in general.
so what i need to do for the skin?
bruh
do what I said and come here again if it still doesn't work (it should as long as Mojang APIs are working)
if (infChestBlock != null) {
broadcast("iChest found");
for (Entity entity : infChestBlock.getChunk().getEntities()) {
broadcast("There is an entity");
I get the found message but not the entity one
well you get the first one because it is just a null check, not a type check
Not entirely sure for the loop
only thing I can think of is if the chest is on the border of the chunk, and the items are off a bit towards that border
then the items are technically in a different chunk then the chest
How do i use commands i installed smooth timber and toxicoverworld
because smooth timber does not work for me
Anyone that knows a plugin which allows infinite End Portal spawning, instead of just 128?
It is fixed

